Detection equipment data synchronization method and device based on optical pulse coding counting

By using the optical pulse coding counting method to uniformly receive and divide the pulse signals of the detection equipment, and converting them into optical signals for synchronization, the problems of error and resource waste in data synchronization of railway infrastructure detection equipment are solved, and higher data synchronization accuracy and resource utilization efficiency are achieved.

CN122052955APending Publication Date: 2026-05-15CHINA ACADEMY OF RAILWAY SCI CORP LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA ACADEMY OF RAILWAY SCI CORP LTD
Filing Date
2026-01-15
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing railway infrastructure testing equipment suffers from errors and resource waste during data synchronization, mainly due to inconsistencies in mileage information caused by differences in the hardware and software of various devices.

Method used

The optical pulse coding counting method is adopted. By uniformly receiving the encoder pulse signal, the frequency is divided according to the sampling interval requirements of the detection equipment, and the divided pulse signal is converted into an optical signal for data synchronization, thus avoiding repeated frequency division and accumulation operations.

Benefits of technology

This improved the accuracy of data synchronization for testing equipment, reduced resource waste, and ensured the precision and efficiency of data alignment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122052955A_ABST
    Figure CN122052955A_ABST
Patent Text Reader

Abstract

The invention discloses a detection equipment data synchronization method and device based on optical pulse coding counting. The method comprises the following steps: collecting a pulse signal output by a pulse encoder; the pulse encoder is mounted on the detection vehicle; according to a preset frequency division coefficient, performing frequency division on the pulse signal to generate frequency division pulse signals corresponding to the number of frequency division pulses; the preset frequency division coefficient is determined according to the sampling interval requirement of each detection device; the detection equipment is mounted on the detection vehicle; the number of the frequency division pulses corresponds to the number of the detection devices; the frequency division pulse signals corresponding to the frequency division pulse number are input into an optical switch for photoelectric signal conversion, and optical signals corresponding to the detection equipment are generated; according to the optical signal, detection data synchronization is carried out on the detection equipment corresponding to the optical signal, the accuracy of data synchronization of the detection equipment can be improved, and resource waste is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of railway infrastructure inspection technology, and in particular to a method and apparatus for synchronizing inspection equipment data based on optical pulse code counting. Background Technology

[0002] Currently operating high-speed comprehensive inspection trains, comprehensive inspection vehicles, and overhead contact line inspection vehicles all contain multiple sets of inspection equipment with different functions to inspect railway infrastructure and equipment along the line. The inspection data from multiple sets of equipment need to be synchronized and aligned before comprehensive comparison and analysis.

[0003] The detection data output by the detection equipment uses mileage information as an index, is displayed in a unified coordinate system, and undergoes correlation analysis. Figure 1 A flowchart illustrating the data alignment process for existing detection equipment, such as... Figure 1 As shown, the mileage information is formed based on the accumulation of encoder pulses. The encoder pulses represent the distance the train travels. Each detection device divides the encoder pulses according to its required data acquisition interval, accumulates the divided pulses, and converts them into actual mileage.

[0004] The above data alignment method has certain problems: First, each detection device independently receives encoder pulses and performs frequency division and cumulative counting on its own. Due to differences in hardware and software among the detection devices, there are certain errors in the receiving and accumulation processes, which leads to significant differences in the mileage synthesized by each set of detection devices. At the same time, each detection device repeatedly performs pulse frequency division, accumulation, and mileage conversion operations, which is also a waste of hardware and software resources. Summary of the Invention

[0005] This invention provides a data synchronization method for detection equipment based on optical pulse code counting, to improve the accuracy of data synchronization and avoid resource waste. The method includes: The pulse signal output by the pulse encoder is acquired; the pulse encoder is installed on the testing vehicle. The pulse signal is divided according to a preset frequency division coefficient to generate a frequency-divided pulse signal corresponding to the number of frequency-divided pulses; the preset frequency division coefficient is determined according to the sampling interval requirements of each detection device; the detection device is installed on the detection vehicle; the number of frequency-divided pulses corresponds to the number of detection devices; The frequency division pulse signal corresponding to the number of frequency division pulses is input into the optical switch for photoelectric signal conversion to generate an optical signal corresponding to the detection device. Based on the optical signal, the detection data of the detection device corresponding to the optical signal is synchronized.

