Single-photon ranging calibration and ranging compensation method under double-lens structure

CN123029539APending Publication Date: 2026-11-03SHENZHEN HUAYIFENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611504962.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In single-photon ranging systems with a dual-lens structure, the data from near and far distances cannot be uniformly fitted, leading to a decrease in ranging accuracy.

Method used

A parameter acquisition method based on intervals and states is adopted. By determining a set of calibration points covering the entire range, data is collected and classified. Global nonlinear compensation parameters, first linear compensation parameters, and second linear compensation parameters are fitted respectively. The corresponding parameters are flexibly called for ranging compensation in combination with the real-time optical signal status.

Benefits of technology

It significantly improves the ranging accuracy and stability across the entire range under the dual-lens structure, avoids the surge in computational load and large error caused by single high-order fitting, and achieves high-precision distance correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123029539A_ABST
    Figure CN123029539A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of optical measurement, in particular to a single-photon ranging calibration and ranging compensation method under a double-lens structure. The single-photon ranging calibration method comprises the following steps: constructing a calibration point set covering the full range, collecting peak values and flight distances of a main channel and an attenuation channel, and distinguishing overexposure and high reflection data; global nonlinear compensation parameters, first linear compensation parameters and second linear compensation parameters for non-overexposed and overexposed data are obtained through fitting, and the parameters are packaged into a standard data packet; the ranging compensation method is applied to a measurement end, real-time data collection and standard data packet calling are performed, a global parameter is used to determine a calibration interval, corresponding linear parameters are called according to an overexposure state to calculate a compensation amount, and a compensated distance is output through weighted interpolation. The application can solve the problem of ranging precision reduction caused by the fact that near-distance and far-distance data cannot be uniformly fitted under the double-lens structure, and improve the measurement precision and stability of a single-photon ranging system in the full range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical measurement, and in particular to a single-photon ranging calibration and ranging compensation method under a dual-lens structure. Background Technology

[0002] Single-photon avalanche diode (SPAD) technology has been widely used in lidar and high-precision ranging fields due to its high sensitivity and high temporal resolution. With increasingly complex application scenarios, multi-lens optical systems are gradually becoming the mainstream design in the industry to balance high-precision measurement at close range with wide-range detection at long distances. This dual-lens or multi-channel optical structure can process light signals at different distances using lenses of different apertures or focal lengths, thereby physically expanding the dynamic range of the ranging system, improving its overall environmental adaptability, and meeting the stringent requirements of autonomous driving, robot navigation, and other applications for full-range ranging performance.

[0003] In existing SPAD ranging systems with dual-lens structures, a large lens is typically configured to receive long-range echo signals, while a small lens is configured for short-range supplementary lighting or signal acquisition. During calibration, conventional techniques often involve collecting flight distance data at different distances and reflectivities and attempting to establish a unified mathematical model to compensate for errors caused by photon stacking effects. Common approaches include fitting a single global polynomial function to the full-range data or establishing a linear error compensation relationship based on the peak intensity of the main channel, attempting to correct ranging deviations across all distance ranges and light intensity conditions through a unified compensation function, thereby simplifying the calibration process and reducing data storage requirements.

[0004] However, due to the differences in optical characteristics between the large and small lenses, the light signals received by the SPAD chip from the two channels exhibit drastically different distribution characteristics. Near-range and far-range data show a significant separation in statistical distribution, failing to effectively converge near the same function fitting curve. This inconsistency in physical layer signal characteristics makes it difficult to simultaneously ensure accuracy at both near and far ends when using a unified function for photon stacking effect compensation. This causes near-range and far-range data to deviate from the same fitting curve, resulting in inconsistent physical layer compensation and severely impacting ranging accuracy across the entire range. Summary of the Invention

[0005] To address the problems existing in related technologies, this application discloses a single-photon ranging calibration and ranging compensation method under a dual-lens structure, which can solve the problem of decreased ranging accuracy caused by the inability to uniformly fit near-range and far-range data under a dual-lens structure.

[0006] In a first aspect, this application provides a single-photon ranging calibration method with a dual-lens structure, employing the following technical solution: A single-photon ranging calibration method with a dual-lens structure is applied to a ranging system containing at least two optical acquisition channels, wherein the at least two optical acquisition channels include a first lens channel and a second lens channel. The first lens channel is configured for near-range optical acquisition and outputs the main channel peak value, and the second lens channel is configured for long-range optical acquisition and outputs the attenuated channel peak value. The method includes the following steps: Based on the energy distribution relationship of each optical channel, a set of calibration points covering the entire measurement range is determined. Each calibration point is associated with at least one actual distance and at least two reflectivities. Based on the set of calibration points, the peak value of the main channel, the peak value of the attenuation channel, and the flight distance of the single-photon detector output are collected at each calibration point to form a structured dataset. The reflectivity and actual distance corresponding to each data point in the structured dataset are identified, overexposed data and underexposed data are distinguished, high-reflectivity data are labeled, and a tagged data correspondence is generated, wherein the high-reflectivity data is data with a reflectivity higher than a preset reflectivity threshold. Based on the data correspondence, global nonlinear compensation parameters, a first linear compensation parameter, and a second linear compensation parameter are fitted respectively. The set of calibration points, the global nonlinear compensation parameters, the first linear compensation parameter, and the second linear compensation parameter are packaged into a standard data package to be downloaded to the measurement end.

[0007] By adopting the above technical solution, this paper addresses the problem of inconsistent compensation for photon stacking effect caused by differences in the distribution characteristics of near-distance and far-distance optical signals under a dual-lens structure. First, a set of calibration points covering the entire range and correlated with actual distance and reflectivity is determined based on the energy distribution of the optical channels, ensuring that the calibration data comprehensively reflects different distances and reflectivities. A structured dataset is formed by collecting the peak value of the main channel, the peak value of the attenuation channel, and the flight distance at the calibration points. Further, reflectivity and actual distance are identified to distinguish between overexposed and underexposed data, and high-reflectivity data is labeled, achieving refined data classification and providing an accurate data foundation for subsequent targeted fitting. Based on the correspondence of labeled data, global nonlinear compensation parameters and the first... The system employs a first linear compensation parameter and a second linear compensation parameter. The global nonlinear compensation parameter is used to initially correct distance deviations to determine the measurement interval. The first and second linear compensation parameters perform precise linear fitting for the main channel data when it is not overexposed and the attenuation channel data when it is overexposed, respectively. This method of obtaining parameters by interval and state avoids the problems of large computational load and large error in specific scenarios caused by single high-order fitting. Finally, the calibration point set and various compensation parameters are packaged into a standard data package and downloaded to the measurement end. This allows the measurement end to flexibly call the corresponding compensation parameters for high-precision ranging based on the real-time data status, effectively solving the problem of decreased ranging accuracy caused by the inability to uniformly fit near-distance and far-distance data under the dual-lens structure.

