Video playing method, device and equipment

By obtaining playback policy information on the terminal and adaptively selecting the playback unit and playback mode, the problem of unreasonable resource utilization in the prior art is solved, and a more efficient video playback effect is achieved.

CN119545109AActive Publication Date: 2025-02-28HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411724848.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-28
Estimated Expiration
2044-11-27

Smart Images

  • Figure CN119545109A_ABST
    Figure CN119545109A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a video playing method, device and equipment, and the method comprises the steps: obtaining playing strategy information in response to a received video playing instruction, the playing strategy information indicates a strategy of selecting a playing unit and a playing mode from at least one playing unit in the current terminal and at least one playing mode preset by each playing unit, and each playing mode comprises a combination of a decoding mode and a rendering mode; determining a target playing unit and a target playing mode of a to-be-played target video based on the playing strategy information; and playing the target video according to the target playing mode through the target playing unit. According to the method, the resource utilization rationality can be improved, and the capability of domestic terminal hardware is fully utilized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a video playback method, device and equipment. Background Art

[0002] With the rise of domestic terminals in the market, various manufacturers have launched a wide variety of terminal models with various software and hardware combinations. When playing videos on the terminal, in order to ensure that the video can be played smoothly and efficiently, it is necessary to adapt and connect according to different software and hardware interfaces.

[0003] In the related multi-window video playback solution, multiple videos played are decoded using separate full-hard decoding, full-soft decoding and other decoding methods. The use of a single decoding method causes one resource of the terminal to reach its upper limit, while other resources are wasted. The resource utilization is unreasonable and the capabilities of domestic terminal hardware cannot be fully utilized. Summary of the invention

[0004] The main purpose of this application is to provide a video playback method, device and equipment that can improve the rationality of resource utilization and fully utilize the capabilities of domestic terminal hardware.

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

[0006] In response to the received video playback instruction, playback strategy information is obtained, where 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 playback mode preset for each playback unit, where each playback mode includes a combination of a decoding mode and a rendering mode;

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

[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 restriction conditions: a playback quantity threshold of a playback unit, a playback quantity threshold of a playback mode, a priority of a playback unit, a priority of a playback mode, and a resource usage rate threshold of a playback unit;

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

[0011] A target playback unit that satisfies the restriction condition in the playback strategy information is selected from the at least one playback unit, and a target playback mode that satisfies the restriction condition in the playback strategy information is selected from the at least one playback mode of the target playback unit.

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

[0013] The step of determining a target playback unit and a target playback mode of a 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, determining a playback unit that currently meets the candidate condition, and determining the playback unit that first meets the candidate condition as the target playback unit;

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

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

[0017] Based on the priority order of the at least one playback unit, determining the playback unit whose current video playback quantity does not reach the playback quantity threshold first as the target playback unit;

[0018] The step of determining a playback mode that currently satisfies the candidate condition based on the priority order of at least one playback mode of the target playback unit, and determining the playback mode that first satisfies the candidate condition 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 whose current video playback quantity does not reach the playback quantity threshold is determined first as the target playback mode.

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

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

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

[0023] Determine a playback mode in which the number of videos of the target bitstream type currently being played is less than a corresponding playback number threshold 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 different video stream types in each playback mode of the at least one playback unit includes:

[0026] Determine a maximum number of videos that can be played by any playback unit in any playback mode and any video stream type under the condition that playback conditions are met, wherein the resource usage rate of the playback unit does not exceed a resource usage rate threshold and the video playback quality meets a video quality condition;

[0027] The maximum video play quantity is determined as a play quantity threshold of the play mode of the play unit for the video stream type.

[0028] Optionally, the playback strategy information also 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; among the at least one playback mode of the last priority playback unit, the playback quantity threshold of the last priority playback mode for each video stream type is infinite.

[0029] Optionally, the playback strategy information further includes a resource usage rate threshold of the at least one playback unit;

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

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

[0032] Determine a playback unit whose target resource usage rate is not greater than the resource usage rate threshold as the target playback unit;

[0033] The target playback mode is selected from at least one playback mode of the target playback unit.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a video playback device, the video playback device comprising:

[0035] an information acquisition module, configured to acquire, in response to a received video playback instruction, playback strategy information, wherein the playback strategy information indicates a strategy for selecting a playback unit and a playback mode from at least one playback unit in a current terminal and at least one playback mode preset for each playback unit, wherein each playback mode includes a combination of a decoding mode and a rendering mode;

[0036] A mode determination module, used to determine a target playback unit and a target playback mode of a 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 restriction conditions: a playback quantity threshold of a playback unit, a playback quantity threshold of a playback mode, a priority of a playback unit, a priority of a playback mode, and a resource usage rate threshold of a playback unit;

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

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

[0041] The mode determination module comprises:

[0042] A first determining unit, configured to determine a playback unit that currently satisfies a candidate condition based on a priority order of the at least one playback unit, and determine the playback unit that first satisfies the candidate condition as the target playback unit;

[0043] The second determination unit is used to determine the playback mode that currently meets the alternative condition based on the priority order of at least one playback mode of the target playback unit, and determine the playback mode that first meets the alternative condition as the target playback mode.

[0044] Optionally, the first determining unit is configured to determine, based on the priority order of the at least one playing unit, a playing unit whose current video playing quantity does not reach the playing quantity threshold and is first determined as the target playing unit;

[0045] The second determination unit is used to determine the first determined playback mode whose current video playback quantity does not reach the playback quantity 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 different video bitstream types for each playback mode of the at least one playback unit, and 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 code stream type currently being played in each playback mode of the at least one playback unit; determine the playback mode in which the number of videos of the target code stream type currently being played is less than the corresponding playback quantity threshold as the target playback mode; and determine the playback unit corresponding to the target playback mode as the target playback unit.

[0048] Optionally, the device further comprises:

[0049] A threshold determination module is used to determine the maximum number of video plays that can be achieved by any playback unit playing a video of any video stream type in any playback mode under the condition that playback conditions are met, wherein 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 condition; the maximum number of video plays 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 also 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; among the at least one playback mode of the last priority playback unit, the playback quantity threshold of the last priority playback mode for each video stream type is infinite.

[0051] Optionally, the playback strategy information further includes a resource usage rate threshold of the at least one playback unit;

[0052] The mode determination module 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 assigned; 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, the present 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, wherein the video playback program is configured to implement the video playback method described above.

[0054] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a video playback program is stored, and when the video playback program is executed by a processor, the video playback method as described above is implemented.

[0055] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a video playback program, and when the video playback program is executed by a processor, it 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 by the present application provides multiple playback modes for various combinations of playback units on the terminal through the combination of the decoding mode and the rendering mode of the playback unit. In response to the received video playback instruction, the playback strategy information is obtained. Since the playback strategy information indicates the strategy of selecting the playback unit and the playback mode from at least one playback unit in the current terminal and at least one playback mode preset by each playback unit, the target playback unit and the target playback mode of the target video to be played are determined based on the playback strategy information, thereby realizing the adaptive allocation of the playback unit and the playback mode. The target video is played by the adaptively allocated target playback unit and the target playback mode, which improves the rationality of resource utilization, thereby making full use of the capabilities of domestic terminal hardware. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0060] Figure 1 A schematic diagram of the implementation environment of the video playback method of this application;

