An agricultural product video monitoring data compression storage method based on an internet of things

By acquiring the first frame and the remaining frames of each group in the reconstructed video of agricultural product video surveillance data, and confirming the matching area based on the attribution threshold and the preset matching threshold, the problem of poor compression effect of agricultural product video surveillance data is solved, and more efficient storage is achieved.

CN121644823BActive Publication Date: 2026-04-17黑龙江省农业科学院农业遥感与信息研究所
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
黑龙江省农业科学院农业遥感与信息研究所
Filing Date
2026-02-04
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies have poor compression performance for agricultural product video surveillance data, resulting in high storage space requirements.

Method used

By acquiring the first frame and the remaining frames of each group in the reconstructed video of agricultural product video surveillance data, and based on the attribution threshold and the preset matching threshold, the matching region in each frame image is identified, and the reconstructed image is obtained based on the matching region. Finally, the video surveillance data is compressed and stored.

Benefits of technology

It improves the similarity between video frames, enhances the compression effect of video surveillance data, and saves storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644823B_ABST
    Figure CN121644823B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, in particular to a kind of agricultural product video monitoring data compression storage method based on Internet of Things. Including the video monitoring data based on agricultural products, obtain the first frame image of each group in reorganization video and each frame image in the rest of each group;Based on each frame image in the rest of each group and the attribution threshold, obtain each class cluster;Based on each class cluster and the preset matching threshold, confirm the matching area in each frame image;Based on the matching area in each frame image, obtain the reorganization image of each frame;Based on the first frame image of each group in reorganization video and the reorganization image of each frame, obtain compressed video monitoring data;The compressed video monitoring data is stored, and the compressed video monitoring data after storage is obtained.The purpose of the application is to solve the problem that the compression effect of the video monitoring data is poor when the prior art compresses the agricultural product video monitoring data, which leads to the large storage space required for the agricultural product video monitoring data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically to a method for compressing and storing video monitoring data of agricultural products based on the Internet of Things. Background Technology

[0002] Agricultural product quality and safety traceability platforms can help support rural and industrial development by storing video surveillance data of agricultural product growth cycles using blockchain technology for data traceability. However, the growth cycle of agricultural products can easily last hundreds or thousands of hours, making it impractical to store all the monitoring data on the blockchain. Therefore, video surveillance data is typically compressed using frame extraction technology to reduce its volume.

[0003] Currently, video frame extraction technology typically employs fixed-interval frame extraction. This fixed-interval extraction reassembles the extracted data frames into video surveillance data, and optimizes large volumes of agricultural product video surveillance data to a certain size. For the reassembled video surveillance data, video compression algorithms are used to compress the reconstructed video. The principle is to compress the data based on the data redundancy between adjacent frames, specifically through inter-frame compression. Inter-frame compression mainly involves matching blocks between adjacent frames in the video data. The current frame image is reconstructed using the image from the previous frame based on the matching relationship, and then the frame difference between the current frame image and the reconstructed image is recorded for data compression. However, when storing the compressed video data, because the time interval between adjacent frames in the extracted video data is relatively long, there are significant spatial and content differences between adjacent frames. Matching similar pixel blocks when reconstructing the current frame image using the previous frame image is prone to errors. Furthermore, because similar pixel blocks have low similarity, the compression effect for agricultural product video surveillance data is poor, resulting in a large storage space requirement for agricultural product video surveillance data. Summary of the Invention

[0004] To address the technical problem of poor compression performance and large storage requirements in existing technologies for agricultural product video surveillance data, the present invention aims to provide an Internet of Things-based method for compressing and storing agricultural product video surveillance data. The specific technical solution adopted is as follows:

[0005] A method for compressing and storing video surveillance data of agricultural products based on the Internet of Things, the method comprising:

[0006] Acquire video surveillance data of agricultural products;

[0007] Based on video surveillance data of agricultural products, the first frame of each group and the remaining frames of each group are obtained in the reconstructed video.

