Data processing method and vehicle

By segmenting driving videos into multiple segments and adding tagged metadata, the storage time of high-risk segments is identified and extended, solving the problem of incomplete video in vehicle video surveillance systems and enabling comprehensive retrospective and complete recording of emergency events.

CN122493555APending Publication Date: 2026-07-31GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2026-06-12
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing vehicle video surveillance systems cannot fully record the entire driving process when multiple events occur consecutively or when driving for a long time, resulting in incomplete event videos and an inability to fully reconstruct the complete process of an accident or risk.

Method used

The driving video is divided into multiple video segments, and tag metadata is added to each video segment. The storage time of high-risk segments is identified and extended. When an emergency event is triggered, related segments are read from the video segments based on the tag metadata and spliced ​​together to form a complete event video.

Benefits of technology

Ensure the comprehensiveness of video playback for emergency events, generate videos that can accurately reconstruct the complete course of the event, avoid covering important segments, and provide complete video records of the event.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493555A_ABST
    Figure CN122493555A_ABST
Patent Text Reader

Abstract

This application relates to a data processing method and a vehicle, specifically in the field of smart cockpit technology. The method includes: segmenting driving video into multiple video segments and determining the tag metadata for each video segment, wherein the video segments are stored in a circular buffer, and the tag metadata is used to indicate the semantic features of the video segments; selecting high-risk segments from the multiple video segments and implementing a dynamic retention strategy for each high-risk segment, wherein the dynamic retention strategy is used to extend the storage time of the high-risk segments in the circular buffer; in response to the triggering of an emergency event, reading related segments from the multiple video segments based on the tag metadata, wherein the related segments include the high-risk segments; and splicing the multiple related segments in chronological order to form an event video. This application can ensure the comprehensiveness of video backtracking for emergency events.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent cockpit technology, and more particularly to a data processing method and a vehicle. Background Technology

[0002] In vehicle video surveillance, to reduce storage usage, an event-triggered short video saving mechanism is usually adopted, that is, the system only saves video segments of a fixed duration before and after the trigger time, such as only saving video segments from 30 seconds before to 15 seconds after an emergency event.

[0003] This method has significant shortcomings when multiple events occur consecutively or when driving for extended periods. The system cannot record the entire driving video in its entirety. When it is necessary to review the complete driving process afterward, video segments will be missing, resulting in incomplete event video and an inability to fully reconstruct the complete process of an accident or risk. Summary of the Invention

[0004] This application provides a data processing method, apparatus, electronic device, and vehicle to address the problem of the inability to fully reconstruct the occurrence of an emergency.

[0005] In a first aspect, this application provides a data processing method, the method comprising: The driving video is segmented into multiple video segments, and the tag metadata for each video segment is determined. The video segments are stored in a circular buffer, and the tag metadata is used to indicate the semantic features of the video segments. High-risk segments are selected from multiple video segments, and a dynamic retention strategy is applied to each high-risk segment, wherein the dynamic retention strategy is used to extend the storage time of the high-risk segments in the circular buffer; In response to the triggering of an emergency event, associated segments related to the emergency event are read from the plurality of video segments based on the tag metadata, wherein the associated segments include the high-risk segments; Multiple related clips are spliced ​​together in chronological order to form an event video.

[0006] Optionally, implementing a dynamic retention strategy for each high-risk segment includes: If it is detected that the circular buffer needs to cover an old video segment, and if the old video segment to be covered is identified as carrying a high-risk marker, then the old video segment is determined to be a high-risk segment and the current retention count of the high-risk segment is determined. The circular buffer is used to store video segments and high-risk segments, and the current retention count is used to indicate the remaining number of times the high-risk segment is allowed to be skipped. If the current retention count is greater than zero, skip overwriting the high-risk segment and decrement the current retention count by one; If the current retention count is zero, then a new video clip is used to overwrite the high-risk clip.

[0007] Optionally, the method further includes: Monitor memory usage in the circular buffer; If the memory usage rate is greater than the first usage rate threshold, then the target segment in the circular buffer that has a high-risk marker and a risk score exceeding the set score threshold is identified. The target segment is stored in a temporary buffer, and the current retention count of the target segment in the circular buffer is decremented by one or the high-risk flag of the target segment is cleared. The temporary buffer is located in a long-term storage area, which is used to store the event video. If the memory usage rate is greater than the second usage rate threshold, the target fragment in the circular buffer is transferred to the temporary buffer.

[0008] Optionally, in response to the triggering of an emergency event, reading associated segments related to the emergency event from the plurality of video segments based on the tag metadata includes: In response to the triggering of an emergency event, determine the triggering time of the emergency event; Based on the triggering time, the metadata of each tag stored in the semantic index area is queried in reverse, wherein the semantic index area is located in a circular buffer; According to the preset backtracking rules, the relevant fragments related to the emergency event are searched from the circular buffer based on the tag metadata; The associated fragments are read from the preset storage area according to a preset priority order.

[0009] Optionally, searching for related fragments concerning the emergency event from the circular buffer according to preset backtracking rules and in conjunction with the tag metadata includes: Identify the event objects, abnormal behaviors, and mutating environments in the aforementioned emergency events; Based on the semantic tag vector in the tag metadata, the first associated segment matching the event object, the second associated segment matching the abnormal behavior, and the third associated segment matching the mutation environment are determined respectively, wherein the semantic tag vector is used to indicate the semantic tag of the video segment corresponding to the tag metadata; Based on the video risk level in the aforementioned tag metadata, high-risk segments are identified; The first associated fragment, the second associated fragment, the third associated fragment, and the high-risk fragment are considered as associated fragments related to the emergency event.

[0010] Optionally, reading the associated fragments from a preset storage area according to a preset priority order includes: Based on the physical address pointer in the tag metadata, the associated fragment is read from the corresponding position in the circular buffer; If the associated fragment cannot be read from the circular buffer, then the associated fragment is read from the temporary buffer. If the associated fragment cannot be read from the temporary cache, the keyframe sequence of the associated fragment is reconstructed based on the keyframe thumbnail in the tag metadata, and the keyframe sequence is used as the associated fragment.

[0011] Optionally, high-risk segments can be selected from multiple video clips, including: Each video segment is assigned an individual risk value, a scene risk factor, and a time urgency correction value. The individual risk value indicates the degree of impact of the detected object on driving safety, the scene risk factor indicates the degree of road environment risk, and the time urgency correction value indicates the urgency of the risk occurrence. Based on the individual risk value and the scenario risk factor, a comprehensive risk value is determined; The maximum value is selected from the comprehensive risk value and the time urgency correction value, and the maximum value is used as the risk score of the video segment. Select high-risk segments from multiple video clips whose risk scores are greater than a preset value.

