A method, system, and storage medium for dynamic delay calibration of a MIPI CSI-2 link.

CN121705232BActive Publication Date: 2026-08-07SHENZHEN JOYAR TECH (GRP) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN JOYAR TECH (GRP) CO LTD
Filing Date
2025-12-16
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

首先,软件时间戳仅在数据到达处理器后记录,无法捕获链路物理层的实际传输延迟,导致测量结果缺失关键路径信息

Benefits of technology

[0014]This invention provides a dynamic latency calibration method, system, and storage medium for a MIPI CSI-2 link. It periodically acquires real-time latency values ​​of the link to form a latency sequence. First, the latest latency value in the sequence is compared with a preset latency threshold. If the threshold is not exceeded, the system is considered stable. If it is exceeded, latency trend features are further extracted and compared with a trend threshold set. If the trend features do not exceed the trend threshold, the system is considered fluctuating. If the trend features exceed the trend threshold, operational status information is collected, combined with the trend features, and input into a pre-trained matching model for pattern recognition. Based on the matching results, predictable states or unknown abnormal states are distinguished. Finally, a preset decision matrix is ​​queried based on the determined state label to generate and execute corresponding latency compensation instructions, thereby achieving closed-loop dynamic calibration. This improves the accuracy of data synchronization and environmental adaptability of multi-camera systems in complex working environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121705232B_ABST
    Figure CN121705232B_ABST
Patent Text Reader

Abstract

The application provides a kind of MIPI CSI-2 link dynamic delay calibration method, system and storage medium, by periodically obtaining link real-time delay value to form delay sequence, first, the latest delay value in sequence is compared with preset delay threshold value, if not over threshold value, it is judged as stable state;If it is over, further extract delay trend feature and compare with trend threshold set, if trend feature is not over trend threshold, it is judged as fluctuation state;If trend feature is over trend threshold, collect running state information, input pre-training matching model after it is combined with trend feature, and mode recognition is carried out, according to matching result, distinguishable predictable state or unknown abnormal state;Finally, according to the state label judged, preset decision matrix is inquired, corresponding delay compensation instruction is generated and executed, so that closed loop dynamic calibration is realized;So as to improve the accuracy of data synchronization and environmental adaptability of multi-camera system in complex working environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of MIPI CSI-2 links, and more specifically, to a dynamic delay calibration method, system, and storage medium for MIPI CSI-2 links. Background Technology

[0002] With the rapid development of advanced driver assistance systems, multi-camera mobile platforms, and industrial machine vision, the transmission delay difference of the link has always been a key technical challenge in the field of multi-camera data synchronization based on the MIPI CSI-2 protocol (the CSI-2 specification protocol for camera serial interfaces).

[0003] In existing technologies, delay calibration mainly relies on methods such as software timestamps, shared frame synchronization signals, or protocol layer parsing. These schemes have significant limitations in terms of accuracy, real-time performance, and adaptability. First, software timestamps are only recorded after the data arrives at the processor, failing to capture the actual transmission delay at the physical layer of the link, resulting in missing critical path information in the measurement results. Second, frame synchronization signals can only control the exposure start point and cannot compensate for delay differences along the entire link from sensor output to the receiver, making pixel-level synchronization difficult to achieve in multi-link systems. Third, while protocol layer parsing attempts to infer delay from data packet content, it suffers from poor real-time performance and large measurement jitter due to processor scheduling and software overhead, failing to meet the continuous calibration requirements in dynamic environments. Finally, existing methods generally employ fixed thresholds and single compensation strategies, which cannot distinguish between slight delay fluctuations, trend drifts, and sudden anomalies, and lack the ability to diagnose the correlation between environmental factors and inter-link interference, leading to decreased synchronization performance and insufficient robustness of the system under complex operating conditions. Therefore, there is an urgent need for a link delay management technology that can accurately measure delay at the physical layer in real time, intelligently identify delay patterns, and dynamically adjust calibration strategies. Summary of the Invention

[0004] In view of the above problems, the purpose of this invention is to provide a dynamic delay calibration method, system and storage medium for MIPI CSI-2 links. Through a multi-level progressive judgment process of threshold comparison, trend analysis and pattern matching, it realizes intelligent and fine classification of delay status and closed-loop dynamic compensation, thereby improving the accuracy of calibration and scenario adaptability.

[0005] Specifically: First, a sequence management method with fault tolerance mechanisms is used to effectively filter outliers and robustly maintain historical sequences. Second, by separating and calculating trend vectors and dispersion and making joint judgments, the identification of delay change patterns is achieved. Then, by matching the confidence of multidimensional features with pre-trained models, reliable identification of predictable delay changes is achieved. Finally, by establishing a precise mapping between state labels and differentiated compensation instructions, precise control and execution of predictive compensation or anomaly handling are achieved. In addition, by using statistical analysis based on historical data and adaptive threshold adjustment, the system's judgment benchmark is dynamically optimized to adapt to long-term operating conditions, maintaining the calibration system's persistent accuracy and environmental adaptability.

[0006] The first aspect of this invention provides a dynamic delay calibration method for a MIPI CSI-2 link, the method comprising: In response to a preset measurement period, the real-time delay value of the current link is obtained, and a delay sequence is obtained; Determine whether the first delay information of the delay sequence is less than a preset delay threshold; If so, output the stable state label; If not, then the delay trend features of the delay sequence are extracted according to the preset feature analysis algorithm; Determine whether the delay trend feature is less than a preset trend threshold set; If so, output the fluctuation state label; If not, the running status information is collected, and after combining the delay trend features, it is input into the pre-trained matching model to obtain the matching result; Based on the matching results, output a predictable state label or an unknown abnormal state label; Based on the status label and a preset decision matrix, delay compensation instructions are generated and executed.

