Method, system and electronic device for dynamically adjusting video quality

By transmitting image quality parameters in real time between the video generation device and the playback device and dynamically adjusting the compression rate, the problem of balancing clarity, smoothness and latency in video data transmission is solved, thus improving the user experience.

CN116156103BActive Publication Date: 2026-01-27BOE TECHNOLOGY GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310182126.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-20
Publication Date
2026-01-27
Estimated Expiration
2043-02-20

AI Technical Summary

Technical Problem

In video data transmission, clarity, smoothness, and latency form an impossible triangle, and existing technologies struggle to dynamically adjust video quality to achieve the optimal balance.

Method used

By acquiring image quality parameters in real time from the video playback device and sending them to the video generation device, the compression rate can be dynamically adjusted to achieve automatic adjustment of video image quality.

Benefits of technology

It enables dynamic adjustment of video quality to maximize performance based on actual needs, thereby improving the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116156103B_ABST
    Figure CN116156103B_ABST
Patent Text Reader

Abstract

The application discloses a kind of method for dynamically adjusting video quality, system and electronic equipment, for adjusting compression rate according to received quality parameter, to dynamically adjust the video quality played in real time, improve the viewing experience of user.The method comprises: the first device is compressed to obtain this time video stream for this time original video stream, and this time video stream is sent to second device;Second device plays the this time video stream, and obtains the quality parameter in the playing process of the this time video stream, and sends the quality parameter to the first device;The first device adjusts compression rate according to the quality parameter, and the next original video stream is compressed to obtain the next video stream using adjusted compression rate, and the next video stream is sent to second device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video data transmission technology, and in particular to a method, system, and electronic device for dynamically adjusting video quality. Background Technology

[0002] In the field of video data transmission, such as in live streaming and video conferencing scenarios, there are three parameters: clarity, smoothness, and latency. These three parameters rely on mutually exclusive technical aspects, forming an impossible triangle where each solution can only guarantee two of them. Therefore, configuring the current video transmission parameters to achieve optimal video quality has become a pressing technical problem that needs to be solved. Summary of the Invention

[0003] This invention provides a method, system, and electronic device for dynamically adjusting video quality, which adjusts the compression rate according to received quality parameters, thereby dynamically adjusting the video quality in real time and improving the user's viewing experience.

[0004] In a first aspect, embodiments of the present invention provide a method for dynamically adjusting video quality, the method comprising:

[0005] The first device compresses the original video stream to obtain the current video stream, and then sends the current video stream to the second device;

[0006] The second device plays the current video stream and obtains the image quality parameters of the current video stream during the playback process, and sends the image quality parameters to the first device;

[0007] The first device adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device.

[0008] In this embodiment of the invention, a second device for video playback acquires image quality parameters in real time and sends these parameters to a first device for video generation. This allows the first device to automatically adjust the compression rate during video compression, ensuring video quality to the greatest extent possible according to actual needs, thus achieving dynamic adjustment of video quality.

[0009] As an optional implementation, the first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0010] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0011] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0012] As an optional implementation, the second device plays the current video stream and obtains the image quality parameters of the current video stream during playback, including:

[0013] The second device obtains at least one of the following image quality parameters during the playback of the video stream: latency, packet loss information, and resolution, by calling the application programming interface of the operating system kernel.

[0014] As an optional implementation, the image quality parameters include delay time; the second device acquires the image quality parameters of the current video stream during playback, including:

[0015] The second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0016] As an optional implementation, the second device determines the delay time of the current video stream during playback, including:

[0017] The second device acquires the received time stream and the playback time stream through the CPU;

[0018] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0019] As an optional implementation method,

[0020] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0021] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player on the second device and / or the amount of data after decoding the current video stream.

[0022] As an optional implementation, the image quality parameters include packet loss information; the first device adjusts the compression ratio according to the image quality parameters, including:

[0023] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0024] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0025] As an optional implementation, after adjusting the compression ratio to a fixed value, the method further includes:

[0026] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0027] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0028] As an optional implementation, it also includes:

[0029] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the first device reduces the transmission power; or,

[0030] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the first device increases the transmission power.

[0031] As an optional implementation, after increasing the transmission power, the first device further includes:

[0032] When the transmission power is the maximum transmission power of the first device, and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0033] Secondly, an embodiment of the present invention provides a system for dynamically adjusting video quality, comprising a first device and a second device, wherein:

[0034] The first device compresses the original video stream to obtain the current video stream, and then sends the current video stream to the second device;

[0035] The second device plays the current video stream and obtains the image quality parameters of the current video stream during the playback process, and sends the image quality parameters to the first device;

[0036] The first device adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device.

[0037] As an optional implementation, the first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0038] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0039] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0040] As an optional implementation, the second device plays the current video stream and obtains the image quality parameters of the current video stream during playback, including:

[0041] The second device obtains at least one of the following image quality parameters during the playback of the video stream: latency, packet loss information, and resolution, by calling the application programming interface of the operating system kernel.

[0042] As an optional implementation, the image quality parameters include delay time; the second device acquires the image quality parameters of the current video stream during playback, including:

[0043] The second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0044] As an optional implementation, the second device determines the delay time of the current video stream during playback, including:

[0045] The second device acquires the received time stream and the playback time stream through the CPU;

[0046] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0047] As an optional implementation method,

[0048] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0049] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player on the second device and / or the amount of data after decoding the current video stream.

[0050] As an optional implementation, the image quality parameters include packet loss information; the first device adjusts the compression ratio according to the image quality parameters, including:

[0051] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0052] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0053] As an optional implementation, after adjusting the compression ratio to a fixed value, the method further includes:

[0054] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0055] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0056] As an optional implementation, it also includes:

[0057] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the first device reduces the transmission power; or,

[0058] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the first device increases the transmission power.

[0059] As an optional implementation, after increasing the transmission power, the first device further includes:

[0060] When the transmission power is the maximum transmission power of the first device, and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0061] Thirdly, an embodiment of the present invention provides a method for dynamically adjusting video quality, applied to a first device, the method comprising:

[0062] The original video stream is compressed to obtain the current video stream, and the current video stream is sent to the second device for the second device to play the current video stream, and the image quality parameters of the current video stream are obtained during the playback process;

[0063] The system receives image quality parameters sent by the second device, adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device.

[0064] As an optional implementation, the first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0065] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0066] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0067] As an optional implementation, the second device obtains at least one of the following image quality parameters during the playback of the current video stream: latency, packet loss information, and resolution, by calling the application programming interface of the operating system kernel.

[0068] As an optional implementation, the image quality parameters include delay time; the second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0069] As an optional implementation, the second device acquires the received time stream and the playback time stream via a CPU;

[0070] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0071] As an optional implementation method,

[0072] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0073] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player on the second device and / or the amount of data after decoding the current video stream.

[0074] As an optional implementation, the image quality parameters include packet loss information; adjusting the compression ratio based on the image quality parameters includes:

[0075] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0076] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0077] As an optional implementation, after adjusting the compression ratio to a fixed value, the method further includes:

[0078] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0079] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0080] As an optional implementation, it also includes:

[0081] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, reduce the transmission power; or,

[0082] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the transmission power is increased.

[0083] As an optional implementation, after increasing the transmission power, it further includes:

[0084] When the transmission power is the maximum transmission power and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0085] Fourthly, an electronic device provided by an embodiment of the present invention includes a processor and a memory, wherein the memory is used to store a program executable by the processor, and the processor is used to read the program in the memory and perform the following steps:

[0086] The original video stream is compressed to obtain the current video stream, and the current video stream is sent to the second device for the second device to play the current video stream, and the image quality parameters of the current video stream are obtained during the playback process;

[0087] The system receives image quality parameters sent by the second device, adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device.

[0088] As an optional implementation, the first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0089] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0090] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0091] As an optional implementation, the second device obtains at least one of the following image quality parameters during the playback of the current video stream: latency, packet loss information, and resolution, by calling the application programming interface of the operating system kernel.

[0092] As an optional implementation, the image quality parameters include delay time; the second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0093] As an optional implementation, the second device acquires the received time stream and the playback time stream via a CPU;

[0094] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0095] As an optional implementation method,

[0096] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0097] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player on the second device and / or the amount of data after decoding the current video stream.

[0098] As an optional implementation, the image quality parameters include packet loss information; the processor 900 is specifically configured to execute:

[0099] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0100] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0101] As an optional implementation, after adjusting the compression ratio to a fixed value, the processor 900 is further configured to execute:

[0102] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0103] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0104] As an optional implementation, the processor 900 is further configured to perform:

[0105] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, reduce the transmission power; or,

[0106] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the transmission power is increased.

[0107] As an optional implementation, after increasing the transmission power, the processor 900 is further configured to execute:

[0108] When the transmission power is the maximum transmission power and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0109] Fifthly, embodiments of the present invention also provide an apparatus for dynamically adjusting video quality, the apparatus comprising:

[0110] The video generation module is used to compress the original video stream to obtain the current video stream, and send the current video stream to the second device for the second device to play the current video stream, and to obtain the image quality parameters of the current video stream during the playback process;

[0111] The image quality adjustment module is used to receive image quality parameters sent by the second device, adjust the compression ratio according to the image quality parameters, compress the next original video stream using the adjusted compression ratio to obtain the next video stream, and send the next video stream to the second device.

[0112] As an optional implementation, the first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0113] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0114] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0115] As an optional implementation, the second device obtains at least one of the following image quality parameters during the playback of the current video stream: latency, packet loss information, and resolution, by calling the application programming interface of the operating system kernel.

[0116] As an optional implementation, the image quality parameters include delay time; the second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0117] As an optional implementation, the second device acquires the received time stream and the playback time stream via a CPU;

[0118] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0119] As an optional implementation method,

[0120] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0121] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player on the second device and / or the amount of data after decoding the current video stream.

[0122] As an optional implementation, the image quality parameters include packet loss information; the image quality adjustment module 1001 is specifically used for:

[0123] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0124] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0125] As an optional implementation, after adjusting the compression rate to a fixed value, the image quality adjustment module 1001 is further used for:

[0126] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0127] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0128] As an optional implementation, the image quality adjustment module 1001 is further used for:

[0129] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, reduce the transmission power; or,

[0130] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the transmission power is increased.

[0131] As an optional implementation, after increasing the transmission power, the image quality adjustment module 1001 is further used for:

[0132] When the transmission power is the maximum transmission power and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0133] In a sixth aspect, embodiments of the present invention also provide a computer storage medium having a computer program stored thereon, which, when executed by a processor, is used to implement the steps of the methods described in the first or third aspect above.

[0134] These or other aspects of this application will become more apparent in the following description of embodiments. Attached Figure Description

[0135] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0136] Figure 1 A schematic diagram of the impossible trinity for video transmission provided in an embodiment of the present invention;

[0137] Figure 2 A schematic diagram of a parametric coordinate system provided in an embodiment of the present invention;

[0138] Figure 3 This is a flowchart illustrating a method for dynamically adjusting video quality according to an embodiment of the present invention.

[0139] Figure 4 A flowchart illustrating the connection establishment between a first communication module and a second communication module is provided as an embodiment of the present invention.

[0140] Figure 5 A schematic diagram of the software architecture of a second device provided in an embodiment of the present invention;

[0141] Figure 6 A flowchart illustrating the dynamic adjustment of video quality provided in an embodiment of the present invention;

[0142] Figure 7 This is a schematic diagram of a system for dynamically adjusting video quality provided in an embodiment of the present invention;

[0143] Figure 8 This is a flowchart illustrating an embodiment of a method for dynamically adjusting video quality according to an invention.

[0144] Figure 9 A schematic diagram of an electronic device provided in an embodiment of the present invention;

[0145] Figure 10 This is a schematic diagram of a device for dynamically adjusting video quality according to an embodiment of the present invention. Detailed Implementation

[0146] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0147] In this embodiment of the invention, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0148] The application scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. Those skilled in the art will understand that with the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems. In the description of this invention, unless otherwise stated, "multiple" means two or more.

[0149] In the field of video data transmission, such as in live streaming and video conferencing scenarios, there are three parameters: clarity, smoothness, and latency. These three parameters are achieved through mutually exclusive technical processes, forming an impossible triangle where each solution can only guarantee two of them. Figure 1 As shown in the figure, this embodiment provides a schematic diagram of the impossible triangle of video transmission. In this diagram, the sharpness represents the amount of data in each frame of the image. The larger the amount of data in each frame of the image, the higher the sharpness. The smoothness represents the number of buffered video frames. The more frames, the higher the smoothness. The latency represents the delay time from receiving the video stream to playing the video stream. The smaller the latency time, the lower the latency. The latency time is related to the decoding time and the receiving time of the received video stream. The smaller the latency time, the less data in the over-the-air video stream.

[0150] If clarity and smoothness are prioritized, then the latency is increased to give the lower-level device (the device that receives and plays the video stream) sufficient time to receive the over-the-air video stream data and decode it. This manifests as latency (buffering). When bandwidth is insufficient, this manifests as intermittent smooth playback, with smooth playback for a while followed by buffering.

[0151] If smoothness and latency are prioritized, the host computer (the device sending the video stream) will highly compress the video stream data to reduce the amount of video stream data in the air. The slave computer can then decode and play the video stream data with only a small amount of data received, resulting in a decrease in image quality.

[0152] If clarity and latency are prioritized, this is achieved through large data volumes and timely decoding. The lower-level device will discard video stream data that cannot be processed and play the decoded video in a timely manner, which will manifest as packet loss and frame drops.

[0153] like Figure 2 As shown in the figure, this embodiment also provides a schematic diagram of a parameter coordinate system, wherein any point in the parameter coordinate system corresponds to a fixed set of resolution, frame rate (smoothness) and latency. Different compression algorithms, different electromagnetic environments, and different host / slave computer performance can all be configured with different transmission performance. Therefore, how to automatically adjust the parameters to achieve optimal transmission performance is a technical problem that urgently needs to be solved.

[0154] Based on this, this embodiment provides a method for dynamically adjusting video quality. The core idea of ​​this method is to use a second device for video playback to obtain quality parameters in real time and send the quality parameters to a first device for video generation, so that the first device can automatically adjust the compression rate when compressing the video, and maximize the video quality according to actual needs, thereby achieving dynamic adjustment of video quality.

[0155] like Figure 3 As shown in the figure, the specific implementation process of a method for dynamically adjusting video quality provided in this embodiment is as follows:

[0156] Step 300: The first device compresses the original video stream to obtain the current video stream, and sends the current video stream to the second device;

[0157] In implementation, the first device in this embodiment refers to the device that generates the video stream, and the second device refers to the device that plays the video stream. The first device can also be called a host computer, and the second device can also be called a slave computer. This embodiment does not impose too many limitations on the specific forms of the first and second devices.

[0158] In practice, the first device can compress the original video stream using a compression ratio to generate a new video stream, which is then sent to the second device. The second device receives the video stream, decompresses it, and plays it. Optionally, the resolution of the video stream generated by the first device is determined based on the compression ratio.

[0159] Step 301: The second device plays the current video stream and obtains the image quality parameters of the current video stream during playback, and sends the image quality parameters to the first device;