[0006] Another aspect of the present invention provides a data synchronization device for a detection device based on optical pulse code counting, which improves the accuracy of data synchronization of the detection device and avoids resource waste. The device includes: The pulse signal acquisition module is used to acquire the pulse signal output by the pulse encoder; the pulse encoder is installed on the testing vehicle. The frequency division module is used to divide the pulse signal according to a preset frequency division coefficient to generate a frequency-divided pulse signal corresponding to the number of frequency-divided pulses. The preset frequency division coefficient is determined according to the sampling interval requirements of each detection device. The detection devices are installed on the detection vehicle. The number of frequency-divided pulses corresponds to the number of detection devices. The conversion module is used to input the frequency division pulse signal corresponding to the number of frequency division pulses into the optical switch for photoelectric signal conversion, and generate an optical signal corresponding to the detection device. The data synchronization module is used to synchronize the detection data of the detection device corresponding to the optical signal based on the optical signal.

[0007] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described data synchronization method for detection devices based on optical pulse code counting.

[0008] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described data synchronization method for detection devices based on optical pulse code counting.

[0009] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for synchronizing detection device data based on optical pulse code counting.

[0010] Compared with existing technologies for data alignment of detection equipment, this invention improves the accuracy of data synchronization and avoids resource waste by acquiring pulse signals output by a pulse encoder; the pulse encoder is installed on a detection vehicle; the pulse signal is divided according to a preset frequency division coefficient to generate a frequency-divided pulse signal corresponding to the number of frequency-divided pulses; the preset frequency division coefficient is determined based on the sampling interval requirements of each detection device; the detection device is installed on the detection vehicle; the number of frequency-divided pulses corresponds to the number of detection devices; the frequency-divided pulse signal corresponding to the number of frequency-divided pulses is input to an optical switch for photoelectric signal conversion to generate an optical signal corresponding to the detection device; and the detection data of the detection device corresponding to the optical signal is synchronized according to the optical signal. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart illustrating the data alignment process for existing detection equipment. Figure 2 This is a flowchart of the detection device data synchronization method based on optical pulse code counting in an embodiment of the present invention; Figure 3 This is a schematic diagram of the data synchronization method for a detection device based on optical pulse code counting in an embodiment of the present invention; Figure 4 This is a schematic diagram of the data synchronization device for the detection equipment based on optical pulse code counting in an embodiment of the present invention; Figure 5 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0013] The detection data output by the detection equipment uses mileage information as an index, is displayed in a unified coordinate system, and undergoes correlation analysis. Figure 1 A flowchart illustrating the data alignment process for existing detection equipment, such as... Figure 1 As shown, the mileage information is formed based on the accumulation of encoder pulses. The encoder pulses represent the distance the train travels. Each detection device divides the encoder pulses according to its required data acquisition interval, accumulates the divided pulses, and converts them into actual mileage.

[0014] The above data alignment method has certain problems: First, each detection device independently receives encoder pulses and performs frequency division and cumulative counting on its own. Due to differences in hardware and software among the detection devices, there are certain errors in the receiving and accumulation processes, which leads to significant differences in the mileage synthesized by each set of detection devices. At the same time, each detection device repeatedly performs pulse frequency division, accumulation, and mileage conversion operations, which is also a waste of hardware and software resources.

[0015] As mentioned above, the reason why the detection equipment adopts the above scheme is that the encoder pulse serves as a marker of the vehicle's running distance and is strongly correlated with the positioning requirements of the detection data. At the same time, its standard is generally a 5V or 12V TTL signal, which can achieve long-distance low-latency transmission after being equipped with corresponding relay equipment. Detection equipment installed at different locations on the vehicle can receive the pulse signal accurately with low latency.