[0007] In this solution, obtaining the real-time delay value of the current link to obtain the delay sequence specifically includes: The baseline range is calculated based on the elements in the delay element queue of a preset length; If the real-time delay value is not within the baseline range, then the abnormal element flag is set; The real-time delay value is added as a new element to the end of the delay element queue in chronological order; If the queue of delayed elements is full, the old element at the head of the queue is deleted first. The tail element of the delay element queue is the first delay information.

[0008] In this solution, the step of extracting the delay trend features of the delay sequence according to a preset feature analysis algorithm further includes: Based on the delay sequence, a trend vector is calculated, wherein the trend vector includes the direction and rate of change of the delay value; Determine whether the trend vector is less than the vector threshold of the trend threshold set; If not, a preliminary abnormal status label is generated; If so, the degree of dispersion value is calculated based on the delay sequence; Determine whether the dispersion value is less than the dispersion threshold of the trend threshold set; If so, then generate the fluctuation state label; If not, a preliminary abnormal status label is generated.

[0009] In this scheme, the collection of operational status information, combined with the delay trend features, and inputted into a pre-trained matching model to obtain the matching result specifically includes: Based on the delay trend characteristics and the operating status information, a multidimensional feature vector is obtained through a preset combination and standardization process. The multidimensional feature vector is input into the pre-trained matching model; Based on the set of known change patterns stored internally in the matching model, the matching degree between the multidimensional feature vector and each known change pattern is calculated; The highest matching degree is selected and compared with the preset confidence threshold; If the highest matching degree exceeds the confidence threshold, the match is determined to be successful, and the predictable state label is output. If the highest matching degree does not exceed the confidence threshold, then the unknown abnormal state label is output.

[0010] In this scheme, the step of generating and executing delay compensation instructions based on the status label and a preset decision matrix specifically includes: When the state label is stable, maintenance instructions are generated and executed to maintain the read / write sequence of the data buffer. When the status is fluctuating, fine-tuning instructions are generated and executed to progressively adjust the read and write pointers of the data buffer. When the status label is predictable, the preset compensation table is queried based on the running status information, and a predictive compensation instruction is generated and executed to apply a predictive offset to the data buffer. When the status is an unknown exception, an exception handling instruction is generated and executed to reset the data buffer and trigger an alarm.

[0011] This plan also includes: Based on a preset correction period, historical operating data is acquired, including historical delay sequences and their corresponding operating status information; Based on the historical operating data, and according to the preset analysis model, the statistical distribution characteristics of delay within different operating state information intervals are obtained; Based on the statistical distribution characteristics, calculate and generate the adjustment offset for the delay threshold and / or the trend threshold set; Based on the adjusted offset, update the delay threshold and / or the trend threshold set used in the next measurement period.

[0012] A second aspect of the present invention provides a dynamic delay calibration system for a MIPI CSI-2 link, including a dynamic delay calibration method program for a MIPI CSI-2 link. When the dynamic delay calibration method program for the MIPI CSI-2 link is executed by the processor, it performs the following steps: In response to a preset measurement period, the real-time delay value of the current link is obtained, and a delay sequence is obtained; Determine whether the first delay information of the delay sequence is less than a preset delay threshold; If so, output the stable state label; If not, then the delay trend features of the delay sequence are extracted according to the preset feature analysis algorithm; Determine whether the delay trend feature is less than a preset trend threshold set; If so, output the fluctuation state label; If not, the running status information is collected, and after combining the delay trend features, it is input into the pre-trained matching model to obtain the matching result; Based on the matching results, output a predictable state label or an unknown abnormal state label; Based on the status label and a preset decision matrix, delay compensation instructions are generated and executed.

[0013] A third aspect of the present invention provides a computer-readable storage medium comprising a dynamic delay calibration method program for a MIPI CSI-2 link, wherein when the dynamic delay calibration method program for a MIPI CSI-2 link is executed by a processor, the dynamic delay calibration method program for a MIPI CSI-2 link as described in any of the preceding claims implements the steps of the dynamic delay calibration method for a MIPI CSI-2 link.

[0014] This invention provides a dynamic latency calibration method, system, and storage medium for a MIPI CSI-2 link. It periodically acquires real-time latency values ​​of the link to form a latency sequence. First, the latest latency value in the sequence is compared with a preset latency threshold. If the threshold is not exceeded, the system is considered stable. If it is exceeded, latency trend features are further extracted and compared with a trend threshold set. If the trend features do not exceed the trend threshold, the system is considered fluctuating. If the trend features exceed the trend threshold, operational status information is collected, combined with the trend features, and input into a pre-trained matching model for pattern recognition. Based on the matching results, predictable states or unknown abnormal states are distinguished. Finally, a preset decision matrix is ​​queried based on the determined state label to generate and execute corresponding latency compensation instructions, thereby achieving closed-loop dynamic calibration. This improves the accuracy of data synchronization and environmental adaptability of multi-camera systems in complex working environments. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope.

[0016] Figure 1 A flowchart of a dynamic delay calibration method for a MIPI CSI-2 link according to the present invention is shown; Figure 2 A flowchart illustrating the generation and preprocessing of a delayed sequence according to an embodiment of the present invention is shown; Figure 3 This diagram illustrates a flowchart of a delayed trend feature extraction and comparison method provided by an embodiment of the present invention. Figure 4 A block diagram of a dynamic delay calibration system for a MIPI CSI-2 link according to the present invention is shown. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Unless otherwise defined, all terms (including technical and scientific terms) used in embodiments of this invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in a common dictionary shall be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as being interpreted in an idealized or highly formalized sense, unless expressly defined in this embodiment of the invention.

[0019] The terms "first," "second," and similar words used in the embodiments of this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "an," "a," or "the" do not indicate a quantity limitation, but rather indicate the presence of at least one. Similarly, terms such as "including" or "comprising" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The steps preceding or following the steps in the method of the embodiments of this invention are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.