[0160] In some embodiments, the second device obtains at least one of the following image quality parameters during the playback of the current video stream: latency, packet loss information, and resolution, by calling the application programming interface (API) of the operating system kernel.

[0161] The image quality parameters in this embodiment include, but are not limited to, one or more of the following: latency, packet loss information, and sharpness.

[0162] In some embodiments, when the image quality parameters include latency, the second device determines the image quality parameters in the following manner:

[0163] The second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0164] In some embodiments, the second device acquires the received time stream and the playback time stream via a CPU; and determines the delay time of the current video stream during playback based on the difference between the received time stream and the playback time stream. In this embodiment, the delay time represents the time between the second device capturing the video and playing the video. Because the playback time and received time are determined by the CPU, the delay time can be calculated more accurately and in real-time compared to acquiring the playback / receive time through other components or software.

[0165] In some embodiments, when the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream. Optionally, the packet loss information in this embodiment includes, but is not limited to, the number of lost packets and / or the packet loss rate.

[0166] In some embodiments, when the image quality parameter includes sharpness, the sharpness is determined based on the playback performance of the player of the second device and / or the amount of data after decoding the current video stream.

[0167] In some embodiments, it should be noted that after the first device and the second device establish a communication connection, the transmission of other data such as video streams can be achieved. The specific method for establishing a connection and transmitting data is as follows:

[0168] The first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0169] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0170] In some embodiments, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; after the WIFI modules of the first device and the second device establish a connection, they can transmit video streams and image quality parameters to each other. After the two WIFI modules establish a connection, clock synchronization is required to ensure that the clocks of the two devices (the first device and the second device) are synchronized, facilitating accurate calculation of the delay time between video transmission and playback, and other data.

[0171] In some embodiments, the first communication module includes a millimeter-wave module, and the second communication module also includes a millimeter-wave module. It should be noted that millimeter waves typically refer to electromagnetic waves with a frequency band of 30–300 GHz and a corresponding wavelength of 1–10 mm. Their operating frequency lies between microwaves and far-infrared waves, exhibiting characteristics of both spectral types. The frequency band approaching 24 GHz or higher is also defined as millimeter waves. Compared to lower frequency bands, millimeter waves offer advantages such as large bandwidth, narrow beamwidth, low transmission interference, good security, low multipath effect, high Doppler resolution, and small device size for easy integration. They have broad application prospects in fields such as 5G mobile communication, the Internet of Things, radar, and satellite communication. Millimeter-wave technology can achieve ultra-high-speed wireless data transmission by increasing the spectrum bandwidth.

[0172] During implementation, such as Figure 4 As shown, this embodiment provides a flowchart of establishing a connection between a first communication module and a second communication module. Taking millimeter-wave modules as an example, the specific steps for establishing a connection between the millimeter-wave modules of the first device and the second device are as follows:

[0173] Step 400: After the first device scans the second device, it sends a connection establishment request message to the second device, wherein the request message carries time information;

[0174] Step 401: After receiving the request message, the second device confirms the establishment of the connection and sends a response message to the first device;

[0175] Step 402: The second device synchronizes its clock with the first device based on the time information.

[0176] In practice, during the connection establishment process between the two millimeter-wave modules, the first device adds time information to the request message it sends. Since the data volume of the request message packet is small and millimeter waves also propagate at the speed of light, the second device can synchronize its clock with the first device while waiting to establish a connection with the first device, thus achieving clock synchronization.

[0177] In some embodiments, taking millimeter-wave modules as an example, such as the first communication module and the second communication module being millimeter-wave modules, Figure 5As shown in the figure, this embodiment also provides a software architecture diagram of a second device, wherein the millimeter wave module of the second device is an independent module, which establishes a connection with other modules of the second device through a USB-hub, and adds a corresponding data interaction API to the physical layer USB. At this time, the USB port will be regarded as connecting two independent modules, one is a USB network card, and the other is a USB-com. The USB-com obtains image quality parameters such as latency, packet loss information and sharpness through the kernel API of the operating system (Windows or Linux).

[0178] Optionally, since the millimeter-wave module of the second device can transmit 4K video at full capacity, after the first and second communication modules establish a connection, the first device can also send a standard-format test screen, similar to the boot screen of a display device, for a certain period of time. This test screen is in ultra-high definition. Through this test screen, the packet loss rate (affecting smoothness), latency, and compression ratio (affecting clarity) of the second device in this state can be obtained. The compression ratio obtained at this time can be used as the initial compression ratio, which can be dynamically adjusted.

[0179] Step 302: The first device adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device.

[0180] In some embodiments, when the image quality parameters include packet loss information, the first device adjusts the compression ratio according to the image quality parameters in the following manner:

[0181] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, increase the compression rate;

[0182] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0183] In some embodiments, after the first device adjusts the compression rate to a fixed value, the compression rate can be reduced in real time in the following manner:

[0184] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0185] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0186] During implementation, the second device collects image quality parameters in real time and transmits them to the first device. The first device dynamically adjusts the video quality through the following steps, the specific steps of which are shown below:

[0187] Step a: When the first device detects that the number of lost packets q > the packet loss threshold, the first device makes a fine adjustment and increases the compression ratio;

[0188] Step b: As the amount of over-the-air video data decreases, when the first device detects that the number of lost packets has dropped to the packet loss threshold, the compression rate is adjusted to a fixed value Z.

[0189] Furthermore, a fixed value Z is set to decrease in real time. That is, the current compression rate is Z. When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the next compression rate can be Z = Z-1.

[0190] By dynamically adjusting the compression rate through the above steps, the video quality can be dynamically adjusted.

[0191] In some embodiments, the transmission power of the first device can also be adjusted through the following steps, as detailed below:

[0192] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the first device reduces the transmission power;

[0193] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the first device increases the transmission power.

[0194] Optionally, the compression threshold can be 0, and the packet loss threshold can be 0. This embodiment does not impose too many restrictions on this.

[0195] In some embodiments, after the first device increases its transmission power, when the transmission power is the maximum transmission power of the first device and the packet loss information corresponding to the current video stream is greater than the packet loss threshold, the compression rate is increased.

[0196] In practice, initially, if the first device transmits at maximum uncompressed power, when the number of packet losses q > 0 is detected, the compression ratio is increased until the number of packet losses drops to 0. At this point, the compression ratio is adjusted to a fixed value Z. The fixed value Z is then decreased in real-time the next time the number of packet losses drops to 0, meaning the next compression ratio is Z = Z - 1. When Z = 0, it means there are no packet losses, so the delay time is not adjusted, maintaining a fixed delay time. The transmission power P is then reduced until the number of packet losses is detected to be greater than 0 (q > 0), Z = 0. The transmission power P = P + 1 is then increased until P is adjusted to the maximum transmission power Pmax. If the number of packet losses q > 0 is detected then, the compression ratio Z = Z + 2 is increased.

[0197] like Figure 6 As shown in the figure, this embodiment also provides an adjustment process for dynamically adjusting video quality. Taking the first device as the host computer and the second device as the slave computer as an example, the specific process is as follows:

[0198] Step 600: The host computer compresses the original video stream to obtain the current video stream, and sends the current video stream to the slave computer through the millimeter wave module;

[0199] Step 601: The lower-level machine decompresses and plays the video stream, and calls the operating system kernel API to obtain the delay time and packet loss count, and sends the delay time and packet loss count to the upper-level machine;

[0200] Step 602: The host computer determines whether the number of lost packets in this video stream is greater than the packet loss threshold. If yes, proceed to step 603; otherwise, proceed to step 604.

[0201] Step 603: The host computer increases the compression ratio;

[0202] Step 604: The host computer adjusts the compression rate to a fixed value;

[0203] Step 605: The host computer determines whether the number of lost packets for the next video stream is greater than the packet loss threshold. If yes, proceed to step 606; otherwise, proceed to step 607.

[0204] Step 606: The host computer continues to increase the compression ratio;

[0205] Step 607: The host computer reduces the compression ratio;

[0206] Step 608: The host computer determines whether the compression ratio is greater than the compression threshold. If yes, proceed to step 609; otherwise, proceed to step 610.

[0207] Step 609: The host computer reduces the compression ratio;

[0208] Step 610: The host computer determines whether the number of lost packets in this video stream is greater than the packet loss threshold. If yes, proceed to step 611; otherwise, proceed to step 612.

[0209] Step 611: The host computer increases the transmission power;

[0210] Step 612: The host computer reduces the transmission power.

[0211] Step 613: The host computer determines whether the transmission power is the maximum transmission power and whether the number of lost packets corresponding to this video stream is greater than the packet loss threshold. If yes, proceed to step 614; otherwise, proceed to step 602.

[0212] Step 614: Increase the compression ratio on the host computer.

[0213] The method for dynamically adjusting video quality provided in this embodiment can keep the image quality in the clearest and smoothest state, and can also ensure that the host computer (first device) is kept in the most energy-efficient state.

[0214] It should be noted that when actually adjusting the compression ratio, the delay time can be fixed, and the clarity (compression ratio) can be adjusted according to the smoothness (packet loss). Alternatively, the smoothness can be fixed, and the clarity (compression ratio) can be adjusted according to the delay time. Methods for dynamically adjusting video quality based on the principles of this embodiment are all within the scope of protection of this application, and will not be elaborated further here.

[0215] Example 2: Based on the same inventive concept, this embodiment of the invention also provides a system for dynamically adjusting video quality. Since this system is the same as the system in the method of this embodiment of the invention, and the principle of solving the problem by this system is similar to that of this method, the implementation of this system can refer to the implementation of the method, and the repeated parts will not be described again.

[0216] like Figure 7 As shown, the system includes a first device 700 and a second device 701, wherein:

[0217] The first device 700 compresses the original video stream to obtain the current video stream, and then sends the current video stream to the second device 701;

[0218] The second device 701 plays the current video stream, obtains the image quality parameters of the current video stream during playback, and sends the image quality parameters to the first device 700.

[0219] The first device 700 adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device 701.

