A content matching synchronization method and related apparatus

By calculating the optical flow field of video frames and the dynamic characteristics of CAN data, mapping them to the same semantic space, and using a cross-modal matching model for alignment, the synchronization error problem caused by the reliance on timestamps in existing technologies is solved, and high-precision alignment of video frames and CAN messages is achieved.

CN122226544APending Publication Date: 2026-06-16SHENZHEN STREAMING VIDEO TECH
View PDF -1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-29
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In the development of existing intelligent driving algorithms, the synchronization method between video frames and CAN messages mainly relies on timestamp matching. However, if there is an error or loss in the timestamp, correct alignment cannot be achieved.

Method used

By calculating the optical flow field of video frames and the dynamic features of CAN data, they are mapped to the same semantic space. A cross-modal matching model is used to calculate the similarity matrix, determine the optimal alignment path, and generate a synchronization mapping table for alignment.

Benefits of technology

It enables accurate alignment of video frames and CAN messages without relying on timestamps, improving the accuracy and robustness of synchronization and reducing dependence on timestamp errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122226544A_ABST
    Figure CN122226544A_ABST
Patent Text Reader

Abstract

The application discloses a content matching synchronization method and related device, the optical flow field of the continuous frame in the to-be-synchronized video is calculated, and analysis is performed to obtain visual dynamic features; vehicle dynamic features are extracted from the to-be-synchronized CAN data; the visual dynamic features and the vehicle dynamic features are mapped to obtain a video embedding vector and a to-be-synchronized CAN data embedding vector; a similarity matrix of the video embedding vector and the to-be-synchronized CAN data embedding vector is calculated; an optimal alignment path between the to-be-synchronized video and the to-be-synchronized CAN data is determined based on the similarity matrix; a synchronization mapping table is generated based on the optimal alignment path, and the to-be-synchronized video and the to-be-synchronized CAN data are aligned according to the synchronization mapping table. Vehicle dynamic features such as optical flow field, rotation intensity, motion blur and scene displacement are extracted from the video frame, and cross-modal semantic correlation is established between the vehicle dynamic features and CAN signal features, so that intelligent synchronization matching based on content is realized, and accurate alignment can be achieved without relying on time stamps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a content matching and synchronization method and related apparatus. Background Technology

[0002] In the development of intelligent driving algorithms, it is necessary to feed back video and CAN messages collected from actual vehicles into the domain controller for simulation. A key challenge in this feedback is establishing the precise correspondence between video frames and CAN messages.

[0003] Currently, commonly used synchronization methods mainly rely on timestamps for matching. For example, timestamp subtitles are superimposed on video frames, and OCR is used to extract the timestamps after re-processing to calculate the deviation. The common feature of these methods is that they use timestamps as the sole basis for alignment. If the timestamps themselves are inaccurate or missing, correct alignment cannot be achieved. Summary of the Invention

[0004] This application provides a content matching and synchronization method and related apparatus, which aims to achieve accurate matching without relying on timestamps.

[0005] To achieve the above objectives, this application provides the following technical solution:

[0006] The first aspect of this application provides a content matching and synchronization method, including:

[0007] Acquire the vehicle's video and CAN data to be synchronized;

[0008] The optical flow field of consecutive frames in the video to be synchronized is calculated and analyzed to obtain visual dynamic features; the optical flow field contains vehicle motion information.

[0009] Vehicle dynamic features are extracted from the CAN data to be synchronized.

[0010] The visual dynamic features and the vehicle dynamic features are mapped to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized.

[0011] Calculate the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized;

[0012] The optimal alignment path between the video to be synchronized and the CAN data to be synchronized is determined based on the similarity matrix.

[0013] A synchronization mapping table is generated based on the optimal alignment path, and the video to be synchronized and the CAN data to be synchronized are aligned according to the synchronization mapping table.

[0014] Optionally, the analysis of the optical flow field to obtain visual dynamic features includes:

[0015] Global motion intensity, global rotation intensity, pixel-level motion direction, forward and backward turning discrimination, left and right turning discrimination, and motion blur features are extracted from the optical flow field.

[0016] The global motion intensity, the global rotation intensity, the pixel-level motion direction, the forward and backward turning discrimination value, the left and right turning discrimination value, and the motion blur feature are concatenated to obtain the initial video dynamic features;

[0017] The initial video dynamic features are extracted using a backbone network to obtain visual dynamic features.

[0018] Optionally, extracting vehicle dynamic features from the CAN data to be synchronized includes:

[0019] The CAN data to be synchronized is parsed to obtain key dynamic signals;

[0020] Calculate the statistical characteristics of the key dynamic signal;

[0021] The statistical features are concatenated to obtain the initial vehicle dynamic features;

[0022] The initial vehicle dynamic features are extracted using a convolutional network to obtain the vehicle dynamic features.

[0023] Optionally, after extracting the vehicle dynamic features from the CAN data to be synchronized, the method further includes:

[0024] The visual dynamic features and the vehicle dynamic features are then enhanced with context to obtain enhanced visual dynamic features and enhanced vehicle dynamic features.

[0025] The enhanced visual dynamic features and the enhanced vehicle dynamic features are mapped to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized.

[0026] Optionally, calculating the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized includes:

[0027] The video embedding vector and the CAN data embedding vector to be synchronized are input into the cross-modal matching model to obtain the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized.

[0028] Optional, also includes:

[0029] The cross-modal matching model is quantized to obtain the quantized cross-modal matching model;

[0030] When the video to be synchronized is a long video, batch feature extraction is performed on the video to be synchronized to obtain the visual dynamic features;

[0031] The visual dynamic features and the vehicle dynamic features are mapped to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized.

[0032] The video embedding vector and the CAN data to be synchronized are input into the quantized cross-modal matching model to obtain a similarity matrix;

[0033] The similarity matrix is ​​divided into blocks to obtain multiple sub-blocks;

[0034] For each sub-block, the optimal path for the sub-block is determined based on the sub-block;