[0020] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0021] Figure 1 A flowchart of a dynamic delay calibration method for a MIPI CSI-2 link according to the present invention is shown.

[0022] like Figure 1 As shown, the first aspect of this invention discloses a dynamic delay calibration method for a MIPI CSI-2 link, the method comprising: S102, in response to the preset measurement period, obtain the real-time delay value of the current link and obtain the delay sequence; S104, determine whether the first delay information of the delay sequence is less than a preset delay threshold; S106, if so, output the stable state label; S108, if not, then extract the delay trend features of the delay sequence according to the preset feature analysis algorithm; S110, determine whether the delay trend feature is less than a preset trend threshold set; S112, if so, output the fluctuation state label; S114, If not, collect the running status information, combine the delay trend features, and input them into the pre-trained matching model to obtain the matching result; S116, Based on the matching result, output a predictable state label or an unknown abnormal state label; S118 generates and executes delay compensation instructions based on the status label and a preset decision matrix.

[0023] The first delay information is the latest real-time delay value in the delay sequence; the operating status information includes at least chip temperature, power supply voltage, and data transmission load rate.

[0024] It should be noted that in this embodiment, firstly, in response to a preset periodic measurement trigger, the calibration system obtains the real-time latency value of the current link from the latency calculation module and organizes the latency values ​​of multiple consecutive periods into a latency sequence in chronological order. Then, the latest latency value in the latency sequence is extracted as the first latency information and compared with a preset latency threshold. If the first latency information does not exceed the latency threshold, a stable state label is directly output, indicating that the link is in a normal state. If the first latency information exceeds the latency threshold, the system enters the trend analysis stage. A preset feature analysis algorithm extracts latency trend features reflecting the direction and rate of latency change from the latency sequence, and then compares these features with a preset trend threshold set. If the latency trend features do not exceed the trend threshold set, a fluctuation state label is output, indicating that the latency only fluctuates slightly. If the latency trend features exceed the trend threshold set, further operational status information, including chip temperature, power supply voltage, and data transmission load rate, is collected, combined with the latency trend features, and input into a pre-trained matching model for pattern matching. Based on the matching result, a predictable state label or an unknown abnormal state label is output. Finally, the calibration system queries a preset decision matrix based on the obtained status labels, generates corresponding delay compensation instructions, and executes them, thereby achieving dynamic closed-loop calibration of link delay. This embodiment, through a multi-level progressive judgment mechanism, can intelligently distinguish different natures and causes of delay and adaptively select the most suitable compensation strategy, thereby improving the accuracy and stability of data synchronization in multi-camera systems in changing real-world working environments.

[0025] Figure 2 A flowchart illustrating the generation and preprocessing of a delayed sequence according to an embodiment of the present invention is shown.

[0026] According to embodiments of the present invention, such as Figure 2 As shown, obtaining the real-time delay value of the current link and obtaining the delay sequence specifically includes: S202, calculate the baseline range based on the elements in the delayed element queue of a preset length; S204, If the real-time delay value is not within the baseline range, then set the abnormal element flag bit; S206, The real-time delay value is added as a new element to the end of the delay element queue in chronological order; S208, if the delayed element queue is full, first delete the old element located at the head of the queue; The tail element of the delay element queue is the first delay information.

[0027] It should be noted that in this embodiment, a pre-defined fixed-length first-in-first-out (FIFO) queue is used as the delay element queue. After each real-time delay value is acquired, a dynamic baseline range (e.g., based on historical mean and variance) is first calculated based on the elements already in the queue. Then, it is determined whether the newly acquired real-time delay value falls within this baseline range. If it exceeds this range, an abnormal element flag is set for it; this flag can be used for subsequent analysis but the value is not immediately discarded. Then, regardless of whether it is abnormal, the real-time delay value is added as a new element to the tail of the queue in chronological order. If the queue is full before addition, the old element at the head of the queue is removed to maintain a constant queue length. This embodiment effectively filters out the interference of occasional measurement outliers on sequence quality through baseline range pre-screening and anomaly flag mechanisms, improving the anti-interference capability of the entire calibration system.

[0028] Figure 3 The diagram illustrates a flowchart of a delayed trend feature extraction and comparison method provided by an embodiment of the present invention.

[0029] According to embodiments of the present invention, such as Figure 3 As shown, the step of extracting the delay trend features of the delay sequence according to a preset feature analysis algorithm further includes: S302, a trend vector is calculated based on the delay sequence, wherein the trend vector includes the direction and rate of change of the delay value; S304, Determine whether the trend vector is less than the vector threshold of the trend threshold set; S306, if not, generate a preliminary abnormal status label; S308, if so, then the dispersion value is calculated based on the delay sequence; S310, determine whether the dispersion value is less than the dispersion threshold of the trend threshold set; S312, if so, then generate the fluctuation state label; S314, if not, generate a preliminary abnormal status label.

[0030] It should be noted that in this embodiment, after obtaining the delay sequence, a trend vector is first calculated. This trend vector is obtained by analyzing the changing relationship of continuous delay values ​​in the sequence, and its components include at least the average direction and average rate of delay change. Subsequently, the trend vector is compared with a preset vector threshold in the trend threshold set. If the intensity of change represented by the trend vector exceeds the threshold, a preliminary abnormal state label is generated. If it does not exceed the threshold, the dispersion value of the delay sequence is further calculated, where the dispersion value reflects the fluctuation amplitude of the delay value around its trend line. Next, the dispersion value is compared with a preset dispersion threshold in the trend threshold set. If the dispersion value does not exceed the dispersion threshold, it indicates that the delay change has a trend but the fluctuation is controllable, thus generating a fluctuation state label. If it exceeds the threshold, it indicates that the fluctuation is abnormally violent, generating a preliminary abnormal state label. This embodiment, by separating and jointly judging "change trend" and "fluctuation dispersion," more finely distinguishes the abnormal forms of delay (slow drift, regular fluctuation, and disorderly violent jumps, etc.), thereby enhancing the identification accuracy of complex delay behaviors.

