Video transmission method and device, computer program product and readable storage medium

By adjusting the data compression ratio in the video transmission system in real time to match the real-time network bandwidth and code stream bandwidth, the video frame skipping problem caused by network bandwidth fluctuations is solved, and video quality and network utilization are improved.

CN119893020APending Publication Date: 2025-04-25SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510114676.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

During the video data transmission process, network bandwidth fluctuations lead to the inability to cache video data in time, which leads to video frame skipping, reducing video quality and user experience.

Method used

By obtaining the real-time code stream bandwidth and real-time network bandwidth, the data compression ratio of the compression module is adjusted to match the real-time code stream bandwidth and real-time network bandwidth, so that it remains matched when the network bandwidth fluctuates.

Benefits of technology

Reduce the discarding of video data, improve video quality, and improve network utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893020A_ABST
    Figure CN119893020A_ABST
Patent Text Reader

Abstract

The invention discloses a video transmission method, video transmission equipment, a computer program product and a readable storage medium, belongs to the field of video transmission, and is used for matching a data bandwidth sent to a cache module with a network bandwidth by adjusting a data compression ratio so as to solve the problem of video frame loss caused by relatively small network bandwidth. According to the method and the device, the real-time code stream bandwidth and the real-time network bandwidth are firstly obtained, and the data compression ratio of the compression module is adjusted according to the real-time code stream bandwidth and the real-time network bandwidth, so that the real-time code stream bandwidth is matched with the real-time network bandwidth, even if the real-time network bandwidth fluctuates, the real-time code stream bandwidth can be matched in time, and the data compression efficiency is improved. On one hand, discarding of video data is reduced, video quality is improved, and on the other hand, network utilization rate can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video transmission, and in particular to a video transmission method, device, computer program product and readable storage medium. Background Art

[0002] When transmitting video data, the video data is usually cached and then sent out through the network by the network module. However, the network bandwidth is volatile. When the network bandwidth is too small, the data in the cache is not read out in time, which will cause the new video data to not be cached smoothly. At this time, the usual practice is to discard the video data that cannot be cached, which leads to the problem of video frame skipping, reduces the video quality and affects the user experience.

