Digital video signal low-delay encoding and decoding method, device, equipment and storage medium
By dividing the video signal into video segments and synchronously encoding and decoding between the acquisition and display modules, the problem of video signal encoding and decoding delay in the existing technology is solved, and a low-latency video surveillance system is realized.
Patent Information
- Application Number
- CN202410891512.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-10-08
AI Technical Summary
The existing digital video signal encoding and decoding system has delay problems, which affects the real-time performance and efficiency of the video surveillance system.
By dividing the video signal into video segment information, using the acquisition module for encoding and compression, and sending it to the display module through the network transmitter for decoding and display, it ensures that the pixel clocks of the acquisition module and the display module are synchronized and reduces delay.
It realizes low-latency encoding and decoding of video signals, reduces the delay in the encoding and decoding process, and improves the real-time performance and efficiency of the video surveillance system.
Smart Images

Figure CN118748734A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video signal encoding and decoding technology, and in particular to a low-latency encoding and decoding method, device, equipment and storage medium for digital video signals. Background Art
[0002] With the development of digital technology, traditional analog video signal processing methods are gradually being replaced by digital video signal processing methods, which is particularly evident in the field of video surveillance. In contrast, digital video surveillance has the advantages of low transmission bandwidth, easy storage and management, convenient encryption and content protection, and low implementation cost.
[0003] The key part of the digital video surveillance system lies in the encoding compression and decoding decompression processing of digital video signals. The collected digital video signals usually use H.26X or MPEG-X series encoding standards, are transmitted through the network, and are decoded and displayed at the receiving end. The video surveillance system of traditional encoding and decoding devices usually consists of camera devices, collectors, encoders, network transmitters, network equipment, network receivers, decoders, displays and display screens. The entire operation process involves the acquisition, encoding, transmission, decoding and display of video signals, which will introduce a certain delay.
[0004] In summary, the problems existing in the prior art need to be solved urgently. Summary of the invention
[0005] The present invention provides a low-delay encoding and decoding method, device, equipment and storage medium for digital video signals, so as to solve the defects in the prior art and realize low-delay encoding and decoding of video signals.
[0006] The present invention provides a low-delay encoding and decoding method for a digital video signal, comprising:
[0007] Get the video information to be displayed;
[0008] Segmenting the video information to be displayed to obtain several groups of video segment information;
[0009] By means of a collection module, a group of video clip information is encoded and compressed;
[0010] Sending the compressed video clip information to the display module via a network transmitter;
[0011] Decoding and displaying the video clip information through the display module;
[0012] Returning to the step of encoding and compressing a group of the video segment information through the acquisition module until all the video segment information is decoded;
[0013] The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
[0014] According to a low-latency encoding and decoding method for digital video signals provided by the present invention, the video segment information consists of 8 lines of video pixel dot matrix.
[0015] According to a low-latency encoding and decoding method for digital video signals provided by the present invention, there is an interval time between a start signal of the acquisition module and a start signal of the display module.
[0016] According to a low-delay encoding and decoding method for digital video signals provided by the present invention, the interval time is determined according to the decoding time and the display time.
[0017] The present invention also provides a low-delay encoding and decoding device for a digital video signal, comprising:
[0018] An information acquisition unit, used to acquire video information to be displayed;
[0019] A video segmentation unit, used for segmenting the video information to be displayed to obtain a plurality of groups of video segment information;
[0020] A coding and compression unit, used for coding and compressing a group of video clip information through a collection module;
[0021] An information sending unit, used for sending the compressed video clip information to the display module through a network sender;
[0022] A decoding and displaying unit, configured to decode and display the video segment information through the display module;
[0023] Returning to the encoding compression unit until all video segment information is decoded;
[0024] The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
[0025] According to a low-latency encoding and decoding device for digital video signals provided by the present invention, the video segment information is composed of 8 lines of video pixel matrix.
[0026] According to a low-latency encoding and decoding device for digital video signals provided by the present invention, there is an interval time between a start signal of the acquisition module and a start signal of the display module.
[0027] According to a low-latency encoding and decoding device for digital video signals provided by the present invention, the interval time is determined according to the decoding time and the display time.
[0028] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a low-latency encoding and decoding method for a digital video signal as described above is implemented.
[0029] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the low-latency encoding and decoding method for a digital video signal as described in any one of the above is implemented.
[0030] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the low-latency encoding and decoding method for a digital video signal as described above is implemented.
[0031] The low-latency encoding and decoding method, device, equipment and storage medium of digital video signals provided by the present invention obtain video information to be displayed; divide the video information to be displayed to obtain several groups of video clip information; encode and compress a group of the video clip information through an acquisition module; send the compressed video clip information to a display module through a network transmitter; decode and display the video clip information through the display module until all the video clip information is decoded. The present invention uses the video pixel matrix in a video screen as the operation unit for encoding and decoding, realizes acquisition, encoding, decoding and display synchronization, thereby reducing the delay of digital video signal encoding and decoding, and the pixel clock of the acquisition module is synchronized with the pixel clock of the display module, which can further shorten the delay of encoding and decoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 It is a flowchart of a low-latency encoding and decoding method for digital video signals provided by the present invention;
[0034] Figure 2 It is a synchronization relationship diagram of the acquisition module and the display module provided by the present invention;
[0035] Figure 3 It is a structural schematic diagram of a low-latency encoding and decoding device for digital video signals provided by the present invention;
[0036] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0038] In order to solve the problems in the prior art, the present invention proposes a low-delay coding and decoding method for digital video signals to achieve low-delay coding and decoding of video signals. The low-delay coding and decoding of digital video signals is described below. Figure 1 As shown, including but not limited to the following steps:
[0039] Step 110: Obtain video information to be displayed.
[0040] First, the video information to be displayed is obtained through a camera device, which can be a camera, a smart phone, a surveillance camera, etc. These devices transmit the real-time captured video signals to the system for processing.
[0041] Step 120: Segment the video information to be displayed to obtain several groups of video segment information.
[0042] The acquired video information is segmented by the video segmentation module, which divides the continuous video signal into several groups of video clip information. The segmentation is based on the video pixel matrix. Each group of video clip information after segmentation will be stored in a temporary cache for subsequent processing.
[0043] Step 130: Encode and compress a group of the video clip information through a collection module.
[0044] Each group of segmented video clip information is encoded and compressed by the acquisition module. The acquisition module contains a video encoder, which compresses the video clips using video encoding standards such as H.264, H.265 or MPEG-4. The encoded and compressed video clip data is stored in the encoding buffer, waiting for transmission.
[0045] The specific steps include:
[0046] A sequence of video clip frames is input into a video encoder.
[0047] The encoder compresses the frame sequence to generate an encoded bit stream.
[0048] Store the encoded bitstream into the encoding buffer.
[0049] Step 140: Send the compressed video segment information to the display module via a network transmitter.
[0050] The encoded and compressed video clip information is transmitted to the display module through a network transmitter. The network transmitter can use a wired local area network for data transmission. In order to ensure the real-time and reliability of the transmission, the transmission control protocol (TCP) or the user datagram protocol (UDP) can be used for data transmission.
[0051] The specific steps include:
[0052] Read the compressed video segment from the encoding buffer.
[0053] The video segment data is packaged and transmitted over the network by the network sender.
[0054] The network receiver receives the video segment data packets at the display module end and stores them in a receiving buffer.
[0055] Step 150: Decode and display the video segment information through the display module. Return to the step of encoding and compressing a group of the video segment information through the acquisition module until all the video segment information is decoded. The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
[0056] The video clip information transmitted to the display module is decoded by a decoder, and the decoded video clip is restored to a displayable image signal. The display module outputs the decoded image signal to a display device to complete the video display.
[0057] The specific steps include:
[0058] Read the compressed bit stream from the receive buffer.
[0059] The decoder decodes the bit stream and restores it to a sequence of video frames.
[0060] Transfer the decoded frame sequence to the display buffer.
[0061] The display device reads the frame sequence from the display buffer and displays it frame by frame.
[0062] Then, it returns to the encoding and compression step to process the next set of video clip information until all video clip information is encoded, compressed, transmitted, decoded and displayed. In order to ensure that the pixel clock of the acquisition module is synchronized with the pixel clock of the display module, a synchronization signal (such as a synchronization pulse signal) can be used to synchronize the clocks of the two modules to avoid video playback freezes or delays caused by clock asynchronization.
[0063] It is understandable that video acquisition is an uninterrupted process and will not be paused due to inability to handle operations such as encoding and network transmission. Encoding is processed on a per-slice basis. In order to prevent the loss of captured video data during encoding, we will cache the video data. The encoder will detect whether there is enough data for a slice in the cache. If there is enough data in the cache, it will be encoded. The encoding speed is faster than the speed of video acquisition. Generally speaking, the amount of cached data will not exceed one slice.
[0064] Similarly, display output is also an uninterrupted process, and the display will not be paused because the codec is too late to process. The decoded fragments will be stored in the frame buffer in units of frames in pixel order. After the display module starts displaying, it will read and display in units of pixel lines, regardless of whether the data in the buffer is valid data updated into the buffer after decoding. In order to ensure that the displayed data is the latest data after decoding, we need to cache enough data before displaying it, so there is an interval between the start signal of the display acquisition module and the start signal of the display module. This interval is the total delay from acquisition to display.
[0065] The low-latency encoding and decoding method for digital video signals provided by the present invention obtains video information to be displayed; divides the video information to be displayed to obtain several groups of video clip information; encodes and compresses a group of the video clip information through an acquisition module; sends the compressed video clip information to a display module through a network transmitter; and decodes and displays the video clip information through the display module until all the video clip information is decoded. The present invention uses the video pixel matrix in a video screen as the operation unit for encoding and decoding, realizes acquisition, encoding, decoding and display synchronization, thereby reducing the delay of digital video signal encoding and decoding, and the pixel clock of the acquisition module is synchronized with the pixel clock of the display module, which can further shorten the delay of encoding and decoding.
[0066] According to a low-latency encoding and decoding method for digital video signals provided by the present invention, the video segment information consists of 8 lines of video pixel dot matrix.
[0067] Specifically, the continuous video signal is divided into several groups of video segment information, each group of video segment information is composed of 8 lines of video pixel matrix, and each group of video segment information after division is stored in a temporary buffer for subsequent processing.
[0068] According to a low-latency encoding and decoding method for digital video signals provided by the present invention, there is an interval time between a start signal of the acquisition module and a start signal of the display module.
[0069] According to a low-delay encoding and decoding method for digital video signals provided by the present invention, the interval time is determined according to the decoding time and the display time.
[0070] Specifically, the decoding device in the present invention does not start displaying after the decoder completes the decoding of the entire video screen, but stores the video screen after group decoding in the frame buffer, and starts displaying once the display module receives the frame synchronization signal vsync_decoder. Vsync_decoder is obtained by the vsync_encoder delay tm, where the value range of tm is greater than or equal to 0, but less than 1 frame. The specific value of tm is determined by the decoding time of the decoder and the display time of the display. It is very important to set the value of tm reasonably. If tm is set too small, when the display needs to display the next group of N rows of video pixel dot matrix, the decoder may not have completed the decoding of this group of N rows of video pixel dot matrix. The decoder device of the present invention can ensure that the time for decoding N rows of video pixel dot matrix is less than the time for the display to display N rows of video pixel dot matrix, so tm is set to half a frame. Those skilled in the art can set a reasonable tm value according to the proportional relationship between the operation time of the decoder and the display to ensure that the display and decoding work normally. Through the above-mentioned operation method, the operation steps in the traditional encoding and decoding device can be merged so that the total delay td of the device of the present invention is equal to tm.
[0071] The low-latency encoding and decoding device for digital video signals provided by the present invention is described below. Figure 3 As shown, the low-latency encoding and decoding device for digital video signals described below and the low-latency encoding and decoding method for digital video signals described above can refer to each other.
[0072] A low-delay encoding and decoding device for digital video signals, comprising:
[0073] The information acquisition unit 310 is used to acquire the video information to be displayed;
[0074] The video segmentation unit 320 is used to segment the video information to be displayed to obtain a plurality of groups of video segment information;
[0075] The coding and compression unit 330 is used to code and compress a group of video clip information through the acquisition module;
[0076] An information sending unit 340, configured to send the compressed video segment information to the display module via a network sender;
[0077] A decoding and displaying unit 350, configured to decode and display the video segment information through the display module;
[0078] Returning to the encoding compression unit until all video segment information is decoded;
[0079] The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
[0080] As a further optional embodiment, the video segment information consists of 8 lines of video pixel matrix.
[0081] As a further optional embodiment, there is an interval time between the start signal of the acquisition module and the start signal of the display module.
[0082] As a further optional embodiment, the interval time is determined according to the decoding time and the display time.
[0083] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the low-latency encoding and decoding method for digital video signals, and the method includes:
[0084] Get the video information to be displayed;
[0085] Segmenting the video information to be displayed to obtain several groups of video segment information;
[0086] By means of a collection module, a group of video clip information is encoded and compressed;
[0087] Sending the compressed video clip information to the display module via a network transmitter;
[0088] Decoding and displaying the video clip information through the display module;
[0089] Returning to the step of encoding and compressing a group of the video segment information through the acquisition module until all the video segment information is decoded;
[0090] The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
[0091] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-On l yMemory), a random access memory (RAM, Random Access Memory), a disk or an optical disk.
[0092] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the low-latency encoding and decoding method for digital video signals provided by the above methods, the method comprising:
[0093] Get the video information to be displayed;
[0094] Segmenting the video information to be displayed to obtain several groups of video segment information;
[0095] By means of a collection module, a group of video clip information is encoded and compressed;
[0096] Sending the compressed video clip information to the display module via a network transmitter;
[0097] Decoding and displaying the video clip information through the display module;
[0098] Returning to the step of encoding and compressing a group of the video segment information through the acquisition module until all the video segment information is decoded;
[0099] The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
[0100] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the low-latency encoding and decoding method for digital video signals provided by the above methods, the method comprising:
[0101] Get the video information to be displayed;
[0102] Segmenting the video information to be displayed to obtain several groups of video segment information;
[0103] By means of a collection module, a group of video clip information is encoded and compressed;
[0104] Sending the compressed video clip information to the display module via a network transmitter;
[0105] Decoding and displaying the video clip information through the display module;
[0106] Returning to the step of encoding and compressing a group of the video segment information through the acquisition module until all the video segment information is decoded;
[0107] The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
[0108] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A low-latency encoding and decoding method for digital video signals, characterized in that: include: Get the video information to be displayed; Segmenting the video information to be displayed to obtain several groups of video segment information; By means of a collection module, a group of video clip information is encoded and compressed; Sending the compressed video clip information to the display module via a network transmitter; Decoding and displaying the video clip information through the display module; Returning to the step of encoding and compressing a group of the video segment information through the acquisition module until all the video segment information is decoded; The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
2. The low-latency encoding and decoding method for digital video signals according to claim 1, characterized in that: The video segment information is composed of 8 lines of video pixel arrays.
3. The low-latency encoding and decoding method for digital video signals according to claim 1, characterized in that: There is an interval time between the start signal of the acquisition module and the start signal of the display module.
4. The low-latency encoding and decoding method for digital video signals according to claim 1, characterized in that: The interval time is determined according to the decoding time and the display time.
5. A low-latency encoding and decoding device for digital video signals, characterized in that: include: An information acquisition unit, used to acquire video information to be displayed; A video segmentation unit, used for segmenting the video information to be displayed to obtain a plurality of groups of video segment information; A coding and compression unit, used for coding and compressing a group of video clip information through a collection module; An information sending unit, used for sending the compressed video clip information to the display module through a network sender; A decoding and display unit, used for decoding and displaying the video segment information through the display module; Returning to the encoding compression unit until all video segment information is decoded; The pixel clock of the acquisition module is synchronized with the pixel clock of the display module.
6. The low-latency encoding and decoding device for digital video signals according to claim 5, characterized in that: The video segment information is composed of 8 lines of video pixel arrays.
7. The low-latency encoding and decoding device for digital video signals according to claim 5, characterized in that: There is an interval time between the start signal of the acquisition module and the start signal of the display module.
8. The low-latency encoding and decoding device for digital video signals according to claim 5, characterized in that: The interval time is determined according to the decoding time and the display time.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the low-latency encoding and decoding method for digital video signals as described in any one of claims 1 to 4 is implemented.
10. 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 encoding and decoding method for digital video signals as described in any one of claims 1 to 4 is implemented.
