Data channel sampling point alignment method and system, electronic device and storage medium

By calculating the standard deviation or variance of the data channel to select the optimal sampling point, constructing a stable interval, and using the center of the common interval to delay the clock signal, the problem of low stable sampling efficiency of the data channel under long cable is solved, and efficient and stable data transmission is achieved.

CN122179440APending Publication Date: 2026-06-09HEFEI I TEK OPTOELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI I TEK OPTOELECTRONICS CO LTD
Filing Date
2026-02-13
Publication Date
2026-06-09

Smart Images

  • Figure CN122179440A_ABST
    Figure CN122179440A_ABST
Patent Text Reader

Abstract

The application discloses a data channel sampling point alignment method, and relates to the field of data processing. The method comprises the following steps: for a plurality of data channels, at each sampling point, obtaining the transmission data of each data channel based on a preset number; for each data channel, respectively calculating the evaluation index of each sampling point; for each data channel, selecting an optimal sampling point; for each data channel, screening out continuous sampling points with an evaluation index less than a preset threshold as a sampling point set; obtaining a stable interval; judging whether there is a common interval in the stable intervals of all data channels; if yes, delaying a clock signal used for data sampling based on a delay time corresponding to the center of the common interval, so as to determine the sampling points of all data channels. Thus, after obtaining the common interval, the application only needs to perform single delay processing on the clock signal, and does not need to delay the data signals in each data channel, so that the alignment efficiency of the sampling points can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing, and particularly relates to a method, system, electronic device, and storage medium for aligning sampling points of a data channel. Background Technology

[0002] During data transmission, as the length of the transmission cable increases, the degree of skew in the data channel will increase, resulting in a smaller range of stable sampling intervals.

[0003] To ensure the stability of data transmission, existing technologies typically align the sampling points of each data channel sequentially to ensure that each sampling point falls within the stable range of the corresponding data channel.

[0004] However, the aforementioned sampling point alignment process requires individual processing of each data channel, and its efficiency still needs to be improved. Summary of the Invention

[0005] This application proposes a sampling point alignment method, system, electronic device, and storage medium for a data channel, which aims to improve alignment efficiency by ensuring that sampling points fall within a stable range.

[0006] To achieve the above objectives, this application proposes the following technical solutions: In a first aspect of this application, a method for aligning sampling points of a data channel is provided, comprising: For several data channels, at each sampling point, the transmitted data of each data channel is acquired based on a preset number of times; the delay time corresponding to different sampling points is different, and the different delay times are formed by increasing a fixed delay step; the data input to the same data channel is fixed at different sampling points; For each data channel, calculate the standard deviation or variance between multiple data transmissions at each sampling point as an evaluation metric. For each data channel, select the sampling point corresponding to the minimum evaluation index within the current data channel as the optimal sampling point; For each data channel, consecutive sampling points with evaluation indicators less than a preset threshold are selected as a set of sampling points; and the delay time period corresponding to the set of sampling points is obtained as a stable interval; wherein, the preset threshold is obtained by multiplying the minimum evaluation indicator of the current data channel by a preset multiple; the value of the preset multiple is obtained after pre-calibration and is not less than 1; Determine whether there is a common interval among the stable intervals of all data channels; if so, delay the clock signal used for data sampling based on the delay time corresponding to the center of the common interval to determine the sampling point of all data channels.

[0007] Optionally, after delaying the clock signal used for data sampling based on the delay time corresponding to the center of the common interval to determine the sampling points of all data channels, the sampling point alignment method further includes: For all data channels, based on the central sampling point, the transmitted data of each data channel is re-acquired multiple times, and the standard deviation or variance between the multiple transmitted data is calculated as a verification index; where the central sampling point refers to the sampling point obtained after delaying the clock signal based on the delay time corresponding to the center of the common interval. Determine whether the verification index of each data channel is less than the preset threshold; if so, then use the central sampling point as the final sampling point for all data channels. If not, select data channels with verification indicators not less than a preset threshold as channels to be calibrated; based on the binary search method, divide the third and fourth delay intervals within the channel to be calibrated, find the sampling point whose evaluation indicator is closest to the preset threshold, and use it as the third and fourth sampling points respectively; for any channel to be calibrated, obtain the delay time interval corresponding to the third and fourth sampling points as the transition interval, and within the original stable interval of the current channel to be calibrated, obtain the remaining two intervals excluding the transition interval as the final stable interval of the current channel to be calibrated; for the other data channels besides the channel to be calibrated, directly use their original stable intervals as the final stable intervals; determine whether there is a common interval among the stable intervals of all data channels; if so, delay the clock signal used for data sampling based on the delay time corresponding to the center of the common interval to determine the sampling points of all data channels; The third delay interval represents the time interval between the central sampling point and the first sampling point; the fourth delay interval represents the time interval between the central sampling point and the second sampling point.

