A high-precision time alignment method and system for multiple devices

By calculating the device delay and generating the phase starting point to synchronize the data collection of multiple devices, the problem of insufficient time synchronization of multiple devices in hyperspectral imaging is solved, and high-precision time alignment and data collection consistency are achieved.

CN120454913BActive Publication Date: 2025-10-10HANGZHOU HYPERSPECTRAL IMAGING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510905494.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-10
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

In hyperspectral imaging, insufficient temporal synchronization accuracy between multiple devices leads to image stitching errors and inaccurate data analysis, especially in dynamic scenes, where motion blur or data loss may occur.

Method used

The time management unit performs delay measurement, calculates device delay, and generates a phase start time. It sends periodic trigger signals to synchronize device data acquisition, marks the acquisition timestamp and sequence number of each frame of data, and uses an optimization algorithm to adjust the phase start time of the trigger signal to achieve high-precision alignment.

Benefits of technology

It achieves the alignment of multi-device data on the timeline, ensuring that all devices start collecting data at the same time, and improving the accuracy and consistency of data collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120454913B_ABST
    Figure CN120454913B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification relate to the field of information technology, in particular to a high-precision time alignment method and system for multiple devices. The method comprises the steps of: a time management unit performing a predetermined delay measurement program to measure an access device to obtain an instruction transmission delay; obtaining the length and phase velocity of the communication cable between the time management unit and the device to calculate the phase delay; obtaining the device delay according to the instruction transmission delay and the phase delay; generating a phase starting time, generating a periodic trigger signal for each device according to the phase starting time, and sending the trigger signal to the corresponding device; periodically obtaining device backhaul data, calculating the data collection starting time according to the phase starting time and the device delay, and recording the collection timestamp; marking the collection timestamp and collection serial number of each frame of backhaul data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Multiple embodiments of this specification relate to the field of information technology, and more particularly to a high-precision time alignment method and system for multiple devices. Background Art

[0002] Hyperspectral imaging technology can capture multiple spectral information at each pixel in the target scene and is widely used in many fields such as environmental monitoring, precision agriculture, mineral exploration, and medical diagnosis. In the field of hyperspectral imaging and analysis, precise time synchronization of multiple hyperspectral acquisition devices (or sensors) is crucial to ensure the validity and accuracy of the data. Multi-device collaboration significantly improves work efficiency and data richness, but it also brings up the issue of how to achieve time synchronization between these devices. Due to various factors, there may be time deviations between different devices, which can lead to image stitching errors, inaccurate data analysis, and other problems. For example, when collecting hyperspectral images in dynamic scenes, if there is a lack of an effective synchronization mechanism between the devices, motion blur or data loss due to time inconsistency may occur, affecting subsequent data processing and application effects. Summary of the Invention

[0003] Multiple embodiments of this specification describe a high-precision time alignment method and system for multiple devices.

[0004] In a first aspect, an embodiment of this specification provides a high-precision time alignment method for multiple devices, comprising the steps of:

[0005] The time management unit executes a predetermined delay measurement program to measure the connected device and obtain the instruction transmission delay;

[0006] Obtain the length and phase velocity of the communication cable between the time management unit and the equipment, and calculate the phase delay;

[0007] Obtaining device delay according to the instruction transmission delay and phase delay;

[0008] Generate a phase starting time, generate a periodic trigger signal for each device according to the phase starting time, and send the trigger signal to the corresponding device;

[0009] Periodically obtain the data returned by the device, and calculate the data collection start time based on the phase starting time and the device delay, which is recorded as the collection timestamp;

[0010] Mark the acquisition timestamp and acquisition sequence number of each frame of returned data.

[0011] In a second aspect, embodiments of this specification provide a high-precision time alignment system for multiple devices, including:

[0012] The measurement module, the time management unit executes the predetermined delay measurement program to measure the connected device and obtain the instruction transmission delay;

[0013] The first calculation module obtains the length and phase velocity of the communication cable between the time management unit and the device, and calculates the phase delay;

[0014] A processing module, which obtains a device delay according to the instruction transmission delay and the phase delay;

