Video stream playing method and device, storage medium and program product

By dynamically adjusting the clarity of the video stream according to the screen brightness of the playback device, the problem of traffic waste and lagging during playback is solved, and the viewing experience of the video stream is improved.

CN118632076APending Publication Date: 2024-09-10BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310220622.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-08
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

When playing video streams such as live broadcasts, the default definition is usually used, resulting in wasted traffic and video freezes, affecting the viewing experience.

Method used

By obtaining the current screen brightness of the playback device, the definition of the video stream is dynamically adjusted. When the brightness is low, a low resolution is used to avoid traffic waste and lag. When the brightness is high, a high resolution is used to ensure the look and feel.

Benefits of technology

It effectively reduces lagging during video stream playback, rationally uses bandwidth costs, and improves the viewing experience of video streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118632076A
    Figure CN118632076A
Patent Text Reader

Abstract

The embodiment of the invention provides a video stream playing method and device, a storage medium and a program product. The current screen brightness of the playing device is acquired; determining the target definition of a video stream according to the current screen brightness; and obtaining the video stream with the target definition, and playing the video stream with the target definition. According to the embodiment of the invention, the proper definition of the video stream can be selected according to the current screen brightness of the video playing equipment, so that the definition of the video stream is dynamically adjusted according to the current screen brightness, and the watching experience of the video stream is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and in particular, to a video stream playback method, device, storage medium, and program product. Background Art

[0002] With the development of Internet technology, people may watch live broadcasts and other video streams in a variety of places.

[0003] When playing live broadcasts and other video streams, the default definition is usually used, which results in a certain amount of traffic waste and may also cause problems such as video freezes, affecting the viewing experience of the video stream. Summary of the invention

[0004] The embodiments of the present disclosure provide a video stream playback method, device, storage medium and program product to automatically switch the clarity according to the screen brightness, reduce the freeze during video stream playback, reasonably use the bandwidth cost, and ensure the viewing experience of the video stream.

[0005] In a first aspect, an embodiment of the present disclosure provides a video stream playback method, including:

[0006] Get the current screen brightness of the playback device;

[0007] Determining a target definition of the video stream according to the current screen brightness;

[0008] The video stream of the target definition is acquired, and the video stream of the target definition is played.

[0009] In a second aspect, an embodiment of the present disclosure provides a video stream playback device, including:

[0010] A detection unit, used to obtain the current screen brightness of the playback device;

[0011] A definition determination unit, configured to determine a target definition of a video stream according to the current screen brightness;

[0012] The switching unit is used to obtain the video stream of the target definition and play the video stream of the target definition.

[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;

[0014] The memory stores computer-executable instructions;

[0015] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video stream playback method described in the first aspect and various possible designs of the first aspect.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the video stream playback method described in the first aspect and various possible designs of the first aspect is implemented.

[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including computer execution instructions. When a processor executes the computer execution instructions, the video stream playback method described in the first aspect and various possible designs of the first aspect is implemented.

[0018] The video stream playback method, device, storage medium and program product provided by the embodiments of the present disclosure obtain the current screen brightness of the playback device; determine the target definition of the video stream according to the current screen brightness; obtain the video stream of the target definition, and play the video stream of the target definition. The embodiments of the present disclosure can select a suitable definition for the video stream according to the current screen brightness of the video playback device, so as to dynamically adjust the definition of the video stream according to the current screen brightness, reasonably use the bandwidth cost, reduce the jamming during the video stream playback, and ensure the viewing experience of the video stream. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 A scene example diagram of a video stream playback method provided by an embodiment of the present disclosure;

[0021] Figure 2 A schematic diagram of a video stream playback method flow provided by an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of a video stream playback method flow provided by another embodiment of the present disclosure;

[0023] Figure 4 A schematic diagram of a video stream playback method flow provided by another embodiment of the present disclosure;

[0024] Figure 5 A schematic diagram of a video stream playback method flow provided by another embodiment of the present disclosure;

[0025] Figure 6 A structural block diagram of a video stream playback device provided by an embodiment of the present disclosure;

[0026] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0028] When playing live broadcasts and other video streams, the playback device usually uses the default definition for playback, which results in a certain amount of traffic waste and may also cause problems such as video freezes, affecting the viewing experience of the video stream.

[0029] In order to solve the above technical problems, the present disclosure takes into account that when the current screen brightness of the playback device is low, the resolution of the video stream has little effect on the video viewing experience, and the video stream can be played at a low resolution (for example, the first resolution) to avoid traffic waste and video freeze; while when the current screen brightness is high, the resolution of the video stream has a greater impact on the video viewing experience, and the video stream can be played at a high resolution (for example, the second resolution, which is higher than the first resolution) to ensure the viewing experience of the video stream. Therefore, an embodiment of the present disclosure provides a video stream playback method, by obtaining the current screen brightness of the playback device; determining the target clarity of the video stream according to the current screen brightness; obtaining the video stream of the target clarity, and playing the video stream of the target clarity. This embodiment can select a suitable clarity for the video stream according to the current screen brightness of the visual playback device, so as to dynamically adjust the clarity of the video stream according to the current screen brightness, reasonably use bandwidth costs, reduce freezes during video stream playback, and ensure the viewing experience of the video stream.

[0030] The video stream playing method disclosed in the present invention is applicable to Figure 1 In the application scenario shown, the current screen brightness of the playback device 11 can be obtained; the target definition of the video stream can be determined according to the current screen brightness; the playback device 11 obtains the video stream of the target definition from the server 12, and plays the video stream of the target definition. The video stream includes but is not limited to the video stream of short videos, live video streams, etc.

[0031] It should be noted that the user information and data involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0032] In addition, a definition automatic switching control may be displayed, and the user may choose whether to trigger it. After the definition automatic switching control is triggered, the video stream playback method provided by each embodiment of the present disclosure may be executed.