[0008] Optionally, the step of fitting the global nonlinear compensation parameter, the first linear compensation parameter, and the second linear compensation parameter based on the data correspondence includes: after excluding the high-reflectivity data, fitting the global nonlinear compensation parameter based on the main channel peak value and distance difference, wherein the distance difference is the difference between the flight distance output by the single-photon detector and the actual distance of the calibration point; fitting the first linear compensation parameter corresponding to each calibration point based on a subset of the unexposed data; and fitting the second linear compensation parameter corresponding to each calibration point based on a subset of the overexposed data.

[0009] By adopting the above technical solution, and by eliminating interference from high-reflectivity data and fitting global nonlinear compensation parameters based on the peak value of the main channel and the distance difference, the nonlinear error trend across the entire range can be accurately characterized using a quadratic function, providing a reliable benchmark for subsequent interval determination. Simultaneously, by subdividing the data into two subsets, unexposed and overexposed, and performing linear fitting separately, high-precision linear compensation is achieved using the peak value of the main channel in the unexposed state, while switching to the peak value of the attenuation channel for linear compensation in the overexposed state. This refined processing strategy, which separates states and channels, not only avoids the surge in computational load caused by a single high-order fitting but also effectively eliminates measurement errors at linear transition points, significantly improving the compensation accuracy and robustness of the ranging system in scenarios with complex reflectivity and varying light intensities.

[0010] Optionally, the step of fitting the global nonlinear compensation parameters based on the main channel peak value and distance difference includes: A quadratic function is used to fit the peak value and distance difference of the main channel to obtain the quadratic coefficients a, b, and c, and a global nonlinear compensation function is constructed: f(peak1)=a·peak1²+b·peak1+c; where peak1 is the peak value of the main channel, and the global nonlinear compensation parameters include the quadratic coefficients a, b, and c.

[0011] By employing the above technical solution and fitting the peak value and distance difference of the main channel using a quadratic function, the nonlinear error characteristics caused by the photon stacking effect under the dual-lens structure can be accurately characterized. Although this global nonlinear compensation parameter is not directly used for the final high-precision distance calculation, it effectively eliminates the main nonlinear deviations in the original data, thus transforming the complex nonlinear distribution into a linear distribution with smaller residuals. This processing makes subsequent linear interpolation compensation based on the calibration interval more accurate, avoiding the huge computational load caused by simply increasing the fitting order in common ranging scenarios. It also solves the problem of large errors at linear transition points, achieving a balance between computational complexity and ranging accuracy.

[0012] Optionally, the step of fitting the first linear compensation parameter corresponding to each calibration point based on a subset of the unexposed data includes: fitting a linear function to the main channel peak value and distance difference in the unexposed data to obtain the first linear slope and first intercept corresponding to each calibration point, and constructing a first linear fitting function. g1(peak1, point_i)=K2[point_i]·peak1+b2[point_i]; Wherein, peak1 is the peak value of the main channel, K2[point_i] is the first linear slope, and b2[point_i] is the first intercept; the first linear compensation parameter includes the first linear slope and the first intercept.

[0013] By adopting the above technical solution, for the data characteristics of the main channel peak not being overexposed when acquiring data at close range under the dual-lens structure, a mapping relationship between the main channel peak and the distance difference is established using a linear function, avoiding the huge amount of computation caused by blindly increasing the fitting order in high-order polynomial fitting; at the same time, since linear fitting is more physically consistent with the photon accumulation effect variation law in the unexposed area, it can effectively reduce the fitting residual in common ranging scenarios and improve the accuracy and real-time performance of distance compensation.

[0014] Optionally, the step of fitting a second linear compensation parameter corresponding to each calibration point based on a subset of the overexposure data includes: A linear function is used to fit the attenuation channel peak and distance difference in the overexposure data to obtain the second linear slope K1 and intercept b1 corresponding to each calibration point, and a second linear fitting function is constructed: g2(peak2, point_i)=K1[point_i]·peak2+b1[point_i]; Where peak2 is the peak value of the attenuation channel, K1[point_i] is the second linear slope, and b1[point_i] is the second intercept; the second linear compensation parameter includes the second linear slope and the second intercept.

[0015] By adopting the above technical solution, a second linear fitting function is constructed by fitting the linear relationship between the peak value of the attenuation channel and the distance difference, addressing the issue of degraded linear performance caused by overexposure of the main channel peak value. In scenarios with strong reflection or close-range main channel saturation, this solution can use effective data from the attenuation channel to replace the failed main channel data for error compensation, solving the problem of inaccurate fitting of a single channel in overexposed areas. This ensures the measurement accuracy and compensation continuity of the ranging system across the entire measurement range, especially in high-intensity overexposed areas.

[0016] Secondly, this application provides a single-photon ranging calibration method with a dual-lens structure, employing the following technical solution: A single-photon online ranging compensation method is applied at the measurement end, loading a standard data packet generated by the ranging calibration method described above. This includes: real-time acquisition of the flight distance, main channel peak value, and attenuation channel peak value output by the single-photon detector; parsing the standard data packet to obtain a calibration point set, global nonlinear compensation parameters, a first linear compensation parameter, and a second linear compensation parameter; calculating the offset based on the global nonlinear compensation parameters and the real-time acquired flight distance and main channel peak value, constructing a normalized comparison value, and sequentially scanning along a reference sequence to determine the calibration interval to which the current measurement value belongs and adjacent calibration points. The reference sequence is generated by the calibration end based on the actual distance of each calibration point and the global nonlinear compensation parameters, and is monotonically increasing according to the actual distance, and is sent to the measurement end along with the standard data packet; depending on whether the real-time acquired main channel peak value is overexposed, calling the first linear compensation parameter or the second linear compensation parameter, and calculating the distance compensation amount corresponding to each adjacent calibration point in conjunction with the adjacent calibration points; and performing weighted interpolation on the distance compensation amount based on the relative position of the normalized comparison value within the calibration interval to output the compensated distance.