[0015] a generating module, generating a phase starting time, generating a periodic trigger signal for each device according to the phase starting time, and sending the trigger signal to the corresponding device;

[0016] The second calculation module periodically obtains the data returned by the device, and calculates the data collection start time according to the phase starting time and the device delay, and records it as the collection timestamp;

[0017] The marking module marks the acquisition timestamp and acquisition sequence number of each frame of returned data.

[0018] In a third aspect, embodiments of this specification provide an electronic device, including a processor and a memory;

[0019] The processor is connected to the memory;

[0020] The memory is used to store executable program code;

[0021] The processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to execute the method described in any one of the above aspects.

[0022] In a fourth aspect, an embodiment of this specification provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in any one of the above aspects is implemented.

[0023] In a fifth aspect, embodiments of this specification provide a computer program product, including a computer program, which implements the method described in any of the above aspects when executed by a processor.

[0024] The beneficial effects of the technical solutions provided by some embodiments of this specification include at least:

[0025] In various embodiments of this specification, a high-precision time alignment method and system are provided. By calculating the device delay for each device and marking the actual data acquisition time on the collected return data, the collected data can be aligned on the timeline. In an improved embodiment, the phase starting point of the trigger signal is further adjusted based on the corrected delay to ensure that all devices begin data acquisition at the same time as much as possible. This not only aligns the collected data on the timeline, but also ensures that data acquisition by multiple devices is performed at the same time as much as possible.

[0026] Other features and advantages of the various embodiments of this specification will be further disclosed in the following detailed description and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of this specification, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0028] Figure 1 This is a schematic diagram of the high-precision time alignment method and system application system provided in the embodiments of this specification.

[0029] Figure 2 This is a flowchart of a high-precision time alignment method provided in an embodiment of this specification.

[0030] Figure 3 A schematic diagram of trigger signal alignment provided in an embodiment of this specification.

[0031] Figure 4 This is another trigger signal alignment diagram provided in an embodiment of this specification.

[0032] Figure 5 This is another trigger signal alignment diagram provided in an embodiment of this specification.

[0033] Figure 6 A schematic diagram of a high-precision time alignment system provided in an embodiment of this specification.

[0034] Figure 7 This is a schematic diagram of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0035] The following is an explanation and description of the technical solutions of the embodiments of this specification in conjunction with the drawings of the embodiments of this specification. However, the following embodiments are only preferred embodiments of this specification and are not exhaustive. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without making any creative work are all within the scope of protection of this specification.

[0036] Throughout this specification, the claims, and the accompanying drawings, the terms "first," "second," "third," and the like are used to distinguish between different items, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may include other steps or elements inherent to the process, method, product, or apparatus.

[0037] In the following description, terms such as "inside", "outside", "up", "down", "left", "right", etc. that indicate directions or positional relationships are only used to facilitate the description of the embodiments and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, they should not be understood as limitations on this specification.

[0038] The data involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions.

[0039] Before introducing the technical solution in this specification, the application scenarios and related technologies of the technical solution are introduced.

[0040] Hyperspectral imaging (HSI) is an advanced remote sensing and imaging technology that captures continuous spectral information, including both visible and invisible light, at every pixel in a target scene. Compared to traditional multispectral imaging, hyperspectral imaging offers higher spectral resolution and can distinguish more subtle spectral features. Therefore, hyperspectral imaging has broad application value in many fields. Hyperspectral imaging equipment typically consists of an imaging sensor and a spectrometer, which decomposes the incident light into multiple narrowband spectral channels. These channels can range from dozens to hundreds, each representing reflected or emitted energy within a specific wavelength range. This allows hyperspectral images to contain not only spatial information (i.e., two-dimensional images) but also rich spectral information, forming a so-called "three-dimensional data cube" (x, y, λ), where x and y represent spatial coordinates and λ represents the spectral wavelength. Hyperspectral imaging technology can be used for environmental monitoring, such as monitoring water pollution, vegetation health, and soil composition. It can also help farmers assess crop growth, pest and disease conditions, and nutrient deficiencies, enabling precise fertilization and irrigation.

