Method, system, equipment and medium for reducing audio and video transmission data volume

The inter-frame differential method detects video frame motion and only transmits motion frame data, which solves the data waste and network resource occupation caused by still images in audio and video transmission, and improves transmission efficiency and user experience.

CN119211553AInactive Publication Date: 2024-12-27SHENZHEN INST OF ADVANCED BIOMEDICAL ROBOT CO LTD

Patent Information

Application Number
CN202411686528.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing audio and video transmission schemes continue to send video frame data when the still screen is still, resulting in low transmission efficiency, occupying a large number of network resources, increasing the processing burden of encoding and decoding modules, and delays and lags, especially in high bandwidth requirements. This is particularly prominent in application scenarios.

Method used

The motion difference between video frames is detected by inter-frame differential method, data transmission and encoding is performed only when motion frames are detected, still frame data is discarded, motion frames are compressed and transmitted using video encoding algorithm, and transmission is selected based on the current network status. Paths and protocols.

Benefits of technology

Effectively reduce the transmission of invalid data, reduce the burden of encoding and decoding processing, efficiently utilize network resources, avoid network congestion, and reduce video playback delay and lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211553A_ABST
    Figure CN119211553A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of remote communication, and discloses a method, a system, equipment and a medium for reducing audio and video transmission data volume, and the method comprises the following steps: collecting video frame data; reading a current video frame and a previous video frame of the current video frame; performing differential operation on the current video frame and the previous video frame to generate a frame difference image; judging whether a motion area exists in the frame difference image or not based on a first judgment threshold value; based on the judgment result, judging whether the current video frame is a motion frame or not; if the current video frame is not the motion frame, discarding data corresponding to the current video frame; and if the frame is the motion frame, encoding the data corresponding to the motion frame and performing data transmission on the encoded data packet. According to the invention, the transmission of invalid data can be effectively reduced, the processing burden in encoding and decoding processes is reduced, network resources are efficiently utilized, and network congestion and waste are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of telecommunication technology, and in particular to a method, system, device and medium for reducing the amount of data transmitted by audio and video. Background Art

[0002] With the popularization of mobile Internet and 5G networks, audio and video transmission technology has been widely used. However, in existing audio and video transmission solutions, the system will continue to send video frame data even if the picture is still. And because the system continuously sends repeated still picture data, the transmission efficiency is low. In the case of limited network bandwidth, this inefficient transmission method will occupy a large amount of network resources, increase the processing burden of the encoding and decoding modules, and cause delays and freezes during video playback, affecting the user experience. This problem is particularly prominent in application scenarios with high bandwidth requirements such as remote surgery.

[0003] Therefore, the problems of data waste and network bandwidth occupation caused by repeated picture sending in the existing audio transmission process need to be solved urgently. Summary of the invention

[0004] The present invention provides a method, system, device and medium for reducing the amount of audio and video transmission data, aiming to solve the technical problems of data waste and network bandwidth occupation caused by repeated picture sending in the existing audio transmission process.

[0005] In order to achieve the above-mentioned object of the invention, the first aspect of the present invention provides a method for reducing the amount of audio and video transmission data, characterized in that it includes: Collect video frame data; Reading a current video frame and a previous video frame of the current video frame; Performing a difference operation on the current video frame and the previous video frame to generate a frame difference image; Based on a first judgment threshold, judging whether there is a motion area in the frame difference image; Based on the judgment result, determining whether the current video frame is a motion frame; If it is not the motion frame, discarding the data corresponding to the current video frame; If it is the motion frame, the data corresponding to the motion frame is encoded and the encoded data packet is transmitted for data transmission.

[0006] Furthermore, the step of judging whether there is a motion area in the frame difference image based on the first judgment threshold comprises: Obtaining a differential value of the frame difference image; Determining whether the difference value is within the first determination threshold; If it is less than the first judgment threshold, it is determined that the motion area does not exist; If it is greater than the first judgment threshold, it is determined that the motion area exists.