[0017] By adopting the above technical solution, the time-of-flight distance, main channel peak value and attenuation channel peak value output by the single-photon detector are collected in real time, which can fully obtain the original optical signal characteristics in the current ranging scenario, and provide a complete data basis for subsequent accurate compensation; the standard data packet is parsed to obtain the calibration point set, global nonlinear compensation parameter, first linear compensation parameter and second linear compensation parameter, so that the measurement end does not need to perform complex offline fitting calculations, which significantly reduces the computing power requirement of the measurement end and improves the response speed; the offset is calculated based on the global nonlinear compensation parameter and the real-time collected time-of-flight distance and main channel peak value, and a normalized comparison value is constructed, a quadratic function is used to preliminarily correct the nonlinear error caused by the photon pile-up effect, which effectively eliminates the overall deviation caused by the difference in light intensity distribution under the dual-lens structure, and then sequential scanning is performed along the reference sequence to determine the calibration interval to which the current measurement value belongs and the adjacent calibration points, realizing rapid positioning and interval division of measurement data, and avoiding the calculation delay caused by full-range search; according to whether the real-time collected main channel peak value is overexposed, the first linear compensation parameter optimized for non-overexposed data or the second linear compensation parameter optimized for overexposed data is flexibly invoked, and the distance compensation amount is calculated in combination with the adjacent calibration points. This state-based processing mechanism not only ensures the linear fitting accuracy under low light intensity, but also solves the measurement distortion problem caused by main channel saturation under high light intensity, realizing accurate compensation in the full dynamic range; finally, weighted interpolation is performed on the distance compensation amount according to the relative position of the normalized comparison value in the calibration interval to output the compensated distance. By smoothly transitioning the compensation difference between adjacent calibration points, the jump error that may occur at the boundary of piecewise fitting is eliminated, thereby significantly improving the overall ranging accuracy and stability of the single-photon ranging system with a dual-lens structure.

[0018] Optionally, in the step of calculating an offset based on the global nonlinear compensation parameter and the real-time collected time-of-flight distance and main channel peak value, constructing a normalized comparison value, and performing sequential scanning along a reference sequence to determine the calibration interval to which the current measurement value belongs and adjacent calibration points: The offset bias=tof−f(peak1); wherein, tof is the time-of-flight distance collected in real time, f(peak1)=a·peak1²+b·peak1+c, and a, b, c are the global nonlinear compensation parameters in the standard data packet; The normalized comparison value target_compare=tof+bias; The rule for performing sequential scanning along the reference sequence compare_avg[i] is: When i=0 and target_compare<compare_avg[0], calibration point 0 is locked; When compare_avg[i]≤target_compare<compare_avg[i+1], the lower bound calibration point i is locked; When i=N−1, target_compare>compare_avg[N−1] and target_compare is less than the upper range limit, the last calibration point N−1 is locked; When target_compare is greater than or equal to the upper range limit, an invalid flag is returned.

[0019] By adopting the above technical solution, the globally non-linear compensation parameters are used to preliminarily correct the real-time collected flight distance and main channel peak value to calculate the offset, and a normalized comparison value is constructed based on the offset, which can eliminate the global non-linear error caused by the photon pile-up effect under the dual-lens structure, make the data distribution tend to be linear, so as to improve the accuracy of interval judgment; by sequentially scanning along the reference sequence and locking the calibration interval to which the current measured value belongs and the adjacent calibration points according to the relative magnitude relationship between the normalized comparison value and the reference value, the rapid positioning of the measurement state and the effective processing of boundary conditions are realized, which not only ensures that the reference points for subsequent linear interpolation calculation can be accurately matched within the normal range, but also returns an invalid flag in time when the range is exceeded to prevent wrong ranging, and improves the robustness and real-time response efficiency of the single-photon online ranging compensation method.

[0020] Optionally, the step of invoking the first linear compensation parameter or the second linear compensation parameter according to whether the real-time collected main channel peak is in an overexposure state, and calculating the distance compensation amount corresponding to each adjacent calibration point in combination with the adjacent calibration points, comprises: if the real-time collected main channel peak is not overexposed, invoking the first linear slope and first intercept corresponding to the two adjacent calibration points in the first linear compensation parameter, substituting the real-time main channel peak into the respective linear functions corresponding to the two adjacent calibration points, and calculating a first compensation value and a second compensation value; if the real-time collected main channel peak is overexposed, invoking the second linear slope and second intercept corresponding to the two adjacent calibration points in the second linear compensation parameter, substituting the real-time attenuation channel peak into the respective linear functions corresponding to the two adjacent calibration points, and calculating a first compensation value and a second compensation value.

[0021] By employing the above technical solution, the problem of compensating for photon accumulation effects caused by differences in the distribution of near-distance and far-distance light signals in dual-lens structures can be addressed, achieving high-precision distance correction. Specifically, this method flexibly switches compensation strategies based on the overexposure state of the main channel peak: when the main channel is not overexposed, the calculation is performed using the main channel peak combined with the first linear compensation parameter to ensure measurement accuracy under normal lighting conditions; when the main channel is overexposed, it automatically switches to the attenuation channel, using the attenuation channel peak combined with the second linear compensation parameter for calculation, effectively solving the data distortion problem caused by main channel saturation. This channel-specific linear compensation mechanism based on overexposure states avoids the surge in computational load and large errors in transition zones caused by single high-order fitting, achieving smooth transition and precise adaptation of compensation functions within different light intensity ranges, thereby significantly improving the ranging accuracy and stability across the entire measurement range.

[0022] Optionally, the step of weighted interpolating the distance compensation amount based on the relative position of the normalized comparison value within the calibration interval to output the compensated distance includes: calculating a right weight based on the difference between the normalized reference value corresponding to the second adjacent calibration point in the reference sequence and the normalized comparison value; calculating a left weight based on the difference between the normalized reference value corresponding to the first adjacent calibration point in the reference sequence and the normalized comparison value; weighted interpolating the first compensation value and the second compensation value according to the right weight and the left weight to obtain the final compensation amount, wherein the final compensation amount is the sum of the right weight and the left weight, calculated by multiplying the first compensation value by the right weight and the second compensation value by the left weight; and outputting the compensated distance by subtracting the final compensation amount from the real-time flight distance.

[0023] By adopting the above technical solution, left and right weights are constructed using the difference between the normalized comparison value and the normalized reference value of adjacent calibration points, respectively. The distance compensation of adjacent calibration points is then calculated by weighted interpolation based on this difference. This allows for dynamic adjustment of the compensation contribution based on the relative position of the current measurement data within the calibration interval, achieving a smooth transition and effectively eliminating distance jump errors caused by discrete calibration points. This improves the measurement accuracy and data consistency of the single-photon ranging system under the dual-lens structure within a continuous distance range.

