High-definition monitoring video storage method and system based on RGB color pixel coding

By assigning RGB color pixel encoding to the surveillance video, dynamically adjusting the frame rate and threshold, and storing only the changing pixel data, the problems of image quality loss and low storage efficiency in the existing technology are solved, and high-definition video can be stored efficiently and played back with low latency.

CN121985127APending Publication Date: 2026-05-05SHANDONG XINKUANG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG XINKUANG INFORMATION TECH CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing high-definition surveillance video storage technology cannot simultaneously meet the requirements of lossless image quality preservation, efficient and cost-effective storage, and low latency retrieval. In particular, there is data redundancy in static scenes, and detail loss in high dynamic scenes. Furthermore, it lacks the ability to effectively distinguish key areas and has insufficient image processing capabilities.

Method used

The method adopts RGB color pixel encoding, assigns a unique coordinate identifier to each pixel, analyzes the dynamics of the screen in real time, dynamically adjusts the frame rate and threshold, stores only the data of changed pixels, and directly renders RGB data to restore the screen during playback, combined with differentiated threshold processing for key areas.

Benefits of technology

It achieves native image quality restoration of 1080P/4K/8K high-definition video, reduces storage redundancy and latency, improves image quality fidelity and storage efficiency, adapts to different scenario needs, and ensures the recognition and storage of key details.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121985127A_ABST
    Figure CN121985127A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of security and protection monitoring video storage, in particular to a high-definition monitoring video storage method and system based on RGB color pixel coding, and the method comprises the steps: building coordinates for an initial frame pixel by pixel, collecting original RGB data, and building an initial database; the dynamic degree of the picture is analyzed in real time, and the acquisition frame rate and the pixel change judgment threshold value are automatically matched. Then, collecting subsequent frames according to the matching frame rate, calculating the color change degree relative to the previous frame pixel by pixel, and judging whether the pixels need to be updated or not according to a threshold value; storing coordinates, new RGB codes and timestamps of the pixels needing to be updated; and for the non-updated pixels, not storing the RGB data of the non-updated pixels, and caching the complete RGB data of the non-updated pixels when the whole frame is judged to be a static frame. During playback, an initial database is taken as a basis, and the cached static data and the stored dynamic data are combined to directly render an RGB picture, so that lossless, efficient and low-delay playback is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of security monitoring video storage technology, specifically to a high-definition monitoring video storage method and system based on RGB color pixel encoding. Background Technology

[0002] High-definition / ultra-high-definition (1080P / 4K / 8K) surveillance has become a core requirement in fields such as public safety and unattended data centers. Its key technologies focus on lossless image quality preservation, efficient and cost-effective storage, and low latency retrieval. However, existing mainstream technologies all have significant shortcomings and cannot simultaneously meet these requirements.

[0003] Taking traditional coding technologies such as H.265 as an example, although compression is achieved through intra-frame prediction and transform coding, visual information is irreversibly discarded. This results in a blurring rate of 15%-20% for key details such as license plates in 4K videos. Furthermore, remote access requires a complex decoding process, with latency generally exceeding 100 milliseconds. In addition, it still uses a fixed bitrate for storing static scenes, resulting in redundant data accounting for over 60% and high storage costs.

[0004] Another type of improvement attempts to break through the encoding logic by using pixel-level change detection. However, it uses a fixed change threshold and frame rate, lacks scene adaptability, and generates frame rate redundancy in static scenes, while causing loss of detail in highly dynamic scenes. At the same time, this type of solution does not differentiate key areas according to the needs of the monitoring scene, and has weak ability to resist interference such as sudden changes in ambient light, with a picture distortion rate of 8%-12%.

[0005] In summary, existing technologies either suffer from image quality loss and high latency due to inherent encoding mechanisms, or their rigid pixel-level processing design cannot adapt to complex and ever-changing monitoring scenarios. They have common technical gaps in image quality preservation, dynamic adaptation, intelligent compression, and anti-interference, and urgently require an innovative storage method to solve these problems. Summary of the Invention

[0006] To address the problems of image quality loss, poor scene adaptation, and low storage efficiency in existing technologies, this invention provides a high-definition surveillance video storage method and system based on RGB color pixel encoding.

[0007] In a first aspect, the present invention provides a method for storing high-definition surveillance video based on RGB color pixel encoding, comprising the following steps: Step 1: Obtain the initial frame of the monitoring video stream, assign a unique coordinate identifier to each pixel and collect its native RGB data to build an initial database of pixel coordinates-RGB encoding; Step 2: Analyze the proportion of moving objects in the image in real time, and automatically match the corresponding acquisition frame rate and pixel change judgment threshold based on the proportion range; Step 3: Collect subsequent frames according to the matching frame rate, calculate the degree of change of its RGB data relative to the RGB data of the same coordinate pixel in the previous frame, and determine whether the pixel needs to be updated based on the judgment threshold. Step 4: For pixels determined to need updating, use their RGB encoding in the current video frame as the updated RGB encoding; store their coordinate identifier, updated RGB encoding, and frame timing information; for pixels determined not to be updated, do not store their RGB encoding data, and when a frame is determined to be a static frame, write the complete RGB encoding data of the static frame into the inter-frame buffer unit. Step 5: When playing back the video, based on the initial database, according to the frame timing information, call the corresponding static frame data in the inter-frame buffer unit, and combine it with the stored dynamically updated pixel data to perform RGB color rendering pixel by pixel to restore the high-definition monitoring screen.

[0008] Using pixel-level native RGB data as the core of processing, it avoids the irreversible compression and loss of pixel information caused by traditional video encoding, ensuring that every pixel detail of the 4K / 8K ultra-high-definition monitoring video is completely and accurately recorded and restored from the data source.

[0009] By dynamically adapting to the scene and automatically adjusting the frame rate and judgment threshold, and combining this with a precise storage strategy that reuses static data and only changes in pixels, data redundancy in static scenes is eliminated.

[0010] During playback, RGB data is directly called for rendering, completely eliminating the time-consuming decoding-rendering process in traditional solutions, and greatly reducing end-to-end playback latency.