[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention

[0004] The purpose of the present invention is to provide a video transmission method, device, computer program product and readable storage medium. In the present invention, the real-time code stream bandwidth and the real-time network bandwidth are first obtained, and the data compression ratio of the compression module is adjusted according to the real-time code stream bandwidth and the real-time network bandwidth, so that the real-time code stream bandwidth matches the real-time network bandwidth. Even if the real-time network bandwidth fluctuates, the real-time code stream bandwidth can be matched in time, which reduces the discarding of video data and improves the video quality on the one hand, and can also improve the network utilization rate on the other hand.

[0005] In order to solve the above technical problems, the present invention provides a video transmission method, comprising:

[0006] Acquire the real-time code stream bandwidth of a compression module in a video transmission system, wherein the compression module is used to compress video data to be sent;

[0007] Acquire the real-time network bandwidth of a network module in the video transmission system, wherein the network module is used to send compressed video data to be sent through the network;

[0008] According to the real-time network bandwidth and the real-time code stream bandwidth, adjusting the data compression ratio of the compression module so that the real-time code stream bandwidth matches the real-time network bandwidth;

[0009] The video transmission system further comprises a cache module connected to the compression module and the network module respectively, and the cache module is used for caching compressed video data to be sent.

[0010] On the other hand, obtaining the real-time code stream bandwidth of the compression module in the video transmission system includes:

[0011] After each first preset period, determining the first data quantity of the video data to be sent output by the compression module in the past first preset period;

[0012] Determining a real-time code stream bandwidth of a compression module according to the first data quantity, the preset data bit width, and the first preset period;

[0013] Obtaining the real-time network bandwidth of the network module in the video transmission system includes:

[0014] After each first preset period, determining the second data quantity of the video data to be sent read by the network module from the cache module in the past first preset period;

[0015] The real-time network bandwidth of the network module is determined according to the second data quantity, the preset bit width and the first preset period.

[0016] On the other hand, after each first preset period, determining the first data quantity of the video data to be sent output by the compression module in the past first preset period includes:

[0017] Starting from the starting point of the first preset cycle, when the interface signal of the first communication interface meets the first preset condition, the first register value whose initial value is zero is increased by one, wherein the first communication interface is: a communication interface between the compression module and the cache module, and the first preset condition is: a rising edge appears in the clock signal and the data valid signal is valid;

[0018] When the end of the first preset cycle is reached, the current first register value is used as the first data quantity of the video data to be sent output by the compression module, and after the first register value is cleared, the step of returning to the starting point of the first preset cycle and adding one to the first register value whose initial value is zero when the interface signal of the first communication interface satisfies the first preset condition is returned;

[0019] After each first preset period, determining that in the past first preset period, the network module reads a second data quantity of the video data to be sent from the cache module includes:

[0020] Starting from the starting point of the first preset cycle, when the interface signal of the read data interface of the cache module meets the second preset condition, the second register value whose initial value is zero is increased by one, wherein the second preset condition is: a rising edge appears on the clock signal, the read data valid signal is valid, and the ready signal of the network module is valid;

[0021] When the end of the first preset cycle is reached, the current second register value is used as the second data quantity of the video data to be sent by the network module from the cache module, and after the second register value is cleared, the execution returns to the starting point of the first preset cycle. When the interface signal of the read data interface of the cache module meets the second preset condition, the second register value whose initial value is zero is increased by one.

[0022] On the other hand, the starting point and the end point of the first preset period are: a pulse signal of the timer;

[0023] The period at which the timer sends out the pulse signal is the first preset period.

[0024] On the other hand, determining the real-time code stream bandwidth of the compression module according to the first data quantity, the preset data bit width, and the first preset period includes:

[0025] The product of the first data quantity and the preset data bit width is divided by the first preset period to obtain the real-time code stream bandwidth of the compression module;

[0026] Determining the real-time network bandwidth of the network module according to the second data quantity, the preset bit width, and the first preset period includes:

[0027] The real-time network bandwidth of the network module is obtained by multiplying the product of the second data quantity and the preset data bit width by the first preset period.

[0028] On the other hand, the first preset period is 1 second;

[0029] The real-time code stream bandwidth of the compression module is obtained by multiplying the product of the first data quantity and the preset data bit width by the first preset period, including:

[0030] The product of the first data quantity and the preset data bit width is used as the real-time code stream bandwidth of the compression module;

[0031] The real-time network bandwidth of the network module is obtained by multiplying the product of the second data quantity and the preset data bit width by the first preset period, including:

[0032] The product of the second data quantity and the preset data bit width is used as the real-time network bandwidth of the network module.

[0033] On the other hand, a preset decision unit is applied to a baseboard management controller.

[0034] On the other hand, according to the real-time network bandwidth and the real-time code stream bandwidth, adjusting the data compression ratio of the compression module so that the real-time code stream bandwidth matches the real-time network bandwidth includes:

[0035] According to the difference between the real-time network bandwidth and the real-time code stream bandwidth, the compression module is controlled to generate an update matrix so that the compression module adds a preset standard quantization table to the update matrix to obtain a target quantization table of the compression module, wherein the update matrix has the same size as the preset standard quantization table, and the target quantization table is used by the compression module to quantize the video data to be sent.

[0036] On the other hand, according to the difference between the real-time network bandwidth and the real-time code stream bandwidth, controlling the compression module to generate an update matrix includes:

[0037] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, the compression module is controlled to reduce the current update weight by a preset step size, so that the compression module fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module;

[0038] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, the compression module is controlled to increase the current update weight by a preset step size, so that the compression module fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module;

[0039] Among them, the update weight has a preset initial value.

[0040] On the other hand, when the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, controlling the compression module to reduce the current update weight by a preset step size includes:

[0041] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, the reduction signal is set to a valid state and the expansion signal is set to an invalid state, so that the compression module reduces the current update weight by a preset step size in response to the valid state of the reduction signal;

[0042] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, controlling the compression module to increase the current update weight by a preset step size comprises:

[0043] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, the reduction signal is set to an invalid state and the expansion signal is set to a valid state, so that the compression module increases the current update weight by a preset step size in response to the valid state of the expansion signal;

[0044] In response to the target quantization table update completion signal sent by the compression module, both the reduction signal and the expansion signal are set to an invalid state.

[0045] On the other hand, according to the difference between the real-time network bandwidth and the real-time code stream bandwidth, controlling the compression module to generate an update matrix includes:

[0046] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, a target step length corresponding to the absolute value of the difference is generated according to a first corresponding relationship, wherein the first corresponding relationship is: a corresponding relationship between the absolute value of the difference and the target step length;

[0047] Control the compression module to reduce the current update weight by the target step size, so that the compression module fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module;

[0048] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, generating a target step size corresponding to the absolute value of the difference according to the first corresponding relationship;

[0049] Control the compression module to increase the current update weight by the target step size, so that the compression module fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module;

[0050] Among them, the update weight has a preset initial value.

[0051] On the other hand, the area of ​​each designated filling bit in the all-zero matrix in the all-zero matrix is ​​the same as the value area in the quantization table used to discard high-frequency component information.

[0052] In order to solve the above technical problems, the present invention further provides a video transmission device, comprising:

[0053] A compression module, used for compressing video data to be sent;

[0054] A cache module, used to cache compressed video data to be sent;

[0055] A network module, used for sending the compressed video data to be sent through the network;

[0056] The decision unit is used to implement the steps of the video transmission method as described above.

[0057] In order to solve the above technical problem, the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above video transmission method when executed by a processor.

[0058] In order to solve the above technical problem, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above video transmission method are implemented.

[0059] Beneficial effect: The present invention provides a video transmission method, taking into account that (1) by adjusting the data compression ratio of the video data to be sent, the real-time code stream bandwidth of the compression module in the video transmission system can be adjusted, and (2) matching the real-time code stream bandwidth with the real-time network bandwidth of the network module in the video transmission system can avoid losing video data and improve network utilization. Therefore, the present invention first obtains the real-time code stream bandwidth and the real-time network bandwidth, and adjusts the data compression ratio of the compression module according to the real-time code stream bandwidth and the real-time network bandwidth, so that the real-time code stream bandwidth matches the real-time network bandwidth. Even if the real-time network bandwidth fluctuates, the real-time code stream bandwidth can be matched in time, which reduces the discarding of video data and improves the video quality on the one hand, and improves the network utilization on the other hand.

[0060] The present invention also provides a video transmission device, a computer program product and a computer-readable storage medium, which have the same beneficial effects as the above video transmission method. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the relevant technologies and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0062] Figure 1 A schematic diagram of a flow chart of a video transmission method provided by the present invention;

