Video data processing and remote transmission method

By introducing AI algorithms to optimize image recognition processing and H.264 encoding, combined with encryption and secure transmission, the problem of insufficient deep understanding of video content and real-time processing capabilities in the prior art is solved, and efficient video data processing and remote transmission are achieved.

CN119728996APending Publication Date: 2025-03-28HUBEI YUSU NEW ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411922866.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art relies on H.264 encoding and simple video analysis in video processing, lacks deep understanding of video content and real-time processing capabilities, and lacks comprehensive data transmission capabilities and real-time feedback mechanisms, making it difficult to handle high-resolution videos and complex scenarios.

Method used

Video frames are collected and parsed by FFmpeg tool, and image recognition is performed using AI algorithms, including object detection, bounding box recognition and confidence analysis. The video frames are then differentiated and noise-decreased, target outlines are obtained, and the identified target objects are marked, and the video stream is finally re-encoded using H.264 encoding. At the same time, the video data is encrypted using an encryption algorithm, and remote transmission and integrity verification are carried out through secure data communication means.

Benefits of technology

It realizes a deep understanding of video content and real-time processing capabilities, supports comprehensive data transmission, improves the information content of video data, enhances the ability to monitor real-time, optimizes the H.264 encoding protocol, improves the real-time and stability of the system, and ensures the integrity of the data during transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728996A_ABST
    Figure CN119728996A_ABST
Patent Text Reader

Abstract

The invention provides a video data processing and remote transmission method, which comprises the following steps: S1, video data analysis: selecting an adaptive video decoder to decode original video data, obtaining an original video frame in a YUV format, and converting the original video frame into other formats; s2, video image recognition processing: processing the image through an AI algorithm so as to detect the category, bounding box coordinates and confidence information of a target, and recoding the target into a video stream in an H.264 format; and S3, remote transmission: encrypting by using an encryption algorithm, transmitting to a remote terminal device, and checking the integrity of the remote terminal device. The method not only provides efficient video processing, but also supports comprehensive data transmission including the video stream and other information, for example, acquiring a target contour, labeling an identified target object and the like, thereby improving the data information content of the video, assisting monitoring end equipment to grasp the condition of a monitored target more quickly, and improving the video quality. The method has more excellent performance in a real-time monitoring environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video processing and transmission, and in particular to a method for video data processing and remote transmission. Background Art

[0002] Video is a continuous sequence of images, consisting of continuous frames, one frame is an image. Due to the persistence of vision of the human eye, when a frame sequence is played at a certain rate, what we see is a video with continuous action. Since the similarity between continuous frames is extremely high, in order to facilitate storage and transmission, we need to encode and compress the original video to remove the redundancy in the spatial and temporal dimensions.

[0003] At the same time, video compression technology is a prerequisite for computer video processing and video transmission. After the video signal is digitized, the data bandwidth is very high, usually more than 20MB / second, so it is difficult for the computer to save and process it. In addition, the amount of video data before compression is very large, making it difficult to achieve effective high-speed transmission. Therefore, it needs to be compressed through encoding processing for transmission.

[0004] For real-time video data transmission such as camera monitoring, traditional video processing mainly relies on H.264 encoding and simple video analysis, lacking in-depth understanding of video content and real-time processing capabilities. With the development of technology, the demand for video processing is gradually increasing. For high-resolution videos and complex scenes, the processing capabilities of simple H.264 encoding and video analysis are limited. It is usually limited to the video stream itself, lacks comprehensive data transmission capabilities and real-time feedback mechanisms, and cannot recognize and detect images in the video, let alone perform refined operations such as target classification, motion recognition, and contour recognition. As a result, it is difficult to meet higher work requirements such as real-time monitoring. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a video data processing and remote transmission method, which solves the problems in the prior art that video processing relies on H.264 encoding and simple video analysis, lacks in-depth understanding of video content and real-time processing capabilities, and lacks comprehensive data transmission capabilities and real-time feedback mechanisms.

[0006] According to an embodiment of the present invention, a method for processing and remotely transmitting video data comprises the following steps:

[0007] S1. Video data analysis: Capture video through the FFmpeg tool, obtain each frame of the video, and store the corresponding video frame information for subsequent use.

[0008] S2, video image recognition processing: The image is processed by AI algorithm to detect the category, bounding box coordinates and confidence information of the target, and then the video frame is differentiated and denoised to obtain the target outline. The identified target object is then annotated to obtain the result frame, which is re-encoded using H.264.

[0009] S3, Remote transmission: The re-encoded H.264 video stream is encrypted using an encryption algorithm, and then transmitted to the remote terminal device through secure data communication means, and its integrity is verified.

[0010] Furthermore, the step S1 specifically includes the following sub-steps:

[0011] S1.1. Video frame acquisition: During the acquisition process, each frame of the video is acquired in sequence according to the playback order of the video to ensure that all frame data in the video is completely extracted to provide basic materials for subsequent further processing.

[0012] S1.2, Video frame information storage: For each captured video frame, extract various types of information related to it. This information may include but is not limited to the frame timestamp, resolution, encoding format, frame type (such as key frame, ordinary frame, etc.). The video frame information corresponding to each extracted frame is stored.

[0013] Furthermore, the step S2 includes the following sub-steps:

[0014] S2.1. AI recognition model access: Use a deep learning model to identify objects in the extracted video frames. The model classifies and locates objects in the video frames through a convolutional neural network.

[0015] S2.2. Use the connected AI model to make judgments: Use the pre-trained AI model to make judgments on the target object, including target classification, state recognition and behavior prediction;

[0016] S2.3, object motion recognition: Differentiate the video frames to obtain the approximate moving target, and perform noise reduction to reduce the interference information in the image;

[0017] S2.4, obtaining contours: using the contour extraction algorithm to extract the contours of the region of interest from the video frame after the operation, and returning the corresponding information;

[0018] S2.5, labeling information: labeling the identified target objects to generate labeling data including location information, category information and recognition confidence;

[0019] S2.6, re-encoding: Use H.264 encoding to re-encode the processed and annotated video frames into a video stream in H.264 format.

[0020] Furthermore, the step S3 includes the following sub-steps:

[0021] S3.1, Video encryption: Use the AES encryption algorithm to encrypt the video data, and use the SHA hash algorithm to calculate the encrypted ciphertext for verification;

[0022] S3.2, Video transmission: Transmitted to remote terminal equipment through secure data communication means;

[0023] S3.3, Integrity verification: At the receiving end, use the same AES encryption algorithm to decrypt the ciphertext, and perform SHA hash operation on the decrypted data to compare whether the original hash value and the transmitted hash value are consistent. If the hash values ​​are the same, it means that the data has not been tampered with.

[0024] Furthermore, the step S2.2 specifically includes the following sub-steps:

[0025] S2.2.1, Input video frame: Assume that the input video frame is frame(i), where i represents the i-th frame;

[0026] S2.2.2, Image preprocessing: adjust the input video frame frame(i) to the input size required by the YOLOv5 model and perform normalization;

[0027]

[0028] S2.2.3, Feature extraction: Extract features from video frames through convolutional neural networks. Feature extraction here is completed through multi-layer convolution operations of the YOLOv5 model, including convolution, batch normalization, and activation function operations;

[0029] features(i)=CNN YOLOv5 (frame processed (i))

[0030] S2.2.4, Object Detection and Classification: The YOLOv5 model converts feature maps into candidate boxes and category predictions. For each candidate box, the model predicts its location and the probability of the category to which it belongs. YOLOv5 uses a single network structure to simultaneously predict the categories and bounding boxes of multiple objects in a single forward pass;

[0031] boxes(i), class_probs(i)=YOLOv5_Head(features(i))

[0032] S2.2.5, Confidence threshold screening: Apply confidence threshold filtering to the detection results and remove candidate boxes with low confidence;

[0033] valid_boxes(i)={box∈boxes(i)|confidence(box)>threshold}

[0034] S2.2.6, non-maximum suppression: In order to avoid detecting the same target multiple times, the non-maximum suppression algorithm is used to merge overlapping candidate boxes;