[0008] Each cluster is obtained based on the remaining frames in each group and the affiliation threshold;

[0009] Based on each cluster and a preset matching threshold, the matching region in each frame of the image is identified.

[0010] Based on the matching region in each frame of the image, obtain the reconstructed image of each frame;

[0011] Compressed video surveillance data is obtained based on the first frame of each group in the reconstructed video and the reconstructed image of each frame.

[0012] The compressed video surveillance data is stored to obtain the stored compressed video surveillance data.

[0013] Preferably, the specific steps for obtaining the first frame image of each group and the remaining frames in each group of the reconstructed video based on agricultural product video surveillance data include:

[0014] The video surveillance data of the agricultural products is processed by frame extraction to obtain a reconstructed video.

[0015] The reconstructed video is structurally divided to obtain the first frame image of each group and the remaining frames of each group in the reconstructed video.

[0016] Preferably, the specific steps for obtaining each cluster based on the remaining frames in each group and the affiliation threshold include:

[0017] Based on the remaining frames in each group, the grayscale continuity coefficient and texture continuity between two adjacent blocks in each frame are determined.

[0018] Each cluster is obtained based on the affiliation threshold and the grayscale continuity coefficient and contextual continuity between two adjacent blocks in each frame of the image.

[0019] Preferably, the specific steps for determining the grayscale continuity coefficient and contextual continuity between two adjacent blocks in each frame image based on the remaining frames in each group include:

[0020] Based on the remaining frames in each group, obtain the grayscale value of each pixel in each block of each frame, the total number of pixels in each block, the intersection line between each block and its neighboring blocks, the edge line within each block, and the area of ​​each block.

[0021] Based on the grayscale value of each pixel in each block of each frame image, the total number of pixels in each block, and the intersection line between each block and its adjacent blocks, the grayscale connection coefficient between two adjacent blocks in each frame image is determined.

[0022] Based on the intersection lines between each block and its neighboring blocks, the edge lines within each block, and the area of ​​each block, the continuity between two adjacent blocks in each frame of the image is confirmed.

[0023] Preferably, the specific steps for obtaining each cluster based on the affiliation threshold and the grayscale continuity coefficient and contextual continuity between two adjacent blocks in each frame image include:

[0024] Based on the grayscale connection coefficients of the two blocks formed by each block and its adjacent blocks, and the contextual connection between each block and its adjacent blocks, the degree of belonging between each block and its adjacent blocks is obtained.

[0025] Each cluster is obtained based on the affiliation threshold and the affiliation between each block and its neighboring blocks.

[0026] Preferably, the specific steps for confirming the matching region in each frame of an image based on each cluster and a preset matching threshold include:

[0027] Based on each cluster and the preset matching threshold, the degree of matching between each incorrectly matched block and each block in the previous frame video image, as well as the degree of inter-frame compression matching, are obtained.

[0028] Based on the matching degree of each incorrectly matched block and the inter-frame compression matching degree, the matching region in each frame image is identified.

[0029] Preferably, based on each cluster and a preset matching threshold, the specific steps for obtaining the matching degree between each incorrectly matched block and each block in the previous frame video image, as well as the inter-frame compression matching degree, include:

[0030] Based on each cluster, the preset matching threshold, and the remaining frames in each group, obtain the inter-frame compressed matching vector for each region, the matching relationship vector for each cluster, and each incorrectly matched block.

[0031] The inter-frame compression matching degree is obtained based on the matching vector of inter-frame compression for each region and the matching relationship vector of each cluster.

[0032] Based on each incorrectly matched block, the degree of matching between each incorrectly matched block and each block in the previous frame of the video image is obtained.

[0033] Preferably, the specific steps for obtaining the reconstructed image of each frame based on the matching region in each frame include:

[0034] The matching region in the previous frame of each image is replaced with the matching region in the current frame to obtain the reconstructed image of each frame.

[0035] Preferably, the specific steps for obtaining compressed video surveillance data based on the first frame image of each group in the reconstructed video and the reconstructed image of each frame include:

[0036] The first frame of each group in the reconstructed video is compressed to obtain the compressed first frame of each group in the reconstructed video.

[0037] The reconstructed image of each frame is compared with the remaining frames in each group to obtain the frame difference result.

[0038] Based on the first frame image and frame difference results of each group of compressed images in the reconstructed video, compressed video surveillance data is obtained.

[0039] Preferably, the specific steps for storing the compressed video surveillance data to obtain the stored compressed video surveillance data include:

[0040] By using blockchain, compressed video surveillance data is stored on the chain, resulting in stored compressed video surveillance data.

[0041] The present invention has the following beneficial effects:

[0042] This invention utilizes video surveillance data of agricultural products to acquire the first frame image of each group and the remaining frames within each group in a reconstructed video. Based on the remaining frames and a membership threshold, each cluster is identified. Based on each cluster and a preset matching threshold, matching regions in each frame are confirmed. Based on the matching regions in each frame and the matching regions in the previous frame, a reconstructed image of each frame is acquired. Compressed video surveillance data is obtained based on the first frame image of each group and the reconstructed images of each frame. The compressed video surveillance data is then stored to obtain the stored compressed video surveillance data. By confirming the matching regions in each frame image, the similarity between different extracted video frames is improved. This allows for improved compression of the reconstructed video by changing the specific extracted video frames to obtain the reconstructed image of each frame, thereby saving storage space. Attached Figure Description

[0043] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart illustrating an IoT-based method for compressing and storing video surveillance data of agricultural products, as provided in one embodiment of the present invention. Detailed Implementation

[0045] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a method for compressing and storing agricultural product video monitoring data based on the Internet of Things (IoT) proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0047] The following description, in conjunction with the accompanying drawings, details a specific scheme for a method of compressing and storing agricultural product video monitoring data based on the Internet of Things, provided by the present invention.

[0048] Please see Figure 1 This document illustrates a flowchart of an IoT-based method for compressing and storing agricultural product video monitoring data, according to an embodiment of the present invention. The method comprises the following steps:

[0049] S100. Acquire video surveillance data of agricultural products. Specifically, taking cabbage as an example, a surveillance camera is used to capture and collect video data of the agricultural product at 30 frames per second. In this embodiment, the starting date is selected from the date the agricultural product is sown or transplanted to the location monitored by the video camera, and the ending date is selected from the date the agricultural product is harvested. All video surveillance data between the starting date and the ending date is then acquired. For example, the surveillance camera is set at a height of 1 meter above the ground so that the growth of the agricultural product can be observed through the surveillance camera.

[0050] S200: Based on video surveillance data of agricultural products, acquire the first frame image of each group in the reconstructed video and the remaining frames in each group.

[0051] S300. Based on the remaining frames of each group and the affiliation threshold, obtain each cluster.

[0052] S400. Based on each cluster and the preset matching threshold, confirm the matching region in each frame image.

[0053] S500. Based on the matching region in each frame image, obtain the reconstructed image of each frame.

[0054] S600: Based on the first frame of each group in the reconstructed video and the reconstructed image of each frame, obtain compressed video surveillance data.

[0055] S700: Store the compressed video surveillance data to obtain the stored compressed video surveillance data.

[0056] This invention utilizes video surveillance data of agricultural products to acquire the first frame image of each group and the remaining frames within each group in a reconstructed video. Based on the remaining frames and a membership threshold, each cluster is identified. Based on each cluster and a preset matching threshold, matching regions in each frame are confirmed. Based on the matching regions in each frame and the matching regions in the previous frame, a reconstructed image of each frame is acquired. Compressed video surveillance data is obtained based on the first frame image of each group and the reconstructed images of each frame. The compressed video surveillance data is then stored to obtain the stored compressed video surveillance data. By confirming the matching regions in each frame image, the similarity between different extracted video frames is improved. This allows for improved compression of the reconstructed video by changing the specific extracted video frames to obtain the reconstructed image of each frame, thereby saving storage space.