[0063] Figure 2 A schematic structural diagram of a video transmission device provided by the present invention;

[0064] Figure 3 A waveform diagram of a pulse signal of a timer provided by the present invention;

[0065] Figure 4 A signal timing diagram of a first communication interface provided by the present invention;

[0066] Figure 5 A signal timing diagram of a read data interface of a cache module provided by the present invention;

[0067] Figure 6 A schematic diagram of a process for generating a target quantization table provided by the present invention;

[0068] Figure 7 A schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0069] The core of the present invention is to provide a video transmission method, device, computer program product and readable storage medium. In the present invention, the real-time code stream bandwidth and the real-time network bandwidth are first obtained, and the data compression ratio of the compression module is adjusted according to the real-time code stream bandwidth and the real-time network bandwidth, so that the real-time code stream bandwidth matches the real-time network bandwidth. Even if the real-time network bandwidth fluctuates, the real-time code stream bandwidth can be matched in time. On the one hand, the discarding of video data is reduced and the video quality is improved. On the other hand, the network utilization rate can also be improved.

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

[0071] Please refer to Figure 1 , Figure 1 A schematic diagram of a flow chart of a video transmission method provided by the present invention, the video transmission method comprising:

[0072] S101: Acquire a real-time code stream bandwidth of a compression module 1 in a video transmission system, wherein the compression module 1 is used to compress video data to be sent;

[0073] Specifically, considering the technical problems in the above background technology, and considering that (1) by adjusting the data compression ratio of the video data to be sent, the real-time code stream bandwidth of the compression module 1 in the video transmission system can be adjusted, and (2) matching the real-time code stream bandwidth with the real-time network bandwidth of the network module 3 in the video transmission system can avoid losing video data and improve network utilization, the embodiment of the present invention intends to adaptively adjust the real-time code stream bandwidth of the compression module 1 during the video transmission process as the real-time network bandwidth of the network module 3 in the video transmission system changes, so that the real-time code stream bandwidth matches the real-time network bandwidth. Even if the real-time network bandwidth fluctuates, the data writing efficiency and data reading efficiency of the cached data can be balanced, which not only avoids the discarding of video data and improves the video quality, but also helps to improve the network utilization. Therefore, in this step, the real-time code stream bandwidth of the compression module 1 in the video transmission system can be first obtained, and it can be used as the data basis for the subsequent steps.

[0074] Specifically, in order to better illustrate the embodiments of the present invention, please refer to Figure 2 , Figure 2 A structural schematic diagram of a video transmission device provided by the present invention, wherein a compression module 1 is used to compress video data to be sent, an output control unit is used to write the compressed video data to be sent into a cache unit, a network module 3 is used to send the compressed video data to be sent in the cache unit through a network, and a decision unit 4 can be used to execute the steps of the video transmission method in an embodiment of the present invention.

[0075] The compression module 1 may be of various types, for example, a JPEG (Joint Photographic Experts Group) compression module 1, etc., depending on the image format of the video data to be sent.

[0076] S102: Acquire the real-time network bandwidth of the network module 3 in the video transmission system, wherein the network module 3 is used to send the compressed video data to be sent through the network;

[0077] Specifically, in order to adapt to the fluctuation of the real-time network bandwidth, the real-time network bandwidth of the network module 3 in the video transmission system can be obtained and used as the data basis for subsequent steps.

[0078] S103: adjusting the data compression ratio of the compression module 1 according to the real-time network bandwidth and the real-time code stream bandwidth so that the real-time code stream bandwidth matches the real-time network bandwidth;

[0079] The video transmission system further includes a cache module 2 connected to the compression module 1 and the network module 3 respectively, and the cache module 2 is used for caching compressed video data to be sent.

[0080] Specifically, the real-time code stream bandwidth can be regarded as the data writing efficiency of the cache module 2, and the real-time network bandwidth can be regarded as the data reading efficiency of the cache module 2. Under ideal conditions, the two should be balanced. When the real-time network bandwidth is small, the cache module 2 will be quickly filled, resulting in the discarding of the video data to be sent, which reduces the video quality. When the real-time network bandwidth is large, it is equivalent to wasting network capacity. By adjusting the data compression ratio of the compression module 1, the real-time code stream bandwidth and the real-time network bandwidth can be matched. Therefore, in the embodiment of the present invention, the data compression ratio of the compression module 1 can be adjusted according to the real-time network bandwidth and the real-time code stream bandwidth so that the real-time code stream bandwidth matches the real-time network bandwidth.

[0081] The present invention provides a video transmission method. Considering that (1) the real-time code stream bandwidth of a compression module in a video transmission system can be adjusted by adjusting the data compression ratio of video data to be transmitted, and (2) matching the real-time code stream bandwidth with the real-time network bandwidth of a network module in the video transmission system can avoid video data loss and improve network utilization, the present invention first obtains the real-time code stream bandwidth and the real-time network bandwidth, and adjusts the data compression ratio of the compression module according to the real-time code stream bandwidth and the real-time network bandwidth, so that the real-time code stream bandwidth matches the real-time network bandwidth. Even if the real-time network bandwidth fluctuates, the real-time code stream bandwidth can be matched in time. On the one hand, the discarding of video data is reduced and the video quality is improved. On the other hand, the network utilization can be improved.