[0008] Optionally, before acquiring the transmitted data of each data channel at each sampling point based on a preset number of times for several data channels, the sampling point alignment method further includes: Increase the delay time interval between adjacent delay time sampling points to reduce the number of sampling points; For each data channel, after selecting consecutive sampling points whose evaluation index is less than a preset threshold and forming a sampling point set, the sampling point alignment method further includes: From the set of sampling points, the sampling points with the shortest delay time and the sampling points with the longest delay time are selected as the starting sampling point and the ending sampling point, respectively. Based on the binary search method, the first delay interval and the second delay interval are divided into two segments to determine the sampling point that is closest to the preset threshold for the evaluation index, which is then used as the first sampling point and the second sampling point, respectively. The first delay interval represents the time period formed by the delay time corresponding to the starting sampling point and the previous sampling point; the second delay interval represents the time period formed by the delay time corresponding to the ending sampling point and the next sampling point. Obtain the time interval formed by the delay times corresponding to the first and second sampling points, and use it as the stable interval of the current data channel.

[0009] Optionally, if the set of sampling points contains only one sampling point, then the starting sampling point and the ending sampling point are the same sampling point.

[0010] Optionally, adjacent sampling points can have the same delay time interval.

[0011] Optionally, after determining whether there is a common interval among the stable intervals of all data channels, the sampling point alignment method further includes: If not, the data signals used for data transmission are delayed based on the delay time corresponding to the optimal sampling point in each data channel to determine the sampling point of each data channel.

[0012] Optionally, if only one data channel exists, the sampling point alignment method further includes, after obtaining the optimal sampling point: Based on the delay time corresponding to the optimal sampling point, the clock signal or data signal is delayed to determine the sampling point of the data channel.

[0013] In a second aspect of this application, a sampling point alignment system for a data channel is provided, comprising: The data acquisition module is used to acquire the transmitted data of each data channel based on a preset number of times for several data channels; the delay time corresponding to different sampling points is different, and the different delay times are formed by increasing a fixed delay step; the data input to the same data channel is fixed under different sampling points; The indicator calculation module is used to calculate the standard deviation or variance between multiple data transmissions at each sampling point for each data channel, as an evaluation indicator. The sampling point selection module is used to select the sampling point corresponding to the minimum evaluation index in the current data channel for each data channel, and use it as the optimal sampling point. The interval acquisition module is used to select continuous sampling points with evaluation indicators less than a preset threshold for each data channel as a set of sampling points; and to acquire the delay time period corresponding to the set of sampling points as a stable interval; wherein, the preset threshold is obtained by multiplying the minimum evaluation indicator of the current data channel by a preset multiple; the value of the preset multiple is obtained after pre-calibration and is not less than 1; The sampling point alignment module is used to determine whether there is a common interval among the stable intervals of all data channels; if so, the clock signal used for data sampling is delayed based on the delay time corresponding to the center of the common interval to determine the sampling point of all data channels.

[0014] In a third aspect of this application, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the sampling point alignment method described in any of the first aspects.

[0015] In a fourth aspect of this application, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the sampling point alignment method described in any of the first aspects.

[0016] The beneficial effects of this application are as follows: This application provides a method for aligning sampling points in a data channel, including: For several data channels, at each sampling point, the transmitted data of each data channel is acquired based on a preset number of times. Different sampling points correspond to different delay times, which are formed by increasing fixed delay steps. The input data for the same data channel is fixed at different sampling points. For each data channel, the standard deviation or variance between multiple transmitted data at each sampling point is calculated as an evaluation index. For each data channel, the sampling point corresponding to the minimum evaluation index within the current data channel is selected as the optimal sampling point. For each data channel, consecutive sampling points with evaluation indices less than a preset threshold are selected as a set of sampling points. The delay time period corresponding to the set of sampling points is obtained as a stable interval. The preset threshold is obtained by multiplying the minimum evaluation index of the current data channel by a preset multiple. The value of the preset multiple is obtained after pre-calibration and is not less than 1. It is determined whether there is a common interval among the stable intervals of all data channels. If so, the clock signal used for data sampling is delayed based on the delay time corresponding to the center of the common interval to determine the sampling points of all data channels.

[0017] Based on the above processing, this application uses the standard deviation or variance between multiple data transmissions as an evaluation index. It is known that the smaller the value of the evaluation index, the higher the data sampling stability of the sampling points at the corresponding delay time. Therefore, the optimal sampling point corresponding to the minimum evaluation index is selected to ensure stable sampling. The minimum evaluation index is amplified using a preset factor, and compared with the obtained preset threshold, multiple sampling points at different delay times that can be stably sampled are selected, constructing a stable interval within each data channel.

