Method and device for processing steel rail straightness measurement data, electronic equipment and medium

The splicing of rail straightness measurement data segments is solved by the starting overlapping data points determined by the maximum correlation coefficient, and the accuracy and consistency of the measurement data are improved.

CN120027680APending Publication Date: 2025-05-23华夏高铁技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510342396.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

When existing rail straightness measurement technology splices multiple measurement data segments, it is difficult to ensure the continuity and consistency of measurement data, resulting in large splicing errors and low accuracy of measurement data.

Method used

Each measurement data segment is spliced ​​through the starting overlapping data points determined by the maximum correlation coefficient to ensure the continuity and consistency of data splicing.

Benefits of technology

It improves the accuracy of rail straightness measurement data, reduces splicing errors, and ensures the overall quality of the measured data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120027680A_ABST
    Figure CN120027680A_ABST
Patent Text Reader

Abstract

The invention provides a processing method and device of steel rail straightness measurement data, electronic equipment and a medium, aiming at a first measurement data segment and a second measurement data segment in at least two target measurement data segments of a target steel rail, initial overlapping data point positions are adjusted in an offset range, and on the basis of overlapping parts corresponding to the initial overlapping data point positions, the first measurement data segment and the second measurement data segment of the target steel rail are obtained. Determining a corresponding Pearson's correlation coefficient; if the maximum correlation coefficient is greater than or equal to the maximum correlation coefficient threshold, determining that the two measurement data segments can be spliced; and if each first measurement data segment and each second measurement data segment can be spliced, splicing each second measurement data segment into the corresponding first measurement data segment from the first target measurement data segment based on the initial overlapping data point position corresponding to the maximum correlation coefficient to obtain steel rail straightness measurement data of the target steel rail. In this way, the initial overlapping data points determined by the maximum correlation coefficient are used for splicing all the measurement data segments, and the accuracy of steel rail straightness measurement data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of railway rail detection, and in particular to a method, device, electronic equipment and medium for processing rail straightness measurement data. Background Art

[0002] According to the current railway industry standards in my country, there are strict regulations on the allowable deviation of the straightness of rails, turnouts and guardrails. The quality of straightness directly affects the manufacturing quality and long-term performance of the track, and is of great significance to ensuring the safety and stability of the track.

[0003] Whether it is the traditional "ruler + feeler gauge method" or the modern portable rail straightness measuring equipment, the detection range is usually limited to less than 1 meter. This requires multiple segmented measurements when evaluating the straightness of rails longer than 1 meter. The existing splicing method directly splices and combines the rail straightness measurement data of the segmented measurements, which is difficult to ensure the overall continuity and consistency of the rail straightness measurement. There is a large splicing error, resulting in low accuracy of the rail straightness measurement data, which in turn affects the rail straightness evaluation results. Summary of the invention

[0004] In view of this, the embodiments of the present application at least provide a method, device, electronic device and medium for processing rail straightness measurement data, which uses the starting overlapping data points determined by the maximum correlation coefficient to splice each measurement data segment, thereby improving the accuracy of the rail straightness measurement data.

[0005] This application mainly includes the following aspects:

[0006] In a first aspect, an embodiment of the present application provides a method for processing rail straightness measurement data, the method comprising:

[0007] Acquire at least two target measurement data segments of the target rail collected by the rail straightness measuring device; the at least two target measurement data segments have the same number of data points, and there are overlapping parts in adjacent target measurement data segments;

[0008] For a first measurement data segment and a second measurement data segment of the at least two target measurement data segments, adjusting the starting overlapping data point position of the second measurement data segment relative to the first measurement data segment within a preset offset range, and determining the Pearson correlation coefficient corresponding to each overlapping portion based on the overlapping portions of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position; the first measurement data segment is any target measurement data segment of the at least two target measurement data segments, and the second measurement data segment is a target measurement data segment adjacent to the first measurement data segment after the first measurement data segment;

[0009] If the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to a preset maximum correlation coefficient threshold, it is determined that the first measurement data segment and the second measurement data segment can be data spliced;

[0010] If each of the first measurement data segments and the corresponding second measurement data segments in the at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, each of the second measurement data segments is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail.

[0011] In a second aspect, an embodiment of the present application further provides a device for processing rail straightness measurement data, the device for processing rail straightness measurement data comprising:

[0012] A data acquisition module, used to acquire at least two target measurement data segments of the target rail collected by the rail straightness measurement device; the at least two target measurement data segments have the same number of data points, and there are overlapping parts in adjacent target measurement data segments;

[0013] a first determination module, configured to adjust, for a first measurement data segment and a second measurement data segment of the at least two target measurement data segments, a starting overlapping data point position of the second measurement data segment relative to the first measurement data segment within a preset offset range, and determine, based on overlapping parts of the first measurement data segment and the second measurement data segment corresponding to respective starting overlapping data point positions, a Pearson correlation coefficient corresponding to each overlapping part; the first measurement data segment is any target measurement data segment of the at least two target measurement data segments, and the second measurement data segment is a target measurement data segment adjacent to the first measurement data segment and following the first measurement data segment;

[0014] A second determination module, configured to determine that data splicing can be performed on the first measurement data segment and the second measurement data segment if the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to a preset maximum correlation coefficient threshold;

[0015] A data splicing module is used for, if each of the first measurement data segments and the corresponding second measurement data segments in the at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, splicing each of the second measurement data segments into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail.

[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for processing rail straightness measurement data as described above.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for processing rail straightness measurement data as described above are executed.

[0018] The rail straightness measurement data processing method, device, electronic device and medium provided in the embodiments of the present application obtain at least two target measurement data segments of the target rail collected by the rail straightness measurement device; the number of data points of the at least two target measurement data segments is the same, and there are overlapping parts in adjacent target measurement data segments; for the first measurement data segment and the second measurement data segment in the at least two target measurement data segments, the starting overlapping data point position of the second measurement data segment relative to the first measurement data segment is adjusted within a preset offset range, and based on the overlapping parts of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position, the Pearson correlation coefficient corresponding to each overlapping part is determined; the first measurement data segment is at least two Any target measurement data segment in the target measurement data segment, the second measurement data segment is a target measurement data segment adjacent to the first measurement data segment after the first measurement data segment; if the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to the preset maximum correlation coefficient threshold, it is determined that the first measurement data segment and the second measurement data can be spliced; if each first measurement data segment and the corresponding second measurement data segment in at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, each second measurement data segment is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail. In this way, each measurement data segment is spliced ​​using the starting overlapping data point determined by the maximum correlation coefficient, thereby improving the accuracy of the rail straightness measurement data.

[0019] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A flow chart showing a method for processing rail straightness measurement data provided by an embodiment of the present application is shown;

[0022] Figure 2 One of the functional module diagrams of a rail straightness measurement data processing device provided in an embodiment of the present application is shown;

[0023] Figure 3 A second functional module diagram of a rail straightness measurement data processing device provided in an embodiment of the present application is shown;

[0024] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0026] It is worth noting that before the present application was filed, there were two common measurement schemes for rail straightness data in the prior art, namely the "ruler + feeler gauge method" scheme and the portable rail straightness measurement equipment scheme.