[0082] Based on the above embodiments:

[0083] As an optional embodiment, obtaining the real-time code stream bandwidth of the compression module 1 in the video transmission system includes:

[0084] After each first preset period, determining the first data quantity of the video data to be sent output by the compression module 1 in the past first preset period;

[0085] Determine the real-time code stream bandwidth of the compression module 1 according to the first data quantity, the preset data bit width and the first preset period;

[0086] Specifically, considering that the real-time code stream bandwidth of the compression module 1 can be determined by the data amount of the video data to be sent output by the compression module 1 in the past period of time, the first preset period is first set in the embodiment of the present invention, and considering that the unit of the real-time code stream bandwidth is usually BPS (Bits Per Second), and the unit data of the video data to be sent has a certain bit width, therefore, in the embodiment of the present invention, every first preset period, the first data amount of the video data to be sent output by the compression module 1 in the past first preset period is determined, and then the real-time code stream bandwidth of the compression module 1 is determined according to the first data amount, the preset data bit width and the first preset period.

[0087] The preset data bit width refers to the bit width of the unit video data to be sent, for example, it can be 32 bits, etc. The first preset period can also be flexibly set, and the embodiment of the present invention does not limit this.

[0088] Acquiring the real-time network bandwidth of the network module 3 in the video transmission system includes:

[0089] After each first preset period, determining the second data quantity of the video data to be sent read by the network module 3 from the cache module 2 in the past first preset period;

[0090] The real-time network bandwidth of the network module 3 is determined according to the second data quantity, the preset bit width and the first preset period.

[0091] Specifically, considering that the network module 3 usually reads the video data to be sent according to the real-time network bandwidth, the real-time network bandwidth can be determined based on the amount of data of the video data to be sent read by the network module 3 from the cache module 2 in the past period of time. Therefore, the present invention sets a first preset period, and every first preset period, determines the second data quantity of the video data to be sent read by the network module 3 from the cache module 2 in the past first preset period, and then determines the real-time network bandwidth of the network module 3 based on the second data quantity, the preset bit width and the first preset period.

[0092] The unit of the real-time network bandwidth may also be BPS.

[0093] Of course, in addition to this specific method, the method for obtaining the real-time code stream unit and / or the real-time network bandwidth may also be other types, which are not limited in the embodiment of the present invention.

[0094] As an optional embodiment, after each first preset period, determining the first data quantity of the video data to be sent output by the compression module 1 in the past first preset period includes:

[0095] Starting from the starting point of the first preset cycle, when the interface signal of the first communication interface meets the first preset condition, the first register value whose initial value is zero is increased by one, wherein the first communication interface is: the communication interface between the compression module 1 and the cache module 2, and the first preset condition is: the clock signal has a rising edge and the data valid signal is valid;

[0096] When the end of the first preset cycle is reached, the current first register value is used as the first data quantity of the video data to be sent output by the compression module 1, and after the first register value is cleared, the execution returns to the step of increasing the first register value whose initial value is zero by one from the starting point of the first preset cycle when the interface signal of the first communication interface satisfies the first preset condition;

[0097] Specifically, considering that when the interface signal of the first communication interface (the communication interface between the compression module 1 and the cache module 2) satisfies the first preset condition, it means that the compression module 1 outputs a data to the cache module 2. Therefore, the embodiment of the present invention can start from the starting point of the first preset period, and when the interface signal of the first communication interface satisfies the first preset condition, the first register value whose initial value is zero is increased by one, so as to realize the statistics of "the number of data output by the compression module 1 to the cache module 2" within the first preset period, and when the end of the first preset period is reached, the current first register value is used as the first data number of the video data to be sent output by the compression module 1, and the first register value is cleared to zero, and finally, the execution can be returned to the step of starting from the starting point of the first preset period, and when the interface signal of the first communication interface satisfies the first preset condition, the first register value whose initial value is zero is increased by one.

[0098] Of course, in addition to this specific method, "every first preset period, determining the first data quantity of the video data to be sent output by the compression module 1 in the past first preset period" can also be other methods, which are not limited in the embodiment of the present invention.

[0099] After each first preset period, determining that in the past first preset period, the second data quantity of the video data to be sent read by the network module 3 from the cache module 2 includes:

[0100] Starting from the starting point of the first preset cycle, when the interface signal of the read data interface of the cache module 2 meets the second preset condition, the second register value whose initial value is zero is increased by one, wherein the second preset condition is: a rising edge appears on the clock signal, the read data valid signal is valid, and the ready signal of the network module 3 is valid;

[0101] When the end of the first preset cycle is reached, the current second register value is used as the second data quantity of the video data to be sent by the network module 3 from the cache module 2, and after the second register value is cleared, the execution returns to the starting point of the first preset cycle. When the interface signal of the read data interface of the cache module 2 meets the second preset condition, the second register value whose initial value is zero is increased by one.

