A method, system and medium for low-latency transmission of camera video
By obtaining network quality parameters and video richness and dynamically adjusting the amount of redundant data addition, the problem of unstable video transmission efficiency in the existing technology is solved, and more efficient video transmission is achieved.
Patent Information
- Application Number
- CN202411138785.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-08-19
AI Technical Summary
When the existing video transmission algorithm SRT faces instantaneous changes in network conditions, the video transmission efficiency may be unstable due to adjustment of the proportion of redundant data, especially when bandwidth is limited.
By obtaining the network quality parameters and the richness of the video at the current moment, we calculate the best redundant data addition parameters for the original video, and dynamically adjust the amount of redundant data addition to adapt to changes in network conditions.
It effectively avoids redundant data errors caused by network fluctuations, and improves the efficiency of video transmission and user experience.
Smart Images

Figure CN119182937B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission, and particularly to a method, system, and medium for low-latency transmission of camera videos. Background Art
[0002] A camera is a device used to capture videos and images, commonly used in fields such as surveillance, communication, security, and entertainment. In the transmission of videos and images, especially for scenarios that require real-time interaction, low-latency transmission is particularly important. Low-latency transmission refers to the ability of a video signal to be sent to the receiving end as soon as possible after being captured by the camera and decoded and displayed at the receiving end as soon as possible. Low-latency transmission is particularly crucial in fields such as video conferencing, online gaming, telemedicine, and virtual reality, as it can significantly reduce the latency time of signal transmission, thereby achieving a smoother and more real-time user experience. By optimizing transmission protocols, reducing encoding and decoding delays, and enhancing network bandwidth, etc., camera low-latency transmission technology can effectively improve the efficiency and quality of video communication, making remote communication and interaction more natural and efficient.
[0003] The existing video transmission algorithm SRT (Secure Reliable Transport) is an open-source video transmission protocol that is widely used in live streaming, remote production, and other streaming media transmission scenarios that require high reliability and security. This algorithm can dynamically adjust the proportion of redundant data according to the real-time changes of the network, thereby improving transmission efficiency and reliability. However, when increasing or decreasing redundant data, this algorithm may overreact due to instantaneous changes in network conditions, and when the richness of video content is different under limited bandwidth, the required number of redundant blocks is also different, thus affecting the video transmission efficiency at different times. Summary of the Invention
[0004] To solve the technical problems, the purpose of the present invention is to provide a method, system, and medium for low-latency transmission of camera videos, and the specific technical solutions adopted are as follows:
[0005] In the first aspect, a method for low-latency transmission of camera videos is provided. The transmission method is applied to a camera, and the transmission method includes:
[0006] Obtain the network quality parameters at the current moment;
[0007] Shoot the original video through the camera and obtain the richness of the original video;
[0008] Obtain the redundant data addition parameter for the original video according to the network quality coefficient and the richness;
[0009] Add redundant data to the original video according to the redundant data addition parameter to obtain the video to be transmitted;
[0010] Transmit the video to be transmitted to the video receiving end.
[0011] In a possible implementation, the obtaining of the network quality parameter at the current moment includes:
[0012] Obtain the network quality parameter through the formula where W n represents the network quality parameter at the current moment n, norm() represents the linear normalization function, m represents the number of network bandwidth time series data points collected at all moments since the network quality parameter was recorded, represents the average amplitude of the network bandwidth within the window corresponding to the current moment in the sliding window algorithm, represents the average amplitude of the network bandwidth within the windows corresponding to the remaining moments, c represents the size of the window where the current network moment bandwidth is located, u is a hyperparameter to prevent the denominator from being zero, and F ni represents the network bandwidth amplitude corresponding to the i-th data point within the window where the current moment network bandwidth is located.
[0013] In another possible implementation, the adding of redundant data to the original video according to the redundant data addition parameter to obtain the video to be transmitted includes:
[0014] Determine the parameters for forward FEC encoding of the original video according to the redundant data addition parameter, and encode the original video according to the parameters to obtain the video to be transmitted.
[0015] In another possible implementation, the shooting of the original video by the camera and the obtaining of the richness of the original video include:
[0016] Perform grayscale processing on each frame image of the original video to obtain a set of grayscale video frames formed by multiple grayscale video frames;
[0017] Obtain multiple grayscale values of the pixel points to be processed from the set of grayscale video frames, and obtain the grayscale value change parameter of the pixel points to be processed through a preset formula for obtaining grayscale value change parameters and the multiple grayscale values, where the pixel points to be processed are any pixel points in the original video;
[0018] Repeat the step of obtaining the grayscale value change parameter to obtain the grayscale value change parameters of all pixel points in the original video, forming a set of grayscale value change parameters;
[0019] Divide the set of gray value change parameters into a first cluster and a second cluster through a preset K-means clustering algorithm. The first cluster contains pixel points with gray value change parameters higher than a preset gray value change parameter threshold, and the second cluster contains pixel points with gray value change parameters lower than the gray value change parameter threshold;
[0020] Obtain an average first gray value change parameter and an average second gray value change parameter. The average first gray value change parameter is the average of the gray value change parameters in the first cluster, and the average second gray value change parameter is the average of the gray value change parameters in the second cluster;
[0021] Obtain the richness of the original video according to a preset richness acquisition formula and the average first gray value change parameter and the average second gray value change parameter.
[0022] In another possible implementation, the gray value change parameter acquisition formula is: where Q nl represents the gray value change parameter of the l-th pixel point in the video frame corresponding to the current moment n, R nl represents the gray change range of multiple gray values corresponding to the l-th pixel point in the video frame at the current moment n, H nL represents the L-th gray value in the gray value sequence formed by multiple gray values corresponding to the l-th pixel point in the video frame at the current moment n, H n(L+1) represents the (L + 1)-th gray value in the gray value sequence formed by multiple gray values corresponding to the l-th pixel point in the video frame at the current moment n, z n represents the total number of gray values in the gray value sequence corresponding to the l-th pixel point in the video frame at the current moment n.
[0023] In another possible implementation, the richness acquisition formula is: where Y n represents the richness of the video frame corresponding to the current moment n, m a is the number of pixel points in the first cluster, m b is the number of pixel points in the second cluster, is the average first gray value change parameter, is the average second gray value change parameter.
[0024] In another possible implementation, obtaining the redundant data addition parameter for the original video according to the network quality coefficient and the richness includes:
[0025] According to the formula Obtain the necessary degree coefficient of redundant data, where X n is the necessary degree coefficient of redundant data at the current moment n, W n is the network quality parameter at the current moment n, Y n is the richness at the current moment n;
[0026] According to the formula Obtain the redundant data addition parameter, where F n represents the network bandwidth amplitude at the current moment n, K n is the redundant data addition parameter at the current moment n, g n is the data size of the original video at the current moment n, and G is a control constant.
[0027] In a second aspect, a low-latency transmission system for camera videos is provided. The transmission system is applied to a camera and includes:
[0028] A network quality parameter acquisition module for acquiring the network quality parameter at the current moment;
[0029] A richness acquisition module for shooting an original video through the camera and acquiring the richness of the original video;
[0030] A redundant data addition parameter acquisition module for acquiring the redundant data addition parameter for the original video according to the network quality coefficient and the richness;
[0031] A video-to-be-transmitted acquisition module for adding redundant data to the original video according to the redundant data addition parameter to obtain a video to be transmitted;
[0032] A transmission module for transmitting the video to be transmitted to a video receiving end.
[0033] In a possible implementation manner, the richness acquisition module includes:
[0034] A grayscale video frame set acquisition unit for performing grayscale processing on each frame image of the original video to obtain a grayscale video frame set formed by multiple grayscale video frames;
[0035] A grayscale value change parameter acquisition unit for obtaining multiple grayscale values of a pixel point to be processed from the grayscale video frame set, and obtaining the grayscale value change parameter of the pixel point to be processed through a preset grayscale value change parameter acquisition formula and the multiple grayscale values, where the pixel point to be processed is any pixel point in the original video;
[0036] A grayscale value change parameter set acquisition unit is used to repeat the acquisition step of the grayscale value change parameters, acquire the grayscale value change parameters of all pixel points in the original video, and form a grayscale value change parameter set;
[0037] A partitioning unit is used to partition the grayscale value change parameter set into a first cluster and a second cluster by a preset K-means clustering algorithm. The first cluster contains pixel points with grayscale value change parameters higher than a preset grayscale value change parameter threshold, and the second cluster contains pixel points with grayscale value change parameters lower than the grayscale value change parameter threshold;
[0038] A grayscale value change parameter average value acquisition unit is used to acquire a first grayscale value change parameter average value and a second grayscale value change parameter average value. The first grayscale value change parameter average value is the average value of the grayscale value change parameters in the first cluster, and the second grayscale value change parameter average value is the average value of the grayscale value change parameters in the second cluster;
[0039] A richness acquisition unit is used to acquire the richness of the original video according to a preset richness acquisition formula and the first grayscale value change parameter average value and the second grayscale value change parameter average value.
[0040] In a third aspect, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the camera video low-latency transmission method provided in the first aspect.
[0041] The present invention has the following beneficial effects:
[0042] The optimal redundant data addition parameters for the original video are obtained through network quality parameters and video richness, which not only avoids errors in redundant data caused by network fluctuations, but also improves the video transmission efficiency and enhances the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0044] Figure 1 It is a flowchart of a camera video low-latency transmission method provided by an embodiment of the present invention;
[0045] Figure 2 It is a flowchart of a camera video low-latency transmission method provided by another embodiment of the present invention;
[0046] Figure 3 The structural diagram of a camera video low-latency transmission system provided by an embodiment of the present invention;
[0047] Figure 4 The schematic physical structure diagram of an electronic device provided by the present invention. Detailed implementation manners
[0048] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details a data management method based on hierarchical data circulation proposed by the present invention, including its specific implementation manners, structures, features and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0050] The following specifically describes the specific solution of a camera video low-latency transmission method provided by the present invention with reference to the accompanying drawings.
[0051] Please refer to Figure 1 , which shows the method flow chart of the camera video low-latency transmission method provided by an embodiment of the present invention, applied to a camera. The transmission method includes:
[0052] Step S101, obtaining network quality parameters at the current moment;
[0053] Step S102, shooting an original video through the camera and obtaining the richness of the original video;
[0054] Step S103, obtaining redundant data addition parameters for the original video according to the network quality coefficient and the richness;
[0055] Step S104, adding redundant data to the original video according to the redundant data addition parameters to obtain a video to be transmitted;
[0056] Step S105, transmitting the video to be transmitted to a video receiving end.
[0057] In step S101, the original video is the video directly captured by the camera. Since this video has not been processed later, it is called the original video. The richness of the original video is the richness of the multiple pictures that make up the original video. The richness is the degree of change of the pixel points at the same position in different images. That is, the higher the degree of change, the higher the richness; the lower the degree of change, the lower the richness.
[0058] For the network quality parameters, the data acquisition module set in the camera is used to collect the network parameters at the current moment. Among them, the data acquisition module can be an SNMP (Simple Network Management Protocol) network monitoring tool. The collected network parameters are input into a preset network quality parameter acquisition formula to obtain the corresponding network quality parameters.
[0059] Specifically, obtaining the network quality parameters at the current moment includes:
[0060] Through the formula Obtain the network quality parameters, where W n Represents the network quality parameter at the current moment n, norm() represents the linear normalization function, m represents the number of network bandwidth time series data points collected at all moments since the network quality parameters were recorded, Represents the average amplitude of the network bandwidth within the window corresponding to the current moment in the sliding window algorithm, Represents the average amplitude of the network bandwidth within the windows corresponding to the other moments, c represents the size of the window where the current network moment bandwidth is located, u is a hyperparameter to prevent the denominator from being 0, u = 0.01, F ni Represents the network bandwidth amplitude corresponding to the i-th data point within the window where the current moment network bandwidth is located.
[0061] In the network quality parameter acquisition formula, Represents the average value of the ratio of the average amplitude of the network bandwidth within the window corresponding to the current moment to the average amplitude of the network bandwidth within each of the windows corresponding to the other moments. The larger this average value, the better the network bandwidth quality at the current moment compared to the network bandwidth quality at other moments; Represents the average value of the absolute value of the difference between the network bandwidth amplitude corresponding to each data point within the window where the current moment network bandwidth is located and the average network bandwidth value within the window corresponding to the current moment. The smaller this average value, The larger the value, the more stable the local network bandwidth at the current moment, and the better the network quality.
[0062] In step S103, according to the formula Obtain the coefficient of the necessity of redundant data, where X nis the coefficient of the necessity degree of redundant data at the current moment n, W n is the network quality parameter at the current moment n, Y n is the richness at the current moment n; then according to the formula obtain the redundant data addition parameter, where F n represents the network bandwidth amplitude at the current moment n, K n is the redundant data addition parameter at the current moment n, g n is the data size of the original video at the current moment n, and G is a control constant.
[0063] is the ratio of the network bandwidth amplitude at the current moment n to the data size of the original video. The larger this ratio is, the larger the remaining space of the network bandwidth amplitude at the current moment is. Then, adding redundant data will not cause network bandwidth tension, and thus the transmission rate of the original video can be improved.
[0064] In step S104, determine the encoding parameters for performing FEC (forward error correction) encoding on the original video according to the redundant data addition parameter, and then implement FEC encoding on the original video according to the encoding parameters to obtain the video to be transmitted. Among them, the encoding parameters include but are not limited to: the size of the transmission data blocks into which the original video is divided, and the number of redundant data blocks.
[0065] Specifically, the formula for obtaining the number of redundant data blocks is: where represents the ceiling symbol, M is the number of redundant data blocks, A is the number of transmission data blocks into which the original video is divided, K n is the redundant data addition parameter at the current moment n.
[0066] Specifically, the formula for obtaining the size of the transmission data blocks is: P = D × N, where P is the size of the transmission data blocks, D is the size of the unit data block, and N is the number of unit data blocks that can be transmitted determined according to the network conditions. Among them, the formula for obtaining the size of the unit data block is: D = B × (1 + C), where D is the size of the unit data block, B is the data volume size of the video frame, C is the additional consumption during the transmission of the transmission data blocks, which is usually related to the header information of the transmission data blocks, and C is in the form of a percentage. Among them, the formula for obtaining the data volume size of the video frame is:
[0067] For example: Suppose the redundant data addition parameter is 0.2, and the original video is divided into 4 transmission data blocks. Then the number of redundant data blocks is 0.2 × 4 = 0.8. According to the principle of rounding up, the number of redundant data blocks is finally determined to be 1.
[0068] In an embodiment of the present invention, network quality parameters at the current moment are obtained; an original video is captured by the camera, and the richness of the original video is obtained; redundancy data addition parameters for the original video are obtained according to the network quality coefficient and the richness; redundancy data is added to the original video according to the redundancy data addition parameters to obtain a video to be transmitted; and the video to be transmitted is transmitted to a video receiving end. By obtaining the optimal redundancy data addition parameters for the original video through network quality parameters and video richness, not only is the error of redundancy data caused by network fluctuations avoided, but also the video transmission efficiency is improved, and the user experience is enhanced.
[0069] As Figure 2 shown is a flowchart of a method for low-latency transmission of camera video provided by another embodiment of the present invention. The step of capturing the original video by the camera and obtaining the richness of the original video includes:
[0070] Step S201: Perform grayscale processing on each frame image of the original video to obtain a set of grayscale video frames formed by multiple grayscale video frames;
[0071] Step S202: Obtain multiple grayscale values of a pixel point to be processed from the set of grayscale video frames, and obtain the grayscale value change parameter of the pixel point to be processed through a preset formula for obtaining grayscale value change parameters and the multiple grayscale values, where the pixel point to be processed is any pixel point in the original video;
[0072] Step S203: Repeat the step of obtaining the grayscale value change parameter to obtain the grayscale value change parameters of all pixel points in the original video, forming a set of grayscale value change parameters;
[0073] Step S204: Divide the set of grayscale value change parameters into a first cluster and a second cluster through a preset K-means clustering algorithm. The first cluster includes pixel points with grayscale value change parameters higher than a preset grayscale value change parameter threshold, and the second cluster includes pixel points with grayscale value change parameters lower than the grayscale value change parameter threshold;
[0074] Step S205: Obtain a first average grayscale value change parameter and a second average grayscale value change parameter. The first average grayscale value change parameter is the average of the grayscale value change parameters in the first cluster, and the second average grayscale value change parameter is the average of the grayscale value change parameters in the second cluster;
[0075] Step S206: Obtain the richness of the original video according to a preset formula for obtaining richness and the first average grayscale value change parameter and the second average grayscale value change parameter.
[0076] In the embodiment of the present invention, performing grayscale processing on the original video means performing grayscale processing on each frame image in the original video. What is obtained after performing grayscale processing on the image is the grayscale image, and multiple grayscale images form a grayscale video frame set. Arbitrarily select a pixel point from the grayscale video frame set, that is, the pixel point to be processed, and obtain the grayscale values of the pixel point to be processed in different grayscale video frames, so as to obtain multiple grayscale values of the pixel point to be processed. Arrange these multiple grayscale values in the arrangement order of the video frames, so as to obtain a grayscale value sequence, and input the grayscale value sequence into a preset grayscale value change parameter acquisition formula to obtain the corresponding grayscale value change parameter.
[0077] The above is the acquisition step of the grayscale value change parameter of a pixel point. Repeating this acquisition step can obtain the grayscale value change parameters of all pixel points in a frame of grayscale video frame, that is, the grayscale value change parameter set. Classify the grayscale value change parameter set into a first type of cluster and a second type of cluster through a preset K-means clustering algorithm. Among them, the first type of cluster contains pixel points with grayscale value change parameters higher than the preset grayscale value change parameter threshold, and the second type of cluster contains pixel points with grayscale value change parameters lower than the preset grayscale value change parameter threshold. The grayscale value change parameter threshold can be set according to actual needs, and the present application does not limit this.
[0078] After classification, respectively obtain the average value of the grayscale value change parameters of the first type of cluster and the average value of the grayscale value change parameters of the second type of cluster, that is, the first grayscale value change parameter average value and the second grayscale value change parameter average value. Input the first grayscale value change parameter average value and the second grayscale value change parameter average value into a preset richness acquisition formula respectively, and the richness of the corresponding video frame can be obtained.
[0079] The grayscale value change parameter acquisition formula is: Among them, Q nl represents the grayscale value change parameter of the l-th pixel point in the video frame corresponding to the current moment n, R nl represents the grayscale change range of multiple grayscale values corresponding to the l-th pixel point in the video frame at the current moment n, that is, the difference between the maximum value and the minimum value among all grayscale values, H nL represents the L-th grayscale value in the grayscale value sequence formed by multiple grayscale values corresponding to the l-th pixel point in the video frame at the current moment n, H n(L+1) represents the (L + 1)-th grayscale value in the grayscale value sequence formed by multiple grayscale values corresponding to the l-th pixel point in the video frame at the current moment n, z n represents the total number of grayscale values in the grayscale value sequence corresponding to the l-th pixel point in the video frame at the current moment n.
[0080] In the grayscale value transformation parameter acquisition formula, It represents the average value of the absolute value of the difference in gray values of the l-th pixel in the video frame corresponding to the current moment n between adjacent video frames. The larger this average value is, the greater the degree of gray value change of the pixel l in consecutive video frames.
[0081] The richness acquisition formula is as follows: Among them, Y n represents the richness of the video frame corresponding to the current moment n, and m a is the number of pixels in the first type of cluster, and m b is the number of pixels in the second type of cluster. is the average value of the first gray value change parameter. is the average value of the second gray value change parameter.
[0082] In the richness acquisition formula, represents the ratio of the number of pixels in the first type of cluster to the total number of pixels. The larger this ratio is, the higher the richness of the current video frame; is the ratio of the average value of the first gray value change parameter to the average value of the second gray value change parameter, which represents the difference in the degree of change between the changing content and the background content. The larger this ratio is, the higher the richness of the current video frame.
[0083] Such as Figure 3 As shown, it is the structural diagram of the camera video low-latency transmission system provided by an embodiment of the present invention. The transmission system uses a camera, and the transmission system includes:
[0084] A network quality parameter acquisition module 301, configured to acquire the network quality parameter at the current moment;
[0085] A richness acquisition module 302, configured to shoot an original video through the camera and acquire the richness of the original video;
[0086] A redundant data addition parameter acquisition module 303, configured to acquire the redundant data addition parameter for the original video according to the network quality coefficient and the richness;
[0087] A video to be transmitted acquisition module 304, configured to add redundant data to the original video according to the redundant data addition parameter to obtain the video to be transmitted;
[0088] A transmission module 305, configured to transmit the video to be transmitted to the video receiving end.
[0089] Among them, the richness acquisition module 302 includes:
[0090] A grayscale video frame set acquisition unit is configured to perform grayscale processing on each frame image of the original video to obtain a grayscale video frame set formed by multiple grayscale video frames;
[0091] A grayscale value change parameter acquisition unit is configured to obtain multiple grayscale values of a pixel point to be processed from the grayscale video frame set, and obtain the grayscale value change parameter of the pixel point to be processed through a preset grayscale value change parameter acquisition formula and the multiple grayscale values, where the pixel point to be processed is any pixel point in the original video;
[0092] A grayscale value change parameter set acquisition unit is configured to repeat the acquisition step of the grayscale value change parameter to obtain the grayscale value change parameters of all pixel points in the original video, and form a grayscale value change parameter set;
[0093] A division unit is configured to divide the grayscale value change parameter set into a first cluster and a second cluster by a preset K-means clustering algorithm, where the first cluster includes pixel points with grayscale value change parameters higher than a preset grayscale value change parameter threshold, and the second cluster includes pixel points with grayscale value change parameters lower than the grayscale value change parameter threshold;
[0094] A grayscale value change parameter average acquisition unit is configured to obtain a first grayscale value change parameter average and a second grayscale value change parameter average, where the first grayscale value change parameter average is the average of the grayscale value change parameters in the first cluster, and the second grayscale value change parameter average is the average of the grayscale value change parameters in the second cluster;
[0095] A richness acquisition unit is configured to obtain the richness of the original video according to a preset richness acquisition formula and the first grayscale value change parameter average and the second grayscale value change parameter average.
[0096] Figure 4 An example of a schematic physical structure diagram of an electronic device is shown in Figure 4As shown, the electronic device may include: a processor 401, a communications interface 403, a memory 402, and a communication bus 404. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus. The processor can call the logical instructions in the memory to execute a method for low-latency transmission of camera video. The transmission method includes: obtaining the network quality parameters at the current moment; capturing an original video through the camera and obtaining the richness of the original video; obtaining the redundant data addition parameter for the original video according to the network quality coefficient and the richness; adding redundant data to the original video according to the redundant data addition parameter to obtain a video to be transmitted; and transmitting the video to be transmitted to a video receiving end.
[0097] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0098] On the other hand, an embodiment of the present invention further provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a method for low-latency transmission of camera video provided by each of the above method embodiments. The transmission method includes: obtaining the network quality parameters at the current moment; capturing an original video through the camera and obtaining the richness of the original video; obtaining the redundant data addition parameter for the original video according to the network quality coefficient and the richness; adding redundant data to the original video according to the redundant data addition parameter to obtain a video to be transmitted; and transmitting the video to be transmitted to a video receiving end.
[0099] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a method for low-latency transmission of camera video provided in the above embodiments. The transmission method includes: obtaining network quality parameters at the current moment; shooting an original video through the camera and obtaining the richness of the original video; obtaining redundant data addition parameters for the original video according to the network quality coefficient and the richness; adding redundant data to the original video according to the redundant data addition parameters to obtain a video to be transmitted; and transmitting the video to be transmitted to a video receiving end.
[0100] It should be noted that the above sequence of embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0101] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A low-delay transmission method for camera video, the transmission method is applied to a camera, characterized in that: The transmission method comprises: Get the network quality parameters at the current moment; Shooting an original video through the camera and obtaining the richness of the original video; Acquire redundant data adding parameters of the original video according to the network quality parameter and the richness; Adding redundant data to the original video according to the redundant data adding parameter to obtain a video to be transmitted; Transmitting the video to be transmitted to a video receiving end; The obtaining of redundant data adding parameters of the original video according to the network quality parameter and the richness includes: According to the formula Obtain the necessary degree coefficient of redundant data, where: is the necessary degree coefficient of redundant data at the current time n, is the network quality parameter at the current time n, is the richness at the current moment n; According to the formula Get redundant data adding parameters, where: Indicates the network bandwidth amplitude of n at the current time, Add parameters for the redundant data at the current time n, is the data size of the original video at the current moment n, and G is the control constant.
2. The camera video low-delay transmission method according to claim 1, characterized in that: The obtaining of the network quality parameters at the current moment includes: By formula The network quality parameter is obtained, wherein: represents the network quality parameter at the current time n, norm() represents the linear normalization function, and m represents the number of network bandwidth time series data points collected at all times since the network quality parameter was recorded. Indicates the average amplitude of the network bandwidth in the window corresponding to the current moment in the sliding window algorithm. represents the average amplitude of the network bandwidth in the window corresponding to the rest of the time, c represents the size of the window corresponding to the current time, and u is a hyperparameter to prevent the denominator from being 0. Indicates the network bandwidth amplitude corresponding to the i-th data point in the window corresponding to the current moment.
3. The camera video low-delay transmission method according to claim 1, characterized in that: The adding redundant data to the original video according to the redundant data adding parameter to obtain the video to be transmitted includes: Parameters for performing forward FEC encoding on the original video are determined according to the redundant data adding parameters, and the original video is encoded according to the parameters to obtain the video to be transmitted.
4. The camera video low-delay transmission method according to any one of claims 1 to 3, characterized in that: The step of shooting the original video by the camera and obtaining the richness of the original video includes: Performing grayscale processing on each frame of the original video to obtain a grayscale video frame set formed by multiple grayscale video frames; Acquire multiple grayscale values of the pixel to be processed from the grayscale video frame set, and acquire the grayscale value change parameter of the pixel to be processed by a preset grayscale value change parameter acquisition formula and the multiple grayscale values, wherein the pixel to be processed is any pixel in the original video; Repeat the gray value change parameter acquisition step to acquire the gray value change parameters of all pixels in the original video to form a gray value change parameter set; The grayscale value change parameter set is divided into a first cluster and a second cluster by a preset K-means clustering algorithm, wherein the first cluster includes pixel points whose grayscale value change parameters are higher than a preset grayscale value change parameter threshold, and the second cluster includes pixel points whose grayscale value change parameters are lower than the grayscale value change parameter threshold; Obtaining a first gray value change parameter average value and a second gray value change parameter average value, wherein the first gray value change parameter average value is the average value of the gray value change parameters in the first cluster, and the second gray value change parameter average value is the average value of the gray value change parameters in the second cluster; Obtaining the richness of the original video according to a preset richness acquisition formula and the first gray value change parameter average value and the second gray value change parameter average value; The gray value change parameter acquisition formula is: ,in, Indicates the gray value change parameter of the lth pixel in the video frame corresponding to the current time n, Indicates the grayscale variation range of multiple grayscale values corresponding to the lth pixel in the video frame at the current time n, Indicates the first pixel in the grayscale value sequence composed of multiple grayscale values corresponding to the lth pixel in the video frame at the current time n. Gray value, Indicates the first pixel in the grayscale value sequence composed of multiple grayscale values corresponding to the lth pixel in the video frame at the current time n. Gray value, Represents the total number of gray values in the gray value sequence corresponding to the l-th pixel in the video frame at the current time n; The richness acquisition formula is: ,in, Indicates the richness of the video frame corresponding to the current moment n, is the number of pixels in the first cluster, is the number of pixels in the second type of cluster, is the average value of the first gray value variation parameter, is the average value of the second gray value variation parameter.
5. A low-latency transmission system for camera video, the transmission system is applied to a camera, characterized in that: The transmission system comprises: A network quality parameter acquisition module is used to obtain the network quality parameters at the current moment; A richness acquisition module, used to shoot the original video through the camera and acquire the richness of the original video; A redundant data adding parameter acquisition module, used for acquiring redundant data adding parameters of the original video according to the network quality parameter and the richness; A module for acquiring video to be transmitted, used for adding redundant data to the original video according to the redundant data adding parameter to acquire the video to be transmitted; A transmission module, used for transmitting the video to be transmitted to a video receiving end; The obtaining of redundant data adding parameters of the original video according to the network quality parameter and the richness includes: According to the formula Obtain the necessary degree coefficient of redundant data, where: is the necessary degree coefficient of redundant data at the current time n, is the network quality parameter at the current time n, is the richness at the current moment n; According to the formula Get redundant data adding parameters, where: Indicates the network bandwidth amplitude of n at the current time, Add parameters for the redundant data at the current time n, is the data size of the original video at the current moment n, and G is the control constant.
6. The camera video low-latency transmission system as claimed in claim 5, characterized in that: The richness acquisition module includes: A grayscale video frame set acquisition unit, configured to perform grayscale processing on each frame of the original video to acquire a grayscale video frame set formed by a plurality of grayscale video frames; A grayscale value change parameter acquisition unit, used to acquire multiple grayscale values of the pixel point to be processed from the grayscale video frame set, and acquire the grayscale value change parameter of the pixel point to be processed by a preset grayscale value change parameter acquisition formula and the multiple grayscale values, wherein the pixel point to be processed is any pixel point in the original video; A gray value change parameter set acquisition unit, used to repeat the gray value change parameter acquisition step to acquire the gray value change parameters of all pixels in the original video to form a gray value change parameter set; A division unit, used to divide the gray value change parameter set into a first cluster and a second cluster by a preset K-means clustering algorithm, wherein the first cluster includes pixel points whose gray value change parameters are higher than a preset gray value change parameter threshold, and the second cluster includes pixel points whose gray value change parameters are lower than the gray value change parameter threshold; a grayscale value change parameter average value obtaining unit, used to obtain a first grayscale value change parameter average value and a second grayscale value change parameter average value, wherein the first grayscale value change parameter average value is an average value of the grayscale value change parameters in the first cluster, and the second grayscale value change parameter average value is an average value of the grayscale value change parameters in the second cluster; A richness acquisition unit, used to acquire the richness of the original video according to a preset richness acquisition formula and the first gray value change parameter average value and the second gray value change parameter average value; The gray value change parameter acquisition formula is: ,in, Indicates the gray value change parameter of the lth pixel in the video frame corresponding to the current time n, Indicates the grayscale variation range of multiple grayscale values corresponding to the lth pixel in the video frame at the current time n, Indicates the first pixel in the grayscale value sequence composed of multiple grayscale values corresponding to the lth pixel in the video frame at the current time n. Gray value, Indicates the first pixel in the grayscale value sequence composed of multiple grayscale values corresponding to the lth pixel in the video frame at the current time n. Gray value, Represents the total number of gray values in the gray value sequence corresponding to the l-th pixel in the video frame at the current time n; The richness acquisition formula is: ,in, Indicates the richness of the video frame corresponding to the current moment n, is the number of pixels in the first cluster, is the number of pixels in the second type of cluster, is the average value of the first gray value variation parameter, is the average value of the second gray value variation parameter.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the low-latency transmission method for camera video as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Moving image transmitter
JP2009212842A