[0016] Figure 2 This is a flowchart of a detection device data synchronization method based on optical pulse code counting in an embodiment of the present invention, as shown below. Figure 2 As shown, the method includes: Step 201: Acquire the pulse signal output by the pulse encoder; the pulse encoder is installed on the testing vehicle; Step 202: Divide the pulse signal according to the preset frequency division coefficient to generate a frequency-divided pulse signal corresponding to the number of frequency-divided pulses; the preset frequency division coefficient is determined according to the sampling interval requirements of each detection device; the detection device is installed on the detection vehicle; the number of frequency-divided pulses corresponds to the number of detection devices. Step 203: Input the frequency division pulse signal corresponding to the number of frequency division pulses into the optical switch for photoelectric signal conversion to generate an optical signal corresponding to the detection device; Step 204: Based on the optical signal, synchronize the detection data of the detection device corresponding to the optical signal.

[0017] Compared with the existing technology for aligning detection equipment data, the present invention, through the above steps, can improve the accuracy of detection equipment data synchronization and avoid resource waste.

[0018] The data synchronization method for detection devices based on optical pulse code counting in this embodiment of the invention uniformly receives the original pulse encoder pulses, specifically through a host computer. Based on the sampling interval requirements of each detection device, the pulse signal output by the pulse encoder is frequency-divided, and the number of frequency-divided pulses is generated in real time. This number of frequency-divided pulses is converted into an optical signal via an SFP (Small Form-Factor Pluggable) interface. Each detection device analyzes the optical signal and superimposes the frequency-divided pulse signal corresponding to the number of frequency-divided pulses in the analysis result with the detection data, thus achieving data alignment through unified optical encoder pulse counting.

[0019] Since the data synchronization method for the detection devices in this embodiment of the invention is based on encoder pulse counting, the challenge lies in the fact that the detection devices no longer receive simple TTL (Transistor-Transistor Logic) pulses, but rather optical signals or optical data packets. This involves delays caused by the packet packaging, photoelectric conversion, transmission, and parsing processes. Considering the application characteristics of the detection devices, as long as these delays are sufficiently small and stable, the data alignment requirements can be met. Therefore, the detection devices can calculate the delay information of each node in real time to monitor the real-time transmission of pulse values.

[0020] Figure 3 This is a schematic diagram of the data synchronization method for a detection device based on optical pulse code counting in an embodiment of the present invention, as shown below. Figure 3 As shown, the process indicated by the red arrow is the core technical process of this invention. It involves acquiring pulse signals output by a pulse encoder or signal generator via a host computer. The pulse encoder or signal generator is installed on railway infrastructure inspection vehicles such as high-speed integrated inspection trains, integrated inspection vehicles, and catenary inspection vehicles. Each inspection vehicle includes one or more sets of inspection equipment with different functions. The timing of the pulse encoder output is recorded when acquiring the pulse signal. Next, the pulse signal is divided according to a preset frequency division coefficient, generating a frequency-divided pulse signal corresponding to the number of divided pulses. The generation time of the frequency-divided pulse signal is recorded. The frequency division result can be output to the pulse number generation module in the host computer to generate pulse values ​​(the number of frequency-divided pulses, for example, 1, 2, 3). Then, the pulse distribution module in the host computer outputs the pulse values ​​via optical fiber to an optical switching device (optical switch), which then uses optical fiber to output the pulse values ​​to multiple pulse number receiving devices (detection devices).

[0021] In this embodiment, the preset frequency division coefficient is the cumulative number of external pulses. For example, setting the preset frequency division coefficient to 189 indicates that one frequency-divided pulse signal is output for every 189 pulse signals acquired from the encoder. The preset frequency division coefficient can be set via the PS_UART interface of the host computer.

[0022] In one embodiment, before synchronizing the detection data of the detection device corresponding to the optical signal based on the optical signal, the method may further include: sending the optical signal to the corresponding detection device; and calling the detection device to parse the received optical signal and generate a parsing result.

[0023] In this embodiment, synchronizing detection data of the detection device corresponding to the optical signal based on the optical signal may include: synchronizing detection data of the detection device corresponding to the optical signal based on the parsing result.