[0012] Optionally, determining the individual risk value for each video segment includes: Detect the target object in the video segment; Determine the risk score and corresponding weight of the target object in each preset dimension, wherein the preset dimensions include object type, relative distance between the target object and the target vehicle, relative speed between the target object and the target vehicle, movement trend and behavioral characteristics; The individual risk value of the video segment is obtained by weighting and summing the risk scores of each preset dimension with the corresponding dimension weights.

[0013] Optionally, the tag metadata includes: video start and end timestamps, physical address pointers, semantic tag vectors, risk scores, and keyframe thumbnails.

[0014] Secondly, this application provides a data processing apparatus, the apparatus comprising: A segmentation module is used to segment driving videos into multiple video segments and determine the tag metadata for each video segment, wherein the video segments are stored in a circular buffer and the tag metadata is used to indicate the semantic features of the video segments; The selection and execution module is used to select high-risk segments from multiple video segments and execute a dynamic retention strategy for each high-risk segment, wherein the dynamic retention strategy is used to extend the storage time of the high-risk segment in the circular buffer; A reading module is used to read, in response to the triggering of an emergency event, related segments associated with the emergency event from the plurality of video segments based on the tag metadata, wherein the related segments include the high-risk segments; The splicing module is used to splice multiple related segments in chronological order to form an event video.

[0015] Thirdly, this application provides an electronic device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus.

[0016] Fourthly, this application also provides a computer storage medium storing computer-executable instructions for performing the data processing method described in any of the preceding claims of this application.

[0017] The technical solutions provided in this application have the following advantages compared with the prior art: In this application, driving videos are segmented into multiple video clips and stored in a circular buffer. High-risk clips are then selected from these clips, and their storage time in the circular buffer is extended to prevent important clips reflecting potential safety hazards from being prematurely overwritten by new video clips. When an emergency is triggered, related clips, including the high-risk clips, are read from the circular buffer based on the tag metadata of the video clips. This ensures that all footage causally related to the event is extracted completely. Finally, the related clips are arranged in chronological order to form a complete event video. In the process of tracing back the event video, this application not only adds semantically related video clips based on tag metadata but also adds high-risk clips with significant traceability value. The resulting event video can comprehensively and realistically recreate the entire occurrence process of the emergency, ensuring the comprehensiveness of the emergency video tracing. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0021] Figure 1 A schematic diagram of a data processing system provided for an embodiment of this application; Figure 2 A flowchart of a data processing method provided in an embodiment of this application; Figure 3 This application provides a schematic diagram of the overall process of vehicle video playback in an embodiment of the present application. Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0024] The data processing method provided in this application can be applied to processing scenarios where the vehicle processor operates independently, as well as to hardware environments where the vehicle and server process collaboratively. In collaborative processing scenarios, such as Figure 1As shown, server 103 is connected to vehicle 101 via a network. Vehicle 101 sends the collected driving video to server 103. Server 103 retrieves the event video of the emergency based on the driving video and feeds it back to vehicle 101. Database 105 can be set up on the server or independently of the server to provide data storage services for server 103. The above network includes, but is not limited to: wide area network, metropolitan area network or local area network.

[0025] Furthermore, the embodiments of this application can also be implemented as a functional plug-in, integrated into the vehicle processor, and directly retrieve the event video of the emergency based on the driving video.

[0026] The following will describe in detail a data processing method provided in this application embodiment, taking a processor applied to a vehicle as an example. Figure 2 As shown, the specific steps are as follows: Step 201: Segment the driving video into multiple video segments and determine the tag metadata for each video segment, wherein the video segments are stored in a circular buffer and the tag metadata is used to indicate the semantic features of the video segments; Step 202: Select high-risk segments from multiple video segments and implement a dynamic retention strategy for each high-risk segment. The dynamic retention strategy is used to extend the storage time of high-risk segments in the circular buffer. Step 203: In response to the triggering of an emergency event, read the associated segments related to the emergency event from multiple video clips based on tag metadata, wherein the associated segments include high-risk segments; Step 204: Piece together multiple related segments in chronological order to form an event video.

[0027] In step 201, the vehicle sensors collect continuous driving video in real time and send the collected video to the processor. The processor stores all video segments in a circular buffer and manages them using a circular storage method. The processor divides the continuous driving video into multiple independent video segments according to preset segmentation rules. These preset segmentation rules include two types: one is segmentation by fixed duration, such as dividing the video into 5-second units; the other is adaptive segmentation based on scene changes, automatically generating new segments when a drastic change in the scene content is detected, such as when the vehicle switches camera views or the driving environment changes from urban roads to highways. After segmentation, the processor outputs multiple independent video segments, each clearly labeled with a unique start and end time.

[0028] While generating video clips, the processor constructs corresponding tag metadata for each clip. The main function of this tag metadata is to describe the semantic features of the corresponding video clip, specifically including key semantic information such as the driving scene, vehicle behavior, and surrounding environment recorded in the video clip. Among these, the driving scene can be divided into urban roads, highways, etc.; vehicle behavior can be divided into normal driving, braking, lane changing, etc.; and the surrounding environment can be divided into pedestrian presence, no pedestrian presence, presence of other vehicles, and absence of other vehicles.

[0029] In step 202, the processor performs risk identification and analysis on each video segment stored in the circular buffer to determine whether there are any driving safety hazards in each video segment, and then filters out high-risk segments. High-risk segments mainly correspond to driving scenarios with potential dangers, specifically including vehicles cutting in close proximity, sudden acceleration and deceleration, lane departure, and scenarios that may cause traffic accidents, such as pedestrians suddenly appearing out of nowhere, sudden braking by the vehicle in front, and vehicles forcibly changing lanes from beside another vehicle. High-risk segments are a type of video segment and are also stored in the circular buffer.

[0030] For each high-risk segment identified, the processor executes a dynamic retention strategy. The dynamic retention strategy refers to the targeted protection of high-risk segments during the process of overwriting old data in the circular buffer according to the cyclic mechanism. This extends the storage time of high-risk segments in the circular buffer, preventing these segments, which can reflect potential accident hazards and have important traceability value, from being prematurely overwritten by new video segments before the emergency is triggered. This ensures the complete preservation of various risk and hazard images before the accident occurs.

[0031] In step 203, the processor monitors emergency events in real time. Emergency events are triggered in two ways: One is a risk level threshold trigger. The processor continuously calculates the comprehensive risk score of the current driving video. When the comprehensive risk score exceeds a preset threshold, it is immediately identified as an emergency event. For example, if the score range is 0-100, an emergency event is identified when the comprehensive risk score exceeds 80. The other trigger is an independent event recognition trigger. The processor also supports independent triggering based on specific signals, including but not limited to airbag deployment signals, ABS (Anti-lock Braking System) or ESC (Electronic Stability Control) system activation signals, and scenarios such as pedestrians suddenly appearing, vehicles braking suddenly in front, and vehicles crossing the line.

