Multi-camera wireless wifi frame alignment and synchronization method and device

By using four timestamp detection and crystal oscillator drift fitting, combined with time jump correction and TSF consistency verification, the problem of discontinuous timestamps in multi-camera video synchronization is solved, achieving precise alignment of multi-camera video frames and intra-frame times, and improving the stability and reliability of data processing.

CN123123515APending Publication Date: 2026-11-17HANGZHOU EMBODIED TRAINING GROUND ROBOT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611429452.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In a WiFi wireless network environment, existing technologies struggle to stably correct the client clock during multi-camera video synchronization, resulting in discontinuous timestamps on video frames and failing to effectively account for differences in image row exposure time, thus affecting the data processing quality of multi-view video analysis and 3D reconstruction.

Method used

By employing four-timestamp detection, minimum latency screening, outlier removal, and crystal oscillator drift fitting, combined with time jump correction, clock frequency feedforward compensation, and WiFi beacon frame TSF consistency verification, a unified wireless timing network for multiple cameras is established, generating a unified timeline for clients and performing video frame and intra-frame time alignment.

Benefits of technology

It improves the accuracy of multi-camera video frame and intra-frame time alignment, ensures the continuity, stability and robustness of the client timeline, and enhances the reliability of multi-view data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123515A_ABST
    Figure CN123123515A_ABST
Patent Text Reader

Abstract

The application discloses a multi-camera wireless WIFI frame alignment and synchronization method and device, which comprises the following steps: step one, establishing a multi-camera wireless unified time service network, determining a unified time reference, and sending a UDP package; step two, in-group minimum delay screening; step three, inter-group outlier sample elimination and clock drift fitting, determining a current time correction amount and a crystal oscillator drift rate; step four, time jump correction and clock frequency feedforward compensation; step five, consistency checking of a WIFI beacon frame TSF time and a client clock synchronization parameter; step six, determining an exposure midpoint moment of video frame exposure time information of each camera and mapping to a client unified time axis; and step seven, calculating a video frame time offset parameter and performing row-by-row time compensation on a rolling shutter exposure time. The application improves the multi-camera wireless time service stability and the video frame level synchronization precision through frame alignment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video frame alignment technology, and in particular to a method and apparatus for aligning and synchronizing wireless Wi-Fi frames from multiple cameras. Background Technology

[0002] With the increasing application of multi-camera collaborative acquisition in scenarios such as multi-view video analysis, motion capture, and 3D reconstruction, the consistency of video frame time between different cameras has become a crucial factor affecting the quality of subsequent data processing. Existing multi-camera synchronization methods typically rely on network time synchronization results to directly adjust the client clock, or determine the time deviation between the client and server based on single or limited network time interactions. However, in a WiFi wireless network environment, data packet transmission is easily affected by factors such as network congestion, queuing, and transmission latency fluctuations, resulting in significant differences in the round-trip latency corresponding to different probe data packets. This leads to unstable time deviations obtained based on ordinary time probe results. Furthermore, the local clocks of different cameras may experience crystal oscillator drift, causing the client clock, which has already been synchronized, to develop time deviations again as the running time increases.

[0003] Existing clock correction methods, which directly adjust the clock of the recording camera, can easily cause discontinuities in timestamps between consecutive video frames or even time rollback, making it difficult to guarantee the stability of the temporal relationship between consecutive video frames. Relying solely on a single network time probe channel for synchronization also lacks an independent time reference for consistency verification in the event of network congestion or abnormal probe results. Furthermore, existing multi-camera synchronization typically focuses on alignment at the system clock level, without further considering the differences in actual exposure times of video frames and the variations in exposure times for different image lines in a rolling shutter. This means that even when the system clock is synchronized, frame-level time discrepancies may still exist between the corresponding image content from different cameras.

[0004] Therefore, how to provide a method and apparatus for aligning and synchronizing multiple camera wireless Wi-Fi frames is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a method and apparatus for aligning and synchronizing multi-camera wireless Wi-Fi frames. This invention improves wireless timing accuracy through four-timestamp detection, minimum delay screening, outlier removal, and crystal oscillator drift fitting; it maintains continuous and stable client timeline by combining time jump correction, clock frequency feedforward compensation, and Wi-Fi beacon frame TSF consistency verification; and it improves the time alignment accuracy of multi-camera video frames and intra-frame time alignment through exposure midpoint mapping and rolling shutter line-by-line compensation.

[0006] A multi-camera wireless Wi-Fi frame alignment and synchronization method according to an embodiment of the present invention includes the following steps: Step 1: Establish a unified wireless time synchronization network for multiple cameras, determine a unified time reference, send multiple wireless time probe data packets, and generate multiple sets of four-timestamp probe data; Step 2: Perform minimum delay filtering within the group on the multiple sets of four-timestamp detection data to generate a time deviation sample sequence; Step 3: Perform outlier removal and clock drift fitting on the time deviation sample sequence, and jointly determine the current time correction amount and crystal oscillator drift rate to obtain the client clock synchronization parameters; Step 4: Determine the current synchronization stage of the time synchronization client based on the client clock synchronization parameters, perform time jump correction and clock frequency feedforward compensation respectively, and generate the client synchronization timeline; Step 5: Based on the client synchronization timeline, obtain the TSF time of the WiFi beacon frame periodically broadcast by the time synchronization server, and perform consistency verification with the client clock synchronization parameters to generate a unified client timeline; Step 6: Determine the midpoint of the exposure time of the video frames captured by each camera, and map it to the unified timeline on the client to generate a synchronized timestamp sequence of video frames for each camera; Step 7: Based on the video frame synchronization timestamp sequence, calculate the video frame line time offset parameter, perform line-by-line time compensation on the rolling shutter exposure time, and generate a multi-camera frame-level time state sequence.

[0007] Optionally, step one specifically includes: Set the WiFi hotspot device as the time synchronization server and multiple cameras as time synchronization clients; Each time synchronization client connects to the time synchronization server via a WiFi local area network and uses the time synchronization server's clock as a unified relative time reference. Each time synchronization client sends multiple wireless time probe data packets to the time synchronization server in groups according to a preset probe cycle, and records the client's sending time, the server's receiving time, the server's response time, and the client's receiving time, generating multiple sets of four-timestamp probe data.

[0008] Optionally, step two specifically involves: Based on the multiple sets of four-timestamped detection data, the client sends the request at time T1, the server receives the request at time T2, the server responds at time T3, and the client receives the response at time T4, corresponding to each wireless time detection data packet. Calculate the total interaction time between the client and the time synchronization server and the server processing time, and obtain the round-trip delay corresponding to each wireless time probe data packet by subtracting the two. Calculate the original time deviation corresponding to each wireless time probe data packet based on the time difference relationship between the four timestamps; For each wireless time probe group, the round-trip time delays of multiple wireless time probe data packets within the group are compared. The wireless time probe data packet with the smallest round-trip time delay is determined as the target probe data packet, and its corresponding original time deviation is retained. Obtain the client's local time corresponding to each target detection data packet, establish a correlation between the client's local time and the original time deviation, and arrange them according to the detection time sequence of each wireless time detection group to generate a time deviation sample sequence.