[0031] According to an embodiment of the present invention, the step of collecting the running status information, combining the delay trend features, and inputting it into a pre-trained matching model to obtain the matching result specifically includes: Based on the delay trend characteristics and the operating status information, a multidimensional feature vector is obtained through a preset combination and standardization process. The multidimensional feature vector is input into the pre-trained matching model; Based on the set of known change patterns stored internally in the matching model, the matching degree between the multidimensional feature vector and each known change pattern is calculated; The highest matching degree is selected and compared with the preset confidence threshold; If the highest matching degree exceeds the confidence threshold, the match is determined to be successful, and the predictable state label is output. If the highest matching degree does not exceed the confidence threshold, then the unknown abnormal state label is output.

[0032] It should be noted that in this embodiment, the collected delay trend features are first combined with multiple operational status information, and then standardized to eliminate dimensional differences, forming a structured multidimensional feature vector. This multidimensional feature vector is then input into a pre-trained matching model, which internally stores various known change patterns defined by historical data learning or expert knowledge, such as "temperature rise leads to linear delay increase" and "voltage drop leads to step delay." The matching model uses an internal algorithm to calculate the matching degree between the input multidimensional feature vector and each known change pattern. The highest matching degree is then selected and compared with a preset confidence threshold. If the highest matching degree exceeds the confidence threshold, the current delay change is determined to be highly consistent with a known pattern, a predictable state label is output, and the specific pattern identifier can be used to guide compensation. If the confidence threshold is not exceeded, the current change is determined to be inexplicable by a known pattern, and an unknown abnormal state label is output. This embodiment, through a confidence-based quantitative matching mechanism, more reliably identifies delay changes caused by known environmental factors, thereby enabling accurate predictive compensation.

[0033] According to an embodiment of the present invention, the step of generating and executing a delay compensation instruction based on a preset decision matrix according to a status label specifically includes: When the state label is stable, maintenance instructions are generated and executed to maintain the read / write sequence of the data buffer. When the status is fluctuating, fine-tuning instructions are generated and executed to progressively adjust the read and write pointers of the data buffer. When the status label is predictable, the preset compensation table is queried based on the running status information, and a predictive compensation instruction is generated and executed to apply a predictive offset to the data buffer. When the status is an unknown exception, an exception handling instruction is generated and executed to reset the data buffer and trigger an alarm.

[0034] It should be noted that in this embodiment, when the tag is in a stable state, the calibration system generates and issues a maintenance instruction to the data buffer control unit to maintain the current read / write timing and buffer depth unchanged. When the tag is in a fluctuating state, the calibration system generates a fine-tuning instruction to guide the buffer controller to make one or more small, gradual offset adjustments to the read / write pointers to smoothly absorb latency fluctuations. When the tag is in a predictable state, the calibration system combines the current specific operating status information (such as temperature value) with a preset compensation table to generate a predictive compensation instruction containing a specific offset, applying a pre-correction to the data buffer that matches the predictive model. When the tag is in an unknown abnormal state, the calibration system generates and executes an anomaly handling instruction sequence, which typically includes resetting the data buffer to its initial state and sending an alarm signal to the upper-level system. This embodiment achieves accurate implementation of the calibration strategy, ensuring that the most appropriate compensation action can be taken under various latency scenarios.

[0035] According to an embodiment of the present invention, it further includes: Based on a preset correction period, historical operating data is acquired, including historical delay sequences and their corresponding operating status information; Based on the historical operating data, and according to the preset analysis model, the statistical distribution characteristics of delay within different operating state information intervals are obtained; Based on the statistical distribution characteristics, calculate and generate the adjustment offset for the delay threshold and / or the trend threshold set; Based on the adjusted offset, update the delay threshold and / or the trend threshold set used in the next measurement period.

[0036] It should be noted that in this embodiment, a historical operating dataset containing historical delay sequences and their corresponding operating status information is collected based on a preset long calibration period. Subsequently, according to a preset analysis model (e.g., grouped by temperature range or voltage range), statistical analysis is performed on the dataset to obtain the statistical distribution characteristics of delay values ​​within different operating status ranges (e.g., mean, standard deviation, extreme value range). Next, based on these updated statistical distribution characteristics and combined with the calibration target (e.g., aiming to cover 95% of fluctuations), the adjustment offset for each threshold in the currently used delay threshold and trend threshold set is calculated. Finally, before the start of the next measurement cycle, the original thresholds are updated using the calculated adjustment offset. This embodiment is dynamically optimized based on long-term factors such as equipment aging and changes in environmental adaptability, avoiding misjudgments that may occur due to operating condition drift caused by fixed thresholds, thereby ensuring the accuracy and adaptability of the calibration system.

[0037] It is worth mentioning that, when applied in multi-link scenarios, it also includes: When any link outputs the unknown abnormal status label, obtain the status labels and delay trend characteristics of other parallel links; Compare and analyze the differences in the operational status information and latency trend characteristics between abnormal links and normal links; Based on the differences, determine whether the unknown anomaly matches multi-link interference; If so, the delay compensation instruction for the abnormal link will be corrected based on the preset global coordination rules.