[0061] Figure 2 This is a flow chart of the first embodiment of the video playback method of the present application;

[0062] Figure 3 A schematic diagram of the correspondence between the playback mode and the playback quantity threshold in an embodiment of the video playback method of the present application;

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

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

[0065] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the video playback method in the embodiment of the present application.

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

[0067] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0068] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0069] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 , the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network. Exemplarily, the terminal 101 is a computer, a mobile phone, a tablet computer or other terminals. Exemplarily, the server 102 is a background server of an application or a cloud server that provides cloud computing and cloud storage services.

[0070] Exemplarily, a video application is installed in the terminal 101, and the video application is a video application in the operating system of the terminal 101, or a video application provided by a third party. The terminal 101 can implement functions such as data transmission and message interaction through the video application, thereby realizing the video playback function.

[0071] In the embodiment of the present application, the server 102 is used to send a video playback instruction to the terminal 101. The terminal 101 is used to receive the video playback instruction, and in response to the video playback instruction, obtain 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 in the current terminal and at least one playback mode preset for each playback unit, wherein each playback mode includes a combination of a decoding mode and a rendering mode. Then, based on the playback strategy information, the terminal 101 determines the target playback unit and the 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, in the scenario of playing multiple surveillance video images. Or, in the case of a multi-party video call, playing multi-party video images. Or, when watching a movie, playing multiple different movie images, etc., this application does not limit this.

[0073] Figure 2 This is a flow chart of the first embodiment of the video playback method of the present application. Figure 2 Taking the execution subject as a terminal as an example, the video playback method provided by the embodiment of the present application includes:

[0074] Step S10: In response to the received video playback instruction, playback strategy information is obtained, where 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 playback mode preset for each playback unit, wherein each playback mode includes a combination of a decoding mode and a rendering mode.

[0075] The video play instruction is a command issued by a user or a server, requesting the terminal to play a specified video content. For example, the terminal generates a video play instruction based on a click on a user interface, a voice command, or other forms of input. Alternatively, the terminal receives a video play instruction issued by a server. Optionally, the video play instruction carries a target video to be played. Optionally, the video play instruction also carries other information related to the target video to be played, such as the video stream type of the target video, the size of the video, etc.

[0076] At least one playback unit is currently configured in the terminal, and each playback unit is preset with at least one playback mode. The playback strategy information defines the configuration method of the playback unit and the playback mode in the terminal, as well as information on how to select the playback unit and the playback mode. For example, the playback strategy information includes a variety of selection logics and conditions for determining which playback unit and which playback mode to use in a specific situation. Optionally, the playback strategy information is stored in the terminal or in the video application of the terminal. Accordingly, the terminal can obtain the playback strategy information locally or from the video application.

[0077] The playback unit is a module or component in the terminal that is responsible for video playback. Exemplarily, the playback unit includes a CPU (Central Processing Unit), a graphics card, a GPU (Graphics Processing Unit), etc., which is not limited in the embodiments of the present application. The playback mode is a specific configuration adopted by the playback unit when performing a video playback task. Each playback mode includes a combination of a decoding mode and a rendering mode to adapt to different playback environments and requirements.