[0033] The video stream playing method disclosed in the present invention will be described in detail below in conjunction with specific embodiments.

[0034] refer to Figure 2 , Figure 2 The method of the embodiment of the present disclosure can be applied to a playback device capable of playing video streams, and the video stream playback method includes:

[0035] S201. Obtain the current screen brightness of the playback device.

[0036] In an optional embodiment, for a playback device with a display, the current screen brightness may be expressed in brightness units, such as candela per square meter (cd / m 2 ) or Nits; for playback devices such as projectors or laser TVs, luminous flux units can be used, such as Lumens or ANSI Lumens.

[0037] In another optional embodiment, the current screen brightness may be normalized and converted to the interval [0, 1], for example, the ratio of the current screen brightness to the maximum screen brightness is obtained as the normalized current screen brightness. In addition, the current screen brightness of the playback device may be obtained in response to a user's request to obtain the current screen brightness of the playback device.

[0038] S202: Determine a target definition of the video stream according to the current screen brightness.

[0039] In this embodiment, it is considered that when the current screen brightness is low, the resolution of the video stream has little effect on the video viewing experience; and when the current screen brightness is high, the resolution of the video stream has a greater impact on the video viewing experience. Therefore, when the current screen brightness is low, the video stream can be played at a low resolution (for example, the first resolution) to avoid traffic waste and video freezes, and when the current screen brightness is high, the video stream can be played at a high resolution (for example, the second resolution, which is higher than the first resolution) to ensure the viewing experience of the video stream. Therefore, in this embodiment, the mapping relationship between different preset screen brightness and preset clarity can be pre-configured, and then the preset clarity corresponding to the current screen brightness is determined according to the mapping relationship as the target clarity of the video stream.

[0040] Optionally, the screen brightness can be divided into at least two levels in the pre-configured mapping relationship between different preset screen brightnesses and preset clarity: if the screen brightness is greater than a preset brightness threshold, it is a high screen brightness level, corresponding to a first clarity (such as high definition); if the screen brightness is not greater than the preset brightness threshold, it is a low screen brightness level, corresponding to a second clarity (such as low definition), wherein the first clarity is higher than the second clarity; of course, the screen brightness can also be divided into more levels, which is only used as an example here.

[0041] Furthermore, if the current screen brightness is greater than a preset brightness threshold, the target clarity is determined to be the first clarity (of course, other clarity values ​​may also be used. If the default clarity of the playback device also belongs to the high-definition range, the target clarity may also be determined to be the default clarity), thereby playing the video stream with a relatively high clarity at a high screen brightness level to ensure the viewing experience of the video stream; if the current screen brightness is not greater than the preset brightness threshold, the target clarity is determined to be the second clarity (of course, other clarity values ​​may also be used. If the default clarity of the playback device also belongs to the low-definition range, the target clarity may also be determined to be the default clarity), thereby playing the video stream with a relatively low clarity at a low screen brightness level to avoid traffic waste and video freezes.

[0042] Optionally, when the current screen brightness is normalized, the target clarity of the video stream can be determined based on the normalized current screen brightness, that is, the preset brightness threshold in the above example also belongs to the [0,1] interval, and then the normalized current screen brightness is compared with the preset brightness threshold to determine the corresponding target clarity.

[0043] S203: Acquire the video stream of the target definition, and play the video stream of the target definition.

[0044] In this embodiment, after determining the target definition of the video stream, the playback device may request the video stream data of the target definition from the server, and play the video stream data of the target definition.

[0045] The video stream playback method provided in this embodiment obtains the current screen brightness of the playback device; determines the target definition of the video stream according to the current screen brightness; obtains the video stream of the target definition, and plays the video stream of the target definition. This embodiment can select a suitable definition for the video stream according to the current screen brightness of the video playback device, so as to dynamically adjust the definition of the video stream according to the current screen brightness, reasonably use the bandwidth cost, reduce the freeze in the video stream playback process, and ensure the viewing experience of the video stream.