[0220] As an optional implementation, the first device 700 includes a first communication module, and the second device 701 includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0221] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0222] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0223] As an optional implementation, the second device 701 is specifically used for:

[0224] By calling the application programming interface of the operating system kernel, at least one of the following image quality parameters can be obtained during the playback of the current video stream: latency, packet loss information, and resolution.

[0225] As an optional implementation, the image quality parameters include latency; the second device 701 is specifically used for:

[0226] The delay time of the current video stream during playback is determined based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0227] As an optional implementation, the second device 701 is specifically used for:

[0228] The CPU acquires the received time stream and the playback time stream;

[0229] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0230] As an optional implementation method,

[0231] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0232] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player of the second device 701 and / or the amount of data after decoding the current video stream.

[0233] As an optional implementation, the image quality parameters include packet loss information; the first device 700 is specifically used for:

[0234] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0235] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0236] As an optional implementation, after adjusting the compression ratio to a fixed value, the first device 700 is further used for:

[0237] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0238] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0239] As an optional implementation, the first device 700 is further configured to:

[0240] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the first device 700 reduces the transmission power; or,

[0241] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the first device 700 increases the transmission power.

[0242] As an optional implementation, after increasing the transmission power, the first device 700 is further used to:

[0243] When the transmission power is the maximum transmission power of the first device 700, and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0244] like Figure 8 As shown, based on the same inventive concept, this embodiment also provides a method for dynamically adjusting video quality, applied to a first device, and the implementation method is as follows:

[0245] Step 800: Compress the original video stream to obtain the current video stream, and send the current video stream to the second device for the second device to play the current video stream, and obtain the image quality parameters of the current video stream during the playback process;

[0246] Step 801: Receive the image quality parameters sent by the second device, adjust the compression rate according to the image quality parameters, compress the next original video stream using the adjusted compression rate to obtain the next video stream, and send the next video stream to the second device.

[0247] As an optional implementation, the first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0248] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0249] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0250] As an optional implementation, the second device obtains at least one of the following image quality parameters during the playback of the current video stream: latency, packet loss information, and resolution, by calling the application programming interface of the operating system kernel.

[0251] As an optional implementation, the image quality parameters include delay time; the second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0252] As an optional implementation, the second device acquires the received time stream and the playback time stream via a CPU;

[0253] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0254] As an optional implementation method,

[0255] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0256] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player on the second device and / or the amount of data after decoding the current video stream.

[0257] As an optional implementation, the image quality parameters include packet loss information; adjusting the compression ratio based on the image quality parameters includes:

[0258] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0259] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0260] As an optional implementation, after adjusting the compression ratio to a fixed value, the method further includes:

[0261] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0262] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0263] As an optional implementation, it also includes:

[0264] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, reduce the transmission power; or,

[0265] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the transmission power is increased.

[0266] As an optional implementation, after increasing the transmission power, it further includes:

[0267] When the transmission power is the maximum transmission power and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0268] Based on the same inventive concept, this embodiment of the invention also provides an electronic device. Since this electronic device is the same as the electronic device in the method of this embodiment of the invention, and the principle of solving the problem by this electronic device is similar to that of this method, the implementation of this electronic device can refer to the implementation of the method, and the repeated parts will not be described again.

[0269] like Figure 9 As shown, the electronic device includes a processor 900 and a memory 901. The memory 901 stores programs executable by the processor 900. The processor 900 reads the programs from the memory 901 and performs the following steps:

[0270] The original video stream is compressed to obtain the current video stream, and the current video stream is sent to the second device for the second device to play the current video stream, and the image quality parameters of the current video stream are obtained during the playback process;

[0271] The system receives image quality parameters sent by the second device, adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device.

[0272] As an optional implementation, the first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0273] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0274] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0275] As an optional implementation, the second device obtains at least one of the following image quality parameters during the playback of the current video stream: latency, packet loss information, and resolution, by calling the application programming interface of the operating system kernel.

[0276] As an optional implementation, the image quality parameters include delay time; the second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0277] As an optional implementation, the second device acquires the received time stream and the playback time stream via a CPU;

[0278] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0279] As an optional implementation method,

[0280] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0281] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player on the second device and / or the amount of data after decoding the current video stream.

[0282] As an optional implementation, the image quality parameters include packet loss information; the processor 900 is specifically configured to execute:

[0283] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0284] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0285] As an optional implementation, after adjusting the compression ratio to a fixed value, the processor 900 is further configured to execute:

[0286] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0287] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0288] As an optional implementation, the processor 900 is further configured to perform:

[0289] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, reduce the transmission power; or,

[0290] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the transmission power is increased.

[0291] As an optional implementation, after increasing the transmission power, the processor 900 is further configured to execute:

[0292] When the transmission power is the maximum transmission power and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0293] Based on the same inventive concept, this embodiment of the invention also provides a device for dynamically adjusting video quality. Since this device is the same as the device in the method of this embodiment of the invention, and the principle of the device in solving the problem is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0294] like Figure 10 As shown, the device includes:

[0295] The video generation module 1000 is used to compress the original video stream to obtain the current video stream, and send the current video stream to the second device for the second device to play the current video stream, and to obtain the image quality parameters of the current video stream during the playback process;