[0032] When an emergency event is triggered, the processor responds to the trigger command by searching for and reading related segments that are causally related to the current emergency event from the circular buffer, based on the tag metadata of each video segment.

[0033] For example, if an emergency is caused by the sudden braking of the vehicle in front, the processor will use semantic tags to find the segments that record the sudden braking action of the vehicle in front and the response behavior of the vehicle itself. At the same time, high-risk segments that were previously retained, such as close following segments before the sudden braking of the vehicle in front, will also be included in the related segments to ensure that all images that are causally related to the event are extracted completely.

[0034] In step 204, the processor organizes all the read related segments and seamlessly splices them together according to the actual chronological order of their occurrence, ultimately forming a coherent and complete event video. This event video fully integrates high-risk hazard segments before the emergency, core footage during the event, and subsequent scenes after the event, clearly presenting the causal chain of the event. The final generated event video can comprehensively and realistically recreate the complete process of an accident or risk event.

[0035] In this application, driving videos are segmented into multiple video clips and stored in a circular buffer. High-risk clips are then selected from these clips, and their storage time in the circular buffer is extended to prevent important clips reflecting potential safety hazards from being prematurely overwritten by new video clips. When an emergency is triggered, related clips, including high-risk clips, are read from the circular buffer based on the tag metadata of the video clips. This ensures that all footage causally related to the event is extracted completely. Finally, the related clips are arranged in chronological order to form a complete event video. In the process of tracing back the event video, this application not only adds semantically related video clips based on tag metadata but also adds high-risk clips with significant traceability value. The resulting event video can comprehensively and realistically recreate the complete occurrence process of the emergency, ensuring the comprehensiveness of the video tracing back of the emergency.

[0036] In this application, three independent logical regions are pre-divided in the vehicle storage medium: a circular buffer, a semantic index region, and a long-term storage region. Each region undertakes different storage functions and operates in coordination.

[0037] The circular buffer is used to write the raw surround-view video stream captured by the vehicle in real time, and a circular overwrite mechanism is used for data management. The circular buffer has a maximum capacity, for example, 64GB, which can store about 2 hours of video. After the circular buffer is full, it can automatically use newly captured video data to overwrite the previously stored video data to ensure that the video recording process continues.

[0038] The semantic index area stores the tag metadata corresponding to each video segment, forming a structured metadata index table. It also employs a cyclic overwrite mechanism to maintain data updates. The semantic index area has a moderate capacity, such as 2GB, which can store approximately one week's worth of index data, enabling it to preserve the tag metadata of video segments over a relatively long period.

[0039] The long-term storage area is used to permanently store spliced ​​and archived event videos. The long-term storage area has a minimum capacity, such as 128GB, which is preset by the user or manufacturer, and this area is not subject to cyclic overwriting.

[0040] In this application, after the processor segments the driving video, it performs semantic recognition on each segmented video segment. The semantic recognition covers the following categories.

[0041] Static semantics: Status information of traffic lights such as red and green lights, traffic sign information such as stop lines and speed limit signs, and information on various lane line types.

[0042] Dynamic semantics: vehicle license plate, color, model, relative speed, and trajectory; pedestrian position, direction of movement, and posture; and various non-motorized vehicle related information.

[0043] Scene semantics: Road scene information such as intersections, ramps, construction areas, bumpy roads, and blind spot risks.

[0044] Risk semantics: dangerous state information such as vehicle crossing the line, vehicle swerving, vehicle decelerating suddenly, pedestrian suddenly crossing, and collision time (TTc) less than the threshold.

[0045] After extracting semantic information, the processor converts the above content into lightweight feature codes to form semantic tags. These semantic tags can concisely represent the risk and scene information of video clips. For example, "pedestrian_running_blind spot" represents the semantic content of a pedestrian running quickly within a blind spot. This semantic tag is actually a textual representation of a semantic tag vector, containing multiple independent fields with interrelationships among them.

[0046] After semantic recognition is completed, the processor calculates the risk level of the current video segment using a large model based on the various semantic information obtained, and normalizes the score to a range of 0 to 100. The higher the risk score, the higher the degree of danger of the driving scenario corresponding to the video segment, the greater the possibility of an accident, and the more likely the video segment is to be a high-risk segment.

[0047] Finally, the processor generates corresponding tag metadata for each video segment. The tag metadata includes the following: 1. A timestamp, with millisecond-level precision, used to identify the start and end times of the video segment. 2. A physical address pointer, pointing to the actual storage location of the video data segment in the circular buffer. 3. A semantic tag vector, a lightweight feature encoding derived from semantic information, such as pedestrian_running_blind spot. 4. A risk score, calculated and output by a large model, ranging from 0 to 100 points. 5. Keyframe thumbnails, thumbnail images of key frames extracted from the video segment.

[0048] For example, tag metadata can be represented as follows.

[0049] Timestamp: 2025-03-17 14:23:15 to 2025-03-17 16:23:15; Physical address pointer: 0x3A4F2B; Semantic label vector: pedestrian_running_blind spot; Risk score: 80; Keyframe thumbnails: Thumbnail images of key frames in a video clip.

[0050] As an optional implementation, step 202, selecting high-risk segments from multiple video clips, includes: Step S11: Determine the individual risk value, scene risk factor, and time urgency correction value for each video segment. The individual risk value is used to indicate the degree of impact of the detected object on driving safety, the scene risk factor is used to indicate the degree of road environment risk, and the time urgency correction value is used to indicate the urgency of the risk occurrence. Step S12: Determine the comprehensive risk value based on the individual risk value and the scenario risk factor; Step S13: Select the maximum value from the comprehensive risk value and the time urgency correction value, and use the maximum value as the risk score of the video segment; Step S14: Select high-risk segments from multiple video segments whose risk scores are greater than the preset score.

[0051] In step S11, the processor adopts a multi-dimensional weighted fusion architecture to calculate and determine the individual risk value, scene risk factor, and time urgency correction value for each video segment.

[0052] The processor first performs a risk assessment on various target objects detected in the driving video. The processor then calculates an individual risk value by weighting and summing the detected target objects according to five dimensions. The individual risk value is used to characterize the degree of impact of the target object on driving safety.

[0053] The process of calculating the individual risk value is as follows: detect the target object in the video clip; determine the risk score of the target object in each preset dimension and the corresponding dimension weight, wherein the preset dimensions include object type, relative distance between the target object and the target vehicle, relative speed between the target object and the target vehicle, movement trend and behavioral characteristics; and sum the risk scores of each preset dimension with the corresponding dimension weights to obtain the individual risk value of the video clip.

[0054] The formula for calculating individual risk value is: Individual Risk = Σ(Dimension Weight × Dimension Risk Score), where each dimension is: object type, relative distance between the target object and the target vehicle, relative speed between the target object and the target vehicle, motion trend, and behavioral characteristics. The dimension weights can be flexibly adjusted according to the vehicle model and safety strategy. For example, the weights of each dimension are: object type 30%, relative distance 25%, relative speed 20%, motion trend 15%, and behavioral characteristics 10%.