[0009] Optionally, step three specifically includes: Outlier detection is performed on each time deviation sample. The outlier sample with the largest deviation is removed according to the degree of abnormality of the original time deviation. Alternatively, the time deviation samples are initially fitted and the residuals corresponding to each sample are calculated. Samples with residuals exceeding the preset residual threshold are identified as outliers and removed to obtain the set of retained time deviation samples. Using the client's local time corresponding to each sample in the retained time deviation sample set as the independent variable and the corresponding original time deviation as the dependent variable, linear regression is performed using the least squares method to obtain the time deviation change function. Obtain the local time of the current time synchronization client, and input the time deviation change function to calculate the current time deviation of the current time synchronization client relative to the unified relative time reference of the time synchronization server; The current time deviation is determined as the current time correction amount; Extract the slope of the time deviation change function, characterize the rate of change of the time deviation between the timing client clock and the timing server clock over time based on the slope, and determine the client crystal oscillator drift rate. The current time correction amount is correlated with the client crystal oscillator drift rate to generate client clock synchronization parameters.

[0010] Optionally, step four specifically involves: Determine whether the time synchronization client is in the pre-recording synchronization stage or the formal recording synchronization stage based on its video recording status. When in the pre-recording synchronization stage, compare the absolute value of the current time correction with the preset synchronization range; When the current time correction exceeds the preset synchronization range, the time jump correction is performed on the current clock of the time synchronization client according to the current time correction, and the corrected current time correction is re-acquired until the current time correction enters the preset synchronization range, thus completing the time alignment before recording. Once the formal recording synchronization phase begins, stop using time jumps to modify the current clock, and determine the direction of clock accumulation rate adjustment based on the direction of the current time correction amount. Increase the cumulative clock increment per unit time when the time synchronization client clock is lagging behind, and decrease the cumulative clock increment per unit time when the time synchronization client clock is ahead. The inherent speed variation trend of the client clock relative to the time service clock is determined based on the client crystal oscillator drift rate, and a clock frequency feedforward compensation amount in the opposite direction is set and superimposed on the clock cumulative rate adjustment process corresponding to the current time correction amount. Based on the timing client clock after feedback adjustment and feedforward compensation, an incremental synchronization time value is continuously generated, forming a continuous and monotonic client synchronization time axis.

[0011] Optionally, step five specifically includes: Based on the client-side timeline synchronization, the time synchronization client continuously listens to the WiFi beacon frames periodically broadcast by the time synchronization server; Extract the TSF time value carried in each WiFi beacon frame and record the corresponding local reception time of the client. Establish a correspondence between the two and generate TSF time observation samples. Arrange multiple consecutive TSF time observation samples in chronological order of reception time, and calculate the time difference between the TSF time value and the client's local reception time; The auxiliary time deviation and auxiliary drift rate of the client's local time relative to the time synchronization server's TSF time are determined based on the time difference and its change over time. The current time correction and client crystal oscillator drift rate obtained from the four timestamp detection are compared with the auxiliary time deviation and auxiliary drift rate, respectively, to determine the time estimation difference between the four timestamp detection channel and the TSF time observation channel; When the time estimation difference does not exceed the preset consistency threshold, the fusion weight is determined based on the variance of the time estimation results of the two channels. The current time correction amount and the auxiliary time deviation, as well as the client crystal oscillator drift rate and the auxiliary drift rate are weighted and fused respectively to obtain the fused time correction amount and the fused drift rate. When the time estimation difference exceeds the preset consistency threshold, discard the current four-timestamp detection results and re-collect the four-timestamp detection data; When the four-timestamp probe channel is unavailable due to network congestion, the time synchronization relationship is maintained based on the auxiliary time deviation and auxiliary drift rate. The client synchronization timeline is updated based on the fusion time correction and fusion drift rate or TSF time observation results to generate a unified client timeline.

[0012] Optionally, step six specifically includes: During the video capture process of each camera, the exposure start time and exposure duration of each video frame are obtained according to the order of video frame capture. For each video frame, add half of the exposure duration to the exposure start time to determine the exposure midpoint of the current video frame; Based on the time correspondence between the client's local time and the client's unified timeline corresponding to the current camera, the exposure midpoint time is mapped to the client's unified timeline to obtain the exposure midpoint synchronization time corresponding to the current video frame under a unified relative time reference. The exposure midpoint synchronization time is determined as the video frame synchronization timestamp of the current video frame; According to the order of acquisition time of each video frame, the synchronization timestamps of the video frames corresponding to the consecutive video frames acquired by the same camera are arranged, and the exposure midpoint determination and unified time axis mapping processes are performed on each camera participating in the synchronization to generate a video frame synchronization timestamp sequence for each camera.

[0013] Optionally, step seven specifically includes: Identify the target camera using a rolling shutter and obtain the progressive scan order and line readout timing corresponding to each video frame of the target camera; For each video frame, the image rows are arranged in a line-by-line scanning order. Based on the row number of each image row, the time interval between adjacent image rows, and the exposure midpoint of the current video frame, the actual exposure time of each image row is determined. Calculate the time difference between the actual exposure time of each image row and the exposure midpoint time of the current video frame, and determine the time difference as the row time offset of the corresponding image row; The time offsets of each row are combined according to the order of the image rows to generate the video frame row time offset parameters for the current video frame; The video frame line time offset parameter is indexed and associated with the video frame synchronization timestamp corresponding to the current video frame, which is used to characterize the temporal position relationship of each image line within the current video frame relative to the exposure midpoint synchronization time. Based on the chronological order of video frame acquisition, the video frame synchronization timestamps and video frame line time offset parameters corresponding to consecutive video frames from the same camera are arranged to generate a multi-camera frame-level time state sequence.

[0014] A multi-camera wireless Wi-Fi frame alignment and synchronization device according to an embodiment of the present invention includes the following modules: The wireless time synchronization module is used to establish a unified wireless time synchronization network for multiple cameras, determine a unified time reference, send multiple wireless time probe data packets, and generate multiple sets of four-timestamp probe data. The deviation filtering module is used to perform minimum time delay filtering within the group on the multiple sets of four-timestamp detection data to generate a time deviation sample sequence. The drift fitting module is used to perform outlier removal between groups and clock drift fitting on the time deviation sample sequence, jointly determine the current time correction amount and crystal oscillator drift rate, and obtain the client clock synchronization parameters. Clock correction module: Determines the current synchronization stage of the time synchronization client based on the client's clock synchronization parameters, performs time jump correction and clock frequency feedforward compensation respectively, and generates the client synchronization timeline; The TSF verification module is used to obtain the TSF time of the WiFi beacon frame periodically broadcast by the time synchronization server based on the client synchronization time axis, and perform consistency verification with the client clock synchronization parameters to generate a unified client time axis. The frame time calibration module is used to determine the exposure midpoint time of the video frame exposure time information acquired by each camera, and map it to the unified timeline on the client to generate a video frame synchronization timestamp sequence for each camera. The line-by-line compensation module is used to calculate the video frame line time offset parameter based on the video frame synchronization timestamp sequence, perform line-by-line time compensation on the rolling shutter exposure time, and generate a multi-camera frame-level time state sequence.

