A video analysis and labeling processing system and method based on a shared frame buffer

This video analysis and tagging system, which uses a shared frame buffer, solves the problems of high memory consumption, heavy data transmission burden, and poor tagging synchronization in video analysis and tagging. It achieves efficient video processing and tagging synchronization and is suitable for video surveillance, intelligent analysis, and video playback on embedded and general-purpose computing platforms.

CN122226995BActive Publication Date: 2026-07-24CHINA JILIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA JILIANG UNIV
Filing Date
2026-05-20
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, video analysis and tagging processes suffer from problems such as high memory resource consumption, heavy data transmission burden, severe processing delays, and asynchrony between tagging information and video content, especially during non-linear playback where synchronization is difficult to guarantee.

Method used

The video analysis and tagging processing system adopts a shared frame buffer. By allocating a unified shared frame buffer to each video frame, each processing module can directly access the buffer to complete its operations. Combined with the shared frame buffer management module, the system achieves unified scheduling and lifecycle management of the buffer. The system relies on the shared frame buffer descriptor to bind video frame data and tagging information, and supports both tightly coupled and loosely coupled indexing methods to achieve synchronization between tagging information and video content.

Benefits of technology

It reduces memory copying, lowers system resource consumption and data transmission burden, improves processing real-time performance and collaborative efficiency, ensures accurate synchronization of tagging information and video content on the timeline, and adapts to various video processing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122226995B_ABST
    Figure CN122226995B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of video processing and intelligent analysis, and relates to a video analysis and marking processing system and method based on shared frame buffer. The present application allocates a uniform shared frame buffer for each video frame, so that each processing module completes video decoding, analysis, marking, display and storage based on the buffer, without repeated copying of video frames. The uniform scheduling and life cycle management of the buffer are realized by relying on the multiple buffering mechanism and state machine of the shared frame buffer management module, so as to simplify the data transmission between modules. The video frame data, structured analysis information and marking information are bound by the shared frame buffer descriptor, and the index association mechanism of the frame identifier is combined, so as to realize the accurate synchronization of the marking information and the video content on the time axis. The present application improves the running efficiency and real-time performance of the video analysis system, reduces the memory resource occupation, and can be widely applied to embedded or general computing platforms with video decoding and image processing capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of video processing and intelligent analysis technology, specifically relating to a video analysis and tagging processing system and method based on a shared frame buffer. Background Technology

[0002] In the field of video analytics and processing, embedded or general-purpose computing platforms performing real-time / near real-time video analysis and processing must follow a conventional workflow: video input → video decoding → image processing / intelligent analysis → tagging and rendering → display / video saving. In existing technologies, this workflow is generally implemented by each processing module maintaining an independent memory buffer for each frame of data. Video frames are copied multiple times during the decoding, analysis, rendering, and encoding stages, which not only consumes significant memory resources but also increases the system's data transmission burden, severely impacting processing latency and real-time performance.

[0003] Meanwhile, the independent image buffers of different processing modules lead to high complexity in image frame management during multi-module collaborative processing, which can easily result in frame order misalignment and data asynchrony between modules. In addition, some systems store the analyzed marker information separately from the video content. During video playback, especially during non-linear playback such as fast forward, rewind, and jumps, it is difficult to ensure the consistency of the marker information and the corresponding video frames on the timeline, which can easily lead to marker offset and asynchrony.

[0004] There is an urgent need for a video analysis and tagging processing scheme with a clear structure and well-defined implementation, which can reduce the duplication of image data, simplify the management of multi-module data, and ensure the accurate synchronization of tagging information with video content. Summary of the Invention

[0005] Based on the above background, this invention proposes a video analysis and labeling processing system and method based on a shared frame buffer. The core idea is as follows: allocate a unified shared frame buffer to each video frame, and all processing modules complete the entire process operation based on this buffer, avoiding repeated copying of video frames; realize unified scheduling, lifecycle management and module access synchronization of the buffer through a shared frame buffer management module; bind video frame data with structured analysis information and labeling information based on the shared frame buffer descriptor, and realize the synchronization of labeling information with video content by combining the frame identifier association mechanism, and reuse existing analysis and labeling results during non-linear playback without repeated calculations.