[0055] Table 1 shows the five dimensions for calculating individual risk values ​​and their corresponding weights.

[0056] Table 1

[0057] This application determines the risk score and weight of each dimension based on five preset dimensions: object type, relative distance, relative speed, motion trend, and behavioral characteristics. This allows for a comprehensive quantification of the potential danger of the target object from multiple perspectives. By weighting and summing the risk scores of each dimension with their corresponding weights, an individual risk value can be obtained. This objectively measures the actual impact of the target object on driving safety, standardizes risk assessment, and avoids bias caused by subjective evaluation.

[0058] The processor introduces corresponding scenario risk factors based on the current driving environment, such as intersections, blind spots, nighttime, and pedestrian crossings. The scenario risk factor is the product of the corresponding sub-risk factors under each scenario type. The scenario risk factor is the risk value obtained by amplifying or reducing the environment based on the individual risk, and is used to reflect the degree of additional risk brought about by the road environment.

[0059] Table 2 shows the sub-risk factors for each scenario type.

[0060] Table 2

[0061] In Table 2, the scenario risk factor = 1.3 × 1.4 × 1.2 = 2.184.

[0062] When the collision time TTc is calculable, the processor introduces a time urgency correction value to make an independent risk assessment. The time urgency correction value is used to reflect the urgency of the risk and avoid underestimating emergency scenarios.

[0063] When TTc < 1 second, the correction value is set to 90 to 100; When 1 second ≤ TTc < 2 seconds, the correction value is set to 70 to 90; When 2 seconds ≤ TTc < 3 seconds, the correction value increases by 30%; No additional correction is performed when TTc ≥ 3 seconds.

[0064] In step S12, the processor multiplies the individual risk value by the scenario risk factor to calculate the comprehensive risk value, which is: comprehensive risk value = individual risk value × scenario risk factor.

[0065] In step S13, the comprehensive risk score is calculated as min(100, max(comprehensive risk value, time urgency correction value)).

[0066] `max(Comprehensive Risk Value, Time Urgency Correction Value)` means comparing the comprehensive risk value and the time urgency correction value, and selecting the one with the larger value to ensure that the emergency risk brought about by the collision time is not masked by the conventional risk calculation, and to ensure that high-urgency scenarios are correctly identified.

[0067] min(100,...) means limiting the final result to the range of 0 to 100 through upper bound constraints, and using this as the final risk score for the video segment.

[0068] In step S14, the processor compares the risk scores of all video segments with preset scores, filters out video segments with risk scores greater than the preset scores, and identifies them as high-risk segments.

[0069] Table 3 is an example. A pedestrian suddenly rushes out from behind a parked vehicle, 8 meters away from the vehicle, and quickly approaches (relative speed 15 km / h) at an intersection. The vehicle is traveling at night, and the time to stop (TTc) is about 1.5 seconds.

[0070] Table 3

[0071] The video clip received a final risk score of 100, which is higher than the scoring threshold of 60, and was therefore classified as a high-risk clip.

[0072] In this application, the individual risk value quantifies the impact of the detected object on driving safety, the scenario risk factor considers the additional risks of the road environment, and the time urgency correction value highlights emergency scenarios related to collision time, avoiding the underestimation of emergency risks. First, the individual risk value and the scenario risk factor are combined to determine the comprehensive risk value, integrating the target risk and the additional environmental risks to make the risk assessment more closely resemble real driving scenarios. Then, the maximum value between the comprehensive risk value and the time urgency correction value is taken as the risk score for the video segment, ensuring that the selection of video segments satisfies both conventional risk assessment and takes into account the priority of emergency scenarios. Finally, through score filtering, video segments with truly high risk and high traceability value can be accurately identified.

[0073] As an optional implementation, performing a dynamic retention strategy for each high-risk segment includes: Step S21: If it is detected that the circular buffer needs to cover an old video segment, and if the old video segment to be covered is identified as carrying a high-risk marker, then the old video segment is determined to be a high-risk segment and the current retention count of the high-risk segment is determined. The circular buffer is used to store video segments and high-risk segments, and the current retention count is used to indicate the remaining number of times the high-risk segment is allowed to be skipped. Step S22: If the current retention count is greater than zero, skip overwriting high-risk segments and decrement the current retention count by one; Step S23: If the current retention count is zero, then use a new video clip to overwrite the high-risk clip.

[0074] In step S21, the processor monitors the storage status of the circular buffer in real time. The core function of the circular buffer is to store all the segmented video segments and the high-risk segments after screening. However, its storage resources are limited. Under normal circumstances, it will replace the old video segments with new video segments according to the circular overwrite mechanism.

[0075] When the processor detects that the circular buffer is full and an old video segment needs to be overwritten, it identifies all the old video segments to be overwritten one by one. If an old video segment to be overwritten is identified as carrying a high-risk marker, the processor determines that the old video segment is a high-risk segment and simultaneously obtains the current retention count corresponding to the high-risk segment. The purpose of the current retention count is to indicate the remaining number of times the high-risk segment is allowed to be skipped from being overwritten.

[0076] For example, when the risk score of a video segment exceeds a threshold T1, such as 60 points, the processor will set a high-risk marker for the video segment in the circular buffer and assign it an initial counter value C, such as C=5. This initial value means that the high-risk segment can be skipped and covered 5 times, and the current retention count is the number of times this initial value remains after subsequent coverage operations. The reason for setting the high-risk marker and retention count is that high-risk segments carry critical information for incident tracing and risk warning. Unlike ordinary video segments, they need to be prioritized for protection through a dedicated marking and counting mechanism to prevent them from being prematurely lost in the regular cyclic coverage of the circular buffer, thus providing critical data support for subsequent emergency event backtracking.

[0077] In step S22, after obtaining the current retention count of the high-risk segment, the processor will judge the current retention count. If the current retention count is greater than zero, it indicates that the high-risk segment is still in the stage requiring priority protection and has not yet met the conditions for being overwritten. At this time, the processor will skip the overwrite operation of the high-risk segment and will not allow new video segments to replace the high-risk segment. At the same time, the processor will decrement the current retention count of the high-risk segment by 1 and update it to a new current retention count. This will facilitate the determination of whether to continue protecting the high-risk segment when the circular buffer needs to overwrite old data again. This operation follows the intelligent overwrite logic when the circular buffer is full. The purpose is to prioritize the protection of high-risk segments without affecting the normal circular storage of new video in the circular buffer. The processor will skip high-risk segments with a current retention count greater than zero and instead look for other ordinary video segments that can be overwritten, thus ensuring that high-risk segments are not mistakenly overwritten and that the circular buffer can continue to work normally.