[0015] The beneficial effects of this invention are: This invention establishes a unified wireless timing network with WiFi hotspot devices as timing servers and multiple cameras as timing clients, enabling each camera to synchronize its time under a unified relative time reference. By performing minimum latency filtering within multiple sets of four-timestamp detection data, target detection data packets less affected by wireless transmission queuing and latency fluctuations are prioritized, thereby improving the effectiveness and stability of time deviation samples. Furthermore, outlier sample removal and clock drift fitting are performed on the time deviation sample sequence between groups, while obtaining the current time correction amount and the client crystal oscillator drift rate. This ensures that the synchronization process can not only correct the existing time deviation but also reflect the continuous drift trend of the client clock over time.

[0016] Time jump correction and clock frequency feedforward compensation are employed at different video recording stages to quickly complete time alignment before recording. During the actual recording process, synchronization is maintained by continuously adjusting the clock accumulation rate, which avoids video frame timestamp rollback caused by direct jumps and ensures continuous monotonicity of the client's synchronization timeline. By introducing WiFi beacon frame TSF time observation results and performing consistency verification and fusion with the client clock synchronization parameters obtained from four timestamp detections, anomalies can be identified in a timely manner when the four timestamp detection results are affected by network congestion. When the detection channel is temporarily unavailable, the TSF time observation results are used to maintain the time synchronization relationship, improving the continuity and robustness of the synchronization process in the wireless environment.

[0017] The exposure midpoint of each video frame is mapped to a unified timeline on the client side, making the video frame synchronization timestamp closer to the actual imaging time. Furthermore, based on the rolling shutter line-by-line scanning order and line readout timing, the video frame line time offset parameters are calculated to compensate for the exposure time differences of different image lines. This transforms the synchronization at the system clock level into time alignment at the video frame and intra-frame image line level, improving the consistency of the time status of multiple camera frames and the reliability of multi-view data processing. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a multi-camera wireless Wi-Fi frame alignment and synchronization method proposed in this invention; Figure 2 This is a schematic diagram of the structure of a multi-camera wireless Wi-Fi frame alignment and synchronization device proposed in this invention. Detailed Implementation

[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0020] refer to Figure 1 A method for aligning and synchronizing wireless Wi-Fi frames across multiple cameras, comprising: Step 1: Establish a unified wireless time synchronization network for multiple cameras, determine a unified time reference, send multiple wireless time probe data packets, and generate multiple sets of four-timestamp probe data; Step 2: Perform minimum delay filtering within the group on the multiple sets of four-timestamp detection data to generate a time deviation sample sequence; Step 3: Perform outlier removal and clock drift fitting on the time deviation sample sequence, and jointly determine the current time correction amount and crystal oscillator drift rate to obtain the client clock synchronization parameters; Step 4: Determine the current synchronization stage of the time synchronization client based on the client clock synchronization parameters, perform time jump correction and clock frequency feedforward compensation respectively, and generate the client synchronization timeline; Step 5: Based on the client synchronization timeline, obtain the TSF time of the WiFi beacon frame periodically broadcast by the time synchronization server, and perform consistency verification with the client clock synchronization parameters to generate a unified client timeline; Step 6: Determine the midpoint of the exposure time of the video frames captured by each camera, and map it to the unified timeline on the client to generate a synchronized timestamp sequence of video frames for each camera; Step 7: Based on the video frame synchronization timestamp sequence, calculate the video frame line time offset parameter, perform line-by-line time compensation on the rolling shutter exposure time, and generate a multi-camera frame-level time state sequence.

[0021] In this embodiment, step one specifically includes: Configure the WiFi hotspot device as a time synchronization server, configure each camera participating in multi-camera synchronization as a time synchronization client, connect each time synchronization client to the WiFi local area network established by the WiFi hotspot device, and use the current clock of the time synchronization server as a unified relative time reference for all time synchronization clients. After each time synchronization client connects to the time synchronization server, it performs grouped wireless time probing according to a preset detection period. The interval between adjacent wireless time probing groups is a preset time. Each wireless time probing group includes K wireless time probing data packets (UDP packets) sent sequentially, where K is a preset integer greater than 1. For each wireless time probe data packet, record the time T1 when the time synchronization client sends the corresponding probe request to the WiFi LAN, and record the time T2 when the time synchronization server receives the probe request. After receiving the probe request, the time synchronization server generates a probe response corresponding to the probe request, and records the time T3 when sending the probe response to the corresponding time synchronization client; The time synchronization client receives the probe response and records the time T4 when it receives the response. Establish a correspondence between the client sending the request at time T1, the server receiving the request at time T2, the server replying at time T3, and the client receiving the reply at time T4 belonging to the same wireless time probe data packet, to form the four timestamp data corresponding to the wireless time probe data packet. According to the transmission order of each wireless time probe data packet in the same wireless time probe group, the four timestamp data corresponding to K wireless time probe data packets are combined to form a single group of four timestamp probe data. The single group of four timestamp probe data is then arranged according to the detection time sequence of each wireless time probe group to generate the multiple groups of four timestamp probe data. In the synchronization initialization phase after the time synchronization client starts, multiple wireless time probe groups are executed continuously to collect four-timestamp probe data for wireless time synchronization of multiple cameras. Each wireless time probe group includes 64 wireless time probe data packets, the time interval between adjacent wireless time probe groups is 5 seconds, and 10 wireless time probe groups are executed continuously.

[0022] In this embodiment, step two specifically includes: Read the time T1 when the client sends the request, the time T2 when the server receives the request, the time T3 when the server replies, and the time T4 when the client receives the reply for each wireless time probe data packet; Calculate the total interaction time T4-T1 from when the client sends a request to when it receives the corresponding response, and calculate the server processing time T3-T2 from when the time synchronization server receives the request to when it sends the corresponding response. The round-trip delay d corresponding to the current wireless time probe data packet is obtained by subtracting the total interaction time from the server processing time, where d = (T4 - T1) - (T3 - T2). Calculate T2-T1 and T3-T4 respectively, and take half of the sum of the two to obtain the original time deviation t corresponding to the current wireless time probe data packet, where t=((T2-T1)+(T3-T4)) / 2; Calculate the round-trip delay and original time deviation for each of the K wireless time probe data packets in each wireless time probe group in the above manner to obtain the K round-trip delay and original time deviation data for each wireless time probe group. For each wireless time probe group, compare the round-trip delays of the K wireless time probe data packets within that group. The wireless time probe data packet with the minimum round-trip delay is determined as the target probe data packet of the current wireless time probe group, and the original time deviation corresponding to the target probe data packet is retained, while the original time deviations corresponding to the other wireless time probe data packets in the current wireless time probe group are discarded. Obtain the client local time corresponding to each target detection data packet, and establish a correlation between the client local time Xi corresponding to the i-th target detection data packet and the corresponding original time deviation ti to form a high-quality time deviation sample (Xi, ti); According to the detection time sequence of each wireless time detection group, each high-quality time deviation sample is arranged to generate a high-quality time deviation sample sequence (X1, t1), (X2, t2), ..., (XN, tN), where N represents the number of wireless time detection groups participating in the current time deviation estimation.