[0041] Although hyperspectral imaging has many advantages, its application also faces some challenges. For example, it has high real-time requirements. For certain application scenarios (such as dynamic monitoring), large amounts of data need to be processed quickly to achieve real-time response. In addition, due to the need to collect multiple data simultaneously during hyperspectral acquisition, such as POS data for geometric correction of hyperspectral data and zenith light data for reflectance calculation, a controller, commonly called a time management module, is required to synchronize time between multiple modules and dispatch pulse trigger signals. However, due to the delay and waveform distortion of cable transmission signals, as well as the differences in the frequency and processing methods of the processing chips of different devices, the current accuracy of time synchronization is still insufficient. Therefore, research is needed to improve the time alignment of multiple devices.

[0042] Please see the attached Figure 1This specification uses a hyperspectral acquisition system carried by a drone as an example. The hyperspectral acquisition system carried by the drone includes a GPS module, a main controller, a hyperspectral camera module 12, a zenithal light module 13, an inertial measurement module 14, and a visible light camera module 15. The main controller also serves as the time management unit 11, running the programs required by the corresponding time management modules. The main control can be implemented using an MCU or FPGA. For example, the trigger signal for the hyperspectral camera module 12, the zenithal light module 13, and the inertial measurement module 14 is 50 Hz, and the trigger signal for the visible light camera module 15 is 1 / 3 Hz. Trigger signal phase alignment is of great significance. When the phases are aligned, each module collects data at the same time, allowing them to verify and correct each other. When the phase difference is large, the data collected by each module is not at the same time. Since the drone is in uninterrupted flight, the data collected by each module is actually not at the same location. Therefore, it is necessary to align the phases as much as possible, that is, the phase difference between each module needs to be less than a preset threshold.

[0043] Example 1

[0044] First, this specification provides a high-precision time alignment method for multiple devices. Figure 2 , including the steps of:

[0045] Step S1) The time management unit 11 executes a predetermined delay measurement program to measure the connected device and obtain the instruction transmission delay.

[0046] The delay measurement procedure includes the following steps:

[0047] Sending a register value setting instruction, wherein the setting instruction sets the element value of the continuously stored array;

[0048] After waiting for the preset time, record the current time t1;

[0049] Sending an instruction to read the values ​​of n1 contact elements in the array;

[0050] Receive the return data from the device and record the arrival time t2 of the return data from the device;

[0051] After waiting for the preset time, record the current time t3;

[0052] Sending an instruction to read the values ​​of n2 contact elements in the array;

[0053] Receive the return data from the device and record the arrival time t4 of the return data from the device;

[0054] Based on t1, t2, t3, t4, n1, and n2, the instruction transmission delay is calculated.

[0055] The command transmission delay refers to the phase delay on the transmission medium. The time management unit 11 and the device are connected by a communication cable. Cables made of different materials have different refractive indices, and the cable length also directly affects the phase delay. Assuming the phase delay value is tx, and the time it takes for the device to prepare data after receiving the read command is ty, the following equation exists:

[0056] t2-t1=2×tx+n1×ty,

[0057] t4-t3=2×tx+n2×ty,

[0058] Thus, the value of tx, i.e. the instruction transmission delay, can be calculated. For example, the following data is obtained:

[0059] t2-t1=100ms,

[0060] t4-t3=150ms,

[0061] n1=10,

[0062] n2=20,

[0063] Substituting the solution into the equation, we obtain the instruction transmission delay tx as 25 milliseconds, and the time ty for the device to prepare data as 5 milliseconds.

[0064] Step S2) Obtain the length and phase velocity of the communication cable between the time management unit 11 and the device, and calculate and obtain the phase delay.

[0065] The method for calculating and obtaining the phase delay includes: calculating the quotient of the communication cable length and the phase velocity as the phase delay.

[0066] In addition to considering the device's own response delay—that is, the time it takes for the chip to detect and respond to the rising edge of the trigger signal—we also need to consider the phase delay caused by the trigger signal propagating through the communication cable. Phase delay is primarily determined by two factors: the physical length L of the communication cable and the propagation velocity v of the electromagnetic wave within the cable. Phase delay, or propagation delay, refers to the time required for an electrical signal or electromagnetic wave to travel from the transmitter to the receiver and is determined by the physical properties of the cable. It is calculated as: t_d = L / v.