[0007] Furthermore, if it is the motion frame, the step of encoding the data corresponding to the motion frame and transmitting the encoded data packet for data transmission includes: If it is the motion frame, compressing the data corresponding to the motion frame using a video encoding algorithm; Packing the compressed data into a corresponding data packet format; The corresponding transmission path and protocol are selected based on the current network conditions, and the packaged data is sent to the receiving end.

[0008] Furthermore, if it is the motion frame, the step of encoding the data corresponding to the motion frame and transmitting the encoded data packet for data transmission also includes: If it is the motion frame, identifying the motion region in the motion frame; Acquiring data corresponding to the motion area, namely, motion data; The motion data is encoded and the encoded data packet is transmitted to a receiving end.

[0009] Furthermore, if it is the motion frame, after the step of encoding the data corresponding to the motion frame and transmitting the encoded data packet for data transmission, the method further comprises: Based on the data transmitted by the receiving end; The video frame is updated based on the data.

[0010] Furthermore, the step of updating the video frame based on the data includes: Decoding the transmitted data based on the receiving end to obtain decoded data; The video frame is updated and displayed based on the decoded data.

[0011] Furthermore, the step of updating and displaying the video frame based on the decoded data includes: performing motion detection based on the decoded data; According to the motion detection result, the video picture is divided into a motion area and a static area; The video frame is updated based on the motion region.

[0012] The second aspect of the present application provides a system for reducing the amount of audio and video transmission data, comprising: An acquisition module, used for acquiring video frame data; A reading module, used for reading a current video frame and a video frame before the current video frame; A differential operation module, used for performing a differential operation on the current video frame and the previous video frame to generate a frame difference image; A first judgment module, used for judging whether there is a motion area in the frame difference image based on a first judgment threshold; There is a determination module, which is used to determine whether the current video frame is a motion frame based on the determination result; A discarding module, used for discarding data corresponding to the current video frame if it is not the motion frame; The transmission module is used to encode the data corresponding to the motion frame and transmit the encoded data packet for data transmission if it is the motion frame.

[0013] The third aspect of the present application proposes a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for reducing the amount of audio and video transmission data as described in any one of the above items are implemented.

[0014] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for reducing the amount of audio and video transmission data as described in any one of the above items are implemented.

[0015] Beneficial effects: The present invention detects the motion difference between video frames by using the inter-frame difference method, and transmits and analyzes the corresponding video frames that generate motion according to the detection results, that is, only when the motion of the video frame is detected, the frame data is transmitted to the encoding module for encoding and transmission. In this way, the transmission of invalid data can be effectively reduced. By reducing the transmission of invalid data, the system can reduce the processing burden of encoding and decoding, more efficiently utilize network resources, avoid network congestion caused by transmitting a large amount of repeated data, and reduce delays and freezes during video playback. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a method for reducing the amount of audio and video transmission data applied at a transmitting end according to an embodiment of the invention; Figure 2 A schematic block diagram of the structure of a system for reducing the amount of audio and video transmission data applied at a transmitting end according to an embodiment of the invention; Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the invention; The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0018] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "a", "an", "above", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.

[0019] Those skilled in the art will understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the field to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0020] Reference Figure 1 The embodiment of the present invention provides a method for reducing the amount of audio and video transmission data, the method is applied to remote intervention surgery, and includes the following steps S1-S7: S1, collect video frame data; In step S1, firstly, video frame data needs to be collected by a camera device (such as a camera). The camera device can be a camera integrated in a mobile device, a monitoring device or other video acquisition device. The camera device continuously collects video data at a certain frame rate (such as 30 frames / second) and transmits the collected video frame data to the acquisition module. The acquisition module is responsible for temporarily storing these data in the memory for subsequent processing. For example, a FIFO (first-in-first-out) queue can be used to manage the video frame data to ensure the orderliness and real-time nature of the data. The specific steps are as follows: Start the camera device, set the frame rate to 30 frames / second, and the resolution can be configured according to actual needs, such as 1080p or 720p. The camera device collects 30 frames of video data per second, and each frame of data includes a pixel value matrix, and each pixel value represents the color and brightness information of a point in the image. The camera device transmits the collected video frame data to the acquisition module through a high-speed interface (such as USB 3.0, HDMI, etc.). Data cache: The acquisition module temporarily stores the received video frame data in the FIFO queue in the memory. FIFO queues can ensure the orderliness and real-time nature of data and prevent data loss or disorder.