[0078] In step S23, if the processor determines that the current retention count of a high-risk segment is zero, it indicates that the priority protection period for the high-risk segment has ended, the risk information it carries has lost its timeliness, or the preset retention count has been reached, and there is no need to continue priority protection. At this time, the processor no longer protects the high-risk segment, but instead uses a new video segment to overwrite the high-risk segment according to the conventional storage mechanism of the circular buffer. This releases the storage resources occupied by the high-risk segment, ensuring that the circular buffer can continuously store new driving video segments, maintaining the circular storage function of the circular buffer, and achieving a balance between prioritizing the protection of critical high-risk segments and not wasting storage resources. This avoids the premature loss of high-risk segments and also prevents them from occupying storage resources for a long time, thus preventing new videos from being stored normally.

[0079] In this application, by identifying high-risk markers during the ring buffer overlay process, ordinary segments are clearly distinguished from high-value, high-risk segments. Then, the current retention count of the high-risk segments is read, and a controllable delayed overlay is implemented on the high-risk segments to avoid the loss of critical information caused by regular cyclic overlay. When the current retention count of a high-risk segment is greater than zero, the overlay of the high-risk segment is skipped and the retention count is decremented by one. This proactively extends the storage time of high-risk segments in the ring buffer, preventing critical footage with accident tracing value from being prematurely overwritten by new data before the event is triggered, thus preserving complete preliminary evidence for subsequent event backtracking. When the current retention count reaches zero, the regular overlay mechanism is restored, and a new video segment is used to overlay the high-risk segment. This reasonably releases the storage space occupied by expired high-risk segments, ensuring the continuous and stable operation of the ring buffer's cyclic recording function, thereby forming a dynamic balance between prioritizing the protection of critical high-risk segments and maintaining efficient utilization of storage resources.

[0080] As an optional implementation, the method further includes: Step S31: Monitor memory usage in the circular buffer; Step S32: If the memory usage rate is greater than the first usage rate threshold, identify the target segments in the circular buffer that have high-risk markers and risk scores that exceed the set score threshold. Step S33: Store the target segment in a temporary buffer and decrement the current retention count of the target segment in the circular buffer or clear the high-risk marker of the target segment. The temporary buffer is located in the long-term storage area, which is used to store event video. Step S34: If the memory usage rate is greater than the second usage rate threshold, the target fragment in the circular buffer is transferred to the temporary buffer.

[0081] In step S31, the processor monitors the memory usage status of the circular buffer in real time, continuously acquiring and judging the current memory utilization rate. When the memory utilization rate is lower than the first utilization rate threshold, such as below 70%, it indicates that the storage resources of the circular buffer are sufficient, and the processor does not need to initiate additional storage scheduling operations, continuing to perform regular storage and cyclic overwriting of video segments according to the original process.

[0082] In step S32, when the memory usage rate of the circular buffer exceeds a first usage threshold, such as 70%, it indicates that the circular buffer is under significant storage pressure. At this point, the processor performs a comprehensive search within the circular buffer to identify video segments that meet two conditions: first, they carry a high-risk marker; second, their risk score exceeds a set scoring threshold, such as a risk score exceeding 80 points. These identified segments are then designated as target segments. Target segments represent video content with a higher risk level and greater critical value for event tracing; they are core data that needs to be backed up first when storage space is limited.

[0083] In step S33, the processor transfers the identified target segments to a temporary buffer. This temporary buffer is located within the long-term storage area, which primarily stores the final generated event video. The temporary buffer can be dynamically partitioned according to actual needs and managed based on storage time, prioritizing the deletion of data stored earlier. Transferring target segments to the temporary buffer allows for the secure backup of critical risk segments, preventing their deletion during subsequent cyclic overwriting of the circular buffer. After the transfer is complete, the processor decrements the current retention count of the corresponding target segment in the circular buffer or directly removes the high-risk marker from the target segment. By reducing or removing the protection status of the target segment in the circular buffer, it can be normally replaced in subsequent overwriting processes, thereby releasing the storage space it occupies and alleviating buffer storage pressure.

[0084] In step S34, if the processor further detects that the memory usage rate of the circular buffer is greater than the second usage rate threshold, for example, greater than 90%, it indicates that the storage space is close to saturation, and the processor executes a transfer strategy. At this time, the processor directly transfers the entire target segment in the circular buffer to the temporary buffer, quickly releasing a large amount of storage space. This prevents newly acquired driving video segments from being unable to be written normally due to insufficient memory in the circular buffer, ensuring that the circular buffer can continuously and stably complete video recording and loop storage. In addition, at the same time, the system sends out a prompt message to inform the user that the current storage space is about to run out and the original video data will be overwritten in a loop, reminding the user to promptly check whether there is any important video content that needs to be saved separately, so as to complete the retention operation of important segments before the data is overwritten.

[0085] This application monitors the memory usage of the circular buffer in real time, enabling timely detection of storage pressure and initiation of tiered storage scheduling. When the memory usage exceeds a first threshold, it accurately identifies target segments with high-risk markers and risk scores exceeding a set threshold. These target segments are then transferred to a temporary buffer within the long-term storage area for backup. Simultaneously, the retention count of the corresponding target segments in the circular buffer is decremented or the high-risk marker is cleared, lowering their protection level to allow for subsequent normal overwriting and space release. When the memory usage further exceeds a second threshold, the target segments are directly transferred in batches to the temporary buffer, quickly alleviating storage space saturation pressure. Thus, when storage resources in the circular buffer are scarce, it achieves both secure backup of high-value target segments and orderly release of storage space, ensuring uninterrupted continuous recording of driving videos. This forms a tiered response, secure, and reliable storage management mechanism, improving system stability and critical data retention rates.

[0086] As an optional implementation, in step 203, in response to the triggering of an emergency event, reading relevant segments related to the emergency event from multiple video segments based on tag metadata includes: Step S41: In response to the triggering of an emergency event, determine the triggering time of the emergency event; Step S42: Based on the trigger time, reverse query the metadata of each tag stored in the semantic index area, where the semantic index area is located in a circular buffer; Step S43: According to the preset backtracking rules, and in combination with the tag metadata, search for related fragments in the circular buffer that are related to the emergency event; Step S44: Read the associated fragments from the preset storage area according to the preset priority order.

[0087] In step S41, the processor monitors the triggering status of emergency events in real time. When it receives a trigger signal for an emergency event, it immediately responds to the trigger command and determines the triggering time of the emergency event. The triggering time is the benchmark for subsequent searching of related segments and reconstructing the event process. The processor synchronously records the specific time information of the triggering time, which corresponds to the start and end times of each video segment, ensuring that the subsequent backtracking range is accurate and providing a clear time reference for reverse lookup and segment matching.