[0102] Specifically, considering that "the interface signal of the read data interface of the cache module 2 satisfies the second preset condition (a rising edge appears on the clock signal, the read data valid signal is valid, and the ready signal of the network module 3 is valid)", it can be indicated that a data is sent externally through the network module 3. Therefore, starting from the starting point of the first preset cycle, when the interface signal of the read data interface of the cache module 2 satisfies the second preset condition, the second register value whose initial value is zero is increased by one, thereby realizing the statistics of "the number of data sent externally through the network module 3", and when reaching the end of the first preset cycle, the current second register value can be used as the second data number of the video data to be sent read by the network module 3 from the cache module 2, and the second register value can be cleared to zero, and finally, the execution can be returned to the step of starting from the starting point of the first preset cycle, and when the interface signal of the read data interface of the cache module 2 satisfies the second preset condition, the second register value whose initial value is zero is increased by one.

[0103] Among them, the identifier of the read data valid signal of the read data interface of the cache module 2 can be RVALID, indicating that the cache module 2 has prepared the data, and the identifier of the valid ready signal of the network module 3 can be RREADY, indicating that the network module 3 is ready to read the cached data.

[0104] The validity of a signal usually refers to a high level. Of course, in some special cases, it is possible to use a low level as the valid state of the signal.

[0105] Of course, in addition to this specific method, "every first preset period, determining the second data quantity of the video data to be sent read by the network module 3 from the cache module 2 within the past first preset period" can also be implemented in other ways, which are not limited in the embodiments of the present invention.

[0106] As an optional embodiment, the starting point and the end point of the first preset period are: a pulse signal of a timer;

[0107] The period at which the timer sends out the pulse signal is the first preset period.

[0108] Specifically, in order to better illustrate the embodiments of the present invention, please refer to Figure 3 , Figure 3 A waveform diagram of a pulse signal of a timer provided by the present invention, in Figure 3 In the waveform of the pulse signal, the length of a single cycle is the first preset cycle, that is, the starting point and the end point of the first preset cycle can be continuously given by the pulse signal.

[0109] Specifically, the timer can automatically and cyclically provide the start and end points of the first preset period, thereby assisting in the measurement of the real-time code stream bandwidth and the real-time network bandwidth, and has the characteristics of simplicity and efficiency.

[0110] Of course, in addition to the timer, the start point and the end point of the first preset period may also be realized by other means, which is not limited in the embodiment of the present invention.

[0111] Specifically, in order to better illustrate the embodiments of the present invention, please refer to Figure 4 and Figure 5 , Figure 4 A signal timing diagram of a first communication interface provided by the present invention, Figure 5 The signal timing diagram of the read data interface of the cache module provided by the present invention is Figure 4 In the example, the clock signal increases in a cycle sequence of 1 to 10, and the data valid signal indicates that the compression module 1 outputs valid compressed video data to be sent. Figure 3 The video data to be sent in the valid period of the data valid signal starts from data [M] and ends at data [N], where M and N are both sequence numbers of the data and M is less than N. Figure 5 In the embodiment, the clock signal increases continuously in the cycle sequence from T0 to T13. When the read data valid signal and the ready signal are valid at the same time, it indicates that a data is read out of the cache module 2.

[0112] As an optional embodiment, determining the real-time code stream bandwidth of the compression module 1 according to the first data quantity, the preset data bit width and the first preset period includes:

[0113] The product of the first data quantity and the preset data bit width is divided by the first preset period to obtain the real-time code stream bandwidth of the compression module 1;

[0114] Determining the real-time network bandwidth of the network module 3 according to the second data quantity, the preset bit width, and the first preset period includes:

[0115] The real-time network bandwidth of the network module 3 is obtained by multiplying the product of the second data quantity and the preset data bit width by the first preset period.

[0116] Specifically, after the corresponding data quantity (the first data quantity or the second data quantity) is converted into the number of bits through the preset data bit width, the bandwidth in BPS can be determined by dividing it by the first preset period. Therefore, in the embodiment of the present invention, the product of the first data quantity and the preset data bit width can be divided by the first preset period to obtain the real-time code stream bandwidth of the compression module 1, and the product of the second data quantity and the preset data bit width can be divided by the first preset period to obtain the real-time network bandwidth of the network module 3. The calculation is simple and accurate.

[0117] As an optional embodiment, the first preset period is 1 second;

[0118] The real-time code stream bandwidth of the compression module 1 is obtained by multiplying the product of the first data quantity and the preset data bit width by the first preset period:

[0119] The product of the first data quantity and the preset data bit width is used as the real-time code stream bandwidth of the compression module 1;

[0120] The real-time network bandwidth of the network module 3 is obtained by multiplying the product of the second data quantity and the preset data bit width by the first preset period:

[0121] The product of the second data quantity and the preset data bit width is used as the real-time network bandwidth of the network module 3.

[0122] Specifically, considering that BPS stands for bits per second, if the first preset period is set to 1 second, then there is no need to divide by the first preset period in the process of calculating the real-time code stream bandwidth and the real-time network bandwidth. Therefore, in an embodiment of the present invention, the first preset period can be set to 1 second. In this way, the product of the first data quantity and the preset data bit width can be used as the real-time code stream bandwidth of the compression module 1, and the product of the second data quantity and the preset data bit width can be used as the real-time network bandwidth of the network module 3.

[0123] Of course, in addition to 1 second, the first preset period can also be set independently, and the embodiment of the present invention is not limited here.

[0124] As an optional embodiment, it is applied to a preset decision unit 4 in a baseboard management controller.