[0021] S2, read the current video frame and the previous video frame of the current video frame; S3, performing a difference operation on the current video frame and the previous video frame to generate a frame difference image; S4, judging whether there is a motion area in the frame difference image based on the first judgment threshold; S5. If there is a motion area, determine that the current video frame is a motion frame.

[0022] In steps S2-S5, the frame difference method is used to determine whether the current video frame has motion. First, the current video frame A is read from the memory. k (i,j); then read the previous video frame A from the memory k−1 (i, j). Perform differential operation on the current video frame and the previous video frame to generate a frame difference image D k (i,j). At this time, a threshold T needs to be set to determine whether there is a moving area in the frame difference image. If there is a moving area in the frame difference image, the current frame is considered to have motion; otherwise, the current frame is considered to be stationary. Compared with the traditional background difference method, the frame difference algorithm only needs to determine whether the current frame is moving, and does not need to determine the direction of motion. The algorithm runs faster.

[0023] Specifically, read the current video frame A from the memory k (i, j). Assume that the resolution of the current video frame is 1920x1080 and each pixel value represents an RGB color. Read the previous video frame A from the memory k−1(i, j), where the resolution and format of the previous video frame are the same as the current video frame. Perform a differential operation on the current video frame and the previous video frame to generate a frame difference image D k (i,j). The specific calculation method is as follows: k (i,j)=|A k (i,j)−A k−1 (i, j)|, for example, if a pixel value in the current video frame is (255, 128, 64), and the corresponding pixel value in the previous video frame is (250, 128, 64), then the difference value is (5, 0, 0). Based on this algorithm, the entire frame difference image is calculated. At this time, a threshold T is set. According to whether the difference value corresponding to the calculated frame difference image is greater than this threshold T, it is judged whether there is a motion area in the frame difference image. For example, T=50, the specific calculation method is as follows: ; If the sum of all pixel values ​​in the frame difference image is greater than 50, it is considered that there is motion in the current frame.

[0024] When the background is static, the prior art usually calculates by the background difference method. The background difference method uses the current video frame to differ from the background modeling image and performs binarization processing by selecting and setting a suitable threshold to obtain the foreground target. The advantage is that the moving target can be extracted more completely, and the disadvantage is that it is too sensitive to environmental changes caused by lighting and external conditions, and often mistakenly detects the shadow produced by the moving target as part of itself, resulting in false detection. Due to the passage of time, various factors in the actual scene will change to a certain extent, such as the appearance of stationary objects, changes in light, turning on and off lights, and the occlusion of the background by moving targets, etc. Therefore, the background needs to be updated in real time and accurately, which is a very important factor affecting the detection effect of the background difference method. The present application uses the inter-frame difference algorithm to better meet the use scenarios such as remote surgical audio and video communication. It only needs to determine whether the current frame is moving, and does not need to determine the direction of movement. The algorithm runs fast and the increased delay can be ignored.

[0025] S6. If it is not a motion frame, discard the data corresponding to the current video frame; S7. If it is a motion frame, encode the data corresponding to the motion frame and transmit the encoded data packet to the receiving end.