[0296] The image quality adjustment module 1001 is used to receive image quality parameters sent by the second device, adjust the compression rate according to the image quality parameters, compress the next original video stream using the adjusted compression rate to obtain the next video stream, and send the next video stream to the second device.

[0297] As an optional implementation, the first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization operation.

[0298] The first communication module is used to send a video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module.

[0299] As an optional implementation, the first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

[0300] As an optional implementation, the second device obtains at least one of the following image quality parameters during the playback of the current video stream: latency, packet loss information, and resolution, by calling the application programming interface of the operating system kernel.

[0301] As an optional implementation, the image quality parameters include delay time; the second device determines the delay time of the current video stream during playback based on the reception time stream of the current video stream and the playback time stream of the current video stream.

[0302] As an optional implementation, the second device acquires the received time stream and the playback time stream via a CPU;

[0303] The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

[0304] As an optional implementation method,

[0305] When the image quality parameters include packet loss information, the packet loss information includes packet loss information during the receiving process and packet loss information during the decoding process of the current video stream; or,

[0306] When the image quality parameter includes resolution, the resolution is determined based on the playback performance of the player on the second device and / or the amount of data after decoding the current video stream.

[0307] As an optional implementation, the image quality parameters include packet loss information; the image quality adjustment module 1001 is specifically used for:

[0308] When the packet loss information for this video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0309] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, the compression rate is adjusted to a fixed value.

[0310] As an optional implementation, after adjusting the compression rate to a fixed value, the image quality adjustment module 1001 is further used for:

[0311] When the packet loss information for the next video stream exceeds the packet loss threshold, increase the compression ratio; or,

[0312] When the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression rate is reduced.

[0313] As an optional implementation, the image quality adjustment module 1001 is further used for:

[0314] When the packet loss information corresponding to this video stream is less than or equal to the packet loss threshold, and the compression rate is less than or equal to the compression threshold, reduce the transmission power; or,

[0315] When the packet loss information corresponding to this video stream is greater than the packet loss threshold, and the compression rate is less than or equal to the compression threshold, the transmission power is increased.

[0316] As an optional implementation, after increasing the transmission power, the image quality adjustment module 1001 is further used for:

[0317] When the transmission power is the maximum transmission power and the packet loss information corresponding to this video stream is greater than the packet loss threshold, the compression rate is increased.

[0318] Based on the same inventive concept, this disclosure provides a computer storage medium comprising: computer program code, which, when executed on a computer, causes the computer to perform any of the methods for dynamically adjusting video quality described above. Since the principle by which the computer storage medium solves the problem is similar to that of the method for dynamically adjusting video quality, the implementation of the computer storage medium can be found in the implementation of the method, and repeated details will not be elaborated further.

[0319] In specific implementation, computer storage media can include: Universal Serial Bus Flash Drive (USB), portable hard drive, Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk or optical disk, and other storage media that can store program code.

[0320] Based on the same inventive concept, this disclosure also provides a computer program product, which includes computer program code that, when executed on a computer, causes the computer to perform any of the methods for dynamically adjusting video quality described above. Since the principle by which the above-described computer program product solves the problem is similar to that of the method for dynamically adjusting video quality, the implementation of the above-described computer program product can be referred to the implementation of the method, and repeated details will not be elaborated further.

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

[0322] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0323] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 Devices that specify the functions in one or more boxes.

[0324] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction device, which is implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0325] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0326] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for dynamically adjusting video quality, characterized in that, The method includes: The first device compresses the original video stream to obtain the current video stream and sends it to the second device. The first device represents the device that generates the video stream, and the second device represents the device that plays the video stream. The first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization. The first communication module is used to send the video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module. Clock synchronization is performed through the following steps: After the first device scans the second device, it sends a connection establishment request message to the second device, wherein the request message carries time information. After receiving the request message, the second device confirms the connection establishment and sends a response message to the first device. The second device synchronizes its clock with the first device based on the time information. The second device plays the current video stream and obtains the image quality parameters of the current video stream during playback, and sends the image quality parameters to the first device; the second device obtains the following image quality parameters of the current video stream during playback by calling the application programming interface of the operating system kernel: delay time, packet loss information and resolution; The first device adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device; the image quality parameters include packet loss information; the first device adjusts the compression ratio according to the image quality parameters, including: increasing the compression ratio when the packet loss information corresponding to the current video stream is greater than the packet loss threshold; or, adjusting the compression ratio to a fixed value when the packet loss information corresponding to the current video stream is less than or equal to the packet loss threshold; after adjusting the compression ratio to a fixed value, it further includes: increasing the compression ratio when the packet loss information corresponding to the next video stream is greater than the packet loss threshold. The compression ratio is adjusted as follows: If the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression ratio is reduced; if the packet loss information corresponding to the current video stream is less than or equal to the packet loss threshold, and the compression ratio is less than or equal to the compression threshold, the first device reduces its transmission power; or if the packet loss information corresponding to the current video stream is greater than the packet loss threshold, and the compression ratio is less than or equal to the compression threshold, the first device increases its transmission power. After the first device increases its transmission power, the method further includes: if the transmission power is the maximum transmission power of the first device, and the packet loss information corresponding to the current video stream is greater than the packet loss threshold, the compression ratio is increased.