[0024] In this embodiment, since the detection device receives an optical signal, it needs to analyze the optical signal to obtain a frequency-divided pulse signal. The frequency-divided pulses are then accumulated and converted into actual mileage. Using the mileage information as an index, the detection data output by multiple detection devices installed in the same detection vehicle are synchronized and aligned. Because this process uniformly receives and processes encoder pulses before each detection device, it avoids errors caused by differences in the hardware and software of each detection device, which could lead to significant differences in the mileage synthesized by each set of detection devices. It also avoids the waste of hardware and software resources by having each detection device repeatedly perform pulse frequency division, accumulation, and mileage conversion operations. This achieves the technical effect of improving the accuracy of data synchronization between detection devices and avoiding resource waste.

[0025] To verify data transmission delay, it is necessary to record not only the output pulse signal time of the pulse encoder and the generation time of the frequency-divided pulse signal, but also the generation time of the parsing result. In this embodiment, T0 represents the output pulse signal time of the pulse encoder, T1 represents the generation time of the frequency-divided pulse signal, and T5 represents the generation time of the parsing result. T2-T4 represent the times of each processing node between T1 and T5. For example, T2 can be the generation time of the number of frequency-divided pulses, T3 can be the time when the frequency-divided pulse signal is distributed to the optical switch through the SFP interface, and T4 can be the time when the optical switch receives the frequency-divided pulse signal. Further details are omitted here.

[0026] like Figure 3 As shown, the host computer outputs a trigger signal through the IO (Input / Output) interface. Pulse counting receiving devices 1 to N (detection devices) can receive and record the times and data of T0, T1, and T5, calculate the delay ΔT between T5 and T1 during each operation, and send the data of T0, T1, T5, and ΔT to an external computer via the network port through data output 1, data output 2, and data output 3. Data output 1, data output 2, and data output 3 may include relative timestamps, pulse values, etc.

[0027] In one embodiment, the data synchronization method for the detection device based on optical pulse code counting may further include: acquiring the output pulse signal time of the pulse encoder, the generation time of the frequency-divided pulse signal, and the generation time of the analysis result; calling the detection device to generate a data packet according to a preset network transmission protocol based on the output pulse signal time of the pulse encoder, the generation time of the frequency-divided pulse signal, and the generation time of the analysis result; and monitoring the transmission delay of the pulse signal based on the data packet to verify the accuracy of the frequency-divided processing and / or the analysis processing.

[0028] In one embodiment, before calling the detection device and generating a data packet according to a preset network transmission protocol based on the pulse signal output time of the pulse encoder, the generation time of the frequency-divided pulse signal, and the generation time of the analysis result, the method may further include: determining a first time difference based on the pulse signal output time of the pulse encoder and the generation time of the analysis result; the first time difference is the difference between the generation time of the analysis result and the output time of the pulse signal of the pulse encoder.

[0029] In this embodiment, the present invention not only provides a device synchronization method, but also a transmission delay monitoring method and a preset network transmission protocol. The receiving device, i.e., the detection device, receives and monitors the transmission delay of synchronization data in real time, and forwards data packets via the network. The preset network transmission protocol is defined as shown in Table 1 below.

[0030] Table 1

[0031] Bytes 0-3: Data header, hexadecimal, fixed as FFAAFFAA; Bytes 4-11: T0, hexadecimal, unit X. 32ns, pulse encoder output pulse signal timing; Bytes 12-19: T1, hexadecimal, unit X 32ns, the generation time of the frequency-divided pulse signal; 20~27 bytes: T5, hexadecimal, unit X 32ns, the time when the parsed result is generated; 28~35 bytes: ΔT, hexadecimal, unit X 32ns, first time difference (ΔT=T5-T1).

[0032] In this embodiment, calling the detection device and generating a data packet according to a preset network transmission protocol based on the pulse signal output time of the pulse encoder, the generation time of the frequency-divided pulse signal, and the generation time of the analysis result can include: calling the detection device and generating a data packet according to a preset network transmission protocol based on the pulse signal output time of the pulse encoder, the generation time of the frequency-divided pulse signal, the generation time of the analysis result, a first time difference, the number of pulses in the pulse signal, the number of frequency-divided pulses, and the number of pulses in the pulse signal in the analysis result.