[0006] This invention proposes a video analysis and tagging system based on a shared frame buffer, the system comprising: Video input module: used to acquire video data; the source of video data is video files or video acquisition devices, and it can support the input of continuous video streams or discrete video file data; The video decoding module decodes the input video data frame by frame to obtain a single-frame video image; it requests an available shared frame buffer from the shared frame buffer management module and writes the decoded image data directly into the buffer; it assigns a unique buffer identifier to the shared frame buffer and submits the identifier to the shared frame buffer management module, so that the system can reference the corresponding video frame data through the identifier in the future. Shared frame buffer management module: responsible for the allocation, scheduling, and full lifecycle management of shared frame buffers; Analysis and processing module: It obtains the corresponding buffer through the shared frame buffer identifier, reads image data in read-only mode as analysis input, performs image analysis and processing including target detection, target recognition, and feature extraction, and generates structured analysis information; the analysis and processing module directly processes the image data in the shared frame buffer, without the need to create a new image frame buffer separately for analysis and processing; The marker drawing module determines the marker content based on the structured analysis information output by the analysis and processing module, and directly overlays the marker information onto the video frames in the shared frame buffer. The drawing process does not reallocate a new frame buffer, ensuring a one-to-one correspondence between the marker information and the video frames. Display module: Directly reads video frame data from the marked shared frame buffer and displays it in real time; Encoding and storage module: It takes the video frames in the shared frame buffer that have been marked as encoding input, encodes them to generate a video file or video stream containing the marking information, and completes the storage or external output of the video.

[0007] This invention also proposes a video analysis and marking processing method based on a shared frame buffer, including a conventional processing flow, a non-linear playback marking synchronization flow, and an anomaly handling flow, as detailed below: S1. Video data input and decoding: The video input module transmits the acquired video data to the video decoding module. The decoding module decodes the video data frame by frame, requests an available shared frame buffer from the shared frame buffer management module, writes the decoded image data into the buffer, assigns a unique identifier to the buffer, and submits it to the shared frame buffer management module. S2. Video Frame Analysis and Processing: The analysis and processing module obtains the corresponding shared frame buffer through the buffer identifier, reads the image data in read-only mode as the analysis input, and performs image analysis and processing to generate structured analysis information; the analysis and processing is based on the image data in the shared frame buffer, without the need to create a new image frame buffer separately for analysis and processing; S3, Marker Information Drawing: The marker drawing module determines the marker content based on the structured analysis information from the analysis and processing module, and draws the marker information directly on the video frames in the shared frame buffer without reallocating the frame buffer during the drawing process; S4. Video display and encoding storage: The display module directly reads the video frames in the shared frame buffer after the marking is completed and displays them. The encoding and storage module uses the video frames in the buffer as encoding input to generate video data containing the marking information and stores or outputs it. S5. Shared Frame Buffer Reuse: After the display module and encoding and storage module complete the output, the shared frame buffer management module marks the corresponding shared frame buffer as reusable and puts it back into the available queue to achieve cyclic reuse.