[0026] In this embodiment, if it is determined that the current video frame has no motion, that is, there is no motion area in the frame difference image, then the current video frame is not a motion frame, which means that the video frame data corresponding to the current video frame needs to be discarded. In this way, the transmission of invalid data can be reduced, and network bandwidth and traffic can be saved. For example: according to the threshold in step S4, if the current video frame has no motion, a flag is_motion is set to 0. If is_motion is 0, the video frame data corresponding to the current video frame is discarded. The specific implementation method can be to delete the current video frame from the memory, or mark it as invalid data and no longer perform subsequent processing. In order to facilitate debugging and analysis, each data discard operation can be recorded, including information such as the time of discarding and the frame number. In practical applications, the data discard strategy can be further optimized. For example, a threshold for continuous static frames can be set. If there is no motion for multiple consecutive frames, the frequency of data transmission can be further reduced. In this way, not only can the transmission of invalid data be reduced, but also the processing burden of the system can be reduced. For example, if there is no motion for 10 consecutive frames, the frequency of data transmission can be reduced to once every 10 frames, thereby further saving bandwidth and traffic. If the current video frame is determined to be a motion frame, the data corresponding to the motion frame is encoded and the encoded data packet is transmitted to the receiving end. The data corresponding to the motion frame is compressed using a video encoding algorithm (such as H.264, H.265, etc.) to generate compressed video data. The encoded data can be the data of the entire motion frame or only the data containing the motion area, depending on the implementation method of the sending end.

[0027] In one embodiment, the step of determining whether there is a motion area in the frame difference image based on the first determination threshold includes: S10, obtaining a differential value of the frame difference image; S11, determining whether the difference value is within a first determination threshold; S12: if it is less than the first judgment threshold, it is determined that there is no motion area; S13: If it is greater than the first judgment threshold, it is determined that there is a motion area.

[0028] In this embodiment, the specific calculation method is as follows: k (i,j)=|A k (i,j)−A k−1(i, j)|, for example, if a pixel value in the current video frame is (255, 128, 64), and the corresponding pixel value in the previous video frame is (250, 128, 64), then the difference value is (5, 0, 0). Based on this algorithm, the entire frame difference image is calculated. At this time, a threshold T is set. According to whether the difference value corresponding to the calculated frame difference image is greater than this threshold T, it is judged whether there is a motion area in the frame difference image. For example, T=50, the specific calculation method is as follows: ; If the sum of all pixel values ​​in the frame difference image is greater than 50, it is considered that the current frame has motion. Based on the preset first judgment threshold, the calculated reconnaissance image is directly subjected to the motion judgment of the entire video frame. This step directly uses the threshold to evaluate whether the current video frame has the possibility of motion, and can directly screen out motion frames that may have motion, reducing the amount of calculation. In addition, this method has high robustness to background noise and small pixel changes, and can more accurately detect significant motion areas and reduce the influence of factors such as lighting.

[0029] Furthermore, the direct motion area can be directly calculated based on the differential algorithm of step S3. For example, a judgment threshold is set for the differential value of each pixel position, and the judgment threshold at this time can be set according to the actual situation. The motion area is directly located. If it is greater than the threshold, a motion mask 1 is generated for the pixel part, indicating that it belongs to the motion area; if it is less than the threshold, a motion mask 1 is generated for the pixel part, indicating that it belongs to the static area. This is convenient for subsequent transmission and decoding recognition.

[0030] In one embodiment, if the frame is a motion frame, the step of transmitting data corresponding to the motion frame includes: S20: If it is a motion frame, compress the data corresponding to the motion frame using a video encoding algorithm; S21, packing the compressed data into a corresponding data packet format; S22. Select a corresponding transmission path and protocol based on the current network status, and send the packaged data to the receiving end.

[0031] In this embodiment, encoding and transmission are performed through the following steps: using the H.264 encoding algorithm to compress the data corresponding to the motion frame to generate compressed video data. H.264 is an efficient video encoding standard that can significantly reduce the size of video data while maintaining good video quality.

[0032] The specific encoding steps are as follows: Preprocessing: Preprocess the video frames, including color space conversion, denoising and other operations.

[0033] Intra-frame coding: Encode the data within a single frame to generate an I frame.

[0034] Inter-frame coding: Encode multiple consecutive frames of data to generate P frames and B frames.