[0033] As mentioned above, in Table 1, bytes 36-39: end of data, hexadecimal, no unit, the number of pulses in the pulse signal in the parsing result; bytes 40-43: end of data, hexadecimal, no unit, the timing of the pulse signal output by the pulse encoder; bytes 44-47: end of data, hexadecimal, no unit, the number of frequency division pulses.

[0034] In one embodiment, monitoring the transmission delay of the pulse signal based on the data packet to verify the accuracy of the frequency division processing and / or parsing processing may include: monitoring the transmission delay of the pulse signal based on the pulse encoder output pulse signal time, the frequency division pulse signal generation time, the parsing result generation time, and a first time difference in the data packet; verifying the accuracy of the parsing processing based on the number of frequency division pulses in the data packet and the number of pulses in the parsing result; and verifying the accuracy of the frequency division processing based on the number of pulses in the pulse signal and the number of frequency division pulses in the data packet.

[0035] In one embodiment, verifying the accuracy of the parsing process based on the number of frequency-division pulses in the data packet and the number of pulses in the parsing result may include: comparing the number of pulses in the parsing result with the number of frequency-division pulses in the data packet to determine whether frame loss occurs during the parsing process; and verifying the accuracy of the parsing process based on the determination result.

[0036] In this embodiment, the accuracy verification of the frequency division process is performed based on the number of pulses in the pulse signal and the number of frequency division pulses in the data packet. This may include comparing the number of pulses in the pulse signal with the number of frequency division pulses to verify the accuracy of the frequency division process.

[0037] In this embodiment, bytes 4-35 in Table 1 are used to monitor data transmission delay, bytes 36-39 are used to compare the pulse count after frequency division with bytes 44-47 to verify whether frame loss occurs during data parsing, and bytes 40-43 are divided with bytes 44-47 and compared with the preset frequency division coefficient of the host computer to verify the accuracy of frequency division.

[0038] The following is a specific embodiment of the data transmission delay monitoring scheme of the present invention.

[0039] The raw data (which has been processed by the lower-level machine) is collected. The data (1) at a certain moment and the subsequent data (2) are known as follows: (1) FF AA FF AA 00 00 00 00 BA 29 68 4C 00 00 00 00 BA 29 68 4D 00 0000 00 BA 29 68 62 00 00 00 00 00 00 00 15; Among them, "FF AA FF AA" is the data header; "00 00 00 00 BA 29 68 4C" is the pulse encoder output pulse signal time T0; "00 00 00 00 BA 29 68 4D" is the frequency division pulse signal generation time T1; "00 00 00 00 BA 29 68 62" is the parsing result generation time T5; "00 00 00 00 00 00 00 15" is the first time difference ΔT; the number of pulses of the pulse signal, the pulse encoder output pulse signal time, and the number of frequency division pulses are not displayed in the parsing result.

[0040] (2) FF AA FF AA 00 00 00 00 BD AE A1 8C 00 00 00 00 BD AE A1 8D 00 0000 00 BD AE A1 A1 00 00 00 00 00 00 00 14; Among them, "FF AA FF AA" is the data header; "00 00 00 00 BD AE A1 8C" is the time T0 when the pulse encoder outputs the pulse signal; "00 00 00 00 BD AE A1 8D" is the time T1 when the frequency division pulse signal is generated; "00 00 00 00 BD AE A1 A1" is the time T5 when the analysis result is generated; "00 00 00 00 00 00 00 14" is the first time difference ΔT; the number of pulses, the time when the pulse encoder outputs the pulse signal, and the number of frequency division pulses are not displayed in the analysis result.

[0041] The calculation of the second time difference (T1-T0) includes: the calculation of the time difference between the measurement pulse generation time and the reception time. In data (1), T1-T0 = (00 00 00 00 BA 29 68 4D) - (00 00 00 00 BA 29 68 4C) = 1; In data (2), T1-T0 = (00 00 00 00 BD AE A1 8D) - (00 00 00 00 BD AE A1 8C) = 1.