[0011] As a further limitation of the technical solution of the present invention, step 1 specifically includes: Step 11: Identify the resolution specifications of the surveillance video stream and determine the total number of pixels in the image accordingly, forming a corresponding pixel matrix; Step 12: Establish a two-dimensional rectangular coordinate system with the top left corner of the video screen as the origin, and assign a unique coordinate identifier to each pixel in the pixel matrix. The coordinate identifier is a (X,Y) coordinate pair, where X represents the column number and Y represents the row number. Step 13: Obtain the original red, green, and blue component values ​​for each pixel; Step 14: Combine the red, green, and blue component values ​​collected for each pixel to generate the RGB code for that pixel; Step 15: Associate and store the coordinates of all pixels with their corresponding RGB codes to build an initial database of pixel coordinates-RGB codes. Store this initial database in a non-volatile storage unit of the storage device as the reference data source for image rendering during video playback.

[0012] By clearly defining the complete process of resolution identification, coordinate system establishment, component acquisition, encoding combination and associated storage, it ensures that the coordinate identifier of each pixel corresponds one-to-one with the RGB code, providing an accurate benchmark for subsequent pixel change judgment and image rendering, and avoiding image quality distortion or playback abnormalities caused by initial data chaos.

[0013] The initial database is stored in a non-volatile storage unit to prevent data loss and ensure the stability of the initial baseline data in long-term monitoring scenarios, providing a continuous and reliable data source for subsequent frame reuse and image restoration.

[0014] As a further limitation of the technical solution of the present invention, step 2 specifically includes: Step 21: Calculate in real time the percentage of moving object pixels in the current video frame relative to the total number of pixels in the frame; based on the preset range to which this percentage belongs, classify the current scene into one of the following three categories: Static scenario: The percentage is less than the first percentage threshold; Medium dynamic scenario: The percentage is between the first percentage threshold and the second percentage threshold; High dynamic scenarios: The percentage is greater than the second percentage threshold; Step 22: Based on the determined scene category, automatically match and enable the corresponding combination of acquisition frame rate and pixel change judgment threshold, where: When a scene is determined to be static, the matching frame rate is within the first frame rate threshold range, and the matching pixel change determination threshold is within the first determination threshold range. When the scene is determined to be a moderately dynamic scene, the matching acquisition frame rate is within the second frame rate threshold range, and the matching pixel change judgment threshold is the second judgment threshold. When a scene is identified as a high dynamic scene, the matching acquisition frame rate is within the third frame rate threshold range, and the matching pixel change judgment threshold is within the third judgment threshold range.

[0015] By clearly defining percentage thresholds to classify scenarios into three categories—static, moderately dynamic, and highly dynamic—the criteria for scenario determination are quantified and standardized, avoiding parameter matching deviations caused by subjective judgments and improving the accuracy of scenario adaptation.

[0016] Pre-set corresponding frame rate and change threshold combinations for different scene categories, making parameter adjustments systematic. This ensures that static scenes reduce frame rate and minimize storage redundancy, while highly dynamic scenes improve frame rate and sensitivity to guarantee detail capture, thus addressing the adaptation shortcomings of existing technologies with fixed parameters. Clearly defining the execution logic for scene determination and parameter matching facilitates engineering implementation, reduces the deployment difficulty of the technical solution, and ensures rapid and accurate scene identification and parameter adaptation in actual monitoring scenarios.

[0017] As a further limitation of the technical solution of the present invention, in step 3, for each frame of video acquired according to the matching frame rate, the following operations are performed: Step 31: Traverse every pixel in the current frame and obtain its current red color. ,green ,blue Component values, and obtain the red color of the pixel at the same coordinates in the previous frame. ,green ,blue Component value; Step 32: Calculate the color variation of the pixel using the following formula. :

[0018] In the formula, The sum of the maximum differences among the RGB values; Step 33: Calculate the color change degree Pixel change determination threshold matching the current scene Comparison: like If so, then the pixel is determined to be the pixel that needs to be updated; like If the pixel is not updated, then it is determined to be a pixel that has not been updated.

[0019] The color change is calculated using a clear formula, and quantitative evaluation is performed based on the sum of the differences between the RGB three color components. This avoids the one-sidedness of a single threshold judgment and makes the pixel change judgment result more consistent with the actual changes in the picture.

[0020] By employing a standardized process of traversing pixels, acquiring component values, calculating variability, and comparing thresholds, the update determination of each pixel is ensured to follow uniform rules, avoiding omissions or misjudgments and guaranteeing that dynamic pixels are stored without omission and static pixels are stored without redundancy. The variability determination threshold is linked to scene adaptation logic, enabling pixel update determination to dynamically adjust sensitivity according to the scene. In highly dynamic scenes, it accurately captures subtle changes, while in static scenes, it reduces invalid determinations, balancing detail preservation and storage efficiency.

[0021] As a further limitation of the technical solution of the present invention, step 4 specifically includes: Step 41: For a pixel that is determined to need to be updated, use its RGB encoding in the current video frame as the updated RGB encoding, and store it together with the pixel's coordinate identifier and the frame timing information of the current video frame as a record. Step 42: For pixels determined not to have been updated, do not write their RGB encoded data to the main storage system; Step 43: When the proportion of pixels that are determined not to be updated in a whole frame exceeds the preset proportion, the frame is determined to be a static frame, and the complete RGB encoded data of the static frame is written into the inter-frame buffer unit.

[0022] Complete associated data is stored only for pixels that need to be updated. Pixels that are not updated do not occupy main storage resources, enabling on-demand storage and significantly reducing storage overhead. High compression ratio storage can be achieved, especially in static scenarios.

[0023] Writing complete static frame data into the inter-frame buffer provides a fast retrieval channel for static pixel reuse in subsequent frames, avoids the tedious operation of reverse association of historical frames, improves data reading efficiency, and reduces read / write latency.

[0024] By defining static frames using a preset ratio threshold, the logic for determining static frames becomes clear, ensuring the validity of cached data and providing high-quality static data support for image composition during playback. At the same time, it further optimizes the allocation of storage resources.