[0035] Entropy coding: Entropy coding is performed on the encoded data to further compress the data volume.

[0036] Data Packaging: Pack the compressed video data into RTP (Real-time Transport Protocol) data packet format. RTP is a network protocol used for multimedia data transmission, which can ensure the real-time and reliability of data.

[0037] The specific packaging steps are as follows: Data segmentation: Divide the compressed video data into multiple small data blocks.

[0038] Add header information: Add RTP header information to each data block, including timestamp, sequence number, etc.

[0039] Encapsulate into data packets: Encapsulate the data block with header information into RTP data packets.

[0040] Data transmission: The transmission module sends the encoded data packets to the receiving end through UDP (User Datagram Protocol). The optimal transmission path and protocol are selected according to the current network conditions to ensure efficient data transmission.

[0041] The specific transmission steps are as follows: Network detection: Detect the current network status, including bandwidth, delay and other parameters.

[0042] Path selection: Select the optimal transmission path based on network conditions, such as a path with higher bandwidth and lower latency.

[0043] Data transmission: RTP data packets are sent to the receiving end via UDP. UDP is a connectionless transmission protocol suitable for real-time data transmission, but does not guarantee the reliability and sequence of data.

[0044] Priority setting: Set the priority of data packets according to the importance and urgency of the data to ensure the fast transmission of important data.

[0045] During the video encoding process, the H.264 encoding algorithm significantly reduces the size of video data by combining intra-frame coding and inter-frame coding. Intra-frame coding (I-frame) encodes the data within a single frame to generate independent video frames that can be decoded and displayed separately. Inter-frame coding (P-frame and B-frame) encodes multiple consecutive frames of data and uses redundant information between frames to reduce the amount of data. P-frames are encoded only with reference to the previous frame, while B-frames can be encoded with reference to the two previous and next frames, further improving compression efficiency. For example, a typical H.264 encoding sequence may contain one I-frame and multiple P-frames, with I-frames usually larger in size, P-frames smaller in size, and B-frames the smallest in size.

[0046] In one embodiment, if it is a motion frame, the step of encoding the data corresponding to the motion frame and transmitting the encoded data packet for data transmission further includes: S30, if it is a motion frame, identifying a motion region in the motion frame; S31, acquiring data corresponding to the motion area, that is, motion data; S32: Encode the motion data and transmit the encoded data packet to a receiving end.

[0047] In this embodiment, after the inter-frame difference operation has been performed based on step S3, a motion region mask is generated based on a preset threshold. After obtaining the motion region mask, the motion region data is extracted using the motion region mask, and the motion region data can be a pixel value matrix, representing the image information of the moving part. The extracted motion region data is compressed using a preset encoding algorithm to generate compressed video data, such as an RTP data packet, which is then packaged into a specified data packet format, including data segmentation, adding header information, and encapsulating into a data packet. Finally, the optimal transmission path and protocol are selected according to the current network conditions, and the data packet is sent to the receiving end.

[0048] In one embodiment, if it is a motion frame, after the step of encoding the data corresponding to the motion frame and transmitting the encoded data packet for data transmission, the step includes: S40, receiving the transmitted data based on the receiving end; S41, updating the video frame based on the data.