[0018] By filtering out the common intervals of stable intervals in all data channels and delaying the clock signal based on the delay time corresponding to the center of the common interval, the final sampling points are obtained. This ensures that the final sampling points are all within the stable intervals of each data channel, guaranteeing the stability of data sampling in each data channel. Furthermore, after obtaining the common intervals, this application only requires a single delay of the clock signal, without delaying the data signals in each data channel, thus improving the alignment efficiency of the sampling points.

[0019] Based on the technical solution provided in this application, support for larger pixel clock data transmission can be achieved with the same CL cable length, and the operation only uses existing CL cables and camera hardware, without increasing the user's operating costs. Furthermore, this solution is simple and reliable, and can be applied to cables and environments with varying conditions. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a schematic diagram of a data transmission method provided in this application; Figure 2 This is a flowchart illustrating a sampling point alignment method provided in this application; Figure 3 This is a test image provided in this application; Figure 4 This is a flowchart illustrating another sampling point alignment method provided in this application; Figure 5 This is a flowchart illustrating another sampling point alignment method provided in this application; Figure 6 This is a structural diagram of a sampling point alignment system provided in this application; Figure 7 This is a structural diagram of an electronic device provided in this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.

[0022] During data transmission, there is a delay difference between the data signal and the clock signal used for sampling, i.e., skew between wire pairs. In addition, there is a delay between differential signals within the signal lines, and skew within the wire pairs, with the magnitude of the skew being positively correlated with the length of the transmission cable. For example, in the existing Camera Link protocol, the maximum supported pixel clock frequency under a specified skew is fixed; in practical applications, with a typical cable length of 15m, the supported clock frequency is approximately 25MHz.

[0023] Considering that the higher the camera clock frequency, the faster the data transmission rate, and that many cameras support a minimum clock frequency of around 40MHz, in order to ensure high-speed transmission of image data acquired by the camera under long CL cables, higher requirements are placed on the sampling point of the clock signal (usually the rising edge or falling edge) being in the stable range of the data signal.

[0024] On the other hand, considering that during data transmission, a 0-1 changing signal is transmitted to carry the data, and the signal needs to be sampled by a clock signal before it can be converted into a 0-1 binary stream.

[0025] For a single cycle of a data signal, the sampling point of the clock signal should be located within a stable level range (i.e., a stable range), rather than a transitional range of 0-1 changes, to avoid unstable sampled values. The length of the rising and falling edges of the 0-1 transition is also affected by the cable length; the longer the cable, the longer the transition range, and the narrower the window for stable sampling. For example... Figure 1 As shown, the area corresponding to the horizontal line is the stable window of this application, and the area corresponding to the diagonal line is the transition interval. Figure 1 This is for illustrative purposes only; in actual operation, signal changes are not linear.

[0026] Based on the aforementioned factors, during data transmission, in the long cable mode, the stable range within the data channel is narrower and the skew is increased, which places higher demands on aligning the sampling points of the clock signal to the stable range.

[0027] For scenarios using multiple data channels for data transmission, it is usually sufficient to perform a matching process for the sampling points within each data channel separately. However, the aforementioned sampling point alignment method requires processing each data channel individually, and its efficiency still needs improvement.

[0028] To address the aforementioned issues, this application proposes a method for aligning sampling points in a data channel, such as... Figure 2 As shown, the method includes the following steps: S1. For several data channels, at each sampling point, the transmission data of each data channel is acquired based on a preset number of times; wherein, the delay time corresponding to different sampling points is different, and the different delay times are formed by increasing a fixed delay step; at different sampling points, the data input to the same data channel is fixed.

[0029] S2. For each data channel, calculate the standard deviation or variance between multiple data transmissions at each sampling point as an evaluation indicator.

[0030] S3. For each data channel, select the sampling point corresponding to the minimum evaluation index in the current channel as the optimal sampling point.

[0031] S4. For each data channel, select consecutive sampling points whose evaluation index is less than a preset threshold, and use this as a sampling point set; then obtain the delay time period corresponding to the sampling point set as a stable interval. The preset threshold is obtained by multiplying the minimum evaluation index of the current data channel by a preset multiple. The preset multiple is pre-calibrated and is not less than 1.

[0032] S5. Determine whether there is a common interval among the stable intervals of all data channels. If so, proceed to step S6.

[0033] S6. Based on the delay time corresponding to the center of the common interval, delay the clock signal used for data sampling to determine the sampling points of all data channels.