[0008] Compared with the prior art, the present invention has the following advantages: Reduce memory copying and lower resource consumption: By allocating a unified shared frame buffer to each video frame, each processing module can directly access the buffer to complete its operations. The same video frame does not need to be copied repeatedly throughout the entire process, which greatly reduces the consumption of memory resources and reduces the data transmission burden of the system. Simplify module management and improve collaborative efficiency: Relying on the multi-buffering mechanism and queued management of the shared frame buffer management module, unified scheduling of the shared frame buffer is realized. Each module only uses the buffer identifier to reference data, which simplifies the data transfer relationship between modules, solves the complex frame management problem when multiple modules are collaboratively processing, and improves the overall processing throughput of the system. Improve system real-time performance and reduce processing latency: The analysis, display, and encoding modules can be processed in parallel based on a shared frame buffer, and the synchronization control strategy ensures conflict-free access to modules. Combined with the result reuse mechanism in non-linear playback scenarios, redundant calculations are avoided, which greatly reduces the system's processing latency and improves real-time performance. Achieve precise synchronization between markers and video: By binding video frame data, structured analysis information, and marker information through a shared frame buffer descriptor, and combining the FrameUID indexing and association mechanism, a one-to-one correspondence between marker information and video content on the timeline is guaranteed; especially in non-linear playback scenarios such as fast forward, rewind, and jump, existing analysis and marker results can be directly reused, completely solving the problem of asynchronous and offset marker information and video content. It is highly adaptable and flexible: it supports both tightly coupled and loosely coupled methods of information association for analysis, and can be flexibly selected according to actual scenarios such as real-time requirements and the complexity of the information being analyzed; at the same time, it supports embedded and general-purpose computing platforms, and can be widely used in various video processing scenarios such as video surveillance, intelligent analysis, and video playback. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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.

[0010] Figure 1 This invention proposes a framework diagram for a video analysis and tagging processing system based on a shared frame buffer; Figure 2 This is a schematic diagram of the shared frame buffer lifecycle of the present invention; Figure 3 This is a flowchart illustrating the video analysis and tagging processing method based on a shared frame buffer according to the present invention. Figure 4 This is a schematic diagram of the marking synchronization process during the non-linear playback operation of the present invention. Detailed Implementation

[0011] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0012] like Figure 1 The diagram shows a framework diagram of a video analysis and tagging processing system based on a shared frame buffer proposed in this invention.

[0013] like Figure 2 The diagram illustrates the lifecycle of the shared frame buffer according to the present invention. like Figure 3 The above illustrates a flowchart of the video analysis and tagging processing method based on a shared frame buffer according to the present invention. like Figure 4 The diagram illustrates the marker synchronization process during non-linear playback operation of the present invention.

[0014] like Figure 1 As shown, this invention proposes a video analysis and tagging processing system based on a shared frame buffer, the system comprising: Video input module: used to acquire video data; the source of video data is video files or video acquisition devices, and it can support the input of continuous video streams or discrete video file data; The video decoding module decodes the input video data frame by frame to obtain a single-frame video image; it requests an available shared frame buffer from the shared frame buffer management module and writes the decoded image data directly into the buffer; it assigns a unique buffer identifier to the shared frame buffer and submits the identifier to the shared frame buffer management module, so that the system can reference the corresponding video frame data through the identifier in the future. Shared frame buffer management module: responsible for the allocation, scheduling, and full lifecycle management of shared frame buffers; Analysis and processing module: It obtains the corresponding buffer through the shared frame buffer identifier, reads image data in read-only mode as analysis input, performs image analysis and processing including target detection, target recognition, and feature extraction, and generates structured analysis information; the analysis and processing module directly processes the image data in the shared frame buffer, without the need to create a new image frame buffer separately for analysis and processing; The marker drawing module determines the marker content based on the structured analysis information output by the analysis and processing module, and directly overlays the marker information onto the video frames in the shared frame buffer. The drawing process does not reallocate a new frame buffer, ensuring a one-to-one correspondence between the marker information and the video frames. Display module: Directly reads video frame data from the marked shared frame buffer and displays it in real time; Encoding and storage module: It takes the video frames in the shared frame buffer that have been marked as encoding input, encodes them to generate a video file or video stream containing the marking information, and completes the storage or external output of the video.

[0015] Specifically, such as Figure 2 As shown, the shared frame buffer management module maintains a buffer pool containing N shared frame buffers (N≥2). These buffers are used alternately during the decoding, analysis, marking, and output processes of different video frames. This ensures that the same video frame uses the same shared frame buffer throughout its entire processing cycle, while also supporting parallel processing of different video frames by the system, thus improving overall processing throughput. The buffer pool can be implemented using a circular array or a linked list, and the available queue and output ready queue can be implemented using lock-free queues or locked queues.