[0025] As a further limitation of the technical solution of the present invention, step 5 specifically includes: Step 51: Call and load the pixel coordinate-RGB encoding initial database as the complete initial frame for video playback; Step 52: Based on the time period to be replayed, sequentially read the stored frame timing information; for each frame timing, perform the following operations: a. Based on the frame timing information, retrieve and obtain the RGB encoded data of the complete static frame corresponding to the timing from the inter-frame buffer unit; b. Based on the same frame timing information, retrieve all records in the storage system that are determined to be pixels that need to be updated under that timing, each record containing coordinate identifiers and updated RGB codes; Step 53: Using the initial image as a base, fill the corresponding coordinates with the RGB encoded data of the static frame; then, according to the coordinate identifier in the dynamically updated pixel record, replace the RGB encoding of the corresponding coordinates in the base with the updated RGB encoding carried by it, thereby synthesizing the complete image frame of the current time sequence. Step 54: Output the RGB data of the synthesized image frame directly to the display unit for rendering and display.

[0026] Based on an initial database, layered synthesis is performed by combining cached static frame data and dynamically updated data to ensure that the pixel data of each frame accurately corresponds, achieving native image quality restoration without the loss of detail caused by encoding and decoding. No decoding process is required; the synthesized frame is directly retrieved and replaced through data retrieval and output rendering, significantly reducing the computational power consumption during playback and shortening end-to-end latency, resulting in smooth and fast video playback.

[0027] Data is read sequentially based on frame timing information and images are synthesized to ensure the temporal continuity of playback images, avoid image distortion, guarantee the accuracy of retrospective identification, and meet the core requirements of surveillance video playback.

[0028] As a further limitation of the technical solution of the present invention, the method further includes: Designate at least one key monitoring area in the monitoring screen; Based on the pixel change determination threshold matched in step 22, a lower bias threshold is set for the key monitoring area and an upper bias threshold is set for the non-key monitoring area. In step 3, for pixels located in key monitoring areas, the lower threshold is used for comparison and determination; for pixels located in non-key monitoring areas, the upper threshold is used for comparison and determination.

[0029] Setting a lower threshold for key monitoring areas enhances the sensitivity of change detection, ensuring that even minute pixel changes in critical areas such as entrances / exits and checkout counters are accurately captured and stored, guaranteeing detailed backtracking capabilities for critical scenarios. Setting an upper threshold for non-key areas reduces the sensitivity of change detection, decreases invalid storage in non-critical areas, further improves overall storage efficiency, and achieves differentiated management by providing precise protection for key areas and efficient compression for non-key areas.

[0030] Based on global scenario adaptation, regionally differentiated threshold settings are added to make the technical solution more suitable for the actual needs of monitoring scenarios, and solve the problems of insufficient detail protection or storage redundancy caused by the failure of existing technologies to distinguish key areas.

[0031] As a further limitation of the technical solution of the present invention, the method further includes: Cyclic redundancy check is performed periodically on the stored pixel coordinate identifiers and their associated RGB encoded data; When the verification detects a data error, an error recovery or alarm mechanism is triggered.

[0032] Periodic cyclic redundancy check (CRUD) enables real-time monitoring of the integrity and accuracy of stored data, timely detection of data errors, and prevention of playback distortion or data loss due to data corruption. When an error is detected, a recovery or alarm mechanism is triggered, allowing for rapid retrieval of correct data for repair or timely alerting administrators to address the fault, ensuring the continuity and reliability of monitoring data and preventing data issues from affecting the effectiveness of monitoring and backtracking.

[0033] As a further limitation of the technical solution of the present invention, the method also includes abnormal pixel repair: If a pixel is determined to need updating in step 33, and its color change is greater than a preset high anomaly threshold, and the average color change of all other pixels in the preset neighborhood centered on that pixel is less than a preset low anomaly threshold, then the pixel is determined to be an abnormal pixel. The RGB code of the abnormal pixel is replaced with the arithmetic mean of the RGB codes of other pixels in the preset neighborhood.

[0034] By using a high anomaly threshold and the mean of neighborhood variability for dual judgment, it accurately identifies single-point abnormal pixels caused by sudden changes in ambient light, sensor noise, etc., and avoids storing interfering pixels as valid dynamic pixels.

[0035] Abnormal pixels are corrected by using the average RGB encoding of neighboring pixels, ensuring that the color of abnormal pixels is consistent with the surrounding image, reducing image distortion and guaranteeing the overall integrity and visual appeal of the image. Invalid abnormal data is filtered out to prevent abnormal pixels from consuming storage resources, while ensuring the validity of stored data.

[0036] Secondly, the present invention also provides a high-definition surveillance video storage system based on RGB color pixel encoding, comprising: The initial database module is used to obtain the initial frames of the monitoring video stream, assign a unique coordinate identifier to each pixel and collect its native RGB data to build an initial database of pixel coordinates-RGB encoding. The scene adaptive analysis module is used to analyze the proportion of moving objects in the image in real time, and automatically match the corresponding acquisition frame rate and pixel change judgment threshold based on the proportion range. The pixel change detection and judgment module is used to collect subsequent frames at the matching frame rate, calculate the degree of change of its RGB data relative to the RGB data of the same coordinate pixel in the previous frame, and determine whether the pixel needs to be updated based on the judgment threshold. The differentiated storage and cache management module is used to store the coordinate identifier, the updated RGB code, and the frame timing information of pixels that are determined to need to be updated, using their RGB code in the current video frame as the updated RGB code. For pixels that are determined not to be updated, their RGB code data is not stored, and when a frame is determined to be a static frame, the complete RGB code data of the static frame is written into the inter-frame cache unit. The video playback rendering module is used to perform RGB color rendering pixel by pixel to restore the high-definition monitoring screen during video playback, based on the initial database and according to the frame timing information, calling the corresponding static frame data in the inter-frame buffer unit, and combining it with the stored dynamically updated pixel data.

[0037] As can be seen from the above technical solutions, this application has the following advantages: it constructs an initial database based on native RGB data and updates and stores only the changed pixels, avoiding the image quality loss caused by discarding non-critical pixel information in traditional encoding technology, realizing the original image quality restoration of 1080P / 4K / 8K high-definition video, and meeting the backtracking recognition needs of key details such as computer room indicator lights and license plate characters.

[0038] By analyzing the proportion of moving objects in real time and automatically matching the acquisition frame rate and change threshold, it solves the problems of static scene storage redundancy and high dynamic scene detail loss caused by fixed parameters in existing technologies, and can balance storage efficiency and image integrity in different dynamic scenes.