[0027] Among them, the measurement principle of the "ruler + feeler gauge method" is: the operator places the ruler close to the surface of the rail to ensure that the ruler is in close contact with the rail. Then use the feeler gauge to measure the maximum gap between the ruler and the rail, and determine the straightness of the position by reading the thickness of the feeler gauge. The "ruler + feeler gauge method" is easy to operate and low-cost, but its accuracy is affected by many factors, including the skill level of the surveyor, operating habits, and environmental conditions (such as temperature, humidity, vibration, etc.), which may lead to inaccurate measurement results. In addition, additional errors may be introduced in the data combination process, further reducing the accuracy of the measurement results.

[0028] For the non-contact sensor automatic detection solution, the measurement principle is: through a portable straightness measuring device, it is placed on the rail to be tested. The sensor inside the device will automatically scan the surface of the rail, collect distance data, calculate the straightness, and display the results in the form of a curve, which is convenient and intuitive to evaluate the straightness. This solution can provide relatively accurate and smooth measurement results, and display the straightness of the rail in the form of an intuitive curve, which is convenient for judging the quality and performance of the rail. However, there are still challenges in splicing the measurement results of each section, and it is difficult to ensure the continuity and consistency of the overall measurement.

[0029] However, whether it is the traditional "ruler + feeler gauge method" or the modern portable rail straightness measuring equipment, its detection range is usually limited to within 1 meter. When testing the straightness of rails longer than 1 meter, it is impossible to complete the entire measurement process at one time. This limitation is mainly due to the following reasons:

[0030] The first is the physical size. Longer measuring tools are easily deformed due to their own weight and lack of rigidity, which may introduce mechanical errors. The second is environmental factors. A larger measuring range is more susceptible to external conditions such as temperature changes and vibrations, resulting in unstable measurement results. Then there is the difficulty of operation. When using longer tools, it becomes more difficult to keep them stable and in even contact with the rail surface, which may lead to measurement errors.

[0031] In view of these limitations, the current practice is to use a segmented measurement method, that is, to divide the rail into several sections of 1 meter in length and measure them one by one. After each section is measured, the data needs to be manually collected and summarized, and the straightness of the entire section of rail is evaluated through comprehensive analysis. However, although this method overcomes the limitation of the single measurement range, it directly splices and combines the rail straightness measurement data of the segmented measurements, which makes it difficult to ensure the continuity and consistency of the overall rail straightness measurement. There is a large splicing error, resulting in low accuracy of the rail straightness measurement data, which in turn affects the evaluation results of the rail straightness.

[0032] In response to the above problems, the embodiments of the present application provide a method, device, electronic device and medium for processing rail straightness measurement data. A plurality of measurement data segments with a length of 1 meter and overlapping parts are obtained through a rail straightness measuring device. The starting overlapping data points determined by the maximum correlation coefficient are used to splice the measurement data segments to form a continuous and smooth data set, thereby improving the accuracy of the rail straightness measurement data.

[0033] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.

[0034] See also Figure 1 , Figure 1 This is a flow chart of a method for processing rail straightness measurement data provided by an embodiment of the present application. Figure 1 As shown, the method for processing rail straightness measurement data provided in the embodiment of the present application includes the following steps:

[0035] S101, obtaining at least two target measurement data segments of a target rail collected by a rail straightness measuring device; the at least two target measurement data segments have the same number of data points, and there are overlapping parts in adjacent target measurement data segments.

[0036] In the embodiment of the present application, at least two target measurement data segments with a length of 1 meter and overlapping parts are obtained by the rail straightness measurement device. Here, the number of data points of at least two target measurement data segments is the same, and there is an overlapping part in adjacent target measurement data segments, so as to compare the measurement values ​​of different measurement data segments in the overlapping part, find and determine the best matching point, and then seamlessly splice at least two target measurement data segments with overlapping parts into a continuous and smooth data set.

[0037] S102, for the first measurement data segment and the second measurement data segment of the at least two target measurement data segments, adjust the starting overlapping data point position of the second measurement data segment relative to the first measurement data segment within a preset offset range, and determine the Pearson correlation coefficient corresponding to each overlapping part based on the overlapping parts of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position; the first measurement data segment is any target measurement data segment of the at least two target measurement data segments, and the second measurement data segment is a target measurement data segment that is adjacent to the first measurement data segment and follows the first measurement data segment.

[0038] Here, for the first measurement data segment and the second measurement data segment in at least two target measurement data segments, the traversal operation of the offset is performed. Specifically, within the preset offset range, by adjusting the relative offset between the two measurement data segments, the starting overlapping data point position of the second measurement data segment relative to the first measurement data segment is gradually changed, and based on the overlapping part between the two measurement data segments, the Pearson correlation coefficient of the overlapping part corresponding to the alignment methods corresponding to different starting overlapping data point positions is determined, so as to be used for determining the optimal alignment method with the maximum correlation between the first measurement data segment and the second measurement data segment within the offset range according to the traversed Pearson correlation coefficients. Among them, the preset offset range is set according to the geometric characteristics of the rail and the accuracy and resolution of the measuring equipment to form a reasonable search interval, and the geometric characteristics of the rail include the stability of the straight segment and the curvature change of the curved segment. Specifically, after laboratory simulation, field measurement, data splicing effect and actual working conditions, the actual application value of the preset offset range is set to the interval of -25cm to 25cm. This interval can be flexibly adjusted according to different application scenarios. For example, in the splicing measurement process, by implementing strict operating specifications, human operation errors can be effectively reduced, so that the physical lateral error is kept within a small range. Therefore, the preset offset range will also become relatively narrow, which helps to improve the calculation efficiency and accuracy of the splicing measurement algorithm. Wherein, the first measurement data segment is any target measurement data segment of at least two target measurement data segments, and the second measurement data segment is a target measurement data segment that is adjacent to the first measurement data segment after the first measurement data segment.

[0039] S103: If the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to a preset maximum correlation coefficient threshold, it is determined that the first measurement data segment and the second measurement data segment can be spliced.

[0040] Here, if the maximum correlation coefficient in the Pearson correlation coefficient corresponding to each overlapping part is greater than or equal to the preset maximum correlation coefficient threshold, it means that under the optimal alignment between the first measurement data segment and the second measurement data segment within the offset range, the overlapping part between the first measurement data segment and the second measurement data segment has a high degree of consistency, and data splicing can be performed to obtain a splicing result with high continuity and consistency, ensuring the smooth transition and consistency of the data in the overlapping part. In addition, by traversing different alignment methods of the overlapping part, the Pearson correlation coefficient corresponding to each alignment method is calculated and the maximum value is taken as the maximum correlation coefficient to ensure that the best matching point between the two data segments is found. Among them, the maximum correlation coefficient threshold is a key parameter set based on the statistical analysis of the correlation of rail measurement data and the accuracy requirements of the railway industry. Specifically, after repeated verification and adjustment in the laboratory and on-site, the maximum correlation coefficient threshold in the embodiment of the present application is set to 98%. The maximum correlation coefficient threshold can also be set and adjusted according to specific scenarios and requirements, which will not be repeated here. Specifically, according to the correlation calculation result, that is, the value of the Pearson correlation coefficient r, if it is close to +1 or -1, it means that the two sets of data have a strong linear correlation; if it is close to 0, it means that there is almost no linear correlation. Update the optimal correlation parameters to ensure that the two pieces of data have the highest match at the connection.