[0046] Based on any of the above embodiments, Figure 3 As shown, when determining the target definition of the video stream according to the current screen brightness in S202, the method may further include:

[0047] S301, determining whether the screen brightness changes;

[0048] S302: If it is determined that the screen brightness has changed, determine the target clarity according to the changed screen brightness and the clarity at this time.

[0049] In this embodiment, changes in screen brightness can be detected. When the change in screen brightness is detected, the changing trend of the target clarity can be determined. For example, when the screen brightness changes from low brightness to high brightness, the target clarity can be improved; when the screen brightness changes from high brightness to low brightness, the target clarity can be reduced. However, since the clarity at this time is different, for example, the clarity at this time may be relatively low clarity or relatively high clarity, it is necessary to determine the target clarity based on the changed screen brightness and the clarity at this time. That is, if the clarity at this time is suitable for the changed screen brightness, there is no need to adjust the clarity, that is, the target clarity is equal to the clarity at this time; if the clarity at this time is not suitable for the changed screen brightness, it is necessary to adjust the clarity and select the corresponding target clarity according to the changed screen brightness.

[0050] In an optional embodiment, when determining the target clarity according to the changed screen brightness and the clarity at this time, the following situations may be specifically included:

[0051] The first case: if it is determined that the current screen brightness is greater than the preset brightness threshold, the changed screen brightness is not greater than the preset brightness threshold (that is, the screen brightness is reduced), and the definition at this time is higher than the first preset definition threshold (which can be the second definition in the above embodiment, or other definitions), then the definition at this time does not meet the changed screen brightness, and the target definition can be determined as the third definition according to the changed screen brightness, and the third definition is not higher than the first preset definition threshold, that is, the definition of the video stream is reduced from higher than the first preset definition threshold to the first preset definition threshold or lower than the first preset definition threshold, that is, the definition of the video stream is reduced from high definition to low definition;

[0052] The second case: if it is determined that the current screen brightness is not greater than the preset brightness threshold, the changed screen brightness is greater than the preset brightness threshold (that is, the screen brightness is increased), and the clarity at this time is lower than the second preset clarity threshold (the second preset clarity threshold is higher than the first preset clarity threshold, and can be the first clarity in the above embodiment, or can be other clarity), then the clarity at this time does not meet the changed screen brightness, and the target clarity can be determined as the fourth clarity according to the changed screen brightness, and the fourth clarity is not lower than the second preset clarity threshold, that is, the clarity of the video stream is increased from lower than the second preset clarity threshold to the second preset clarity threshold or higher than the second preset clarity threshold, that is, the clarity of the video stream is increased from low clarity to high clarity;

[0053] The third case: if it is determined that the current screen brightness is greater than the preset brightness threshold, and the changed screen brightness is not greater than the preset brightness threshold (that is, the screen brightness is reduced), and the definition at this time is not higher than the first preset definition threshold, then the definition at this time can meet the changed screen brightness, and there is no need to adjust the definition (it can be considered that the target definition is equal to the definition at this time), and the video stream continues to be played at the definition at this time;

[0054] The fourth case: if it is determined that the current screen brightness is not greater than the preset brightness threshold, and the changed screen brightness is greater than the preset brightness threshold (that is, the screen brightness is increased), and the clarity at this time is not lower than the second preset clarity threshold, then the clarity at this time can meet the changed screen brightness, and there is no need to adjust the clarity (the target clarity can be considered to be equal to the clarity at this time), and the video stream continues to be played at the clarity at this time.

[0055] When the screen brightness changes, it can be determined which of the above situations is currently met, so as to determine whether it is necessary to switch the clarity. If it is necessary to switch the clarity, the target clarity is determined.

[0056] Based on any of the above embodiments, Figure 4 As shown, the step of obtaining the video stream of the target definition in step S203 may include:

[0057] S401, determining whether a preset definition switching condition is met;

[0058] S402: If the preset definition switching condition is met, obtain a video stream of the target definition.

[0059] In this embodiment, when it is determined that the video stream needs to switch clarity, it may not necessarily meet the conditions required for clarity switching, especially when the video stream switches from low definition to high definition, it needs to occupy more network resources and device resources. Therefore, it is also necessary to determine whether the playback device meets the preset clarity switching conditions, where the preset clarity switching conditions include but are not limited to network conditions, device performance of the playback device, etc. Only when the preset clarity switching conditions are met can the clarity switching continue, that is, the video stream of the target clarity is obtained and played, otherwise the clarity switching can be stopped and the video stream can be played back while maintaining the original clarity.

[0060] Based on the above embodiment, the step of determining whether a preset definition switching condition is met includes:

[0061] Determine whether the network status of the playback device meets the preset network conditions; and / or