[0039] Only the changed pixel data is stored, without updating the pixel reuse cache or initial database data. Static frames only need to store the frame timing identifier, which greatly reduces the proportion of redundant data.

[0040] During playback, the system renders pixel-by-pixel based directly on the initial database and stored dynamic data, eliminating the need for complex decoding processes. This significantly reduces end-to-end latency, making it suitable for low-latency requirements in real-time monitoring and remote access. Attached Figure Description

[0041] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart illustrating the method provided in an embodiment of the present invention.

[0043] Figure 2 A block diagram of a system provided in an embodiment of the present invention. Detailed Implementation

[0044] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this application and in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0046] RGB encoding: refers to a pixel color representation method based on the three color channels of red (R), green (G), and blue (B), with a value range of 0-255. 10-bit acquisition precision means that the value range of each channel is extended to 0-1023, resulting in richer color details.

[0047] ROI (Region of Interest): This refers to the "region of interest" in a surveillance scene, which is a key area where image quality needs to be prioritized, such as entrances / exits and equipment cabinets.

[0048] Inter-frame buffer: refers to a high-speed storage unit that temporarily stores static pixel data from the most recent 3-5 frames, used to quickly reuse static data and reduce read / write latency.

[0049] like Figure 1 As shown, this embodiment of the invention provides a high-definition surveillance video storage method based on RGB color pixel encoding, including the following steps: Step 1: Obtain the initial frame of the monitoring video stream, assign a unique coordinate identifier to each pixel and collect its native RGB data to construct an initial pixel coordinate-RGB encoded database; this step specifically includes: Step 11: Identify the resolution specifications of the surveillance video stream and determine the total number of pixels in the image accordingly, forming a corresponding pixel matrix; Step 12: Establish a two-dimensional rectangular coordinate system with the top left corner of the video screen as the origin, and assign a unique coordinate identifier to each pixel in the pixel matrix. The coordinate identifier is a (X,Y) coordinate pair, where X represents the column number and Y represents the row number. Step 13: Obtain the original red, green, and blue component values ​​for each pixel; Step 14: Combine the red, green, and blue component values ​​collected for each pixel to generate the RGB code for that pixel; Step 15: Associate and store the coordinates of all pixels with their corresponding RGB codes to build an initial database of pixel coordinates-RGB codes. Store this initial database in a non-volatile storage unit of the storage device as the reference data source for image rendering during video playback.

[0050] The initial frame of the high-definition surveillance video is acquired and decomposed pixel by pixel according to the specifications (1080P: 1920×1080; 4K: 3840×2160; 8K: 7680×4320). A two-dimensional rectangular coordinate system is established with the upper left corner of the initial frame as the origin, and each pixel corresponds to a unique (X,Y) coordinate (X∈[1, number of horizontal pixels], Y∈[1, number of vertical pixels]). Native RGB data is acquired with a precision of ≥10 bits (avoiding color banding caused by 8-bit acquisition), and RGB codes (R:0-255, G:0-255, B:0-255) are generated. An initial database of "pixel coordinates-RGB codes" is constructed and stored in the NVR flash memory unit as a rendering reference.

[0051] Step 2: Analyze the proportion of moving objects in the image in real time, and automatically match the corresponding acquisition frame rate and pixel change judgment threshold based on the proportion range; this step specifically includes: Step 21: Calculate in real time the percentage of moving object pixels in the current video frame relative to the total number of pixels in the frame; based on the preset range to which this percentage belongs, classify the current scene into one of the following three categories: Static scenario: The percentage is less than 5%; Moderate dynamic scenarios: The percentage is between 5% and 30%; High dynamic scenarios: The percentage is greater than 30%; Step 22: Based on the determined scene category, automatically match and enable the corresponding combination of acquisition frame rate and pixel change judgment threshold, where: When the scene is determined to be static, the matching frame rate is 15-20 frames per second, and the pixel change judgment threshold is 25%-30%. When the scene is determined to be a moderately dynamic scene, the matching frame rate is 25-30 frames per second, and the matching pixel change judgment threshold is 20%. When a scene is identified as a high dynamic scene, the matching acquisition frame rate is 30-60 frames per second, and the matching pixel change judgment threshold is 15%-18%.

[0052] In this embodiment of the invention, a lightweight CNN algorithm (MobileNetV3) is used to analyze the proportion of moving objects within a frame in real time; specifically, it includes: Step A: Foreground Moving Object Segmentation Lightweight convolutional neural network (CNN) models (such as MobileNetV3-Small) deployed on monitoring devices (such as NVRs or smart cameras equipped with ARM chips) are used to process each frame of the input video image. The core function of this model is to perform pixel-level semantic segmentation or moving object detection, classifying each pixel in the image as a background or foreground moving object.

[0053] Step B: Pixel statistics of the moving area Obtain the segmentation mask or detection box output by the CNN model. Count the total number of pixels classified as moving foreground objects.

[0054] Step C: Proportion Calculation and Scene Classification Divide the number of pixels of the moving foreground object obtained from the statistics by the total number of pixels of the video frame (determined by the resolution, such as 3840×2160=8,294,400 pixels for 4K frame) to calculate the percentage of moving object pixels.

[0055] Based on a pre-set threshold range, the scene dynamics of the current frame are quantified into one of three levels: static, moderately dynamic, or highly dynamic.

[0056] Step D: Parameter Matching and Output The system internally stores or uses a lookup table to associate an optimal set of acquisition frame rate and pixel change judgment thresholds for each of the three scene levels. Based on the scene level determined in step C, the system automatically selects and activates the corresponding parameter set, which is then output to the subsequent acquisition and pixel change judgment modules.

[0057] It should be noted that the training process for a lightweight convolutional neural network (CNN) model is as follows: Phase 1: Dataset Construction and Labeling Collect a large number of representative raw video streams from the target monitoring scenario. These streams need to cover different time periods, lighting conditions, weather conditions, and high-dynamic events such as static events, personnel inspections, and equipment alarms.

[0058] Keyframes are sampled from the video stream. Each frame is then semantically segmented using an annotation tool, classifying pixels into at least two categories: background and foreground moving objects.