[0078] Decoding is the process of restoring compressed video data to the original image frame. The decoding mode refers to the way of video decoding. The decoding modes include hardware decoding and software decoding. Among them, hardware decoding uses the dedicated hardware of the device, such as GPU, for decoding. This decoding method has higher decoding speed 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 the way image frames are displayed on the screen. Rendering modes include hardware rendering and software rendering. Hardware rendering refers to the use of dedicated hardware of the device, such as GPU, to render images. Software rendering refers to the use of the device's CPU to render images. Software rendering does not rely on dedicated hardware and is completely implemented by software algorithms.

[0080] The combination of the playback mode including the decoding mode and the rendering mode means that the decoding mode and the rendering mode are combined to realize multiple playback modes. Optionally, the combination of the decoding mode and the rendering mode in the present application includes at least two of the following: hardware decoding and hardware rendering; hardware decoding and software rendering; software decoding and hardware rendering; software decoding and software rendering. By combining the decoding mode and the rendering mode to realize these multiple different playback modes, different device performance and playback requirements can be met.

[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, the terminal determines the target playback unit and the target playback mode of the target video to be played based on the playback strategy information, including: the terminal queries at least one playback unit corresponding to the current terminal model and at least one playback mode corresponding to each playback unit from the playback strategy information based on the current terminal model; and determines the target playback unit and the target playback mode of the target video to be played from at least one playback unit corresponding to the current terminal model and at least one playback mode corresponding to each playback unit. This solution can ensure that the selected playback mode matches the hardware and software environment of the terminal by selecting the appropriate playback unit and playback mode based on the current terminal model, thereby improving the compatibility and stability of video playback. It can also maximize the use of the terminal's hardware resources and improve the performance of video playback.

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

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

[0084] Exemplarily, the playback strategy information includes at least one playback unit that matches different video bitstream types, and at least one playback mode that matches different video bitstream types. Accordingly, based on the bitstream type of the target video to be played, the terminal selects a playback unit that matches the bitstream type of the target video from at least one playback unit in the current terminal as the target playback unit, and selects a playback mode that matches the bitstream type of the target video from at least one playback mode of the target playback unit as the target playback mode. This approach can ensure the compatibility of the determined target playback unit and target playback mode with the target video to be played, thereby improving the video playback effect.

[0085] Optionally, the playback strategy information includes at least one of the following restrictive conditions: a playback quantity threshold of a playback unit, a playback quantity threshold of a playback mode, a playback unit priority, a playback mode priority, and a playback unit resource utilization threshold. Among them, the playback quantity threshold of a playback unit is the maximum number of videos that a playback unit can play. The playback quantity threshold of a playback mode refers to the maximum number of videos that can be played in this playback mode. The playback unit priority determines which playback unit will be applied first when there are multiple playback units. The playback mode priority determines which playback mode will be applied first when there are multiple playback modes. The playback unit resource utilization threshold refers to the maximum resource utilization preset by the playback unit.

[0086] Correspondingly, 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: selecting a target playback unit that meets the restriction conditions in the playback strategy information from at least one playback unit, and selecting a target playback mode that meets the restriction conditions in the playback strategy information from at least one playback mode of the target playback unit.

[0087] Exemplarily, 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. The playback mode with the highest priority from at least one playback mode of the target playback unit is selected as the target playback mode.

[0088] Exemplarily, the playback strategy information includes a playback quantity threshold of a playback unit and a playback quantity threshold of a playback mode. Accordingly, the terminal selects a playback unit whose current video playback quantity is less than the corresponding playback quantity threshold from at least one playback unit as a target playback unit. A playback mode whose current video playback quantity is less than the corresponding playback quantity threshold is selected from at least one playback mode of the target playback unit as a target playback mode.

[0089] Exemplarily, the playback strategy information includes a playback quantity threshold, a resource utilization rate threshold, and a playback mode priority of the playback unit. Accordingly, the terminal selects a playback unit whose current video playback quantity is less than the corresponding playback quantity threshold and whose target resource utilization rate is less than the resource utilization rate threshold from at least one playback unit as a target playback unit. The playback mode with the highest priority is selected from at least one playback mode of the target playback unit as the target playback mode.

[0090] The playback strategy information in the embodiment of the present application includes at least one restriction condition, which is used to screen target playback units and target playback modes that meet the condition. By selecting a target playback unit that meets the restriction condition in the playback strategy information from at least one playback unit, and selecting a target playback mode that meets the restriction condition in the playback strategy information from at least one playback mode of the target playback unit, on the one hand, it is possible to quickly screen out playback units and playback modes that meet the condition, thereby reducing unnecessary search time; on the other hand, by setting flexible conditions, 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 is implemented as follows: the terminal decodes the target video according to a decoding mode in a target playback mode through a target playback unit, renders the target video according to a rendering mode in the target playback mode, and then plays the target video on a display.

[0093] The video playback solution provided by the present application provides multiple playback modes for various combinations of playback units on the terminal through the combination of the decoding mode and the rendering mode of the playback unit. In response to the received video playback instruction, the playback strategy information is obtained. Since the playback strategy information indicates the strategy of selecting the playback unit and the playback mode from at least one playback unit in the current terminal and at least one playback mode preset by each playback unit, the target playback unit and the target playback mode of the target video to be played are determined based on the playback strategy information, thereby realizing the adaptive allocation of the playback unit and the playback mode. The target video is played by the adaptively allocated target playback unit and the target playback mode, which improves the rationality of resource utilization, thereby making full use of the capabilities of domestic 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 the 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 alternative condition based on the priority order of at least one playback unit, and determines the playback unit that first meets the alternative condition as the target playback unit; based on the priority order of at least one playback mode of the target playback unit, determines the playback mode that currently meets the alternative condition, and determines the playback mode that first meets the alternative condition as the target playback mode.

[0095] Optionally, the video playback parameters of a playback unit with a higher priority are superior to those of a playback unit with a lower priority. The video playback parameters are used to measure the video playback quality and / or resource usage of the playback unit. The better the video playback parameters, the better the video playback quality of the playback unit and / or the lower the resource usage. Exemplarily, the video playback parameters indicate at least one of the decoding speed, rendering speed, rendering effect, playback smoothness, playback jamming and resource usage of the playback unit. Optionally, the video playback parameters of a playback mode with a higher priority are superior to those of a playback mode with a lower priority. The video playback parameters are used to measure the video playback quality and resource usage corresponding to the playback mode. The better the video playback parameters, the better the video playback quality and / or the lower the resource usage corresponding to the playback mode.

[0096] The alternative condition is a standard or condition that determines whether a certain playback unit or playback mode can be selected. The present application determines whether each playback unit meets the alternative condition in order of priority. Once a playback unit that meets the alternative condition is determined, the playback unit is determined as the target playback unit, and playback units with lower priorities are no longer judged. After the target playback unit is determined, for at least one playback mode of the target playback unit, each playback mode is determined in order of priority to determine whether it meets the alternative condition. Once a playback mode that meets the alternative condition is determined, the playback mode is determined as the target playback mode, and playback modes with lower priorities are no longer judged.

[0097] In the embodiment of the present application, the priority order of the playback unit and the playback mode is set, and the target playback unit and the target playback mode that meet the alternative conditions are determined according to the priority order. The playback unit and the playback mode assigned to the video to be played can be automatically adjusted based on the priority and the alternative conditions, so that these resources can be maximized under limited terminal resources to improve the playback efficiency. In addition, since the video playback parameters of the playback unit and the playback mode with a higher priority are better, the playback unit and the playback mode with a higher priority are preferentially selected according to the priority order, which ensures the video playback effect when the target video is played based on the selected target playback unit and the target playback mode.

[0098] Optionally, the alternative condition includes that the current number of video plays does not reach the playback number threshold. The playback number threshold is also included in the playback strategy information. Accordingly, the terminal determines the playback unit whose current number of video plays does not reach the playback number threshold as the target playback unit based on the priority order of at least one playback unit. The terminal determines the playback mode whose current number of video plays does not reach 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. This scheme can balance resource allocation, that is, when the number of video plays of a playback unit with a higher priority reaches the threshold, the terminal will automatically select other playback units with a lower priority, and when the number of video plays of a playback mode with a higher priority reaches the threshold, the terminal will automatically select other playback modes with a lower priority. This can avoid a certain playback unit or playback mode being assigned too many tasks, thereby reducing the occurrence of video playback failures.

[0099] Optionally, the alternative condition includes that the target resource utilization rate does not reach the resource utilization rate threshold. The 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 assigned. Accordingly, the terminal determines the playback unit whose target resource utilization rate does not reach the resource utilization rate threshold as the target playback unit based on the priority order of at least one playback unit. The terminal selects the playback mode with the highest priority from at least one playback mode of the target playback unit as the target playback mode based on the priority order of at least one playback mode of the target playback unit. This scheme can balance resource allocation, that is, when the target resource utilization rate of the playback unit with a higher priority reaches the threshold, the terminal will automatically select other playback units with a lower priority, so as to avoid a certain playback unit being assigned too many tasks, thereby reducing the occurrence of video playback failures. This mechanism helps to allocate playback resources more reasonably and improve the utilization rate of the terminal's hardware resources.

[0100] Optionally, the alternative conditions include that the current number of video plays does not reach the play number threshold, and the target resource utilization rate does not reach the resource utilization rate threshold. Accordingly, the terminal determines the play unit whose current number of video plays does not reach the play number threshold and the target resource utilization rate does not reach the resource utilization rate threshold as the target play unit based on the priority order of at least one play unit. Then, based on the priority order of at least one play mode of the target play unit, the terminal determines the play mode whose current number of video plays does not reach the play number threshold as the target play mode. This scheme determines the target play unit and the target play mode based on the priority of the play unit and the play mode, in combination with the play number threshold and the resource utilization rate threshold, which can further prevent a certain play unit or play mode from being overloaded, and helps to maintain the stability and reliability of the terminal video playback.

[0101] Optionally, the alternative condition includes that the current video playback quality meets the video quality condition. The video quality condition is also included in the playback strategy information. For example, the video quality condition includes at least one of the standards for video decoding speed, rendering speed, playback smoothness, and picture clarity. Accordingly, the terminal determines the playback unit whose current video playback quality meets the video quality condition first as the target playback unit based on the priority order of at least one playback unit. The terminal determines the playback mode whose current video playback quality meets the video quality condition first as the target playback mode based on the priority order of at least one playback mode of the target playback unit. The present application gives priority to playback units and playback modes with high priority and whose video playback quality meets the quality condition. When the current video playback quality of the playback unit or playback mode with high priority does not meet the quality condition, the playback unit and playback mode can be automatically selected and adjusted to ensure that the user can always watch high-quality video content, which helps to improve the user's viewing experience.

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

[0103] Exemplarily, the video bitstream information is carried in the video playback instruction. Among them, the bitstream information includes information such as video resolution, video bitrate, video frame rate, and video encoding format. The video bitstream information determines the type of the video bitstream. Different types of bitstreams require different playback environments and playback resources. Therefore, different playback units or playback modes have different playback capabilities for videos of different bitstream types. Therefore, the present application sets a playback quantity threshold for different video bitstream types for each playback mode of at least one playback unit in the playback strategy information, and uses a corresponding playback quantity threshold for videos of different bitstream types to limit the video playback volume of each playback mode. In this way, the load size of each playback mode can be controlled and adjusted more accurately, which helps to allocate playback resources more reasonably and improve the utilization rate of the terminal's hardware resources.

[0104] Exemplarily, there are multiple playback modes in which the number of videos of the target code stream type currently being played is less than the corresponding playback number threshold. In this case, a playback mode with the highest priority is selected from the multiple playback modes as the target playback mode. Alternatively, a playback mode is randomly selected from the multiple playback modes as the target playback mode. Alternatively, the target resource utilization rates of the playback units corresponding to the multiple playback modes are determined respectively, and the playback mode corresponding to the playback unit with the target resource utilization rate less than the resource utilization rate threshold is determined as the target playback mode. Alternatively, the priorities of the playback units corresponding to the multiple playback modes are determined respectively, 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 further includes the priority order of at least one playback unit and the priority order of at least one playback mode of each playback unit; in at least one playback mode of the last priority playback unit, the playback quantity threshold for each video bitstream type in the last priority playback mode is infinite. In this way, when the number of videos of the target bitstream type of the first priority playback mode in the first priority playback unit reaches the playback quantity threshold, all the videos of the target bitstream type to be played that are added subsequently can be played through the last priority playback mode in the last priority playback unit.

[0106] Figure 3 This is a schematic diagram of the corresponding relationship between the playback mode and the playback quantity threshold in the terminal. Figure 3 , where 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 in terminal A. Playback unit A sets a playback mode, namely, playback mode A. The maximum number of videos belonging to video stream type A that can be played by playback unit A under playback mode A is playback number threshold A. Playback unit B sets two playback modes, namely, playback mode B and playback mode C. The maximum number of videos belonging to video stream type A that can be played by playback unit B under playback mode B is playback number threshold B, and the maximum number of videos belonging to video stream type A that can be played under playback mode C is playback number threshold C. In addition, in this corresponding relationship, playback unit A is located above playback unit B, indicating that playback unit A has a higher priority in playing videos than playback unit B. Playback mode B is located above playback mode C, indicating that playback mode B has a higher priority in playing videos than playback mode C.

[0107] Optionally, a method for determining a playback quantity threshold for different video code stream types for each playback mode of at least one playback unit includes: the terminal determines the maximum number of video playbacks that can be achieved when any playback unit plays a video of any video code stream type in any playback mode under the condition that a playback condition is met; and the maximum number of video playbacks is determined as the playback quantity threshold for the playback mode of the playback unit for the video code stream type. The playback condition includes 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 condition. For example, the video quality condition includes at least one of a standard for video decoding speed, a standard for rendering speed, a standard for playback smoothness, and a standard for picture clarity.

[0108] The video playback quality of the playback unit in the playback condition meets the video quality condition, which can ensure the playback quality of each video in the playback unit, and the resource utilization rate of the playback unit in the playback condition does not exceed the resource utilization rate threshold, which can not only avoid the playback unit from being overloaded and ensure the playback quality of each video in the playback unit, but also avoid the playback unit from occupying too many hardware resources and affecting the video playback quality of other playback units. Therefore, the terminal determines 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 the condition that the playback conditions are met, and determines the maximum number of video playbacks as the playback number threshold of the playback mode of the playback unit for the video stream type, and realizes adaptive allocation of multiple playback modes based on the playback number threshold, which can balance resource allocation and maximize the use of terminal hardware resources.

[0109] In some embodiments, the playback strategy information also includes a resource usage threshold of at least one playback unit. Accordingly, the terminal determines the target playback unit and the target playback mode of the target video to be played based on the playback strategy information, including: the terminal determines the target resource usage of at least one playback unit, the target resource usage represents the resource usage when the target video is assigned; the playback unit whose target resource usage is not greater than the resource usage threshold is determined as the target playback unit; the target playback mode is selected from at least one playback mode of the target playback unit. This solution can accurately control the resource usage of the playback unit and avoid excessive consumption of resources, so that the playback unit can ensure the video playback quality while not affecting the video playback quality of other playback units, thereby ensuring the multi-video playback effect of the terminal as a whole.

[0110] Resource utilization refers to the utilization rate of the hardware resources in the terminal by the playback unit. For example, the utilization rate of the CPU, graphics card, memory, and network resources. The resource utilization threshold refers to the maximum resource utilization rate set for the playback unit. Different resource utilization thresholds can be set for different resources. In addition, the setting of the resource utilization threshold is combined with the video playback effect of the playback unit. For example, the resource utilization threshold set by each playback unit can ensure that when the resource utilization rate of the playback unit is not greater than the resource utilization threshold, the video playback quality of the playback unit can meet the video quality conditions and will not affect 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 assigned to the target playback unit. Since the video to be played has not yet been assigned to the target playback unit for processing, the target resource utilization rate is actually an estimated resource utilization rate.

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

[0113] Exemplarily, the resource usage rate required for playing the target video, i.e., the second resource usage rate, is determined based on the video bitstream type of the target video. For example, the resource usage rate required for the playback unit to play any video of the target bitstream type is determined as the resource usage rate required for the playback unit to play the target video, wherein the bitstream of the target video belongs to the target bitstream type. The resource usage rate required for the playback unit to play the video of the target bitstream type can be stored in the terminal for easy retrieval.

[0114] In the embodiment of the present application, since the first resource usage rate is the current resource usage rate of the playback unit, and the second resource usage rate is the resource usage rate required by the playback unit to play the target video to be played, the sum of the first resource usage rate and the second resource usage rate can accurately represent the resource usage rate of the playback unit when the video to be played is assigned to the playback unit, thereby ensuring the video playback effect of the target playback unit determined based on the resource usage rate.

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

[0116] Optionally, the terminal obtains the second resource usage rate of the playback unit, including: the terminal obtains the resource usage rate threshold and the playback quantity threshold of the playback unit; and determines the ratio of the resource usage rate threshold to the playback quantity threshold as the second resource usage rate. Since the resource usage rate threshold is the maximum resource usage 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 usage rate threshold to the playback quantity threshold can accurately represent the resource usage rate allocated to each video, and determining the resource usage rate as the second resource usage rate to represent the resource usage rate required for the playback unit to play the target video has high accuracy, which can ensure the video playback effect of the target playback unit subsequently determined based on the second resource usage rate.

[0117] Optionally, the resources required by the playback unit to play the video are of various types. For example, CPU resources, graphics card resources, memory resources, network resources, etc. Considering that the resources used by the playback unit to play the video are of various types, and the resource usage rate of each type of resource can affect the video playback effect of the playback unit, the terminal obtains the target resource usage rate of the playback unit for each type of resource, and determines the playback unit whose target resource usage rate of each resource is not greater than the corresponding resource usage rate threshold as the target playback unit, so as to better ensure the video playback effect of the target playback unit.

[0118] One point that needs to be explained is that, based on the resource utilization rate threshold, the terminal can also determine the target playback unit in combination with the video playback quantity threshold, or the terminal can also determine the target playback unit in combination with the playback unit priority. Further, the terminal combines the playback unit priority, playback quantity threshold, and resource utilization rate threshold to determine the target playback unit. In addition, when selecting a target playback mode from at least one playback mode of the target playback unit, the target playback mode can be determined in combination with the playback quantity threshold of the playback mode, the priority of the playback mode, etc. Please refer to the above embodiments for the specific combination method, which will not be repeated here.

[0119] Figure 4 A schematic diagram of a video allocation process. Figure 4After receiving the video playback instruction, the terminal reads the video stream type therein, and then judges in order according to the priority order of the playback unit to determine the target playback unit. First, determine the number of video plays of the current playback unit, and then determine the relationship between the number of video plays of the current playback unit and the playback number threshold. When the number of video plays reaches the playback number threshold, that is, the number of video plays is greater than or equal to the playback number threshold, determine the next playback unit. When the number of video plays is less than the playback number threshold, determine the relationship between the target resource utilization rate of the current playback unit and the resource utilization rate threshold. When the target resource utilization rate is greater than the resource utilization rate threshold, determine the next playback unit. When the target resource utilization rate is not greater than the resource utilization rate threshold, play the video through the current playback unit.

[0120] One thing that needs to be explained is that there are many types of terminal models launched by various manufacturers on the market, and the terminal software and hardware combinations are diverse. Video playback needs to be adapted and connected according to different software and hardware interfaces. In the existing technical solutions, video playback often uses separate full-hardware decoding, full-software decoding and other decoding methods in multiple windows. The decoding method is single, and there is a situation where the use of one resource reaches the upper limit, while other resources are wasted, and the terminal hardware capabilities cannot be maximized. On the other hand, due to the immaturity of the hardware ecosystem, there are inaccurate statistics on resource utilization, resulting in too many playback tasks being allocated to decoding resources, resulting in video playback freezes or black screens, poor video playback effects, and failure to meet user needs.

[0121] The video playback method proposed in this application can effectively improve the resource utilization of video playback on the terminal and improve the video playback effect when performing multi-window video playback, thereby meeting customer needs. First of all, the video playback method in this application can adapt to various combinations of playback units in the terminal, and realize adaptive allocation of multiple playback modes according to the decoding mode and rendering mode combination of the playback unit. Decoding, rendering mode scheduling, priority judgment and dynamic resource adjustment are performed for each video window to achieve the optimal decoding and rendering mode for each video window of a specific model, which can greatly enhance the adaptability of video applications on various terminals. In addition, combining the playback quantity threshold and the dynamic resource utilization rate, the playback unit and playback mode of the newly added video window are comprehensively determined, which can effectively avoid playback problems such as decoding jamming and image screen distortion caused by resource allocation transition. Under the condition of equal terminal hardware resources, the decoding effect of the video playback method in this application is smoother, and it does not affect other applications on the terminal, fundamentally reducing the terminal configuration cost.

[0122] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the video playback method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0123] This application also provides a video playback device, please refer to Figure 5 , the video playback device comprises:

[0124] The information acquisition module 10 is used to obtain the playback strategy information in response to the received video playback instruction, where the playback strategy information indicates the strategy of selecting the playback unit and the playback mode from at least one playback unit in the current terminal and at least one playback mode preset for each playback unit, wherein each playback mode includes a combination of a decoding mode and a rendering mode;

[0125] A mode determination module 20, for determining a target playback unit and a target playback mode of a target video to be played based on the playback strategy information;

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

[0127] Optionally, the playback strategy information includes at least one of the following restriction conditions: a playback quantity threshold of a playback unit, a playback quantity threshold of a playback mode, a priority of a playback unit, a priority of a playback mode, and a resource usage rate threshold of a playback unit;

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

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

[0130] The mode determination module 20 comprises:

[0131] A first determination unit, configured to determine a playback unit that currently meets a candidate condition based on a priority order of at least one playback unit, and determine the playback unit that first meets the candidate condition as a target playback unit;

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

[0133] Optionally, the first determining unit is used to determine, based on the priority order of at least one playback unit, a playback unit whose current video playback quantity does not reach the playback quantity threshold and is first determined as the target playback unit;

[0134] The second determination unit is configured to determine, based on the priority order of at least one playback mode of the target playback unit, a playback mode whose current video playback quantity does not reach a playback quantity threshold and is first determined as a target playback mode.