[0057] The specific steps of S200 include:

[0058] Frame extraction is performed on the video surveillance data of agricultural products to obtain a reconstructed video. In this embodiment, the length of the reconstructed video is selected, denoted as TM, for example, 3 minutes; then the total length of all collected video surveillance data is obtained and converted into minutes, denoted as TA; the frame extraction ratio is determined by the ratio of the length of the reconstructed video to the total length of the video surveillance data, as shown in the following formula:

[0059] ;

[0060] Where L is the ratio of the length of the reconstructed video to the total length of the video surveillance data. When the value of L is a decimal, L is rounded down, and the video surveillance data is extracted according to the rounded ratio. All the extracted video frames are then reconstructed in sequence to obtain the reconstructed video.

[0061] The reconstructed video is structurally divided, and the first frame of each group and the remaining frames of each group are obtained.

[0062] In this embodiment, when compressing the reconstructed video using the H.264 compression algorithm, the reconstructed video needs to be divided into Group of Pictures (GOPs). Specifically, a fixed length of 10 GOPs is used, meaning every ten video data frames constitute one GOP. The reconstructed video is divided into several GOPs, with each GOP containing at least one video frame. Then, the first frame of each GOP and all other frames within each GOP are obtained. The first frame is the I-frame, which is compressed using intra-frame compression in this embodiment. The remaining frames within each GOP are the non-I-frame frames.

[0063] During the growth of agricultural products, from the seedling stage to the mature stage, the branches and leaves of crops become increasingly lush. However, due to factors such as sunlight, humidity, and the growth cycle, the position of the branches and leaves in each frame of the image varies at different times. Furthermore, because there is a high degree of similarity among the branches and leaves of crops, combined with the long time intervals between adjacent images in the reconstructed video, a problem arises. To address the issue of mismatches occurring when performing image patch similarity matching between adjacent images in the reconstructed video, resulting in poor compression performance due to these mismatches, a solution is needed.

[0064] The specific steps of S300 include:

[0065] Based on the remaining frames in each group, the grayscale continuity coefficient and contextual continuity between adjacent blocks in each frame are determined. This step specifically includes: based on the remaining frames in each group, obtaining the grayscale value of each pixel in each block, the total number of pixels in each block, the intersection line between each block and its adjacent blocks, the edge lines within each block, and the area of ​​each block. Specifically, each frame is uniformly divided into several blocks; for example, the area of ​​the divided blocks is square.

[0066] Based on the grayscale value of each pixel in each block of each image frame, the total number of pixels in each block, and the intersection line between each block and its neighboring blocks, the grayscale transition coefficient between two adjacent blocks in each image frame is determined. Specifically, the shortest Euclidean distance from each pixel in each block to the intersection line between that block and its neighboring blocks is determined. The formula for calculating the transition grayscale value between each block and its neighboring blocks is as follows:

[0067] ;

[0068] In the formula: Represents the c-th block The vth adjacent block The transition grayscale, Represents the c-th block The Middle The grayscale value of each pixel; Represents the c-th block The first in From the c-th pixel to the c-th block The vth adjacent block The shortest Euclidean distance between the junctions; Represents the c-th block The total number of pixels within the unit.

[0069] Similarly, calculate the v-th block. The c-th adjacent block grayscale transition The grayscale transition coefficient between two blocks is calculated using the transition grayscale values ​​of the two blocks, as shown in the following formula:

[0070] ;

[0071] In the formula: Represents the c-th block The vth adjacent block The grayscale transition coefficient between them Represents the c-th block The vth adjacent block The transition grayscale; Represents the v-th block The c-th adjacent block The transition grayscale; Represents an exponential function; Symbols representing blocks.

[0072] Based on the intersection line between each block and its neighboring blocks, the edge lines within each block, and the area of ​​each block, the continuity between two adjacent blocks in each frame is confirmed. Specifically, based on the intersection line between each block and its neighboring blocks and the edge lines within each block, the location points where the edge lines within each block connect to the intersection line are obtained. Using a greedy algorithm, the location points of each block are matched with the location points of its neighboring blocks using the minimum Euclidean distance, obtaining the matching relationships of all location points; this is then used to match the edge lines of two adjacent blocks.