[0067] The propagation speed of electromagnetic waves in a vacuum is the speed of light. In actual communication cables (such as coaxial cables, twisted pairs, optical fibers, etc.), the propagation speed of electromagnetic waves can be lower than the speed of light c due to the influence of the dielectric material. It is usually described by the relative dielectric constant εr. The propagation speed of electromagnetic waves in a medium is: v = c / (εr) 1 / 2 If a coaxial cable is used with a length of 1 meter, the phase delay is t_d≈5ns.

[0068] Step S3) Obtaining device delay according to the instruction transmission delay and phase delay.

[0069] The instruction transmission delay mainly refers to the time from when the time management unit 11 sends the instruction until the device responds and starts data preparation. The phase delay refers to the propagation time of the instruction in the communication cable. The instruction transmission delay includes the phase delay, and the phase delay is usually much smaller than the instruction transmission delay. Therefore, the device delay can be directly set as the instruction transmission delay, and the phase delay is only used for reference. Specifically: when the phase delay is larger than the instruction transmission delay, that is, when the ratio of the phase delay to the instruction transmission delay exceeds the preset threshold, it is determined that the instruction transmission delay calculation is incorrect and the instruction transmission delay needs to be recalculated.

[0070] Step S4) Generate a phase starting time, generate a periodic trigger signal for each device according to the phase starting time, and send the trigger signal to the corresponding device.

[0071] The method for generating a periodic trigger signal includes: generating a square wave signal according to the set trigger frequency of each device, and aligning a rising edge of the square wave signal with the phase starting point. Figure 3 , generate a common "phase starting moment", and generate a periodic trigger signal for each device that is consistent with its set trigger frequency based on the phase starting moment. The phase starting moment is a reference time point used to synchronize the trigger signals of all devices. For example, the frequencies of the zenith light data trigger signal, the hyperspectral data trigger signal, and the flight attitude data trigger signal are all 50Hz, and the frequency of the visible light image data trigger signal is 1 / 3Hz, and the starting phases of these trigger signals are aligned. However, due to different transmission paths, the processing response time of the control chip of each device is different, and the actual time of receiving the rising edge of the trigger signal and responding to the rising edge, that is, collecting data once, is different. However, through this embodiment, the actual collection time can be estimated and the collected data can be marked. This allows the real collection time to be mastered. The collected data can be sorted and aligned on the time axis.

[0072] Step S5) Periodically obtain the data returned by the device, and calculate the data collection start time based on the phase starting time and the device delay, which is recorded as the collection timestamp.

[0073] The method for calculating and obtaining the data collection starting time includes: adding the phase starting time to the device delay to obtain the data collection starting time.

[0074] The plurality of devices collect data according to the trigger signal sent by the time management unit 11, and return the data to the master chip after completion. The master chip needs to regularly check and receive data from each device, and the exemplary method can be achieved by polling, interrupt or event-driven. For the return data of each device, the method of calculating the data collection starting time, i.e. the collection timestamp, is to add the phase starting time of the device to the corresponding device delay. The calculation formula is: collection timestamp = phase starting time + device delay. So that even if there are delay differences, the data of each device can be recorded at the correct logical time point.

[0075] Step S6) Label the collection timestamp and collection sequence number of each frame of return data.

[0076] After completing the measurement of device delay, the determination of phase starting time, and the calculation of data collection starting time, add collection timestamp and collection sequence number to each frame of return data. Collection timestamp: indicates the time point at which the frame of data actually starts to collect, i.e. the data collection starting time calculated in step S5). The collection sequence number identifies the sequence of the data frame in the return data of the device.

[0077] The beneficial technical effects of the embodiment include: by calculating the delay of the instruction transmission and the delay of the operation reaction of the control chip of the device, i.e. obtaining the device delay, superimposing the device delay on the phase starting time, the actual collection time of each return data collected by each device can be obtained, thereby realizing the labeling of the actual collection time, and further aligning all return data along the time axis.

[0078] Embodiment 2