[0042] The value 1 above represents one counting cycle, which can be fixed at 10ns in the lower-level computer program. Therefore, the time delay between the pulse generation time and the pulse reception time is 10ns.

[0043] The first time difference (T5-T1) calculation (time consumption test) includes: the time consumption test of the final synthesized data after the test track detection system completes the original data acquisition after an interruption, and its calculation is as follows: In data (1), T5-T1 = (00 00 00 00 BA 29 68 62) - (00 00 00 00 BA 29 68 4D) = 15; In data (2), T5-T1 = (00 00 00 00 BD AE A1 A1) - (00 00 00 00 BD AE A1 8D) = 14.

[0044] The value 1 mentioned above represents a counting cycle, which is fixed at 10ns in the lower-level computer program. Therefore, the time delay between the pulse generation time and the pulse reception time is 150ns and 140ns, respectively.

[0045] Based on the analysis of multiple measurements and statistical results, the time consumption of ΔT(T1-T0) is basically within 10ns. The above data transmission is implemented in the hardware logic of the host computer module, and its time consumption is stable.

[0046] Analysis of multiple measurements shows that the time ΔT(T5-T1) is directly proportional to the actual fiber length. When the fiber length is approximately 1 meter, the ΔT time varies from about 140 ns to 150 ns. When a 30-meter fiber optic patch cord is used for testing, the ΔT time varies from about 210 ns to 220 ns. For every additional 30 meters of fiber, the ΔT time increases by approximately 70 ns. This delay is perfectly acceptable for the entire network track detection data transmission, thus verifying the feasibility of the data synchronization method for the detection device based on optical pulse code counting in this embodiment of the invention.

[0047] This invention also provides a data synchronization device for detection equipment based on optical pulse code counting, as described in the following embodiments. Since the principle by which this device solves the problem is similar to the data synchronization method for detection equipment based on optical pulse code counting, the implementation of this device can refer to the implementation of the data synchronization method for detection equipment based on optical pulse code counting; repeated details will not be elaborated further.

[0048] Figure 4 This is a schematic diagram of the data synchronization device for a detection device based on optical pulse code counting in an embodiment of the present invention, as shown below. Figure 4 As shown, the device includes: The pulse signal acquisition module 401 is used to acquire the pulse signal output by the pulse encoder; the pulse encoder is installed on the testing vehicle. Frequency divider module 402 is used to divide the pulse signal according to a preset frequency division coefficient to generate a frequency-divided pulse signal corresponding to the number of frequency-divided pulses; the preset frequency division coefficient is determined according to the sampling interval requirements of each detection device; the detection device is installed on the detection vehicle; the number of frequency-divided pulses corresponds to the number of detection devices; The conversion module 403 is used to input the frequency division pulse signal corresponding to the number of frequency division pulses into the optical switch for photoelectric signal conversion, and generate an optical signal corresponding to the detection device. The data synchronization module 404 is used to synchronize the detection data of the detection device corresponding to the optical signal based on the optical signal.

[0049] In one embodiment, the detection device data synchronization apparatus based on optical pulse code counting may further include: a parsing module, used for: Send the optical signal to the corresponding detection device; The detection equipment is invoked to analyze the received optical signal and generate analysis results; Data synchronization module 404 is specifically used for: Based on the analysis results, the detection data of the detection device corresponding to the optical signal is synchronized.

[0050] In one embodiment, the detection device data synchronization apparatus based on optical pulse code counting may further include: a data packet generation module, used for: Acquire the timing of the pulse encoder output pulse signal, the timing of the frequency-divided pulse signal generation, and the timing of the analysis result generation; The detection equipment is invoked, and data packets are generated according to the preset network transmission protocol, based on the pulse encoder output pulse signal time, the frequency division pulse signal generation time, and the parsing result generation time. Based on the data packet, monitor the transmission delay of the pulse signal to verify the accuracy of the frequency division and / or parsing processes.