[0034] Based on the above processing, this application uses the standard deviation or variance between multiple data transmissions as an evaluation index. It is known that the smaller the value of the evaluation index, the higher the data sampling stability of the sampling points at the corresponding delay time. Therefore, the optimal sampling point corresponding to the smallest evaluation index is selected to ensure stable sampling. Subsequently, the smallest evaluation index is amplified using a preset factor, and compared with the evaluation index based on the obtained preset threshold to select sampling points at multiple delay times that can be stably sampled, thereby constructing a stable interval within each data channel.

[0035] By filtering out the common intervals of stable intervals in all data channels and delaying the clock signal based on the delay time corresponding to the center of the common interval, the final sampling points are obtained. This ensures that the final sampling points are all within the stable intervals of each data channel, guaranteeing the stability of data sampling in each data channel. Furthermore, after obtaining the common intervals, this application only requires a single delay of the clock signal, eliminating the need to delay the data signals in each data channel, thus improving the alignment efficiency of the sampling points.

[0036] The data channel proposed in this application represents a transmission link that uses an external clock signal to trigger sampling. The rising or falling edge of the clock signal can be the sampling point in this application. For transmitted data, there are stable and transition regions within a signal cycle. When the sampling point is in the transition region, it is very easy to cause errors in the acquired data. Therefore, during data transmission, it is required that the sampling points of the clock signal fall within the stable region of the transmitted signal of each data channel. Furthermore, for each data channel, due to the certain delay between the data transmission line and the data receiving end, it is very easy for different phase deviations (i.e., offsets) to exist between the clock signal and the transmitted signal of each data channel.

[0037] For a single transmission cable, there can be multiple or a single data channel, corresponding to the several data channels in step S1. For these multiple data channels, the input devices are identical, and can be data acquisition devices such as cameras and temperature sensors, or data processing devices such as computers. Similarly, the output devices for these multiple data channels are also identical, and can be data processing devices such as image acquisition cards and computers.

[0038] For step S1, the range of delay intervals corresponding to all delay times is a single data cycle in the data transmission process. Different sampling points correspond to different delay times, which can be obtained by successively increasing the delay step size by a fixed time. That is, adjacent sampling points correspond to the same delay time interval. The delay time interval corresponds to a single delay step size.

[0039] The total number of sampling points can be controlled by adjusting the delay step size. Increasing the delay step size results in fewer sampling points per data period and higher computational efficiency, but it reduces the accuracy of subsequent optimal sampling points and stable intervals. In practice, the delay step size can be adjusted according to accuracy and efficiency requirements. For example, when the total number of data channels is larger, the accuracy requirement for the stable interval is higher, requiring a smaller delay step size to improve the accuracy of optimal sampling point and stable interval calculations.

[0040] At each sampling point, this application acquires the output result (i.e., the transmission data of this application) of each data channel multiple times from the output end of that data channel. For the same data channel, the data input at the input end remains constant across sampling points with different delay times and during the multiple data acquisition processes of the data channel.

[0041] Taking a camera as the input end of a data channel and an image acquisition card as the output end as an example, the camera sends a fixed test image. This test image is transmitted in parallel through several data links, with each data link transmitting pixel data at the same fixed location. The test image is as follows: Figure 3 As shown. Alternatively, the data input to the input terminal can be directly composed of binary data 0s and 1s. In this application, the binary data corresponding to one byte serves as a basic value for calculating the evaluation index.

[0042] In step S1, the preset number of times is usually multiple, and the number of times data is acquired within each data channel remains consistent. Considering that a higher number of times results in a more accurate calculated standard deviation or variance, but increases computation time, the number of times can be adjusted based on the total number of data channels or the length of the transmission cable. If the total number of data channels is higher or the length of the transmission cable is longer, the accuracy requirement for the calculation results of the evaluation index is higher, and in this case, the number of times data is acquired can be increased.

[0043] For step S2, taking the transmission of test images as an example, each acquired transmission data contains only a single row of pixels. For the same data channel, the total number of single-row pixel images acquired at each sampling point is n. The standard deviation σ of these n single-row pixel images is calculated using the following formula: .

[0044] Where w represents the width of a single row of pixels, and j represents the column coordinate of the pixel. Represents pixel P j The standard deviation of pixels in n output images.

[0045] Pixel standard deviation The calculation formula is .in, This represents the pixel value of the j-th pixel in the i-th image; Let represent the mean of the j-th pixel in n images; i represents the sorting order of the output images.

[0046] Among them, pixel mean The calculation formula is .

[0047] The formula for calculating the variance C of n output images is as follows: ,in, Represents pixel P j The pixel variance in n output images.

[0048] Pixel variance The calculation formula is .