[0059] The labeled image data is randomly divided into a training set (approximately 70%), a validation set (approximately 15%), and a test set (approximately 15%). This ensures a balanced distribution.

[0060] Phase Two: Model Selection and Adaptation The backbone network is MobileNetV3-Small, which is designed specifically for edge devices and offers a good balance between accuracy and speed. Pre-trained ImageNet weights are used for initialization to accelerate convergence.

[0061] On the back end of MobileNetV3, a lightweight decoder or segmentation head is connected, such as a lightweight module based on Spatial Pyramid Pooling with Diffusion (ASPP) or a simple upsampling convolutional layer, to upsample the feature map to the original image size and output the class probability of each pixel.

[0062] Phase 3: Model Training Use a composite loss function suitable for segmentation tasks, such as: Cross-entropy loss : Measures the accuracy of pixel classification.

[0063] Des Loss Improve model performance under class imbalance (background pixels far outnumber foreground pixels).

[0064] Total loss: ( (These are weighting coefficients).

[0065] Dess coefficient ; Where A is the set of pixels predicted as foreground by the model, B is the set of pixels that are foreground in the ground truth annotations, |A∩B| is the number of pixels correctly predicted as foreground (True Positive), and |A|+|B| is the sum of the predicted foreground pixels and the actual foreground pixels.

[0066] Des Loss , The smaller the value, the higher the overlap between the predicted region and the real region, and the better the model's segmentation performance.

[0067] Training cycle: a. Forward propagation: Input training images and obtain predicted segmentation maps through the network.

[0068] b. Loss calculation: Calculate the loss by comparing with the actual labeled map.

[0069] c. Backpropagation and parameter update: Calculate the gradient and update the network weights using the optimizer.

[0070] d. Validation and Early Stopping: After a certain number of training epochs, evaluate the model performance on the validation set (key metrics: mean intersection-union ratio mIoU, foreground class recall). If the validation set performance no longer improves over several consecutive epochs, trigger early stopping to prevent overfitting.

[0071] Phase 4: Model Optimization and Deployment Preparation To adapt to low-performance chips such as ARM, the trained floating-point model is quantized using INT8. This significantly reduces model size, improves inference speed, and has minimal impact on accuracy.

[0072] Evaluate the performance of the final model on an independent test set to ensure its generalization ability. Key metrics must meet: mIoU > 85%, foreground pixel detection rate > 95%, to meet the accuracy requirements of proportion calculation.

[0073] The model is converted into a deployment framework format, and then encapsulated with the moving object proportion calculation logic (steps B and C) into a unified scene dynamic analysis module, which is then integrated into the video processing pipeline.

[0074] Step 3: Acquire subsequent frames at the matched frame rate, calculate the change in RGB data pixel by pixel relative to the RGB data of the same coordinate pixel in the previous frame, and determine whether the pixel has been updated based on the judgment threshold; In this step, for each video frame acquired at the matched frame rate, perform the following operations: Step 31: Traverse every pixel in the current frame and obtain its current red color. ,green ,blue Component values, and obtain the red color of the pixel at the same coordinates in the previous frame. ,green ,blue Component value; Step 32: Calculate the color variation of the pixel using the following formula. :

[0075] In the formula, The sum of the maximum differences between the three RGB colors is: 255 + 255 + 255 = 765.

[0076] Step 33: Calculate the color change degree Pixel change determination threshold matching the current scene Comparison: like If so, then the pixel is determined to be the pixel that needs to be updated; like If the pixel is not updated, then it is determined to be a pixel that has not been updated.

[0077] Step 4: For pixels determined to be updated, store their coordinate identifier, updated RGB encoding, and frame timing information; for pixels determined not to be updated, do not store their RGB encoding data, and update the RGB data of that frame to the inter-frame buffer unit; specifically including: Step 41: For a pixel that is determined to need to be updated, use its RGB encoding in the current video frame as the updated RGB encoding, and store it together with the pixel's coordinate identifier and the frame timing information of the current video frame as a record. Step 42: For pixels determined not to have been updated, do not write their RGB encoded data to the main storage system; Step 43: Set a first threshold for the proportion of pixels in a whole frame that are determined to be not updated; when the proportion of pixels that are not updated in a video frame exceeds the first threshold, the frame is determined to be a static frame, and the complete RGB encoded data of the static frame is written into the inter-frame buffer unit.

[0078] In this embodiment of the invention, a 128GB inter-frame buffer unit is added (to accommodate 3-5 frames of 8K static data), and stored according to the following rules: ① Change rate > threshold: Only "coordinates + new RGB encoding + frame timing" are stored (data volume ≤ 16 bytes / pixel), with no redundancy; ② Change degree ≤ threshold: Directly call the RGB encoding of the previous frame at the same coordinates in the cache, without the need for secondary storage; ③ Full-frame static: Only the frame timing identifier is stored (4 bytes / frame), and the entire frame reuses the cached data, with a compression ratio of over 85%.

[0079] Step 5: During video playback, based on the initial database and according to frame timing information, the corresponding static frame data in the inter-frame buffer unit is retrieved, and combined with the stored dynamically updated pixel data, RGB color rendering is performed pixel by pixel to restore the high-definition monitoring image. This step specifically includes: Step 51: Call and load the pixel coordinate-RGB encoding initial database as the complete initial frame for video playback; Step 52: Based on the time period to be replayed, sequentially read the stored frame timing information; for each frame timing, perform the following operations: a. Based on the frame timing information, retrieve and obtain the RGB encoded data of the complete static frame corresponding to the timing from the inter-frame buffer unit; b. Based on the same frame timing information, retrieve all records in the storage system that are determined to be pixels that need to be updated under that timing, each record containing coordinate identifiers and updated RGB codes; Step 53: Using the initial image as a base, fill the corresponding coordinates with the RGB encoded data of the static frame; then, according to the coordinate identifier in the dynamically updated pixel record, replace the RGB encoding of the corresponding coordinates in the base with the updated RGB encoding carried by it, thereby synthesizing the complete image frame of the current time sequence. Step 54: Output the RGB data of the synthesized image frame directly to the display unit for rendering and display.

[0080] During playback, the system uses the initial database as a base and overlays "cached static data + dynamically updated data" in frame-by-frame time sequence, rendering RGB colors pixel by pixel. No encoding or decoding process is required, and the end-to-end latency is ≤30ms (70% lower than H.265).

[0081] In some embodiments, the method further includes: Designate at least one key monitoring area in the monitoring screen; Based on the pixel change determination threshold matched in step 22, a lower bias threshold is set for the key monitoring area and an upper bias threshold is set for the non-key monitoring area. In step 3, for pixels located in key monitoring areas, the lower threshold is used for comparison and determination; for pixels located in non-key monitoring areas, the upper threshold is used for comparison and determination.

[0082] Specifically, ROI area optimization is added. When a scene is determined to be static, the threshold for pixel change determination in key monitoring areas is set to 10%-15%, and the threshold for non-key monitoring areas is set to 25%-30%. When the scene is determined to be a moderately dynamic scene, the threshold for determining pixel changes in the key monitoring area is set to 15%-18%, and the threshold for non-key monitoring areas is set to 20%-25%. When a scene is identified as a high-dynamic scene, the threshold for determining pixel changes in key monitoring areas is set to 10%-12%, and the threshold for non-key monitoring areas is set to 15%-18%.

[0083] In some embodiments, the method further includes: Cyclic redundancy check is performed periodically on the stored pixel coordinate identifiers and their associated RGB encoded data; When a data error is detected during verification, an error recovery or alarm mechanism is triggered. The "coordinate-RGB" data is verified hourly using the CRC-32 algorithm, achieving a 100% error detection rate and preventing data loss due to data interruption.

[0084] In some embodiments, the method further includes abnormal pixel repair: If a pixel is determined to need updating in step 33, and its color change is greater than a preset high anomaly threshold, and the average color change of all other pixels in the preset neighborhood centered on that pixel is less than a preset low anomaly threshold, then the pixel is determined to be an abnormal pixel. The RGB code of the abnormal pixel is replaced with the arithmetic mean of the RGB codes of other pixels in the preset neighborhood.

[0085] When the variation of a single pixel is greater than 80% and the variation of the surrounding 3×3 pixels is less than 5%, it is judged as interference, and the RGB mean of the surrounding pixels is used for correction (the distortion rate is reduced to less than 1% compared with the existing technology).

[0086] The specific implementation process of this application: Scenario: An unattended server room in a big data center (8K high-definition surveillance, area of ​​500㎡, including 20 server racks and 2 entrances / exits); Objectives: (1) Server indicator lights (diameter ≤ 5mm) are clearly identifiable; (2) 90-day storage costs are reduced by more than 40%; (3) Remote access is smooth and the distortion rate of abnormal images is < 1%.

[0087] (1) Initial calibration (T=0 time): Acquire the initial frame (7680×4320 pixels), establish the coordinate system (X:1-7680,Y:1-4320), acquire the RGB data of each pixel (such as the RGB (255,0,0) of the server indicator light pixel), generate the initial database (about 800MB) and store it in the NVR flash memory.

[0088] (2) Scene adaptation and judgment (T=1-90 days): The scene recognition module judges it as a static scene (the proportion of moving objects is <3%), the matching frame rate is 20 frames / second, and the overall threshold is 28%; the server rack area is set as the ROI key area, the threshold is lowered to 12%, and the threshold of the wall area is raised to 30%. The RGB data between frames are compared pixel by pixel to calculate the degree of change.

[0089] (3) Storage and optimization: During the static period (22:00-6:00 the next day), there is no personnel activity, and only the frame time sequence identifier is stored (the data volume per hour is <50MB); during the personnel inspection period (9:00-10:00 the next day), only 12% of the pixel data corresponding to the personnel movement trajectory is stored (the data volume per hour is ≈1.2GB); when 3 abnormal pixels caused by sudden changes in lighting are detected, they are automatically corrected using the average value of the surrounding 3×3 pixels.

[0090] (4) Implementation results (90-day actual measurement): ① Image quality: Server indicator lights and device label characters have 100% accuracy in character recognition with no distortion; ② Storage: Total data volume is 1.08TB, saving 42% compared to H.265 encoding (1.86TB); ③Performance: Remote access latency is 22ms, and the average power consumption of the device is 4.8W, which is 25% lower than that of traditional devices; ④ Stability: 100% of abnormal screens were repaired, and no data was lost (the verification module did not detect any errors).

[0091] like Figure 2 As shown, this embodiment of the invention also provides a high-definition surveillance video storage system based on RGB color pixel encoding, comprising: The initial database module is used to obtain the initial frames of the monitoring video stream, assign a unique coordinate identifier to each pixel and collect its native RGB data to build an initial database of pixel coordinates-RGB encoding. The scene adaptive analysis module is used to analyze the proportion of moving objects in the image in real time, and automatically match the corresponding acquisition frame rate and pixel change judgment threshold based on the proportion range. The pixel change detection and judgment module is used to collect subsequent frames at the matching frame rate, calculate the degree of change of its RGB data relative to the RGB data of the same coordinate pixel in the previous frame, and determine whether the pixel needs to be updated based on the judgment threshold. The differentiated storage and cache management module is used to store the coordinate identifier, the updated RGB code, and the frame timing information of pixels that are determined to need to be updated, using their RGB code in the current video frame as the updated RGB code. For pixels that are determined not to be updated, their RGB code data is not stored, and when a frame is determined to be a static frame, the complete RGB code data of the static frame is written into the inter-frame cache unit. The video playback rendering module is used to perform RGB color rendering pixel by pixel to restore the high-definition monitoring screen during video playback, based on the initial database and according to the frame timing information, calling the corresponding static frame data in the inter-frame buffer unit, and combining it with the stored dynamically updated pixel data.

[0092] In some embodiments, the initial library creation module specifically includes: The pixel matrix building unit is used to identify the resolution specifications of the surveillance video stream and determine the total number of pixels in the image accordingly, forming a corresponding pixel matrix. The coordinate calibration unit is used to establish a two-dimensional rectangular coordinate system with the upper left corner of the video screen as the origin, and to assign a unique (X,Y) coordinate identifier to each pixel in the pixel matrix. A high-precision acquisition unit is used to acquire the original red (R), green (G), and blue (B) component values ​​of each pixel one by one; The encoding generation unit is used to combine the R, G, and B component values ​​collected from each pixel to generate the RGB encoding of that pixel. The database construction and storage unit is used to associate and store the coordinate identifiers of all pixels with their corresponding RGB codes to build an initial database of pixel coordinates-RGB codes, and store this initial database in a non-volatile storage unit.

[0093] In some embodiments, the scene adaptive analysis module specifically includes: The dynamic scene quantization unit is used to calculate in real time the percentage of moving object pixels in the current video frame to the total number of pixels in the frame, and to determine the current scene as a static scene, a moderately dynamic scene, or a highly dynamic scene based on a preset percentage range. The parameter matching unit is used to automatically match and enable the corresponding combination of acquisition frame rate and pixel change judgment threshold according to the determined scene category.

[0094] In some embodiments, the pixel change detection and determination module is specifically used for each frame of video acquired at the matching frame rate: Iterate through each pixel in the current frame and obtain its current red color. ,green ,blue Component values, and obtain the red color of the pixel at the same coordinates in the previous frame. ,green ,blue Component value; Calculate the color variation of this pixel using the following formula. :

[0095] In the formula, The sum of the maximum differences among the RGB values; The calculated color change Pixel change determination threshold matching the current scene Comparison: like If so, then the pixel is determined to be the pixel that needs to be updated; like If the pixel is not updated, then it is determined to be a pixel that has not been updated.

[0096] In some embodiments, the differentiated storage and cache management module specifically includes: The dynamic pixel storage unit is used to store the RGB encoding of a pixel that is determined to need to be updated in the current video frame as the updated RGB encoding, along with the pixel's coordinate identifier and the current frame timing information, as a single record. A static pixel processing unit is used to prevent pixels that are determined not to be updated from having their RGB encoded data written to the main storage system. The static frame buffer unit is used to determine that a frame is a static frame when the proportion of pixels that are determined not to be updated in a whole frame exceeds a preset proportion, and to write the complete RGB encoded data of the static frame into the inter-frame buffer unit.

[0097] In some embodiments, the video playback rendering module specifically includes: The playback initialization unit is used to call and load the pixel coordinate-RGB encoding initial database as the complete initial frame for video playback; The timing data acquisition unit is used to sequentially read the stored frame timing information according to the time period to be played back, and for each frame timing, to obtain the static frame RGB encoded data of the corresponding timing from the inter-frame buffer unit, and to obtain the record of all dynamically updated pixels under that timing from the storage system. The image compositing unit is used to fill the corresponding coordinates with the RGB encoded data of the static frame based on the initial image, and replace the RGB encoding of the corresponding coordinates in the base with the RGB encoding carried by the coordinate identifier in the dynamically updated pixel record, thereby compositing the complete image frame of the current time sequence. The rendering output unit is used to directly output the RGB data of the composited image frame to the display unit for rendering and display.

[0098] In some embodiments, the system further includes: The key area management module is used to set at least one key monitoring area in the monitoring screen, and based on the pixel change judgment threshold matched by the parameter matching unit, set a lower offset threshold for the key monitoring area and an upper offset threshold for the non-key monitoring area. Specifically, the pixel change detection and determination module uses the lower bias threshold for pixels located in key monitoring areas and the upper bias threshold for pixels located in non-key monitoring areas when making determinations.

[0099] In some embodiments, the system further includes: The data verification module is used to periodically perform cyclic redundancy checks on the stored pixel coordinate identifiers and their associated RGB encoded data, and to trigger error recovery or alarm mechanisms when data errors are found during verification.

[0100] In some embodiments, the system further includes: The abnormal pixel repair module is used to identify pixels that need to be updated by the pixel change detection and determination module. If the color change degree of the pixel is greater than a preset high abnormality threshold, and the average color change degree of other pixels in the preset neighborhood centered on the pixel is less than a preset low abnormality threshold, then the pixel is identified as an abnormal pixel and replaced and repaired using the arithmetic mean of the RGB codes of other pixels in the neighborhood.

[0101] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, server, or a second terminal, network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0102] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0103] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0104] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0105] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for storing high-definition surveillance video based on RGB color pixel encoding, characterized in that, Includes the following steps: Step 1: Obtain the initial frame of the monitoring video stream, assign a unique coordinate identifier to each pixel and collect its native RGB data to build an initial database of pixel coordinates-RGB encoding; Step 2: Analyze the proportion of moving objects in the image in real time, and automatically match the corresponding acquisition frame rate and pixel change judgment threshold based on the proportion range; Step 3: Collect subsequent frames according to the matching frame rate, calculate the degree of change of its RGB data relative to the RGB data of the same coordinate pixel in the previous frame, and determine whether the pixel needs to be updated based on the judgment threshold. Step 4: For pixels determined to need updating, use their RGB encoding in the current video frame as the updated RGB encoding; Store its coordinate identifier, updated RGB encoding, and frame timing information; for pixels determined not to be updated, do not store their RGB encoding data, and when a frame is determined to be a static frame, write the complete RGB encoding data of the static frame into the inter-frame buffer unit; Step 5: When playing back the video, based on the initial database, according to the frame timing information, call the corresponding static frame data in the inter-frame buffer unit, and combine it with the stored dynamically updated pixel data to perform RGB color rendering pixel by pixel to restore the high-definition monitoring screen.