[0073] The larger the area occupied by an edge line within its region, the more significant the information it represents is to the current region. Therefore, the extent of edge line spread within its region is calculated: Construct the minimum bounding rectangle for each edge line within each block and determine its area; simultaneously, determine the area of ​​each block; then, calculate the extent of edge line spread within its block using the following formula:

[0074] ;

[0075] In the formula: Represents the c-th block The k-th inner edge line The extent of its spread Represents the c-th block The k-th inner edge line The area of ​​the smallest bounding rectangle is used to characterize the sprawling region; Let be the area of ​​the c-th block.

[0076] Based on the edge line matching relationship between each block and its adjacent blocks, the extent to which the matching edge lines within each block spread within its adjacent blocks is obtained. The formula for calculating the connectivity is as follows:

[0077] ;

[0078] In the formula: Represents the c-th block The vth adjacent block The coherence of the context, Represents the c-th block The k-th edge line within The extent of its spread; Represents the c-th block The k-th inner edge line Matching edge lines In its adjacent v-th block The extent of spread within the block, M represents the c-th block. The total number of middle edge lines.

[0079] Based on the affiliation threshold and the grayscale continuity coefficient and contextual continuity between two adjacent blocks in each frame image, each cluster is obtained. Specifically, this step includes: obtaining the affiliation degree between each block and its adjacent blocks based on the grayscale continuity coefficients of the two blocks formed by each block and its adjacent blocks, and the contextual continuity between each block and its adjacent blocks. The formula for calculating the affiliation degree between two adjacent blocks is as follows:

[0080] ;

[0081] In the formula: Represents the c-th block The vth adjacent block Degree of belonging between them Represents the c-th block The vth adjacent block The grayscale transition coefficient between them; Represents the c-th block The vth adjacent block The degree of connection between them. The higher the degree of belonging, the more likely two adjacent blocks are to represent the same area.

[0082] Based on the affiliation threshold and the affiliation degree between each block and its neighboring blocks, a region growing algorithm is used to obtain each cluster. In this embodiment, the affiliation threshold is 0.4. In this step, each block is used as a seed point, and the selection density of seed points is 1:9, meaning there is one seed point region among 9 blocks. Taking each seed point region as the center, the affiliation degree between each seed point region and its surrounding neighboring regions is obtained; according to the affiliation threshold, other regions around each type of sub-point region are merged into the seed point region, and the newly added regions are used as new seed points; this process continues until each cluster is obtained.

[0083] Each cluster represents a morphological region of a crop. When performing inter-frame compression on the reconstructed video, if each block within the current video frame searches for a similar region in the previous video frame, the matching paths within the same cluster will show similarity. Therefore, it is necessary to correct the similarity matching relationship for inter-frame compression. In this embodiment, the specific steps of S400 include:

[0084] Based on each cluster and a preset matching threshold, the matching degree between each mismatched block and each block in the previous frame of video image, as well as the inter-frame compression matching degree, are obtained. Specifically, this step includes: based on each cluster, the preset matching threshold, and the remaining frames in each group, obtaining the inter-frame compression matching vector for each region, the matching relationship vector for each cluster, and each mismatched block. The preset matching threshold is 0.5.

[0085] The inter-frame compression matching degree is obtained based on the matching vector of each region's inter-frame compression and the matching relationship vector of each cluster. Specifically, the best matching region is found for each block within each cluster in the previous frame of video image. The center point of each block and the center point of its matching region are obtained; the inter-frame compression matching vector of each block is obtained, starting from the position of the center point of each block and ending at the position of the center point of the matching region. The average of the matching vectors of each block within each cluster is calculated to obtain the matching relationship vector of each cluster. The formula for calculating the inter-frame compression matching degree is as follows:

[0086] ;

[0087] In the formula: Represents the c-th block The degree of inter-frame compression matching, Represents the c-th block Matching relationship vector during inter-frame compression; Represents the m-th cluster The matching relationship vector; express Cosine similarity; Represents an exponential function; express Differences in modulus length.

[0088] If the inter-frame compression matching degree of each block within each cluster is less than the preset matching threshold, it indicates that a matching error has occurred in that block.

[0089] For each incorrectly matched block, the matching degree between each incorrectly matched block and each block in the previous frame of the video image is obtained. Based on each incorrectly matched block and the remaining frames in each group, the average grayscale of each incorrectly matched block and each incorrectly matched block in the previous frame of the video image is obtained. The formula for calculating the matching degree between each incorrectly matched block and each block in the previous frame of the video image is as follows:

[0090] ;

[0091] in, Represents the c-th block Average gray level, Represents the c-th block The k-th block in the previous frame of the video image The average gray level.

[0092] Based on the matching degree of each incorrectly matched block and the inter-frame compression matching degree, the matching region in each frame is identified. Specifically, a matching vector is obtained by connecting the center points of each block to the blocks in the previous frame; the inter-frame compression matching degree between each incorrectly matched block and the blocks in the previous frame is obtained; thus, the matching degree of each incorrectly matched block is corrected. The formula for calculating the corrected matching degree is as follows:

[0093] ;

[0094] In the formula: This represents the c-th block that mismatched. Compared to the k-th block in the previous frame of video image The degree of correction matching, This represents the c-th block that mismatched. Compared to the k-th block in the previous frame of video image The degree of matching; This represents the c-th block that mismatched. Compared to the k-th block in the previous frame of video image The degree of inter-frame compression matching is determined. Based on the corrected matching degree, the matching region in each frame is obtained.

[0095] The specific steps of S500 include:

[0096] The matching region in the previous frame of each image is replaced with the matching region in the current frame to obtain the reconstructed image of each frame. This step specifically includes:

[0097] The first frame of each group in the reconstructed video is compressed to obtain the compressed first frame of each group in the reconstructed video.

[0098] The reconstructed image of each frame is compared with the remaining frames in each group to obtain the frame difference result.

[0099] Compressed video surveillance data is obtained based on the first frame image and frame difference results of each group of compressed images in the reconstructed video.

[0100] By leveraging blockchain technology, compressed video surveillance data is stored on the chain, resulting in stored compressed video surveillance data. Through the reconstruction of each frame, the compression effect during inter-frame compression of the reconstructed video is improved, saving storage space and reducing the storage pressure on the blockchain. This also enhances the overall efficiency and visibility of video surveillance data traceability for agricultural products.

[0101] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0102] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A method for compressing and storing video surveillance data of agricultural products based on the Internet of Things, characterized in that, The method includes: Acquire video surveillance data of agricultural products; Based on video surveillance data of agricultural products, the first frame of each group and the remaining frames of each group are obtained in the reconstructed video. Each cluster is obtained based on the remaining frames in each group and the affiliation threshold; Based on each cluster and a preset matching threshold, the matching region in each frame of the image is identified. Based on the matching region in each frame of the image, obtain the reconstructed image of each frame; Compressed video surveillance data is obtained based on the first frame of each group in the reconstructed video and the reconstructed image of each frame. The compressed video surveillance data is stored to obtain the stored compressed video surveillance data; The specific steps for obtaining each cluster based on the remaining frames in each group and the attribution threshold include: Based on the remaining frames in each group, the grayscale continuity coefficient and texture continuity between two adjacent blocks in each frame are determined. Based on the affiliation threshold and the grayscale continuity coefficient and contextual continuity between two adjacent blocks in each frame of the image, each cluster is obtained; The specific steps for determining the grayscale continuity coefficient and texture continuity between two adjacent blocks in each frame image based on the remaining frames in each group include: Based on the remaining frames in each group, obtain the grayscale value of each pixel in each block of each frame, the total number of pixels in each block, the intersection line between each block and its neighboring blocks, the edge line within each block, and the area of ​​each block. Based on the grayscale value of each pixel in each block of each frame image, the total number of pixels in each block, and the intersection line between each block and its adjacent blocks, the grayscale connection coefficient between two adjacent blocks in each frame image is determined. Based on the intersection line between each block and its neighboring blocks, the edge line within each block, and the area of ​​each block, the continuity between two adjacent blocks in each frame of the image is confirmed. Based on the affiliation threshold and the grayscale continuity and contextual continuity between two adjacent blocks in each frame of the image, the specific steps for obtaining each cluster include: Based on the grayscale connection coefficients between each block and its adjacent blocks, and the contextual connection between each block and its adjacent blocks, the degree of belonging between each block and its adjacent blocks is obtained. Each cluster is obtained based on the affiliation threshold and the affiliation between each block and its neighboring blocks.