[0088] In step S42, the processor initiates a reverse query process based on the determined trigger time of the emergency event, retrieving the tag metadata of each video segment stored in the semantic index area one by one. The semantic index area is located inside a circular buffer and is specifically used to centrally store the tag metadata of all video segments, facilitating rapid retrieval and matching by the processor. The tag metadata describes the semantic features of the corresponding video segment, including key information such as driving scene, vehicle behavior, and surrounding environment. By reverse-querying these semantic features, the processor can locate potential segments that may be related to the emergency event before the trigger time, avoiding missing potentially hazardous footage before the event occurs.

[0089] In step S43, after determining the trigger time of the emergency event and performing a reverse query of the semantic index area, the processor, according to the preset backtracking rules and in combination with the tag metadata corresponding to each video segment, comprehensively searches for related segments in the circular buffer that are related to this emergency event, so as to ensure that the cause and effect of the event can be fully restored in the future.

[0090] The process of finding related segments includes: identifying the event object, abnormal behavior, and mutated environment in the emergency; determining the first related segment matching the event object, the second related segment matching the abnormal behavior, and the third related segment matching the mutated environment based on the semantic tag vector in the tag metadata, wherein the semantic tag vector is used to indicate the semantic tag of the video segment corresponding to the tag metadata; identifying high-risk segments based on the video risk level in the tag metadata; and taking the first related segment, the second related segment, the third related segment, and the high-risk segment as related segments associated with the emergency.

[0091] During the process of finding related fragments, the processor first analyzes the emergency event to identify three key types of information constituting the emergency: the event object, abnormal behavior, and the abrupt change environment. The event object refers to the collision vehicle directly related to the emergency event. The processor focuses on finding the earliest time when the collision vehicle appeared in the field of vision, which may be traced back to several minutes before the emergency event was triggered, to ensure complete capture of the collision vehicle's entire trajectory. Abnormal behavior is used to trace the risk triggers. For example, abnormal behavior includes violations or dangerous driving behaviors of the target vehicle in the period before the triggering time, such as driving over the line, swerving, sudden deceleration, and collision time-to-competition (TTC) being less than the threshold. The abrupt change environment refers to the key nodes of the scene that induce the risk, such as changes in the state of traffic lights, the brake lights of the vehicle in front illuminating, and pedestrians suddenly entering the road.

[0092] Subsequently, the processor performs matching based on the semantic tag vectors contained in the tag metadata. Semantic tag vectors identify the semantic content corresponding to video segments, and can also represent the event object, abnormal behavior, and drastic environment of each video segment. The processor compares the identified event objects with the semantic tag vectors to filter out the first associated segments containing the event objects; it compares the identified abnormal behaviors with the semantic tag vectors to filter out the second associated segments recording the corresponding dangerous driving actions; and it compares the determined drastic environment with the semantic tag vectors to filter out the third associated segments containing the corresponding scene changes. Through this multi-dimensional matching method, the processor can locate video segments related to emergency events from three perspectives: object, behavior, and environment, avoiding content omissions caused by a single search method.

[0093] In addition, the processor will filter out previously identified and protected high-risk segments based on the video risk level recorded in the tag metadata. High-risk segments record security risks that are causally related to the emergency and are an important part of presenting the complete development process of the emergency. Finally, the processor integrates the first associated segment, the second associated segment, the third associated segment, and the high-risk segment into a unified set of all associated segments related to this emergency, ensuring that the retrospective content covers the cause, process, and pre-existing risks of the emergency.

[0094] This application deconstructs an emergency event into three elements: the event object, abnormal behavior, and abrupt environmental changes. It focuses on tracking the entire trajectory of the colliding vehicle and uses semantic tag vectors for multi-dimensional matching to accurately locate video segments directly related to the emergency, capturing the complete picture of the event. Simultaneously, high-risk segments are introduced as part of the associated segments, effectively supplementing information about potential hazards before the emergency occurs, and fully presenting the entire process from the appearance of the event object, risk accumulation to the event triggering. This method of finding associated segments relies on semantic tag metadata for precise filtering, avoiding interference from irrelevant video content while ensuring no key risk scenes and event object trajectories are missed. This significantly improves the accuracy and efficiency of event retrospection, providing solid data support for subsequent realistic reconstruction of accident or risk scenarios.

[0095] In step S44, after determining all related fragments related to the emergency event, the processor reads the corresponding related fragments from the preset storage area according to the preset priority order, and adopts a multi-level degraded reading mechanism to ensure the availability of related fragments to the greatest extent.

[0096] The process of reading associated fragments from a preset storage area according to a preset priority order includes: reading associated fragments from the corresponding position in the circular buffer based on the physical address pointer in the tag metadata; if associated fragments cannot be read from the circular buffer, then reading associated fragments from the temporary buffer; if associated fragments cannot be read from the temporary buffer, then restoring the keyframe sequence of the associated fragments based on the keyframe thumbnails in the tag metadata, and using the keyframe sequence as the associated fragments.

[0097] Associated segments are read from preset storage areas according to a preset priority order, employing a multi-level degradation reading mechanism. The first priority is reading data from the circular buffer. The processor directly locates and reads the associated segment based on the physical address pointer recorded in the tag metadata. This method is the fastest and can directly obtain the complete original video. If the corresponding associated segment no longer exists in the circular buffer due to circular overwriting, the process moves to the second priority. The processor automatically checks if backup data for the associated segment exists in the temporary buffer and reads the corresponding content from the temporary buffer.

[0098] If the temporary buffer does not contain a complete associated video segment, the process enters the third priority level. The processor extracts and restores the keyframe sequence corresponding to the associated segment based on the keyframe thumbnails stored in the tag metadata. The keyframe sequence is then combined to form a keyframe restored video, which serves as a replacement for the associated segment.

[0099] If no valid video data can be obtained from the above storage areas, the fourth priority protection mechanism will be activated to at least retain and read the structured event log. The log will clearly record relevant event information, such as the red car crossing the line and cutting in 120 seconds after the trigger time, and the red car changing lanes again 45 seconds after the trigger time, so that users can review and trace it later.

[0100] This application first reads the associated segments from the corresponding position in the circular buffer based on the physical address pointer in the tag metadata, which can quickly locate and obtain the complete original video data, ensuring the reading efficiency and image integrity of event backtracking. When the corresponding associated segments cannot be read in the circular buffer, backup data is automatically read from the temporary buffer to avoid the loss of key video segments due to circular overwriting, forming a secondary data protection. When the temporary buffer is also unavailable, a keyframe sequence is generated based on the keyframe thumbnails in the tag metadata as a substitute, ensuring that the core image information of the event can still be preserved even if the original video is missing. Thus, a multi-level degradation reading mechanism of circular buffer, temporary buffer, and keyframe restoration is constructed, which can reliably obtain video content related to emergency events under various storage states, and maximize the integrity of event backtracking.