[0024] Thirdly, this application provides a single-photon ranging calibration device with a dual-lens structure, which adopts the following scheme: A single-photon ranging calibration device with a dual-lens structure, used to perform the ranging calibration method described above, includes: The calibration standard design module is used to determine a set of calibration points covering the entire range based on the energy distribution relationship of each optical channel. Each calibration point is associated with at least one actual distance and at least two reflectivities. The data acquisition module is used to collect the main channel peak value, attenuation channel peak value, and flight distance of the single-photon detector output at each calibration point according to the calibration point set, and form a structured dataset. The data parsing module is used to identify the reflectance and actual distance corresponding to each data point in the structured dataset, distinguish between overexposed and underexposed data, mark high reflectance data, and generate labeled data correspondences, wherein the high reflectance data is data with a reflectance higher than a preset reflectance threshold. The fitting calculation module is used to fit and obtain the global nonlinear compensation parameter, the first linear compensation parameter, and the second linear compensation parameter based on the data correspondence. The data packaging module is used to package the calibration point set, the global nonlinear compensation parameters, the first linear compensation parameters, and the second linear compensation parameters into a standard data package to be downloaded to the measurement terminal.

[0025] Fourthly, this application provides an electronic device that adopts the following solution: An electronic device includes: a memory and a processor, the memory being used to store a computer program; the processor being used to execute the computer program to implement the steps of the method as described in any of the preceding claims.

[0026] Fifthly, this application provides a computer-readable storage medium, which adopts the following scheme: A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to perform the steps of the method as described in any of the preceding claims.

[0027] In summary, this application includes at least one of the following beneficial technical effects: 1. By fitting the global nonlinear compensation parameters, the first linear compensation parameters for unexposed data, and the second linear compensation parameters for overexposed data respectively, the problem of large differences in the distribution characteristics of near and far light signals under the dual-lens structure and the inability to fit them with a unified function is solved. Differentiated and accurate compensation for different optical channel characteristics and light intensity states is achieved, which significantly improves the ranging accuracy across the entire range. 2. The offset is calculated using global nonlinear compensation parameters to determine the calibration interval and adjacent calibration points to which the current measurement value belongs. The first or second linear compensation parameter is automatically switched based on whether the peak value of the main channel is overexposed. This avoids the huge amount of calculation caused by blindly increasing the fitting order. While ensuring accuracy, it reduces the computational load of the measurement end and effectively solves the problem of large errors at linear transition points. 3. Based on the relative position of the normalized comparison value within the calibration interval, the distance compensation amount of adjacent calibration points is weighted and interpolated, which realizes the smooth transition of compensation parameters between different calibration points, eliminates the boundary abrupt phenomenon caused by interval calibration, and further improves the continuity and stability of ranging data. Attached Figure Description

[0028] Figure 1 This is a schematic flowchart of a single-photon ranging calibration method with a dual-lens structure disclosed in an embodiment of this application; Figure 2 This is a schematic diagram showing the relationship between the normalized intensity of the echo signal detected by the single-photon receiver and the target distance.

[0029] Figure 3 for Figure 1 A schematic diagram illustrating an example of step S04 in a single-photon ranging calibration method with a dual-lens structure. Figure 4 A schematic diagram showing how a quadratic function is used to fit the peak value and distance difference of the main channel to obtain the global nonlinear compensation parameters; Figure 5 A schematic diagram showing how to fit the main channel peak value and distance difference in the unexposed data subset using a linear function to obtain the first linear compensation parameter; Figure 6 A schematic diagram showing how to fit the attenuation channel peak value and distance difference in the overexposed data subset using a linear function to obtain the second linear compensation parameter; Figure 7 This is a flowchart illustrating a single-photon online ranging compensation method disclosed in another embodiment of this application; Figure 8 for Figure 7 A schematic diagram illustrating an example of step S50 in a disclosed single-photon online ranging compensation method; Figure 9 A schematic diagram of a module of a single-photon ranging calibration device with a dual-lens structure is disclosed in another embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device disclosed in another embodiment of this application. Detailed Implementation

[0030] The technical solutions in the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0031] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0032] It should be understood that although the terms "first," "second," etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0033] [First Embodiment] See Figure 1 The first embodiment of this application provides a single-photon ranging calibration method with a dual-lens structure, which is applied to a ranging system containing at least two optical acquisition channels, including a first lens channel and a second lens channel.

[0034] The dual-lens structure consists of a small lens and a large lens. The first lens channel corresponds to the small lens with a short focal length and is configured for close-range optical acquisition and output of the main channel peak (peak1). The second lens channel corresponds to the large lens with a long focal length and is configured for long-range optical acquisition and output of the attenuation channel peak (peak2). The pixel array of the SPAD detector simultaneously receives the photon signals converged by the two lenses.

[0035] Specifically, a single-photon ranging calibration method with a dual-lens structure includes the following steps: S01. Based on the energy distribution relationship of each optical channel, determine a set of calibration points covering the entire range, with each calibration point associated with at least one actual distance and at least two reflectivities; This step involves designing calibration standards for the offline calibration phase. The aim is to rationally distribute points in the distance-reflectivity two-dimensional space so that subsequent fitting parameters can cover the entire range and all scenarios. For details on the energy distribution relationship of each optical channel, please refer to [link to documentation / reference]. Figure 2The curve showing the relationship between the normalized intensity of the echo signal detected by the single-photon receiver and the target distance represents the photon collection efficiency curves of the first and second lens channels at different distances. The minimum to maximum distance of the calibration point for the "full range coverage" specification should cover the range of the ranging system (e.g., 0.1m to 15m). "Each calibration point is associated with at least one actual distance and at least two reflectivities" can be understood as using at least two reflectivity targets for data acquisition at each distance location.

[0036] S02. Based on the calibration point set, collect the main channel peak value, attenuation channel peak value, and flight distance of the single-photon detector output at each calibration point to form a structured dataset. This step is the data acquisition phase. "Main channel peak" refers to the histogram peak count (peak1) corresponding to the first lens channel, representing the number of photons received by the near-field optical acquisition channel. "Attenuation channel peak" refers to the histogram peak count (peak2) corresponding to the second lens channel, representing the number of photons received by the far-field optical acquisition channel. "Flight distance" (tof) is the actual flight distance of the acquired light. "Structured dataset" refers to organizing each acquisition record into a uniform format, such as fields. {frame_id,point_i,actual_distance,reflectance,peak1,peak2,tof}.