[0038] It should be noted that in this embodiment, when any link in the calibration system is determined to be in an unknown abnormal state, the real-time status tags and delay trend characteristics of all other parallel links are immediately acquired. Subsequently, the calibration system compares and analyzes the differences between the abnormal link and the normal link in key operating status information and delay change patterns. Key operating status information includes, but is not limited to, shared power supply voltage and ambient temperature. If the analysis finds that the abnormal link's performance is significantly different from other links, it is determined to be a link-specific fault. If multiple links simultaneously exhibit similar deteriorating trend characteristics accompanied by common status information changes, the anomaly is determined to likely originate from multi-link interference or common system-level factors, such as power supply noise. Based on this collaborative diagnostic conclusion, if interference is determined, the delay compensation command initially generated only for a single link is corrected according to preset global coordination rules, including alternating link phase adjustments and bandwidth reallocation. This embodiment improves the diagnostic capability for complex anomaly root causes by utilizing the correlation information of multiple links for cross-validation, and can implement better coordinated compensation from a global perspective, enhancing the overall stability and synergy of the multi-link system.

[0039] It is worth mentioning that it also includes: When the state label is predictable; Based on the operational status information, analyze and extract the vector of the state change trend. Based on the operating status information and the status change trend vector, and using a pre-trained prediction model, the delay change after at least one measurement period is obtained. Based on the aforementioned delay change, a pre-compensation instruction is generated; After executing the delay compensation instruction, the pre-compensation instruction is executed.

[0040] It should be noted that in this embodiment, after determining that the current state is a predictable label, the changing trend of the operating state information itself is further analyzed, such as whether the temperature continues to rise or tends to stabilize, and a state change trend vector is extracted. Subsequently, the current operating state information and its changing trend vector are input into a pre-trained lightweight prediction model based on time series analysis. The prediction model outputs an estimated value of the delay change after at least one measurement cycle. Then, based on this estimated delay change, one or more pre-compensation instructions arranged in chronological order are generated. These pre-compensation instructions will be stored in a queue after the immediate compensation instruction for the current delay is executed, and will be automatically triggered to execute when the corresponding future measurement cycle arrives. This embodiment applies correction in advance before the delay change actually affects data synchronization, thereby reducing synchronization error and improving the ability to suppress predictable delay changes.

[0041] Figure 4 A block diagram of a dynamic delay calibration system for a MIPI CSI-2 link according to the present invention is shown.

[0042] like Figure 4 As shown, a second aspect of the present invention discloses a dynamic delay calibration system 4 for a MIPI CSI-2 link, including a memory 41 and a processor 42. The memory includes a dynamic delay calibration method program for a MIPI CSI-2 link. When the processor executes the dynamic delay calibration method program for the MIPI CSI-2 link, it performs the following steps: In response to a preset measurement period, the real-time delay value of the current link is obtained, and a delay sequence is obtained; Determine whether the first delay information of the delay sequence is less than a preset delay threshold; If so, output the stable state label; If not, then the delay trend features of the delay sequence are extracted according to the preset feature analysis algorithm; Determine whether the delay trend feature is less than a preset trend threshold set; If so, output the fluctuation state label; If not, the running status information is collected, and after combining the delay trend features, it is input into the pre-trained matching model to obtain the matching result; Based on the matching results, output a predictable state label or an unknown abnormal state label; Based on the status label and a preset decision matrix, delay compensation instructions are generated and executed.

[0043] The first delay information is the latest real-time delay value in the delay sequence; the operating status information includes at least chip temperature, power supply voltage, and data transmission load rate.

[0044] It should be noted that in this embodiment, firstly, in response to a preset periodic measurement trigger, the calibration system obtains the real-time latency value of the current link from the latency calculation module and organizes the latency values ​​of multiple consecutive periods into a latency sequence in chronological order. Then, the latest latency value in the latency sequence is extracted as the first latency information and compared with a preset latency threshold. If the first latency information does not exceed the latency threshold, a stable state label is directly output, indicating that the link is in a normal state. If the first latency information exceeds the latency threshold, the system enters the trend analysis stage. A preset feature analysis algorithm extracts latency trend features reflecting the direction and rate of latency change from the latency sequence, and then compares these features with a preset trend threshold set. If the latency trend features do not exceed the trend threshold set, a fluctuation state label is output, indicating that the latency only fluctuates slightly. If the latency trend features exceed the trend threshold set, further operational status information, including chip temperature, power supply voltage, and data transmission load rate, is collected, combined with the latency trend features, and input into a pre-trained matching model for pattern matching. Based on the matching result, a predictable state label or an unknown abnormal state label is output. Finally, the calibration system queries a preset decision matrix based on the obtained status labels, generates corresponding delay compensation instructions, and executes them, thereby achieving dynamic closed-loop calibration of link delay. This embodiment, through a multi-level progressive judgment mechanism, can intelligently distinguish different natures and causes of delay and adaptively select the most suitable compensation strategy, thereby improving the accuracy and stability of data synchronization in multi-camera systems in changing real-world working environments.

[0045] According to an embodiment of the present invention, obtaining the real-time delay value of the current link to obtain the delay sequence specifically includes: The baseline range is calculated based on the elements in the delay element queue of a preset length; If the real-time delay value is not within the baseline range, then the abnormal element flag is set; The real-time delay value is added as a new element to the end of the delay element queue in chronological order; If the queue of delayed elements is full, the old element at the head of the queue is deleted first. The tail element of the delay element queue is the first delay information.

[0046] It should be noted that in this embodiment, a pre-defined fixed-length first-in-first-out (FIFO) queue is used as the delay element queue. After each real-time delay value is acquired, a dynamic baseline range (e.g., based on historical mean and variance) is first calculated based on the elements already in the queue. Then, it is determined whether the newly acquired real-time delay value falls within this baseline range. If it exceeds this range, an abnormal element flag is set for it; this flag can be used for subsequent analysis but the value is not immediately discarded. Then, regardless of whether it is abnormal, the real-time delay value is added as a new element to the tail of the queue in chronological order. If the queue is full before addition, the old element at the head of the queue is removed to maintain a constant queue length. This embodiment effectively filters out the interference of occasional measurement outliers on sequence quality through baseline range pre-screening and anomaly flag mechanisms, improving the anti-interference capability of the entire calibration system.