[0049] Similarly, if the data link transmits binary data consisting of 0s and 1s, then the value corresponding to one byte is used as the basic unit for calculating the standard deviation or variance, corresponding to the single pixel value in the aforementioned image transmission example. Furthermore, the total number of bytes in a single transmission corresponds to the width w of a single row of pixels, and the number of times data is transmitted at the same sampling point corresponds to the total image size n in the aforementioned example. Likewise, the standard deviation or variance between multiple transmissions at a single sampling point can be calculated as an evaluation metric.

[0050] Understandably, the smaller the standard deviation and variance, the more similar the multiple transmissions of data received by the data channel receiver are, indicating higher data transmission stability. Therefore, this application sets the standard deviation or variance as an evaluation index and determines the stability range based on its value.

[0051] For step S3, the minimum evaluation index means that the value of the evaluation index is the smallest, which corresponds to the optimal stability of data transmission under the current delay time, that is, the sampling point under the current delay time is at its optimal state.

[0052] In one implementation, the process of obtaining the optimal sampling point for a data channel can be as follows: By using a fixed delay step, a single data cycle in the pixel data transmission process is pre-divided into H parts, corresponding to H sampling points. At each sampling point, n images are acquired, each containing w pixels. Then, at each delay step, for each of the n received images, the pixel mean value and the pixel mean squared error for that pixel are calculated. Next, the sum of the mean squared errors of all pixels in the n output images is calculated to represent the degree of data variation at the current step. Finally, the degree of data variation in the output images at all sampling points is compared, and the optimal sampling point is selected based on the minimum variance.

[0053] For step S4, the product of the minimum evaluation index and a preset multiple is used as the preset threshold. For evaluation indices that are less than the preset threshold, the stability of their data transmission results is considered to be within an acceptable range, meaning the corresponding sampling points are in a stable interval.

[0054] The preset multiplier is used to "stretch" the sampling points with optimal stability, thereby constructing a stable interval based on the stable sampling points obtained in step S3. The preset multiplier is obtained after pre-marking, and its value represents the acceptability of the current data channel for data stability, and is not less than 1. The higher the allowable error rate for data transmission in the data channel, the larger the preset multiplier can be. In practice, the preset multiplier is usually 1.

[0055] In one implementation, the preset threshold can be obtained directly after pre-calibration, without needing to be calculated based on the minimum evaluation index.

[0056] For step S5, the common interval represents the interval in which the sampling point can be stably sampled in all data channels.

[0057] For step S6, after obtaining the common interval, the clock signal is delayed by the delay time corresponding to the center point of the common interval, so that the sampling point is located at the center of the common interval, ensuring that each data channel can be sampled stably. In this application, the delay of the clock signal or data signal can be implemented by methods such as the head delay chain method or PLL (phase-locked loop).

[0058] like Figure 4 As shown, after step S5, if there is no shared interval, proceed to step S7 below.

[0059] S7. Based on the delay time corresponding to the optimal sampling point in each data channel, delay the data signal used for data transmission to determine the sampling point of each data channel.

[0060] For step S7, the data signals of each data channel are delayed to correct the skew between the data signal and the clock signal, so that the sampling points in each data channel are in the stable range.

[0061] If there is only one data channel, after obtaining the optimal sampling point in step S3, the sampling point alignment method provided in this application further includes the following steps: S8. Based on the delay time corresponding to the optimal sampling point, delay the clock signal or data signal to obtain the sampling point of the data channel.

[0062] For step S8, since there is only one data channel, after obtaining the delay time of the optimal sampling point, either the clock signal or the data signal can be delayed to achieve the purpose of aligning the sampling point to the stable range.

[0063] In some embodiments, prior to step S1, the sampling point alignment method provided in this application may further include the following steps: S9. Increase the delay interval between adjacent delay times to reduce the number of sampling points.

[0064] For step S9, by increasing the delay interval between adjacent delay times, the number of sampling points during the alignment process is reduced, which can improve alignment efficiency.

[0065] For each data channel, after selecting consecutive sampling points whose evaluation index is less than a preset threshold and forming a sampling point set, the sampling point alignment method further includes the following steps: S10. In the set of sampling points, obtain the sampling points with the shortest delay time and the longest delay time respectively, and use them as the starting sampling point and the ending sampling point.

[0066] S11. Based on the binary search method, the first delay interval and the second delay interval are divided respectively to determine the sampling point that is closest to the preset threshold for the evaluation index, which is then used as the first sampling point and the second sampling point, respectively. The first delay interval represents the time period formed by the delay time corresponding to the starting sampling point and the previous sampling point. The second delay interval represents the time period formed by the delay time corresponding to the ending sampling point and the next sampling point.

[0067] S12. Obtain the time interval formed by the delay time corresponding to the first sampling point and the second sampling point, as the stable interval of the current data channel.