2. The method according to claim 1, characterized in that, The first communication module includes a WIFI module, and the second communication module includes a WIFI module; or, the first communication module includes a millimeter wave module, and the second communication module includes a millimeter wave module.

3. The method according to claim 1, characterized in that, The second device determines the delay time of the current video stream during playback, including: The second device acquires the received time stream and the playback time stream through the CPU; The delay time of the current video stream during playback is determined based on the difference between the received time stream and the playback time stream.

4. A system for dynamically adjusting video quality, characterized in that, Includes a first device and a second device, wherein: The first device compresses the original video stream to obtain the current video stream and sends it to the second device. The first device represents the device that generates the video stream, and the second device represents the device that plays the video stream. The first device includes a first communication module, and the second device includes a second communication module. The first communication module and the second communication module establish a connection and perform clock synchronization. The first communication module is used to send the video stream to the second communication module, and the second communication module is used to send image quality parameters to the first communication module. Clock synchronization is performed through the following steps: After the first device scans the second device, it sends a connection establishment request message to the second device, wherein the request message carries time information. After receiving the request message, the second device confirms the connection establishment and sends a response message to the first device. The second device synchronizes its clock with the first device based on the time information. The second device plays the current video stream and obtains the image quality parameters of the current video stream during playback, and sends the image quality parameters to the first device; the second device obtains the following image quality parameters of the current video stream during playback by calling the application programming interface of the operating system kernel: delay time, packet loss information and resolution; The first device adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device; the image quality parameters include packet loss information; the first device adjusts the compression ratio according to the image quality parameters, including: increasing the compression ratio when the packet loss information corresponding to the current video stream is greater than the packet loss threshold; or, adjusting the compression ratio to a fixed value when the packet loss information corresponding to the current video stream is less than or equal to the packet loss threshold; after adjusting the compression ratio to a fixed value, it further includes: increasing the compression ratio when the packet loss information corresponding to the next video stream is greater than the packet loss threshold. The compression ratio is adjusted as follows: If the packet loss information corresponding to the next video stream is less than or equal to the packet loss threshold, the compression ratio is reduced; if the packet loss information corresponding to the current video stream is less than or equal to the packet loss threshold, and the compression ratio is less than or equal to the compression threshold, the first device reduces its transmission power; or if the packet loss information corresponding to the current video stream is greater than the packet loss threshold, and the compression ratio is less than or equal to the compression threshold, the first device increases its transmission power. After the first device increases its transmission power, the method further includes: if the transmission power is the maximum transmission power of the first device, and the packet loss information corresponding to the current video stream is greater than the packet loss threshold, the compression ratio is increased.

5. A method for dynamically adjusting video quality, characterized in that, Applied to a first device, the method includes: The original video stream is compressed to obtain the current video stream, which is then sent to a second device for playback. The second device also acquires the video quality parameters during playback. The first device represents the device that generated the video stream, and the second device represents the device that plays the video stream. The first device includes a first communication module, and the second device includes a second communication module. The first and second communication modules establish a connection and perform clock synchronization. The first communication module sends the video stream to the second communication module, and the second communication module sends the video quality parameters to the first communication module. Clock synchronization is performed through the following steps: After scanning the second device, the first device sends a connection establishment request message to the second device, which carries time information. Upon receiving the request message, the second device confirms the connection and sends a response message to the first device. The second device synchronizes its clock with the first device based on the time information. The video quality parameters include latency, packet loss information, and resolution. The system receives image quality parameters sent by a second device, adjusts the compression ratio according to the image quality parameters, compresses the next original video stream using the adjusted compression ratio to obtain the next video stream, and sends the next video stream to the second device. The image quality parameters are obtained by calling the application programming interface of the operating system kernel. The image quality parameters include packet loss information. Adjusting the compression ratio according to the image quality parameters includes: increasing the compression ratio when the packet loss information corresponding to the current video stream is greater than a packet loss threshold; or, adjusting the compression ratio to a fixed value when the packet loss information corresponding to the current video stream is less than or equal to the packet loss threshold. After adjusting the compression ratio to a fixed value, the system further includes: when the next video stream... When the packet loss information is greater than the packet loss threshold, the compression ratio is increased; or, when the packet loss information of the next video stream is less than or equal to the packet loss threshold, the compression ratio is decreased; when the packet loss information of the current video stream is less than or equal to the packet loss threshold, and the compression ratio is less than or equal to the compression threshold, the first device reduces the transmission power; or, when the packet loss information of the current video stream is greater than the packet loss threshold, and the compression ratio is less than or equal to the compression threshold, the first device increases the transmission power; after the first device increases the transmission power, the method further includes: when the transmission power is the maximum transmission power of the first device, and the packet loss information of the current video stream is greater than the packet loss threshold, the compression ratio is increased.

6. A computer storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 3 or 5.

Citation Information

Patent Citations

  • Method for controlling video quality of mobile video telephone and mobile video telephone

    CN101998102A

  • Image processing method and image processing apparatus

    CN107968927A