[0135] Optionally, the playback strategy information includes a playback quantity threshold for different video bitstream types for each playback mode of at least one playback unit, 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 target stream type videos currently being played in each playback mode of at least one playback unit; determine the playback mode in which the number of target stream type videos currently being played is less than the corresponding playback quantity threshold as the target playback mode; and determine the playback unit corresponding to the target playback mode as the target playback unit.

[0137] Optionally, the device further comprises:

[0138] A threshold determination module is used to determine the maximum number of video plays that can be achieved by any playback unit playing a video of any video stream type in any playback mode under the condition that 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 plays is determined as the playback number threshold for the video stream type in the playback mode of the playback unit.

[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 of each playback unit; among the at least one playback mode of the last priority playback unit, the playback quantity threshold of the last priority playback mode for each video stream type is infinite.

[0140] Optionally, the playback strategy information further includes a resource usage rate threshold of 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 a target video is assigned; 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 by the present application adopts the video playback method in the above embodiment, which can solve the technical problem that the related multi-window video playback scheme has unreasonable resource utilization and cannot fully utilize the hardware capabilities of domestic terminals. Compared with the related art, the beneficial effects of the video playback device provided by the present application are the same as the beneficial effects of the video playback method provided by the above embodiment, and the other technical features in the video playback device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0143] The present 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 that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the video playback method in the above-mentioned embodiment one.