[0035] final_boxes(i)=NMS(valid_boxes(i), IoU_threshold)

[0036] S2.2.7, output detection results: finally output the detection results, including the target category, bounding box coordinates and confidence information;

[0037] detections(i)={(class, bbox, confidence)|class, bbox, confidence∈final_boxes(i)}.

[0038] Furthermore, the step S2.3 specifically includes the following sub-steps:

[0039] S2.3.1, Grayscale: Convert the video frame from color to grayscale through the color space conversion algorithm to reduce the complexity of subsequent processing calculations;

[0040] S2.3.2, Difference: Use the difference algorithm to calculate the difference between adjacent frames;

[0041] dst(i,j)=|src1(i,j)-src2(i,j)|

[0042] S2.3.3, Binarization: Use a binarization algorithm to convert the video frame from difference to binary to highlight the target object;

[0043]

[0044] S2.3.4, Opening operation: The morphological opening operation is used to dilate and then corrode the binary video frame to remove small noise, smooth the edge of the target object, and reduce interference items;

[0045] dst=Dilation(Erosion(src)).

[0046] Furthermore, the step S2.4 specifically includes the following sub-steps:

[0047] S2.4.1. Initial conditions: In the contour extraction algorithm, the core contour tracking can be summarized as the following formula, where pi = (xi, yi) represents the coordinates of the pixel points on the contour;

[0048] Contour(C)={p0,p1,...,p n}

[0049] Let the image be I(x,y), and the pixel value I(x,y) of the binary video frame is either 0, i.e., background, or 1, i.e., foreground;

[0050] S2.4.2, contour tracking condition: If I(pi) = 1 and pi is an edge pixel, then pi is a contour point;

[0051] S2.4.3. Contour closure condition: Find the next edge pixel pi+1 by searching along the direction of adjacent pixels until returning to the initial point p0, that is, the contour is closed.

[0052] Furthermore, the step S2.6 specifically includes the following sub-steps:

[0053] S2.6.1. Re-encoding: Through FFmpeg, according to the stored video stream information, call the avcodec_find_encoder function to find the appropriate video encoder, use avcodec_alloc_context3 to build its operating environment, and then set the key parameters such as bitrate upper limit, frame rate, GOP, B frame, pixel format, etc. according to the video characteristics and quality requirements. Finally, call the avcodec_receive_packet function to obtain the final compressed and encoded multimedia data.

[0054] S2.6.2, Preparation for sending data: Process the timestamp of AVPacket. If startTime is 0, initialize it to the current time, calculate and update the timestamp, check dts and pts at the same time, if they are negative, set them to 0 and recalculate the timestamp; then when pkt.data() is not empty, prepare the data buffer rbuffer and read the pkt data. If spsdata or ppsdata is empty, initialize the variable. Then, in the loop, determine the starting position and type of the video frame according to the specific start flag, determine the frame type according to mNaluType, perform data storage processing on SPS and PPS type frames, and finally send the frame data in rbuffer. av_packet_unref(pkt) releases the resources. At this point, the preparation of one frame is complete.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] 1. The present invention not only provides efficient video processing, but also supports comprehensive data transmission, including the video stream itself and other information, such as obtaining the target outline, marking the identified target object, etc., thereby improving the data information content of the video itself, assisting the monitoring terminal equipment to grasp the monitoring target situation more quickly, and having better performance in the real-time monitoring environment;

[0057] 2. The present invention optimizes the traditional H.264 encoding protocol, improves the real-time performance and stability of the system, and further compresses the amount of encoded data through means such as frame prediction, thereby improving the degree of compression and meeting the needs of complex scenarios and high-demand applications;

[0058] 3. The present invention also uses an encryption algorithm to encrypt video data and performs verification at the receiving end to ensure that the data has not been tampered with during transmission, maintain the consistency of transmitted and received data, and improve the accuracy and precision of video data. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 The figure is a principle flow chart of an embodiment of the present invention.