[0023] In this embodiment, step three specifically includes: Read N time deviation samples (X1, t1), (X2, t2), ..., (XN, tN) from the time deviation sample sequence, where Xi represents the client local time corresponding to the i-th time deviation sample, and ti represents the original time deviation corresponding to the i-th high-quality time deviation sample. Outlier detection is performed on the N time deviation samples, specifically including: The degree of anomaly is determined based on the original time deviation corresponding to each time deviation sample. The M outlier samples with the largest deviation are removed (M is generally taken as 1). Alternatively, the time deviation samples are initially fitted and the residual of each sample relative to the initial fitting result is calculated. Samples with residuals greater than a preset residual threshold are identified as outlier samples and removed to obtain a set of retained time deviation samples. The preset residual threshold is determined as 2σ based on the residual standard deviation. Using the client local time Xi corresponding to each sample in the retained time deviation sample set as the independent variable and the corresponding original time deviation ti as the dependent variable, the relationship between the client local time and the original time deviation is linearly regressed by the least squares method to obtain the time deviation change function f(x)=ax+b. Where x represents the client's local time, f(x) represents the time deviation between the time synchronization client and the time synchronization server under the corresponding client's local time, a represents the slope of the time deviation as the client's local time changes, and b represents the intercept obtained from linear regression. Obtain the current client local time Xc of the current time synchronization client, input the current client local time Xc into the time deviation change function, and calculate the current time deviation Δt, where Δt=f(Xc)=aXc+b; The current time deviation Δt is determined as the current time correction amount of the current time synchronization client relative to the unified relative time reference of the time synchronization server; The slope 'a' of the time deviation change function is extracted. The slope 'a' represents the rate of change of the time deviation between the timing client clock and the timing server clock over time. The slope 'a' is then determined as the client crystal oscillator drift rate. The current time correction amount Δt is correlated with the client crystal oscillator drift rate a to generate the client clock synchronization parameters.

[0024] In this embodiment, step four specifically includes: Determine whether the current time synchronization client is in the pre-recording synchronization stage or the formal recording synchronization stage based on the current video recording status of the time synchronization client. When the current time synchronization client is in the pre-recording synchronization stage, the absolute value of the current time correction amount is compared with the preset synchronization range; When the absolute value of the current time correction exceeds the preset synchronization range, the current clock of the time synchronization client is timed according to the current time correction, so that the current clock of the time synchronization client is directly adjusted to the unified relative time reference of the time synchronization server, and the corrected current time correction is re-acquired. Continuously determine whether the corrected current time adjustment amount falls within the preset synchronization range; When the corrected current time correction amount enters the preset synchronization range, stop the time jump correction and confirm that the time synchronization client has completed the time alignment before recording. Among them, when the absolute value of the initial time deviation before recording is greater than 0.1s, time jump correction is allowed to eliminate the initial time deviation; Once the current time synchronization client enters the formal recording and synchronization phase, it stops using time jump to modify the current clock and determines the direction of the clock accumulation rate adjustment of the time synchronization client based on the direction of the current time correction amount. When the time synchronization client's clock lags behind the time synchronization server's clock, the cumulative increment of the time synchronization client's clock in subsequent units of time is increased, so that the time synchronization client's clock gradually catches up with the unified relative time reference. When the time synchronization client clock is ahead of the time synchronization server, the cumulative clock increment of the time synchronization client in subsequent units of time is reduced, so that the time synchronization client clock waits for the unified relative time base to gradually catch up. Based on the current time correction amount, the time deviation that needs to be compensated by adjusting the clock accumulation rate is determined, and the time deviation is gradually reduced during continuous timing by continuously changing the time increment corresponding to the unit timing cycle of the time synchronization client, until the current time correction amount enters the preset synchronization range. During the adjustment process, the current clock of the timing client is kept continuously incremented, and no backward transition is performed on the already generated clock value; The inherent speed variation trend of the timing client clock relative to the timing server clock is determined based on the client crystal oscillator drift rate, and the clock frequency feedforward compensation amount is set in the opposite direction to the inherent speed variation trend. The clock frequency feedforward compensation is superimposed on the clock accumulation rate adjustment process determined based on the current time correction to compensate for the accumulation of time deviation caused by client crystal oscillator drift between adjacent synchronization cycles. Based on the timing client clock after the current time correction feedback adjustment and client crystal oscillator drift rate feedforward compensation, the synchronization time value is continuously generated in chronological order, so that adjacent synchronization time values ​​maintain an increasing relationship, thus generating the continuous monotonic client synchronization time axis.

[0025] In this embodiment, step five specifically includes: Based on the client's synchronized timeline, the wireless communication unit of the timing client continuously listens to the WiFi beacon frames (802.11 beacon frames) periodically broadcast by the timing server. When each WiFi beacon frame is received, the TSF time value carried in the WiFi beacon frame and maintained by the time synchronization server is extracted, and the local reception time of the client corresponding to the current WiFi beacon frame when it arrives at the time synchronization client is recorded. Establish a correspondence between the TSF time values ​​and the client's local reception time to generate TSF time observation samples; According to the order of WiFi beacon frame reception time, multiple consecutive TSF time observation samples are arranged, the time difference between each TSF time value and the corresponding client local reception time is calculated, and the auxiliary time deviation of the client local time relative to the time synchronization server TSF time and the auxiliary drift rate of the auxiliary time deviation as time change are determined based on the time difference change of consecutive TSF time observation samples. Based on the current time correction amount and client crystal oscillator drift rate obtained from the four timestamp detection, the current time correction amount is compared with the auxiliary time deviation, and the client crystal oscillator drift rate is compared with the auxiliary drift rate to obtain the time estimation difference between the four timestamp detection channel and the TSF time observation channel. When the time estimation difference does not exceed the preset consistency threshold, it is determined that the current time correction amount and the client crystal oscillator drift rate obtained based on the four timestamp detection meet the consistency requirements. The fusion weights are determined based on the variance of the time estimation results corresponding to the four timestamp detection channels and the TSF time observation channels. The current time correction and the auxiliary time deviation are weighted and fused, and the client crystal oscillator drift rate and the auxiliary drift rate are weighted and fused to obtain the fused time correction and the fused drift rate. When the time estimation difference exceeds the preset consistency threshold, it is determined that the current four-timestamp detection result is affected by wireless packet loss, network congestion or sudden delay jitter, the current four-timestamp detection result is discarded, and the packet transmission of wireless time probe data packets and the acquisition of four-timestamp detection data are re-executed to update the current time correction amount and the client crystal oscillator drift rate. When the four timestamp detection channels cannot obtain an effective current time correction and client crystal oscillator drift rate within a preset time range, the time synchronization relationship between the time synchronization client and the time synchronization server is maintained according to the auxiliary time deviation and auxiliary drift rate, and the consistency verification or fusion of the time estimation results of the two channels is re-executed after the four timestamp detection channels are restored. Based on the fusion time correction and fusion drift rate, or when the four timestamp detection channel is temporarily unavailable due to network congestion, based on the auxiliary time deviation and auxiliary drift rate, the client synchronization timeline is updated to generate the client unified timeline.