[0035] The optimal alignment path is obtained by connecting the optimal paths of all sub-blocks using the dynamic time warping algorithm.

[0036] Optionally, the training process of the cross-modal matching model includes:

[0037] Acquire sample videos and sample CAN data; the sample videos and sample CAN data have a corresponding relationship;

[0038] The sample video and the sample CAN data are input into the cross-modal matching model to obtain the sample similarity matrix;

[0039] Calculate the information noise comparison estimation loss function between the sample similarity matrix and the actual similarity matrices corresponding to the sample video and the sample CAN data;

[0040] Calculate the temporal consistency loss function between the sample similarity matrix and the actual similarity matrix;

[0041] Calculate the bidirectional consistency loss function between the sample similarity matrix and the actual similarity matrix;

[0042] The total loss function is determined based on the information noise contrast estimation loss function, the temporal consistency loss function, and the bidirectional consistency loss function;

[0043] When the total loss function converges, the cross-modal matching model training is considered complete.

[0044] If the total loss function fails to converge, return to the step of inputting the sample video and the sample CAN data into the cross-modal matching model to obtain the sample similarity matrix.

[0045] Optionally, determining the optimal alignment path between the video to be synchronized and the CAN data to be synchronized based on the similarity matrix includes:

[0046] The positional prior reward is superimposed on the similarity matrix to obtain the final similarity matrix used for alignment;

[0047] Based on the final similarity matrix and bandwidth constraints, the dynamic time warping algorithm is improved to obtain the improved dynamic time warping algorithm.

[0048] The cumulative cost between the video to be synchronized and the CAN data to be synchronized is calculated using the improved dynamic time warping algorithm.

[0049] The path with the minimum cumulative cost is determined as the optimal alignment path.

[0050] A second aspect of this application provides a content matching and synchronization device, comprising:

[0051] The acquisition unit is used to acquire the vehicle's video and CAN data to be synchronized.

[0052] The analysis unit is used to calculate the optical flow field of consecutive frames in the video to be synchronized, and to analyze the optical flow field to obtain visual dynamic features; the optical flow field includes vehicle motion information.

[0053] Extraction unit, used to extract vehicle dynamic features from the CAN data to be synchronized;

[0054] The mapping unit is used to map the visual dynamic features and the vehicle dynamic features to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized.

[0055] The calculation unit is used to calculate the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized;

[0056] The determining unit is used to determine the optimal alignment path between the video to be synchronized and the CAN data to be synchronized based on the similarity matrix;

[0057] An alignment unit is used to generate a synchronization mapping table based on the optimal alignment path, and to align the video to be synchronized and the CAN data to be synchronized according to the synchronization mapping table.

[0058] A third aspect of this application provides a computer device, including: a processor and a memory, the processor and the memory being connected via a bus; wherein, the processor is used to call and execute a program stored in the memory; the memory is used to store the program, the program being used to implement the content matching and synchronization method provided in the first aspect of this application.

[0059] A fourth aspect of this application provides a storage medium storing computer-executable instructions for performing the content matching and synchronization method provided in the first aspect of this application.

[0060] The technical solution provided in this application calculates and analyzes the optical flow field of consecutive frames in the video to be synchronized to obtain visual dynamic features; extracts vehicle dynamic features from the CAN data to be synchronized; maps the visual dynamic features and vehicle dynamic features to obtain video embedding vectors and CAN data embedding vectors to be synchronized; calculates the similarity matrix between the video embedding vectors and the CAN data embedding vectors to be synchronized; determines the optimal alignment path between the video and CAN data to be synchronized based on the similarity matrix; generates a synchronization mapping table based on the optimal alignment path; and aligns the video and CAN data to be synchronized according to the synchronization mapping table. By extracting vehicle dynamic features such as optical flow field, rotation intensity, motion blur, and scene displacement from video frames and establishing cross-modal semantic associations with CAN signal features, content-based intelligent synchronization matching is achieved, enabling accurate alignment without relying on timestamps. Attached Figure Description

[0061] 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, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0062] Figure 1 A flowchart illustrating a content matching and synchronization method provided in this application embodiment;

[0063] Figure 2 A schematic diagram of a synchronization system provided in an embodiment of this application;

[0064] Figure 3 A schematic diagram of the architecture of a content matching and synchronization device provided in an embodiment of this application;

[0065] Figure 4 This is a schematic diagram of the architecture of an electronic device provided in an embodiment of this application. Detailed Implementation

[0066] 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, and 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.

[0067] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0068] like Figure 1 The diagram shown is a flowchart of a content matching and synchronization method provided in an embodiment of this application, including the following steps:

[0069] S101: Acquire the vehicle's video and CAN data to be synchronized.

[0070] Optionally, after step S101, in order to meet the needs of practical applications, the reasoning process of the optimal alignment path is optimized. Therefore, in another embodiment of this application, an optimal alignment path optimization method is provided, including processes A1 to A7.

[0071] A1: Quantize the cross-modal matching model to obtain the quantized cross-modal matching model.

[0072] Among them, the data format of the cross-modal matching model is quantized from FP32 to INT8, and the specific form is shown in formula (1).

[0073] (1)

[0074] In formula (1), For model weights with FP32 accuracy, These are the quantized INT8 weights; and For quantization scale and zero-point parameters; This indicates rounding to the nearest integer.

[0075] As can be seen, the quantized cross-modal matching model is about 4 times smaller, the inference speed is about 2 times faster, and the accuracy loss is less than 1%, thus significantly reducing memory usage and computation.

[0076] A2: When the video to be synchronized is a long video, perform batch feature extraction on the video to obtain visual dynamic features.

[0077] Specifically, the specific form of batch feature extraction for synchronous videos is shown in formula (2).

[0078] (2)

[0079] In formula (2), For the first Frame image, This refers to the number of video frames. This represents the batch feature extraction process, with the output being the video embedding sequence corresponding to each frame. (i.e., visual dynamic features).