[0144] Reference below Figure 6 , which shows a schematic diagram of the structure of a video playback device suitable for implementing the embodiment of the present application. The video playback device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The video playback device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0145] like Figure 6As shown, the video playback device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a ROM (Read Only Memory) 1002 or a program loaded from a storage device 1003 to a RAM (Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the video playback device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, an LCD (Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the video playback device to communicate with other devices wirelessly or by wire to exchange data. Although the video playback device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0146] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0147] The video playback device provided by the present application adopts the video playback method in the above embodiment, which can solve the technical problem that the related multi-window video playback scheme has unreasonable resource utilization and cannot fully utilize the hardware capabilities of domestic terminals. Compared with the related art, the beneficial effects of the video playback device provided by the present application are the same as the beneficial effects of the video playback method provided by the above embodiment, and the other technical features in the video playback device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0148] It should be understood that the various parts disclosed in this application can be implemented by 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 one or more embodiments or examples in a suitable manner.

[0149] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0150] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the video playback method in the above-mentioned embodiment.

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

[0152] The computer-readable storage medium may be included in the video playback device; or may exist independently without being assembled into the video playback device.

[0153] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the video playback device, the video playback device: responds to the received video playback instruction, obtains playback strategy information, 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 playback mode preset for each playback unit, wherein each playback mode respectively includes a combination of a decoding mode and a rendering mode; based on the playback strategy information, determines the target playback unit and the 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.