[0051] In one embodiment, the detection device data synchronization apparatus based on optical pulse code counting may further include: The first time difference is determined based on the timing of the pulse signal output by the pulse encoder and the timing of the generation of the analysis result; the first time difference is the difference between the timing of the generation of the analysis result and the timing of the pulse signal output by the pulse encoder. The data packet generation module is specifically used for: The detection equipment is invoked, and according to the preset network transmission protocol, a data packet is generated based on the pulse signal output time of the pulse encoder, the generation time of the frequency-divided pulse signal, the generation time of the analysis result, the first time difference, the number of pulses in the pulse signal, the number of frequency-divided pulses, and the number of pulses in the pulse signal in the analysis result.

[0052] In one embodiment, the data packet generation module is specifically used for: Based on the pulse encoder output pulse signal time, frequency division pulse signal generation time, parsing result generation time, and first time difference in the data packet, monitor the pulse signal transmission delay; The accuracy of the parsing process is verified based on the number of frequency-divided pulses in the data packet and the number of pulses in the pulse signal in the parsing result. The accuracy of the frequency division process is verified based on the number of pulses and the number of frequency division pulses in the pulse signal in the data packet.

[0053] In one embodiment, the data packet generation module is specifically used for: The number of pulses in the pulse signal in the parsing result is compared with the number of frequency-divided pulses in the data packet to determine whether frame loss occurred during the parsing process. Based on the judgment results, the accuracy of the parsing process is verified; The accuracy of the frequency division process is verified by comparing the number of pulses in the pulse signal with the number of frequency division pulses.

[0054] Figure 5 This is a schematic diagram of a computer device in an embodiment of the present invention. Based on the foregoing inventive concept, as follows... Figure 5 As shown, the present invention also proposes a computer device 500, including a memory 501, a processor 502, and a computer program 503 stored in the memory 501 and executable on the processor 502. When the processor 502 executes the computer program 503, it implements the aforementioned detection device data synchronization method based on optical pulse code counting.

[0055] Based on the aforementioned inventive concept, the present invention proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned data synchronization method for detection devices based on optical pulse code counting.

[0056] Based on the aforementioned inventive concept, the present invention proposes a computer program product, which includes a computer program that, when executed by a processor, implements a data synchronization method for detection devices based on optical pulse code counting.

[0057] Compared with existing technologies for data alignment of detection equipment, this invention improves the accuracy of data synchronization and avoids resource waste by acquiring pulse signals output by a pulse encoder; the pulse encoder is installed on a detection vehicle; the pulse signal is divided according to a preset frequency division coefficient to generate a frequency-divided pulse signal corresponding to the number of frequency-divided pulses; the preset frequency division coefficient is determined based on the sampling interval requirements of each detection device; the detection device is installed on the detection vehicle; the number of frequency-divided pulses corresponds to the number of detection devices; the frequency-divided pulse signal corresponding to the number of frequency-divided pulses is input to an optical switch for photoelectric signal conversion to generate an optical signal corresponding to the detection device; and the detection data of the detection device corresponding to the optical signal is synchronized according to the optical signal.

[0058] The key technical point of this invention is that the host computer uniformly receives encoder pulses, divides them into frequencies, and uses the pulse count as marking information. This information is then transmitted to each detection device in real time via photoelectric conversion, completing the data alignment between the detection devices. At the same time, a data packet protocol is specified, the transmission delay of the pulse count is monitored, and the calculation method for the data delay is clarified. While ensuring feasibility, this can improve the accuracy of data synchronization between detection devices and avoid resource waste.

[0059] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0060] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0061] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0062] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0063] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data synchronization method for a detection device based on optical pulse code counting, characterized in that, include: Acquire the pulse signal output by the pulse encoder; The pulse encoder is installed on the testing vehicle; The pulse signal is divided according to a preset frequency division coefficient to generate a frequency-divided pulse signal corresponding to the number of frequency-divided pulses; The preset frequency division coefficient is determined based on the sampling interval requirements of each detection device; the detection device is installed on the detection vehicle; the number of frequency division pulses corresponds to the number of detection devices. The frequency-division pulse signal corresponding to the number of frequency-division pulses is input into the optical switch for photoelectric signal conversion to generate an optical signal corresponding to the detection device; Based on the optical signal, the detection data of the detection device corresponding to the optical signal is synchronized.