[0047] According to an embodiment of the present invention, the step of extracting the delay trend features of the delay sequence according to a preset feature analysis algorithm further includes: Based on the delay sequence, a trend vector is calculated, wherein the trend vector includes the direction and rate of change of the delay value; Determine whether the trend vector is less than the vector threshold of the trend threshold set; If not, a preliminary abnormal status label is generated; If so, the degree of dispersion value is calculated based on the delay sequence; Determine whether the dispersion value is less than the dispersion threshold of the trend threshold set; If so, then generate the fluctuation state label; If not, a preliminary abnormal status label is generated.

[0048] It should be noted that in this embodiment, after obtaining the delay sequence, a trend vector is first calculated. This trend vector is obtained by analyzing the changing relationship of continuous delay values ​​in the sequence, and its components include at least the average direction and average rate of delay change. Subsequently, the trend vector is compared with a preset vector threshold in the trend threshold set. If the intensity of change represented by the trend vector exceeds the threshold, a preliminary abnormal state label is generated. If it does not exceed the threshold, the dispersion value of the delay sequence is further calculated, where the dispersion value reflects the fluctuation amplitude of the delay value around its trend line. Next, the dispersion value is compared with a preset dispersion threshold in the trend threshold set. If the dispersion value does not exceed the dispersion threshold, it indicates that the delay change has a trend but the fluctuation is controllable, thus generating a fluctuation state label. If it exceeds the threshold, it indicates that the fluctuation is abnormally violent, generating a preliminary abnormal state label. This embodiment, by separating and jointly judging "change trend" and "fluctuation dispersion," more finely distinguishes the abnormal forms of delay (slow drift, regular fluctuation, and disorderly violent jumps, etc.), thereby enhancing the identification accuracy of complex delay behaviors.

[0049] According to an embodiment of the present invention, the step of collecting the running status information, combining the delay trend features, and inputting it into a pre-trained matching model to obtain the matching result specifically includes: Based on the delay trend characteristics and the operating status information, a multidimensional feature vector is obtained through a preset combination and standardization process. The multidimensional feature vector is input into the pre-trained matching model; Based on the set of known change patterns stored internally in the matching model, the matching degree between the multidimensional feature vector and each known change pattern is calculated; The highest matching degree is selected and compared with the preset confidence threshold; If the highest matching degree exceeds the confidence threshold, the match is determined to be successful, and the predictable state label is output. If the highest matching degree does not exceed the confidence threshold, then the unknown abnormal state label is output.

[0050] It should be noted that in this embodiment, the collected delay trend features are first combined with multiple operational status information, and then standardized to eliminate dimensional differences, forming a structured multidimensional feature vector. This multidimensional feature vector is then input into a pre-trained matching model, which internally stores various known change patterns defined by historical data learning or expert knowledge, such as "temperature rise leads to linear delay increase" and "voltage drop leads to step delay." The matching model uses an internal algorithm to calculate the matching degree between the input multidimensional feature vector and each known change pattern. The highest matching degree is then selected and compared with a preset confidence threshold. If the highest matching degree exceeds the confidence threshold, the current delay change is determined to be highly consistent with a known pattern, a predictable state label is output, and the specific pattern identifier can be used to guide compensation. If the confidence threshold is not exceeded, the current change is determined to be inexplicable by a known pattern, and an unknown abnormal state label is output. This embodiment, through a confidence-based quantitative matching mechanism, more reliably identifies delay changes caused by known environmental factors, thereby enabling accurate predictive compensation.

[0051] According to an embodiment of the present invention, the step of generating and executing a delay compensation instruction based on a preset decision matrix according to a status label specifically includes: When the state label is stable, maintenance instructions are generated and executed to maintain the read / write sequence of the data buffer. When the status is fluctuating, fine-tuning instructions are generated and executed to progressively adjust the read and write pointers of the data buffer. When the status label is predictable, the preset compensation table is queried based on the running status information, and a predictive compensation instruction is generated and executed to apply a predictive offset to the data buffer. When the status is an unknown exception, an exception handling instruction is generated and executed to reset the data buffer and trigger an alarm.

[0052] It should be noted that in this embodiment, when the tag is in a stable state, the calibration system generates and issues a maintenance instruction to the data buffer control unit to maintain the current read / write timing and buffer depth unchanged. When the tag is in a fluctuating state, the calibration system generates a fine-tuning instruction to guide the buffer controller to make one or more small, gradual offset adjustments to the read / write pointers to smoothly absorb latency fluctuations. When the tag is in a predictable state, the calibration system combines the current specific operating status information (such as temperature value) with a preset compensation table to generate a predictive compensation instruction containing a specific offset, applying a pre-correction to the data buffer that matches the predictive model. When the tag is in an unknown abnormal state, the calibration system generates and executes an anomaly handling instruction sequence, which typically includes resetting the data buffer to its initial state and sending an alarm signal to the upper-level system. This embodiment achieves accurate implementation of the calibration strategy, ensuring that the most appropriate compensation action can be taken under various latency scenarios.

[0053] According to an embodiment of the present invention, it further includes: Based on a preset correction period, historical operating data is acquired, including historical delay sequences and their corresponding operating status information; Based on the historical operating data, and according to the preset analysis model, the statistical distribution characteristics of delay within different operating state information intervals are obtained; Based on the statistical distribution characteristics, calculate and generate the adjustment offset for the delay threshold and / or the trend threshold set; Based on the adjusted offset, update the delay threshold and / or the trend threshold set used in the next measurement period.