[0062] Determine whether the performance status of the playback device meets the preset performance conditions.

[0063] In this embodiment, the network status of the playback device can be obtained, wherein the network status of the playback device can be a real-time network status, such as the current uplink and downlink rates, or a network status in the past period of time, such as a comprehensive judgment of the uplink and downlink rates of all data in the past period of time. In addition, the preset uplink and downlink rates can be used as the preset network conditions, and the uplink and downlink rates can be directly compared with the preset uplink and downlink rates to determine whether the network status of the playback device meets the preset network conditions, for example, the current network downlink rate DownloadBitRate of the playback device is compared with the preset downlink rate, wherein the preset downlink rate is a preset multiple of the average bit rate HighBitRate of the high-definition (such as the first definition) video stream, such as 1.1 times, that is, when DownloadBitRate≥1.1*HighBitRate, the network status of the playback device meets the preset network conditions; the network status of the playback device can also be divided into different levels (such as the first level, the second level, etc., wherein the first level is better than the second level), if the current network status of the playback device belongs to certain levels (such as the first level), it is determined that the network status of the playback device meets the preset network conditions.

[0064] In addition, in this embodiment, the performance status of the playback device can also be obtained, wherein the performance status of the playback device is used to reflect the load level of the playback device, and can be any parameter that can reflect the load level of the playback device. The performance status of the playback device can be a real-time performance status, or a comprehensive judgment of the performance status over a period of time in the past. In addition, a parameter value can be preset as a preset performance condition, and the parameter value of the performance status of the playback device can be directly compared with the preset parameter value to determine whether the performance status of the playback device meets the preset performance condition; the performance status of the playback device can also be divided into different levels (for example, divided into the first level, the second level, etc. according to the performance load level, wherein the first level is better than the second level), if the performance status of the current playback device belongs to certain levels (for example, the first level, etc.), it is determined that the performance status of the playback device meets the preset performance condition.

[0065] By judging the network status and / or performance status of the playback device, differentiated definition control and switching based on the brightness change of the playback device screen, network status, and performance change can be achieved. It should be noted that when the video stream needs to reduce the definition, it is not necessary to judge the preset definition switching conditions.

[0066] On the basis of the above embodiment, after determining that the playback device meets the preset definition switching conditions, if the playback device cannot smoothly switch the definition, especially when there is a freeze when switching the definition, the definition of the video stream will not be switched, that is, the original definition will be maintained to continue playing the video stream; only if there is no freeze when switching the definition, the definition will continue to be switched. Figure 5 As shown, when obtaining the video stream of the target definition, it specifically includes:

[0067] S501, judging whether the definition of the video stream can be switched without causing a freeze according to the playback buffer;

[0068] S502: If it is determined that the definition of the video stream can be switched without causing a freeze, a video stream of the target definition is obtained.

[0069] In this embodiment, after determining that the playback device meets the preset definition switching conditions, before actually executing the video stream definition switching, it can be determined whether the video stream can switch the definition without a freeze. Considering that after switching the video stream, a series of operations such as requesting video stream data with the switched definition (needing to switch the video stream address) and decoding the video stream data require a certain amount of time, and during this period of time, the video stream can continue to be played with the original definition, and the video stream with the switched definition can be seamlessly connected after it can be played normally, which can avoid freezes when switching the definition. Therefore, the playback device needs to have enough playback cache for the video stream with the original definition to ensure that there is a sufficient length of the original definition video stream as a buffer during the switching process. Therefore, in this embodiment, it can be determined whether the video stream can switch the definition without a freeze based on the playback cache of the video stream by the playback device, that is, it can be determined whether the playback device has enough playback cache for the video stream with the original definition, and whether it can ensure that there is a sufficient length of the original definition video stream as a buffer during the switching process. The playback cache of the video stream can be determined by the playback device based on the cache.

[0070] Specifically, determine the current playback cache data amount of the video stream of the playback device at the current clarity (clarity before switching); determine the target playback cache data amount of the video stream, wherein the target playback cache data amount is the data amount that can ensure that the video stream with the original clarity is of sufficient length as a buffer during the switching process; and then compare the current playback cache data amount with the target playback cache data amount. If the current playback cache data amount is greater than or equal to the target playback cache data amount, it means that the video stream with the original clarity of the playback device has sufficient playback cache, which can ensure that the video stream with the original clarity is of sufficient length as a buffer during the switching process, and then determine that the video stream can switch clarity without any lag.

[0071] Further, the current playback buffer data amount of the video stream at the definition at this time (definition before switching) of the playback device is recorded as PlayBuffer; determining the target playback buffer data amount of the video stream includes determining the target playback buffer data amount of the video stream according to the average video bit rate of the video stream and the preset buffer duration, as follows:

[0072] The product of the average video bit rate BitRate of the video stream and the preset cache duration N (how long the video stream data is currently cached, in seconds) is obtained to determine the target playback cache data volume N*BitRate of the video stream.