[0016] The shared framebuffer management module configures a unique shared framebuffer descriptor for each shared framebuffer, which serves as the core logical data structure for referencing the buffer between modules, and includes at least the following fields: Buffer Identifier Field: Uniquely identifies a shared framebuffer; Storage reference field: Points to or maps to the storage location of the corresponding shared framebuffer, in the form of a pointer, handle or other reference that can establish an access mapping; Frame Identifier (FrameUID): Uniquely identifies the video frame corresponding to this buffer; Time information field: Records the timestamp or playback time position of the corresponding video frame in the video stream; Status field: Indicates the current lifecycle state of the shared frame buffer.

[0017] The one-to-one association between structured analysis information and video frames is achieved through shared frame buffer descriptors, supporting both tightly coupled and loosely coupled indexing methods. The tightly coupled method logically divides the shared frame buffer into a pixel data area and a metadata area. Structured analysis information and tagging information are directly stored in the metadata area. When each module accesses the buffer, it can synchronously obtain video frame data and analysis results, resulting in a short access path and high processing efficiency, making it suitable for scenarios with high real-time requirements. The loosely coupled indexing method stores structured analysis information independently using FrameUID as the index key. Each module obtains the corresponding analysis results when needed through FrameUID, reducing the storage load of the shared frame buffer and improving the flexibility of managing complex analysis results. It is suitable for scenarios where the analysis information is complex or needs to be stored for a long time.

[0018] The shared frame buffer management module controls the lifecycle of the buffer through a state machine. The states include at least the available state, decoding and writing state, decoding completed and awaiting analysis state, analysis and processing state, marker drawing state, output ready state, and reusable state. The switching rules for each state are as follows: The video decoding module retrieves an available buffer from the available queue and switches to the decoding write state; After decoding is complete, the buffer switches to the decoding complete and pending analysis state, and the descriptor is submitted to the analysis scheduling queue; After the analysis and processing module gains access, the buffer switches to the analysis and processing state; After the analysis is complete, the buffer switches to marker drawing state; Once the markers are drawn, the buffer switches to the output ready state and enters the output ready queue; After the display / encoding and storage module completes its output, the buffer is marked as reusable by the shared frame buffer management module and returned to the available queue.

[0019] The shared frame buffer management module performs synchronization control over access to the buffer by each module to avoid conflicting operations; it uses atomic updates or locking to protect the buffer's state fields; during the write phases such as decoding and tag drawing, it applies mutual exclusion access control to the buffer to ensure that only one module performs a write operation at any given time; during the read-only phases such as analysis, display, and encoding, it allows multiple modules to concurrently read buffer data; synchronization control can be implemented through mutexes, read-write locks, semaphores, condition variables, or event notification mechanisms.

[0020] Based on the above system, this invention also proposes a video analysis and tagging processing method based on a shared frame buffer, including a conventional processing flow, a non-linear playback tagging synchronization flow, and an anomaly handling flow, such as... Figure 3 As shown, the details are as follows: S1. Video Data Input and Decoding: The video input module transmits the acquired video data to the video decoding module in frame order; the decoding module decodes frame by frame, requests an available shared frame buffer from the shared frame buffer management module, writes the decoded image data into the buffer, assigns a unique identifier to the buffer and submits it to the shared frame buffer management module, and the buffer status changes from available to decoding and writing, and then to decoding completed and awaiting analysis.

[0021] S2, Video Frame Analysis and Processing: The analysis and processing module obtains the corresponding shared frame buffer through the buffer identifier, reads the image data in read-only mode, and performs analysis and processing such as feature extraction, target region localization, and target detection / recognition to generate structured analysis information containing information such as target location and region range. The analysis and processing is based on the image data in the shared frame buffer, without the need to create a new image frame buffer separately for analysis and processing. The buffer state switches from the decoding completed and waiting for analysis state to the analysis and processing state, and switches to the marker drawing state after the analysis is completed.