[0068] For step S10, if there are multiple sampling points in the sampling point set, the sampling points at both ends can be directly obtained as the starting sampling point and the ending sampling point, respectively. If the sampling point set contains only one sampling point, then the starting sampling point and the ending sampling point are the same sampling point.

[0069] For step S11, taking the first delay interval as an example, the bisection process may include the following: First, the center point of the first delay interval is used as the first sampling point, and then an evaluation index for the first sampling point is calculated. If the evaluation index exceeds a preset threshold, it indicates that the boundary point of the stable interval has not reached the first sampling point, and the interval between the first sampling point and the starting sampling point is used as the interval for the next bisection. If the evaluation index does not exceed the preset threshold, it indicates that the boundary point of the stable interval includes the first sampling point, and the interval between the first sampling point and the previous sampling point is used as the interval for the next bisection.

[0070] Similarly, taking the second delay interval as an example, the bisection process can include the following: First, the center point of the second delay interval is used as the second sampling point, and then an evaluation index for the second sampling point is calculated. If the evaluation index exceeds a preset threshold, it indicates that the boundary point of the stable interval has not reached the second sampling point, and the interval between the second sampling point and the last sampling point is used as the interval for the next bisection. If the evaluation index does not exceed the preset threshold, it indicates that the boundary point of the stable interval includes the second sampling point, and the interval between the second sampling point and the next sampling point is used as the interval for the next bisection.

[0071] Therefore, the above binary search process is repeated. By successively comparing the evaluation index corresponding to the center point of the interval with the preset threshold, the boundary points of the stable interval are precisely divided until the division of the center point of the interval cannot be completed or the preset conditions are met. However, since there is a minimum unit for the delay step size, using the shortest delay step size may eventually result in the inability to complete the division of the center point of the interval.

[0072] Based on the aforementioned processing steps S10 to S12, by first coarsely dividing the sampling points and then subdividing them, we can not only reduce the number of evaluation index calculations required during the alignment process and improve the sorting efficiency, but also ensure that the boundary points of the stable interval can be accurately found by the subsequent bisection method, thus guaranteeing the accuracy of the subsequent center point alignment.

[0073] In some embodiments, for data channels with small transition intervals, the delay interval between adjacent sampling points may exceed the transition interval, resulting in a stable interval containing the transition interval, and the sampling point corresponding to the center of the subsequent common interval still falling within the transition interval. To avoid the above situation, after step S6, the sampling point alignment method provided in this application further includes the following steps: S13. For all data channels, based on the central sampling point, repeatedly acquire the transmitted data of each data channel and calculate the standard deviation or variance between the multiple transmissions as a verification indicator. The central sampling point refers to the sampling point obtained after delaying the clock signal based on the delay time corresponding to the center of the common interval.

[0074] Based on the above processing, a verification index is calculated to check whether the center sampling point of each data channel falls within the transition range.

[0075] S14. Determine whether the verification index of each data channel is less than the preset threshold; if yes, proceed to step S15; if yes, proceed to step S16.

[0076] S15. Use the central sampling point as the final sampling point for all data channels.

[0077] Based on the aforementioned processing, if the verification index of each data channel is less than the preset threshold, it means that the central sampling point is not in the transition range in all data channels and can be sampled stably. The central sampling point can be used as the final sampling point of all data channels for subsequent data transmission.

[0078] S16. Select data channels whose verification index is not less than a preset threshold as channels to be calibrated. Based on the binary search method, divide the third and fourth delay intervals within the channel to be calibrated, and find the sampling point whose evaluation index is closest to the preset threshold, which is then used as the third and fourth sampling points, respectively. For any channel to be calibrated, obtain the delay time interval corresponding to the third and fourth sampling points as the transition interval. Within the original stable interval of the current channel to be calibrated, obtain the remaining two intervals excluding the transition interval, which are used as the final stable interval of the current channel to be calibrated. For the other data channels besides the channel to be calibrated, directly use their original stable intervals as the final stable intervals. Determine whether there is a common interval among the stable intervals of all data channels; if so, delay the clock signal used for data sampling based on the delay time corresponding to the center of the common interval to determine the sampling points of all data channels.

[0079] The third delay interval represents the time interval between the central sampling point and the first sampling point; the fourth delay interval represents the time interval between the central sampling point and the second sampling point.

[0080] Considering that the sampling point range of this application corresponds to a single data period, and due to the influence of line pair skew, the actual stable interval of the data channel in this application may correspond to both ends of all sampling points, while the middle area may actually be a transition interval. Furthermore, if the delay interval between adjacent sampling points exceeds the transition interval, it is highly likely that the obtained stable interval will include the transition interval.