[0079] Compared with embodiment 1, the embodiment further improves the generation method of the trigger signal. Please refer to the attached Figure 4 According to the method for generating periodic trigger signals for each device according to the phase starting time, the method comprises:

[0080] Generating a square wave signal according to the set trigger frequency of each device respectively;

[0081] Subtracting the device delay from the phase starting time to obtain the corrected phase starting time of each device;

[0082] Aligning one rising edge of the square wave signal of each device with the corrected phase starting time.

[0083] Considering the device delay of each device, subtract the common phase starting time from the device delay of each device to obtain the corrected phase starting time of the device.

[0084] The new beneficial technical effects of this embodiment include: being able to compensate for time delays caused by cable length, signal propagation speed, and response delay of the control chip, and ensuring that each device can collect data at the same time point as much as possible.

[0085] Example 3

[0086] Compared with Embodiment 1 and Embodiment 2, this embodiment makes further improvements to the method for generating a trigger signal.

[0087] Please see the attached Figure 5 The method for generating a periodic trigger signal for each device according to the phase starting time includes:

[0088] Generate square wave signals according to the set trigger frequency of each device;

[0089] The phase starting time is reduced by the correction delay, and the result is used as the corrected phase starting time of each device;

[0090] Aligning a rising edge of a square wave signal of each device with the starting point of the correction phase;

[0091] The method for obtaining the corrected delay includes:

[0092] Under laboratory conditions, generating a continuously varying signal corresponding to each device, the signals of the plurality of devices having the same phase;

[0093] Set the initial value of each device's corrected delay to the corresponding device delay;

[0094] Read the data returned by the device and identify the phase of the signal collected by each device;

[0095] The correction delay is adjusted using an optimization algorithm until the phase difference between the phases of the signals collected by the device is less than a preset threshold.

[0096] Select a high-precision signal generator capable of producing a stable, continuously varying signal, such as a sine wave. The signal generator generates visible light whose brightness varies according to a sinusoidal function. This allows the hyperspectral camera module 12, the zenithal light module 13, and the visible light camera module 15 to capture this signal. Although the inertial measurement module 14 cannot capture the signal, the communication cable length of the inertial measurement module 14 can be set to the same as that of any of the hyperspectral camera module 12, the zenithal light module 13, and the visible light camera module 15, using the same control chip with the same main frequency and using the corresponding correction delay.

[0097] Use a continuously varying signal source with a constant phase characteristic (such as a sine wave, square wave, or modulated signal). Multiple devices simultaneously access and acquire this signal. All devices are initially triggered based on the unoptimized device delay (i.e., the device delay calculated in step S3). A periodic trigger signal is initiated, instructing the devices to acquire data. The data transmitted back by each device is read. The signals collected by each device are analyzed to identify their phase information. Signal phases can be extracted using methods such as FFT and Hilbert transform. The phase differences between signals collected by different devices are compared.

[0098] Construct an objective function. Exemplarily, the objective function is to minimize the root mean square error of the phase differences between all devices. Exemplarily, one of the following algorithms can be used to iteratively adjust the corrected delay: gradient descent, genetic algorithm, particle swarm optimization (PSO), simplex method, etc. Once phase consistency meets the requirements, the current corrected delay value is saved as the standard parameter for the device; this parameter can be directly loaded during future operations without the need for repeated calibration unless there are significant changes in the environment.

[0099] For example, consider two devices, A and B, each acquiring a sinusoidal signal from the same source and wishing to acquire the signal synchronously. Device A has an initial device delay of 100 μs, while device B has an initial device delay of 120 μs. Device A's initial corrected delay is 100 μs, while device B's initial corrected delay is 120 μs. The phase of the signal acquired by device A is 0°, while the phase of the signal acquired by device B is 10°, resulting in a 10° phase difference.

[0100] After the optimization algorithm was applied, the corrected delay for device A was 98 μs, and the corrected delay for device B was 122 μs. The phase of the signal collected by device A was 5°, and the phase of the signal collected by device B was 5.2°, with a phase difference of 0.2°, which met the requirement. The corrected delays for devices A and B were thus obtained.