[0022] S3. Marker information drawing: The marker drawing module determines the marker content such as border markers, region identifiers, and text annotations based on the structured analysis information, and draws the marker information directly on the video frame in the shared frame buffer. The frame buffer is not reallocated during the drawing process. After the marker drawing is completed, the buffer state switches to the output ready state.

[0023] S4. Video Display and Encoding Storage: The display module obtains a buffer from the output ready queue and directly reads the video frame data in it for display; the encoding and storage module synchronously reads the data in the buffer, uses it as encoding input, generates a video file or video stream containing marker information, and completes storage / external output; display and encoding storage are parallel operations.

[0024] S5. Shared Frame Buffer Reuse: After the display module and the encoding and storage module have completed their output, the shared frame buffer management module marks the corresponding buffer as reusable and puts it back into the available queue, realizing the cyclic reuse of the buffer for the processing of the next frame of video data.

[0025] When non-linear playback operations such as fast forward, rewind, and jump occur during video playback, such as Figure 4 As shown, the system performs the following tag synchronization steps: Step 1: The system determines the target video frame to be played based on the current playback event point or the target frame number. Step 2: The shared frame buffer management module retrieves and locates the shared frame buffer and the corresponding shared frame buffer descriptor associated with the target video frame based on the time information field or frame number of the target video frame. Step 3: If the shared frame buffer already stores structured analysis information and tagging information that correspond one-to-one with the target video frame, the display module directly displays the video frame data and tagging information in the buffer without having to re-trigger the analysis processing and tagging drawing operations. Step 4: If the shared frame buffer does not store relevant analysis and tagging information, then perform decoding, analysis, and tagging operations according to the normal processing flow, and then display the results. The analysis and tagging information will be bound to the buffer for subsequent reuse.

[0026] To ensure the real-time performance and stability of the system, the shared frame buffer management module also sets up anomaly handling strategies. For example, in the event of a buffer shortage anomaly (i.e., if there are no available shared frame buffers in the buffer pool), the video decoding module enters a waiting or discarding strategy, waiting for the buffer to be released or discarding the current frame data to avoid system blockage. Additionally, in the event of an analysis timeout anomaly (i.e., if the analysis processing module fails to complete the analysis of a video frame in a certain buffer within a preset time), the shared frame buffer management module sets that buffer to an abnormal state and triggers a retry or skip operation to retry the analysis or directly skip the frame, ensuring the continuity of the overall system processing flow.

[0027] Example 1: Offline Analysis and Tagging of Video Files This embodiment is applicable to offline analysis, tagging and storage of video files. The system is deployed on a general computing platform with a video resolution of 1920*1080 and a frame rate of 30 frames per second.

[0028] The video input module reads a local 1920*1080 / 30 frame video file and transmits the video data to the video decoding module in frame order. The video decoding module decodes the video data frame by frame, requests an available shared frame buffer (buffer pool N=8) from the shared frame buffer management module, writes the decoded image data into the buffer, assigns a unique buffer identifier and submits it to the management module, and the buffer status completes the switch from "available → decoding and writing → decoding completed and awaiting analysis". The analysis and processing module obtains the buffer through the buffer identifier, reads the image data in read-only mode, performs analysis and processing of pedestrian target detection, extracts target features, locates target regions, and generates structured analysis information containing pedestrian position coordinates and bounding box range; Based on the structured analysis information, the marker drawing module draws green rectangular bounding boxes (pedestrian markers) on the video frames in the shared frame buffer. After drawing is completed, the buffer state switches to the output ready state. The display module displays video frames with pedestrian markers in real time, and the encoding and storage module encodes the buffer data into MP4 format video files to complete the storage of video containing marker information. After display and encoding are completed, the shared frame buffer management module sets the buffer to a reusable state and puts it back into the available queue to achieve cyclic reuse. When the video file is played back and fast forward / rewind is performed, the system directly locates the shared frame buffer corresponding to the target video frame, reuses the existing pedestrian detection results and marker information, and achieves synchronous display of markers and video without re-analysis and drawing.