2. The method for compressing and storing agricultural product video surveillance data based on the Internet of Things according to claim 1, characterized in that, The specific steps for obtaining the first frame image of each group and the remaining frames in each group from the video surveillance data based on agricultural products include: The video surveillance data of the agricultural products is processed by frame extraction to obtain a reconstructed video. The reconstructed video is structurally divided to obtain the first frame image of each group and the remaining frames of each group in the reconstructed video.

3. The method for compressing and storing agricultural product video monitoring data based on the Internet of Things according to claim 1, characterized in that, Based on each cluster and a preset matching threshold, the specific steps for confirming the matching region in each frame of the image include: Based on each cluster and the preset matching threshold, the degree of matching between each incorrectly matched block and each block in the previous frame video image, as well as the degree of inter-frame compression matching, are obtained. Based on the matching degree of each incorrectly matched block and the inter-frame compression matching degree, the matching region in each frame image is identified.

4. The method for compressing and storing agricultural product video monitoring data based on the Internet of Things according to claim 3, characterized in that, Based on each cluster and a preset matching threshold, the specific steps for obtaining the matching degree between each incorrectly matched block and each block in its previous video frame, as well as the inter-frame compression matching degree, include: Based on each cluster, the preset matching threshold, and the remaining frames in each group, obtain the inter-frame compressed matching vector for each region, the matching relationship vector for each cluster, and each incorrectly matched block. The inter-frame compression matching degree is obtained based on the matching vector of inter-frame compression for each region and the matching relationship vector of each cluster. Based on each incorrectly matched block, the degree of matching between each incorrectly matched block and each block in the previous frame of the video image is obtained.

5. The method for compressing and storing agricultural product video monitoring data based on the Internet of Things according to claim 1, characterized in that, The specific steps for obtaining the reconstructed image of each frame based on the matching region in each frame include: The matching region in the previous frame of each image is replaced with the matching region in the current frame to obtain the reconstructed image of each frame.

6. The method for compressing and storing agricultural product video monitoring data based on the Internet of Things according to claim 1, characterized in that, The specific steps for obtaining compressed video surveillance data based on the first frame image of each group in the reconstructed video and the reconstructed images of each frame include: The first frame of each group in the reconstructed video is compressed to obtain the compressed first frame of each group in the reconstructed video. The reconstructed image of each frame is compared with the remaining frames in each group to obtain the frame difference result. Based on the first frame image and frame difference results of each group of compressed images in the reconstructed video, compressed video surveillance data is obtained.

7. The method for compressing and storing agricultural product video surveillance data based on the Internet of Things according to any one of claims 1 to 6, characterized in that, The specific steps for storing the compressed video surveillance data to obtain the stored compressed video surveillance data include: By using blockchain, compressed video surveillance data is stored on the chain, resulting in stored compressed video surveillance data.

Citation Information

Patent Citations

  • Intelligent disaster exploration site video frame efficient compression system and method based on target clustering

    CN113205010A

  • Video coding method and system based on multi-channel concurrent software and hardware mixing

    CN120455690A