[0101] After completing multi-level reading, the processor organizes the acquired discontinuous but semantically related video clips or keyframe sequences, seamlessly splicing them together according to the chronological order of their actual occurrence times to form a complete and coherent video file of the event story. The processor then stores this video file in long-term storage and overlays key semantic tags onto the video frame, such as the first appearance of a dangerous target or a solid line, to facilitate intuitive identification of key risk points by the user.

[0102] After event archiving is complete, the processor automatically updates the semantic index area, marking the archived video clips as archived and simultaneously reducing their retention priority in the circular buffer to prevent high-priority contention from leading to unreasonable storage resource allocation. Simultaneously, the system performs a periodic cleanup strategy on the temporary buffer, automatically removing expired data that has not been referenced for more than seven days. This ensures the safe retention of important data while freeing up storage space occupied by invalid data, maintaining the overall efficient operation of the storage system.

[0103] This application first identifies the event object, abnormal behavior, and mutating environment in an emergency, enabling precise breakdown of the event's constituent elements and causal chain. Then, based on semantic tag vectors in the tag metadata, it matches the first associated segment corresponding to the event object, the second associated segment corresponding to the abnormal behavior, and the third associated segment corresponding to the mutating environment. This achieves comprehensive retrieval of event-related video content from multiple dimensions—object, behavior, and environment—avoiding the omission of crucial footage due to single-dimensional retrieval. Simultaneously, it combines video risk levels in the tag metadata to identify high-risk segments, including footage with prior risks and hazards within the association scope. Finally, it integrates the multi-dimensional matched segments and high-risk segments into a complete associated segment, fully reconstructing the entire process of an emergency event from hazard accumulation and causal emergence to its occurrence. This enhances the comprehensiveness of event retrospection and ensures that the generated event video truthfully and completely presents the causal chain of the accident.

[0104] This application provides a schematic diagram of the overall process of vehicle video playback, such as... Figure 3 As shown, it includes the following content.

[0105] Step 301: Divide the vehicle storage area.

[0106] The vehicle-mounted storage medium is pre-divided into a circular buffer, a semantic index area, and a long-term storage area, which are used for cyclic writing of raw video, storage of tag metadata, and permanent storage of event video, respectively.

[0107] Step 302: Vehicle video acquisition and video segmentation.

[0108] The vehicle surround view camera continuously collects raw surround view video streams and writes them into a circular buffer. The video stream is then segmented according to fixed time or scene changes to form multiple video segments with start and end times.

[0109] Step 303: Semantic recognition and tag metadata generation.

[0110] Semantic recognition is performed on each video segment to extract static semantics, dynamic semantics, scene semantics, and risk semantics. The semantic information is converted into semantic tag vectors to generate tag metadata containing timestamps, physical address pointers, semantic tag vectors, risk scores, and keyframe thumbnails.

[0111] Step 304: Screening and marking of high-risk segments.

[0112] The individual risk value, scene risk factor, and time urgency correction value of each video segment are calculated sequentially and then fused to obtain a comprehensive risk value. The larger value between the comprehensive risk value and the time urgency correction value is used as the segment's risk score. The risk score of each video segment is compared with a preset score, and segments with risk scores greater than the preset score are selected as high-risk segments, marked as high-risk, and configured to retain a count.

[0113] Step 305: Retrieve and read relevant fragments related to the emergency event.

[0114] In response to an emergency event, the semantic index area is queried in reverse based on the trigger time. Related fragments are matched by event object, abnormal behavior, and mutated environment. Relevant data is read according to the priority of circular buffer, temporary buffer, keyframe restoration, and event log.

[0115] Step 306: Event video synthesis, archiving, and storage cleanup.

[0116] The read related segments are spliced ​​into an event video in chronological order, key semantic tags are superimposed, and then stored in the long-term storage area; the semantic index table is updated and the retention priority of archived segments is reduced, and expired data in the temporary buffer is cleaned up periodically.

[0117] Based on the same technical concept, this application provides a data processing apparatus, such as... Figure 4 As shown, the device includes: The segmentation module 401 is used to segment the driving video into multiple video segments and determine the tag metadata of each video segment, wherein the video segments are stored in a circular buffer and the tag metadata is used to indicate the semantic features of the video segments; The selection and execution module 402 is used to select high-risk segments from multiple video segments and execute a dynamic retention strategy for each high-risk segment, wherein the dynamic retention strategy is used to extend the storage time of high-risk segments in the circular buffer. The reading module 403 is used to read related segments of the emergency from multiple video segments based on tag metadata in response to the triggering of an emergency event, wherein the related segments include high-risk segments; The splicing module 404 is used to splice multiple related segments in chronological order to form an event video.

[0118] Optionally, the selection and execution module 402 is used for: If it is detected that the circular buffer needs to cover an old video segment, and if the old video segment to be covered is identified as carrying a high-risk marker, then the old video segment is determined to be a high-risk segment and the current retention count of the high-risk segment is determined. The circular buffer is used to store video segments and high-risk segments, and the current retention count is used to indicate the remaining number of times the high-risk segment can be skipped. If the current retention count is greater than zero, skip overwriting high-risk segments and decrement the current retention count by one; If the current retention count is zero, then a new video clip is used to overwrite the high-risk clip.

[0119] Optionally, the device is also used for: Monitor memory usage in the circular buffer; If the memory usage rate is greater than the first usage rate threshold, then identify the target segments in the circular buffer that have high-risk markers and risk scores that exceed the set score threshold. The target segment is stored in a temporary buffer, and the current retention count of the target segment in the circular buffer is decremented or the high-risk flag of the target segment is cleared. The temporary buffer is located in the long-term storage area, which is used to store event video. If the memory usage rate is greater than the second usage rate threshold, the target fragment in the circular buffer will be transferred to the temporary buffer.

[0120] Optionally, the reading module 403 is used for: In response to the triggering of an emergency, determine the triggering time of the emergency; Based on the trigger time, reverse query the metadata of each tag stored in the semantic index area, where the semantic index area is located in a circular buffer; According to the preset backtracking rules, the relevant fragments related to the emergency event are searched from the circular buffer in combination with the tag metadata; Relevant fragments are read from the preset storage area according to the preset priority order.

[0121] Optionally, the reading module 403 is specifically used for: Identify the event objects, anomalous behaviors, and mutating environments in emergency events; Based on the semantic tag vector in the tag metadata, the first associated segment matching the event object, the second associated segment matching the abnormal behavior, and the third associated segment matching the mutated environment are determined respectively. The semantic tag vector is used to indicate the semantic tag of the video segment corresponding to the tag metadata. High-risk segments are identified based on the video risk level in the tag metadata. The first associated fragment, the second associated fragment, the third associated fragment, and the high-risk fragment are considered as associated fragments related to the emergency.