[0029] Example 2: Online Analysis and Tagging Processing of Real-Time Video Streams This embodiment is applicable to online analysis, labeling, and display / pushing of real-time video streams from cameras. The system is deployed on an embedded computing platform with a video resolution of 1920*1080 and a frame rate of 25 frames per second.

[0030] The video input module receives a real-time video stream of 1920*1080 / 25 frames captured by the camera and transmits the video data frame by frame to the video decoding module; The video decoding module decodes the real-time video stream frame by frame, requests an available shared frame buffer (buffer pool N=6) from the shared frame buffer management module, writes the decoded data into the buffer and assigns a unique identifier, and the buffer status completes the switch from "available → decoded and written → decoded and ready for analysis". The analysis and processing module reads image data through the buffer identifier, performs vehicle target recognition and traffic statistics analysis and processing, and generates structured analysis information containing vehicle location, type and quantity; Based on the analysis information, the marker drawing module draws vehicle bounding boxes on the video frames and labels the vehicle type / quantity. After the drawing is completed, the buffer state switches to the output ready state. The display module displays video footage with vehicle markers in real time on the embedded terminal. The encoding and storage module encodes the buffer data into an RTSP video stream, pushes it to the remote monitoring platform, and stores the video stream to the local storage card. After displaying and streaming / storing is complete, the shared frame buffer management module sets the buffer to a reusable state and puts it back into the available queue. When the remote monitoring platform performs a jump operation on the real-time video stream, the system locates the shared frame buffer of the target video frame, reuses the existing vehicle analysis and marking results, and realizes remote playback marking synchronization. When the buffer pool has no available buffer, the decoding module executes a discarding strategy to discard the current frame to ensure the continuity of real-time video stream processing; when the analysis module times out and fails to complete vehicle recognition, the management module sets the buffer to an abnormal state, executes a skipping strategy, and continues to process the next frame.

[0031] In the above embodiments, the number of buffer pools N, video resolution, frame rate, analysis and processing type, and tagging format can all be adjusted according to the actual application scenario. All simple modifications and equivalent substitutions based on the core idea of ​​this invention are within the protection scope of this invention.

Claims

1. A video analysis and tagging processing system based on a shared frame buffer, characterized in that, The system includes: Video input module: used to acquire video data; the source of video data is video files or video acquisition devices, and it can support the input of continuous video streams or discrete video file data; The video decoding module decodes the input video data frame by frame to obtain a single-frame video image; it requests an available shared frame buffer from the shared frame buffer management module and writes the decoded image data directly into the buffer; it assigns a unique buffer identifier to the shared frame buffer and submits the identifier to the shared frame buffer management module, so that the system can reference the corresponding video frame data through the identifier in the future. Shared frame buffer management module: responsible for the allocation, scheduling, and full lifecycle management of shared frame buffers; Analysis and processing module: It obtains the corresponding buffer through the shared frame buffer identifier, reads image data in read-only mode as analysis input, performs image analysis and processing including target detection, target recognition, and feature extraction, and generates structured analysis information; the analysis and processing module directly processes the image data in the shared frame buffer, without the need to create a new image frame buffer separately for analysis and processing; The marker drawing module determines the marker content based on the structured analysis information output by the analysis and processing module, and directly overlays the marker information onto the video frames in the shared frame buffer. The drawing process does not reallocate a new frame buffer, ensuring a one-to-one correspondence between the marker information and the video frames. Display module: Directly reads video frame data from the marked shared frame buffer and displays it in real time; Encoding and storage module: It takes the video frames in the shared frame buffer that have been marked as encoding input, encodes them to generate a video file or video stream containing the marking information, and completes the storage or external output of the video. The structured analysis information is associated with video frames using either a tightly coupled or loosely coupled indexing method. In the tightly coupled method, the shared frame buffer logically includes a pixel data area and a metadata area, with the structured analysis information and tagging information directly stored in the metadata area. In the loosely coupled indexing method, the structured analysis information is stored independently using FrameUID as the index key, and each module obtains the corresponding analysis results through FrameUID.