[0037] S03. Identify the reflectance and actual distance corresponding to each data point in the structured dataset, distinguish between overexposed and underexposed data, label high-reflectance data, and generate labeled data correspondences, where high-reflectance data is data with a reflectance higher than a preset reflectance threshold. This step involves data parsing and labeling, providing a data foundation for subsequent differential fitting. Distinguishing between overexposed and unexposed data involves setting an overexposure threshold for the main channel peak value, for example, peak1 ≥ 4000. Data exceeding this threshold is labeled "overexposed data," otherwise "unexposed data." This distinction directly determines which set of linear compensation parameters to use later. Labeling high-reflectivity data involves setting a reflectance threshold, for example, 80%. Data with reflectance ≥ 80% is labeled "high-reflectivity data." It should be noted that high-reflectivity data may still trigger overexposure at long distances, and its signal characteristics differ significantly from those of low- to medium-reflectivity targets. If included in global nonlinear fitting, it will skew the parameters; therefore, it needs to be labeled separately and excluded in subsequent steps. The "labeled data correspondence" refers to each data point carrying a structured mapping relationship of {overexposed / unexposed label, high-reflectivity / non-high-reflectivity label}, which is used by the fitting module.

[0038] S04. Based on the data correspondence, the global nonlinear compensation parameter, the first linear compensation parameter, and the second linear compensation parameter are respectively fitted to obtain the global nonlinear compensation parameter, the first linear compensation parameter, and the second linear compensation parameter. This step, S40, involves the core fitting calculation, which constructs three sets of compensation parameter systems based on the labeled data. Specifically, this step includes the following steps: S041. Based on the data correspondence, after excluding high-reflection data, global nonlinear compensation parameters are obtained by fitting based on the main channel peak value and distance difference. See Figure 4 In this step, a quadratic function is used to fit the peak value and distance difference of the main channel to obtain the quadratic coefficients a, b, and c, and a global nonlinear compensation function is constructed: f(peak1)=a·peak1²+b·peak1+c, and the global nonlinear compensation parameters are obtained by fitting. Among them, peak1 is the peak value of the main channel, and the global nonlinear compensation parameters include quadratic coefficients a, b, and c.

[0039] After excluding high-reflection data, the least squares method is used to perform a quadratic polynomial fitting on peak1 and f(peak1) to obtain a, b, and c. This function is used for offset pre-compensation in the online stage to eliminate system-level nonlinear errors (such as laser-driven nonlinearity, detector dead time, TDC quantization error, etc.).

[0040] S042. Based on a subset of unexposed data, the first linear compensation parameter corresponding to each calibration point is obtained by fitting. See Figure 5 In this step, a linear function is used to fit the peak value and distance difference of the main channel in the unexposed data subset, obtaining the first linear slope K2 and the first intercept b2 corresponding to each calibration point, and constructing the first linear fitting function: g1(peak1, point_i)=K2[point_i]·peak1+b2[point_i]; From the subset of unexposed data, groups are formed according to the calibration point_i. Within each group, a linear fit is performed between peak1 and g1(peak1, point_i). Each calibration point yields a set (K2[i], b2[i]), for a total of N sets, which means N different K2 and b2 parameters. The first linear compensation parameter includes the first linear slope K2 and the first intercept b2, which are used for distance compensation when the main channel is not overexposed during the online phase.

[0041] S043. Based on a subset of overexposure data, the second linear compensation parameter corresponding to each calibration point is obtained by fitting. See Figure 6 This step uses a linear function to fit the attenuation channel peak and distance difference in the overexposed data subset, obtaining the second linear slope K1 and the second intercept b1 corresponding to each calibration point, and constructing the second linear fitting function: g2(peak2,point_i)=K1[point_i]·peak2+b1[point_i]; From the overexposed data subset, the data is grouped according to the calibration point_i. Within each group, a linear fit is performed between peak2 and g2(peak2, point_i). Each calibration point yields a set (K1[i], b1[i]), for a total of N sets, which means N different K1 and b1 parameters. This second linear compensation parameter includes the second linear slope K1 and the second intercept b1, which is used for distance compensation when the main channel is overexposed during the online phase. At this time, the peak value of the main channel is unreliable and needs to rely on the peak value of the attenuation channel.

[0042] S05. Package the calibration point set, global nonlinear compensation parameters, first linear compensation parameters, and second linear compensation parameters into a standard data package to be downloaded to the measurement terminal.

[0043] In step S50, all the aforementioned calibration results are serialized into a standard data packet. The standard data packet is downloaded to the on-chip memory of the measurement end via I2C / SPI for real-time use by the online ranging compensation method.

[0044] In summary, the single-photon ranging calibration method disclosed in the first embodiment of this application, based on a dual-lens structure, addresses the inconsistent distribution of photon stacking effects caused by differences in near- and far-distance optical paths under a dual-lens structure. It establishes a unified and highly accurate calibration model. By distinguishing between overexposed and underexposed data and labeling high-reflectivity data, it fits global nonlinear compensation parameters and first and second linear compensation parameters for different channel states. This achieves refined linear correction using the main channel peak value in non-overexposed areas and effective compensation using the attenuation channel peak value in overexposed areas, thus eliminating the limitation that a single fitting function cannot simultaneously adapt to near- and far-distance data characteristics. Finally, the multi-dimensional calibration parameters are packaged into a standard data package, enabling the measurement end to flexibly call the corresponding compensation strategy based on the real-time signal state, significantly improving the accuracy of single-photon ranging across the entire range.

[0045] [Second Embodiment] See Figure 7 The second embodiment of this application provides a single-photon online ranging compensation method, applied at the measuring end, for loading the standard data packet generated by the ranging calibration method described in the first embodiment (i.e., how the measuring end loads and uses the standard data packet generated during the calibration stage for real-time distance calculation). This method includes: S10. Real-time acquisition of flight distance, main channel peak value, and attenuation channel peak value output by the single-photon detector; Wherein, this step is real-time data acquisition, the measurement end triggers laser emission for each frame, the SPAD detector receives reflected photons, and outputs the time-of-flight tof of the current frame, the main channel peak value peak1, and the attenuation channel peak value peak2.

[0046] S20. Parse the standard data packet, and acquire the calibration point set, global nonlinear compensation parameter, first linear compensation parameter and second linear compensation parameter; Wherein, this step is to parse the standard data packet. Before this step, the measurement end downloads the standard data packet to the on-chip memory via, for example, I2C / SPI, and then reads the standard data packet from the on-chip memory to load it into the register of the online calculation engine.