[0080] Understandably, batch processing utilizes the parallel capabilities of GPUs, making it about 5 times faster than frame-by-frame processing. At the same time, combined with feature caching technology, it effectively reduces the overhead of video feature extraction.

[0081] A3: Map visual dynamic features and vehicle dynamic features to the same semantic space to obtain video embedding vectors and CAN data embedding vectors to be synchronized.

[0082] Among them, vehicle dynamic characteristics need to be extracted from the synchronized CAN data.

[0083] Specifically, the Siamese network structure is adopted, and it is mapped to the same semantic space through a shared projection head (the projection head is a two-layer MLP with an output dimension of 64). Its specific manifestation is shown in formula (3) and formula (4).

[0084] (3)

[0085] (4)

[0086] In formulas (3) and (4), As a visual dynamic feature, For video embedding vectors, For vehicle dynamic characteristics, This is the embedding vector for the CAN data to be synchronized.

[0087] A4: Input the video embedding vector and the CAN data to be synchronized into the quantized cross-modal matching model to obtain the similarity matrix.

[0088] A5: Divide the similarity matrix into blocks to obtain multiple sub-blocks.

[0089] The similarity matrix is ​​divided into blocks to reduce the memory pressure of ultra-long videos.

[0090] Specifically, the similarity matrix is ​​divided into blocks to obtain the specific representation of multiple sub-blocks, as shown in formula (5).

[0091] (5)

[0092] In formula (5), S is the similarity matrix, where Representing the similarity matrix After being divided according to the block strategy, the first Each sub-matrix block can be independently computed and cached to reduce peak memory usage.

[0093] A6: For each sub-block, determine the optimal path for that sub-block based on the sub-block's structure.

[0094] Specifically, the optimal path for each sub-block is calculated using a bandwidth-constrained dynamic time warping algorithm.

[0095] A7: Connect the optimal paths of all sub-blocks based on the dynamic time warping algorithm to obtain the optimal alignment path.

[0096] Understandably, by calculating the similarity matrix independently in blocks and preserving and propagating the boundary conditions of accumulated costs at block boundaries, the DTW algorithm can continuously backtrack the optimal path of each sub-block to obtain the globally optimal alignment path. On a workstation equipped with a GPU, processing a matching task of 1 hour of video (approximately 90,000 frames) takes only about 3 minutes, meeting the needs of offline analysis.

[0097] S102: Calculate the optical flow field of consecutive frames in the video to be synchronized, and analyze the optical flow field to obtain visual dynamic features.

[0098] The optical flow field contains information about the vehicle's motion.

[0099] Specifically, the improved FlowNet network is used to perform end-to-end optical flow calculations to obtain the optical flow field of consecutive frames in the video to be synchronized, and its specific form is shown in formula (6).

[0100] (6)

[0101] In formula (6), Let be the optical flow field of frame t. For the t-th frame image, For video frame indexing, For optical flow estimation network / operator.

[0102] Optionally, in another embodiment of this application, step S102 involves analyzing the optical flow field to obtain specific implementations of visual dynamic features, including processes B1 to B3.

[0103] B1: Extract global motion intensity, global rotation intensity, pixel-level motion direction, forward / backward turning discrimination, left / right turning discrimination, and motion blur features from the optical flow field.

[0104] The specific manifestation of global motion intensity is shown in formula (7).

[0105] (7)

[0106] In formula (7), For global motion intensity, For video frame indexing, These are pixel coordinates; express Norm; This refers to the image size.

[0107] The specific manifestation of global rotation intensity is shown in formula (8).

[0108] (8)

[0109] In formula (8), Optical flow vectors Components in the horizontal and vertical directions; This represents the partial derivative with respect to the image space coordinates. This represents the global rotation intensity.

[0110] It should be noted that the reason for introducing global rotation intensity is that vehicle steering and body rotation will form observable rotation components on the screen. Directly using global motion intensity is easily interfered with by road texture or vibration, while rotation intensity is more sensitive to steering actions.

[0111] The specific manifestation of the pixel-level motion direction is shown in formula (9).

[0112] (9)

[0113] In formula (9), Pixel-level motion direction (i.e., pixel) (direction angle of motion at the location). It is the arctangent function.

[0114] It should be noted that pixel-level motion directions can be quantized into 8 intervals, and the proportion of each interval can be used to form a direction histogram. , This is an 8-dimensional directional distribution vector. Specifically, for each pixel, the motion direction angle is first calculated based on the horizontal and vertical components of the optical flow, and then mapped to the same angular range (e.g., from -180 degrees to +180 degrees, or from 0 degrees to 360 degrees). This complete angular range is divided into 8 equal segments, each 45 degrees wide. For each pixel, its direction angle is determined to be in which segment, and the count of that segment is incremented by one. Finally, the percentage of each segment is obtained by dividing the count of each segment by the total number of pixels.

[0115] The specific form of the forward or backward discrimination quantity (i.e., the forward and backward turning discrimination quantity) is shown in formula (10).

[0116]

[0117] In formula (10), This is the forward / backward rotation discrimination parameter, where Bottom is the pixel set of the lower half of the image, and N is the number of pixels in that region. This indicates that the lower half of the screen (the road surface) is moving downwards, corresponding to the vehicle's forward movement. The lower half is chosen to avoid the uncertainty of the light flow direction in the sky area above the horizon (e.g., the sky remains stationary or moves slightly while the vehicle is moving forward, but the road surface will inevitably flow downwards).

[0118] The specific manifestation of the left and right turning discrimination quantity is shown in formula (11).

[0119]

[0120] In formula (11), The left and right turn discrimination value (based on the mean of the global horizontal component). This represents the image height, which is the number of pixels in the image along its vertical axis. This refers to the image width, which is the number of pixels in the horizontal direction of the image. This indicates that the scene as a whole is moving to the right, corresponding to the vehicle turning left (the camera tilting to the left). This corresponds to the vehicle turning right. The global mean is used here instead of the left-right difference because vehicle turning primarily causes an overall lateral shift in the image.