2. In the video analysis and labeling processing system according to claim 1, the buffer pool maintained by the shared frame buffer management module contains N shared frame buffers, where N≥2; the buffers are used alternately in the decoding, analysis, labeling, and output processes of different video frames.

3. In the video analysis and tagging processing system according to claim 1, the shared frame buffer management module configures a unique shared frame buffer descriptor for each shared frame buffer, which serves as the core logical data structure for referencing buffers between modules and contains multiple fields.

4. The video analysis and tagging processing system according to claim 3, wherein the plurality of fields are: buffer identifier field: uniquely identifies a shared frame buffer; Storage reference field: Points to or maps to the storage location of the corresponding shared framebuffer, in the form of a pointer, handle or other reference that can establish an access mapping; Frame Identifier Field: Uniquely identifies the video frame corresponding to this buffer; Time information field: Records the timestamp or playback time position of the corresponding video frame in the video stream; Status field: Indicates the current lifecycle state of the shared frame buffer.

5. The video analysis and tagging processing system according to claim 4, wherein the frame identifier field corresponds to a shared frame buffer and reuses existing analysis results and tagging information.

6. In the video analysis and tagging processing system according to claim 1, the synchronization control strategy of the shared frame buffer management module is as follows: atomic update or locking is used to protect the state field of the shared frame buffer; mutual exclusion access control is applied during the write phase of decoding and tag drawing; concurrent reading is allowed during the read-only phase of analysis, display, and encoding; synchronization control is implemented through mutex locks, read-write locks, semaphores, condition variables, or event notification mechanisms.

7. The video analysis and tagging processing system according to claim 1, wherein the lifecycle states of the shared frame buffer include at least the available state, decoding and writing state, decoding completed and awaiting analysis state, analysis and processing state, tag drawing state, output ready state, and reusable state; the switching of each state is uniformly controlled by the shared frame buffer management module, and each processing module performs operations on the buffer in the corresponding state only after obtaining access permissions.

8. A video analysis and tagging method based on a shared frame buffer, characterized in that, The system implementation based on any one of claims 1-7 includes the following steps: S1. Video data input and decoding: The video input module transmits the acquired video data to the video decoding module. The decoding module decodes the video data frame by frame, requests an available shared frame buffer from the shared frame buffer management module, writes the decoded image data into the buffer, assigns a unique identifier to the buffer, and submits it to the shared frame buffer management module. S2, Video Frame Analysis and Processing: The analysis and processing module obtains the corresponding shared frame buffer through the buffer identifier, reads the image data in read-only mode as the analysis input, performs image analysis and processing to generate structured analysis information, and the analysis and processing is directly based on the image data in the shared frame buffer, without the need to create a new image frame buffer separately for analysis and processing; S3, Marker Information Drawing: The marker drawing module determines the marker content based on the structured analysis information from the analysis and processing module, and draws the marker information directly on the video frames in the shared frame buffer without reallocating the frame buffer during the drawing process; S4. Video display and encoding storage: The display module directly reads the video frames in the shared frame buffer after the marking is completed and displays them. The encoding and storage module uses the video frames in the buffer as encoding input to generate video data containing the marking information and stores or outputs it. S5. Shared Frame Buffer Reuse: After the display module and encoding and storage module complete the output, the shared frame buffer management module marks the corresponding shared frame buffer as reusable and puts it back into the available queue to achieve cyclic reuse.

9. The video analysis and tagging processing method according to claim 8, in step S1, the process of the shared frame buffer management module allocating a buffer to the decoding module is as follows: obtain a shared frame buffer in an available state from the available queue, switch its state to the decoding write state; after decoding is completed, switch the buffer state to the decoding completed and ready-to-analyze state, and submit the corresponding descriptor to the analysis scheduling queue.

10. The video analysis and tagging processing method according to claim 8, the method further includes an abnormal handling step for the shared frame buffer: if there is no available buffer in the buffer pool, the decoding module enters a waiting or discarding strategy; if the analysis module fails to complete the analysis within a preset time, the shared frame buffer management module sets the buffer to an abnormal state and triggers a retry or skip operation.