[0047] S30. Calculate an offset based on the global nonlinear compensation parameter, the real-time acquired time-of-flight and the main channel peak value, construct a normalized comparison value, perform sequential scanning with the reference sequence, and determine the corresponding calibration interval and adjacent calibration points in the calibration point set to which the current measurement value belongs. Wherein, the calculation formula of the offset is bias=tof−f(peak1), and f(peak1)=a·peak1²+b·peak1+c; tof is the real-time acquired time-of-flight, and a, b, c are the global nonlinear compensation parameters in the standard data packet. This step uses the global quadratic function obtained in the calibration phase to perform preliminary correction on the current time-of-flight.

[0048] Subsequently, a normalized comparison value is constructed, and the calculation formula of the normalized comparison value is target_compare=tof+bias; here, by adding the offset bias, the current measurement value is actually mapped to a reference coordinate system that has been preliminarily corrected.

[0049] Next, sequential scanning is performed along the reference sequence compare_avg[i] to determine the calibration interval to which the current measurement value belongs and the adjacent calibration points. The reference sequence compare_avg[i] is calculated and generated by the calibration end based on the actual distance of each calibration point and the global nonlinear compensation parameter, is arranged in a monotonically increasing order according to the actual distance, and is delivered to the measurement end along with the standard data packet.

[0050] Wherein, in this embodiment, the rule for performing sequential scanning along the reference sequence compare_avg[i] is: When i=0 and target_compare<compare_avg[0], calibration point 0 is locked; When compare_avg[i]≤target_compare<compare_avg[i+1], the lower bound calibration point i is locked; When i = N−1 and target_compare > compare_avg[N−1] and is less than the upper limit of the range, lock the last calibration point N−1; If target_compare is greater than or equal to the upper limit of the range, an invalid flag is returned.

[0051] This process quickly pinpointed the position of the current measurement data on the calibration curve and located two adjacent reference calibration points, point1 and point2.

[0052] The above describes a process where the bias is calculated using a global nonlinear compensation function f(peak1), the original tof is normalized to target_compare, and then compared segment by segment with a pre-stored reference sequence to determine which calibration interval [point_i, point_{i+1}] the current measurement value falls within. This design ensures that interval determination is unaffected by nonlinear drift in signal strength.

[0053] S40. Based on whether the peak value of the main channel collected in real time is overexposed, call the first linear compensation parameter or the second linear compensation parameter, and calculate the distance compensation amount corresponding to each adjacent calibration point in combination with the adjacent calibration points. This step dynamically selects the compensation parameter system based on the comparison between the main channel peak value (peak1) and the overexposure threshold (e.g., 4000). When there is no overexposure, the main channel linear parameters are used; when there is overexposure, the system switches to the attenuation channel linear parameters. This dynamic switching mechanism based on the overexposure state ensures that the most suitable linear model can be used for compensation under any light intensity condition, avoiding errors caused by channel saturation.

[0054] Specifically, if the real-time acquired peak value of the main channel is not overexposed, the first linear slope and the first intercept of the two adjacent calibration points in the first linear compensation parameters are called, and the real-time peak value of the main channel is substituted into the linear function corresponding to the two adjacent calibration points respectively to calculate the first compensation value and the second compensation value. For example, for underexposure: call K2[point_i], b2[point_i] and K2[point{i+1}], b2[point{i+1}], substitute the real-time peak1, and calculate offset1 and offset2.

[0055] If the peak value of the main channel acquired in real time is overexposed, the second linear slope and second intercept of the corresponding two adjacent calibration points in the second linear compensation parameters are called. The peak value of the real-time attenuation channel is substituted into the linear function corresponding to each of the two adjacent calibration points to calculate the first compensation value and the second compensation value.

[0056] For example, overexposure: call K1[point_i], b1[point_i] and K1[point{i+1}], b1[point{i+1}], substitute the real-time peak2, and calculate offset1 and offset2.

[0057] S50. Based on the relative position of the normalized comparison value within the calibration interval, perform weighted interpolation on the distance compensation amount to output the compensated distance.

[0058] The interpolation strategy assigns left and right weights based on the relative positions of normalized comparison values ​​within the calibration interval. It then performs weighted interpolation on the compensation amounts calculated for each of two adjacent calibration points to obtain the final compensation amount, offset. The final distance is obtained by subtracting the offset from the tof value. This interpolation strategy ensures smooth and continuous distance values ​​are output between calibration points and near the overexposure threshold.

[0059] For details, see Figure 8 Step S50 includes: S51. Based on the difference between the normalized benchmark value compare_avg[point2] and the normalized comparison value (target_compare) corresponding to the second adjacent calibration point (i.e., the right neighbor point2) in the benchmark sequence, the right weight weightR is calculated. This corresponds to weightR = compare_avg[point2] − target_compare.

[0060] S52. Based on the difference between the normalized benchmark value compare_avg[point1] and the normalized comparison value (target_compare) corresponding to the first adjacent calibration point (i.e., the left neighbor point1) in the benchmark sequence, the left weight weightL is calculated. This corresponds to weightL = target_compare − compare_avg[point1].

[0061] S53. The first compensation value and the second compensation value are weighted and interpolated according to the right weight and the left weight to obtain the final compensation amount offset. The final compensation amount offset is the first compensation value offset1 multiplied by the right weight weightR plus the second compensation value offset2 multiplied by the left weight weightL, divided by the sum of the right weight weightR and the left weight weightL. This corresponds to offset = (offset1 × weightR + offset2 × weightL) / (weightR + weightL).

[0062] S54. Subtract the final compensation amount offset from the real-time flight distance tof, and output the compensated distance.

[0063] This corresponds to the compensated distance = tof − offset.

