Dynamic multi-constraint self-adaptive wave crest and wave trough coupling edge finding positioning method and device and medium
Through the dynamic multi-constrained adaptive peak-valley coupling edge patrol positioning method, the accuracy and consistency problems of reflective photoelectric sensors in detecting lateral offsets in the horizontal plane are solved, and high-precision and low-error rate positioning is achieved under complex working conditions.
Patent Information
- Application Number
- CN202510547579.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-10-10
AI Technical Summary
Existing reflective photoelectric sensors have problems with unstable accuracy, poor result consistency and high misjudgment rate when detecting lateral offset in the horizontal plane. Especially under complex working conditions, it is difficult to meet the comprehensive requirements of accuracy, robustness and misjudgment suppression.
A dynamic multi-constrained adaptive peak-valley coupled patrol positioning method is adopted. Through periodic data collection, a storage queue is formed, and analysis sections are adaptively divided. Combined with the extreme value search of peaks and troughs, parallel verification and coupling calculation are performed to generate positioning control instructions for offset compensation.
It improves detection accuracy and result consistency, reduces the misjudgment rate, enhances adaptability to complex working conditions, and ensures noise resistance and robustness under dynamic interference.
Smart Images

Figure CN120763576A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data monitoring technology, and in particular to a dynamic multi-constrained adaptive peak-valley coupling edge patrol positioning method, device and medium. Background Art
[0002] Reflective photoelectric sensors, key components for industrial distance measurement and positioning, typically detect distance by receiving light reflected from a target surface. Currently, these sensors primarily operate in two modes: measuring the vertical distance between the sensor and the target surface, and determining vertical displacement of the measured surface based on a threshold change in reflected light intensity.
[0003] However, when it comes to detecting lateral offsets in the horizontal plane (such as measuring position deviations relative to a marking line during edge patrol), existing technologies have significant flaws. Specifically, the sensor relies on a fixed threshold or linear variation model to process reflected light signals. When the reflective properties of the target surface fluctuate (such as due to uneven material or ambient light interference), the signal baseline stability decreases, resulting in fluctuations in edge patrol detection accuracy and insufficient consistency in output results. Second, edge patrol algorithms often determine offsets based on a single parameter (such as peak intensity or pulse width ratio). Under complex working conditions (such as dynamic speed changes or sudden changes in surface texture), it is difficult to distinguish between true offset signals and noise interference, leading to an increased misjudgment rate.
[0004] Due to the above technical defects, existing methods are difficult to simultaneously meet the comprehensive requirements of accuracy, robustness and misjudgment suppression in industrial high-precision edge patrol applications. Summary of the Invention
[0005] (1) Technical issues to be resolved
[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a dynamic multi-constrained adaptive peak-to-valley coupled edge patrol positioning method, device and medium, which solves the technical problems of existing reflective photoelectric sensors due to inherent defects in the reflected light signal processing mechanism and insufficient adaptability of the edge patrol algorithm model, resulting in limited detection accuracy, poor result repeatability and high dynamic interference misjudgment rate.
[0007] (2) Technical solution
[0008] In order to achieve the above objectives, the main technical solutions adopted by the present invention include:
[0009] In a first aspect, an embodiment of the present invention provides a dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method, comprising:
[0010] By controlling the movement of the patrol device, patrol data is periodically acquired and a storage queue is formed;
[0011] When the data capacity of the storage queue reaches a preset capacity threshold, the system adaptively divides the data into at least two independent analysis segments based on the amplitude variation characteristics of the time series data. It then performs an extreme value search on each analysis segment to determine the peaks, and traverses the transition areas between adjacent peak pairs to search for the absolute minimum amplitude point as the trough reference point.
[0012] Verify in parallel whether the spacing between adjacent peak pairs falls within the correlation tolerance interval, and whether the trough reference point satisfies the product constraint of the smaller peak value in the peak pair and the preset contrast coefficient;
[0013] If there is a peak pair that passes the verification, select the position of a single trough reference point or the center position of multiple trough reference points as the trough detection point according to the determined trough distribution pattern;
[0014] The edge patrol marking line is analyzed based on the coupling calculation of the trough detection point and the corresponding peak spacing, and the positioning control instruction with offset compensation is generated and output in combination with the motion step parameters of the edge patrol device.
[0015] Optionally, controlling the border patrol device to move, periodically acquiring the border patrol data, and forming a storage queue includes:
[0016] Establish a mapping relationship between the number of movement steps of the border patrol device and the data collected by the border patrol sensor. The accumulated movement distance of the border patrol device reaches a preset integer multiple of the movement step length as the collection trigger condition. The analog-to-digital conversion value of the border patrol sensor is synchronously collected when each trigger event occurs.
[0017] The collected analog-to-digital conversion values are written into the pre-initialized storage queue in sequence according to the acquisition timing and the trigger timing number. Each time new data is written, it automatically occupies the end index position of the queue;
[0018] The preset integer multiple motion step size is a configurable parameter, which is used to control the minimum movement distance of the device between two adjacent data collections.
[0019] Optionally, when the data capacity of the storage queue reaches a preset capacity threshold, before adaptively dividing the data into at least two independent analysis segments based on the amplitude variation characteristics of the time series data, the method further includes:
[0020] Monitor the current data capacity of the current storage queue in real time to determine whether it has reached the preset capacity threshold:
[0021] If the data capacity of the current storage queue does not reach the preset capacity threshold, the queue data storage state is maintained, the analog-to-digital conversion value collection of the edge patrol sensor in the next cycle is triggered, and the new data is appended to the end of the queue in time series;
[0022] If the data capacity of the current storage queue reaches the preset capacity threshold, the data append operation is suspended and the current storage queue data is locked.
[0023] Optionally, when the data capacity of the storage queue reaches a preset capacity threshold, based on the amplitude variation characteristics of the time series data, adaptively dividing the data into at least two independent analysis segments, performing an extreme value search on each analysis segment to determine a peak, and traversing the transition region between adjacent peak pairs to search for an absolute minimum amplitude point as a trough reference point includes:
[0024] Based on the amplitude gradient change characteristics of the time series data, the complete time series data of the storage queue is divided into a forward phase segment and a backward phase segment with symmetrical time series intervals;
[0025] Performing a maximum traversal search in a time-series increasing direction in the forward phase segment to capture the maximum peak point as the first wave peak feature point;
[0026] Synchronously or asynchronously, performing a maximum traversal search in a time-decreasing direction in the backward phase segment to capture a maximum peak point as a second peak feature, wherein both the first peak feature point and the second peak feature point include peak intensity and corresponding time coordinates;
[0027] Based on the spatiotemporal mapping relationship between the adjacent first peak feature points and the second peak feature points, a data search window for the transition area between the two peaks is constructed;
[0028] An initial search window is established based on the time coordinates of the captured first and second wave peak feature points, and the boundaries of the initial search window are dynamically expanded bidirectionally along the time axis, extending forward until a continuous amplitude increasing sequence is detected, and extending backward until a continuous amplitude decreasing sequence is detected;
[0029] Noise suppression is performed on the expanded window to remove abnormal fluctuation data. The window validity is double-verified based on the preset window length requirements and the number of data points in the window. If the double verification fails, peak reselection is triggered.
[0030] Perform a full data pass within the doubly validated data search window to identify the absolute minimum amplitude point, which is marked as the trough reference point.
[0031] Optionally, the step of checking whether the spacing between adjacent peak pairs falls within a correlation tolerance interval and whether the trough reference point satisfies a constraint of a product of a smaller peak value in the peak pair and a preset contrast coefficient includes:
[0032] Calibrate the time interval between the adjacent first peak feature point and the second peak feature point, and perform two checks in parallel:
[0033] Whether the time series interval distance is within the preset correlation tolerance interval; wherein the correlation tolerance interval is the legal boundary between the minimum and maximum allowable interval distances between adjacent peak feature points in the time series or spatial dimension;
[0034] Whether the amplitude of the trough reference point is smaller than the dynamic threshold value generated by multiplying the smaller value of the adjacent first peak feature point and the second peak feature point by the preset peak-to-trough contrast coefficient;
[0035] When any check fails, the queue data update mechanism is triggered, the oldest data point at the head of the queue is removed, and the latest collected data is appended to the tail of the queue to keep the queue capacity constant.
[0036] Optionally, if there is a peak pair that passes the verification, selecting the position of a single trough reference point or the center position of multiple trough reference points as the trough detection point according to the determined trough distribution pattern includes:
[0037] In the time series interval of adjacent peak pairs that have passed parallel verification, the amplitudes of all consecutive data points in the data search window in the transition region between peaks are traversed, and the set of data points whose amplitudes form a trough reference point is recorded;
[0038] If the data point set contains only a single data point, the time series coordinate of the point is directly marked as the trough detection point;
[0039] If the data point set contains two or more continuously distributed equal-amplitude points, the starting and ending time series coordinates of the equal-amplitude platform area formed by multiple continuously distributed equal-amplitude points are extracted, the arithmetic mean of the starting and ending time series coordinates is calculated, and the coordinates of the geometric center point corresponding to the calculation result are used as the trough detection point;
[0040] If the data point set contains two or more discretely distributed equal-amplitude points, extract the time series coordinates of all discretely distributed equal-amplitude points, perform arithmetic average calculation on all time series coordinates, and use the calculation result as the trough detection point;
[0041] The final determined valley detection point timing coordinates are aligned with the global timing reference of the current storage queue to generate a standardized valley position index value.
[0042] Optionally, the edge patrol marking line is analyzed based on the coupling calculation of the trough detection point and the corresponding peak spacing, and the positioning control instruction with offset compensation is generated and output in combination with the motion step length parameter of the edge patrol device, including:
[0043] Mapping the time series coordinates of the trough detection point to the physical coordinate system of the border patrol device;
[0044] Based on the number of steps of the stepper motor of the motion unit corresponding to the measured peak spacing, combined with the geometric spacing parameters of the built-in laser transmitting module and laser receiving module, a laser triangulation measurement model is constructed;
[0045] Based on the laser triangulation model and the principle of geometric projection, the angle between the laser emission axis and the receiving optical path is used as the input parameter to reversely infer the actual position coordinates of the marking line in three-dimensional space.
[0046] The actual position coordinates obtained by solving in three-dimensional space are compared with the preset standard marking line coordinates in multiple axes to obtain the horizontal axial offset and the vertical axial offset;
[0047] Generate a stepper motor compensation step instruction based on the horizontal offset, and generate a sensor gain adjustment instruction based on the vertical offset to form a closed-loop control signal;
[0048] The horizontal position of the time series coordinate is determined by multiplying the real-time cumulative motion step length of the stepper motor by the preset single-step distance, and the vertical position is determined by matching the analog-to-digital conversion value collected by the edge patrol sensor with the interpolation of the preset calibration curve.
[0049] The laser triangulation measurement model includes the baseline distance determined by the physical distance between the optical center of the laser transmitting module and the optical center of the laser receiving module, the projection angle determined by the difference between the laser incident angle and the reflection angle inferred from the stepper motor step data corresponding to the adjacent wave peak spacing, and the spot displacement determined by the mapping relationship between the spot offset distance in the sensing area of the laser receiving module and the step length of the stepper motor.
[0050] In a second aspect, an embodiment of the present invention provides a dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning system, comprising:
[0051] A queue formation module is used to periodically acquire patrol data and form a storage queue by controlling the movement of the patrol device;
[0052] A feature point search module is used to adaptively divide the data into at least two independent analysis segments based on the amplitude variation characteristics of the time series data when the data capacity of the storage queue reaches a preset capacity threshold. The module performs an extreme value search on each analysis segment to determine the peaks, and traverses the transition areas between adjacent peak pairs to search for the absolute minimum amplitude point as the trough reference point.
[0053] A dual-line waveform verification module is used to verify in parallel whether the spacing between adjacent peak pairs falls within the correlation tolerance interval, and whether the trough reference point satisfies the product constraint of the smaller peak value in the peak pair and the preset contrast coefficient;
[0054] A trough detection point determination module is used to select the position of a single trough reference point or the center position of multiple trough reference points as the trough detection point according to the determined trough distribution pattern if there is a peak pair that passes the verification;
[0055] The patrol positioning module is used to calculate and analyze the patrol marking line based on the coupling calculation of the trough detection point and the corresponding peak spacing, and generate and output positioning control instructions with offset compensation in combination with the motion step parameters of the patrol device.
[0056] In a third aspect, an embodiment of the present invention provides a dynamic multi-mode adaptive peak coupling edge patrol positioning device, comprising:
[0057] A control unit, configured to execute the method described above;
[0058] The edge patrol sensor is connected to the control unit and includes an integrated housing structure and a laser emitting module and a laser receiving module encapsulated in the housing structure. The optical central axis of the laser receiving module forms a preset angle of 40° to 50° with the optical central axis of the laser emitting module, and the intersection point of the optical path projection of the laser receiving module and the laser receiving module is located outside the detection reference plane of the housing structure, forming a reflective triangulation measurement layout;
[0059] The storage unit is connected to the control unit and is used to cache the analog-to-digital conversion values uploaded by the edge patrol sensor in real time, and trigger a hardware interrupt signal when the data volume reaches a preset capacity threshold;
[0060] And, the motion unit is connected to the control unit and is used to drive the edge patrol sensor to move synchronously according to the instructions issued by the control unit.
[0061] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer-executable instructions stored thereon. When the executable instructions are executed by a processor, the dynamic multi-constrained adaptive peak-valley coupled patrol positioning method as described above is implemented.
[0062] (3) Beneficial effects
[0063] The beneficial effects of the present invention are:
[0064] First, through the coordination of step control and periodic data acquisition mechanism, the dynamic interference signal is effectively diluted while ensuring the timing integrity of the data, forming a basis for raw data processing that is resistant to noise interference; second, through the pre-screening trigger conditions of the dual-line waveform characteristics, an adaptive data update logic is constructed under the dual constraints of the storage queue capacity threshold and the waveform characteristics, which not only avoids the waste of computing resources caused by the accumulation of invalid data, but also ensures that the data entering the core processing link has the necessary waveform representation quality.
[0065] Furthermore, through the innovative design of segmented peak extraction and dual-constraint parallel verification, the two major technical bottlenecks of peak misidentification and trough depth misjudgment in traditional methods are simultaneously solved: the peak spacing range constraint effectively suppresses pseudo-peak interference caused by surface texture mutation, while the trough depth threshold condition based on the dynamic contrast coefficient significantly enhances the robustness to reflectivity differences. The dual verification mechanism greatly improves the anti-interference ability of waveform feature recognition.
[0066] In particular, a morphologically adaptive benchmark selection strategy based on trough distribution is introduced, transforming discrete extreme point detection into morphological feature recognition. This not only ensures positioning accuracy in single trough scenarios, but also resolves the position ambiguity problem in multi-trough platform areas. In complex working conditions (such as blurred marking line edges and localized surface contamination), the optimal detection benchmark is automatically selected through geometric feature analysis, reducing the repeatability error of the detection results.
[0067] Finally, by coupling the peak spacing parameters with the motion step parameters, an offset compensation amount with dynamic following characteristics is formed. Under complex working conditions affected by mechanical transmission errors and motion inertia, the spatial consistency of the control command output can still be maintained, and the comprehensive performance defects caused by the rigid signal processing mechanism and the fixed threshold setting of the algorithm model in the traditional method can be systematically overcome. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 A schematic flow chart of a method provided in an embodiment of the present invention;
[0069] Figure 2 A schematic diagram of a specific flow chart of step S1 of the method provided in an embodiment of the present invention;
[0070] Figure 3 This is a schematic diagram of a specific flow chart before step S2 of the method provided in an embodiment of the present invention;
[0071] Figure 4 A schematic diagram of a specific flow chart of step S2 of the method provided in an embodiment of the present invention;
[0072] Figure 5 A schematic diagram of a specific flow chart of step S3 of the method provided in an embodiment of the present invention;
[0073] Figure 6 A schematic diagram of a double-line waveform of the method provided in an embodiment of the present invention;
[0074] Figure 7 A schematic diagram of a specific flow chart of step S4 of the method provided in an embodiment of the present invention;
[0075] Figure 8 A schematic diagram of a specific flow chart of step S5 of the method provided in an embodiment of the present invention;
[0076] Figure 9 A schematic diagram of the structure of a first-perspective edge patrol sensor according to the method provided by an embodiment of the present invention;
[0077] Figure 10 A schematic diagram of the structure of a second perspective of a border patrol sensor according to a method provided by an embodiment of the present invention;
[0078] Figure 11 The present invention provides a schematic diagram of the overall process of the method.
[0079] [Description of Reference Numerals]
[0080] 1: integrated housing structure; 2: laser emitting module; 3: laser receiving module; 4: circuit board; 10: first positioning plate; 101: first through hole; 11: second positioning plate; 111: second through hole; 12: first accommodating cavity; 13: second accommodating cavity; 16: connecting needle seat; 17: slot; 18: notch; 19: ear plate. DETAILED DESCRIPTION
[0081] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation methods in conjunction with the accompanying drawings.
[0082] like Figure 1 As shown, an embodiment of the present invention proposes a dynamic multi-constraint adaptive peak-valley coupled patrol positioning method, including: periodically acquiring patrol data and forming a storage queue by controlling the movement of a patrol device; when the data capacity of the storage queue reaches a preset capacity threshold, based on the amplitude change characteristics of the time series data, adaptively dividing at least two independent analysis segments, performing extreme value search on each analysis segment to determine the peak, and traversing the transition area between adjacent peak pairs to search for the absolute minimum amplitude point as the trough reference point; in parallel, checking whether the spacing between adjacent peak pairs falls within the correlation tolerance interval, and whether the trough reference point satisfies the product constraint of the smaller peak in the peak pair and the preset contrast coefficient; if there is a peak pair that passes the check, selecting the position of a single trough reference point or the center position of multiple trough reference points as the trough detection point according to the determined trough distribution form; based on the coupling calculation of the trough detection point and the corresponding peak spacing, analyzing the patrol mark line, and generating and outputting a positioning control instruction with offset compensation in combination with the motion step parameters of the patrol device.
[0083] First, through the coordination of step control and periodic data acquisition mechanism, the dynamic interference signal is effectively diluted while ensuring the timing integrity of the data, forming a basis for raw data processing that is resistant to noise interference; second, through the pre-screening trigger conditions of the dual-line waveform characteristics, an adaptive data update logic is constructed under the dual constraints of the storage queue capacity threshold and the waveform characteristics, which not only avoids the waste of computing resources caused by the accumulation of invalid data, but also ensures that the data entering the core processing link has the necessary waveform representation quality.
[0084] Furthermore, through the innovative design of segmented peak extraction and dual-constraint parallel verification, the two major technical bottlenecks of peak misidentification and trough depth misjudgment in traditional methods are simultaneously solved: the peak spacing range constraint effectively suppresses pseudo-peak interference caused by surface texture mutation, while the trough depth threshold condition based on the dynamic contrast coefficient significantly enhances the robustness to reflectivity differences. The dual verification mechanism greatly improves the anti-interference ability of waveform feature recognition.
[0085] In particular, a morphologically adaptive benchmark selection strategy based on trough distribution is introduced, transforming discrete extreme point detection into morphological feature recognition. This not only ensures positioning accuracy in single trough scenarios, but also resolves the position ambiguity problem in multi-trough platform areas. In complex working conditions (such as blurred marking line edges and localized surface contamination), the optimal detection benchmark is automatically selected through geometric feature analysis, reducing the repeatability error of the detection results.
[0086] Finally, by coupling the peak spacing parameters with the motion step parameters, an offset compensation amount with dynamic following characteristics is formed. Under complex working conditions affected by mechanical transmission errors and motion inertia, the spatial consistency of the control command output can still be maintained, and the comprehensive performance defects caused by the rigid signal processing mechanism and the fixed threshold setting of the algorithm model in the traditional method can be systematically overcome.
[0087] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0088] Specifically, an embodiment of the present invention provides a dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method, which includes:
[0089] S1. By controlling the movement of the border patrol device, the border patrol data is periodically acquired and a storage queue is formed.
[0090] Furthermore, if Figure 2 As shown, step S1 includes:
[0091] S11. Establish a mapping relationship between the number of movement steps of the border patrol device and the data collected by the border patrol sensor. The accumulated movement distance of the border patrol device reaches a preset integer multiple of the movement step length as the collection trigger condition. The analog-to-digital conversion value of the border patrol sensor is synchronously collected upon each trigger event. The preset integer multiple of the movement step length is a configurable parameter used to control the minimum movement distance of the device between two adjacent data collections. This decouples the data collection frequency from the device's movement speed and prevents imbalances in data sampling density caused by speed fluctuations. Preferably, the AD value of the border patrol sensor is acquired every five steps of the border patrol device.
[0092] S12. Write the collected analog-to-digital conversion values into a pre-initialized storage queue in sequence according to the acquisition timing and the trigger timing number. Each time new data is written, it automatically occupies the end index position of the queue. Construct a storage queue structure with fixed length or dynamic expansion capability. During the initialization phase, a unique timing index is assigned to each queue position. Each time a data acquisition event is triggered, the real-time analog-to-digital conversion value (AD value) of the edge patrol sensor is generated into a corresponding timing number according to the trigger order and written to the end position of the queue using the first-in, first-out (FIFO) principle.
[0093] S2. When the data capacity of the storage queue reaches the preset capacity threshold, based on the amplitude change characteristics of the time series data, it is adaptively divided into at least two independent analysis segments, and an extreme value search is performed on each analysis segment to determine the peak, and the transition area between adjacent peak pairs is traversed to search for the absolute minimum amplitude point as the trough reference point.
[0094] Furthermore, if Figure 3 As shown, before step S2, the following steps are also included:
[0095] F21. Monitor the current data capacity of the current storage queue in real time to determine whether it has reached the preset capacity threshold.
[0096] F22: If the data capacity of the current storage queue does not reach the preset capacity threshold, the queue data storage status is maintained, the analog-to-digital conversion value collection of the edge patrol sensor in the next cycle is triggered, and the new data is appended to the end of the queue in time series.
[0097] F23: If the data capacity of the current storage queue reaches the preset capacity threshold, the data append operation is suspended and the current storage queue data is locked.
[0098] In a specific embodiment, it is detected in real time whether the current number of data entries in the storage queue reaches the preset minimum data length L required for dual-line waveform feature analysis. When the queue data volume is lower than L, the queue write mode is kept unchanged, and the periodic data collection and enqueue operations of the edge patrol sensor are continuously performed; when the queue data volume accumulates to L, the data append operation is suspended, the current storage queue data is locked, and the subsequent dual-line waveform feature matching verification process is started.
[0099] Furthermore, if Figure 4 As shown, step S2 includes:
[0100] S21. Based on the amplitude gradient change characteristics of the time series data, the complete time series data of the storage queue is divided into a forward phase segment and a backward phase segment with symmetrical time series intervals.
[0101] Specifically, the amplitude gradient change feature of time series data refers to the logical rule of dynamically dividing data intervals according to the amplitude change rate and direction of consecutive data points. It is specifically manifested as follows:
[0102] (1) Gradient direction determination: When the amplitude change rate of consecutive data points changes from positive to negative, it is marked as a potential peak area; conversely, when the amplitude change rate changes from negative to positive, it is marked as a potential trough area.
[0103] (2) Gradient amplitude threshold: Set the absolute value threshold of the amplitude change rate. Only when the amplitude difference between adjacent data points exceeds the threshold, it is judged as a valid gradient change.
[0104] (3) Phase continuity constraint: The divided time segments must satisfy the consistency of the gradient change direction, and there must be no abnormal amplitude jump points within the segment.
[0105] S22 , performing a maximum value traversal search in a time-series increasing direction in the forward phase segment to capture the maximum peak point as the first wave peak feature point.
[0106] S23. Synchronously or asynchronously, perform a maximum traversal search in a time-decreasing direction in the backward phase segment to capture the maximum peak point as the second peak feature. Both the first peak feature point and the second peak feature point include peak intensity and corresponding time coordinates.
[0107] S24 , constructing a data search window for the transition region between the two peaks based on the spatiotemporal mapping relationship between the adjacent first wave peak feature points and the second wave peak feature points.
[0108] S25. Establish an initial search window based on the time coordinates of the captured first wave peak feature point and the second wave peak feature point, and dynamically expand the initial search window boundary in both directions along the time axis, expanding forward until a continuous amplitude increasing sequence is detected, and expanding backward until a continuous amplitude decreasing sequence is detected.
[0109] In this step, a bidirectional dynamic expansion operation is performed along the time axis:
[0110] Forward expansion: Traverse the data points incrementally from the initial window end coordinate forward, and continue to expand the window boundary until a monotonically increasing sequence of amplitudes consisting of at least three consecutive data points is detected.
[0111] Backward expansion: Traverse the data points backward from the starting coordinate of the initial window, and continue to expand the window boundary until a monotonically decreasing sequence of amplitudes consisting of at least three consecutive data points is detected.
[0112] S26. Perform noise suppression on the expanded window to remove abnormal fluctuation data, and double-verify the window validity based on the preset window length requirement and the number of data points in the window. If the double verification fails, peak reselection is triggered.
[0113] In this step, the sliding average amplitude of each data point within the window is calculated. Data points that deviate from the average by more than a preset fluctuation threshold (±σ) are marked as noise and removed. Linear interpolation is used to fill in the data gaps caused by the noise removal, generating a continuous and smooth waveform sequence. The cleaned expanded window is then subjected to a double validation process: verifying that the total time series span after the window expansion falls within the preset window length tolerance and that the number of valid data points within the window meets the preset minimum number of points.
[0114] S27. Perform a full data traversal within the double-verified data search window to determine the absolute minimum amplitude point, which is marked as the trough reference point.
[0115] S3. Parallel verification is performed to determine whether the spacing between adjacent peak pairs falls within the correlation tolerance interval, and whether the trough reference point satisfies the product constraint of the smaller peak value in the peak pair and the preset contrast coefficient.
[0116] Furthermore, if Figure 5 As shown, step S3 includes:
[0117] S31 , calibrate the time interval between adjacent first wave peak feature points and second wave peak feature points, and perform two checks in parallel.
[0118] S32: Whether the time series interval distance is within a preset correlation tolerance interval; wherein the correlation tolerance interval is a legal boundary representing the minimum allowable interval distance and the maximum allowable interval distance between adjacent peak feature points in the time series or spatial dimension.
[0119] S33: Whether the amplitude of the trough reference point is smaller than a dynamic threshold value generated by multiplying the smaller value of the adjacent first peak feature point and the second peak feature point by a preset peak-to-trough contrast coefficient.
[0120] S34. When any check fails, the queue data update mechanism is triggered to remove the oldest data point at the head of the queue and append the latest collected data to the tail of the queue to keep the queue capacity constant.
[0121] When the double-line waveform feature check fails, the following data iteration update is performed: first, the original data point at the head index position of the queue is removed to release the storage space; then, the second to the Lth data in the queue are collectively migrated forward by one index position, so that the last position forms a vacuum storage unit, the last index position of the queue is maintained in a writable state, but no data is actively filled to wait for the next collection period, the queue write lock state is released, and the data collection thread is reactivated to fill the last vacancy; finally, the queue capacity monitoring node is returned to start a new round of judgment period, forming a self-contained data processing closed loop.
[0122] In an embodiment, as shown in Figure 6 the complete timing data of the storage queue is divided into two equal parts, a forward segment and a backward segment. The forward segment covers the first half of the timing interval of the queue, and the backward segment covers the second half of the timing interval of the queue. Then, the maximum value of the forward segment is searched by increasing the timing to obtain the first peak feature point Peak1 (including the amplitude P1_value and the timing index P1_numb), and the maximum value of the backward segment is searched by decreasing the timing to obtain the second peak feature point Peak2 (including the amplitude P2_value and the timing index P2_numb).
[0123] A transition region search window (index range P1_numb to P2_numb) is constructed between the two peak feature points, and the absolute minimum amplitude point is obtained by traversing all data points in the window, and the amplitude V_value and the timing index V_numb are marked.
[0124] It should be understood that the peak interval range (dist_min, dist_max) is determined by the double-line spacing, the double-line thickness, and the sensor accuracy. The larger the double-line spacing, the larger the center value of the peak interval range (and the larger (dist_min+dist_max) / 2), the thinner the double-line, the higher the sensor accuracy, and the smaller the peak interval range (and the smaller dist_max-dist_min). The peak-valley contrast coefficient cont_f is a dynamic threshold generation parameter for setting the allowed attenuation ratio of the valley amplitude relative to the smaller peak value in the adjacent peak, and its value range is (0.0, 1.0). It is determined by the double-line inside spacing and the sensor accuracy. The smaller the double-line inside spacing and the lower the sensor accuracy, the larger the peak-valley contrast coefficient, and the larger the valley height range that can pass the condition.
[0125] Thus, the smaller peak value, which is the lower peak value of the two peaks: Peak_min=P1_value and P2_value, and the peak distance, which is the distance between the two actually identified peak maximum values: P_dist=P2_numb-P1_numb, can be obtained.
[0126] A valid double-line waveform feature is determined only when the following conditions are met simultaneously: (1) Spacing constraint: dist_min <P_dist<dist_max(2)谷深约束:V_value<Peak_min×cont_f。
[0127] Afterwards, when any verification condition fails, the queue data update is triggered: the oldest data point at the head of the queue is removed, and the latest collected data is appended to the tail of the queue; the double-peak positioning and verification process is re-executed until all judgment conditions are met and the coordinates of the trough detection point are output.
[0128] S4. If there is a peak pair that passes the verification, select the position of a single trough reference point or the center position of multiple trough reference points as the trough detection point according to the determined trough distribution pattern.
[0129] Furthermore, if Figure 7 As shown, step S4 includes:
[0130] S41. In the time series interval of adjacent peak pairs that have passed parallel verification, the amplitudes of all continuous data points in the data search window of the transition region between peaks are traversed, and a set of data points whose amplitudes form a trough reference point is recorded.
[0131] S42. If the data point set contains only a single data point, the time series coordinates of the point are directly marked as a trough detection point.
[0132] S43. If the data point set contains two or more continuously distributed equal-amplitude points, extract the starting time series coordinates and the ending time series coordinates of the equal-amplitude platform area formed by multiple continuously distributed equal-amplitude points, calculate the arithmetic mean of the starting time series coordinates and the ending time series coordinates, and use the coordinates of the geometric center point corresponding to the calculation result as the trough detection point.
[0133] S44. If the data point set contains two or more discretely distributed equal-amplitude points, extract the independent time series coordinates of all discretely distributed equal-amplitude points, perform arithmetic average calculation on all time series coordinates, and use the calculation result as the trough detection point.
[0134] S45 , aligning the finally determined trough detection point time coordinates with the global time reference of the current storage queue to generate a standardized trough position index value.
[0135] In yet another embodiment, under the condition that the peak distance check (P_dist ∈ (dist_min, dist_max)) and the valley depth constraint (Valley < Peak_min × cont_f) are satisfied, a valley position resolution operation is performed: all data points in the double-peak interval transition region (index interval P1_numb to P2_numb) are traversed, and a data point set with an amplitude equal to the current valley reference value Valley is selected.
[0136] Then, a differential positioning is performed based on the spatial distribution characteristics of the data point set:
[0137] In the first case, when there is only a single data point in the data point set, its index coordinates (X0, Y0) are directly marked as the valley detection point.
[0138] In the second case, when there are two or more continuous adjacent equal-amplitude points, the starting index X_start and the ending index X_end of the platform region are recorded, the geometric center index X0 = (X_start + X_end) / 2 is calculated, the amplitude YO corresponding to X0 is extracted, and the valley detection point (X0, YO) is generated.
[0139] In the third case, when there are two or more non-continuous equal-amplitude points, the independent indexes {X1, X2,..., Xn} of each discrete point are extracted, the arithmetic mean index X0 = (X1 + X2 +...+ Xn) / n is calculated, the amplitude YO corresponding to X0 is extracted, and the valley detection point (X0, YO) is generated.
[0140] After that, the detection point index X0 is aligned with the global timing reference of the storage queue, mapped to the standardized position index value X0', and the final valley detection point coordinates (X0', YO) are output.
[0141] S5, based on the coupling calculation of the valley detection point and the peak distance, the edge detection marker line is resolved, and the positioning control instruction containing the offset compensation is generated and output in combination with the edge detection device motion step parameter.
[0142] Further, as shown in Figure 8 , step S5 includes:
[0143] S51, the timing coordinates of the valley detection point are mapped to the edge detection device physical coordinate system, wherein the horizontal position is determined based on the product operation of the real-time cumulative motion step length of the stepping motor and the preset single-step stroke, and the vertical position is determined by matching the analog-to-digital conversion value collected by the edge detection sensor and the pre-stored calibration curve interpolation.
[0144] S52, according to the stepping motor step number of the motion unit corresponding to the measured peak distance, in combination with the geometric distance parameters of the built-in laser emission module and the laser receiving module, a laser triangulation model is constructed.
[0145] Among them, the laser triangulation measurement model includes the baseline distance determined by the physical distance between the optical center of the laser emitting module and the optical center of the laser receiving module, the projection angle determined by the difference between the laser incident angle and the reflection angle inferred from the stepper motor step data corresponding to the adjacent wave peak spacing, and the spot displacement determined by the mapping relationship between the spot offset distance in the sensing area of the laser receiving module and the stepper motor step.
[0146] Specifically, the mathematical expression of the laser triangulation model is:
[0147]
[0148] Where Z is the vertical height, which represents the actual vertical height of the measured mark line relative to the laser base plane; X is the horizontal displacement, which represents the absolute horizontal position of the measured mark line relative to the initial zero point; D is the baseline distance; Δθ is the projection angle; ΔS is the spot displacement, which represents the pixel distance of the spot center offset from the reference position in the sensing area of the laser receiving module; S step is the single-step physical stroke, representing the actual physical displacement corresponding to each step of the stepper motor. N is the total number of movement steps of the stepper motor from the initial position to the current trigger point. δ and κ are empirical coefficients for compensating for nonlinear errors such as laser scattering and optical distortion, respectively. They are generated by fitting offline calibration experimental data.
[0149] S53. Based on the laser triangulation model and the principle of geometric projection, the angle between the laser emission axis and the receiving optical path is used as the input parameter to reversely infer the actual position coordinates of the marking line in three-dimensional space.
[0150] S54 , performing a multi-axis comparison between the actual position coordinates obtained by the solution in the three-dimensional space and the preset standard marking line coordinates to obtain a horizontal axial offset and a vertical axial offset.
[0151] S55 , generating a stepper motor compensation step instruction based on the horizontal offset, and generating a sensor gain adjustment instruction based on the vertical offset, to form a closed-loop control signal.
[0152] Additionally, the embodiment of the present application provides a dynamic multi-mode adaptive wave crest coupling edge patrol positioning device, comprising: a control unit for executing the method as described above; an edge patrol sensor connected with the control unit, comprising an integrated shell structure, a laser emission module and a laser receiving module packaged on the shell structure, a preset included angle of 40° to 50° is formed between the optical central axis of the laser receiving module and the optical central axis of the laser emission module, and the light path projection intersection of the laser receiving module and the laser receiving module is located outside the detection reference surface of the shell structure, forming a reflective triangulation layout; a storage unit connected with the control unit, for real-time caching of the analog-to-digital conversion value uploaded by the edge patrol sensor, triggering a hardware interrupt signal when the data volume reaches a preset capacity threshold; and a motion unit connected with the control unit, for driving the edge patrol sensor to move synchronously according to the instructions issued by the control unit.
[0153] Reference Figure 9 and Figure 10 In the device, the optical central axis of the laser emission module 2 is arranged perpendicular to the surface of the object to be measured, and the outgoing light beam forms an incident light spot on the detection surface. The optical central axis of the laser receiving module 3 forms a preset included angle θ with the optical central axis of the laser emission module 2, and θ ∈ [40°, 50°], so that the receiving field of view area covers the optimal focusing position of the reflected light spot, thereby enhancing the reflected signal strength. In the optimal implementation, the preset included angle θ is 45°, and through this angle configuration, the center of the photosensitive surface of the laser receiving module 3 and the energy barycenter of the reflected light spot are overlapped, maximizing the signal-to-noise ratio. The setting of this included angle θ constrains the spatial geometric relationship of the laser emission and receiving light paths, so that the deviation amount of the normal direction of the surface of the object to be measured and the laser incident direction is converted into the spot displacement amount in the photosensitive area of the receiving module, and the non-contact distance measurement is realized through the mapping function of the calibrated displacement amount and distance.
[0154] Further, the integrated shell structure 1 is provided with a first positioning plate 10 and a second positioning plate 11, and the first positioning plate 10 and the second positioning plate 11 are respectively provided with a first through hole 101 and a second through hole 111. One end of the laser emission module 2 is arranged in abutment with the first positioning plate 10, and the optical central axis of the laser emission module 2 is collinear with the center line of the first through hole 101. One end of the laser receiving module 3 is arranged in abutment with the second positioning plate 11, and the optical central axis of the laser receiving module 3 is collinear with the center line of the second through hole 111. By changing the diameter of the first through hole 101 on the first positioning plate 10, the diameter of the light spot irradiated on the surface of the object to be measured is limited and adjusted, solving the problem that the current fine line cannot be recognized. By adjusting the aperture size of the first through hole 101, different power laser emission modules 2 are adapted.
[0155] Furthermore, a first accommodating cavity 12 and a second accommodating cavity 13 are provided within the integrated housing structure 1. The laser emitting module 2 is installed within the first accommodating cavity 12, and the first accommodating cavity 12 matches the shape of the laser emitting module 2; the laser receiving module 3 is installed within the second accommodating cavity 13, and the second accommodating cavity 13 matches the shape of the laser receiving module 3. By providing the first accommodating cavity 12 and the second accommodating cavity 13 within the integrated housing structure 1 to install the laser emitting module 2 and the laser receiving module 3, the positions of the laser emitting module 2 and the laser receiving module 3 are restricted by physical structure, ensuring that the laser emitting module 2 and the laser receiving module 3 can be positioned at a set angle. Preferably, a pair of lugs 19 are provided on the integrated housing structure 1, each of which is provided with a fixing hole for fixing the integrated housing structure 1.
[0156] In addition, the laser edge patrol sensor also includes a circuit board 4 disposed within the integrated housing structure 1. The laser emitting module 2 and the laser receiving module 3 are both electrically connected to the first side of the circuit board 4. A pair of slots 17 are provided within the integrated housing structure 1. The circuit board 4 is located between the pair of slots 17, and the edges of the circuit board 4 corresponding to the slots 17 are located within the slots 17. The circuit board 4 is the control circuit carrier for the laser emitting module 2 and the laser receiving module 3. It is responsible for processing the transmitted and received electrical signals and realizing the electrical control of the laser detection function. The edges on both sides of the circuit board 4 form an interference fit with the inner walls of the slots 17, realizing mechanical limitation and vibration suppression of the circuit board 4.
[0157] Furthermore, a connector pin header 16 is provided on the second side of the circuit board 4. A plurality of pins are located within the connector pin header 16 for electrical connection to the circuit board 4. A notch 18 is provided in the integrated housing structure 1, through which the connector pin header 16 can extend. The connector pin header 16 is used to electrically connect the device to external equipment or systems, transmitting power, control signals, and test data through the pins.
[0158] Furthermore, an embodiment of the present invention provides a computer-readable storage medium having computer-executable instructions stored thereon. When the executable instructions are executed by a processor, the dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method as described above is implemented.
[0159] In summary, the embodiment of the present invention provides a dynamic multi-constraint adaptive peak-valley coupling patrol positioning method, device and medium, referring to Figure 11 As shown, the overall process is as follows:
[0160] First, the motion unit is controlled to move at a fixed step length. After completing five motion step cycles, the edge patrol sensor is triggered to collect AD values. The collected AD values are stored in a cyclic memory in a time series to form a storage queue.
[0161] Secondly, the amount of data in the memory is monitored in real time. When the preset data length L is reached, the subsequent two-line waveform feature matching verification process is carried out.
[0162] Next, the storage queue data is divided into forward and backward segments. For the forward segment, traverse in the increasing direction of time sequence to obtain the maximum value as the first peak Peak1 (amplitude P1_value, position P1_numb); for the backward segment, traverse in the decreasing direction of time sequence to obtain the maximum value as the second peak Peak2 (amplitude P2_value, position P2_numb).
[0163] Traverse all data points in the transition region between the two peaks (P1_numb to P2_numb) and determine the absolute minimum amplitude Valley (amplitude V_value, position V_numb); calculate the smaller peak value: Peak_min = min(P1_value, P2_value); and calculate the peak distance: P_dist = P2_numb - P1_numb. Then, the verification logic must meet the following conditions: Distance validity: dist_min <P_dist<dist_max;谷深有效性:V_value<Peak_min×cont_f。
[0164] Then, if any of the conditions is not met: the queue update mechanism is triggered (the first data is removed and the subsequent data is moved forward); if all conditions are met, the trough detection point positioning process is entered. When the trough value between the two peaks is unique, the minimum value position (X0, Y0) is taken as the trough detection point; when the trough value between the two peaks is not unique, the minimum value center position (X0, Y0) is taken as the trough detection point.
[0165] Finally, the edge patrol calculation is performed to obtain sensor data. Based on the conversion relationship between the measured peak spacing P_dist and the step length, the physical position of the marking line is analyzed. The offset compensation instruction is generated in combination with the micro-step parameters of the stepper motor, and a closed-loop control signal is output to complete the edge patrol.
[0166] Since the systems / devices described in the above embodiments of the present invention are systems / devices used to implement the methods of the above embodiments of the present invention, those skilled in the art will be able to understand the specific structures and variations of these systems / devices based on the methods described in the above embodiments of the present invention, and thus will not be described in detail here. All systems / devices used in the methods of the above embodiments of the present invention are within the scope of protection of the present invention.
[0167] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0168] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions.
[0169] It should be noted that, in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In claims enumerating several means, several of these means may be embodied by one and the same hardware. The use of the words first, second, third etc. is for convenience only and does not indicate any order. These words may be understood as part of the component name.
[0170] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0171] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments after learning the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0172] Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if such modifications and variations fall within the scope of the claims and their equivalents, the present invention shall also include such modifications and variations.
Claims
1. A dynamic multi-constrained adaptive peak-valley coupling edge patrol positioning method, characterized in that: include: By controlling the movement of the patrol device, patrol data is periodically acquired and a storage queue is formed; When the data capacity of the storage queue reaches a preset capacity threshold, the system adaptively divides the data into at least two independent analysis segments based on the amplitude variation characteristics of the time series data. It then performs an extreme value search on each analysis segment to determine the peaks, and traverses the transition areas between adjacent peak pairs to search for the absolute minimum amplitude point as the trough reference point. Verify in parallel whether the spacing between adjacent peak pairs falls within the correlation tolerance interval, and whether the trough reference point satisfies the product constraint of the smaller peak value in the peak pair and the preset contrast coefficient; If there is a peak pair that passes the verification, select the position of a single trough reference point or the center position of multiple trough reference points as the trough detection point according to the determined trough distribution pattern; The edge patrol marking line is analyzed based on the coupling calculation of the trough detection point and the corresponding peak spacing, and the positioning control instruction with offset compensation is generated and output in combination with the motion step parameters of the edge patrol device.
2. The dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method according to claim 1, characterized in that: By controlling the movement of the patrol device, the patrol data is periodically acquired and a storage queue is formed, including: Establish a mapping relationship between the number of movement steps of the border patrol device and the data collected by the border patrol sensor. The accumulated movement distance of the border patrol device reaches a preset integer multiple of the movement step length as the collection trigger condition. The analog-to-digital conversion value of the border patrol sensor is synchronously collected when each trigger event occurs. The collected analog-to-digital conversion values are written into the pre-initialized storage queue in sequence according to the acquisition timing and the trigger timing number. Each time new data is written, it automatically occupies the end index position of the queue; The preset integer multiple motion step size is a configurable parameter, which is used to control the minimum movement distance of the device between two adjacent data collections.
3. The dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method according to claim 1, characterized in that: When the data capacity of the storage queue reaches a preset capacity threshold, before adaptively dividing the data into at least two independent analysis segments based on the amplitude variation characteristics of the time series data, the following steps are further included: Monitor the current data capacity of the current storage queue in real time to determine whether it has reached the preset capacity threshold: If the data capacity of the current storage queue does not reach the preset capacity threshold, the queue data storage state is maintained, the analog-to-digital conversion value collection of the edge patrol sensor in the next cycle is triggered, and the new data is appended to the end of the queue in time series; If the data capacity of the current storage queue reaches the preset capacity threshold, the data append operation is suspended and the current storage queue data is locked.
4. The dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method according to claim 1, characterized in that: When the data capacity of the storage queue reaches a preset capacity threshold, based on the amplitude variation characteristics of the time series data, it is adaptively divided into at least two independent analysis segments. An extreme value search is performed on each analysis segment to determine the peak, and the transition area between adjacent peak pairs is traversed to search for the absolute minimum amplitude point as the trough reference point, including: Based on the amplitude gradient change characteristics of the time series data, the complete time series data of the storage queue is divided into a forward phase segment and a backward phase segment with symmetrical time series intervals; Performing a maximum traversal search in a time-series increasing direction in the forward phase segment to capture the maximum peak point as the first wave peak feature point; Synchronously or asynchronously, performing a maximum traversal search in a time-decreasing direction in the backward phase segment to capture a maximum peak point as a second peak feature, wherein both the first peak feature point and the second peak feature point include peak intensity and corresponding time coordinates; Based on the spatiotemporal mapping relationship between the adjacent first peak feature points and the second peak feature points, a data search window for the transition area between the two peaks is constructed; An initial search window is established based on the time coordinates of the captured first and second wave peak feature points, and the boundaries of the initial search window are dynamically expanded bidirectionally along the time axis, extending forward until a continuous amplitude increasing sequence is detected, and extending backward until a continuous amplitude decreasing sequence is detected; Noise suppression is performed on the expanded window to remove abnormal fluctuation data. The window validity is double-verified based on the preset window length requirements and the number of data points in the window. If the double verification fails, peak reselection is triggered. Perform a full data pass within the doubly validated data search window to identify the absolute minimum amplitude point, which is marked as the trough reference point.
5. The dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method according to claim 4, characterized in that: Verify in parallel whether the spacing between adjacent peak pairs falls within the correlation tolerance interval, and whether the trough reference point satisfies the product constraint of the smaller peak value in the peak pair and the preset contrast coefficient. Calibrate the time interval between the adjacent first peak feature point and the second peak feature point, and perform two checks in parallel: Whether the time series interval distance is within the preset correlation tolerance interval; wherein the correlation tolerance interval is the legal boundary between the minimum and maximum allowable interval distances between adjacent peak feature points in the time series or spatial dimension; Whether the amplitude of the trough reference point is smaller than the dynamic threshold value generated by multiplying the smaller value of the adjacent first peak feature point and the second peak feature point by the preset peak-to-trough contrast coefficient; When any check fails, the queue data update mechanism is triggered, the oldest data point at the head of the queue is removed, and the latest collected data is appended to the tail of the queue to keep the queue capacity constant.
6. The dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method according to claim 1, characterized in that: If there is a peak pair that passes the verification, the position of a single trough reference point or the center position of multiple trough reference points is selected as the trough detection point according to the determined trough distribution pattern, including: In the time series interval of adjacent peak pairs that have passed parallel verification, the amplitudes of all consecutive data points in the data search window in the transition region between peaks are traversed, and the set of data points whose amplitudes form a trough reference point is recorded; If the data point set contains only a single data point, the time series coordinate of the point is directly marked as the trough detection point; If the data point set contains two or more continuously distributed equal-amplitude points, the starting and ending time series coordinates of the equal-amplitude platform area formed by multiple continuously distributed equal-amplitude points are extracted, the arithmetic mean of the starting and ending time series coordinates is calculated, and the coordinates of the geometric center point corresponding to the calculation result are used as the trough detection point; If the data point set contains two or more discretely distributed equal-amplitude points, extract the time series coordinates of all discretely distributed equal-amplitude points, perform arithmetic average calculation on all time series coordinates, and use the calculation result as the trough detection point; The final determined valley detection point timing coordinates are aligned with the global timing reference of the current storage queue to generate a standardized valley position index value.
7. The dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method according to any one of claims 1 to 6, characterized in that: Based on the coupled calculation of the trough detection point and the corresponding peak spacing, the patrol marking line is analyzed and the positioning control instructions with offset compensation are generated and output in combination with the motion step parameters of the patrol device. Mapping the time series coordinates of the trough detection point to the physical coordinate system of the border patrol device; Based on the number of steps of the stepper motor of the motion unit corresponding to the measured peak spacing, combined with the geometric spacing parameters of the built-in laser transmitting module and laser receiving module, a laser triangulation model is constructed; Based on the laser triangulation model and the principle of geometric projection, the angle between the laser emission axis and the receiving optical path is used as the input parameter to reversely infer the actual position coordinates of the marking line in three-dimensional space. The actual position coordinates obtained by solving in three-dimensional space are compared with the preset standard marking line coordinates in multiple axes to obtain the horizontal axial offset and the vertical axial offset; Generate a stepper motor compensation step instruction based on the horizontal offset, and generate a sensor gain adjustment instruction based on the vertical offset to form a closed-loop control signal; The horizontal position of the time series coordinate is determined by multiplying the real-time cumulative motion step length of the stepper motor by the preset single-step distance, and the vertical position is determined by matching the analog-to-digital conversion value collected by the edge patrol sensor with the interpolation of the preset calibration curve. The laser triangulation measurement model includes the baseline distance determined by the physical distance between the optical center of the laser transmitting module and the optical center of the laser receiving module, the projection angle determined by the difference between the laser incident angle and the reflection angle inferred from the stepper motor step data corresponding to the adjacent wave peak spacing, and the spot displacement determined by the mapping relationship between the spot offset distance in the sensing area of the laser receiving module and the step length of the stepper motor.
8. A dynamic multi-constrained adaptive peak-valley coupling edge patrol positioning system, characterized by: include: A queue formation module is used to periodically acquire patrol data and form a storage queue by controlling the movement of the patrol device; A feature point search module is used to adaptively divide the data into at least two independent analysis segments based on the amplitude variation characteristics of the time series data when the data capacity of the storage queue reaches a preset capacity threshold. The module performs an extreme value search on each analysis segment to determine the peaks, and traverses the transition areas between adjacent peak pairs to search for the absolute minimum amplitude point as the trough reference point. A dual-line waveform verification module is used to verify in parallel whether the spacing between adjacent peak pairs falls within the correlation tolerance interval, and whether the trough reference point satisfies the product constraint of the smaller peak value in the peak pair and the preset contrast coefficient; A trough detection point determination module is used to select the position of a single trough reference point or the center position of multiple trough reference points as the trough detection point according to the determined trough distribution pattern if there is a peak pair that passes the verification; The patrol positioning module is used to calculate and analyze the patrol marking line based on the coupling calculation of the trough detection point and the corresponding peak spacing, and generate and output positioning control instructions with offset compensation in combination with the motion step parameters of the patrol device.
9. A dynamic multi-mode adaptive peak coupling edge patrol positioning device, characterized in that: include: A control unit, configured to execute the method according to any one of claims 1 to 7; The edge patrol sensor is connected to the control unit and includes an integrated housing structure and a laser emitting module and a laser receiving module encapsulated in the housing structure. The optical central axis of the laser receiving module forms a preset angle of 40° to 50° with the optical central axis of the laser emitting module, and the intersection point of the optical path projection of the laser receiving module and the laser receiving module is located outside the detection reference plane of the housing structure, forming a reflective triangulation measurement layout; The storage unit is connected to the control unit and is used to cache the analog-to-digital conversion values uploaded by the edge patrol sensor in real time, and trigger a hardware interrupt signal when the data volume reaches a preset capacity threshold; And, the motion unit is connected to the control unit and is used to drive the edge patrol sensor to move synchronously according to the instructions issued by the control unit.
10. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that: When the executable instructions are executed by the processor, the dynamic multi-constrained adaptive peak-valley coupled edge patrol positioning method according to any one of claims 1 to 7 is implemented.