[0121] The specific manifestation of motion fuzziness features is shown in formula (12).

[0122] (12)

[0123] In formula (12), For motion blur features, Let be the motion blur estimation function / network, and let output a scalar reflecting the degree of blur in the t-th frame.

[0124] Specifically, a lightweight network is used to estimate the degree of motion blur, which is related to vehicle speed.

[0125] B2: The global motion intensity, global rotation intensity, pixel-level motion direction, forward and backward turning discrimination, left and right turning discrimination, and motion blur features are concatenated to obtain the initial video dynamic features.

[0126] Specifically, the specific manifestation of splicing together global motion intensity, global rotation intensity, pixel-level motion direction, forward and backward turning discrimination, left and right turning discrimination and motion blur features is shown in formula (13).

[0127] (13)

[0128] In formula (13), Represents the first-order difference per frame (e.g.) (), used to reflect the trend of feature changes over time.

[0129] B3: Use the backbone network to extract the dynamic features of the initial video to obtain the visual dynamic features.

[0130] The backbone network includes, but is not limited to, pre-trained ResNet18.

[0131] It should be noted that, in order to extract higher-level semantic features, a pre-trained ResNet18 is used as the backbone network and a custom dynamic analysis head is connected. Its specific form is shown in Equation (14).

[0132] (14)

[0133] In formula (14), For visual backbone network, For dynamic analysis; For the first The 128-dimensional video dynamic embedding vector (i.e. visual dynamic features) corresponding to the frame.

[0134] S103: Extract vehicle dynamic features from the CAN data to be synchronized.

[0135] Among them, vehicle dynamic features are extracted from the CAN data to be synchronized, forming a representation that is comparable to video features.

[0136] Optionally, in another embodiment of this application, the specific implementation of step S103 includes processes C1 to C4.

[0137] C1: Parse the CAN data to be synchronized to obtain key dynamic signals.

[0138] The key dynamic signals include at least vehicle speed, yaw rate, longitudinal acceleration, lateral acceleration, and steering wheel angle. The specific manifestations of the key dynamic signals are shown in Table 1.

[0139] Table 1

[0140]

[0141] C2: Calculate the statistical characteristics of key dynamic signals.

[0142] It is understandable that for the k-th time window, its interval is... ,in, At the center of the window, The configurable window length. The typical value is related to the video frame period and can be taken as follows: (f is the frame rate, for example, approximately 40ms at 25fps). Calculate the statistical characteristics of the signal within this window.

[0143] The statistical characteristics include, but are not limited to, mean, rate of change, and standard deviation.

[0144] Specifically, the specific form of the mean is shown in formula (15).

[0145]

[0146] In formula (15), The mean, For time window indexing, The sampling sequence number within the window; Indicates the first Within the first time window The vehicle speed at each sampling point For the first The number of sampling points within a window.

[0147] Specifically, the specific form of the rate of change is shown in formula (16).

[0148] (16)

[0149] In formula (16), The change rate is denoted as .

[0150] Specifically, the specific form of standard deviation is shown in formula (17).

[0151]

[0152] In formula (17), The standard deviation is denoted as .

[0153] C3: Concatenate the statistical features to obtain the initial vehicle dynamic features.

[0154] Specifically, the specific form of combining statistical features is shown in formula (18).

[0155] (18)

[0156] In formula (18), Yaw rate In the Mean, rate of change, and standard deviation within each window; Longitudinal acceleration Mean, rate of change, and standard deviation within the window; Horizontal acceleration Mean, rate of change, and standard deviation within the window; Steering wheel angle Mean, rate of change, and standard deviation within the window; This represents the statistical characteristics constructed using the same rules for other optional CAN signals.

[0157] C4: Use a convolutional network to extract features from the initial vehicle dynamic features to obtain the vehicle dynamic features.

[0158] Convolutional networks include, but are not limited to, 1D convolutional networks.

[0159] Specifically, the specific manifestation of using convolutional networks to extract features from the initial vehicle dynamic features is shown in formula (19).

[0160] (19)

[0161] In formula (19), This represents a multi-channel signal sequence within a window arranged in chronological order. This is a CAN timing encoding network used to encode the sequence into a vector representation. CAN1DEncoder consists of three 1D convolutional and fully connected layers, outputting a 128-dimensional CAN dynamic embedding vector. (i.e., vehicle dynamic characteristics).

[0162] Optionally, after step S103, to enhance the context modeling capability for long sequences, a lightweight Transformer Encoder can be added before projection to enhance the context of the sequence. Therefore, in another embodiment of this application, a feature projection method is provided, including processes D1 to D2.

[0163] D1: Contextually enhance the visual dynamic features and vehicle dynamic features to obtain enhanced visual dynamic features and enhanced vehicle dynamic features.

[0164] Optionally, to enhance the ability to model the context of long sequences, a lightweight TransformerEncoder can be added before projection to process the sequence. and Context enhancement is performed to obtain and Then projection and similarity calculation are performed; in scenarios without GPUs or with higher real-time requirements, this step can be omitted to reduce computation.

[0165] It should be noted that, for the sake of simplicity, the following text will use the same notation. This represents the feature ultimately used for projection (if Transformer is enabled, then...). Otherwise take (This is the original encoded output).

[0166] D2: Map the enhanced visual dynamic features and enhanced vehicle dynamic features to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized.

[0167] S104: Map visual dynamic features and vehicle dynamic features to the same semantic space to obtain video embedding vector and CAN data embedding vector to be synchronized.

[0168] S105: Calculate the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized.

[0169] Specifically, the cosine similarity between the video embedding vector and the CAN data embedding vector to be synchronized is calculated, and then a similarity matrix is ​​constructed based on the cosine similarity. The specific form of the cosine similarity is shown in formula (20).

[0170] (20)

[0171] In formula (20), Represents the dot product of vectors; Cosine similarity, with values ​​ranging from 1 to 10. The larger the value, the higher the video frame rate. With CAN window The better the match.