[0060] Figure 2 FIG. 4 is a flowchart of a video transmission process in an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0062] like Figure 1 As shown, a video data processing and remote transmission method in this embodiment includes the following steps:

[0063] (1) Video data analysis: Use the FFmpeg tool to capture video, obtain each frame of the video, and store the corresponding video frame information for subsequent use.

[0064] (1.1) Video frame acquisition: During the acquisition process, each frame of the video is acquired in sequence according to the playback order of the video to ensure that all frame data in the video is completely extracted to provide basic materials for subsequent further processing.

[0065] (1.2) Video frame information storage: For each captured video frame, extract various types of information related to it. This information may include but is not limited to the frame's timestamp, resolution, encoding format, frame type (such as key frame, ordinary frame, etc.). Store the corresponding video frame information of each extracted frame.

[0066] (2) Video image recognition processing: The image is processed through the AI ​​algorithm to detect the target category, bounding box coordinates and confidence information, and then the video frame is differentiated and denoised to obtain the target outline. The identified target object is then labeled and the processed and labeled video frame is re-encoded into an H.264 format video stream using H.264 encoding.

[0067] (2.1) AI recognition model access: Use a deep learning model to perform target recognition on the extracted video frames. The model classifies and locates objects in the video frames through a convolutional neural network (CNN). In this embodiment, the YOLOv5 deep learning model is used.

[0068] (2.2) Use the connected AI model to make judgments: Use the pre-trained AI model to make judgments on the target object, including target classification, state recognition and behavior prediction. Specifically:

[0069] (2.2.1) Input video frame: Assume that the input video frame is frame(i), where i represents the i-th frame.

[0070] (2.2.2) Image preprocessing: adjust the input video frame frame(i) to the input size required by the YOLOv5 model. In this embodiment, the size is 640x640 pixels, and perform normalization.

[0071]

[0072] (2.2.3) Feature extraction: extract features from video frames through convolutional neural networks. The feature extraction here is completed through multi-layer convolution operations of the YOLOv5 model, including convolution, batch normalization, and activation function operations;

[0073] features(i) = CNN YOLOv5 (frame processed (i))

[0074] (2.2.4) Object detection and classification: The YOLOv5 model converts feature maps into candidate boxes and category predictions. For each candidate box, the model predicts its location (center point coordinates x, y, width w, height h) and the probability p(c) of the category to which it belongs. YOLOv5 uses a single network structure (Single-Shot Detection) to simultaneously predict the categories and bounding boxes of multiple objects in a single forward pass;

[0075] boxes(i), class_probs(i)=YOLOv5_Head(features(i))

[0076] (2.2.5) Confidence threshold filtering: Apply confidence threshold filtering to the detection results to remove low-confidence candidate boxes. The common confidence threshold is 0.5, which means that the model considers the detection box with a confidence level of more than 50% to be valid.

[0077] valid_boxes(i)={box∈boxes(i)|confidence(box)>threshold}

[0078] (2.2.6) Non-maximum suppression: In order to avoid detecting the same target multiple times, the non-maximum suppression algorithm is used to merge overlapping candidate boxes. The IoU (intersection over union) threshold is usually set to 0.5, which means that when the overlapping area of ​​two candidate boxes exceeds 50%, the box with lower confidence is merged.

[0079] final_boxes(i)=NMS(valid_boxes(i), IoU_threshold)

[0080] (2.2.7) Output detection results: The final detection results are output, including the target category, bounding box coordinates and confidence information;

[0081] detections(i)={(class, bbox, confidence)|class, bbox, confidence∈final_boxes(i)}.

[0082] (2.3) Object motion recognition: Differentiate the video frames to obtain the approximate moving target, and perform noise reduction to reduce the interference information in the image.

[0083] (2.3.1) Grayscale conversion: The video frame is converted from color to grayscale through a color space conversion algorithm (cvtColor) to reduce the complexity of subsequent processing and calculation. In this embodiment, the specific steps are as follows:

[0084] Gray=0.299×B+0.587×G+0.114×R

[0085] (2.3.2) Difference: Use the difference algorithm (absdiff) to calculate the difference between adjacent frames;