2. The high-definition surveillance video storage method based on RGB color pixel encoding according to claim 1, characterized in that, Step 1 specifically includes: Step 11: Identify the resolution specifications of the surveillance video stream and determine the total number of pixels in the image accordingly, forming a corresponding pixel matrix; Step 12: Establish a two-dimensional rectangular coordinate system with the top left corner of the video screen as the origin, and assign a unique coordinate identifier to each pixel in the pixel matrix. The coordinate identifier is a (X,Y) coordinate pair, where X represents the column number and Y represents the row number. Step 13: Obtain the original red, green, and blue component values ​​for each pixel; Step 14: Combine the red, green, and blue component values ​​collected for each pixel to generate the RGB code for that pixel; Step 15: Associate and store the coordinates of all pixels with their corresponding RGB codes to build an initial database of pixel coordinates-RGB codes. Store this initial database in a non-volatile storage unit of the storage device as the reference data source for image rendering during video playback.

3. The high-definition surveillance video storage method based on RGB color pixel encoding according to claim 1, characterized in that, Step 2 specifically includes: Step 21: Calculate in real time the percentage of moving object pixels in the current video frame relative to the total number of pixels in the frame; based on the preset range to which this percentage belongs, classify the current scene into one of the following three categories: Static scenario: The percentage is less than the first percentage threshold; Medium dynamic scenario: The percentage is between the first percentage threshold and the second percentage threshold; High dynamic scenarios: The percentage is greater than the second percentage threshold; Step 22: Based on the determined scene category, automatically match and enable the corresponding combination of acquisition frame rate and pixel change judgment threshold, where: When a scene is determined to be static, the matching frame rate is within the first frame rate threshold range, and the matching pixel change determination threshold is within the first determination threshold range. When the scene is determined to be a moderately dynamic scene, the matching acquisition frame rate is within the second frame rate threshold range, and the matching pixel change judgment threshold is the second judgment threshold. When a scene is identified as a high dynamic scene, the matching acquisition frame rate is within the third frame rate threshold range, and the matching pixel change judgment threshold is within the third judgment threshold range.