[0172] It should be noted that for long videos, a similarity matrix is ​​constructed. , For video frame rate, This represents the number of CAN time windows. Represents the real number field.

[0173] Optionally, the specific implementation process for calculating the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized is as follows: input the video embedding vector and the CAN data embedding vector to be synchronized into the cross-modal matching model to obtain the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized.

[0174] Cross-modal matching models include, but are not limited to, neural network models.

[0175] Optionally, in another embodiment of this application, the specific implementation of training the cross-modal matching model includes processes E1 to E8.

[0176] E1: Acquire sample video and sample CAN data.

[0177] The sample videos and sample CAN data have a corresponding relationship.

[0178] It is important to note that, to ensure the model learns the true physical correspondences, training data should utilize high-precision synchronous data sources. Specifically, priority should be given to video-CAN paired data (i.e., sample video and sample CAN data) collected by professional data loggers with hardware-level synchronization accuracy (such as PTP or GPS timing), or datasets that have undergone meticulous manual calibration. Avoid directly using ordinary domain controller-collected data with random latency as the training set, as this may lead to incorrect model fitting of synchronization noise.

[0179] Specifically, each video frame Its positive sample is the actual corresponding CAN window index. Negative samples are CAN window indices from other times. .

[0180] E2: Input the sample video and sample CAN data into the cross-modal matching model to obtain the sample similarity matrix.

[0181] E3: Calculate the information noise comparison estimation loss function between the sample similarity matrix and the actual similarity matrix corresponding to the sample video and sample CAN data.

[0182] The specific form of the information noise contrast estimation loss function is shown in formula (21).

[0183] (twenty one)

[0184] In formula (21), The loss function is used for information-noise contrast estimation. To match video frames The actual corresponding positive sample window index, For the first A negative sample window index, Number the negative samples; It is an exponential function. It is the natural logarithm; This is a temperature parameter, with a typical value of 0.07.

[0185] E4: Calculate the temporal consistency loss function between the sample similarity matrix and the actual similarity matrix.

[0186] The specific form of the temporal consistency loss function is shown in formula (22).

[0187]

[0188] In formula (22), Let be the time-series consistency loss function. For the first segment , No. Video frame index, Its corresponding CAN window index, This indicates that the ordered frame pairs within the segment are being traversed. This indicates taking the non-negative part; This is the boundary value, typically 0.2. This represents the case where the loss penalty is applied in reverse order.

[0189] E5: Calculate the bidirectional consistency loss function between the sample similarity matrix and the actual similarity matrix.

[0190] The specific form of the bidirectional consistency loss function is shown in formula (23).

[0191]

[0192] In formula (23), This is a soft nearest neighbor matching. To map from CAN space back to video space, This is the bidirectional consistency loss function.

[0193] E6: Determine the total loss function based on the information noise contrast estimation loss function, the temporal consistency loss function, and the bidirectional consistency loss function.

[0194] Specifically, the total loss function is determined based on the information noise comparison estimation loss function, the temporal consistency loss function, and the bidirectional consistency loss function, as shown in formula (24).

[0195] (twenty four)

[0196] In formula (24), For the total loss function, This is the weight for time-series loss, with a typical value of 0.5; This is the cycle consistency weight, typically 0.3.

[0197] It should be noted that the training configuration uses the following settings: the optimizer is AdamW, the learning rate is 10⁻⁴, the batch size is 32 video segments, the number of training epochs is 100, and data augmentation includes time jitter, brightness variation, and noise injection. When the total loss function converges, the cross-modal matching model training is considered complete.

[0198] Furthermore, to adapt to different vehicle models and driving scenarios, an incremental learning mechanism was designed. First, an initial model was pre-trained on a general dataset containing various vehicle models and driving scenarios. When the model is deployed to a new environment, it is rapidly fine-tuned using only a small amount of labeled data with approximately 100 paired samples, with the update rule being... ,in The parameter vector of the pre-trained parameters. This is the fine-tuned model parameter vector. For learning rate, Indicates the parameter Find the gradient. Let be the target loss function for the fine-tuning phase. To reduce the risk of overfitting, only the projection head parameters are updated during fine-tuning, while the backbone network remains fixed. Simultaneously, to prevent catastrophic forgetting, an elastic weight consolidation (EWC) mechanism is introduced, with the total loss function being: ,in Regular intensity coefficient For parameter component index, and The current parameters and the pre-trained parameters are respectively at the th... The values ​​that can be taken on each component; As a parameter importance weight, by imposing penalties on the updates of important parameters, it effectively balances the adaptation to new tasks and the retention of old knowledge.

[0199] E8: If the total loss function does not converge, return to the execution process E2.

[0200] S106: Determine the optimal alignment path between the video to be synchronized and the CAN data to be synchronized based on the similarity matrix.

[0201] The optimal alignment path refers to the matching relationship between frames (or between frames and windows) that minimizes the cumulative cost, while satisfying all constraints (monotonicity, continuity, bandwidth limitations).

[0202] Optionally, in another embodiment of this application, the specific implementation of step S106 includes processes F1 to F4.

[0203] F1: The positional prior reward is superimposed on the similarity matrix to obtain the final similarity matrix used for alignment.

[0204] Understandably, in order to impose temporal order constraints in sequence alignment and encourage paths to be closer to the main diagonal, we superimpose a positional prior reward term onto the original similarity matrix to obtain the modified similarity matrix. .in The location reward function is typically designed to vary with the index difference. Increase and decrease, thereby suppressing matching that deviates from the diagonal; This is a weighting coefficient, typically set to 0.1, used to adjust the strength of the prior. It is used in subsequent DTW alignment calculations. Replace the original As a similarity input, the location prior effectively guides the selection of the optimal path during the dynamic programming path search process.

[0205] F2: Based on the final similarity matrix and bandwidth constraints, the dynamic time warping algorithm is improved to obtain the improved dynamic time warping algorithm.