[0026] In this embodiment, step six specifically includes: Based on the unified timeline of the client, during the video acquisition process of each camera, the exposure time information corresponding to each video frame is obtained in the order of video frame acquisition. The exposure time information includes at least the exposure start time and exposure duration of the current video frame. For each video frame captured by each camera, the exposure start time and exposure duration of the current video frame are read, and half of the exposure duration is added to the exposure start time to determine the exposure midpoint time of the current video frame. Among them, the exposure midpoint of the current video frame represents the midpoint of the exposure interval of the video frame in the time dimension; Based on the time correspondence between the client's local time corresponding to the current camera and the client's unified timeline, the exposure midpoint time of the current video frame is converted to the client's unified timeline to obtain the exposure midpoint synchronization time of the current video frame under a unified relative time reference. The exposure midpoint synchronization time is determined as the video frame synchronization timestamp of the current video frame, so that the video frame synchronization timestamp corresponds to the exposure midpoint of the imaging content of the current video frame, rather than the time when the current video frame is read out. The video frame synchronization timestamps corresponding to each video frame continuously captured by the same camera are determined in the above manner, and the video frame synchronization timestamps are arranged in the order of the acquisition time of each video frame to generate the video frame synchronization timestamp sequence corresponding to the current camera. The exposure midpoint time determination and client-side unified timeline mapping are performed on each of the cameras participating in the synchronization, so that the video frame synchronization timestamps of each camera are all under the same unified relative time base, and a video frame synchronization timestamp sequence of each camera is generated.

[0027] In this embodiment, step seven specifically includes: Read the video frame synchronization timestamp sequence of each camera, identify the target camera that uses a rolling shutter, and obtain the corresponding line-by-line scanning order and line readout timing for each video frame continuously acquired by the target camera; The line-by-line scanning sequence is used to determine the exposure order of each image line in the current video frame, and the line readout timing is used to determine the time interval between adjacent image lines; For the current video frame, each image row is arranged according to the line-by-line scanning order. Based on the row number corresponding to each image row, the time interval between adjacent image rows, and the exposure midpoint time of the current video frame, the actual exposure time corresponding to each image row is determined. Calculate the time difference between the actual exposure time of each image row and the exposure midpoint time of the current video frame; The time difference is defined as the row time offset of the corresponding image row relative to the midpoint of the current video frame's exposure. Among them, the image rows that complete their corresponding exposure before the exposure midpoint have a time offset toward the time before the exposure midpoint, and the image rows that complete their corresponding exposure after the exposure midpoint have a time offset toward the time after the exposure midpoint. Based on the order of each image row in the current video frame, the row time offsets corresponding to each image row are combined to generate the video frame row time offset parameters of the current video frame. The video frame line time offset parameter represents the temporal position relationship of each image line within the current video frame relative to the exposure midpoint of the video frame. Obtain the video frame synchronization timestamp corresponding to the current video frame in the video frame synchronization timestamp sequence, establish an index association between the video frame line time offset parameter and the corresponding video frame synchronization timestamp, so that the video frame synchronization timestamp of the current video frame represents the exposure midpoint synchronization time of the video frame, and the video frame line time offset parameter represents the time offset of each image line relative to the exposure midpoint synchronization time. According to the order of video frame acquisition time, the video frame synchronization timestamps and video frame line time offset parameters corresponding to consecutive video frames of the same camera are arranged, and the above processing is performed on each camera using a rolling shutter to generate a multi-camera frame-level time state sequence.

[0028] refer to Figure 2 A multi-camera wireless Wi-Fi frame alignment and synchronization device includes the following modules: The wireless time synchronization module is used to establish a unified wireless time synchronization network for multiple cameras, determine a unified time reference, send multiple wireless time probe data packets, and generate multiple sets of four-timestamp probe data. The deviation filtering module is used to perform minimum time delay filtering within the group on the multiple sets of four-timestamp detection data to generate a time deviation sample sequence. The drift fitting module is used to perform outlier removal between groups and clock drift fitting on the time deviation sample sequence, jointly determine the current time correction amount and crystal oscillator drift rate, and obtain the client clock synchronization parameters. Clock correction module: Determines the current synchronization stage of the time synchronization client based on the client's clock synchronization parameters, performs time jump correction and clock frequency feedforward compensation respectively, and generates the client synchronization timeline; The TSF verification module is used to obtain the TSF time of the WiFi beacon frame periodically broadcast by the time synchronization server based on the client synchronization time axis, and perform consistency verification with the client clock synchronization parameters to generate a unified client time axis. The frame time calibration module is used to determine the exposure midpoint time of the video frame exposure time information acquired by each camera, and map it to the unified timeline on the client to generate a video frame synchronization timestamp sequence for each camera. The line-by-line compensation module is used to calculate the video frame line time offset parameter based on the video frame synchronization timestamp sequence, perform line-by-line time compensation on the rolling shutter exposure time, and generate a multi-camera frame-level time state sequence.

[0029] Example 1: To verify the feasibility of this invention in practice, it was applied to an indoor multi-camera video capture experimental site. The site was a continuous video capture area of ​​approximately 120 square meters, containing one WiFi hotspot device and six synchronized video cameras. All six cameras established wireless connections with the WiFi hotspot device via the same WiFi LAN. Each camera acted as a time synchronization client, and the WiFi hotspot device acted as a time synchronization server. During the test, the current clock of the time synchronization server was used as a unified relative time reference for all cameras, without requiring this time reference to be consistent with external absolute time. The cameras continuously captured video from different locations within the site, with some cameras using a rolling shutter. The test primarily examined whether the cameras could establish a stable time synchronization relationship when there were transmission delay fluctuations in the wireless LAN, and investigated the impact of clock drift between different clients and differences in line-by-line exposure time of the rolling shutter on the video frame timing during continuous recording.

[0030] In practical applications, it was found that when multiple cameras simultaneously interact with each other via a WiFi LAN, the transmission time of each wireless time probe data packet is not fixed. For example, in a continuous probe, the minimum round-trip time (RTT) of a group of wireless time probe data packets sent by the same timing client is 2.46ms, while the RTTs of some probe data packets in the same group reach 8.73ms, 15.62ms, and 27.84ms, with a maximum of 41.37ms. If the time relationship between the client and the timing server is directly determined using all probe results, the original time deviation will fluctuate significantly with the sudden increase in RTT. Therefore, in this embodiment, according to the method defined in the claims, each timing client sends multiple wireless time probe data packets to the timing server in groups, and records the client's request time T1, the server's request time T2, the server's response time T3, and the client's response time T4, forming multiple sets of four-timestamp probe data.