[0081] In response, after each data channel is checked in step S14, in step S16, the channels containing jump intervals are first identified. Then, for each channel to be calibrated, referring to the bisection process in step S11, a "stretching" process is performed based on the center sampling point, and the third and fourth sampling points are found to correspond to the two endpoints of the jump interval. Next, the obtained stable interval is taken as the original stable interval. For each channel to be calibrated, the jump interval is removed from this original stable interval, and the remaining two intervals are the final stable intervals of the current channel to be calibrated. Finally, the final stable intervals of each channel to be calibrated are obtained and compared with the original stable intervals in the remaining data channels (excluding the channels to be calibrated). The process then proceeds to step S5 to determine if there are any shared intervals among all data channels, in order to re-align the sampling points.

[0082] It is worth noting that for a single data channel, there are at most two different regions within the stable interval of this application. Therefore, after step S16, it can be ensured that the final stable interval obtained does not contain any transition intervals.

[0083] In some embodiments, this application also provides a sampling point alignment process, such as Figure 5 As shown, it includes the following: Step 1: Preparation. Set the camera to test map mode and divide the sampleable interval into H equal parts.

[0084] Step 2: At the current sampling point, collect n rows of pixel data as n output images.

[0085] Step 3: Calculate the degree of change of all pixels in the output image using the standard deviation to obtain the overall degree of data change.

[0086] Step 4: Offset the sampling point by 1 unit and continue execution until the last position is reached.

[0087] Step 5: Select the position with the smallest data change as the current sampling point.

[0088] Other data channels use the same process and are processed synchronously.

[0089] In some embodiments, this application also provides a sampling point alignment system for a data channel, such as Figure 6 As shown, the sampling point alignment system includes: The data acquisition module 601 is used to acquire the transmission data of each data channel based on a preset number of times for several data channels; wherein, the delay time corresponding to different sampling points is different, and the different delay times are formed by increasing a fixed delay step size; under different sampling points, the data input to the same data channel is fixed.

[0090] The indicator calculation module 602 is used to calculate the standard deviation or variance between multiple transmissions of data at each sampling point for each data channel, as an evaluation indicator.

[0091] The sampling point selection module 603 is used to select the sampling point corresponding to the minimum evaluation index in the current data channel for each data channel as the optimal sampling point.

[0092] The interval acquisition module 604 is used to, for each data channel, filter out continuous sampling points whose evaluation index is less than a preset threshold, as a set of sampling points; and acquire the delay time period corresponding to the set of sampling points as a stable interval. The preset threshold is obtained by multiplying the minimum evaluation index of the current data channel by a preset multiple; the preset multiple is obtained after pre-calibration and is not less than 1.

[0093] The sampling point alignment module 605 is used to determine whether there is a common interval among the stable intervals of all data channels; if so, the clock signal used for data sampling is delayed based on the delay time corresponding to the center of the common interval to determine the sampling point of all data channels.

[0094] In some embodiments, after determining whether there is a common interval in the stable intervals of all data channels, the sampling point alignment module 605 further includes the following: If not, the data signals used for data transmission are delayed based on the delay time corresponding to the optimal sampling point in each data channel to determine the sampling point of each data channel.

[0095] This application also provides an electronic device, such as... Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704. Memory 703 is used to store computer programs; The processor 701, when executing the program stored in the memory 703, implements any of the above sampling point alignment methods.

[0096] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0097] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0098] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0099] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0100] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements any of the sampling point alignment method steps described above.

[0101] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the sampling point alignment method steps in the above embodiments.

[0102] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for aligning sampling points in a data channel, characterized in that, include: For several data channels, at each sampling point, the transmitted data of each data channel is acquired based on a preset number of times; the delay time corresponding to different sampling points is different, and the different delay times are formed by increasing a fixed delay step; the data input to the same data channel is fixed at different sampling points; For each data channel, calculate the standard deviation or variance between multiple data transmissions at each sampling point as an evaluation metric. For each data channel, select the sampling point corresponding to the minimum evaluation index within the current data channel as the optimal sampling point; For each data channel, consecutive sampling points with evaluation indicators less than a preset threshold are selected as a set of sampling points; and the delay time period corresponding to the set of sampling points is obtained as a stable interval; wherein, the preset threshold is obtained by multiplying the minimum evaluation indicator of the current data channel by a preset multiple; the value of the preset multiple is obtained after pre-calibration and is not less than 1; Determine whether there is a common interval among the stable intervals of all data channels; if so, delay the clock signal used for data sampling based on the delay time corresponding to the center of the common interval to determine the sampling point of all data channels.