[0206] To obtain a robust optimal alignment path in noisy environments, a bandwidth-constrained dynamic time warping algorithm is employed. While basic DTW guarantees the monotonicity of sequence matching, it is susceptible to noise interference, leading to path jitter and unreasonable jumps. Therefore, a bandwidth constraint is introduced to confine the alignment path to a band-shaped region near the main diagonal, thereby suppressing cross-segment matching. In offline alignment scenarios, hard DTW is used by default; if an end-to-end differentiable alignment layer is required, the recursive formula can be modified accordingly. Replace the operation with softmin to obtain a smooth softDTW version.

[0207] F3: Calculates the cumulative cost between the video to be synchronized and the CAN data to be synchronized using an improved dynamic time warping algorithm.

[0208] Specifically, the cumulative cost between the video to be synchronized and the CAN data to be synchronized is calculated using the improved dynamic time warping algorithm, as shown in formula (25).

[0209] (25)

[0210] In formula (25), To make the video frame sequence before Step and CAN window sequence before The cumulative cost of step alignment (the smaller the value, the better the path). This indicates selecting the path with the lowest cumulative cost among the three transfer methods. Let the allowed offset bandwidth be... For any like This sets the cost of the match to unreachable, thereby reducing unreasonable cross-segment matching. The maximum allowed index offset threshold can be calculated from the maximum allowed time drift (e.g., converted to index difference using frame rate and window step size).

[0211] F4: Determine the path with the minimum cumulative cost as the optimal alignment path.

[0212] Specifically, the optimal matching path is obtained through backtracking. ,in Represented as the first Frame and the The correspondence between the CAN windows, For the optimal alignment path, the window center can be determined by... Found.

[0213] S107: Generate a synchronization mapping table based on the optimal alignment path, and align the video to be synchronized and the CAN data to be synchronized according to the synchronization mapping table.

[0214] For a better explanation of the above, see [link to relevant documentation]. Figure 2 This application provides a synchronization system comprising five main modules: a video feature extraction module, a CAN feature extraction module, a cross-modal matching module, a synchronization mapping module, and a model training module. The video feature extraction module uses a convolutional neural network to process video frames and calculates optical flow field and motion features to extract frame-level visual dynamic representation vectors. The CAN feature extraction module parses CAN messages, extracts key signals and their rate of change and trend features, and generates time-window-level vehicle dynamic representation vectors. The cross-modal matching module learns the association between video and CAN data based on a dual-tower coding structure and can introduce a lightweight Transformer for sequence context enhancement, thereby calculating a similarity matrix and applying a temporal alignment algorithm to find the optimal matching path. The synchronization mapping module constructs a frame-level correspondence table based on the matching results, calculates the time offset of each segment, and finally outputs the calibrated synchronization mapping. The model training module manages the training dataset, performs model training and validation, and supports incremental learning and transfer learning to continuously improve the system's adaptability to different vehicle models and scenarios.

[0215] To better explain the above, a specific application scenario is provided below. The input includes 25fps forward-looking video at a resolution of 1920×1080, and CAN message logs collected simultaneously, containing key signals such as vehicle speed, yaw rate, longitudinal acceleration, lateral acceleration, and steering wheel angle. Each message includes a timestamp for subsequent window aggregation. During the training phase, data from hardware-level synchronization or manual fine-calibration is used as supervision. For the video side, video frame pairs are first used as input, and FlowNet is used to estimate the optical flow field. and calculate Dynamic features were then used; subsequently, a 128-dimensional video embedding was generated using ResNet18 and a dynamic analysis head. The CAN side uses the center time of the k-th window. Anchor point, window length Take as video frame period Within the window, calculate and concatenate the statistical measures such as the mean, rate of change, and standard deviation of each signal. Then, a 1D convolutional encoder is used to obtain a 128-dimensional CAN embedding. The two sides are embedded and mapped to a 64-dimensional vector by the projection head. Finally, cosine similarity is used. As a match score.

[0216] The training objective uses InfoNCE loss, combined with temporal consistency loss and cyclic consistency loss, where the temperature parameter... Boundary values Set the loss weight to 0.2. Take 0.5, The value is set to 0.3. The optimizer chosen is AdamW, with a learning rate of 0.3. The batch size was 32 video segments, and the training ran for 100 rounds. During the online matching phase, a similarity matrix S was calculated for the data to be synchronized, and the bandwidth-constrained DTW algorithm was used to solve for the optimal alignment path. The bandwidth B is set according to the maximum allowable relative drift, for example, at a 5-second error tolerance and 25fps. The final output is a frame-level synchronization mapping table, which is used to match the corresponding CAN window or message set for each video frame, supporting subsequent applications such as re-feedback.

[0217] It should be noted that, based on the processes shown in S101-S107 above, this embodiment can achieve the following beneficial effects:

[0218] 1. By extracting vehicle dynamic features such as optical flow field, rotation intensity, motion blur, and scene displacement from video frames, and establishing cross-modal semantic associations with CAN signal features, content-based intelligent synchronization matching is achieved, enabling accurate alignment without relying on timestamps.

[0219] 2. A dedicated cross-modal matching network is designed, employing a Siamese structure to encode video and CAN features separately, and mapping them to a unified semantic space using a projection head to calculate similarity. This design enables data from different modalities to be mapped to the same space for measurement, effectively solving the alignment problem of heterogeneous data.

[0220] 3. A contrastive learning framework is used to train the model, jointly optimizing the objective function composed of InfoNCE loss, temporal consistency loss, and cyclic consistency loss. This strategy helps learn the correct alignment structure, ensuring that the matching results remain consistent in temporal order and bidirectional mapping.

[0221] 4. A bandwidth-constrained dynamic time warping algorithm is used for temporal alignment, restricting the alignment path to a band-shaped region near the main diagonal. Simultaneously, a positional prior reward (positional bias) is superimposed on the similarity matrix to strengthen the temporal order constraint. This method effectively reduces unreasonable large-scale jump matches and improves the smoothness and accuracy of the alignment path.