[0041] S104: If each of the first measurement data segments and the corresponding second measurement data segments in the at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, each of the second measurement data segments is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail.

[0042] Here, if each first measurement data segment and the corresponding second measurement data segment in at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, each second measurement data segment is adjusted to ensure that it is accurately aligned with the corresponding first measurement data segment in the overlapping part, and each second measurement data segment is spliced ​​into the corresponding first measurement data segment to construct a complete and continuous data set to obtain the rail straightness measurement data of the target rail.

[0043] In this way, the straightness of rails of any length can be measured to meet the detection needs in different scenarios. It is no longer limited to the traditional 1-meter measurement range and is suitable for the detection needs of rails of various lengths.

[0044] Furthermore, the embodiments of the present application take into account the changes in the development of railway technology. For new types of rails that may appear, the embodiments of the present application are based on the general characteristics of rail measurement data, such as data continuity and correlation, rather than relying on the physical characteristics or fixed parameters of specific rails. Therefore, when faced with fluctuations in measurement data caused by changes in new rail materials or structures, it is only necessary to make moderate fine-tuning of the parameters in the data preprocessing stage, such as adjusting the filter window size or weight distribution in the filtering algorithm according to the noise characteristics of the new data, to adapt to the new situation without making large-scale changes to the core splicing and correlation coefficient calculation logic, and it has good scalability.

[0045] In addition, the embodiment of the present application also takes into account the change in the accuracy of the measuring device. For higher-precision measuring devices, the embodiment of the present application has a flexible data processing architecture. Specifically, the improvement in the accuracy of the measuring device is usually manifested as an increase in the number of data points or a more subtle change in the measured value. When the number of data points increases, due to the mechanism based on data segment overlap and correlation coefficient traversal in the embodiment of the present application, it can naturally adapt to the processing of more data points and keep the increase in computational complexity within a reasonable range; and for changes in measured values, by optimizing the data normalization and standardization processing steps, it can be ensured that data of different accuracies can be effectively analyzed and spliced ​​under the same framework.

[0046] The embodiment of the present application also adopts a modular design, which can be easily expanded and adapted to new data format parsing functions. For example, in the data acquisition process, whether it is binary coded data generated based on new sensor technology or data structures that follow new industry standards, it is only necessary to add a corresponding data parsing submodule to the data acquisition module and convert it into a processable universal data format to ensure the smooth operation of the entire process without affecting subsequent correlation analysis and splicing operations, thereby ensuring stability and scalability in the face of data format changes.

[0047] Based on this, the data acquisition module can adopt a pluggable design to ensure compatibility with various data formats. When encountering a new format, develop a corresponding parsing plug-in and integrate it into the data acquisition module. For example, develop an XML parsing plug-in for XML data. The module has a built-in format recognition mechanism and automatically calls the corresponding plug-in for processing. In this way, it can quickly adapt to data format updates and maintain the consistency of the processing flow.

[0048] Furthermore, before acquiring at least two target measurement data segments of the target rail collected by the rail straightness measuring device, the method further includes:

[0049] Step a1, obtaining at least two original measurement data segments of the target rail collected by the rail straightness measuring equipment.

[0050] Here, in order to smooth the data curve and make the subsequent data processing have a higher quality data basis, it is necessary to pre-process the measurement data collected by the rail straightness measuring device. First, obtain at least two original measurement data segments of the target rail collected by the rail straightness measuring device. Specifically, the following takes the splicing processing of two measurement data segments as an example for explanation. When it involves the splicing of multiple measurement data segments, similar steps can be used for processing.

[0051] Get the first original measurement data segment and record it as original data1 :

[0052] Where n=1,2,3,…,1000.

[0053] Get the second original measurement data segment and record it as original data2 :

[0054] Where n = 1, 2, 3, ..., 1000. The number of data points in the overlapping area between the two original measurement data segments is recorded as overlap. points .

[0055] Step a2: for any of the original measurement data segments, remove noise from the measurement data in the original measurement data segment based on a preset filtering algorithm to obtain a first measurement data segment corresponding to the original measurement data segment.

[0056] Here, for any original measurement data segment, the measurement data in the original measurement data segment is de-noised based on a preset filtering algorithm to obtain a first measurement data segment corresponding to the original measurement data segment. Specifically, a suitable filtering algorithm is first used to remove high-frequency noise to reduce random fluctuations in the data. In the embodiment of the present application, the preset filtering algorithm is a median filtering algorithm. In view of the fact that the measurement data may contain spike noise, median filtering is particularly applicable. By taking the median of adjacent data points, median filtering can effectively remove impulse noise or outliers, and is particularly suitable for processing data containing spike noise.

[0057] Furthermore, the preset filtering algorithm may also adopt any one of a Kalman filtering algorithm, a wavelet transform filtering algorithm, a low-pass filtering algorithm, an adaptive filtering algorithm and a Gaussian filtering algorithm.

[0058] Among them, Kalman filtering is a recursive optimal estimation algorithm that can dynamically estimate the state of the system and update the predicted value in real time. It is suitable for processing noisy time series data, especially in the presence of dynamic changes, and can effectively deal with non-stationary noise; wavelet transform filtering decomposes and reconstructs data at different scales through multi-resolution analysis, and can capture global and local features at the same time, which is particularly suitable for processing local changes and multi-scale noise; low-pass filtering is used to remove high-frequency noise and retain low-frequency signals. It is suitable for processing periodic noise. It can effectively smooth data curves and reduce the impact of short-term fluctuations. It is particularly suitable for processing data with periodic components; adaptive filters (such as LMS least mean square algorithm or RLS recursive least squares algorithm) dynamically adjust filtering parameters according to real-time data, which is suitable for processing non-stationary noise. It can automatically adapt to changing environmental conditions and provide more flexible and accurate filtering effects; Gaussian filtering smoothes data points and their neighboring points by weighted averaging, which is particularly suitable for removing Gaussian distributed noise. It can maintain edge features while smoothing data, and is suitable for processing scenes dominated by Gaussian noise.

[0059] Step a3: smoothing the measurement data in the first measurement data segment based on a moving average method to obtain a second measurement data segment corresponding to the first measurement data segment.

[0060] Here, the measurement data in the first measurement data segment is smoothed based on the moving average method to obtain the second measurement data segment corresponding to the first measurement data segment. Specifically, after removing the high-frequency noise, smoothing is further applied to reduce short-term fluctuations in the data, making the data curve smoother and closer to the actual trend. Given that the measurement data are all measurement sets on the x-axis, the moving average method is particularly applicable. By taking the average of adjacent data points, the moving average method can effectively smooth the data curve and reduce the impact of short-term fluctuations.

[0061] Furthermore, the smoothing process may also adopt any one of an exponentially weighted moving average (EWMA) algorithm and a spline interpolation algorithm.