[0049] In this embodiment, in this step, the receiving end updates the video frame picture based on the data. The video frame picture is the data of the previous video frame relative to the current video frame that has been transmitted and decoded and displayed. Specifically, the receiving end first receives the data packet sent from the sending end through the network interface, and checks the integrity and correctness of the data packet to ensure that the data is not lost or damaged. Next, the data packet is decoded using the same decoding algorithm as the sending end (such as H.264, H.265, etc.) to restore the data corresponding to the original motion frame. The decoded data may include the data of the entire motion frame, or only the data of the motion area. The specific data content is determined according to the content sent by the sending end. If the parsed data is the entire frame data contained in the current motion frame, the receiving end can perform motion detection based on the decoded data to determine which areas of the audio and video picture contained in the current motion frame belong to the motion area and which areas belong to the static area. Motion detection can be achieved by frame difference method or other motion detection algorithms. Next, the display data of the previous frame is read from the display buffer, and the decoded motion area data is updated to the display buffer. For the static area, the data of the previous frame remains unchanged. Finally, the updated display buffer data is output to the display for display. The data transmission and processing of the entire motion frame are relatively simple, and do not require complex motion area extraction and merging operations, which is especially suitable for scenes with frequent motion. If the data sent by the transmitter only contains data of the motion area, then the receiver can directly update the current audio and video screen based on the decoded data. This process ensures the smoothness and clarity of the video. The receiver only needs to process and update the data of the motion area, reducing the consumption of computing resources. It is particularly suitable for devices with limited resources, such as mobile devices; at the same time, it reduces unnecessary data transmission. Since the amount of data transmitted is small, it can improve transmission efficiency and reduce network latency.

[0050] In one embodiment, the step of updating the video frame based on the data includes: S50, decoding the transmitted data based on the receiving end to obtain decoded data; S51, updating and displaying the video frame based on the decoded data.

[0051] In this embodiment, the receiving end receives a data packet (such as an RTP data packet and temporarily stores it in a memory) sent by the sending end from the network, and temporarily stores it in a memory, and decodes the data packet using a corresponding decoding algorithm (such as an H.264 decoding algorithm) to obtain decoded data. For example, the received RTP data packet is first reassembled into a complete video data block, and then the compressed data is entropy decoded to restore the original video data, the P frame and the B frame are decoded, and the complete video frame is reconstructed using the reference frame, the I frame is decoded to generate an independent video frame, and the decoded video frame is post-processed, including color space conversion, denoising and other operations. In the video decoding process, the H.264 decoding algorithm restores the data in the encoding process through reverse operations. Entropy decoding is to restore the compressed data to the original video data, inter-frame decoding is to reconstruct the complete video frame using the reference frame, and intra-frame decoding is to generate an independent video frame. For example, for a P frame, the decoder needs to find its reference frame (usually the I frame or P frame of the previous frame), and reconstruct the complete video frame using the motion vector information in the reference frame and the P frame. For a B frame, the decoder needs to find the reference frames of the two frames before and after it, and use the motion vector information in the reference frame and the B frame to reconstruct the complete video frame. Among them, the decoded data is determined according to the coverage type of the data sent by the transmitter, and can include the whole frame data of the current motion frame or the data of the motion area in the current motion frame. If it is the whole frame data of the current motion frame, motion detection is performed based on the decoded data. According to the motion detection result, the specific detection method can use the inter-frame difference method, similar to the method in step S3, to divide the video screen into a motion area and a static area, and then refresh the motion area of ​​the current audio and video screen based on the identified motion area, that is, only refresh the motion area and retain the static area. If the data sent by the transmitter is the data of the motion area in the current motion frame, then the receiving end directly updates the decoded motion area data to the display buffer, and outputs the updated display buffer data to the display for display.

[0052] In one embodiment, the step of updating and displaying the video frame based on the decoded data includes: S60, performing motion detection based on the decoded data; S61, dividing the video image into a motion area and a static area according to the motion detection result; S62: Update the video frame based on the motion area.

[0053] In this embodiment, the difference value in the frame difference image is binarized, and the pixel value greater than the threshold T is set to 1, indicating a moving area; the pixel value less than or equal to the threshold T is set to 0, indicating a static area. A connected area detection algorithm (such as a four-connected or eight-connected algorithm) is used to merge adjacent moving pixels into a connected area to form a moving area, and a unique identifier is assigned to each detected moving area for subsequent processing. The moving area refers to an area with a pixel value (or mask value) of 1, and the static area refers to an area with a mask value of 0. The receiving end reads the display data of the previous frame from the display buffer. Then, the decoded data of the moving area is updated to the display buffer. Specifically, for the moving area, the decoded data is used to overwrite the data at the corresponding position in the display buffer; for the static area, the data of the previous frame is kept unchanged. Finally, the updated display buffer data is output to the display for display. Through these steps, the receiving end can effectively update and display the video frame based on the decoded data, ensure the smoothness and clarity of the video, and reduce unnecessary data transmission.