[0122] Optionally, the reading module 403 is specifically used for: Based on the physical address pointer in the tag metadata, read the associated fragment from the corresponding position in the circular buffer; If the associated fragment cannot be read from the circular buffer, then the associated fragment is read from the temporary buffer. If the associated fragment cannot be read from the temporary buffer, the keyframe sequence of the associated fragment is reconstructed based on the keyframe thumbnail in the tag metadata, and the keyframe sequence is used as the associated fragment.

[0123] Optionally, the selection and execution module 402 is used for: The individual risk value, scene risk factor, and time urgency correction value for each video segment are determined. The individual risk value is used to indicate the degree of impact of the detected object on driving safety, the scene risk factor is used to indicate the degree of road environment risk, and the time urgency correction value is used to indicate the urgency of the risk occurrence. The comprehensive risk value is determined based on individual risk values ​​and scenario risk factors; The maximum value is selected from the overall risk value and the time urgency correction value, and the maximum value is used as the risk score of the video segment; Select high-risk segments from multiple video clips whose risk scores are greater than a preset value.

[0124] Optionally, determining the individual risk value for each video segment includes: Detect target objects in video clips; Determine the risk score of the target object in each preset dimension and the corresponding dimension weight. The preset dimensions include object type, relative distance between the target object and the target vehicle, relative speed between the target object and the target vehicle, movement trend, and behavioral characteristics. The individual risk value of a video segment is obtained by weighting and summing the risk scores of each preset dimension with their corresponding weights.

[0125] Optionally, the tag metadata includes: video start and end timestamps, physical address pointers, semantic tag vectors, risk scores, and keyframe thumbnails.

[0126] like Figure 5 As shown, this application provides an electronic device including a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0127] Memory 503 is used to store computer programs.

[0128] In one embodiment of this application, when the processor 501 executes the program stored in the memory 503, it implements the data processing method provided in any of the foregoing method embodiments.

[0129] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the data processing method provided in any of the foregoing method embodiments.

[0130] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0132] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0133] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. 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 this application. Therefore, this application 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 claimed herein.

Claims

1. A data processing method, characterized in that, The method includes: The driving video is segmented into multiple video segments, and the tag metadata for each video segment is determined. The video segments are stored in a circular buffer, and the tag metadata is used to indicate the semantic features of the video segments. High-risk segments are selected from multiple video segments, and a dynamic retention strategy is applied to each high-risk segment, wherein the dynamic retention strategy is used to extend the storage time of the high-risk segments in the circular buffer; In response to the triggering of an emergency event, associated segments related to the emergency event are read from the plurality of video segments based on the tag metadata, wherein the associated segments include the high-risk segments; Multiple related clips are spliced ​​together in chronological order to form an event video.

2. The method according to claim 1, characterized in that, Implementing a dynamic retention strategy for each high-risk segment includes: If it is detected that the circular buffer needs to cover an old video segment, and if the old video segment to be covered is identified as carrying a high-risk marker, then the old video segment is determined to be a high-risk segment and the current retention count of the high-risk segment is determined. The circular buffer is used to store video segments and high-risk segments, and the current retention count is used to indicate the remaining number of times the high-risk segment is allowed to be skipped. If the current retention count is greater than zero, skip overwriting the high-risk segment and decrement the current retention count by one; If the current retention count is zero, then a new video clip is used to overwrite the high-risk clip.

3. The method according to claim 1, characterized in that, The method further includes: Monitor memory usage in the circular buffer; If the memory usage rate is greater than the first usage rate threshold, then the target segment in the circular buffer that has a high-risk marker and a risk score exceeding the set score threshold is identified. The target segment is stored in a temporary buffer, and the current retention count of the target segment in the circular buffer is decremented by one or the high-risk flag of the target segment is cleared. The temporary buffer is located in a long-term storage area, which is used to store the event video. If the memory usage rate is greater than the second usage rate threshold, the target fragment in the circular buffer is transferred to the temporary buffer.

4. The method according to claim 1, characterized in that, In response to the triggering of an emergency event, reading relevant segments related to the emergency event from the plurality of video segments based on the tag metadata includes: In response to the triggering of an emergency event, determine the triggering time of the emergency event; Based on the triggering time, the metadata of each tag stored in the semantic index area is queried in reverse, wherein the semantic index area is located in a circular buffer; According to the preset backtracking rules, the relevant fragments related to the emergency event are searched from the circular buffer based on the tag metadata; The associated fragments are read from the preset storage area according to a preset priority order.

5. The method according to claim 4, characterized in that, According to preset backtracking rules, the process of searching for related fragments concerning the emergency event from the circular buffer, in conjunction with the tag metadata, includes: Identify the event objects, abnormal behaviors, and mutating environments in the aforementioned emergency events; Based on the semantic tag vector in the tag metadata, the first associated segment matching the event object, the second associated segment matching the abnormal behavior, and the third associated segment matching the mutation environment are determined respectively, wherein the semantic tag vector is used to indicate the semantic tag of the video segment corresponding to the tag metadata; Based on the video risk level in the aforementioned tag metadata, high-risk segments are identified; The first associated fragment, the second associated fragment, the third associated fragment, and the high-risk fragment are considered as associated fragments related to the emergency event.

6. The method according to claim 4, characterized in that, Reading the associated fragments from a preset storage area according to a preset priority order includes: Based on the physical address pointer in the tag metadata, the associated fragment is read from the corresponding position in the circular buffer; If the associated fragment cannot be read from the circular buffer, then the associated fragment is read from the temporary buffer. If the associated fragment cannot be read from the temporary cache, the keyframe sequence of the associated fragment is reconstructed based on the keyframe thumbnail in the tag metadata, and the keyframe sequence is used as the associated fragment.

7. The method according to claim 1, characterized in that, High-risk segments were selected from multiple video clips, including: Each video segment is assigned an individual risk value, a scene risk factor, and a time urgency correction value. The individual risk value indicates the degree of impact of the detected object on driving safety, the scene risk factor indicates the degree of road environment risk, and the time urgency correction value indicates the urgency of the risk occurrence. Based on the individual risk value and the scenario risk factor, a comprehensive risk value is determined; The maximum value is selected from the comprehensive risk value and the time urgency correction value, and the maximum value is used as the risk score of the video segment. Select high-risk segments from multiple video clips whose risk scores are greater than a preset value.

8. The method according to claim 1, characterized in that, Determining the individual risk value for each video segment includes: Detect the target object in the video segment; Determine the risk score and corresponding weight of the target object in each preset dimension, wherein the preset dimensions include object type, relative distance between the target object and the target vehicle, relative speed between the target object and the target vehicle, movement trend and behavioral characteristics; The individual risk value of the video segment is obtained by weighting and summing the risk scores of each preset dimension with the corresponding dimension weights.

9. The method according to claim 1, characterized in that, The tag metadata includes: video start and end timestamps, physical address pointers, semantic tag vectors, risk scores, and keyframe thumbnails.

10. A vehicle, characterized in that, The vehicle includes a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to implement the method as described in any one of claims 1 to 9.