2. The method as described in claim 1, characterized in that, Before synchronizing the detection data of the detection device corresponding to the optical signal based on the optical signal, the process further includes: The optical signal is sent to the corresponding detection device; The detection device is invoked to analyze the received optical signal and generate an analysis result; Based on the optical signal, the detection data of the detection device corresponding to the optical signal is synchronized, including: Based on the analysis results, the detection data of the detection device corresponding to the optical signal is synchronized.

3. The method as described in claim 2, characterized in that, The method further includes: Acquire the timing of the pulse encoder output pulse signal, the timing of the frequency-divided pulse signal generation, and the timing of the analysis result generation; The detection device is invoked to generate a data packet according to a preset network transmission protocol, based on the timing of the pulse signal output by the pulse encoder, the timing of the generation of the frequency-divided pulse signal, and the timing of the generation of the parsing result. Based on the data packet, monitor the transmission delay of the pulse signal, and verify the accuracy of the frequency division processing and / or the parsing processing.

4. The method as described in claim 3, characterized in that, Before invoking the detection device and generating a data packet according to a preset network transmission protocol, based on the pulse signal output time of the pulse encoder, the generation time of the frequency-divided pulse signal, and the generation time of the parsing result, the process further includes: A first time difference is determined based on the timing of the pulse signal output by the pulse encoder and the timing of the generation of the analysis result; the first time difference is the difference between the timing of the generation of the analysis result and the timing of the pulse signal output by the pulse encoder. The detection device is invoked, and according to a preset network transmission protocol, a data packet is generated based on the output pulse signal time of the pulse encoder, the generation time of the frequency-divided pulse signal, and the generation time of the parsing result. The data packet includes: The detection device is invoked, and a data packet is generated according to a preset network transmission protocol, based on the pulse signal output time of the pulse encoder, the generation time of the frequency-divided pulse signal, the generation time of the analysis result, the first time difference, the number of pulses of the pulse signal, the number of frequency-divided pulses, and the number of pulses of the pulse signal in the analysis result.

5. The method as described in claim 4, characterized in that, Based on the data packet, monitor the transmission delay of the pulse signal, and verify the accuracy of the frequency division processing and / or the parsing processing, including: Based on the pulse encoder output pulse signal time, the frequency division pulse signal generation time, the parsing result generation time, and the first time difference in the data packet, the transmission delay of the pulse signal is monitored; The accuracy of the parsing process is verified based on the number of frequency-divided pulses in the data packet and the number of pulses in the pulse signal in the parsing result. The accuracy of the frequency division process is verified based on the number of pulses in the pulse signal and the number of frequency division pulses in the data packet.

6. The method as described in claim 5, characterized in that, The accuracy of the parsing process is verified based on the number of frequency-divided pulses in the data packet and the number of pulses in the parsing result, including: The number of pulses in the pulse signal in the parsing result is compared with the number of frequency-divided pulses in the data packet to determine whether frame loss occurs during the parsing process. Based on the judgment result, the accuracy of the analysis process is verified; The accuracy of the frequency division process is verified based on the number of pulses in the pulse signal and the number of frequency division pulses in the data packet, including: The accuracy of the frequency division process is verified by comparing the number of pulses in the pulse signal with the number of frequency division pulses.

7. A data synchronization device for a detection equipment based on optical pulse code counting, characterized in that, include: The pulse signal acquisition module is used to acquire the pulse signal output by the pulse encoder; The pulse encoder is installed on the testing vehicle; The frequency division module is used to divide the pulse signal according to a preset frequency division coefficient to generate a frequency-divided pulse signal corresponding to the number of frequency-divided pulses. The preset frequency division coefficient is determined based on the sampling interval requirements of each detection device; the detection device is installed on the detection vehicle; the number of frequency division pulses corresponds to the number of detection devices. The conversion module is used to input the frequency division pulse signal corresponding to the number of frequency division pulses into the optical switch for photoelectric signal conversion, and generate an optical signal corresponding to the detection device; The data synchronization module is used to synchronize the detection data of the detection device corresponding to the optical signal according to the optical signal.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.