[0073] If PlayBuffer>=N*BitRate, it is determined that the video stream can switch the definition without causing any freeze, and the definition switching can continue.

[0074] Of course, if it is determined that the current playback cache data volume is continuously less than the target playback cache data volume within a preset time (e.g., 5 seconds), it is determined that the video stream cannot switch the definition without freezing, and the execution of switching the definition of the video stream is stopped. That is, in this embodiment, the decision on whether it is possible to avoid freezing is maintained within the preset time at most. When the preset time is reached, if the current playback cache data volume still does not reach the target playback cache data volume, the execution of switching the definition of the video stream is stopped, and the original definition is maintained to continue playing the video stream.

[0075] Based on any of the above embodiments, after the video stream switches clarity, the freeze or smoothness of the video stream can be continuously detected. If the freeze of the video stream meets the preset freeze judgment condition, for example, the cumulative freeze time reaches M seconds within N seconds during playback, it is necessary to switch the video stream back to the original clarity and continue to play the video stream with the original clarity to ensure the smoothness of the video stream playback.

[0076] Corresponding to the video stream playing method of the above embodiment, Figure 6 This is a structural block diagram of a video stream playback device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 6 The video stream playback device 600 includes: a detection unit 601, a clarity determination unit 602, and a switching unit 603.

[0077] The detection unit 601 is used to obtain the current screen brightness of the playback device;

[0078] A definition determination unit 602, configured to determine a target definition of a video stream according to the current screen brightness;

[0079] The switching unit 603 is configured to obtain the video stream of the target definition and play the video stream of the target definition.

[0080] In one or more embodiments of the present disclosure, when determining the target definition of the video stream according to the current screen brightness, the definition determination unit 602 is configured to:

[0081] According to the current screen brightness and a mapping relationship between the preset screen brightness and the preset definition, the preset definition corresponding to the current screen brightness is determined as the target definition of the video stream.

[0082] In one or more embodiments of the present disclosure, when determining the target definition of the video stream according to the current screen brightness, the definition determination unit 602 is configured to:

[0083] If the current screen brightness is greater than a preset brightness threshold, determining the target definition to be the first definition; or

[0084] If the current screen brightness is not greater than a preset brightness threshold, the target definition is determined to be a second definition, wherein the first definition is higher than the second definition.

[0085] In one or more embodiments of the present disclosure, when determining the target definition of the video stream according to the current screen brightness, the definition determination unit 602 is configured to:

[0086] Determine whether the screen brightness changes;

[0087] If it is determined that the screen brightness has changed, the target clarity is determined based on the changed screen brightness and the clarity at that time.

[0088] In one or more embodiments of the present disclosure, when determining that the screen brightness has changed, the clarity determination unit 602 determines the target clarity according to the changed screen brightness and the clarity at that time, for:

[0089] If it is determined that the current screen brightness is greater than the preset brightness threshold, the changed screen brightness is not greater than the preset brightness threshold, and the definition at this time is higher than the first preset definition threshold, then the target definition is determined to be the third definition, and the third definition is not higher than the first preset definition threshold; or

[0090] If it is determined that the current screen brightness is not greater than the preset brightness threshold, the changed screen brightness is greater than the preset brightness threshold, and the clarity at this time is lower than the second preset clarity threshold, then the target clarity is determined to be the fourth clarity, and the fourth clarity is not lower than the second preset clarity threshold; wherein the first preset clarity threshold is lower than the second preset clarity threshold.

[0091] In one or more embodiments of the present disclosure, when acquiring the video stream of the target definition, the switching unit 603 is used to:

[0092] Determine whether a preset definition switching condition is met;

[0093] If the preset definition switching condition is met, the video stream of the target definition is obtained.

[0094] In one or more embodiments of the present disclosure, when determining whether a preset definition switching condition is met, the switching unit 603 is configured to:

[0095] Determine whether the network status of the playback device meets the preset network conditions; and / or

[0096] Determine whether the performance status of the playback device meets the preset performance conditions.

[0097] In one or more embodiments of the present disclosure, when acquiring the video stream of the target definition, the switching unit 603 is used to:

[0098] Determine whether the clarity of the video stream can be switched without causing lag based on the playback cache;

[0099] If it is determined that the definition of the video stream can be switched without causing a freeze, a video stream of the target definition is obtained.

[0100] In one or more embodiments of the present disclosure, when judging whether the definition of the video stream can be switched without causing a freeze according to the playback buffer, the switching unit 603 is configured to:

[0101] Determine the current playback buffer data amount of the video stream with the current definition in the playback buffer;

[0102] Determine the target playback buffer data volume of the video stream;

[0103] The current playback cache data volume is compared with the target playback cache data volume. If the current playback cache data volume is greater than or equal to the target playback cache data volume, it is determined that the definition of the video stream can be switched without causing a freeze.