[0222] 5. An incremental learning mechanism is designed to support model transfer, and an elastic weight consolidation method is introduced to prevent catastrophic forgetting. This mechanism allows the model to adapt to new vehicle models or new scenarios with only a small amount of labeled data, significantly reducing deployment and maintenance costs.

[0223] As described Figure 3 The diagram shown is an architectural schematic of a content matching synchronization device provided in an embodiment of this application. The synchronization device includes: an acquisition unit 100, an analysis unit 200, an extraction unit 300, a mapping unit 400, a calculation unit 500, a determination unit 600, and an alignment unit 700.

[0224] The acquisition unit is used to acquire the vehicle's video and CAN data to be synchronized.

[0225] The analysis unit is used to calculate the optical flow field of consecutive frames in the video to be synchronized, and to analyze the optical flow field to obtain visual dynamic features; the optical flow field contains the motion information of the vehicle.

[0226] Analysis unit, including:

[0227] The extraction sub-unit is used to extract global motion intensity, global rotation intensity, pixel-level motion direction, forward and backward turning discrimination, left and right turning discrimination, and motion blur features from the optical flow field.

[0228] The stitching subunit is used to stitch together global motion intensity, global rotation intensity, pixel-level motion direction, forward and backward turning discrimination, left and right turning discrimination, and motion blur features to obtain the initial video dynamic features.

[0229] The feature extraction subunit is used to extract visual dynamic features from the initial video dynamic features using the backbone network.

[0230] The extraction unit is used to extract vehicle dynamic features from the CAN data to be synchronized.

[0231] The extraction unit is specifically used for: parsing the CAN data to be synchronized to obtain key dynamic signals; calculating the statistical features of the key dynamic signals; concatenating the statistical features to obtain initial vehicle dynamic features; and using a convolutional network to extract features from the initial vehicle dynamic features to obtain the vehicle dynamic features.

[0232] The mapping unit is used to map visual dynamic features and vehicle dynamic features to the same semantic space to obtain video embedding vectors and CAN data embedding vectors to be synchronized.

[0233] The calculation unit is used to calculate the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized.

[0234] The computational unit is specifically used to: input the video embedding vector and the CAN data embedding vector to be synchronized into the cross-modal matching model to obtain the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized.

[0235] The determination unit is used to determine the optimal alignment path between the video to be synchronized and the CAN data to be synchronized based on the similarity matrix.

[0236] The alignment unit is used to generate a synchronization mapping table based on the optimal alignment path, and to align the video to be synchronized and the CAN data to be synchronized according to the synchronization mapping table.

[0237] In summary, by extracting vehicle dynamic features such as optical flow field, rotation intensity, motion blur, and scene displacement from video frames and establishing cross-modal semantic associations with CAN signal features, content-based intelligent synchronization matching is achieved, enabling accurate alignment without relying on timestamps.

[0238] Combination Figure 3 The synchronization device, as shown, also includes:

[0239] The enhancement unit is used to contextually enhance the visual dynamic features and vehicle dynamic features to obtain enhanced visual dynamic features and enhanced vehicle dynamic features.

[0240] The feature mapping unit is used to map the enhanced visual dynamic features and the enhanced vehicle dynamic features to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized.

[0241] Combination Figure 3 The synchronization device, as shown, also includes:

[0242] The quantization unit is used to quantize the cross-modal matching model to obtain the quantized cross-modal matching model.

[0243] The batch feature extraction unit is used to extract visual dynamic features from long videos.

[0244] The target mapping unit is used to map visual dynamic features and vehicle dynamic features to the same semantic space to obtain video embedding vectors and CAN data embedding vectors to be synchronized.

[0245] The input unit is used to input the video embedding vector and the CAN data to be synchronized into the quantized cross-modal matching model to obtain the similarity matrix.

[0246] The block unit is used to divide the similarity matrix into blocks, resulting in multiple sub-blocks.

[0247] The path determination unit is used to determine the optimal path for each sub-block based on the sub-block.

[0248] The connection unit is used to connect the optimal paths of all sub-blocks based on the dynamic time warping algorithm to obtain the optimal alignment path.

[0249] Combination Figure 3 The synchronization device, as shown, also includes:

[0250] The data acquisition unit is used to acquire sample video and sample CAN data; the sample video and sample CAN data have a corresponding relationship.

[0251] The data input unit is used to input sample videos and sample CAN data into the cross-modal matching model to obtain the sample similarity matrix.

[0252] The first loss function calculation unit is used to calculate the information noise comparison estimation loss function between the sample similarity matrix and the actual similarity matrix corresponding to the sample video and sample CAN data.

[0253] The second loss function calculation unit is used to calculate the temporal consistency loss function between the sample similarity matrix and the actual similarity matrix.

[0254] The third loss function calculation unit is used to calculate the bidirectional consistency loss function between the sample similarity matrix and the actual similarity matrix.

[0255] The loss function determination unit is used to determine the total loss function based on the information noise contrast estimation loss function, the temporal consistency loss function, and the bidirectional consistency loss function.

[0256] The model determination unit is used to determine that the cross-modal matching model training is complete when the total loss function converges.

[0257] The execution unit is used to return to the step of inputting the sample video and sample CAN data into the cross-modal matching model to obtain the sample similarity matrix when the total loss function has not converged.

[0258] Another embodiment of this application provides an electronic device, such as... Figure 4 As shown, it includes: processor 401, memory 402 and bus 403.

[0259] The memory 402 is used to store the program.

[0260] The processor 401 is used to execute a program, which, when executed, is specifically used to implement a content matching and synchronization method as provided in any of the above embodiments.

[0261] The electronic devices mentioned in this article can be servers, PCs, tablets, mobile phones, ECUs (Electronic Control Units), VCUs (Vehicle Control Units), MCUs (Micro Controller Units), HCUs (Hybrid Control Units), etc.

[0262] Another embodiment of this application provides a computer storage medium for storing a computer program, which, when executed, implements a content matching and synchronization method as provided in any of the above embodiments.