[0125] Specifically, by setting the decision unit 4 in the BMC (Baseboard Management Controller), the real-time code stream bandwidth and the real-time network bandwidth can be more closely matched during the BMC video data transmission process, without adding additional hardware to the server.

[0126] As an optional embodiment, according to the real-time network bandwidth and the real-time code stream bandwidth, adjusting the data compression ratio of the compression module 1 so that the real-time code stream bandwidth matches the real-time network bandwidth includes:

[0127] According to the difference between the real-time network bandwidth and the real-time code stream bandwidth, the compression module 1 is controlled to generate an update matrix so that the compression module 1 adds the preset standard quantization table and the update matrix to obtain the target quantization table of the compression module 1, wherein the update matrix has the same size as the preset standard quantization table, and the target quantization table is used by the compression module 1 to quantize the video data to be sent.

[0128] Specifically, considering that by adjusting the update matrix of the compression module 1, the compression module 1 can adjust the data compression ratio in the process of applying the compression module 1 to generate the target quantization table, the embodiment of the present invention can control the compression module 1 to generate the update matrix according to the difference between the real-time network bandwidth and the real-time code stream bandwidth, so that the compression module 1 adds the preset standard quantization table and the update matrix to obtain the target quantization table of the compression module 1. This method of adjusting the compression ratio is relatively simple and efficient.

[0129] Of course, in addition to this specific method, there may be many other ways to adjust the data compression ratio, which are not limited in the embodiment of the present invention.

[0130] As an optional embodiment, according to the difference between the real-time network bandwidth and the real-time code stream bandwidth, controlling the compression module 1 to generate the update matrix includes:

[0131] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, the compression module 1 is controlled to reduce the current update weight by a preset step size, so that the compression module 1 fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module 1;

[0132] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, the compression module 1 is controlled to increase the current update weight by a preset step size, so that the compression module 1 fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module 1;

[0133] Among them, the update weight has a preset initial value.

[0134] Specifically, considering that the network bandwidth will not undergo a large mutation, and the present invention itself monitors the real-time network bandwidth and the real-time code stream bandwidth in real time, in the embodiment of the present invention, when the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, the compression module 1 is controlled to reduce the current update weight by a preset step size, so that the compression module 1 fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix; when the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, the compression module 1 is controlled to increase the current update weight by a preset step size, so that the compression module 1 fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix; that is, in the embodiment of the present invention, on the one hand, the preset step size can be adjusted for the update weight each time according to the size relationship between the real-time code stream bandwidth and the real-time network bandwidth, and on the other hand, the compression module 1 can fill the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix. By setting the designated filling position in the all-zero matrix, the "type of component discarded by the video data to be sent" can be flexibly set.

[0135] Of course, in addition to this specific form, there may be many other ways of "controlling the compression module 1 to generate an update matrix according to the difference between the real-time network bandwidth and the real-time code stream bandwidth", which is not limited in the embodiment of the present invention.

[0136] Specifically, in order to better illustrate the embodiments of the present invention, please refer to Figure 6 , Figure 6 A schematic diagram of a process for generating a target quantization table provided by the present invention, wherein the update matrix is ​​a full zero matrix filled with a specified fill bit, Figure 6 The specified padding bits in the all-zero matrix are the padding bits corresponding to the thick rectangle or the rectangle filled with V (updated weights), and when the updated weights are filled to Figure 6 After the designated filling bits are shown, after the update matrix and the preset standard quantization table are updated in a superimposed manner, the discarding of high-frequency component information in the video data to be sent can be improved.

[0137] The update weight value may range from 0 to 255.

[0138] As an optional embodiment, when the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, controlling the compression module 1 to reduce the current update weight by a preset step size includes:

[0139] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, the reduction signal is set to a valid state and the expansion signal is set to an invalid state, so that the compression module 1 reduces the current update weight by a preset step size in response to the valid state of the reduction signal;

[0140] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, controlling the compression module 1 to increase the current update weight by a preset step size includes:

[0141] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, the reduction signal is set to an invalid state and the expansion signal is set to a valid state, so that the compression module 1 increases the current update weight by a preset step size in response to the valid state of the expansion signal;

[0142] In response to the target quantization table update completion signal sent by the compression module 1, both the reduction signal and the expansion signal are set to an invalid state.

[0143] Specifically, considering that the compression module 1 is triggered to perform an action of increasing / decreasing the preset step size for the update weight by the valid state of the signal, in the embodiment of the present invention, when the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, the reduction signal can be set to a valid state and the expansion signal can be set to an invalid state, so that the compression module 1 can reduce the current update weight by the preset step size in response to the valid state of the reduction signal, and when the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, the reduction signal can be set to an invalid state and the expansion signal can be set to a valid state, so that the compression module 1 can increase the current update weight by the preset step size in response to the valid state of the expansion signal, thereby controlling the compression module 1 to achieve accurate adjustment of the update weight by simply controlling the reduction signal and the expansion signal.

[0144] The effective state may be set autonomously, for example, may be set to a high level, etc., which is not limited in the embodiment of the present invention.

[0145] Of course, in addition to this specific form, the manner in which the control compression module 1 adjusts the preset step length for the update weight may also be in various forms, which are not limited in the embodiment of the present invention.

[0146] As an optional embodiment, according to the difference between the real-time network bandwidth and the real-time code stream bandwidth, controlling the compression module 1 to generate the update matrix includes:

[0147] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, a target step length corresponding to the absolute value of the difference is generated according to a first corresponding relationship, wherein the first corresponding relationship is: a corresponding relationship between the absolute value of the difference and the target step length;

[0148] Control compression module 1 to reduce the current update weight by the target step size, so that compression module 1 fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of compression module 1;

[0149] When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, a target step size corresponding to the absolute value of the difference is generated according to the first corresponding relationship;

[0150] Control compression module 1 to increase the current update weight by a target step size, so that compression module 1 fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds a preset standard quantization table to the update matrix to obtain a target quantization table of compression module 1;

[0151] Among them, the update weight has a preset initial value.

[0152] Specifically, in order to more accurately adjust the data compression ratio, the embodiment of the present invention can also determine the corresponding target step size based on the absolute value of the difference between the real-time code stream bandwidth and the real-time network bandwidth, and then control the compression module 1 to adjust (reduce / increase) the current update weight to the target step size, so that the compression module 1 fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain the target quantization table of the compression module 1, thereby further improving the matching degree between the real-time code stream bandwidth and the real-time network bandwidth.

[0153] The first corresponding relationship may be a linear relationship of direct proportion, which is not limited in the embodiment of the present invention.

[0154] As an optional embodiment, the area of ​​each designated filling bit in the all-zero matrix in the all-zero matrix is ​​the same as the value area in the quantization table used to discard high-frequency component information.

[0155] Specifically, as Figure 6 As shown, the area of ​​the designated filling bits in the update matrix is ​​the value area in the quantization table used to discard high-frequency component information, that is, by Figure 6 The designated filling bits shown are used to update the weights, and then the quantization table is updated according to the obtained update matrix, so as to improve the degree of discarding high-frequency component information in the video data to be sent.

[0156] Of course, in addition to the area corresponding to the high-frequency component information, the designated filling bits may also be areas corresponding to other types of component information, which is not limited in the embodiment of the present invention.

[0157] Please refer to Figure 2 , Figure 2 A schematic diagram of the structure of a video transmission device provided by the present invention, the video transmission device comprises:

[0158] Compression module 1, used for compressing the video data to be sent;

[0159] Cache module 2, used for caching compressed video data to be sent;

[0160] The network module 3 is used to send the compressed video data to be sent through the network;

[0161] The decision unit 4 is used to implement the steps of the above video transmission method.

[0162] For an introduction to the video transmission device provided in the embodiment of the present invention, please refer to the embodiment of the aforementioned video transmission method, and the embodiment of the present invention will not be described in detail here.

[0163] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the video transmission method in the above-mentioned embodiment when the computer program / instruction is executed by a processor.

[0164] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the aforementioned embodiment of the video transmission method, and the embodiment of the present invention will not be described in detail here.

[0165] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. A computer program 72 is stored on the computer-readable storage medium 71. When the computer program 72 is executed by a processor, the steps of the video transmission method in the aforementioned embodiment are implemented.

[0166] For an introduction to the computer-readable storage medium provided in an embodiment of the present invention, please refer to the aforementioned embodiment of the video transmission method, and the embodiment of the present invention will not be described in detail here.

[0167] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. It should also be noted that in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the element.

[0168] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A video transmission method, characterized in that: include: Acquire the real-time code stream bandwidth of a compression module in a video transmission system, wherein the compression module is used to compress video data to be sent; Acquire the real-time network bandwidth of a network module in the video transmission system, wherein the network module is used to send compressed video data to be sent through the network; According to the real-time network bandwidth and the real-time code stream bandwidth, adjusting the data compression ratio of the compression module so that the real-time code stream bandwidth matches the real-time network bandwidth; The video transmission system further comprises a cache module connected to the compression module and the network module respectively, and the cache module is used for caching compressed video data to be sent.

2. The video transmission method according to claim 1, characterized in that: Obtaining the real-time code stream bandwidth of the compression module in the video transmission system includes: After each first preset period, determining the first data quantity of the video data to be sent output by the compression module in the past first preset period; Determining a real-time code stream bandwidth of a compression module according to the first data quantity, the preset data bit width, and the first preset period; Obtaining the real-time network bandwidth of the network module in the video transmission system includes: After each first preset period, determining the second data quantity of the video data to be sent read by the network module from the cache module in the past first preset period; The real-time network bandwidth of the network module is determined according to the second data quantity, the preset bit width and the first preset period.

3. The video transmission method according to claim 2, characterized in that: After each first preset period, determining the first data quantity of the video data to be sent output by the compression module in the past first preset period includes: Starting from the starting point of the first preset cycle, when the interface signal of the first communication interface meets the first preset condition, the first register value whose initial value is zero is increased by one, wherein the first communication interface is: a communication interface between the compression module and the cache module, and the first preset condition is: a rising edge appears in the clock signal and the data valid signal is valid; When the end of the first preset cycle is reached, the current first register value is used as the first data quantity of the video data to be sent output by the compression module, and after the first register value is cleared, the step of returning to the starting point of the first preset cycle and adding one to the first register value whose initial value is zero when the interface signal of the first communication interface satisfies the first preset condition is returned; After each first preset period, determining that in the past first preset period, the network module reads a second data quantity of the video data to be sent from the cache module includes: Starting from the starting point of the first preset cycle, when the interface signal of the read data interface of the cache module meets the second preset condition, the second register value whose initial value is zero is increased by one, wherein the second preset condition is: a rising edge appears on the clock signal, the read data valid signal is valid, and the ready signal of the network module is valid; When the end of the first preset cycle is reached, the current second register value is used as the second data quantity of the video data to be sent by the network module from the cache module, and after the second register value is cleared, the execution returns to the starting point of the first preset cycle. When the interface signal of the read data interface of the cache module meets the second preset condition, the second register value whose initial value is zero is increased by one.