[0101] The new technical effects achieved by this embodiment include: achieving more accurate synchronization of periodic trigger signals between multiple devices, so that all devices can collect data within a smaller time difference.

[0102] On the other hand, this specification provides a high-precision time alignment system for multiple devices. Figure 6 ,include:

[0103] The measurement module 100 and the time management unit 11 execute a predetermined delay measurement program to measure the connected device and obtain the instruction transmission delay;

[0104] The first calculation module 200 obtains the length and phase velocity of the communication cable between the time management unit 11 and the device, and calculates the phase delay;

[0105] The processing module 300 obtains the device delay according to the instruction transmission delay and the phase delay;

[0106] A generating module 400 generates a phase starting time, generates a periodic trigger signal for each device according to the phase starting time, and sends the trigger signal to the corresponding device;

[0107] The second calculation module 500 periodically obtains the data returned by the device, and calculates the data collection start time according to the phase starting time and the device delay, and records it as the collection timestamp;

[0108] The marking module 600 marks the acquisition timestamp and acquisition sequence number of each frame of returned data.

[0109] See also Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of this specification is shown.

[0110] like Figure 7 As shown, the electronic device 1100 may include: at least one processor 1101, at least one network interface 1104, a user interface 1103, a memory 1105, and at least one communication bus 1102. The communication bus 1102 may be used to implement communication between the aforementioned components. The user interface 1103 may include buttons, and optionally may also include a standard wired interface or a wireless interface. The network interface 1104 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc. The processor 1101 may include one or more processing cores. The processor 1101 utilizes various interfaces and circuits to connect the various components within the electronic device 1100. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 1105, and accessing data stored in the memory 1105, the processor 1101 performs various functions of the routing device and processes data. Optionally, the processor 1101 may be implemented in hardware using at least one of a DSP, an FPGA, and a PLA. The processor 1101 may integrate one or a combination of a CPU, a GPU, and a modem. Among them, the CPU mainly processes the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content that needs to be displayed on the display; and the modem is used to handle wireless communication.

[0111] It is understandable that the above-mentioned modem may not be integrated into the processor 1101, but may be implemented by a separate chip.

[0112] Memory 1105 may include either RAM or ROM. Optionally, memory 1105 may include non-transitory computer-readable media. Memory 1105 may be used to store instructions, programs, codes, code sets, or instruction sets. Memory 1105 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, sound playback function, image playback function, etc.), instructions for implementing the aforementioned method embodiments, etc.; the data storage area may store data related to the aforementioned method embodiments, etc. Memory 1105 may also optionally be at least one storage device located remotely from the aforementioned processor 1101. Memory 1105, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs. Processor 1101 may be configured to invoke the application programs stored in memory 1105 and execute the methods described in the aforementioned embodiments.

[0113] The embodiments of this specification also provide a computer-readable storage medium having instructions stored therein that, when executed on a computer or processor, cause the computer or processor to perform the steps of the aforementioned embodiments. If the components of the aforementioned electronic device are implemented as software functional units and sold or used as independent products, they may be stored in the computer-readable storage medium.

[0114] The embodiments of this specification also provide a computer program product, including a computer program, which implements multiple steps in the above embodiments when executed by a processor.

[0115] In the absence of conflict, the technical features in this embodiment and implementation scheme can be combined arbitrarily.

[0116] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product comprises multiple computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium accessible by a computer or a data storage device such as a server or data center that integrates multiple available media. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0117] When implemented via hardware or firmware, the aforementioned method flow is programmed into the hardware circuit to obtain the corresponding hardware circuit structure and realize the corresponding function. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit, whose logical function is determined by the user's device programming. Designers can "integrate" a digital system on a PLD through self-programming, eliminating the need for chip manufacturers to design and manufacture dedicated integrated circuit chips. Moreover, today, instead of manually manufacturing integrated circuit chips, this programming is often performed using "logic compiler" software. This is similar to the software compiler used in program development. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There are not just one HDL, but many. Those skilled in the art will also understand that simply by programming the method flow in one of the aforementioned hardware description languages ​​and programming it into the integrated circuit, a hardware circuit that implements the logical method flow can be easily obtained.