[0054] It should be noted that in this embodiment, a historical operating dataset containing historical delay sequences and their corresponding operating status information is collected based on a preset long calibration period. Subsequently, according to a preset analysis model (e.g., grouped by temperature range or voltage range), statistical analysis is performed on the dataset to obtain the statistical distribution characteristics of delay values ​​within different operating status ranges (e.g., mean, standard deviation, extreme value range). Next, based on these updated statistical distribution characteristics and combined with the calibration target (e.g., aiming to cover 95% of fluctuations), the adjustment offset for each threshold in the currently used delay threshold and trend threshold set is calculated. Finally, before the start of the next measurement cycle, the original thresholds are updated using the calculated adjustment offset. This embodiment is dynamically optimized based on long-term factors such as equipment aging and changes in environmental adaptability, avoiding misjudgments that may occur due to operating condition drift caused by fixed thresholds, thereby ensuring the accuracy and adaptability of the calibration system.

[0055] It is worth mentioning that, when applied in multi-link scenarios, it also includes: When any link outputs the unknown abnormal status label, obtain the status labels and delay trend characteristics of other parallel links; Compare and analyze the differences in the operational status information and latency trend characteristics between abnormal links and normal links; Based on the differences, determine whether the unknown anomaly matches multi-link interference; If so, the delay compensation instruction for the abnormal link will be corrected based on the preset global coordination rules.

[0056] It should be noted that in this embodiment, when any link in the calibration system is determined to be in an unknown abnormal state, the real-time status tags and delay trend characteristics of all other parallel links are immediately acquired. Subsequently, the calibration system compares and analyzes the differences between the abnormal link and the normal link in key operating status information and delay change patterns. Key operating status information includes, but is not limited to, shared power supply voltage and ambient temperature. If the analysis finds that the abnormal link's performance is significantly different from other links, it is determined to be a link-specific fault. If multiple links simultaneously exhibit similar deteriorating trend characteristics accompanied by common status information changes, the anomaly is determined to likely originate from multi-link interference or common system-level factors, such as power supply noise. Based on this collaborative diagnostic conclusion, if interference is determined, the delay compensation command initially generated only for a single link is corrected according to preset global coordination rules, including alternating link phase adjustments and bandwidth reallocation. This embodiment improves the diagnostic capability for complex anomaly root causes by utilizing the correlation information of multiple links for cross-validation, and can implement better coordinated compensation from a global perspective, enhancing the overall stability and synergy of the multi-link system.

[0057] It is worth mentioning that it also includes: When the state label is predictable; Based on the operational status information, analyze and extract the vector of the state change trend. Based on the operating status information and the status change trend vector, and using a pre-trained prediction model, the delay change after at least one measurement period is obtained. Based on the aforementioned delay change, a pre-compensation instruction is generated; After executing the delay compensation instruction, the pre-compensation instruction is executed.

[0058] It should be noted that in this embodiment, after determining that the current state is a predictable label, the changing trend of the operating state information itself is further analyzed, such as whether the temperature continues to rise or tends to stabilize, and a state change trend vector is extracted. Subsequently, the current operating state information and its changing trend vector are input into a pre-trained lightweight prediction model based on time series analysis. The prediction model outputs an estimated value of the delay change after at least one measurement cycle. Then, based on this estimated delay change, one or more pre-compensation instructions arranged in chronological order are generated. These pre-compensation instructions will be stored in a queue after the immediate compensation instruction for the current delay is executed, and will be automatically triggered to execute when the corresponding future measurement cycle arrives. This embodiment applies correction in advance before the delay change actually affects data synchronization, thereby reducing synchronization error and improving the ability to suppress predictable delay changes.

[0059] A third aspect of the present invention provides a computer-readable storage medium comprising a dynamic delay calibration method program for a MIPI CSI-2 link, wherein when the dynamic delay calibration method program for a MIPI CSI-2 link is executed by a processor, the dynamic delay calibration method program for a MIPI CSI-2 link as described in any of the preceding claims implements the steps of the dynamic delay calibration method for a MIPI CSI-2 link.

[0060] In summary, this invention provides a dynamic latency calibration method, system, and storage medium for MIPI CSI-2 links. It periodically acquires real-time latency values ​​of the link to form a latency sequence. First, the latest latency value in the sequence is compared with a preset latency threshold. If the threshold is not exceeded, the system is considered stable. If it is exceeded, latency trend features are further extracted and compared with a trend threshold set. If the trend features do not exceed the trend threshold, the system is considered fluctuating. If the trend features exceed the trend threshold, operational status information is collected, combined with the trend features, and input into a pre-trained matching model for pattern recognition. Based on the matching results, predictable states or unknown abnormal states are distinguished. Finally, a preset decision matrix is ​​queried based on the determined state label to generate and execute corresponding latency compensation instructions, thereby achieving closed-loop dynamic calibration. This improves the accuracy and environmental adaptability of data synchronization in multi-camera systems operating in complex environments.

[0061] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0062] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A dynamic delay calibration method for a MIPI CSI-2 link, characterized in that, The method includes: In response to a preset measurement period, the real-time delay value of the current link is obtained, and a delay sequence is obtained; Determine whether the first delay information of the delay sequence is less than a preset delay threshold; If so, output the stable state label; If not, then the delay trend features of the delay sequence are extracted according to the preset feature analysis algorithm; Determine whether the delay trend feature is less than a preset trend threshold set; If so, output the fluctuation state label; If not, the running status information is collected, and after combining the delay trend features, it is input into a pre-trained matching model to obtain the matching result. Specifically, this includes: obtaining a multi-dimensional feature vector based on the delay trend features and the running status information according to a preset combination and standardization process; inputting the multi-dimensional feature vector into the pre-trained matching model; calculating the matching degree between the multi-dimensional feature vector and each known change pattern based on the set of known change patterns stored internally in the matching model; selecting the highest matching degree and comparing it with a preset confidence threshold; if the highest matching degree exceeds the confidence threshold, it is determined that the match is successful and a predictable state label is output; if the highest matching degree does not exceed the confidence threshold, an unknown abnormal state label is output. Based on the status label and a preset decision matrix, delay compensation instructions are generated and executed. Specifically, these include: when the status label is stable, maintenance instructions are generated and executed to maintain the read / write timing of the data buffer; when the status label is fluctuating, fine-tuning instructions are generated and executed to progressively adjust the read / write pointers of the data buffer; when the status label is predictable, a preset compensation table is queried based on the running status information to generate and execute predictive compensation instructions to apply a predictive offset to the data buffer; and when the status label is unknown and abnormal, an exception handling instruction is generated and executed to reset the data buffer and trigger an alarm.