[0154] The computer program code for performing the operation of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a LAN (Local Area Network) or a WAN (Wide Area Network), or it can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0155] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0156] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0157] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned video playback method, and can solve the technical problems that the related multi-window video playback scheme has unreasonable resource utilization and cannot fully utilize the hardware capabilities of domestic terminals. Compared with the related art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the video playback method provided by the above-mentioned embodiment, and will not be repeated here.

[0158] The present application also provides a computer program product, including a computer program, which implements the above-mentioned video playback method when executed by a processor.

[0159] The computer program product provided by this application can solve the technical problem that the related multi-window video playback solution has unreasonable resource utilization and cannot fully utilize the hardware capabilities of domestic terminals. Compared with the related art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the video playback method provided by the above embodiment, which will not be repeated here.

[0160] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A video playback method, characterized in that: The video playing method comprises: In response to the received video playback instruction, playback strategy information is obtained, where 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 playback mode preset for each playback unit, where each playback mode includes a combination of a decoding mode and a rendering mode; Based on the playback strategy information, determining a target playback unit and a target playback mode of the target video to be played; The target video is played through the target playback unit according to the target playback mode.

2. The video playback method according to claim 1, wherein: The playback strategy information includes at least one of the following restriction conditions: a playback quantity threshold of a playback unit, a playback quantity threshold of a playback mode, a priority of a playback unit, a priority of a playback mode, and a resource usage rate threshold of a playback unit; The step of determining a target playback unit and a target playback mode of a target video to be played based on the playback strategy information includes: A target playback unit that satisfies the restriction condition in the playback strategy information is selected from the at least one playback unit, and a target playback mode that satisfies the restriction condition in the playback strategy information is selected from the at least one playback mode of the target playback unit.