[0064] In summary, the single-photon online ranging compensation method disclosed in the second embodiment of this application can acquire the flight distance, main channel peak value, and attenuation channel peak value of the single-photon detector in real time, ensuring that the measurement end has a complete and real-time raw data foundation. By parsing standard data packets to obtain calibration parameters, the measurement end can directly use a pre-calibrated high-precision model without performing complex offline calibration calculations, reducing the computing power requirements of the measurement end and improving the response speed. Based on the global nonlinear compensation parameters, the offset is calculated and a normalized comparison value is constructed, which can effectively eliminate the nonlinear error caused by the photon accumulation effect caused by the double-lens structure. Furthermore, by scanning along the reference sequence, the calibration interval and adjacent calibration points of the current measurement value are accurately locked, solving the problem of fitting difficulties caused by the large difference in data distribution between near and far distances. It achieves precise interval positioning across the entire range; dynamically calls the first or second linear compensation parameter based on the overexposure state of the main channel peak, enabling high-precision compensation using main channel data when the main channel is not overexposed, and automatically switches to attenuation channel data for compensation when the main channel is overexposed. This effectively avoids ranging deviations caused by the deterioration of linearity of a single channel under extreme light intensity, achieving adaptive and precise compensation under different light intensity scenarios; weighted interpolation of the distance compensation amount based on the relative position of the normalized comparison value within the interval can smooth the compensation transition between adjacent calibration points, eliminating the step-like error caused by the discrete distribution of calibration points, thereby outputting a continuous and high-precision compensated distance, significantly improving the ranging accuracy and stability of the single-photon ranging system under the dual-lens structure under full range, total reflectivity, and different illumination conditions.

[0065] [Third Embodiment] See Figure 9 The third embodiment of this application discloses a single-photon ranging calibration device with a dual-lens structure, including: a calibration standard design module 210, a data acquisition module 220, a data parsing module 230, a fitting calculation module 240, and a data packaging module 250.

[0066] Among them, the calibration standard design module 210 is used to determine a set of calibration points covering the entire range based on the energy distribution relationship of each optical channel, and each calibration point is associated with at least one actual distance and at least two reflectivities; The data acquisition module 220 is used to acquire the main channel peak value, attenuation channel peak value and flight distance of the single-photon detector output at each calibration point according to the calibration point set, and form a structured dataset. The data parsing module 230 is used to identify the reflectance and actual distance corresponding to each data in the structured dataset, distinguish between overexposed data and underexposed data, mark high reflectance data, and generate a labeled data correspondence, wherein the high reflectance data is data with a reflectance higher than a preset reflectance threshold. The fitting calculation module 240 is used to fit the global nonlinear compensation parameter, the first linear compensation parameter and the second linear compensation parameter based on the data correspondence. The data packaging module 250 is used to package the calibration point set, the global nonlinear compensation parameters, the first linear compensation parameters, and the second linear compensation parameters into a standard data package to be downloaded to the measurement end.

[0067] It should be noted that the single-photon ranging calibration device with a dual-lens structure disclosed in this embodiment implements the same single-photon ranging calibration method as described in the above embodiment, and therefore will not be described in detail here. Optionally, the various modules and other operations or functions in this embodiment are respectively for implementing the methods in the aforementioned embodiments.

[0068] [Fourth Embodiment] See Figure 10 In the fourth embodiment of this application, an electronic device is disclosed, which includes a memory 310 and a processor 320. The memory 310 is used to store a computer program; the processor 320 is used to execute the computer program to implement the steps of the single-photon ranging calibration method under a dual-lens structure described in the first embodiment above. For details, please refer to the above, so it will not be described in detail here.

[0069] The technical effect of the electronic device provided in this embodiment in practical application is the same as that of the single-photon ranging calibration method under a dual-lens structure in the first embodiment.

[0070] [Fifth Embodiment] A computer-readable storage medium is disclosed in the fifth embodiment of this application. The computer-readable storage medium is, for example, a non-volatile memory, such as a magnetic medium (e.g., hard disk, floppy disk, and magnetic tape), an optical medium (e.g., CD-ROM and DVD), a magneto-optical medium (e.g., optical disc), and a hardware device specifically configured to store and execute computer-executable instructions (e.g., read-only memory (ROM), random access memory (RAM), flash memory, etc.). A computer program is stored on the computer-readable storage medium. The computer-readable storage medium can be executed by one or more processors or processing devices to implement a single-photon ranging calibration method under a dual-lens structure as described in the foregoing embodiments.

[0071] Furthermore, it is understood that the foregoing embodiments are merely illustrative examples of the present invention. Provided that the technical features do not conflict, the structure is not contradictory, and the purpose of the invention is not violated, the technical solutions of the various embodiments can be arbitrarily combined and used.

[0072] In the embodiments provided by this invention, it should be understood that the disclosed methods, apparatus, and devices can be implemented in other ways. For example, the modules included in the systems described above are merely illustrative, and the division of modules is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0073] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A single-photon ranging calibration method with a dual-lens structure, applied to a ranging system comprising at least two optical acquisition channels, wherein the at least two optical acquisition channels include a first lens channel and a second lens channel, the first lens channel being configured for near-range optical acquisition and outputting the main channel peak value, and the second lens channel being configured for long-range optical acquisition and outputting the attenuation channel peak value, characterized in that... Includes the following steps: Based on the energy distribution relationship of each optical channel, determine a set of calibration points covering the entire range, with each calibration point associated with at least one actual distance and at least two reflectivities; Based on the set of calibration points, the peak value of the main channel, the peak value of the attenuation channel, and the flight distance of the single-photon detector output are collected at each calibration point to form a structured dataset. Identify the reflectance and actual distance corresponding to each data point in the structured dataset, distinguish between overexposed and underexposed data, label high-reflectance data, and generate a labeled data correspondence, wherein the high-reflectance data is data with a reflectance higher than a preset reflectance threshold; Based on the data correspondence, global nonlinear compensation parameters, first linear compensation parameters, and second linear compensation parameters are respectively fitted and obtained. The calibration point set, the global nonlinear compensation parameters, the first linear compensation parameters, and the second linear compensation parameters are packaged into a standard data package to be downloaded to the measurement terminal.

2. The ranging calibration method according to claim 1, characterized in that, The process of fitting global nonlinear compensation parameters, first linear compensation parameters, and second linear compensation parameters based on the data correspondence includes: After excluding the high-reflection data, the global nonlinear compensation parameters are obtained by fitting based on the main channel peak value and distance difference, where the distance difference is the difference between the flight distance output by the single-photon detector and the actual distance of the calibration point; Based on the subset of the unexposed data, the first linear compensation parameter corresponding to each calibration point is fitted; Based on a subset of the overexposure data, a second linear compensation parameter corresponding to each calibration point is fitted.

3. The ranging calibration method according to claim 2, characterized in that, The global nonlinear compensation parameters, obtained by fitting based on the main channel peak value and distance difference, include: A quadratic function is used to fit the peak value and distance difference of the main channel to obtain the coefficients a, b, and c of the quadratic term, and a global nonlinear compensation function is constructed. f(peak1)=a·peak1²+b·peak1+c; Wherein, peak1 is the peak value of the main channel, and the global nonlinear compensation parameters include quadratic coefficients a, b, and c.