[0062] Among them, the exponentially weighted moving average algorithm gradually weakens the impact of historical data by giving higher weights to the most recent data points, providing a more flexible data smoothing effect. It is particularly suitable for scenarios that require more attention to recent data and can maintain sensitivity to new information while smoothing data. The spline interpolation algorithm interpolates data through spline functions to make the data curve smoother. It is suitable for processing data with local fluctuations. It can provide higher fitting accuracy and is particularly suitable for processing data with obvious local changes.

[0063] Step a4: determining the second measurement data segments corresponding to the at least two original measurement data segments of the target rail as the at least two target measurement data segments of the target rail.

[0064] Here, the second measurement data segment corresponding to the at least two original measurement data segments of the target rail is determined as the at least two target measurement data segments of the target rail. Specifically, after the preprocessing of step a2 and step a3, a cleaner and smoother measurement data segment is obtained, the random fluctuation in the data segment is significantly reduced, and the data curve is smoother, providing a high-quality data basis for subsequent data splicing. In the embodiment of the present application, the first original measurement data segment original data1 After preprocessing, the first target measurement data segment Smoothed data1 :

[0065] The second original measurement data segment original data2 After preprocessing, the second target measurement data segment Smoothed data2 :

[0066] In the embodiment of the present application, data preprocessing is a key step in the data splicing process, which aims to improve data quality, reduce interference factors, ensure data consistency and accuracy, and provide a solid foundation for subsequent data splicing and analysis. In order to improve the quality of data splicing and reduce the impact of measurement errors, each data segment to be spliced ​​must be subjected to noise removal and smoothing. This step is intended to remove or reduce random fluctuations (i.e., noise) in the data, which may be caused by limitations of the measuring equipment, environmental factors, or other external conditions. By applying appropriate filtering algorithms, high-frequency noise can be effectively eliminated and the data curve can be smoothed to make it closer to the actual trend. In addition, the combined order of noise removal and smoothing and the specific parameter settings can be specifically set according to the actual working conditions to effectively remove noise and fluctuations and maintain the authenticity and accuracy of the measured data. In addition, temperature changes may cause thermal expansion and contraction of the rails, thereby causing nonlinear deviations in the measured data. Therefore, in the data acquisition and measurement phase, the original data can be pre-temperature compensated to effectively reduce the impact of errors on the splicing results.

[0067] Furthermore, since the embodiments of the present application adopt a modular design, an adjustable parameter interface can be reserved in the data preprocessing stage. For example, the median filter algorithm can dynamically adjust the neighborhood window size to adapt to new data fluctuation characteristics. The moving average algorithm provides a weight adjustment interface, which can flexibly process high-precision data to ensure that the smoothing result retains key information and adapts to new precision requirements.

[0068] Further, the determining of the Pearson correlation coefficient corresponding to each overlapping portion based on the overlapping portion of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position includes:

[0069] Step b1, for any of the starting overlapping data point positions, respectively intercepting a first overlapping portion in the first measurement data segment and a second overlapping portion in the second measurement data segment corresponding to the starting overlapping data point position in the first measurement data segment and the second measurement data segment.

[0070] Here, for any starting overlapping data point position, the first overlapping part in the first measurement data segment and the second overlapping part in the second measurement data segment corresponding to the starting overlapping data point position are intercepted in the first measurement data segment and the second measurement data segment respectively. Specifically, in order to verify the correlation degree between the overlapping parts of the first measurement data segment and the second measurement data segment, the offset traversal operation is performed: by adjusting the relative offset m between the two segments of data, the Smoothed data2 Compared to Smoothed data1 The starting overlapping data point position of Smoothed data1 and Smoothed data2 First, in each iteration, according to the position of the starting overlapping data point, the overlapping area of ​​the two segments of data is cut out in the first measurement data segment and the second measurement data segment, and is used as the first overlapping part and the second overlapping part respectively.

[0071] Specifically, the first overlapping portion overlap data1 :

[0072] The second overlapping part overlap data2 : Ensure that subsequent processing is only for data in the overlapping area, providing an accurate basis for subsequent calculations.

[0073] Step b2, based on the starting point coordinates and ending point coordinates of the first overlapping part and the starting point coordinates and ending point coordinates of the second overlapping part, level the first overlapping part and the second overlapping part to obtain the leveled first overlapping part and the second overlapping part.

[0074] Here, in order to ensure that the first overlapping portion and the second overlapping portion are on the same horizontal line, the intercepted first overlapping portion and the second overlapping portion are leveled head to tail in each iteration to eliminate the linear trend of the second overlapping portion relative to the first overlapping portion. Specifically, based on the starting point coordinates and the ending point coordinates of the first overlapping portion and the starting point coordinates and the ending point coordinates of the second overlapping portion, the first overlapping portion and the second overlapping portion are leveled head to tail to obtain the first overlapping portion and the second overlapping portion after leveling head to tail.

[0075] Specifically, the first overlapping part overlap data1 , the second overlapping part overlap data2 And the number of data points in the overlapping area overlap points As input, output the first overlapping part after the head and tail are leveled. data1 : and the second overlapping part is aligned data2 :

[0076] Step b3, based on the first overlapping part and the second overlapping part after the head-to-tail leveling, and the Gauss-Newton algorithm, remove the linear trend of the second overlapping part after the head-to-tail leveling relative to the first overlapping part after the head-to-tail leveling, to obtain the second overlapping part after the linear trend is removed.

[0077] Here, based on the first overlapping part after the head and tail are leveled, data1 and the second overlapping part is aligned data2 , and the Gauss-Newton algorithm, remove the second overlapping part after the head and tail are aligned data2 Aligned relative to the first overlapped part after leveling data1 The linear trend of the second overlap is adjusted after removing the linear trend. data2 , to eliminate the linear difference between the first overlapping part and the second overlapping part.

[0078] Step b4, calculating the Pearson correlation coefficient of the second overlapping part after removing the linear trend corresponding to each of the starting overlapping data point positions relative to the first overlapping part after the head and tail are leveled, to obtain the Pearson correlation coefficient corresponding to each of the overlapping parts.

[0079] Here, the second overlapping part after removing the linear trend corresponding to each starting overlapping data point position is calculated. data2 Aligned relative to the first overlapped part after leveling data1The Pearson correlation coefficient of each overlapping part is obtained.

[0080] Specifically, the Pearson correlation coefficient r is used to measure the aligned data1 and the corresponding adjusted data2 The degree of linear correlation between .

[0081] First, calculate aligned data1 and the corresponding adjusted data2 The mean and standard deviation of . data1 The mean It can be expressed as: Among them, A′ is aligned data1 The vertical coordinates of each data point in. data2 The mean It can be expressed as: Among them, B′ is adjusted data2 The vertical coordinates of each data point in the aligned data1 The standard deviation σ A′ It can be expressed as: adjusted data2 The standard deviation σ B′ It can be expressed as:

[0082] Next, according to aligned data1 and the corresponding adjusted data2 The mean and standard deviation of data1 and the corresponding adjusted data2 The covariance and Pearson correlation coefficient are used to evaluate the linear correlation between two segments of data. Among them, the covariance Cov(A′,B′) can be expressed as:

[0083]

[0084] The Pearson correlation coefficient r can be expressed as:

[0085] Further, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, each of the second measurement data segments is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail, including:

[0086] Step c1, determining the deflection angle, vertical offset and additional offset of the second measurement data segment relative to the first measurement data segment based on the starting overlapping data point position corresponding to the maximum correlation coefficient, the first measurement data segment and the second measurement data segment.

[0087] Here, after finding the maximum correlation coefficient, the second measurement data segment is smoothed using the starting overlapping data point position corresponding to the maximum correlation coefficient. data2 Adjusted and Smoothed with the first measurement data segment data1 Splice into a complete data set data combined Specifically, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, the first measured data segment Smoothed data1 and the second measurement data segment Smoothed data2 , determine the second measurement data segment Smoothed data2 Relative to the first measurement data segment Smoothed data1 The deflection angle delta angle , vertical offset offset and extra offset extra offset .

[0088] Specifically, the second measurement data segment Smoothed is calculated based on the angle and offset information in the correlation result. data2 Relative to the first measurement data segment Smoothed data1 The deflection angle delta angle and vertical offset offset The specific formula is as follows:

[0089]

[0090] in, is the initial angle of the first measurement data segment; is the initial angle of the second measurement data segment; angle adjustment It is a preset relative angle adjustment value between the first measurement data segment and the second measurement data segment, that is, an angle compensation value.

[0091] Calculate the first data point in the second measurement data segment The last overlapping point in the first measurement segment The difference between the two is used as the vertical offset offset . Specifically:

[0092]

[0093] The intercept of the fitted line calculated by the Gauss-Newton algorithm is determined as the extra offset extra offset .

[0094] Step c2: adjusting the measurement data in the second measurement data segment based on the deflection angle, vertical offset and additional offset, splicing each of the second measurement data segments into the corresponding first measurement data segment, and obtaining the rail straightness measurement data of the target rail.

[0095] Here, in order to make the second measurement data segment and the first measurement data segment transition smoothly at the joint, the second measurement data segment needs to be adjusted. The adjustment method is based on the calculated deflection angle delta angle , vertical offset offset And extra offset extra offset , modify the coordinates of the data points in the second measurement data segment point by point. The adjustment formula is as follows:

[0096]

[0097] Wherein, n is the index of the second measurement data segment;

[0098] sin(delta angle ) is the sine of the deflection angle.

[0099] Furthermore, the total length of the spliced ​​data is determined. The total length of the data is equal to the length N of the first measured data segment. 1 Add the length N of the second measurement data segment 2 Subtract the overlap pverlap points The effective length after. Specifically: N 总 =N 1 +(N 2 -overlap points );

[0100] Next, create a new data sequence to store the concatenated results. First, copy the first segment of data to the first half of the new sequence, and then copy the adjusted second segment of data to the second half of the new sequence, starting from the end of the first segment of data.

[0101]

[0102] Further, the first overlapping part and the second overlapping part are leveled head to tail based on the starting point coordinates and the ending point coordinates of the first overlapping part, and the starting point coordinates and the ending point coordinates of the second overlapping part, to obtain the first overlapping part and the second overlapping part after the leveling, including:

[0103] Step d1, aligning the starting point coordinates of the second overlapping part with the starting point coordinates of the first overlapping part to obtain the starting point coordinates of the overlapping part; at the same time, aligning the end point coordinates of the second overlapping part with the end point coordinates of the first overlapping part to obtain the end point coordinates of the overlapping part.

[0104] Here, overlap data1 and overlap data2 Align the first and last points in the data to ensure that the two segments are on the same baseline. This step is achieved by adjusting the start or end values ​​of the two segments so that they transition smoothly at the connection. Specifically, align the starting point coordinates of the second overlapping part with the starting point coordinates of the first overlapping part to obtain the starting point coordinates of the overlapping part; at the same time, align the end point coordinates of the second overlapping part with the end point coordinates of the first overlapping part to obtain the end point coordinates of the overlapping part.

[0105] Step d2, determining the linear slope factor of the overlapping portion based on the difference between the ordinates of the starting point coordinates of the overlapping portion and the end point coordinates of the overlapping portion, and the number of data points of the overlapping portion.

[0106] Here, the rate of change in height from the first point to the last point of the overlapping data is used as the linear slope factor of the overlapping part. The linear slope is based on the number of points in the overlapping area and is obtained by dividing the height difference between the starting point and the ending point by the number of overlapping points.

[0107] Step d3, based on the starting point coordinates of the overlapping part and the linear slope factor of the overlapping part, respectively adjust the vertical coordinates of each data point in the first overlapping part and the second overlapping part to obtain the first overlapping part and the second overlapping part after being leveled.

[0108] Here, the starting coordinates of the overlapping part are saved as the reference. All data points in the overlapping part are traversed, and the ordinate of each data point is updated to adjust it relative to the starting coordinates and the linear slope factor of the overlapping part, so as to obtain the first overlapping part and the second overlapping part after the head and tail are leveled. Through the above steps, it is ensured that the two data segments have the same reference reference at the starting and end points of the overlapping area, so as to achieve smooth transition and high consistency of the data segments. The smoothness and accuracy of the data after splicing are improved.

[0109] Further, based on the first overlapping part and the second overlapping part after the head-to-tail leveling and the Gauss-Newton algorithm, removing the linear trend of the second overlapping part after the head-to-tail leveling relative to the first overlapping part after the head-to-tail leveling to obtain the second overlapping part after the linear trend is removed, comprises:

[0110] Step e1, subtracting the vertical coordinate of each data point in the second overlapping part after the head-to-tail leveling from the vertical coordinate of the corresponding data point in the first overlapping part after the head-to-tail leveling, to obtain a target difference set of the second overlapping part after the head-to-tail leveling relative to the first overlapping part after the head-to-tail leveling.

[0111] Here, the second overlapping part after leveling the head and tail is aligned data2 The ordinate of each data point in is aligned with the first overlapping part after the head and tail are leveled. data1 Subtract the ordinates of the corresponding data points in to get the second overlapping part after the head and tail are leveled. data2 Aligned relative to the first overlapped part after leveling data1 The target difference set diff values Specifically, create an empty difference set diff values , used to store the calculation results. For each point i (0 <= i <overlap points ), calculate aligned data2 The i-th point in is aligned with data1 The difference of the ordinate of the i-th point in the y-th point, and store the result in the difference set diff values After the above calculation, a set diff containing all the differences is formed. values , which is used for subsequent fitting analysis.

[0112] Step e2: performing linear fitting on the target difference value set based on the Gauss-Newton method to obtain a target fitting curve of the second overlapping portion after the head-to-tail leveling relative to the first overlapping portion after the head-to-tail leveling.

[0113] Here, the Gauss-Newton algorithm is used to calculate the difference set diff values Perform a polynomial fit to obtain the slope and intercept. This method finds the optimal linear model by minimizing the sum of squared errors (SSE) between the predicted values ​​and the actual observed values.