[0118] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Without departing from the design spirit of this specification, various modifications and improvements made to the technical solutions of this specification by ordinary technicians in this field should fall within the scope of protection determined by the claims of this specification.

Claims

1. A high-precision time alignment method for multiple devices, characterized in that: Including steps: The time management unit executes a predetermined delay measurement program to measure the connected device and obtain the instruction transmission delay; Obtain the length and phase velocity of the communication cable between the time management unit and the equipment, and calculate the phase delay; Obtaining device delay according to the instruction transmission delay and phase delay; Generate a phase starting time, generate a periodic trigger signal for each device according to the phase starting time, and send the trigger signal to the corresponding device; Periodically obtain the data returned by the device, and calculate the data collection start time based on the phase starting time and the device delay, which is recorded as the collection timestamp; Mark the acquisition timestamp and acquisition sequence number of each frame of returned data; The method for generating a periodic trigger signal for each device according to the phase starting time includes: Generate square wave signals according to the set trigger frequency of each device; The phase starting time is reduced by the correction delay, and the result is used as the corrected phase starting time of each device; Aligning a rising edge of a square wave signal of each device with the starting point of the correction phase; The method for obtaining the corrected delay includes: Under laboratory conditions, generating a continuously varying signal corresponding to each device, the signals of the plurality of devices having the same phase; Set the initial value of each device's corrected delay to the corresponding device delay; Read the data returned by the device and identify the phase of the signal collected by each device; The correction delay is adjusted using an optimization algorithm until the phase difference between the phases of the signals collected by the device is less than a preset threshold.

2. A high-precision time alignment method for multiple devices according to claim 1, characterized in that: The delay measurement procedure includes the following steps: Sending a register value setting instruction, wherein the setting instruction sets the element value of the continuously stored array; After waiting for the preset time, record the current time t1; Sending an instruction to read the values ​​of n1 contact elements in the array; Receive the return data from the device and record the arrival time t2 of the return data from the device; After waiting for the preset time, record the current time t3; Sending an instruction to read the values ​​of n2 contact elements in the array; Receive the return data from the device and record the arrival time t4 of the return data from the device; Based on t1, t2, t3, t4, n1, and n2, the instruction transmission delay is calculated.

3. The high-precision time alignment method for multiple devices according to claim 1, characterized in that: The method for obtaining the length and phase velocity of the communication cable between the time management unit and the device and calculating the phase delay includes: Calculating the quotient of the communication cable length and the phase velocity as the phase delay; The method for calculating the data acquisition start time according to the phase starting time and the device delay includes: The phase starting point is added to the device delay to obtain the data collection start time.

4. A high-precision time alignment system for multiple devices, characterized in that: include: The measurement module, the time management unit executes the predetermined delay measurement program to measure the connected device and obtain the instruction transmission delay; The first calculation module obtains the length and phase velocity of the communication cable between the time management unit and the device, and calculates the phase delay; A processing module, which obtains a device delay according to the instruction transmission delay and the phase delay; a generating module, generating a phase starting time, generating a periodic trigger signal for each device according to the phase starting time, and sending the trigger signal to the corresponding device; The second calculation module periodically obtains the data returned by the device, and calculates the data collection start time according to the phase starting time and the device delay, and records it as the collection timestamp; Marking module, marking the acquisition timestamp and acquisition sequence number of each frame of returned data; The method for generating a periodic trigger signal for each device according to the phase starting time includes: Generate square wave signals according to the set trigger frequency of each device; The phase starting time is reduced by the correction delay, and the result is used as the corrected phase starting time of each device; Aligning a rising edge of a square wave signal of each device with the starting point of the correction phase; The method for obtaining the corrected delay includes: Under laboratory conditions, generating a continuously varying signal corresponding to each device, the signals of the plurality of devices having the same phase; Set the initial value of each device's corrected delay to the corresponding device delay; Read the data returned by the device and identify the phase of the signal collected by each device; The correction delay is adjusted using an optimization algorithm until the phase difference between the phases of the signals collected by the device is less than a preset threshold.

5. An electronic device, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

7. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Exposure control method and device for multiple cameras, terminal and storage medium

    CN119996842A