[0104] In one or more embodiments of the present disclosure, when determining the target playback buffer data amount of the video stream, the switching unit 603 is used to:

[0105] A target playback cache data volume of the video stream is determined according to an average video bit rate of the video stream and a preset cache duration.

[0106] In one or more embodiments of the present disclosure, when judging whether the definition of the video stream can be switched without causing a freeze according to the playback buffer, the switching unit 603 is further configured to:

[0107] If it is determined that the current playback cache data volume is continuously less than the target playback cache data volume within a preset time period, it is determined that the definition of the video stream cannot be switched without causing a freeze, and the execution of switching the definition of the video stream is stopped.

[0108] In one or more embodiments of the present disclosure, when determining the target definition of the video stream according to the current screen brightness, the definition determination unit 602 is configured to:

[0109] The current screen brightness is normalized, and a target definition of the video stream is determined according to the normalized current screen brightness.

[0110] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0111] refer to Figure 7 , which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure, and the electronic device 700 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0112] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0113] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

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

[0115] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0116] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0117] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0118] Computer program code for performing the operations of the present disclosure may 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" or similar programming languages. The program code may 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 a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0119] 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 disclosure. 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 implementations as replacements, 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.

[0120] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0121] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0122] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0123] In a first aspect, according to one or more embodiments of the present disclosure, a video stream playback method is provided, comprising:

[0124] Get the current screen brightness of the playback device;

[0125] Determining a target definition of the video stream according to the current screen brightness;

[0126] The video stream of the target definition is acquired, and the video stream of the target definition is played.

[0127] According to one or more embodiments of the present disclosure, determining a target definition of a video stream according to the current screen brightness includes:

[0128] According to the current screen brightness and a mapping relationship between the preset screen brightness and the preset definition, the preset definition corresponding to the current screen brightness is determined as the target definition of the video stream.

[0129] According to one or more embodiments of the present disclosure, determining a target definition of a video stream according to the current screen brightness includes:

[0130] If the current screen brightness is greater than a preset brightness threshold, determining the target definition to be the first definition; or

[0131] If the current screen brightness is not greater than a preset brightness threshold, the target definition is determined to be a second definition, wherein the first definition is higher than the second definition.

[0132] According to one or more embodiments of the present disclosure, determining a target definition of a video stream according to the current screen brightness includes:

[0133] Determine whether the screen brightness changes;

[0134] If it is determined that the screen brightness has changed, the target clarity is determined based on the changed screen brightness and the clarity at that time.

[0135] According to one or more embodiments of the present disclosure, if it is determined that the screen brightness has changed, determining the target clarity according to the changed screen brightness and the clarity at that time includes:

[0136] If it is determined that the current screen brightness is greater than the preset brightness threshold, the changed screen brightness is not greater than the preset brightness threshold, and the definition at this time is higher than the first preset definition threshold, then the target definition is determined to be the third definition, and the third definition is not higher than the first preset definition threshold; or

[0137] If it is determined that the current screen brightness is not greater than the preset brightness threshold, the changed screen brightness is greater than the preset brightness threshold, and the clarity at this time is lower than the second preset clarity threshold, then the target clarity is determined to be the fourth clarity, and the fourth clarity is not lower than the second preset clarity threshold; wherein the first preset clarity threshold is lower than the second preset clarity threshold.

[0138] According to one or more embodiments of the present disclosure, the step of obtaining the video stream of the target definition includes:

[0139] Determine whether a preset definition switching condition is met;

[0140] If the preset definition switching condition is met, the video stream of the target definition is obtained.

[0141] According to one or more embodiments of the present disclosure, the determining whether a preset definition switching condition is met includes:

[0142] Determine whether the network status of the playback device meets the preset network conditions; and / or

[0143] Determine whether the performance status of the playback device meets the preset performance conditions.

[0144] According to one or more embodiments of the present disclosure, the step of obtaining the video stream of the target definition includes:

[0145] Determine whether the clarity of the video stream can be switched without causing lag based on the playback cache;

[0146] If it is determined that the definition of the video stream can be switched without causing a freeze, a video stream of the target definition is obtained.

[0147] According to one or more embodiments of the present disclosure, judging whether the definition of the video stream can be switched without causing a freeze based on the playback buffer includes:

[0148] Determine the current playback buffer data amount of the video stream with the current definition in the playback buffer;

[0149] Determine the target playback buffer data volume of the video stream;

[0150] The current playback cache data volume is compared with the target playback cache data volume. If the current playback cache data volume is greater than or equal to the target playback cache data volume, it is determined that the definition of the video stream can be switched without causing a freeze.

[0151] According to one or more embodiments of the present disclosure, determining a target playback buffer data amount of a video stream includes:

[0152] A target playback cache data volume of the video stream is determined according to an average video bit rate of the video stream and a preset cache duration.