[0031] For each wireless time probe data packet, the total interaction time is determined based on the client's request sending time T1 and the client receiving the response time T4. The server processing time is determined based on the server receiving the request time T2 and the server responding time T3. The round-trip time of the corresponding wireless time probe data packet is then obtained using the difference between the total interaction time and the server processing time. Simultaneously, the corresponding raw time deviation is calculated based on the time difference relationship between the four timestamps. In one timing client test, the round-trip time latency obtained within a set of probe data ranged from 2.46 to 41.37 ms, and the corresponding raw time deviation ranged from -8.26 to 11.43 ms. It can be seen that the raw time deviation fluctuations are significantly larger for probe data packets with larger round-trip times. This embodiment compares the round-trip times in each set of probe data, identifies only the wireless time probe data packet with the smallest round-trip time latency as the target probe data packet, and retains the raw time deviation corresponding to the target probe data packet. In 10 consecutive detection sessions, the minimum round-trip times were 2.46ms, 2.51ms, 2.38ms, 2.63ms, 2.42ms, 2.57ms, 2.49ms, 2.36ms, 2.61ms, and 2.44ms, respectively, with corresponding retained original time deviations of 3.82ms, 3.95ms, 4.01ms, 4.08ms, 4.16ms, 4.25ms, 4.31ms, 4.39ms, 4.47ms, and 4.55ms. By correlating the client's local time corresponding to each target detection data packet with the original time deviation, a time deviation sample sequence was obtained.

[0032] Even with intra-group minimum latency screening, individual detection groups may still be affected by instantaneous wireless state changes. Therefore, this embodiment continues to detect outliers between groups in the time deviation sample sequence. In a continuous test, 9 out of 10 time deviation samples fell within the range of 3.82–4.55 ms, with one sample at 6.74 ms. This sample's trend was significantly inconsistent with the trends of its preceding and following samples, and was therefore identified as an outlier and removed. Least squares linear regression was performed on the client's local time and the original time deviation for each sample in the retained time deviation sample set to obtain the current time deviation change function for the timing client. At the start of the test, the client calculated a current time correction of 4.61 ms, and the fitted client crystal oscillator drift rate corresponded to a time deviation increase trend of approximately 0.086 ms per minute. During a 60-minute continuous test, without drift compensation, relying solely on the time alignment completed at the initial moment, the time deviation between the client and the time service gradually changed from approximately 4.6ms to approximately 9.7ms. After continuous feedforward compensation using the crystal oscillator drift rate, the time difference between the client and the time service remained within a small range within the same time range.

[0033] Before formal video capture, each time synchronization client first determines whether it is in the pre-recording synchronization stage based on its client clock synchronization parameters. In one startup test, the initial absolute values ​​of the time corrections for the six cameras were 84.6ms, 127.3ms, 43.8ms, 156.7ms, 69.5ms, and 112.4ms, respectively. Several clients showed significant initial deviations from the unified relative time reference. After performing time jump correction based on the current time correction, the time deviations of each client decreased rapidly, entering a synchronization state that could be continuously adjusted. Once formal video recording begins, the method of directly modifying the current clock's time jump is no longer used. Instead, the direction of clock accumulation rate adjustment is determined based on the current time correction. For time synchronization clients with lagging clocks, the clock accumulation increment per unit time is increased; for those with leading clocks, the clock accumulation increment per unit time is decreased. Simultaneously, a clock frequency feedforward compensation amount is set based on the client's crystal oscillator drift rate, with a trend opposite to the inherent speed of change. During continuous recording, the synchronization time values ​​generated by each time synchronization client always increased sequentially according to time. During the test, there was no situation where the timestamp of the later video frame was less than the timestamp of the previous video frame.

[0034] To further reduce anomalies caused by network congestion when using a single four-timestamp detection channel, this embodiment, after establishing the client synchronization timeline, requires each time synchronization client to continuously listen to the WiFi beacon frames periodically broadcast by the time synchronization server, extract the TSF time value from each WiFi beacon frame, and simultaneously record the client's local reception time corresponding to each beacon frame. During continuous observation, a correspondence is established between the TSF time value and the client's local reception time, the time difference between the two is calculated, and the auxiliary time deviation and auxiliary drift rate are obtained based on the changes in the continuous time difference. Under normal wireless conditions, when the current time correction obtained by the four-timestamp detection channel is 3.26ms, the auxiliary time deviation obtained by the TSF time observation channel is 3.08ms, with a difference of 0.18ms; in another time period, the corresponding results of the two channels are 3.74ms and 3.51ms, respectively, with a difference of 0.23ms, showing good consistency. During a period of significant network congestion, the current time correction given by the four-timestamp probe suddenly changed to 9.86ms, while the auxiliary time deviation obtained from the concurrent TSF time observation was 3.62ms. The difference between the two time estimates increased significantly, so the four-timestamp probe result was discarded and four-timestamp probe data was reacquired. After reacquisition, the current time correction was 3.69ms, and the difference between it and the auxiliary time deviation returned to 0.11ms. The test also simulated a situation where the four-timestamp probe channel could not obtain effective results for a short period of time. In this case, the time synchronization relationship of the timing client was maintained based on the auxiliary time deviation and auxiliary drift rate. After the four-timestamp probe recovered, a consistency check was performed again, thereby avoiding significant abrupt changes in the client's synchronization timeline during short-term network congestion.

[0035] After the unified timeline is formed on the client side, this embodiment further processes the video frames actually captured by each camera. For each video frame, the exposure start time and exposure duration are obtained, and half of the exposure duration is added to the exposure start time to obtain the exposure midpoint time. For example, if the exposure start time of a video frame is 128.436215s on the client's local timeline and the exposure duration is 8.00ms, then the corresponding exposure midpoint time is 128.440215s. Based on the correspondence between the client's local time and the client's unified timeline, this exposure midpoint time is mapped to the client's unified timeline, and the mapped exposure midpoint synchronization time is determined as the video frame synchronization timestamp of the current video frame. Thus, the video frame timestamps of each camera no longer directly use time positions that deviate from the actual imaging time, but are uniformly mapped to the midpoint of the exposure interval of each video frame.

[0036] For cameras using rolling shutters, this embodiment further obtains the progressive scan order and line readout timing of each video frame. Taking a frame from one of the target cameras as an example, the time interval between adjacent image lines is approximately 14.8 μs. After arranging the image lines of the video frame in progressive scan order, the actual exposure time corresponding to each image line is determined based on the image line number, the time interval between adjacent image lines, and the exposure midpoint time of the video frame. Image lines near the middle of the video frame have a time offset close to 0 from the exposure midpoint time; image lines near the beginning of the image have a negative time offset; and image lines near the end of the image have a positive time offset. In one actual calculation, the time offset of the image lines represented by the beginning region is -7.94 ms, the time offset of the image lines represented by the middle region is 0.02 ms, and the time offset of the image lines represented by the end region is 7.91 ms. The time offsets of each line are combined according to the image line arrangement order to form the video frame line time offset parameter of the current video frame, and this video frame line time offset parameter is indexed and associated with the corresponding video frame synchronization timestamp. After continuously processing video frames from each camera, a multi-camera frame-level time state sequence is obtained.

[0037] To verify the practical effectiveness of the method, multiple sets of continuous tests were conducted under the same WiFi LAN and the same multi-camera setup. The test periods included three consecutive acquisition periods: 09:10–09:40, 10:00–11:00, and 14:20–15:50, covering 30 minutes, 60 minutes, and 90 minutes of operation, respectively. The comparison method used was a standard wireless time adjustment result without intra-group minimum latency screening, inter-group outlier removal, crystal oscillator drift feedforward compensation, TSF consistency verification, and rolling shutter line-by-line time compensation, compared with the method described in this embodiment. Representative data are shown in the table below.