4. The video transmission method according to claim 3, characterized in that: The starting point and the end point of the first preset period are: a pulse signal of the timer; The period at which the timer sends out the pulse signal is a first preset period.

5. The video transmission method according to claim 2, characterized in that: Determining the real-time code stream bandwidth of the compression module according to the first data quantity, the preset data bit width, and the first preset period includes: The product of the first data quantity and the preset data bit width is divided by the first preset period to obtain the real-time code stream bandwidth of the compression module; Determining the real-time network bandwidth of the network module according to the second data quantity, the preset bit width, and the first preset period includes: The real-time network bandwidth of the network module is obtained by multiplying the product of the second data quantity and the preset data bit width by the first preset period.

6. The video transmission method according to claim 5, characterized in that: The first preset period is 1 second; The real-time code stream bandwidth of the compression module is obtained by multiplying the product of the first data quantity and the preset data bit width by the first preset period, including: The product of the first data quantity and the preset data bit width is used as the real-time code stream bandwidth of the compression module; The real-time network bandwidth of the network module is obtained by multiplying the product of the second data quantity and the preset data bit width by the first preset period, including: The product of the second data quantity and the preset data bit width is used as the real-time network bandwidth of the network module.

7. The video transmission method according to claim 1, characterized in that: A preset decision unit used in a baseboard management controller.

8. The video transmission method according to any one of claims 1 to 7, characterized in that: According to the real-time network bandwidth and the real-time code stream bandwidth, adjusting the data compression ratio of the compression module so that the real-time code stream bandwidth matches the real-time network bandwidth includes: According to the difference between the real-time network bandwidth and the real-time code stream bandwidth, the compression module is controlled to generate an update matrix so that the compression module adds a preset standard quantization table to the update matrix to obtain a target quantization table of the compression module, wherein the update matrix has the same size as the preset standard quantization table, and the target quantization table is used by the compression module to quantize the video data to be sent.

9. The video transmission method according to claim 8, characterized in that: According to the difference between the real-time network bandwidth and the real-time code stream bandwidth, controlling the compression module to generate an update matrix includes: When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, the compression module is controlled to reduce the current update weight by a preset step size, so that the compression module fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module; When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, the compression module is controlled to increase the current update weight by a preset step size, so that the compression module fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module; Among them, the update weight has a preset initial value.

10. The video transmission method according to claim 9, characterized in that: When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, controlling the compression module to reduce the current update weight by a preset step size comprises: When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, the reduction signal is set to a valid state and the expansion signal is set to an invalid state, so that the compression module reduces the current update weight by a preset step size in response to the valid state of the reduction signal; When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, controlling the compression module to increase the current update weight by a preset step size comprises: When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, the reduction signal is set to an invalid state and the expansion signal is set to a valid state, so that the compression module increases the current update weight by a preset step size in response to the valid state of the expansion signal; In response to the target quantization table update completion signal sent by the compression module, both the reduction signal and the expansion signal are set to an invalid state.

11. The video transmission method according to claim 8, characterized in that: According to the difference between the real-time network bandwidth and the real-time code stream bandwidth, controlling the compression module to generate an update matrix includes: When the difference between the real-time network bandwidth and the real-time code stream bandwidth is greater than zero, a target step length corresponding to the absolute value of the difference is generated according to a first corresponding relationship, wherein the first corresponding relationship is: a corresponding relationship between the absolute value of the difference and the target step length; Control the compression module to reduce the current update weight by the target step size, so that the compression module fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module; When the difference between the real-time network bandwidth and the real-time code stream bandwidth is less than zero, generating a target step size corresponding to the absolute value of the difference according to the first corresponding relationship; Control the compression module to increase the current update weight by the target step size, so that the compression module fills the latest update weight into each designated filling position in the all-zero matrix to obtain an update matrix, and adds the preset standard quantization table to the update matrix to obtain a target quantization table of the compression module; Among them, the update weight has a preset initial value.

12. The video transmission method according to claim 9, characterized in that: The area of ​​each designated filling bit in the all-zero matrix in the all-zero matrix is ​​the same as the value area in the quantization table used to discard high-frequency component information.

13. A video transmission device, characterized in that: include: A compression module, used for compressing video data to be sent; A cache module, used to cache compressed video data to be sent; A network module, used for sending the compressed video data to be sent through the network; A decision unit, used to implement the steps of the video transmission method as claimed in any one of claims 1 to 12.

14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the video transmission method according to any one of claims 1 to 12 are implemented.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the video transmission method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Method and device for controlling Motion JPEG coding rate

    CN106231341A

  • Video transmission device

    CN106488176A

  • Image transmission bandwidth matching method, equipment and system

    CN106851335A

  • Video coding method and device, equipment and storage medium

    CN117597920A