4. The ranging calibration method according to claim 2, characterized in that, The process of fitting the first linear compensation parameter corresponding to each calibration point based on the subset of the unexposed data includes: A linear function is used to fit the main channel peak value and distance difference in the unexposed data to obtain the first linear slope and first intercept corresponding to each calibration point, and a first linear fitting function is constructed: g1(peak1, point_i)=K2[point_i]·peak1+b2[point_i]; Wherein, peak1 is the peak value of the main channel, K2[point_i] is the first linear slope, and b2[point_i] is the first intercept; the first linear compensation parameter includes the first linear slope and the first intercept.

5. The ranging calibration method according to claim 2, characterized in that, The second linear compensation parameter corresponding to each calibration point is obtained by fitting a subset of the overexposure data, including: A linear function is used to fit the attenuation channel peak and distance difference in the overexposure data to obtain the second linear slope K1 and intercept b1 corresponding to each calibration point, and a second linear fitting function is constructed: g2(peak2, point_i)=K1[point_i]·peak2+b1[point_i]; wherein peak2 is the peak value of the attenuation channel, K1[point_i] is the second linear slope, and b1[point_i] is the second intercept; the second linear compensation parameter includes the second linear slope and the second intercept.

6. A single-photon online ranging compensation method, applied at the measuring end, characterized in that, Loading a standard data packet generated by the distance measurement calibration method according to any one of claims 1 to 5, comprising: collecting the flight distance, main channel peak value and attenuation channel peak value output by the single-photon detector in real time; parsing the standard data packet to obtain a set of calibration points, global nonlinear compensation parameters, first linear compensation parameters and second linear compensation parameters; calculating an offset based on the global nonlinear compensation parameters and the flight distance and main channel peak value collected in real time, constructing a normalized comparison value, performing sequential scanning with a reference sequence, and determining the corresponding calibration interval and adjacent calibration points in the set of calibration points to which the current measurement value belongs, wherein the reference sequence is calculated and generated by the calibration end based on the actual distance of each calibration point and the global nonlinear compensation parameters, arranged in a monotonically increasing manner according to the actual distance, and distributed to the measurement end along with the standard data packet; invoking the first linear compensation parameter or the second linear compensation parameter according to whether the main channel peak value collected in real time is in an overexposure state, and calculating the distance compensation amount corresponding to each adjacent calibration point in combination with the adjacent calibration points; performing weighted interpolation on the distance compensation amount according to the relative position of the normalized comparison value within the calibration interval, so as to output the compensated distance.

7. The single-photon online ranging compensation method according to claim 6, characterized in that, In the step of calculating an offset based on the global nonlinear compensation parameters and the flight distance and main channel peak value collected in real time, constructing a normalized comparison value, performing sequential scanning along the reference sequence, and determining the calibration interval and adjacent calibration points to which the current measurement value belongs: The offset bias=tof−f(peak1); wherein tof is the distance value converted from the time of flight, f(peak1)=a·peak1²+b·peak1+c, and a, b, c are the global nonlinear compensation parameters in the standard data packet; The normalized comparison value target_compare=tof+bias; The rule for performing sequential scanning along the reference sequence compare_avg[i] is: When i=0 and target_compare<compare_avg[0], lock calibration point 0; When compare_avg[i]≤target_compare<compare_avg[i+1], lock the lower bound calibration point i; When i=N−1 and target_compare>compare_avg[N−1] and less than the upper limit of the range, lock the last calibration point N−1; When target_compare≥the upper limit of the range, an invalid flag is returned.

8. The single-photon online ranging compensation method according to claim 7, characterized in that, The step of determining whether the peak value of the main channel acquired in real time is overexposed, calling the first linear compensation parameter or the second linear compensation parameter, and calculating the distance compensation amount corresponding to each adjacent calibration point in combination with the adjacent calibration points includes: If the real-time acquired peak value of the main channel is not overexposed, the first linear slope and the first intercept of the two adjacent calibration points in the first linear compensation parameter are called, and the real-time peak value of the main channel is substituted into the linear function corresponding to the two adjacent calibration points respectively to calculate the first compensation value and the second compensation value. If the peak value of the main channel acquired in real time is overexposed, the second linear slope and the second intercept of the two adjacent calibration points in the second linear compensation parameters are called. The peak value of the real-time attenuation channel is substituted into the linear function corresponding to the two adjacent calibration points respectively to calculate the first compensation value and the second compensation value.

9. The single-photon online ranging compensation method according to claim 7, characterized in that, The step of performing weighted interpolation on the distance compensation amount based on the relative position of the normalized comparison value within the calibration interval to output the compensated distance includes: The right weight is calculated based on the difference between the normalized benchmark value corresponding to the second adjacent calibration point in the benchmark sequence and the normalized comparison value. The left weight is calculated based on the difference between the normalized benchmark value corresponding to the first adjacent calibration point in the benchmark sequence and the normalized comparison value. The first compensation value and the second compensation value are weighted and interpolated according to the right weight and the left weight to obtain the final compensation amount, wherein the final compensation amount is the first compensation value multiplied by the right weight plus the second compensation value multiplied by the left weight, divided by the sum of the right weight and the left weight; The compensated distance is output by subtracting the final compensation amount from the real-time flight distance.

10. A single-photon ranging calibration device with a dual-lens structure, used to perform the ranging calibration method according to any one of claims 1 to 5, characterized in that, include: The calibration standard design module is used to determine a set of calibration points covering the entire range based on the energy distribution relationship of each optical channel. Each calibration point is associated with at least one actual distance and at least two reflectivities. The data acquisition module is used to collect the main channel peak value, attenuation channel peak value, and flight distance of the single-photon detector output at each calibration point according to the calibration point set, and form a structured dataset. The data parsing module is used to identify the reflectance and actual distance corresponding to each data point in the structured dataset, distinguish between overexposed and underexposed data, mark high reflectance data, and generate labeled data correspondences, wherein the high reflectance data is data with a reflectance higher than a preset reflectance threshold. The fitting calculation module is used to fit and obtain the global nonlinear compensation parameter, the first linear compensation parameter, and the second linear compensation parameter based on the data correspondence. The data packaging module is used to package the calibration point set, the global nonlinear compensation parameters, the first linear compensation parameters, and the second linear compensation parameters into a standard data package to be downloaded to the measurement terminal.