[0054] Reference Figure 2 , an embodiment of the present invention further provides a system for reducing the amount of audio and video transmission data, comprising: The acquisition module 100 is used to acquire video frame data; The reading module 200 is used to read the current video frame and the previous video frame of the current video frame; The differential operation module 300 is used to perform a differential operation on the current video frame and the previous video frame to generate a frame difference image; A first judgment module 400 is used to judge whether there is a motion area in the frame difference image based on a first judgment threshold; There is a determination module 500, which is used to determine whether the current video frame is a motion frame based on the determination result; A discarding module 600 is used to discard data corresponding to the current video frame if it is not a motion frame; The transmission module 700 is used to encode the data corresponding to the motion frame and transmit the encoded data packet for data transmission if it is a motion frame.

[0055] In one embodiment, the first determination module 400 includes: A difference value acquisition unit, used for acquiring a difference value of the frame difference image; A threshold determination unit, used to determine whether the difference value is within a first determination threshold; A non-existence determination unit, configured to determine that there is no motion area if the motion area is less than a first determination threshold; The existence determination unit is used to determine that there is a motion area if the value is greater than a first determination threshold.

[0056] In one embodiment, the transmission module 700 includes: A first compression unit, for compressing data corresponding to the motion frame using a video encoding algorithm if the motion frame is a motion frame; A first packaging unit, used for packaging the compressed data into a corresponding data packet format; The first transmission unit is used to select a corresponding transmission path and protocol based on the current network status and send the packaged data to the receiving end.

[0057] In one embodiment, the transmission module 700 further includes: A motion identification unit, for identifying a motion region in the motion frame if the frame is a motion frame; A data acquisition unit, used to acquire data corresponding to the motion area, that is, motion data; The second transmission unit is used to encode the motion data and transmit the encoded data packet to the receiving end.

[0058] In one embodiment, the system further includes an update module, the update module including: A receiving unit, configured to receive the transmitted data based on a receiving end; The first updating unit is used to update the video frame based on the data.

[0059] In one embodiment, the first updating unit includes: A decoding unit, configured to decode the transmitted data based on a receiving end to obtain decoded data; The updating display unit is used to update and display the video frame image based on the decoded data.

[0060] In one embodiment, the update display unit includes: a motion detection unit, configured to perform motion detection based on the decoded data; A division unit, used for dividing the video picture into a motion area and a static area according to the motion detection result; The picture updating unit is used to update the video frame picture based on the motion area.

[0061] Reference Figure 3 The embodiment of the present invention further provides a computer device, the internal structure of which can be as follows Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed for the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating device, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for audio and video parameters, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. Further, the above-mentioned computer device can also be provided with an input device and a display screen, etc. When the above-mentioned computer program is executed by the processor to realize a method for reducing the amount of audio and video transmission data, the method includes the following steps: collecting video frame data; reading the current video frame and the previous video frame of the current video frame; performing a differential operation on the current video frame and the previous video frame to generate a frame difference image; based on a first judgment threshold, judging whether there is a motion area in the frame difference image; based on the judgment result, judging whether the current video frame is a motion frame; if it is not a motion frame, discarding the data corresponding to the current video frame; if it is a motion frame, encoding the data corresponding to the motion frame and transmitting the encoded data packet for data transmission. Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.