3. The video playback method according to claim 1, wherein: The playback strategy information includes 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 step of determining a target playback unit and a target playback mode of a target video to be played based on the playback strategy information includes: Based on the priority order of the at least one playback unit, determining a playback unit that currently meets the candidate condition, and determining the playback unit that first meets the candidate condition as the target playback unit; Based on the priority order of at least one playback mode of the target playback unit, a playback mode that currently meets the candidate condition is determined, and the playback mode that first meets the candidate condition is determined as the target playback mode.

4. The video playback method according to claim 3, characterized in that: The step of determining a playback unit that currently satisfies a candidate condition based on the priority order of the at least one playback unit, and determining the playback unit that first satisfies the candidate condition as the target playback unit includes: Based on the priority order of the at least one playback unit, determining the playback unit whose current video playback quantity does not reach the playback quantity threshold first as the target playback unit; The step of determining a playback mode that currently satisfies the candidate condition based on the priority order of at least one playback mode of the target playback unit, and determining the playback mode that first satisfies the candidate condition as the target playback mode includes: Based on the priority order of at least one playback mode of the target playback unit, the playback mode whose current video playback quantity does not reach the playback quantity threshold is determined first as the target playback mode.

5. The video playback method according to claim 1, wherein: The playback strategy information includes a playback quantity threshold for different video bitstream types in each playback mode of the at least one playback unit, and the bitstream of the target video belongs to the target bitstream type; The step of determining a target playback unit and a target playback mode of a target video to be played based on the playback strategy information includes: Determine the number of videos of the target bitstream type currently played by each playback mode of the at least one playback unit; Determine a playback mode in which the number of videos of the target bitstream type currently being played is less than a corresponding playback number threshold as the target playback mode; The playback unit corresponding to the target playback mode is determined as the target playback unit.

6. The video playback method according to claim 5, characterized in that: The method for determining the playback quantity threshold of each playback mode of the at least one playback unit for different video stream types includes: Determine a maximum number of videos that can be played by any playback unit in any playback mode and any video stream type under the condition that playback conditions are met, wherein the resource usage rate of the playback unit does not exceed a resource usage rate threshold and the video playback quality meets a video quality condition; The maximum video play quantity is determined as a play quantity threshold of the play mode of the play unit for the video stream type.

7. The video playback method according to claim 5, characterized in that: The playback strategy information also 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; among the at least one playback mode of the last priority playback unit, the playback quantity threshold of the last priority playback mode for each video stream type is infinite.

8. The video playback method according to any one of claims 1 to 7, characterized in that: The playback strategy information further includes a resource usage rate threshold of the at least one playback unit; The step of determining a target playback unit and a target playback mode of a target video to be played based on the playback strategy information includes: Determine a target resource usage rate of the at least one playback unit, where the target resource usage rate represents a resource usage rate when the target video is allocated; Determine a playback unit whose target resource usage rate is not greater than the resource usage rate threshold as the target playback unit; The target playback mode is selected from at least one playback mode of the target playback unit.

9. A video playback device, characterized in that: The video playback device comprises: an information acquisition module, configured to acquire, in response to a received video playback instruction, playback strategy information, wherein the playback strategy information indicates a strategy for selecting a playback unit and a playback mode from at least one playback unit in a current terminal and at least one playback mode preset for each playback unit, wherein each playback mode includes a combination of a decoding mode and a rendering mode; A mode determination module, used to determine a target playback unit and a target playback mode of a target video to be played based on the playback strategy information; The video playback module is used to play the target video according to the target playback mode through the target playback unit.

10. A video playback device, characterized in that: The video playback device comprises: a memory, a processor, and a video playback program stored in the memory and executable on the processor, wherein the video playback program implements the video playback method according to any one of claims 1 to 8 when executed by the processor.

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

  • Video playing control method and related equipment

    CN117676248A

  • Video playing method and device, electronic equipment and computer readable storage medium

    CN118433440A

  • Data processing method and related device

    WO2024212815A1