[0038] Table 1 Comparison of Multi-Camera Wireless Time Synchronization and Frame-Level Time Synchronization Effects As shown in Table 1, in a WiFi wireless transmission environment, the round-trip time (RTD) of a single set of probe data can suddenly increase from 2.46 ms to 41.37 ms, indicating that there are indeed significant delay fluctuations during wireless transmission. If all probe data are used together to determine the time deviation, the original time deviation range reaches 19.69 ms. However, after filtering for the minimum RTD within each group, the time deviation range of several consecutive retained samples is reduced to 3.82–4.55 ms, with a range of only 0.73 ms. This demonstrates that forming a time deviation sample sequence using the target probe data packets with the minimum RTD for each group can significantly reduce the impact of abnormal wireless transmission delays on subsequent time estimation. Further outlier removal between groups and clock drift fitting can prevent a small number of abnormal samples from participating in the calculation of the current time correction and the client crystal oscillator drift rate.

[0039] The continuous operation results show that ordinary wireless time adjustment exhibits significant cumulative deviations as the running time increases, with time deviations reaching 7.18ms, 9.72ms, and 12.86ms at 30min, 60min, and 90min respectively. In contrast, the results using the method described in this embodiment are 2.84ms, 3.17ms, and 3.63ms respectively. This is because this embodiment does not only correct the time deviation at the current moment, but also determines the client crystal oscillator drift rate while obtaining the current time correction amount. During the actual recording process, clock accumulation rate adjustment and clock frequency feedforward compensation are used to maintain the client's synchronized time axis. During the 90-minute continuous recording process, this embodiment did not exhibit any timestamp rollback, while the ordinary direct time adjustment results recorded 7 timestamp rollbacks. This indicates that the processing method of using time jump correction before recording and continuous clock accumulation rate adjustment after the actual recording can balance rapid initial time alignment and time continuity during the recording process.

[0040] The TSF time observation results further enhanced the stability of the wireless synchronization process. Under normal conditions, the typical difference between the four-timestamp probe results and the TSF time observation results remained between 0.11 and 0.23 ms. When network congestion caused a change in the four-timestamp probe result to 9.86 ms, the TSF auxiliary time deviation remained around 3.62 ms. Since the difference in time estimation between the two channels exceeded the consistency range, this abnormal four-timestamp probe result was not used for client synchronization timeline updates. After re-acquisition, the difference between the two channels recovered to around 0.11 ms. During the approximately 18-second short-term unavailability of the four-timestamp probe channel, the time synchronization relationship was maintained using the auxiliary time deviation and auxiliary drift rate, and the client's unified timeline did not experience significant interruption. This indicates that using the four-timestamp probe channel and the TSF time observation channel for consistency verification can reduce the impact of network congestion on continuous synchronization.

[0041] At the video frame level, this embodiment further demonstrates an effect different from simple system clock synchronization. By converting the exposure start time and exposure duration into the exposure midpoint time, and then mapping them to a unified timeline on the client side, the video frame synchronization timestamps of each camera uniformly correspond to the middle position of the actual exposure interval. For rolling shutter video frames, there is an exposure time difference of approximately 15.85ms between the first and last representative image lines in the sample frame. If only a unified time is assigned to the entire frame without recording the line-by-line time offset, the actual time position of different image lines within the frame cannot be expressed. This embodiment calculates the video frame line time offset parameters within the range of -7.94ms to 7.91ms and establishes an index association with the corresponding video frame synchronization timestamps. This ensures that the same video frame has both the exposure midpoint synchronization time on a unified timeline and retains the time position relationship of each image line relative to this synchronization time, ultimately forming a multi-camera frame-level time state sequence. Therefore, this embodiment can simultaneously reduce the impact of wireless latency fluctuations, client crystal oscillator drift, and line-by-line exposure differences of rolling shutter on the time synchronization results under pure WiFi multi-camera acquisition conditions, and further refine the time relationship of multiple cameras from the client clock level to the video frame and intra-frame image line level.

[0042] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A multi-camera wireless wifi frame alignment synchronization method, characterized in that, include: Step 1: Establish a unified wireless time synchronization network for multiple cameras, determine a unified time reference, send multiple wireless time probe data packets, and generate multiple sets of four-timestamp probe data; Step 2: Perform minimum delay filtering within the group on the multiple sets of four-timestamp detection data to generate a time deviation sample sequence; Step 3: Perform outlier removal and clock drift fitting on the time deviation sample sequence, and jointly determine the current time correction amount and crystal oscillator drift rate to obtain the client clock synchronization parameters; Step 4: Determine the current synchronization stage of the time synchronization client based on the client clock synchronization parameters, perform time jump correction and clock frequency feedforward compensation respectively, and generate the client synchronization timeline; Step 5: Based on the client synchronization timeline, obtain the TSF time of the WiFi beacon frame periodically broadcast by the time synchronization server, and perform consistency verification with the client clock synchronization parameters to generate a unified client timeline; Step 6: Determine the midpoint of the exposure time of the video frames captured by each camera, and map it to the unified timeline on the client to generate a synchronized timestamp sequence of video frames for each camera; Step 7: Based on the video frame synchronization timestamp sequence, calculate the video frame line time offset parameter, perform line-by-line time compensation on the rolling shutter exposure time, and generate a multi-camera frame-level time state sequence.

2. The multi-camera wireless wifi frame alignment synchronization method of claim 1, wherein, Step one specifically involves: Set the WiFi hotspot device as the time synchronization server and multiple cameras as time synchronization clients; Each time synchronization client connects to the time synchronization server via a WiFi local area network and uses the time synchronization server's clock as a unified relative time reference. Each time synchronization client sends multiple wireless time probe data packets to the time synchronization server in groups according to a preset probe cycle, and records the client's sending time, the server's receiving time, the server's response time, and the client's receiving time, generating multiple sets of four-timestamp probe data.

3. The multi-camera wireless wifi frame alignment synchronization method of claim 1, wherein, Step two specifically involves: Based on the multiple sets of four-timestamped detection data, the client sends the request at time T1, the server receives the request at time T2, the server responds at time T3, and the client receives the response at time T4, corresponding to each wireless time detection data packet. Calculate the total interaction time between the client and the time synchronization server and the server processing time, and obtain the round-trip delay corresponding to each wireless time probe data packet by subtracting the two. Calculate the original time deviation corresponding to each wireless time probe data packet based on the time difference relationship between the four timestamps; For each wireless time probe group, the round-trip time delays of multiple wireless time probe data packets within the group are compared. The wireless time probe data packet with the smallest round-trip time delay is determined as the target probe data packet, and its corresponding original time deviation is retained. Obtain the client's local time corresponding to each target detection data packet, establish a correlation between the client's local time and the original time deviation, and arrange them according to the detection time sequence of each wireless time detection group to generate a time deviation sample sequence.