2. The dynamic delay calibration method for a MIPI CSI-2 link according to claim 1, characterized in that, The step of obtaining the real-time delay value of the current link and obtaining the delay sequence specifically includes: The baseline range is calculated based on the elements in the delay element queue of a preset length; If the real-time delay value is not within the baseline range, then the abnormal element flag is set; The real-time delay value is added as a new element to the end of the delay element queue in chronological order; If the delayed element queue is full, the old element at the head of the delayed element queue is deleted first. The tail element of the delay element queue is the first delay information.

3. The dynamic delay calibration method for a MIPI CSI-2 link according to claim 1, characterized in that, The step of extracting the delay trend features of the delay sequence according to a preset feature analysis algorithm further includes: Based on the delay sequence, a trend vector is calculated, wherein the trend vector includes the direction and rate of change of the delay value; Determine whether the trend vector is less than the vector threshold of the trend threshold set; If not, a preliminary abnormal status label is generated; If so, the degree of dispersion value is calculated based on the delay sequence; Determine whether the dispersion value is less than the dispersion threshold of the trend threshold set; If so, then generate the fluctuation state label; If not, a preliminary abnormal status label is generated.

4. A dynamic delay calibration method for a MIPI CSI-2 link according to claim 1, characterized in that, Also includes: Based on a preset correction period, historical operating data is acquired, including historical delay sequences and their corresponding operating status information; Based on the historical operating data, and according to the preset analysis model, the statistical distribution characteristics of delay within different operating state information intervals are obtained; Based on the statistical distribution characteristics, calculate and generate the adjustment offset for the delay threshold and / or the trend threshold set; Based on the adjusted offset, update the delay threshold and / or the trend threshold set used in the next measurement cycle.

5. A dynamic delay calibration system for a MIPI CSI-2 link, characterized in that, The system includes a memory and a processor. The memory includes a dynamic delay calibration method program for a MIPI CSI-2 link. When the processor executes the dynamic delay calibration method program for the MIPI CSI-2 link, it performs the following steps: In response to a preset measurement period, the real-time delay value of the current link is obtained, and a delay sequence is obtained; Determine whether the first delay information of the delay sequence is less than a preset delay threshold; If so, output the stable state label; If not, then the delay trend features of the delay sequence are extracted according to the preset feature analysis algorithm; Determine whether the delay trend feature is less than a preset trend threshold set; If so, output the fluctuation state label; If not, the running status information is collected, and after combining the delay trend features, it is input into a pre-trained matching model to obtain the matching result. Specifically, this includes: obtaining a multi-dimensional feature vector based on the delay trend features and the running status information according to a preset combination and standardization process; inputting the multi-dimensional feature vector into the pre-trained matching model; calculating the matching degree between the multi-dimensional feature vector and each known change pattern based on the set of known change patterns stored internally in the matching model; selecting the highest matching degree and comparing it with a preset confidence threshold; if the highest matching degree exceeds the confidence threshold, it is determined that the match is successful and a predictable state label is output; if the highest matching degree does not exceed the confidence threshold, an unknown abnormal state label is output. Based on the status label and a preset decision matrix, delay compensation instructions are generated and executed. Specifically, these include: when the status label is stable, maintenance instructions are generated and executed to maintain the read / write timing of the data buffer; when the status label is fluctuating, fine-tuning instructions are generated and executed to progressively adjust the read / write pointers of the data buffer; when the status label is predictable, a preset compensation table is queried based on the running status information to generate and execute predictive compensation instructions to apply a predictive offset to the data buffer; and when the status label is unknown and abnormal, an exception handling instruction is generated and executed to reset the data buffer and trigger an alarm.

6. A dynamic delay calibration system for a MIPI CSI-2 link according to claim 5, characterized in that, The step of obtaining the real-time delay value of the current link and obtaining the delay sequence specifically includes: The baseline range is calculated based on the elements in the delay element queue of a preset length; If the real-time delay value is not within the baseline range, then the abnormal element flag is set; The real-time delay value is added as a new element to the end of the delay element queue in chronological order; If the delayed element queue is full, the old element at the head of the delayed element queue is deleted first. The tail element of the delay element queue is the first delay information.

7. A dynamic delay calibration system for a MIPI CSI-2 link according to claim 5, characterized in that, The step of extracting the delay trend features of the delay sequence according to a preset feature analysis algorithm further includes: Based on the delay sequence, a trend vector is calculated, wherein the trend vector includes the direction and rate of change of the delay value; Determine whether the trend vector is less than the vector threshold of the trend threshold set; If not, a preliminary abnormal status label is generated; If so, the degree of dispersion value is calculated based on the delay sequence; Determine whether the dispersion value is less than the dispersion threshold of the trend threshold set; If so, then generate the fluctuation state label; If not, a preliminary abnormal status label is generated.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium includes a dynamic delay calibration method program for a MIPI CSI-2 link, which, when executed by a processor, implements the steps of the dynamic delay calibration method for a MIPI CSI-2 link as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Extensible standardized micro optical array module multi-scene adaptation method

    CN120455650A

  • Unit interval jitter improvement in a c-PHY interface

    US20210367749A1