[0062] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for reducing the amount of audio and video transmission data is implemented, including the following steps: collecting video frame data; reading the current video frame and the previous video frame of the current video frame; performing a differential operation on the current video frame and the previous video frame to generate a frame difference image; based on a first judgment threshold, judging whether there is a motion area in the frame difference image; based on the judgment result, judging whether the current video frame is a motion frame; if it is not a motion frame, discarding the data corresponding to the current video frame; if it is a motion frame, encoding the data corresponding to the motion frame and transmitting the encoded data packet. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0063] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0064] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0065] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for reducing the amount of audio and video transmission data, characterized in that: include: Collect video frame data; Reading a current video frame and a previous video frame of the current video frame; Performing a difference operation on the current video frame and the previous video frame to generate a frame difference image; Based on a first judgment threshold, judging whether there is a motion area in the frame difference image; Based on the judgment result, determining whether the current video frame is a motion frame; If it is not the motion frame, discard the data corresponding to the current video frame; If it is the motion frame, the data corresponding to the motion frame is encoded and the encoded data packet is transmitted for data transmission.

2. The method for reducing the amount of audio and video transmission data according to claim 1, characterized in that: The step of judging whether there is a motion area in the frame difference image based on the first judgment threshold comprises: Obtaining a differential value of the frame difference image; Determining whether the difference value is within the first determination threshold; If it is less than the first judgment threshold, it is determined that the motion area does not exist; If it is greater than the first judgment threshold, it is determined that the motion area exists.

3. The method for reducing the amount of audio and video transmission data according to claim 1, characterized in that: If it is the motion frame, the step of encoding the data corresponding to the motion frame and transmitting the encoded data packet for data transmission comprises: If it is the motion frame, compressing the data corresponding to the motion frame using a video encoding algorithm; Packing the compressed data into a corresponding data packet format; The corresponding transmission path and protocol are selected based on the current network conditions, and the packaged data is sent to the receiving end.

4. The method for reducing the amount of audio and video transmission data according to claim 1, characterized in that: If it is the motion frame, the step of encoding the data corresponding to the motion frame and transmitting the encoded data packet also includes: If it is the motion frame, identifying the motion region in the motion frame; Acquiring data corresponding to the motion area, namely, motion data; The motion data is encoded and the encoded data packet is transmitted to a receiving end.

5. The method for reducing the amount of audio and video transmission data according to claim 1, characterized in that: If it is the motion frame, after the step of encoding the data corresponding to the motion frame and transmitting the encoded data packet for data transmission, the step includes: Based on the data transmitted by the receiving end; The video frame is updated based on the data.

6. The method for reducing the amount of audio and video transmission data according to claim 5, characterized in that: The step of updating the video frame based on the data comprises: Decoding the transmitted data based on the receiving end to obtain decoded data; The video frame is updated and displayed based on the decoded data.

7. The method for reducing the amount of audio and video transmission data according to claim 6, characterized in that: The step of updating and displaying the video frame based on the decoded data includes: performing motion detection based on the decoded data; According to the motion detection result, the video picture is divided into a motion area and a static area; The video frame is updated based on the motion region.

8. A system for reducing the amount of audio and video transmission data, characterized in that: include: An acquisition module, used for acquiring video frame data; A reading module, used for reading a current video frame and a video frame before the current video frame; A differential operation module, used for performing a differential operation on the current video frame and the previous video frame to generate a frame difference image; A first judgment module, used for judging whether there is a motion area in the frame difference image based on a first judgment threshold; There is a determination module, which is used to determine whether the current video frame is a motion frame based on the determination result; A discarding module, used for discarding data corresponding to the current video frame if it is not the motion frame; The transmission module is used to encode the data corresponding to the motion frame and transmit the encoded data packet for data transmission if it is the motion frame.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method for reducing the amount of audio and video transmission data as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for reducing the amount of audio and video transmission data as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Video data coding method, video data coding device, computer device and storage medium

    CN108737825A

  • Method and device for generating variable frame rate video media file and related components

    CN113747159A

  • Method for processing video image based on decoding information and related equipment thereof

    CN116600138A

  • Method and device for reducing video delay based on UVC protocol, equipment and medium

    CN117354454A

  • Image error hidding method

    CN1409559A

Cited By

  • Mining audio and video throttling system

    CN119865671A

  • Monitoring video data efficient acquisition and analysis method based on machine learning

    CN119967179A