4. The multi-camera wireless wifi frame alignment synchronization method of claim 1, wherein, Step three specifically involves: Outlier detection is performed on each time deviation sample. The outlier sample with the largest deviation is removed according to the degree of abnormality of the original time deviation. Alternatively, the time deviation samples are initially fitted and the residuals corresponding to each sample are calculated. Samples with residuals exceeding the preset residual threshold are identified as outliers and removed to obtain the set of retained time deviation samples. Using the client's local time corresponding to each sample in the retained time deviation sample set as the independent variable and the corresponding original time deviation as the dependent variable, linear regression is performed using the least squares method to obtain the time deviation change function. Obtain the local time of the current time synchronization client, and input the time deviation change function to calculate the current time deviation of the current time synchronization client relative to the unified relative time reference of the time synchronization server; The current time deviation is determined as the current time correction amount; Extract the slope of the time deviation change function, characterize the rate of change of the time deviation between the timing client clock and the timing server clock over time based on the slope, and determine the client crystal oscillator drift rate. The current time correction amount is correlated with the client crystal oscillator drift rate to generate client clock synchronization parameters.

5. The multi-camera wireless wifi frame alignment synchronization method of claim 1, wherein, Step four specifically involves: Determine whether the time synchronization client is in the pre-recording synchronization stage or the formal recording synchronization stage based on its video recording status. When in the pre-recording synchronization stage, compare the absolute value of the current time correction with the preset synchronization range; When the current time correction exceeds the preset synchronization range, the time jump correction is performed on the current clock of the time synchronization client according to the current time correction, and the corrected current time correction is re-acquired until the current time correction enters the preset synchronization range, thus completing the time alignment before recording. Once the formal recording synchronization phase begins, stop using time jumps to modify the current clock, and determine the direction of clock accumulation rate adjustment based on the direction of the current time correction amount. Increase the cumulative clock increment per unit time when the time synchronization client clock is lagging behind, and decrease the cumulative clock increment per unit time when the time synchronization client clock is ahead. The inherent speed variation trend of the client clock relative to the time service clock is determined based on the client crystal oscillator drift rate, and a clock frequency feedforward compensation amount in the opposite direction is set and superimposed on the clock cumulative rate adjustment process corresponding to the current time correction amount. Based on the timing client clock after feedback adjustment and feedforward compensation, an incremental synchronization time value is continuously generated, forming a continuous and monotonic client synchronization time axis.

6. The multi-camera wireless wifi frame alignment synchronization method of claim 1, wherein, Step five specifically involves: Based on the client-side timeline synchronization, the time synchronization client continuously listens to the WiFi beacon frames periodically broadcast by the time synchronization server; Extract the TSF time value carried in each WiFi beacon frame and record the corresponding local reception time of the client. Establish a correspondence between the two and generate TSF time observation samples. Arrange multiple consecutive TSF time observation samples in chronological order of reception time, and calculate the time difference between the TSF time value and the client's local reception time; The auxiliary time deviation and auxiliary drift rate of the client's local time relative to the time synchronization server's TSF time are determined based on the time difference and its change over time. The current time correction and client crystal oscillator drift rate obtained from the four timestamp detection are compared with the auxiliary time deviation and auxiliary drift rate, respectively, to determine the time estimation difference between the four timestamp detection channel and the TSF time observation channel; When the time estimation difference does not exceed the preset consistency threshold, the fusion weight is determined based on the variance of the time estimation results of the two channels. The current time correction amount and the auxiliary time deviation, as well as the client crystal oscillator drift rate and the auxiliary drift rate are weighted and fused respectively to obtain the fused time correction amount and the fused drift rate. When the time estimation difference exceeds the preset consistency threshold, discard the current four-timestamp detection results and re-collect the four-timestamp detection data; When the four-timestamp probe channel is unavailable due to network congestion, the time synchronization relationship is maintained based on the auxiliary time deviation and auxiliary drift rate. The client synchronization timeline is updated based on the fusion time correction and fusion drift rate or TSF time observation results to generate a unified client timeline.

7. The multi-camera wireless wifi frame alignment synchronization method of claim 1, wherein, Step six specifically involves: During the video capture process of each camera, the exposure start time and exposure duration of each video frame are obtained according to the order of video frame capture. For each video frame, add half of the exposure duration to the exposure start time to determine the exposure midpoint of the current video frame; Based on the time correspondence between the client's local time and the client's unified timeline corresponding to the current camera, the exposure midpoint time is mapped to the client's unified timeline to obtain the exposure midpoint synchronization time corresponding to the current video frame under a unified relative time reference. The exposure midpoint synchronization time is determined as the video frame synchronization timestamp of the current video frame; According to the order of acquisition time of each video frame, the synchronization timestamps of the video frames corresponding to the consecutive video frames acquired by the same camera are arranged, and the exposure midpoint determination and unified time axis mapping processes are performed on each camera participating in the synchronization to generate a video frame synchronization timestamp sequence for each camera.

8. The multi-camera wireless wifi frame alignment synchronization method of claim 1, wherein, Step seven specifically involves: Identify the target camera using a rolling shutter and obtain the progressive scan order and line readout timing corresponding to each video frame of the target camera; For each video frame, the image rows are arranged in a line-by-line scanning order. Based on the row number of each image row, the time interval between adjacent image rows, and the exposure midpoint of the current video frame, the actual exposure time of each image row is determined. Calculate the time difference between the actual exposure time of each image row and the exposure midpoint time of the current video frame, and determine the time difference as the row time offset of the corresponding image row; The time offsets of each row are combined according to the order of the image rows to generate the video frame row time offset parameters for the current video frame; The video frame line time offset parameter is indexed and associated with the video frame synchronization timestamp corresponding to the current video frame, which is used to characterize the temporal position relationship of each image line within the current video frame relative to the exposure midpoint synchronization time. Based on the chronological order of video frame acquisition, the video frame synchronization timestamps and video frame line time offset parameters corresponding to consecutive video frames from the same camera are arranged to generate a multi-camera frame-level time state sequence.

9. A multi-camera wireless wifi frame alignment and synchronization apparatus, performing a multi-camera wireless wifi frame alignment and synchronization method according to any one of claims 1 to 8, characterized in that, Includes the following modules: The wireless time synchronization module is used to establish a unified wireless time synchronization network for multiple cameras, determine a unified time reference, send multiple wireless time probe data packets, and generate multiple sets of four-timestamp probe data. The deviation filtering module is used to perform minimum time delay filtering within the group on the multiple sets of four-timestamp detection data to generate a time deviation sample sequence. The drift fitting module is used to perform outlier removal between groups and clock drift fitting on the time deviation sample sequence, jointly determine the current time correction amount and crystal oscillator drift rate, and obtain the client clock synchronization parameters. Clock correction module: Determines the current synchronization stage of the time synchronization client based on the client's clock synchronization parameters, performs time jump correction and clock frequency feedforward compensation respectively, and generates the client synchronization timeline; The TSF verification module is used to obtain the TSF time of the WiFi beacon frame periodically broadcast by the time synchronization server based on the client synchronization time axis, and perform consistency verification with the client clock synchronization parameters to generate a unified client time axis. The frame time calibration module is used to determine the exposure midpoint time of the video frame exposure time information acquired by each camera, and map it to the unified timeline on the client to generate a video frame synchronization timestamp sequence for each camera. The line-by-line compensation module is used to calculate the video frame line time offset parameter based on the video frame synchronization timestamp sequence, perform line-by-line time compensation on the rolling shutter exposure time, and generate a multi-camera frame-level time state sequence.