2. The sampling point alignment method according to claim 1, characterized in that, After delaying the clock signal used for data sampling based on the delay time corresponding to the center of the common interval to determine the sampling points of all data channels, the sampling point alignment method further includes: For all data channels, based on the central sampling point, the transmitted data of each data channel is re-acquired multiple times, and the standard deviation or variance between the multiple transmitted data is calculated as a verification index; where the central sampling point refers to the sampling point obtained after delaying the clock signal based on the delay time corresponding to the center of the common interval. Determine whether the verification index of each data channel is less than the preset threshold; if so, then use the central sampling point as the final sampling point for all data channels. If not, select data channels with verification indicators not less than a preset threshold as channels to be calibrated; based on the binary search method, divide the third and fourth delay intervals within the channel to be calibrated, find the sampling point whose evaluation indicator is closest to the preset threshold, and use it as the third and fourth sampling points respectively; for any channel to be calibrated, obtain the delay time interval corresponding to the third and fourth sampling points as the transition interval, and within the original stable interval of the current channel to be calibrated, obtain the remaining two intervals excluding the transition interval as the final stable interval of the current channel to be calibrated; for the other data channels besides the channel to be calibrated, directly use their original stable intervals as the final stable intervals; determine whether there is a common interval among the stable intervals of all data channels; if so, delay the clock signal used for data sampling based on the delay time corresponding to the center of the common interval to determine the sampling points of all data channels; The third delay interval represents the time interval between the central sampling point and the first sampling point; the fourth delay interval represents the time interval between the central sampling point and the second sampling point.

3. The sampling point alignment method according to claim 1, characterized in that, Before acquiring the transmitted data of each data channel a preset number of times at each sampling point for several data channels, the sampling point alignment method further includes: Increase the delay time interval between adjacent delay time sampling points to reduce the number of sampling points; For each data channel, after selecting consecutive sampling points whose evaluation index is less than a preset threshold and forming a sampling point set, the sampling point alignment method further includes: From the set of sampling points, the sampling points with the shortest delay time and the sampling points with the longest delay time are selected as the starting sampling point and the ending sampling point, respectively. Based on the binary search method, the first delay interval and the second delay interval are divided into two segments to determine the sampling point that is closest to the preset threshold for the evaluation index, which is then used as the first sampling point and the second sampling point, respectively. The first delay interval represents the time period formed by the delay time corresponding to the starting sampling point and the previous sampling point; the second delay interval represents the time period formed by the delay time corresponding to the ending sampling point and the next sampling point. Obtain the time interval formed by the delay times corresponding to the first and second sampling points, and use it as the stable interval of the current data channel.

4. The sampling point alignment method according to claim 3, characterized in that, If the set of sampling points contains only one sampling point, then the starting sampling point and the ending sampling point are the same sampling point.

5. The sampling point alignment method according to claim 1, characterized in that, The delay time intervals corresponding to adjacent sampling points are consistent.

6. The sampling point alignment method according to claim 1 or 2, characterized in that, After determining whether there is a common interval in the stable intervals of all data channels, the sampling point alignment method further includes: If not, the data signals used for data transmission are delayed based on the delay time corresponding to the optimal sampling point in each data channel to determine the sampling point of each data channel.

7. The sampling point alignment method according to claim 1, characterized in that, If there is only one data channel, then after obtaining the optimal sampling point, the sampling point alignment method further includes: Based on the delay time corresponding to the optimal sampling point, the clock signal or data signal is delayed to determine the sampling point of the data channel.

8. A sampling point alignment system for a data channel, characterized in that, include: The data acquisition module is used to acquire the transmitted data of each data channel based on a preset number of times for several data channels; the delay time corresponding to different sampling points is different, and the different delay times are formed by increasing a fixed delay step; the data input to the same data channel is fixed under different sampling points; The indicator calculation module is used to calculate the standard deviation or variance between multiple data transmissions at each sampling point for each data channel, as an evaluation indicator. The sampling point selection module is used to select the sampling point corresponding to the minimum evaluation index in the current data channel for each data channel, and use it as the optimal sampling point. The interval acquisition module is used to select continuous sampling points with evaluation indicators less than a preset threshold for each data channel as a set of sampling points; and to acquire the delay time period corresponding to the set of sampling points as a stable interval; wherein, the preset threshold is obtained by multiplying the minimum evaluation indicator of the current data channel by a preset multiple; the value of the preset multiple is obtained after pre-calibration and is not less than 1; The sampling point alignment module is used to determine whether there is a common interval among the stable intervals of all data channels; if so, the clock signal used for data sampling is delayed based on the delay time corresponding to the center of the common interval to determine the sampling point of all data channels.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the sampling point alignment method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program that, when executed by a processor, implements the sampling point alignment method according to any one of claims 1-7.