[0114] The specific steps are as follows:

[0115] Step 1: Define the linear model: The linear model is expressed as: y=slope·x+intercept; where x is the independent variable, y is the dependent variable, slope is the slope, and intercept is the intercept.

[0116] Step 2, initialization parameters: select the initial guess value initial slope and initialintercept . Set the initial slope to 0 and the initial intercept to the mean of the difference set. Initialize the residual vector residuals to store the error in each iteration.

[0117] Step 3: Calculate the Jacobian matrix: The Jacobian matrix J is the partial derivative matrix of the residual function with respect to the parameters. For a linear model, the Jacobian matrix is ​​in the form of: Each row corresponds to a data point, the first column is the value of the independent variable x, and the second column is the constant term 1.

[0118] Step 4: Calculate the residual vector: The residual vector r represents the difference between the current model prediction value and the actual observation value: r i =y i -(slope·y i +intercept); for all data points, the residual vector can be expressed as:

[0119] Step 5: Construct and solve the normal equation: According to the Gauss-Newton method, the formula for updating parameters is: Δp = (J T J) - 1 J T r; where p is a parameter vector, including [slope, intercept], and Δp is the parameter increment. By solving the above equation, we can get the parameter update Δp.

[0120] Step 6: Update parameters: Use the update amount Δp to adjust the current parameters: P new =P old +ΔP; that is:

[0121] Step 7: Check the convergence condition: Calculate the sum of squared errors (SSE) of the current iteration: If the SSE is less than the set threshold, or the parameter update amount Δp is small enough (i.e. the parameter change is very small), the algorithm is considered to have converged and the iteration is stopped. Otherwise, return to step 3 and continue iterative optimization.

[0122] Step 8. Return the fitting result: When the algorithm converges, return the final slope and intercept as the parameters of the fitting line.

[0123] Step e3, based on the target fitting curve, calculate the fitting value corresponding to each data point in the second overlapping part after the head and tail are leveled, and subtract the corresponding fitting value from the vertical coordinate of each data point in the second overlapping part after the head and tail are leveled to obtain the second overlapping part after removing the linear trend.

[0124] Here, the independent variable x is calculated based on the slope and intercept of the linear model. values The corresponding dependent variable fitting value forms a new data set fitted data2 , providing a basis for subsequent difference calculation.

[0125] By aligning the second overlapped part from the beginning to the end data2 Subtract the corresponding fitted value (from fitted data2 ), eliminating the linear trend and generating the second overlapping part after removing the linear trend adjusted data2 , so that the two pieces of data are more consistent.

[0126] Furthermore, the method further comprises:

[0127] Step f1: If the maximum correlation coefficient is less than the maximum correlation coefficient threshold, it is determined that data splicing cannot be performed on the first measurement data segment and the second measurement data segment.

[0128] Step f2, returning a null result to indicate that the splicing of the first measurement data segment and the second measurement data segment fails.

[0129] Here, if the maximum correlation coefficient obtained in the traversal process is too low, it means that the correlation between the two pieces of data in the overlapping part is very low and insufficient for effective splicing. In this case, due to the lack of sufficient correlation to ensure the accuracy and reliability of the splicing, the algorithm will not perform the splicing operation and return a null result to indicate that the splicing attempt was unsuccessful.

[0130] The embodiment of the present application provides a method for processing rail straightness measurement data, comprising: obtaining at least two target measurement data segments of a target rail collected by a rail straightness measuring device; the number of data points of the at least two target measurement data segments is the same, and there are overlapping parts in adjacent target measurement data segments; for a first measurement data segment and a second measurement data segment in the at least two target measurement data segments, adjusting the starting overlapping data point position of the second measurement data segment relative to the first measurement data segment within a preset offset range, and determining the Pearson correlation coefficient corresponding to each overlapping part based on the overlapping parts of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position; the first measurement data segment is at least two target measurement data segments. Any target measurement data segment in the measurement data segment, the second measurement data segment is a target measurement data segment adjacent to the first measurement data segment after the first measurement data segment; if the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to the preset maximum correlation coefficient threshold, it is determined that the first measurement data segment and the second measurement data can be spliced; if each first measurement data segment and the corresponding second measurement data segment in at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, each second measurement data segment is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail. In this way, each measurement data segment is spliced ​​using the starting overlapping data point determined by the maximum correlation coefficient, thereby improving the accuracy of the rail straightness measurement data.

[0131] Based on the same application concept, the embodiments of the present application also provide a device for processing rail straightness measurement data corresponding to the method for processing rail straightness measurement data provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the method for processing rail straightness measurement data in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0132] See also Figure 2 , Figure 2 This is one of the functional module diagrams of a rail straightness measurement data processing device provided in an embodiment of the present application. Figure 2 As shown, the rail straightness measurement data processing device 200 includes:

[0133] The data acquisition module 210 is used to acquire at least two target measurement data segments of the target rail collected by the rail straightness measurement device; the at least two target measurement data segments have the same number of data points, and there are overlapping parts in adjacent target measurement data segments.

[0134] The first determination module 220 is used to adjust the starting overlapping data point position of the second measurement data segment relative to the first measurement data segment within a preset offset range for the first measurement data segment and the second measurement data segment among the at least two target measurement data segments, and determine the Pearson correlation coefficient corresponding to each overlapping part based on the overlapping parts of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position; the first measurement data segment is any target measurement data segment among the at least two target measurement data segments, and the second measurement data segment is a target measurement data segment that is adjacent to the first measurement data segment and follows the first measurement data segment.

[0135] The second determination module 230 is configured to determine that data splicing can be performed on the first measurement data segment and the second measurement data segment if the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to a preset maximum correlation coefficient threshold.

[0136] A data splicing module 240 is used to, if each of the first measurement data segments and the corresponding second measurement data segments in the at least two target measurement data segments can be spliced, start from the first target measurement data segment of the target rail, and splice each of the second measurement data segments into the corresponding first measurement data segment based on the starting overlapping data point position corresponding to the maximum correlation coefficient, so as to obtain the rail straightness measurement data of the target rail.

[0137] For further information, see Figure 3 , Figure 3 The second functional module diagram of a rail straightness measurement data processing device provided in an embodiment of the present application is as follows: Figure 3 As shown, the rail straightness measurement data processing device 200 also includes:

[0138] The second data acquisition module 250 is used to acquire at least two original measurement data segments of the target rail collected by the rail straightness measurement device.

[0139] The first preprocessing module 260 is used to remove noise from the measurement data in any of the original measurement data segments based on a preset filtering algorithm to obtain a first measurement data segment corresponding to the original measurement data segment.

[0140] The second preprocessing module 270 is used to perform smoothing processing on the measurement data in the first measurement data segment based on a moving average method to obtain a second measurement data segment corresponding to the first measurement data segment.

[0141] A third determination module 280, configured to determine at least two second measurement data segments corresponding to at least two original measurement data segments of the target rail as at least two target measurement data segments of the target rail.

[0142] Further, when the first determination module 220 is configured to determine the Pearson correlation coefficient corresponding to each overlapping part based on the overlapping parts of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position, the first determination module 220 is specifically configured to:

[0143] For any one of the starting overlapping data point positions, intercept a first overlapping part in the first measurement data segment corresponding to the starting overlapping data point position and a second overlapping part in the second measurement data segment in the first measurement data segment and the second measurement data segment respectively;

[0144] Based on the starting coordinate and the ending coordinate of the first overlapping part, and the starting coordinate and the ending coordinate of the second overlapping part, level the head and tail of the first overlapping part and the second overlapping part to obtain the first overlapping part and the second overlapping part after leveling the head and tail;

[0145] Based on the first overlapping part and the second overlapping part after leveling the head and tail, and the Gauss-Newton algorithm, remove the linear trend of the second overlapping part after leveling the head and tail relative to the first overlapping part after leveling the head and tail to obtain the second overlapping part after removing the linear trend;

[0146] Calculate the Pearson correlation coefficient of the second overlapping part after removing the linear trend corresponding to each starting overlapping data point position relative to the first overlapping part after leveling the head and tail to obtain the Pearson correlation coefficient corresponding to each overlapping part.

[0147] Further, when the data splicing module 240 is configured to splice each second measurement data segment into the corresponding first measurement data segment based on the starting overlapping data point position corresponding to the maximum correlation coefficient to obtain the rail straightness measurement data of the target rail, the data splicing module 240 is specifically configured to:

[0148] Based on the starting overlapping data point position corresponding to the maximum correlation coefficient, the first measurement data segment and the second measurement data segment, determine the deflection angle, the vertical offset and the additional offset of the second measurement data segment relative to the first measurement data segment;

[0149] Based on the deflection angle, vertical offset and additional offset, the measurement data in the second measurement data segment is adjusted, and each of the second measurement data segments is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail.

[0150] Further, when the first determining module 220 is used to perform end-to-end leveling on the first overlapping portion and the second overlapping portion based on the starting point coordinates and the ending point coordinates of the first overlapping portion and the starting point coordinates and the ending point coordinates of the second overlapping portion to obtain the first overlapping portion and the second overlapping portion after the end-to-end leveling, the first determining module 220 is specifically used to:

[0151] Aligning the starting point coordinates of the second overlapping portion with the starting point coordinates of the first overlapping portion to obtain the starting point coordinates of the overlapping portion; and aligning the ending point coordinates of the second overlapping portion with the ending point coordinates of the first overlapping portion to obtain the ending point coordinates of the overlapping portion;

[0152] Determine a linear slope factor of the overlapping portion based on a difference between the ordinates of the starting point coordinates of the overlapping portion and the end point coordinates of the overlapping portion, and the number of data points of the overlapping portion;

[0153] Based on the starting point coordinates of the overlapping portion and the linear slope factor of the overlapping portion, the ordinates of each data point in the first overlapping portion and the second overlapping portion are adjusted respectively to obtain the first overlapping portion and the second overlapping portion after being leveled head to tail.

[0154] Further, when the first determining module 220 is used to remove the linear trend of the second overlapping part after the head-to-tail leveling relative to the first overlapping part after the head-to-tail leveling based on the first overlapping part and the second overlapping part after the head-to-tail leveling and the Gauss-Newton algorithm to obtain the second overlapping part after the linear trend is removed, the first determining module 220 is specifically used to:

[0155] Subtracting the ordinate of each data point in the second overlapped portion after the head-to-tail leveling from the ordinate of the corresponding data point in the first overlapped portion after the head-to-tail leveling to obtain a target difference value set of the second overlapped portion after the head-to-tail leveling relative to the first overlapped portion after the head-to-tail leveling;

[0156] Performing linear fitting on the target difference value set based on the Gauss-Newton method to obtain a target fitting curve of the second overlapping portion after the head-to-tail leveling relative to the first overlapping portion after the head-to-tail leveling;

[0157] Based on the target fitting curve, the fitting value corresponding to each data point in the second overlapping part after the head and tail are leveled is calculated, and the corresponding fitting value is subtracted from the vertical coordinate of each data point in the second overlapping part after the head and tail are leveled to obtain the second overlapping part after the linear trend is removed.

[0158] Furthermore, if Figure 3 As shown, the rail straightness measurement data processing device 200 also includes:

[0159] The fourth determination module 290 is used to determine that the first measurement data segment and the second measurement data segment cannot be spliced ​​if the maximum correlation coefficient is less than the maximum correlation coefficient threshold; and return a null value result to prompt that the splicing of the first measurement data segment and the second measurement data segment fails.

[0160] The embodiment of the present application provides a processing device for rail straightness measurement data, including: a data acquisition module, used to acquire at least two target measurement data segments of a target rail collected by a rail straightness measurement device; the number of data points of the at least two target measurement data segments is the same, and there are overlapping parts in adjacent target measurement data segments; a first determination module, used to adjust the starting overlapping data point position of the second measurement data segment relative to the first measurement data segment within a preset offset range for a first measurement data segment and a second measurement data segment in the at least two target measurement data segments, and determine the Pearson correlation coefficient corresponding to each overlapping part based on the overlapping parts of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position; the first measurement data segment is at least two target measurement data segments. The second measurement data segment is any target measurement data segment in the measurement data segment, and the second measurement data segment is a target measurement data segment adjacent to the first measurement data segment after the first measurement data segment; the second determination module is used to determine that the first measurement data segment and the second measurement data can be spliced ​​if the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to the preset maximum correlation coefficient threshold; the data splicing module is used to splice the first measurement data segment and the second measurement data segment if each first measurement data segment and the corresponding second measurement data segment in at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, each second measurement data segment is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail. In this way, the starting overlapping data point determined by the maximum correlation coefficient is used to splice each measurement data segment, thereby improving the accuracy of the rail straightness measurement data.

[0161] Based on the same application idea, please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4As shown, the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .

[0162] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the processor 410 is running, the machine-readable instructions execute the steps of the method for processing rail straightness measurement data provided in the above embodiment. The specific implementation method can be found in the method embodiment, which will not be repeated here.

[0163] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for processing rail straightness measurement data provided in the above embodiment are executed. The specific implementation method can be found in the method embodiment, which will not be repeated here.

[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0165] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0167] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0168] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0169] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0170] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for processing rail straightness measurement data, characterized in that: The method comprises: Acquire at least two target measurement data segments of the target rail collected by the rail straightness measuring device; the at least two target measurement data segments have the same number of data points, and there are overlapping parts in adjacent target measurement data segments; For a first measurement data segment and a second measurement data segment of the at least two target measurement data segments, adjusting the starting overlapping data point position of the second measurement data segment relative to the first measurement data segment within a preset offset range, and determining the Pearson correlation coefficient corresponding to each overlapping portion based on the overlapping portions of the first measurement data segment and the second measurement data segment corresponding to each starting overlapping data point position; the first measurement data segment is any target measurement data segment of the at least two target measurement data segments, and the second measurement data segment is a target measurement data segment adjacent to the first measurement data segment after the first measurement data segment; If the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to a preset maximum correlation coefficient threshold, it is determined that the first measurement data segment and the second measurement data segment can be data spliced; If each of the first measurement data segments and the corresponding second measurement data segments in the at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, each of the second measurement data segments is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail.