4. The high-definition surveillance video storage method based on RGB color pixel encoding according to claim 1, characterized in that, In step 3, for each video frame acquired at the matching frame rate, perform the following operations: Step 31: Traverse every pixel in the current frame and obtain its current red color. ,green ,blue Component values, and obtain the red color of the pixel at the same coordinates in the previous frame. ,green ,blue Component value; Step 32: Calculate the color variation of the pixel using the following formula. : In the formula, The sum of the maximum differences among the RGB values; Step 33: Calculate the color change degree Pixel change determination threshold matching the current scene Comparison: like If so, then the pixel is determined to be the pixel that needs to be updated; like If the pixel is not updated, then it is determined to be a pixel that has not been updated.

5. The high-definition surveillance video storage method based on RGB color pixel encoding according to claim 1, characterized in that, Step 4 specifically includes: Step 41: For a pixel that is determined to need to be updated, use its RGB encoding in the current video frame as the updated RGB encoding, and store it together with the pixel's coordinate identifier and the frame timing information of the current video frame as a record. Step 42: For pixels determined not to have been updated, do not write their RGB encoded data to the main storage system; Step 43: When the proportion of pixels that are determined not to be updated in a whole frame exceeds the preset proportion, the frame is determined to be a static frame, and the complete RGB encoded data of the static frame is written into the inter-frame buffer unit.