[0086] dst(i,j)=|src1(i,j)-src2(i,j)|

[0087] (2.3.3) Binarization: Use the binarization algorithm (threshold) to convert the video frame from difference to binary to highlight the target object;

[0088]

[0089] (2.3.4) Opening operation: The morphological opening operation (morphologyEx function) is used to dilate and then corrode the binary video frame to remove small noise, smooth the edge of the target object, and reduce interference items;

[0090] dst=Dilation(Erosion(src)).

[0091] (2.4) Obtaining contours: Obtain the contours of the region of interest by using the contour extraction algorithm (findContours) to extract the contours of the region of interest and return the corresponding information. In the contour extraction algorithm, the core contour tracking can be summarized as the following formula:

[0092] Contour(C)={p0,p1,...,p n}

[0093] Among them, pi = (xi, yi) represents the coordinates of the pixel points on the contour.

[0094] (2.4.1) Initial conditions: Let the image be I(x,y), and the pixel value I(x,y) of the binary video frame is either 0, that is, the background, or 1, that is, the foreground.

[0095] (2.4.2) Contour tracking condition: If I(pi) = 1 and pi is an edge pixel, then pi is a contour point.

[0096] (2.4.3) Contour closure condition: Find the next edge pixel pi+1 by searching along the direction of adjacent pixels until returning to the initial point p0, that is, the contour is closed.

[0097] (2.5) Labeling information: Label the identified target objects and generate labeling data containing location information, category information and recognition confidence.

[0098] (2.6) Re-encoding: Use H.264 encoding (such as x264 library) to re-encode the processed and annotated video frames into a video stream in H.264 format.

[0099] (2.6.1) Re-encoding: Capture video through the FFmpeg tool, call the avcodec_find_encoder function to find the appropriate video encoder based on the stored video stream information, and then use the avcodec_alloc_context3 function to allocate structure space; finally, call the avcodec_receive_packet function to obtain the final compressed and encoded multimedia data.

[0100] (2.6.2) Preparation for sending data: Process the timestamp of AVPacket. If startTime is 0, initialize it to the current time. Calculate and update the timestamp. Check dts and pts at the same time. If they are negative, set them to 0 and recalculate the timestamp. Then, when pkt.data() is not empty, prepare the data buffer rbuffer and read the pkt data. If spsdata or ppsdata is empty, initialize the variable. Then, in the loop, determine the starting position and type of the video frame according to the specific start flag, determine the frame type according to mNaluType, store the SPS and PPS type frames, and finally send the frame data in rbuffer. av_packet_unref(pkt) releases the resources. At this point, the preparation of one frame is complete.

[0101] (3) Remote transmission: The re-encoded H.264 video stream is encrypted using an encryption algorithm, and then transmitted to the remote terminal device through secure data communication means, and its integrity is verified.

[0102] (3.1) Video encryption: Use the AES-256 encryption algorithm to encrypt the video data, and use the SHA-256 hash algorithm to calculate the encrypted ciphertext for verification.

[0103] AES-256 is a symmetric encryption algorithm that uses a 256-bit key to encrypt data. Its formula is:

[0104] C=E(K,P)

[0105] Among them, C is the ciphertext (encrypted data), E is the AES encryption function, K is the 256-bit encryption key, and P is the plaintext (data to be encrypted).

[0106] SHA-256 is an irreversible hash algorithm used to generate a fixed-length hash value to verify the integrity of data. Its formula is:

[0107] H=SHA-256(M)

[0108] Where H is the generated 256-bit hash value and M is the input data (a data packet).

[0109] (3.2) Video transmission: transmitted to remote terminal equipment through secure data communication means;

[0110] (3.3) Integrity verification: At the receiving end, the same AES-256 encryption algorithm is used to decrypt the ciphertext, and the decrypted data is hashed with SHA-256 to compare the original hash value and the transmitted hash value to see if they are consistent. If the hash values ​​are the same, it means that the data has not been tampered with.

[0111] The following uses an example to illustrate the technical content of data transmission in step (3) of the present invention:

[0112] 1. AES-256 encryption:

[0113] Choose a 256-bit key K.

[0114] The original video data M is divided into data blocks of several block sizes (usually 128 bits).

[0115] Each data block is encrypted using the key K and the encryption algorithm AES-256 to generate the ciphertext C.

[0116] The formula is: C = AES-256 (K, M).

[0117] 2. SHA-256 hash check

[0118] Perform SHA-256 hash operation on the encrypted ciphertext C to obtain the hash value H(C).

[0119] By comparing the hash values ​​before and after transmission to ensure that they are consistent, it is ensured that the data has not been tampered with during transmission.

[0120] The formula is: H(C)=SHA-256(C).

[0121] Note: H(C) is the hash value of ciphertext C.

[0122] 3. Integrity Verification

[0123] At the receiving end, the same AES-256 is used to decrypt C, and the decrypted data M' is hashed with SHA-256 to compare the original hash value H(M) and the transmitted hash value H(M'). If the hash values ​​are the same, it means that the data has not been tampered with.

[0124] The formula is: if H(M) = H(M'), then the data is complete.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. A method for processing and remotely transmitting video data, characterized in that: The steps include: S1. Video data analysis: Capture video through FFmpeg tool, obtain each frame of the video, and store the corresponding video frame information for subsequent use; S2, video image recognition processing: The image is processed by AI algorithm to detect the category, bounding box coordinates and confidence information of the target, and then the video frame is differentiated and denoised to obtain the target outline. The identified target object is then annotated to obtain the result frame, which is re-encoded using H.

264. S3, Remote transmission: The re-encoded H.264 video stream is encrypted using an encryption algorithm, and then transmitted to the remote terminal device through secure data communication means, and its integrity is verified.

2. A video data processing and remote transmission method as claimed in claim 1, characterized in that: The step S1 specifically includes the following sub-steps: S1.1, Video frame acquisition: During the acquisition process, each frame of the video is acquired in sequence according to the playback order of the video to ensure that all frame data in the video is completely extracted to provide basic materials for subsequent further processing; S1.

2. Video frame information storage: For each captured video frame, various types of information related thereto are extracted, including the frame timestamp, resolution, encoding format, and frame type, and the extracted video frame information corresponding to each frame is stored.

3. A video data processing and remote transmission method as claimed in claim 1, characterized in that: The step S2 includes the following sub-steps: S2.

1. AI recognition model access: Use a deep learning model to identify objects in the extracted video frames. The model classifies and locates objects in the video frames through a convolutional neural network. S2.

2. Use the connected AI model to make judgments: Use the pre-trained AI model to make judgments on the target object, including target classification, state recognition and behavior prediction; S2.3, object motion recognition: Differentiate the video frames to obtain the approximate moving target, and perform noise reduction to reduce the interference information in the image; S2.4, obtaining contours: using the contour extraction algorithm to extract the contours of the region of interest from the video frame after the operation, and returning the corresponding information; S2.5, labeling information: labeling the identified target objects to generate labeling data including location information, category information and recognition confidence; S2.6, re-encoding: Use H.264 encoding to re-encode the processed and annotated video frames into a video stream in H.264 format.

4. A video data processing and remote transmission method as claimed in claim 1, characterized in that: The step S3 includes the following sub-steps: S3.1, Video encryption: Use the AES encryption algorithm to encrypt the video data, and use the SHA hash algorithm to calculate the encrypted ciphertext for verification; S3.2, Video transmission: Transmitted to remote terminal equipment through secure data communication means; S3.3, Integrity verification: At the receiving end, use the same AES encryption algorithm to decrypt the ciphertext, and perform SHA hash operation on the decrypted data to compare whether the original hash value and the transmitted hash value are consistent. If the hash values ​​are the same, it means that the data has not been tampered with.

5. A video data processing and remote transmission method as claimed in claim 3, characterized in that: The step S2.2 specifically includes the following sub-steps: S2.2.1, Input video frame: Assume that the input video frame is frame(i), where i represents the i-th frame; S2.2.2, Image preprocessing: adjust the input video frame frame(i) to the input size required by the YOLOv5 model and perform normalization; S2.2.3, Feature extraction: Extract features from video frames through convolutional neural networks. Feature extraction here is completed through multi-layer convolution operations of the YOLOv5 model, including convolution, batch normalization, and activation function operations; features(i)=CNN YOLOv5 (frame processed (i)) S2.2.4, Object Detection and Classification: The YOLOv5 model converts feature maps into candidate boxes and category predictions. For each candidate box, the model predicts its location and the probability of the category to which it belongs. YOLOv5 uses a single network structure to simultaneously predict the categories and bounding boxes of multiple objects in a single forward pass; boxes(i), class_probs(i)=YOLOv5_Head(features(i)) S2.2.5, Confidence threshold screening: Apply confidence threshold filtering to the detection results and remove candidate boxes with low confidence; valid_boxes(i)={box∈boxes(i)|confidence(box)>threshold} S2.2.6, non-maximum suppression: In order to avoid detecting the same target multiple times, the non-maximum suppression algorithm is used to merge overlapping candidate boxes; final_boxes(i)=NMS(valid_boxes(i), IoU_threshold) S2.2.7, output detection results: finally output the detection results, including the target category, bounding box coordinates and confidence information; detections(i)={(class, bbox, confidence)|class, bbox, confidence∈final_boxes(i)}.

6. A video data processing and remote transmission method as claimed in claim 1, characterized in that: The step S2.3 specifically includes the following sub-steps: S2.3.1, Grayscale: Convert the video frame from color to grayscale through the color space conversion algorithm to reduce the complexity of subsequent processing calculations; S2.3.2, Difference: Use the difference algorithm to calculate the difference between adjacent frames; dst(i,j)=|src1(i,j)-src2(i,j)| S2.3.3, Binarization: Use a binarization algorithm to convert the video frame from difference to binary to highlight the target object; S2.3.4, Opening operation: The morphological opening operation is used to dilate and then corrode the binary video frame to remove small noise, smooth the edge of the target object, and reduce interference items; dst=Dilation(Erosion(src)).

7. A video data processing and remote transmission method as claimed in claim 1, characterized in that: The step S2.4 specifically includes the following sub-steps: S2.4.

1. Initial conditions: In the contour extraction algorithm, the core contour tracking can be summarized as the following formula, where pi = (xi, yi) represents the coordinates of the pixel points on the contour; Contour(C)={p0,p1,...,p n } Let the image be I(x,y), and the pixel value I(x,y) of the binary video frame is either 0, i.e., background, or 1, i.e., foreground; S2.4.2, contour tracking condition: If I(pi) = 1 and pi is an edge pixel, then pi is a contour point; S2.4.

3. Contour closure condition: Find the next edge pixel pi+1 by searching along the direction of adjacent pixels until returning to the initial point p0, that is, the contour is closed.

8. A video data processing and remote transmission method as claimed in claim 1, characterized in that: The step S2.6 specifically includes the following sub-steps: S2.6.1, re-encoding: through FFmpeg, according to the stored video stream information, call avcodec_find_encoder function to find the appropriate video encoder, use avcodec_alloc_context3 to build its operating environment, and then set key parameters including bitrate upper limit, frame rate, GOP, B frame, pixel format according to video characteristics and quality requirements, and finally call avcodec_receive_packet function to obtain the final compressed and encoded multimedia data; S2.6.2, Preparation for sending data: Process the timestamp of AVPacket. If startTime is 0, initialize it to the current time, calculate and update the timestamp, check dts and pts at the same time, if they are negative, set them to 0 and recalculate the timestamp; then when pkt.data() is not empty, prepare the data buffer rbuffer and read the pkt data. If spsdata or ppsdata is empty, initialize the variable. Then, in the loop, determine the starting position and type of the video frame according to the specific start flag, determine the frame type according to mNaluType, perform data storage processing on SPS and PPS type frames, and finally send the frame data in rbuffer. av_packet_unref(pkt) releases the resources. At this point, the preparation of one frame is complete.