A method and system for automatic calibration of race synchronization timing and video delay
Patent Information
- Application Number
- CN202611034469.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-16
AI Technical Summary
如果简单采用实时网络消息,受无线网络传输时延和网络抖动的直接影响,终点收到消息并启动计时或录像的时刻会与起点产生显著误差
本发明采用“提前分发绝对时间表+本地定时执行”的调度架构,将网络传输时延和抖动排除在执行关键路径之外,使跨设备发令同步精度不再依赖于网络质量;
Smart Images

Figure CN122933848A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile terminal timing and video processing technology, and in particular to a method and system for automatic calibration of competition synchronization timing and video delay. Background Technology
[0002] In various sports competition timing scenarios, the start and finish lines are often physically separated. Traditional professional timing equipment is expensive and complex to deploy, making it difficult to popularize in daily training and grassroots competitions. With the improvement of mobile terminal performance, using smartphones and other mobile terminals to replace traditional equipment for distributed recording and timing is gradually becoming a trend.
[0003] However, existing mobile terminal competition timing solutions face the following significant technical problems: First, there is the issue of cross-device clock asynchrony and network jitter errors. When the starting and ending devices are separated, there is a systematic deviation between the local clocks of the two devices. If real-time network messages are simply used, the timing of the ending device receiving the message and starting timing or recording will differ significantly from that of the starting device due to the direct impact of wireless network transmission latency and network jitter. The uncertainty of wireless networks means that this error can reach hundreds of milliseconds or even seconds, which cannot meet the accuracy requirements of sports competition timing.
[0004] Second, there is inconsistency between multimedia and timing event scheduling. During the competition's starting phase, there are multiple stages, including voice countdown prompts, gunshot audio playback, UI state switching, recording initiation, and timing start. Each stage incurs its own scheduling overhead, often resulting in the starting signal, recording, and timing not being strictly aligned on the same absolute timeline. These scheduling delays vary across different devices and system versions, making uniform compensation difficult.
[0005] Third, there is an unknown latency in the camera acquisition chain. When using video recordings from terminal devices as the final verification basis, due to differences in camera hardware, preview frame streams, encoder performance, resolution, frame rate, and slow-motion modes among different mobile phone models, there is a device-related "camera acquisition latency" between the time of the physical event occurring in the real world and the timestamp of the video file. This latency includes the end-to-end latency from when light enters the lens to when frame data encoding is completed, and the difference between different devices can reach tens to hundreds of milliseconds.
[0006] Fourth, traditional delay calibration relies on external high-precision equipment. Currently, there is a lack of automated calibration methods for the delay of ordinary mobile terminal cameras. Uncalibrated end-point playback videos have a fixed deviation between the image and the timing timeline, resulting in insufficient accuracy in judging the finish line. Traditional calibration processes require specialized equipment such as external high-frequency flashes and dedicated signal generators, which are difficult for ordinary users to operate, limiting the accuracy and widespread adoption of mobile terminal timing solutions.
[0007] Therefore, this invention proposes a method and system for automatic calibration of competition synchronization timing and video delay. Summary of the Invention
[0008] To address the above issues, this invention proposes a method and system for automatic calibration of competition synchronization timing and video delay. It establishes a unified competition timeline through cross-device synchronization and absolute command scheduling, then uses synchronized flash and video frame analysis to infer the camera acquisition delay, and compensates for this delay in the competition video playback timeline.
[0009] A method for automatic calibration of synchronized timing and video delay in competitions includes the following steps: Step S1: Clock synchronization: The first terminal and the second terminal calculate the clock time offset and communication round-trip delay through multiple rounds of timestamp sampling, and select the sample that meets the preset stability condition as the reference time offset; Step S2: Absolute timetable scheduling: Based on the time offset and communication round-trip delay, an absolute execution timetable containing the absolute time of each future action node is generated and sent to the second terminal. The first terminal and the second terminal convert to their respective local absolute times and wait for execution independently. When each target absolute time is reached, the corresponding action is triggered. Step S3: Synchronous flash calibration: Under the established time reference, the first terminal generates the target flash time and lights up the screen to display the flash, and records the actual flash display time. The second terminal starts video recording around the target time. Step S4: Video Frame Analysis and Delay Calculation: Decode the video file recorded by the second terminal, extract brightness information to detect flash frames, calculate the absolute offset time of the flash event in the video stream, and calculate the camera acquisition delay accordingly. The camera acquisition delay is calculated using the following formula: ,in, This is the actual start time of the recording. This represents the absolute offset time of the flash event within the video stream. This refers to the scaling ratio of slow motion time. For reference flash duration, This refers to the time offset between the two terminals' clocks; Step S5: Timeline Correction: Save the camera acquisition delay as a compensation parameter, and correct the video playback timeline based on the camera acquisition delay during the match video playback.
[0010] Furthermore, in step S2, the absolute execution timetable includes the absolute time corresponding to the countdown prompt node, the absolute time corresponding to the preparation prompt node, and the absolute time corresponding to the command node. The absolute time of each node is calculated based on the audio duration, the preset safety margin, and the random delay time. The triggering of the corresponding action includes audio playback, UI switching, recording start, and timing start.
[0011] Furthermore, it also includes a manual command unified scheduling step: when the manual command mode is adopted, the first terminal generates the future target command time based on the current time offset and communication round-trip delay, and the first terminal and the second terminal respectively convert the target command time into local absolute time and wait for execution.
[0012] Furthermore, it also includes redundant transmission and deduplication of critical control messages: for critical control messages containing the absolute execution schedule, target command time, actual command time or calibration trigger time, the sending end encodes them into at least two identical data packets and sends them consecutively; the receiving end deduplicates them according to message type, payload content and message identifier, and only processes the first valid copy that arrives.
[0013] Furthermore, in step S3, before starting recording, the second terminal calls the camera hardware interface to lock the metering focus, enable automatic exposure lock, and enable automatic focus lock; the second terminal prioritizes the actual flash display time as a reference, and if it does not obtain it, it degenerates to using the target flash time.
[0014] Further, in step S4, the detection of the flash frame includes: extracting video frame brightness information sampling; generating an adaptive threshold based on background brightness; identifying the rising edge of brightness and constraining it within a preset window of the target time; scoring the candidate frames with confidence, and selecting the frame with the highest score and closest to the target time as the flash frame.
[0015] Further, in step S4, calculating the absolute offset time of the flash event in the video stream includes: extracting the underlying display timestamp of the video stream; performing subframe-level linear interpolation calculation on adjacent frames that cross a threshold, wherein the formula for performing subframe-level linear interpolation calculation is: , ,in, The threshold for determining the flash effect. For the first Frame brightness, For the first Frame brightness, For the first The frame displays the timestamp. For the first The frame displays the timestamp; in slow motion mode, the timestamp is restored to the physical acquisition timeline based on the metadata time base.
[0016] Furthermore, it also includes multiple calibration steps: performing multiple calibrations consecutively to obtain multiple delayed samples, removing outliers, and taking the mean, median, or weighted mean as the final delay; if the standard deviation or range of the remaining samples exceeds the threshold, a low confidence level is output and a retry is prompted.
[0017] Furthermore, it also includes an audio-visual collaborative calibration step: the first terminal outputs flash and audio pulses simultaneously or at fixed intervals at the target time; the second terminal simultaneously records video and audio tracks, and detects flash frames and audio pulses respectively for cross-verification.
[0018] A competition synchronization timing and video delay automatic calibration system includes a time synchronization unit, an absolute start scheduling unit, a synchronization flash calibration unit, and a video frame analysis and delay compensation unit. The time synchronization unit is used to calculate the clock time offset and communication round-trip delay between terminals by sampling multiple timestamps. The absolute command scheduling unit is used to generate an absolute execution timetable containing the absolute time of each action node, so that both ends can execute independently according to the converted local absolute time. The synchronous flash calibration unit is used to generate a target flash time under a synchronized time reference, schedule the flash end to display the flash and record the actual display time, and start recording at the recording end; The video frame analysis and delay compensation unit is used to decode the video file, detect flash frames, calculate the camera acquisition delay, and correct the timeline of the match video playback.
[0019] Compared with the prior art, the significant advantages of this invention are: This invention adopts a scheduling architecture of "pre-distribution of absolute timetable + local timed execution", which excludes network transmission latency and jitter from the critical path of execution, so that the accuracy of cross-device command synchronization no longer depends on network quality. By incorporating voice prompt duration, starting gun sound, and video recording startup into a unified absolute timetable calculation, internal system scheduling time differences caused by different multimedia operations are avoided. By pre-calculating the absolute time of all actions, it is ensured that each step is strictly aligned on the same timeline; Key messages such as absolute timetable, target issuing time, and actual issuing time are sent with dual-copy redundancy. The receiving end only needs to receive either copy to complete the scheduling. At the same time, deduplication ensures that no duplicate execution occurs when both copies arrive, thus balancing reliability and idempotency. Automated delay calibration without external devices: Without relying on professional hardware such as high-frequency flash, the camera acquisition link delay is automatically calibrated by the collaboration of two mobile terminals, which can be operated by ordinary users. A dual reference mechanism of "target flash time" and "actual flash display time" is introduced, eliminating errors caused by the flash phone's own screen refresh rate and operating system UI scheduling. The actual flash time is obtained by reading the underlying rendering completion time, rather than simply relying on the target time set at the application layer. It supports multiple consecutive calibrations, statistically analyzes the fusion results after removing outliers, outputs a reliability index, and actively prompts for retry to avoid single false detections. By synchronizing or periodically outputting screen flashes and audio pulses, visual and audio peaks are formed within the same media file. This can be used to cross-validate camera links, microphone links, and audio / video encapsulation timelines, improving calibration reliability in complex environments. The five stages of clock synchronization, absolute command, flash calibration, delay analysis, and playback correction are organically linked, with data exchange and mutual support, to achieve continuous improvement in the overall timing accuracy of the system. Attached Figure Description
[0020] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart of a method for automatic calibration of competition synchronization timing and video delay according to the present invention; Figure 2 This is a flowchart of the automatic starting absolute timetable generation process of a competition synchronization timing and video delay automatic calibration method and system of the present invention; Figure 3 This is a schematic diagram of the camera delay calculation time axis of a competition synchronization timing and video delay automatic calibration method and system of the present invention; Figure 4 This is a flowchart of the multiple calibration and audio-visual coordinated calibration process of a competition synchronization timing and video delay automatic calibration method and system according to the present invention. Figure 5 This is an adaptive flash recognition flowchart of a competition synchronization timing and video delay automatic calibration method and system according to the present invention.
[0021] Figure 6 This is a flowchart illustrating the key absolute time message redundancy transmission and deduplication process of a competition synchronization timing and video delay automatic calibration method and system of the present invention. Detailed Implementation
[0022] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0023] A method for automatic calibration of synchronized timing and video delay in competitions includes the following steps: Step S1: Clock synchronization: The first terminal and the second terminal calculate the clock time offset and communication round-trip delay through multiple rounds of timestamp sampling, and select the sample that meets the preset stability condition as the reference time offset; In specific embodiments, such as Figure 1 As shown, the system includes at least a first terminal and a second terminal. The first terminal is the starting point / flash terminal, and the second terminal is the ending point / recording terminal. Before timing or calibrating the competition, cross-device time synchronization is first performed.
[0024] The time synchronization process is as follows: Step S11: The first terminal sends a synchronization request to the second terminal, including the local transmission timestamp. ; Step S12: The second terminal receives the request and records the receiving timestamp. and return a response, including , and response sending timestamp ; Step S13: The first terminal receives the response and records the receiving timestamp. ; Step S14: Calculate the round-trip time: ; Step S15: Calculate the single time offset: ; Repeat steps S1-S5 to perform N samplings, where N≥10, and select... Minimum or Samples with variance below a preset threshold are used as the baseline time offset. Communication delay with reference .
[0025] Step S2: Absolute timetable scheduling: Based on the time offset and communication round-trip delay, an absolute execution timetable containing the absolute time of each future action node is generated and sent to the second terminal. The first terminal and the second terminal convert to their respective local absolute times and wait for execution independently. When each target absolute time is reached, the corresponding action is triggered. In specific embodiments, such as Figure 1-2 As shown, after obtaining the baseline time offset and baseline communication delay, an absolute execution schedule is generated: Calculate the scheduling lead time: Lead time = Baseline RTT × Safety factor + System scheduling margin. Calculate the absolute time for each node based on the competition mode, which may be automatic or manual starting mode. Automatic command mode: Countdown reminder nodes: Preparatory prompt node: Command Node: The first terminal encodes the absolute execution time schedule into a data packet and sends it to the second terminal. Both terminals then convert the absolute time of each node into their respective local absolute time: Local Time = Absolute Time + Local Time. When using the second terminal, it is necessary to follow the benchmark. Conversion.
[0026] Both ends enter a silent waiting state until the local clock reaches the corresponding target absolute time to trigger the corresponding action, which includes audio playback, UI switching, recording start, and timer start.
[0027] Step S3: Synchronous flash calibration: Under the established time reference, the first terminal generates the target flash time and lights up the screen to display the flash, and records the actual flash display time. The second terminal starts video recording around the target time. In specific embodiments, such as Figure 5 As shown, the calibration process reuses the clock reference established in step S1, specifically including: Step S31: Preparation before calibration: The first terminal, i.e., the flash end, generates a future time as the target flash time. And it is sent to the second terminal, namely the recording terminal, which then transmits the data via... Calculate the local recording window and start video recording in advance; Step S32: Before starting recording, the recording device calls the mobile terminal camera hardware interface to lock the metering focus on the screen area where the flash is expected to occur, and forcibly enables automatic exposure lock (AE-Lock) and automatic focus lock (AF-Lock) to prevent the camera ISP from automatically darkening the screen when the flash occurs. Step S33: Dual Reference Time: The flash unit illuminates the screen with a high-brightness flash at the target time and reads the underlying screen rendering completion time as the actual flash display time. Send to the recording device. The recording device prioritizes... For reference only; if not available, use in a degraded manner. .
[0028] Step S34: Flash parameter settings: Adjust the screen brightness at the flash end to the maximum value, and the flash duration is preferably 100-300ms. Pure white full-screen flash or black and white alternating flash sequence can be used.
[0029] Step S4: Video Frame Analysis and Delay Calculation: Decode the video file recorded by the second terminal, extract brightness information to detect flash frames, calculate the absolute offset time of the flash event in the video stream, and calculate the camera acquisition delay accordingly. The camera acquisition delay is calculated using the following formula: ,in, This is the actual start time of the recording. This represents the absolute offset time of the flash event within the video stream. This refers to the scaling ratio of slow motion time. For reference flash duration, This refers to the time offset between the two terminals' clocks; In specific embodiments, such as Figure 3 As shown, video decoding and brightness sampling: the video file is decoded, the Y channel, i.e. the brightness information, is extracted from the YUV data of each frame image, and the central area of the screen or the user-specified recognition area is sampled first, and the average brightness of the area is taken as the brightness value of the frame. The preset time period or preset frame number after the recording start point can be ignored to eliminate the influence of automatic exposure, automatic white balance and encoder warm-up after the camera starts; Background modeling and adaptive thresholding: Calculate the mean background brightness μ_bg, brightness variance σ_bg, and mean brightness change of adjacent frames for M frames before the flash; generate an adaptive brightness threshold based on the background state: Thresh_luma = μ_bg + k1 × σ_bg, and an adaptive change threshold: Thresh_delta = k2 × mean change of adjacent frames.
[0030] Flash frame detection and confidence scoring: Candidate frames must simultaneously meet the following conditions: the current brightness exceeds Thresh_luma, the increase in current brightness relative to the previous frame or the background average exceeds Thresh_delta, and the position of the candidate frame after conversion between the candidate frame time and the target flash time is within a preset allowable window; calculate the confidence score for the candidate flash frames, and the scoring factors include: brightness increment, peak duration in frames, target time proximity, sampling area consistency, and candidate peak uniqueness; select the candidate frame with the highest score and closest to the target time as the flash frame; if the confidence score is lower than the preset threshold, the calibration is deemed invalid and a retry is prompted.
[0031] Time calculation based on PTS and subframe interpolation: Instead of using "frame number / nominal frame rate" to estimate time, it directly extracts the underlying display timestamp of the video stream. When the first The frame did not reach the flash detection threshold, while the first frame... When the number of frames exceeds the threshold, subframe-level linear interpolation is performed: , ,in, For the first Frame brightness, For the first Frame brightness, For the first The frame displays the timestamp. For the first The frame displays the timestamp; in slow motion mode, the timestamp is restored to the physical acquisition timeline based on the metadata time base.
[0032] Camera acquisition delay calculation: reference flash time Priority If not obtained, then take Camera acquisition delay: ,in, This is the actual start time of the recording. This represents the absolute offset time of the flash event within the video stream. This refers to the scaling ratio of slow motion time. For reference flash duration, This refers to the time offset between the two terminals' clocks; When the recording is saved It is already on the local timeline of the recording device, and When converted to the local timeline on the recording end, it can be omitted or merged. item.
[0033] Step S5: Timeline Correction: Save the camera acquisition delay as a compensation parameter, and correct the video playback timeline based on the camera acquisition delay during the match video playback.
[0034] In a specific embodiment, the calculated camera acquisition delay is saved as a compensation parameter. During the replay of the competition video, the playback system calculates: Video playback offset = Competition start time - Actual recording start time + Camera acquisition delay, to achieve precise alignment between the video of crossing the finish line and the competition time.
[0035] Furthermore, it also includes a manual command unified scheduling step: when the manual command mode is adopted, the first terminal generates the future target command time based on the current time offset and communication round-trip delay, and the first terminal and the second terminal respectively convert the target command time into local absolute time and wait for execution.
[0036] In a specific embodiment, when the user adopts the manual command mode, the triggering end reads the current and future target command time: manualTargetTime = current time + scheduling lead time; both the triggering end and the peer end convert the target time into their respective local absolute time and wait for execution; during actual execution, the triggering end records the actual command time and sends it back to the peer end for secondary correction; the manual target command time message also adopts redundant transmission and deduplication mechanisms. This integrates both manual and automatic commanding into a unified absolute time scheduling system, avoiding direct contamination of manual control by network latency.
[0037] Furthermore, it also includes redundant transmission and deduplication of critical control messages: for critical control messages containing the absolute execution schedule, target command time, actual command time or calibration trigger time, the sending end encodes them into at least two identical data packets and sends them consecutively; the receiving end deduplicates them according to message type, payload content and message identifier, and only processes the first valid copy that arrives.
[0038] In specific embodiments, such as Figure 6 As shown, the following transmission guarantee mechanism is adopted for key control messages such as absolute execution schedule, target command time, actual command time, and calibration target time: The sending end serializes the same message and sends at least two data packets with the same content consecutively; each data packet carries a message type identifier, message ID, session ID, and load check code, where the message ID is generated by the sending end's timestamp + sequence number; the receiving end maintains a short-term deduplication buffer and performs deduplication judgment based on the combination of message type, message ID, and load content; the first valid copy that arrives is processed normally, and subsequent duplicate copies are discarded to avoid secondary command, secondary timing, or repeated calibration.
[0039] Furthermore, it also includes multiple calibration steps: performing multiple calibrations consecutively to obtain multiple delayed samples, removing outliers, and taking the mean, median, or weighted mean as the final delay; if the standard deviation or range of the remaining samples exceeds the threshold, a low confidence level is output and a retry is prompted.
[0040] In specific embodiments, such as Figure 4 As shown, multiple calibrations are performed consecutively to obtain multiple delayed samples. The samples are sorted, and outliers are removed by removing the maximum / minimum values or by eliminating outliers based on the absolute deviation of the median. The mean, median, or weighted mean is then used as the final camera delay. If the standard deviation or range of the remaining samples exceeds a preset threshold, a low-confidence result is output, prompting the user to recalibrate, adjust the recognition area, or improve the ambient light.
[0041] Furthermore, it also includes an audio-visual collaborative calibration step: the first terminal outputs flash and audio pulses simultaneously or at fixed intervals at the target time; the second terminal simultaneously records video and audio tracks, and detects flash frames and audio pulses respectively for cross-verification.
[0042] In specific embodiments, such as Figure 4As shown, in one enhanced implementation, the first end, the flash end, outputs a screen flash and a short audio pulse simultaneously at the target time or at fixed time intervals. The second end, the recording end, simultaneously saves the video track and the audio track. The video analysis module detects the flash frames, and the audio analysis module detects the rising edge or energy peak of the pulse in the audio waveform. The system cross-validates the camera acquisition delay, microphone acquisition delay, and audio / video encapsulation time axis deviation based on the flash time in the video track, the pulse time in the audio track, and the preset audio-visual interval. When the video detection result and the audio detection result are inconsistent, the result can be selected based on the confidence level, or the calibration can be judged as a failure.
[0043] When no flash is detected, multiple abnormal peaks are detected, ambient light is too strong, the image is overexposed, or the video file is abnormal, the system can automatically perform one or more of the following actions: increase the screen brightness at the flash end, extend the flash duration, switch to an alternating black and white flash sequence, expand or move the recognition area, increase the recording advance and end delay, re-perform time synchronization, prompt the user to point the camera at the designated area, or switch to the sound and light collaborative calibration mode. It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover 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 process, method, article, or apparatus.
[0044] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.
[0045] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A method for automatic calibration of synchronized timing and video delay in competitions, characterized in that, Includes the following steps: Step S1: Clock synchronization: The first terminal and the second terminal calculate the clock time offset and communication round-trip delay through multiple rounds of timestamp sampling, and select the sample that meets the preset stability condition as the reference time offset; Step S2: Absolute timetable scheduling: Based on the time offset and communication round-trip delay, an absolute execution timetable containing the absolute time of each future action node is generated and sent to the second terminal. The first terminal and the second terminal convert to their respective local absolute times and wait for execution independently. When each target absolute time is reached, the corresponding action is triggered. Step S3: Synchronous flash calibration: Under the established time reference, the first terminal generates the target flash time and lights up the screen to display the flash, and records the actual flash display time. The second terminal starts video recording around the target time. Step S4: Video Frame Analysis and Delay Calculation: Decode the video file recorded by the second terminal, extract brightness information to detect flash frames, calculate the absolute offset time of the flash event in the video stream, and calculate the camera acquisition delay accordingly. The camera acquisition delay is calculated using the following formula: ,in, This is the actual start time of the recording. This represents the absolute offset time of the flash event within the video stream. This refers to the scaling ratio of slow motion time. For reference flash duration, This refers to the time offset between the two terminals' clocks; Step S5: Timeline Correction: Save the camera acquisition delay as a compensation parameter, and correct the video playback timeline based on the camera acquisition delay during the match video playback.
2. The method for automatic calibration of competition synchronization timing and video delay according to claim 1, characterized in that, In step S2, the absolute execution timetable includes the absolute time corresponding to the countdown prompt node, the absolute time corresponding to the preparation prompt node, and the absolute time corresponding to the command node. The absolute time of each node is calculated based on the audio duration, the preset safety margin, and the random delay time. The triggering of corresponding actions includes audio playback, UI switching, recording start, and timing start.
3. The method for automatic calibration of competition synchronization timing and video delay according to claim 1, characterized in that, It also includes a manual command unified scheduling step: when the manual command mode is used, the first terminal generates the future target command time based on the current time offset and communication round-trip delay. The first terminal and the second terminal each convert the target command time into local absolute time and wait for execution.
4. The method for automatic calibration of competition synchronization timing and video delay according to claim 1, characterized in that, It also includes redundant transmission and deduplication of critical control messages: for critical control messages containing the absolute execution schedule, target command time, actual command time or calibration trigger time, the sending end encodes them into at least two identical data packets and sends them continuously; the receiving end deduplicates them according to message type, payload content and message identifier, and only processes the first valid copy that arrives.
5. The method for automatic calibration of competition synchronization timing and video delay according to claim 1, characterized in that, In step S3, before starting recording, the second terminal calls the camera hardware interface to lock the metering focus, enable automatic exposure lock, and enable automatic focus lock; the second terminal prioritizes the actual flash display time as a reference, and if it cannot obtain it, it degenerates to using the target flash time.
6. The method for automatic calibration of competition synchronization timing and video delay according to claim 1, characterized in that, In step S4, detecting the flash frame includes: extracting brightness information sampling from the video frame; generating an adaptive threshold based on the background brightness; identifying the rising edge of the brightness and constraining it within a preset window of the target time; scoring the candidate frames with confidence and selecting the frame with the highest score and closest to the target time as the flash frame.
7. The method for automatic calibration of competition synchronization timing and video delay according to claim 1, characterized in that, In step S4, calculating the absolute offset time of the flash event in the video stream includes: extracting the underlying display timestamp of the video stream; performing subframe-level linear interpolation calculation on adjacent frames that cross a threshold, wherein the formula for performing subframe-level linear interpolation calculation is: , ,in, The threshold for determining the flash effect. For the first Frame brightness, For the first Frame brightness, For the first The frame displays the timestamp. For the first The frame displays the timestamp; in slow motion mode, the timestamp is restored to the physical acquisition timeline based on the metadata time base.
8. The method for automatic calibration of competition synchronization timing and video delay according to claim 1, characterized in that, It also includes multiple calibration steps: multiple calibrations are performed consecutively to obtain multiple delayed samples, and after removing outliers, the mean, median or weighted mean is taken as the final delay; if the standard deviation or range of the remaining samples exceeds the threshold, a low confidence level is output and a retry is prompted.
9. The method for automatic calibration of competition synchronization timing and video delay according to claim 1, characterized in that, It also includes an audio-visual collaborative calibration step: the first terminal outputs flash and audio pulses simultaneously or at fixed intervals at the target time; the second terminal simultaneously records video and audio tracks, and detects flash frames and audio pulses respectively for cross-verification.
10. A competition synchronization timing and video delay automatic calibration system, used to implement the competition synchronization timing and video delay automatic calibration method as described in any one of claims 1-9, characterized in that, It includes a time synchronization unit, an absolute command and scheduling unit, a synchronous flash calibration unit, and a video frame analysis and delay compensation unit; The time synchronization unit is used to calculate the clock time offset and communication round-trip delay between terminals by sampling multiple timestamps. The absolute command scheduling unit is used to generate an absolute execution timetable containing the absolute time of each action node, so that both ends can execute independently according to the converted local absolute time. The synchronous flash calibration unit is used to generate a target flash time under a synchronized time reference, schedule the flash end to display the flash and record the actual display time, and start recording at the recording end; The video frame analysis and delay compensation unit is used to decode the video file, detect flash frames, calculate the camera acquisition delay, and correct the timeline of the match video playback.