6. The high-definition surveillance video storage method based on RGB color pixel encoding according to claim 5, characterized in that, Step 5 specifically includes: Step 51: Call and load the pixel coordinate-RGB encoding initial database as the complete initial frame for video playback; Step 52: Based on the time period to be replayed, sequentially read the stored frame timing information; for each frame timing, perform the following operations: a. Based on the frame timing information, retrieve and obtain the RGB encoded data of the complete static frame corresponding to the timing from the inter-frame buffer unit; b. Based on the same frame timing information, retrieve all records in the storage system that are determined to be pixels that need to be updated under that timing, each record containing coordinate identifiers and updated RGB codes; Step 53: Using the initial image as a base, fill the corresponding coordinates with the RGB encoded data of the static frame; then, according to the coordinate identifier in the dynamically updated pixel record, replace the RGB encoding of the corresponding coordinates in the base with the updated RGB encoding carried by it, thereby synthesizing the complete image frame of the current time sequence. Step 54: Output the RGB data of the synthesized image frame directly to the display unit for rendering and display.

7. The high-definition surveillance video storage method based on RGB color pixel encoding according to claim 3, characterized in that, The method further includes: Designate at least one key monitoring area in the monitoring screen; Based on the pixel change determination threshold matched in step 22, a lower bias threshold is set for the key monitoring area and an upper bias threshold is set for the non-key monitoring area. In step 3, for pixels located in key monitoring areas, the lower threshold is used for comparison and determination; for pixels located in non-key monitoring areas, the upper threshold is used for comparison and determination.

8. The high-definition surveillance video storage method based on RGB color pixel encoding according to claim 1, characterized in that, The method further includes: Cyclic redundancy check is performed periodically on the stored pixel coordinate identifiers and their associated RGB encoded data; When the verification detects a data error, an error recovery or alarm mechanism is triggered.

9. The high-definition surveillance video storage method based on RGB color pixel encoding according to claim 4, characterized in that, The method also includes abnormal pixel repair: If a pixel is determined to need updating in step 33, and its color change is greater than a preset high anomaly threshold, and the average color change of all other pixels in the preset neighborhood centered on that pixel is less than a preset low anomaly threshold, then the pixel is determined to be an abnormal pixel. The RGB code of the abnormal pixel is replaced with the arithmetic mean of the RGB codes of other pixels in the preset neighborhood.

10. A high-definition surveillance video storage system based on RGB color pixel encoding, characterized in that, include: The initial database module is used to obtain the initial frames of the monitoring video stream, assign a unique coordinate identifier to each pixel and collect its native RGB data to build an initial database of pixel coordinates-RGB encoding. The scene adaptive analysis module is used to analyze the proportion of moving objects in the image in real time, and automatically match the corresponding acquisition frame rate and pixel change judgment threshold based on the proportion range. The pixel change detection and judgment module is used to collect subsequent frames at the matching frame rate, calculate the degree of change of its RGB data relative to the RGB data of the same coordinate pixel in the previous frame, and determine whether the pixel needs to be updated based on the judgment threshold. The differentiated storage and cache management module is used to store the coordinate identifier, the updated RGB code, and the frame timing information of pixels that are determined to need to be updated, using their RGB code in the current video frame as the updated RGB code. For pixels that are determined not to be updated, their RGB code data is not stored, and when a frame is determined to be a static frame, the complete RGB code data of the static frame is written into the inter-frame cache unit. The video playback rendering module is used to perform RGB color rendering pixel by pixel to restore the high-definition monitoring screen during video playback, based on the initial database and according to the frame timing information, calling the corresponding static frame data in the inter-frame buffer unit, and combining it with the stored dynamically updated pixel data.