[0153] According to one or more embodiments of the present disclosure, judging whether the definition of the video stream can be switched without causing a freeze based on the playback buffer further includes:

[0154] If it is determined that the current playback cache data volume is continuously less than the target playback cache data volume within a preset time period, it is determined that the definition of the video stream cannot be switched without causing a freeze, and the execution of switching the definition of the video stream is stopped.

[0155] According to one or more embodiments of the present disclosure, determining a target definition of a video stream according to the current screen brightness includes:

[0156] The current screen brightness is normalized, and a target definition of the video stream is determined according to the normalized current screen brightness.

[0157] In a second aspect, according to one or more embodiments of the present disclosure, a video stream playback device is provided, including:

[0158] A detection unit, used to obtain the current screen brightness of the playback device;

[0159] A definition determination unit, configured to determine a target definition of a video stream according to the current screen brightness;

[0160] The switching unit is used to obtain the video stream of the target definition and play the video stream of the target definition.

[0161] According to one or more embodiments of the present disclosure, when determining the target definition of the video stream according to the current screen brightness, the definition determination unit is configured to:

[0162] According to the current screen brightness and a mapping relationship between the preset screen brightness and the preset definition, the preset definition corresponding to the current screen brightness is determined as the target definition of the video stream.

[0163] According to one or more embodiments of the present disclosure, when determining the target definition of the video stream according to the current screen brightness, the definition determination unit is configured to:

[0164] If the current screen brightness is greater than a preset brightness threshold, determining the target definition to be the first definition; or

[0165] If the current screen brightness is not greater than a preset brightness threshold, the target definition is determined to be a second definition, wherein the first definition is higher than the second definition.

[0166] According to one or more embodiments of the present disclosure, when determining the target definition of the video stream according to the current screen brightness, the definition determination unit is configured to:

[0167] Determine whether the screen brightness changes;

[0168] If it is determined that the screen brightness has changed, the target clarity is determined based on the changed screen brightness and the clarity at that time.

[0169] According to one or more embodiments of the present disclosure, when the definition determination unit determines that the screen brightness has changed, the target definition is determined according to the changed screen brightness and the definition at that time, and is configured to:

[0170] If it is determined that the current screen brightness is greater than the preset brightness threshold, the changed screen brightness is not greater than the preset brightness threshold, and the definition at this time is higher than the first preset definition threshold, then the target definition is determined to be the third definition, and the third definition is not higher than the first preset definition threshold; or

[0171] If it is determined that the current screen brightness is not greater than the preset brightness threshold, the changed screen brightness is greater than the preset brightness threshold, and the clarity at this time is lower than the second preset clarity threshold, then the target clarity is determined to be the fourth clarity, and the fourth clarity is not lower than the second preset clarity threshold; wherein the first preset clarity threshold is lower than the second preset clarity threshold.

[0172] According to one or more embodiments of the present disclosure, when acquiring the video stream of the target definition, the switching unit is configured to:

[0173] Determine whether a preset definition switching condition is met;

[0174] If the preset definition switching condition is met, the video stream of the target definition is obtained.

[0175] According to one or more embodiments of the present disclosure, when determining whether a preset definition switching condition is met, the switching unit is configured to:

[0176] Determine whether the network status of the playback device meets the preset network conditions; and / or

[0177] Determine whether the performance status of the playback device meets the preset performance conditions.

[0178] According to one or more embodiments of the present disclosure, when acquiring the video stream of the target definition, the switching unit is configured to:

[0179] Determine whether the clarity of the video stream can be switched without causing lag based on the playback cache;

[0180] If it is determined that the definition of the video stream can be switched without causing a freeze, a video stream of the target definition is obtained.

[0181] According to one or more embodiments of the present disclosure, when the switching unit determines whether the definition of the video stream can be switched without causing a freeze according to the playback buffer, it is configured to:

[0182] Determine the current playback buffer data amount of the video stream with the current definition in the playback buffer;

[0183] Determine the target playback buffer data volume of the video stream;

[0184] The current playback cache data volume is compared with the target playback cache data volume. If the current playback cache data volume is greater than or equal to the target playback cache data volume, it is determined that the definition of the video stream can be switched without causing a freeze.

[0185] According to one or more embodiments of the present disclosure, when determining the target playback buffer data amount of the video stream, the switching unit is used to:

[0186] A target playback cache data volume of the video stream is determined according to an average video bit rate of the video stream and a preset cache duration.

[0187] According to one or more embodiments of the present disclosure, when the switching unit determines whether the definition of the video stream can be switched without causing a freeze according to the playback buffer, it is further configured to:

[0188] If it is determined that the current playback cache data volume is continuously less than the target playback cache data volume within a preset time period, it is determined that the definition of the video stream cannot be switched without causing a freeze, and the execution of switching the definition of the video stream is stopped.