2. The method for processing rail straightness measurement data according to claim 1, characterized in that: Before acquiring at least two target measurement data segments of the target rail collected by the rail straightness measuring device, the method further includes: Acquire at least two original measurement data segments of the target rail collected by the rail straightness measuring device; For any of the original measurement data segments, noise is removed from the measurement data in the original measurement data segment based on a preset filtering algorithm to obtain a first measurement data segment corresponding to the original measurement data segment; Smoothing the measurement data in the first measurement data segment based on a moving average method to obtain a second measurement data segment corresponding to the first measurement data segment; The second measurement data segments corresponding to the at least two original measurement data segments of the target rail are determined as the at least two target measurement data segments of the target rail.

3. The method for processing rail straightness measurement data according to claim 1, characterized in that: The determining, based on the overlapping parts of the first measurement data segment and the second measurement data segment corresponding to the positions of the respective starting overlapping data points, the Pearson correlation coefficient corresponding to each of the overlapping parts comprises: For any of the starting overlapping data point positions, in the first measurement data segment and the second measurement data segment, respectively, a first overlapping portion in the first measurement data segment and a second overlapping portion in the second measurement data segment corresponding to the starting overlapping data point position are intercepted; Based on the starting point coordinates and the ending point coordinates of the first overlapping part and the starting point coordinates and the ending point coordinates of the second overlapping part, the first overlapping part and the second overlapping part are leveled head to tail to obtain the first overlapping part and the second overlapping part after the leveling; Based on the first overlapping part and the second overlapping part after the head-to-tail leveling and the Gauss-Newton algorithm, a linear trend of the second overlapping part after the head-to-tail leveling relative to the first overlapping part after the head-to-tail leveling is removed to obtain the second overlapping part after the linear trend is removed; The Pearson correlation coefficient of the second overlapping part after the linear trend is removed corresponding to each of the starting overlapping data point positions relative to the first overlapping part after the head and tail are leveled is calculated to obtain the Pearson correlation coefficient corresponding to each of the overlapping parts.

4. The method for processing rail straightness measurement data according to claim 1, characterized in that: The step of splicing each of the second measurement data segments into the corresponding first measurement data segment based on the starting overlapping data point position corresponding to the maximum correlation coefficient to obtain the rail straightness measurement data of the target rail comprises: Determine a deflection angle, a vertical offset, and an additional offset of the second measurement data segment relative to the first measurement data segment based on the starting overlapping data point position corresponding to the maximum correlation coefficient, the first measurement data segment, and the second measurement data segment; Based on the deflection angle, vertical offset and additional offset, the measurement data in the second measurement data segment is adjusted, and each of the second measurement data segments is spliced ​​into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail.

5. The method for processing rail straightness measurement data according to claim 3, characterized in that: The step of performing end-to-end leveling on the first overlapping portion and the second overlapping portion based on the starting point coordinates and the ending point coordinates of the first overlapping portion and the starting point coordinates and the ending point coordinates of the second overlapping portion to obtain the first overlapping portion and the second overlapping portion after the leveling includes: Aligning the starting point coordinates of the second overlapping portion with the starting point coordinates of the first overlapping portion to obtain the starting point coordinates of the overlapping portion; and aligning the ending point coordinates of the second overlapping portion with the ending point coordinates of the first overlapping portion to obtain the ending point coordinates of the overlapping portion; Determine a linear slope factor of the overlapping portion based on a difference between the ordinates of the starting point coordinates of the overlapping portion and the end point coordinates of the overlapping portion, and the number of data points of the overlapping portion; Based on the starting point coordinates of the overlapping portion and the linear slope factor of the overlapping portion, the ordinates of each data point in the first overlapping portion and the second overlapping portion are adjusted respectively to obtain the first overlapping portion and the second overlapping portion after being leveled head to tail.

6. The method for processing rail straightness measurement data according to claim 3, characterized in that: The method of removing the linear trend of the second overlapping part after the head-to-tail leveling relative to the first overlapping part after the head-to-tail leveling based on the first overlapping part and the second overlapping part after the head-to-tail leveling and the Gauss-Newton algorithm to obtain the second overlapping part after the linear trend is removed includes: Subtracting the ordinate of each data point in the second overlapped portion after the head-to-tail leveling from the ordinate of the corresponding data point in the first overlapped portion after the head-to-tail leveling to obtain a target difference value set of the second overlapped portion after the head-to-tail leveling relative to the first overlapped portion after the head-to-tail leveling; Performing linear fitting on the target difference value set based on the Gauss-Newton method to obtain a target fitting curve of the second overlapping portion after the head-to-tail leveling relative to the first overlapping portion after the head-to-tail leveling; Based on the target fitting curve, the fitting value corresponding to each data point in the second overlapping part after the head and tail are leveled is calculated, and the corresponding fitting value is subtracted from the vertical coordinate of each data point in the second overlapping part after the head and tail are leveled to obtain the second overlapping part after the linear trend is removed.

7. The method for processing rail straightness measurement data according to claim 1, characterized in that: The method further comprises: If the maximum correlation coefficient is less than the maximum correlation coefficient threshold, determining that the first measurement data segment and the second measurement data segment cannot be data spliced; A null result is returned to indicate that the splicing of the first measurement data segment and the second measurement data segment fails.

8. A device for processing rail straightness measurement data, characterized in that: The rail straightness measurement data processing device comprises: A data acquisition module, used to acquire at least two target measurement data segments of the target rail collected by the rail straightness measurement device; the at least two target measurement data segments have the same number of data points, and there are overlapping parts in adjacent target measurement data segments; a first determination module, configured to adjust, for a first measurement data segment and a second measurement data segment of the at least two target measurement data segments, a starting overlapping data point position of the second measurement data segment relative to the first measurement data segment within a preset offset range, and determine, based on overlapping parts of the first measurement data segment and the second measurement data segment corresponding to respective starting overlapping data point positions, a Pearson correlation coefficient corresponding to each overlapping part; the first measurement data segment is any target measurement data segment of the at least two target measurement data segments, and the second measurement data segment is a target measurement data segment adjacent to the first measurement data segment and following the first measurement data segment; A second determination module is used to determine that the first measurement data segment and the second measurement data segment can be spliced ​​if the maximum correlation coefficient among the Pearson correlation coefficients corresponding to the overlapping parts is greater than or equal to a preset maximum correlation coefficient threshold; A data splicing module is used for, if each of the first measurement data segments and the corresponding second measurement data segments in the at least two target measurement data segments can be spliced, starting from the first target measurement data segment of the target rail, based on the starting overlapping data point position corresponding to the maximum correlation coefficient, splicing each of the second measurement data segments into the corresponding first measurement data segment to obtain the rail straightness measurement data of the target rail.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate with each other through the bus, and when the machine-readable instructions are run by the processor, the steps of the method for processing rail straightness measurement data as described in any one of claims 1 to 7 are executed.

10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for processing rail straightness measurement data according to any one of claims 1 to 7 are executed.