[0263] Computer storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0264] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. In particular, for system or system embodiments, since they are fundamentally similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. 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. Those skilled in the art can understand and implement this without creative effort.

[0265] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0266] The above description of the disclosed embodiments enables those skilled in the art to make or use 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 disclosed herein.

Claims

1. A content matching and synchronization method, characterized in that, include: Acquire the vehicle's video and CAN data to be synchronized; Calculate the optical flow field of consecutive frames in the video to be synchronized, and analyze the optical flow field to obtain visual dynamic features; The optical flow field contains vehicle motion information; Vehicle dynamic features are extracted from the CAN data to be synchronized. The visual dynamic features and the vehicle dynamic features are mapped to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized. Calculate the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized; The optimal alignment path between the video to be synchronized and the CAN data to be synchronized is determined based on the similarity matrix. A synchronization mapping table is generated based on the optimal alignment path, and the video to be synchronized and the CAN data to be synchronized are aligned according to the synchronization mapping table.

2. The method according to claim 1, characterized in that, The analysis of the optical flow field to obtain visual dynamic features includes: Global motion intensity, global rotation intensity, pixel-level motion direction, forward and backward turning discrimination, left and right turning discrimination, and motion blur features are extracted from the optical flow field. The global motion intensity, the global rotation intensity, the pixel-level motion direction, the forward and backward turning discrimination value, the left and right turning discrimination value, and the motion blur feature are concatenated to obtain the initial video dynamic features; The initial video dynamic features are extracted using a backbone network to obtain visual dynamic features.

3. The method according to claim 1, characterized in that, The extraction of vehicle dynamic features from the CAN data to be synchronized includes: The CAN data to be synchronized is parsed to obtain key dynamic signals; Calculate the statistical characteristics of the key dynamic signal; The statistical features are concatenated to obtain the initial vehicle dynamic features; The initial vehicle dynamic features are extracted using a convolutional network to obtain the vehicle dynamic features.

4. The method according to claim 1, characterized in that, After extracting the vehicle dynamic features from the CAN data to be synchronized, the process also includes: The visual dynamic features and the vehicle dynamic features are then enhanced with context to obtain enhanced visual dynamic features and enhanced vehicle dynamic features. The enhanced visual dynamic features and the enhanced vehicle dynamic features are mapped to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized.

5. The method according to claim 1, characterized in that, The calculation of the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized includes: The video embedding vector and the CAN data embedding vector to be synchronized are input into the cross-modal matching model to obtain the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized.

6. The method according to claim 5, characterized in that, Also includes: The cross-modal matching model is quantized to obtain the quantized cross-modal matching model; When the video to be synchronized is a long video, batch feature extraction is performed on the video to be synchronized to obtain the visual dynamic features; The visual dynamic features and the vehicle dynamic features are mapped to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized. The video embedding vector and the CAN data to be synchronized are input into the quantized cross-modal matching model to obtain a similarity matrix; The similarity matrix is ​​divided into blocks to obtain multiple sub-blocks; For each sub-block, the optimal path for the sub-block is determined based on the sub-block; The optimal alignment path is obtained by connecting the optimal paths of all sub-blocks using the dynamic time warping algorithm.

7. The method according to claim 5 or 6, characterized in that, The training process of the cross-modal matching model includes: Acquire sample videos and sample CAN data; the sample videos and sample CAN data have a corresponding relationship; The sample video and the sample CAN data are input into the cross-modal matching model to obtain the sample similarity matrix; Calculate the information noise comparison estimation loss function between the sample similarity matrix and the actual similarity matrices corresponding to the sample video and the sample CAN data; Calculate the temporal consistency loss function between the sample similarity matrix and the actual similarity matrix; Calculate the bidirectional consistency loss function between the sample similarity matrix and the actual similarity matrix; The total loss function is determined based on the information noise contrast estimation loss function, the temporal consistency loss function, and the bidirectional consistency loss function; When the total loss function converges, the cross-modal matching model training is considered complete. If the total loss function fails to converge, return to the step of inputting the sample video and the sample CAN data into the cross-modal matching model to obtain the sample similarity matrix.

8. The method according to claim 1, characterized in that, Determining the optimal alignment path between the video to be synchronized and the CAN data to be synchronized based on the similarity matrix includes: The positional prior reward is superimposed on the similarity matrix to obtain the final similarity matrix used for alignment; Based on the final similarity matrix and bandwidth constraints, the dynamic time warping algorithm is improved to obtain the improved dynamic time warping algorithm. The cumulative cost between the video to be synchronized and the CAN data to be synchronized is calculated using the improved dynamic time warping algorithm. The path with the minimum cumulative cost is determined as the optimal alignment path.

9. A content matching and synchronization device, characterized in that, include: The acquisition unit is used to acquire the vehicle's video and CAN data to be synchronized. The analysis unit is used to calculate the optical flow field of consecutive frames in the video to be synchronized, and to analyze the optical flow field to obtain visual dynamic features; The optical flow field contains vehicle motion information; Extraction unit, used to extract vehicle dynamic features from the CAN data to be synchronized; The mapping unit is used to map the visual dynamic features and the vehicle dynamic features to the same semantic space to obtain the video embedding vector and the CAN data embedding vector to be synchronized. The calculation unit is used to calculate the similarity matrix between the video embedding vector and the CAN data embedding vector to be synchronized; The determining unit is used to determine the optimal alignment path between the video to be synchronized and the CAN data to be synchronized based on the similarity matrix; An alignment unit is used to generate a synchronization mapping table based on the optimal alignment path, and to align the video to be synchronized and the CAN data to be synchronized according to the synchronization mapping table.

10. A computer device, characterized in that, include: A processor and a memory are connected via a bus; wherein the processor is used to call and execute a program stored in the memory; The memory is used to store a program for implementing the content matching and synchronization method as described in any one of claims 1-8.

11. A storage medium, characterized in that, The storage medium stores computer-executable instructions for performing the content matching and synchronization method as described in any one of claims 1-8.