[0189] According to one or more embodiments of the present disclosure, when determining the target definition of the video stream according to the current screen brightness, the definition determination unit is configured to:

[0190] The current screen brightness is normalized, and a target definition of the video stream is determined according to the normalized current screen brightness.

[0191] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0192] The memory stores computer-executable instructions;

[0193] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video stream playback method described in the first aspect and various possible designs of the first aspect.

[0194] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the video stream playback method described in the first aspect and various possible designs of the first aspect is implemented.

[0195] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising computer execution instructions. When a processor executes the computer execution instructions, the video stream playback method described in the first aspect and various possible designs of the first aspect is implemented.

[0196] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0197] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0198] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A video stream playback method, characterized in that: include: Get the current screen brightness of the playback device; Determining a target definition of the video stream according to the current screen brightness; The video stream of the target definition is acquired, and the video stream of the target definition is played.

2. The method according to claim 1, characterized in that: The determining the target definition of the video stream according to the current screen brightness includes: According to the current screen brightness and a mapping relationship between the preset screen brightness and the preset definition, the preset definition corresponding to the current screen brightness is determined as the target definition of the video stream.

3. The method according to claim 1, characterized in that: The determining the target definition of the video stream according to the current screen brightness includes: If the current screen brightness is greater than a preset brightness threshold, determining the target definition to be the first definition; or If the current screen brightness is not greater than a preset brightness threshold, the target definition is determined to be a second definition, wherein the first definition is higher than the second definition.

4. The method according to claim 1, characterized in that: The determining the target definition of the video stream according to the current screen brightness includes: Determine whether the screen brightness changes; If it is determined that the screen brightness has changed, the target clarity is determined based on the changed screen brightness and the clarity at that time.

5. The method according to claim 4, characterized in that If it is determined that the screen brightness has changed, determining the target clarity according to the changed screen brightness and the clarity at this time includes: If it is determined that the current screen brightness is greater than the preset brightness threshold, the changed screen brightness is not greater than the preset brightness threshold, and the definition at this time is higher than the first preset definition threshold, then the target definition is determined to be the third definition, and the third definition is not higher than the first preset definition threshold; or If it is determined that the current screen brightness is not greater than the preset brightness threshold, the changed screen brightness is greater than the preset brightness threshold, and the clarity at this time is lower than the second preset clarity threshold, then the target clarity is determined to be the fourth clarity, and the fourth clarity is not lower than the second preset clarity threshold; wherein the first preset clarity threshold is lower than the second preset clarity threshold.

6. The method according to claim 4, characterized in that The step of obtaining the video stream of the target definition includes: Determine whether a preset definition switching condition is met; If the preset definition switching condition is met, the video stream of the target definition is obtained.

7. The method according to claim 6, characterized in that The determining whether a preset definition switching condition is met includes: Determine whether the network status of the playback device meets the preset network conditions; and / or Determine whether the performance status of the playback device meets the preset performance conditions.

8. The method according to any one of claims 1 to 7, characterized in that: The step of obtaining the video stream of the target definition includes: Determine whether the clarity of the video stream can be switched without causing lag based on the playback cache; If it is determined that the definition of the video stream can be switched without causing a freeze, a video stream of the target definition is obtained.

9. The method according to claim 8, characterized in that The determining, based on the playback buffer, whether the definition of the video stream can be switched without causing a freeze includes: Determine the current playback buffer data amount of the video stream with the current definition in the playback buffer; Determine the target playback buffer data volume of the video stream; The current playback cache data volume is compared with the target playback cache data volume. If the current playback cache data volume is greater than or equal to the target playback cache data volume, it is determined that the definition of the video stream can be switched without causing a freeze.

10. The method according to claim 9, characterized in that The step of determining a target playback buffer data amount of the video stream includes: A target playback cache data volume of the video stream is determined according to an average video bit rate of the video stream and a preset cache duration.

11. The method according to claim 9, characterized in that The determining, based on the playback buffer, whether the definition of the video stream can be switched without causing a freeze, further includes: If it is determined that the current playback cache data volume is continuously less than the target playback cache data volume within a preset time period, it is determined that the clarity of the video stream cannot be switched without causing a freeze, and the execution of switching the clarity of the video stream is stopped.

12. The method according to any one of claims 1 to 5, characterized in that: The determining the target definition of the video stream according to the current screen brightness includes: The current screen brightness is normalized, and a target definition of the video stream is determined according to the normalized current screen brightness.

13. A video stream playback device, characterized in that: include: A detection unit, used to obtain the current screen brightness of the playback device; A definition determination unit, configured to determine a target definition of a video stream according to the current screen brightness; The switching unit is used to obtain the video stream of the target definition and play the video stream of the target definition.

14. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 12 is implemented.

16. A computer program product, characterized in that The method comprises computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 12 is implemented.