A multi-channel instrument data synchronization method and system
By acquiring time-series data and timestamps from multi-channel instruments, calculating clock drift rate and signal stability characteristics, quantifying dynamic drift risk index, dynamically evaluating and classifying channel data, the timing consistency problem in multi-channel instrument data synchronization is solved, and highly reliable data synchronization is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG XUNYI TECH CO LTD
- Filing Date
- 2025-09-16
- Publication Date
- 2026-06-23
Smart Images

Figure CN121125740B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data synchronization technology, and in particular to a method and system for synchronizing multi-channel instrument data. Background Technology
[0002] In fields such as industrial monitoring, scientific experiments, and medical diagnosis, data synchronization of multi-channel instruments is a core element in ensuring the collaborative operation of systems and the accuracy of data analysis. With the development of the Internet of Things and intelligent sensing technology, the scale of multi-channel acquisition systems continues to expand, with the number of channels increasing from dozens to hundreds, and the data sampling rate also rising to the kHz or even MHz level. This places stringent requirements on the timing consistency of cross-channel data.
[0003] Existing technologies mostly use fixed grouping modes (such as division by physical interface). When some channels experience sudden drift, it can lead to the failure of synchronization of the entire group. Therefore, a multi-channel instrument data synchronization method is needed to solve the above problems. Summary of the Invention
[0004] The purpose of this invention is to provide a multi-channel instrument data synchronization method and system to solve the technical problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A method for synchronizing multi-channel instrument data, comprising:
[0007] Acquire channel data for each channel of the multi-channel instrument during transmission. The channel data includes time-series data and the timestamps corresponding to the time-series data.
[0008] The data sampling period is obtained based on the time series data, and the clock drift rate of each channel is calculated based on the preset reference time source, multiple timestamps and the data sampling period;
[0009] The time series signals of each channel are obtained based on the time series data, and features are extracted sequentially from the multiple time series signals to obtain multiple signal stability features, wherein the signal stability features include transient energy ratio and spectral distortion.
[0010] The dynamic drift risk index of each channel is obtained based on multiple clock drift rates, multiple transient energy ratios, and multiple spectral distortions.
[0011] The dynamic drift risk index of each channel is compared with a preset threshold to obtain multiple comparison data. The multi-channel instrument performs data synchronization based on the multiple comparison data.
[0012] This application also discloses a multi-channel instrument data synchronization system, comprising:
[0013] The first acquisition module is used to acquire channel data of each channel of the multi-channel instrument during transmission. The channel data includes time series data and timestamps corresponding to the time series data.
[0014] The second acquisition module is used to acquire the data sampling period based on the time series data, and to calculate the clock drift rate of each channel based on the preset reference time source, multiple timestamps and the data sampling period;
[0015] The third acquisition module is used to acquire time series signals of each channel based on the time series data, and to extract features from multiple time series signals in sequence to obtain multiple signal stability features, wherein the signal stability features include transient energy ratio and spectral distortion.
[0016] The fourth acquisition module is used to acquire the dynamic drift risk index of each channel based on multiple clock drift rates, multiple transient energy ratios and multiple spectral distortions;
[0017] The judgment module is used to compare the dynamic drift risk index of each channel with a preset threshold to obtain multiple comparison data. The multi-channel instrument performs data synchronization based on the multiple comparison data.
[0018] The beneficial effects of this application are as follows: This invention first acquires the time series data and timestamps of each channel of a multi-channel instrument, then calculates the data sampling period and clock drift rate based on these data to quantify the time synchronization deviation, and then extracts the transient energy ratio and spectral distortion of the time series signal to measure the signal stability. After normalization processing, the dynamic drift risk index of the three is combined to determine whether it exceeds the preset threshold. Low-risk data are grouped into a synchronization group, and high-risk data are isolated, corrected, and then merged into the synchronization group to form synchronized data. Through dynamic risk assessment and hierarchical processing, the impact of single-channel anomalies on overall synchronization is avoided, taking into account both clock and signal stability and improving synchronization reliability. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of a method flow according to an embodiment of this application.
[0020] Figure 2 This is a schematic diagram of the system structure according to an embodiment of this application.
[0021] Figure 3 This is a schematic diagram of the internal structure of a computer device according to an embodiment of this application.
[0022] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0023] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0024] like Figures 1-3 As shown, this application provides a multi-channel instrument data synchronization method, including:
[0025] S1. Acquire the channel data of each channel of the multi-channel instrument during transmission. The channel data includes time series data and the timestamps corresponding to the time series data.
[0026] S2. Obtain the data sampling period based on the time series data, and calculate the clock drift rate of each channel based on the preset reference time source, multiple timestamps and the data sampling period.
[0027] S3. Obtain time series signals of each channel based on the time series data, and extract features from multiple time series signals in sequence to obtain multiple signal stability features, wherein the signal stability features include transient energy ratio and spectral distortion.
[0028] S4. Obtain the dynamic drift risk index of each channel based on the multiple clock drift rates, multiple transient energy ratios and multiple spectral distortions.
[0029] S5. The dynamic drift risk index of each channel is compared with a preset threshold to obtain multiple comparison data. The multi-channel instrument performs data synchronization based on the multiple comparison data.
[0030] As described in steps S1-S5 above, since existing technologies mostly adopt fixed grouping modes (such as division by physical interface), when some channels experience sudden drift, it can lead to the failure of synchronization of the entire group. This invention first acquires the channel data of each channel of the multi-channel instrument during transmission. The channel data includes time series data and the timestamps corresponding to the time series data. The raw data of each channel is acquired in real time through the acquisition interface of the multi-channel instrument (such as data bus, wireless transmission module). The time series data is the sequence of changes of physical quantities (such as temperature, voltage and electrical signals, and electrical signals in this scheme) continuously acquired by the channel over time. Secondly, the timestamp is the time mark of the data acquisition time (generated by the local clock of each channel). Thus, the time series data is the "content basis" of synchronization, and the timestamp is the "time reference" of synchronization. The two together constitute the raw data for subsequent analysis and can provide the raw input for subsequent calculation of clock drift and extraction of signal features.
[0031] Then, the data sampling period is obtained based on the time series data, and the clock drift rate of each channel is calculated based on the preset reference time source, multiple timestamps, and the data sampling period. The data sampling period is calculated based on the time interval between adjacent sampling points in the time series data (such as timestamp difference), and the preset reference time source is a high-precision standard time (such as GPS clock or atomic clock) as a benchmark for evaluating the clock drift of each channel. In this way, the clock drift rate can reflect the deviation speed of each channel's local clock from the standard time, which is the core reason for data timestamp misalignment (the larger the drift rate, the faster the timestamp deviation accumulates). At the same time, the degree of time synchronization deviation of each channel is quantified, providing a time-dimensional indicator for subsequent risk assessment.
[0032] Next, time-series signals of each channel are obtained based on the time-series data, and feature extraction is performed on multiple time-series signals in sequence to obtain multiple signal stability features. Among them, the signal stability features include transient energy ratio and spectral distortion. The time-series signal is the time-series data converted into electrical or digital signal form (such as voltage signal sequence). In this way, the transient energy ratio can reflect the instantaneous fluctuation of the signal, while the spectral distortion can reflect the degree of frequency characteristic distortion of the signal. The two together measure the stability of the signal itself (signal instability will lead to unreliable data content, and even time synchronization is meaningless). Thus, risk assessment indicators are supplemented from the signal quality dimension to avoid ineffective synchronization of "time synchronization but signal distortion".
[0033] Secondly, the dynamic drift risk index of each channel is obtained based on multiple clock drift rates, multiple transient energy ratios and multiple spectral distortions. When calculating the dynamic drift risk index, the parameters need to be normalized to avoid inconsistent dimensions. In this way, the dynamic drift risk index is a comprehensive quantitative assessment of the channel's "time synchronization deviation + signal stability". The higher the value, the greater the risk of data synchronization failure of the channel.
[0034] Finally, the dynamic drift risk index of each channel is compared with a preset threshold to obtain multiple comparison data. The multi-channel instrument synchronizes the data based on the multiple comparison data. By distinguishing the multiple comparison data, correcting the problematic data, and reintegrating the corrected high-risk data back into the synchronization system, the consistency of all channel data in time and content is ensured. At the same time, effective synchronization of all channel data can be achieved, providing a reliable data foundation for the collaborative work of multi-channel instruments (such as multi-sensor data fusion analysis).
[0035] In summary, by using a dynamic risk assessment and hierarchical processing mechanism, the drift risk of each channel's data (combining clock drift and signal stability) is first quantitatively assessed. Then, low-risk data are directly grouped into synchronization groups, while high-risk data are isolated, corrected, and then merged. This avoids single-channel anomalies affecting overall synchronization, while also taking into account the dual stability of clock and signal characteristics, thus improving synchronization reliability.
[0036] In one embodiment, step S2, which involves obtaining the data sampling period based on the time series data and calculating the clock drift rate of each channel based on a preset reference time source, multiple timestamps, and the data sampling period, includes:
[0037] S201. Obtain the original time interval sequence and initial sampling period based on the time series data, and obtain the effective time interval based on the original time interval sequence and initial sampling period.
[0038] S202. Obtain the effective sampling period based on the effective time interval, and use the effective sampling period as the data sampling period.
[0039] S203. Obtain a time offset sequence based on the time series data and a preset reference time source, obtain a long-term drift component based on the time offset sequence, and obtain an original drift rate sequence based on the long-term drift component.
[0040] S204. Obtain environmental monitoring data of the space where the multi-channel instrument is located, wherein the environmental monitoring data includes temperature gradient parameters, power supply ripple coefficient and electromagnetic interference index.
[0041] S205. Obtain the environmental drift component based on the temperature gradient parameter, the power supply ripple coefficient, and the electromagnetic interference index, and obtain the compensated drift rate based on the environmental drift component and the original drift rate sequence.
[0042] S206. Obtain the smoothed drift rate according to the data sampling period, and obtain the clock drift rate of each channel according to the smoothed drift rate, multiple timestamps and the compensated drift rate.
[0043] As described in steps S201-S206 above, the present invention first obtains the original time interval sequence and the initial sampling period based on the time series data, and then obtains the effective time interval based on the original time interval sequence and the initial sampling period. The effective time interval is the value in the original time interval that deviates too much from the initial sampling period (e.g., if the deviation threshold is set to ±5%, then 0.8ms (20% deviation) is excluded, and the interval between 0.98ms and 1.02ms is retained). Secondly, since the original time interval may contain abnormal values (such as sudden large intervals caused by transmission delay), the effective time interval can reflect the true and stable sampling interval characteristics of the channel, thereby eliminating abnormal data interference and providing a reliable basis for subsequent calculation of the sampling period and drift rate.
[0044] Then, the effective sampling period is obtained based on the effective time interval, and the effective sampling period is used as the data sampling period. The average or median of the effective time interval is taken (e.g., if the effective time interval is 0.99ms, 1.00ms, or 1.01ms, the effective sampling period is 1.00ms) as the actual data sampling period of the channel. The effective sampling period is the "time unit benchmark" for channel data acquisition. Its stability directly determines the consistency of the time resolution of the data (e.g., if the sampling periods of two channels are 1ms and 2ms respectively, even if the timestamps are synchronized, the data density will not be consistent). It can also determine the stable sampling period of the channel, providing a unified time scale for subsequent drift rate calculation.
[0045] Next, a time offset sequence is obtained based on the time series data and a preset reference time source. A long-term drift component is obtained based on the time offset sequence, and an original drift rate sequence is obtained based on the long-term drift component. The time offset sequence is obtained by calculating the difference between the timestamp of each sampling point and the preset reference time source (such as GPS clock or NTP server time). For example, if the timestamp of a sampling point is 10:00:00.000 and the reference time is 10:00:00.002, the offset is -0.002s. Then, the time offset sequence is analyzed for trend using the least squares method to obtain the deviation part that grows linearly with time (excluding short-term fluctuations). For example, if the time offset sequence is [-0.002s, -0.005s, -0.008s] (increasing by -0.003s every 10s), then the long-term drift component shows a linear growth trend. The original drift rate sequence calculates the drift amount per unit time based on the slope of the long-term drift component. In this way, the long-term drift component can reflect the systematic deviation of the clock accumulated over time, and the original drift rate sequence quantifies the rate of this deviation and initially obtains the long-term drift characteristics of the clock, providing basic data for subsequent compensation.
[0046] Secondly, environmental monitoring data of the space where the multi-channel instrument is located is acquired. This environmental monitoring data includes temperature gradient parameters, power supply ripple coefficient, and electromagnetic interference index. The temperature gradient parameter is the temperature difference value collected by a temperature sensor at different locations (e.g., a 5°C temperature difference between the inside and outside of the instrument results in a gradient parameter of 0.5°C / cm). The power supply ripple coefficient is the ratio of the AC to DC components of the power supply output collected by the voltage monitoring module (e.g., a 0.1V AC ripple in a 5V DC power supply results in a ripple coefficient of 2%). The electromagnetic interference index is the deviation of the environmental electromagnetic field strength from the standard value measured by an electromagnetic compatibility tester (e.g., an index of 1.3 if the interference intensity in a certain frequency band exceeds the standard by 30%). Temperature affects the crystal oscillator frequency (for every 10°C change in temperature, the crystal oscillator frequency deviation may increase by 5ppm). Power supply ripple can interfere with the stability of the clock circuit. Electromagnetic interference can cause timestamp counting errors. These environmental factors are important dynamic causes of clock drift, thus providing quantitative parameters for subsequent environmental drift compensation.
[0047] Next, the environmental drift component is obtained based on the temperature gradient parameter, the power supply ripple coefficient, and the electromagnetic interference index. Then, the compensated drift rate is obtained based on the environmental drift component and the original drift rate sequence. The environmental drift component represents the additional impact of environmental factors on the drift rate, calculated using a preset model (such as multiple linear regression). For example, for every 1°C / cm increase in temperature gradient, the drift rate increases by 0.05 ppm. For every 1% increase in power supply ripple coefficient, the drift rate increases by 0.03 ppm. For every 0.1 increase in the electromagnetic interference index, the drift rate increases by 0.02 ppm. The environmental drift component (e.g., 0.2 ppm) is obtained through comprehensive calculation. The compensated drift rate is obtained by subtracting the environmental drift component from the original drift rate sequence (e.g., if the original drift rate is 1.5 ppm and the environmental drift component is 0.2 ppm, the compensated drift rate is 1.3 ppm). The environmental drift component is an additional drift rate caused by environmental factors. Compensation can eliminate environmental interference and obtain a drift rate that is closer to the inherent characteristics of the hardware. This eliminates the influence of dynamic environmental changes on the drift rate and improves the stability of the calculation results.
[0048] Finally, the smoothed drift rate is obtained based on the data sampling period, and then calculated based on the smoothed drift rate and multiple timestamps (in the clock drift rate calculation, the multiple timestamps are not used for calculation, but rather serve as serial numbers to distinguish different clock drift rates, such as...). ,in, The clock drift rate is represented by k, where k represents the timestamp. For example, if the timestamp starts at 0, then a natural number is used to represent the number of seconds or milliseconds elapsed since the start point (k = 1, 2, 3, ...). The clock drift rate for each channel is obtained from the smoothed drift rate and the compensated drift rate. The smoothed drift rate is calculated by averaging the compensated drift rate over the data sampling period (e.g., 1ms) to eliminate short-term fluctuations (e.g., a compensated drift rate fluctuating between 1.2ppm and 1.4ppm becomes 1.3ppm after smoothing). The clock drift rate is calculated by combining the smoothed drift rate and the instantaneous deviation of the timestamp (e.g., the difference between the timestamp and the reference timestamp at a certain moment). The final dynamic drift rate is obtained by weighting the real-time difference between the two drift rates and the compensated drift rate. Since the compensated drift rate is the result of correcting the original drift rate sequence by comprehensively considering environmental factors such as temperature gradient parameters, power supply ripple coefficient and electromagnetic interference index, it can reflect the immediate impact of current environmental factors on clock drift. In this scheme, the data in the channel is transmitted in real time, while the smooth drift rate is obtained by moving average of the compensated drift rate based on the data sampling period. It can effectively filter out short-term abnormal fluctuations and reflect the relatively stable trend of clock drift over a period of time. Therefore, the compensated drift rate has a dominant influence in this scheme.
[0049] In one embodiment, step S3, which involves acquiring time-series signals from each channel based on the time-series data and sequentially extracting features from the multiple time-series signals to obtain multiple signal stability features, wherein the signal stability features include transient energy ratio and spectral distortion, includes:
[0050] S301. Obtain the amplitude of the current sampling point based on the time series signal, and use the amplitude of the current sampling point as the endpoint to obtain the amplitudes of multiple sampling points before the endpoint.
[0051] S302. Compare the amplitude values of multiple sampling points with the amplitude values of preset historical standard sampling points to obtain the deviation amplitude values of multiple sampling points, and calculate the average deviation amplitude value based on the deviation amplitude values of multiple sampling points.
[0052] S303. Obtain the energy deviation ratio based on the current sampling point amplitude and the average deviation amplitude, and use the energy deviation ratio as the amplitude deviation influence factor.
[0053] S304. Obtain the transient energy ratio based on the current sampling point amplitude, multiple sampling point amplitudes, and amplitude deviation influence factors.
[0054] As described in steps S301-S304 above, the present invention first obtains the amplitude of the current sampling point based on the time series signal, and takes the amplitude of the current sampling point as the endpoint to obtain the amplitude of multiple sampling points before the endpoint. In this way, the local amplitude sequence contains the signal strength information of the current point and recent historical points, providing a data basis for analyzing whether the current point deviates from the historical trend. Secondly, it focuses on the short-term change trend of the signal to provide raw data for subsequent instantaneous stability analysis.
[0055] Secondly, the amplitudes of multiple sampling points are compared with the amplitudes of preset historical standard sampling points to obtain the deviation amplitudes of multiple sampling points. The average deviation amplitude is then calculated based on the deviation amplitudes of multiple sampling points. The deviation amplitude quantifies the signal deviation at a single point, while the average deviation amplitude reflects the overall deviation trend in the short-term history, providing a benchmark for judging whether the current deviation is abnormal. At the same time, by comparing with the standard value, the "absolute amplitude" of the signal is converted into "relative deviation", which facilitates subsequent energy analysis.
[0056] Next, a preset standard amplitude is obtained. Based on the preset standard amplitude, the amplitude of the current sampling point, and the average deviation amplitude, the energy deviation ratio is obtained, and this energy deviation ratio is used as the amplitude deviation influence factor. Since energy is proportional to the square of the amplitude, the energy deviation ratio is calculated using the following formula:
[0057] .
[0058] in, Indicates the energy deviation ratio. Indicates the amplitude of the current sampling point. Indicates the preset standard amplitude. This represents the average deviation magnitude.
[0059] In this way, the energy deviation ratio quantifies the difference between the current signal energy and the "energy under the historical average deviation". The influence factor is used to adjust the weight of this difference on the transient stability assessment (the greater the difference, the higher the weight). At the same time, the amplitude deviation is converted into energy deviation, which is more in line with the physical nature of "energy disturbance" in signal transmission and improves the accuracy of the assessment.
[0060] Then, the transient energy ratio is obtained based on the current sampling point amplitude, multiple sampling point amplitudes, and the amplitude deviation influence factor. The energy deviation ratio is used as the amplitude deviation influence factor. Therefore, in this scheme, the amplitude deviation influence factor is equal to the energy deviation ratio. The formula for calculating the transient energy ratio is:
[0061] .
[0062] in, Indicates the transient energy ratio. Indicates the amplitude of the current sampling point. This indicates the amplitude deviation influence factor. Let represent the amplitude of the i-th sampling point, where i = 1, 2, 3...n.
[0063] In this way, the transient energy ratio can focus on the energy difference between the "current moment" and the "recent history", quantify the degree of signal fluctuation in an instant (such as within one sampling period), and accurately capture the instantaneous interference of the signal (such as amplitude jump caused by impulse noise) to provide a quantitative indicator for the "instantaneous stability" of the signal.
[0064] In one embodiment, after step S304 of obtaining the transient energy ratio based on the current sampling point amplitude, multiple sampling point amplitudes, and amplitude deviation influence factor, the method further includes:
[0065] S305. Perform dual noise reduction and time-frequency analysis on the time series signal to obtain the baseband, feature band and noise band.
[0066] S306. Obtain the basic distortion degree of the baseband and the preset baseband based on the cosine similarity function.
[0067] S307. Based on the total energy of the characteristic band of the time series signal.
[0068] S308. Obtain the corresponding current feature band energy according to the feature band, obtain the absolute energy deviation value according to the current feature band energy and the preset reference energy, and obtain the feature band energy ratio deviation degree according to the absolute energy deviation value and the total energy of the feature band.
[0069] S309. Obtain the total noise band based on the time series signal, and obtain the noise band energy ratio deviation based on the noise band and the total noise band.
[0070] S3010. The basic distortion degree, the characteristic band energy ratio deviation degree, and the noise band energy ratio deviation degree are weighted to obtain the comprehensive characteristic distortion degree, and the comprehensive characteristic distortion degree is used as the spectral distortion degree.
[0071] As described in steps S305-S3010 above, this invention performs dual denoising and time-frequency analysis on the time series signal to obtain the baseband, feature band, and noise band. The dual denoising involves: first, wavelet threshold denoising to remove impulse noise (e.g., setting a threshold of 0.1V to filter out points with amplitude abrupt changes exceeding 0.1V); then, Kalman filtering to smooth high-frequency jitter (e.g., setting a Kalman gain of 0.3 for signals below 100Hz) to obtain the denoised signal. Next, time-frequency analysis is used to perform a short-time Fourier transform (STFT) on the denoised signal, decomposing the signal into different frequency bands to obtain the baseband, feature band, and noise band. This decomposition of the signal into different frequency bands, based on the signal's essential frequency characteristics (e.g., signals from specific devices have fixed characteristic frequencies), allows for the evaluation of the distortion degree of each frequency band. Furthermore, eliminating noise interference and separating the effective frequency components and interference components of the signal lays the foundation for spectral distortion analysis.
[0072] The basic distortion degree is obtained by comparing the baseband and the preset baseband based on the cosine similarity function. The preset baseband refers to the baseband frequency components during normal instrument operation (e.g., the baseband spectrum distribution obtained through calibration, represented by a vector). , ,..., ], where F represents the baseband vector and j represents the vector index) is the preset baseband vector. Similarly, the baseband is also converted into a vector representation, which is the current baseband spectrum vector. Cosine similarity function: calculate the cosine value of the angle between the current baseband spectrum vector and the preset baseband vector. Its value range is [-1, 1]. The closer it is to 1, the higher the similarity. The basic distortion degree = 1 - cosine similarity (e.g., if the similarity is 0.8, then the basic distortion degree is 0.2). The larger the value, the more serious the baseband distortion. Thus, the baseband is the "basic skeleton" of the signal (such as DC component or low frequency trend). Its distortion will cause the overall trend of the signal to be distorted (e.g., the temperature signal baseband drift will cause the overall measurement value to be higher). Secondly, quantifying the distortion degree of the fundamental frequency component of the signal can reflect the stability of the overall trend of the signal.
[0073] Next, based on the total energy of the characteristic bands of the time series signal, a "total scale" can be provided for the subsequent calculation of the characteristic band energy deviation, ensuring the relativity of the deviation assessment.
[0074] Then, the current characteristic band energy is obtained according to the characteristic band, and the absolute energy deviation value is obtained according to the current characteristic band energy and the preset reference energy. The characteristic band energy ratio deviation is obtained according to the absolute energy deviation value and the total energy of the characteristic band. In this way, the energy stability of key frequency components can be quantified by the characteristic band energy ratio deviation. If the characteristic band energy changes abruptly (such as the resonant frequency energy increases when the equipment is abnormal), this indicator will increase significantly. At the same time, the energy distortion of key signal information is accurately captured, providing a core evaluation indicator for frequency characteristic stability.
[0075] The process involves obtaining the total noise band based on the time-series signal, and then calculating the noise band energy ratio deviation based on the noise band and the total noise band. First, a preset noise band ratio is obtained, which is the ratio of noise band energy to the total signal energy under normal operating conditions. Then, the current noise band ratio is obtained based on the noise band and the total noise band. Finally, the preset noise band ratio is subtracted from the current noise band ratio to obtain the noise band energy ratio deviation. This noise band energy ratio reflects the degree of influence of the interference signal on the overall signal. A larger deviation indicates more severe environmental interference (such as increased electromagnetic interference leading to higher noise band energy). This process also quantifies the impact of environmental interference on the signal, supplementing the completeness of the spectral distortion analysis.
[0076] Finally, the base distortion, the characteristic band energy ratio deviation, and the noise band energy ratio deviation are weighted to obtain the comprehensive characteristic distortion, which is then used as the spectral distortion. This spectral distortion comprehensively reflects the distortion levels of the baseband, characteristic band, and noise band, fully reflecting the overall stability of the signal frequency characteristics (rather than local distortion in a single frequency band). It also provides a quantitative indicator for the "long-term frequency stability" of the signal, forming a complete evaluation system for signal stability characteristics together with the transient energy ratio. The characteristic band is the core frequency band containing key information in the signal, and its energy distribution directly determines the effective content of the signal (e.g., in equipment vibration signals, the energy change of the characteristic band where the resonant frequency is located can directly reflect the operating status of the equipment). Therefore, the energy ratio deviation of the characteristic band has the greatest impact on signal effectiveness and is usually given the highest weight to prioritize capturing distortions of core information. Secondly, the baseband, as the fundamental frequency band of the signal (such as DC components or low-frequency trends), is the carrier of the overall trend of the signal (e.g., baseband drift of temperature signals will cause the overall measurement value to shift). Its stability directly affects the reference reliability of the signal, but its importance is less than that of the characteristic band and is generally given a medium weight. Finally, the noise band is an interference frequency band without effective information. Its energy ratio deviation mainly reflects the strength of environmental interference. Although it will affect signal quality, it does not directly determine the effectiveness of core information, so it has the lowest weight.
[0077] In summary, during the acquisition and transmission of signals from multi-channel instruments, they are affected by transient interference (such as electromagnetic pulses and contact jitter) and continuous interference (such as power supply ripple and environmental noise). Transient interference can cause sudden jumps in signal amplitude (such as a 10% instantaneous increase in amplitude at a sampling point), while continuous interference can cause distortion of the signal's spectral characteristics (such as abnormal energy proportions of characteristic frequency components). If only time synchronization is achieved while ignoring the stability of the signal itself, it will result in "time alignment but invalid data" (such as distorted signals that cannot be used for analysis). Therefore, it is necessary to quantify signal stability through feature extraction to supplement the risk assessment with indicators of signal quality.
[0078] In one embodiment, step S4, which involves obtaining the dynamic drift risk index of each channel based on a plurality of clock drift rates, a plurality of transient energy ratios, and a plurality of spectral distortions, includes:
[0079] S401. Normalize the multiple clock drift rates, multiple transient energy ratios, and multiple spectral distortions respectively to obtain multiple normalized values of the clock drift rates, multiple normalized values of the transient energy ratios, and multiple normalized values of the spectral distortions.
[0080] S402. Obtain multiple temperature values transmitted by the multi-channel instrument within a preset time period, and obtain an average temperature value based on the multiple temperature values at those times.
[0081] S403. Obtain a standard temperature difference value based on multiple time-based temperature values and average temperature values, calculate a temperature influence coefficient based on the standard temperature difference value and average temperature value, and use the temperature influence coefficient as a temperature influence factor.
[0082] S404. Obtain the dynamic drift risk index of each channel based on the multiple clock drift rate normalization values, the multiple transient energy ratio normalization values, the multiple spectral distortion normalization values, and the temperature influence factor.
[0083] As described in steps S401-S404 above, the present invention first normalizes the multiple clock drift rates, multiple transient energy ratios, and multiple spectral distortions respectively to obtain multiple normalized values of clock drift rates, multiple normalized values of transient energy ratios, and multiple normalized values of spectral distortions. In this way, normalization converts indicators of different dimensions and ranges into relative values of the same magnitude, eliminating the interference of "numerical magnitude being affected by dimensions" (e.g., a drift rate of 100ppm and a spectral distortion of 0.5 can be directly compared), thereby making the clock drift rate, transient energy ratio, and spectral distortions horizontally comparable, laying the foundation for subsequent weighted merging.
[0084] Next, multiple temperature values transmitted by multi-channel instruments within a preset time period are acquired, and an average temperature value is obtained based on the multiple temperature values at those times. The average temperature is used as a benchmark value for environmental impact and is subsequently used to calculate the degree of impact of temperature fluctuations on risk (the greater the temperature fluctuation, the stronger the amplification effect of the environment on risk).
[0085] Then, the standard temperature difference is calculated based on the multiple time-stamped temperature values and the average temperature value, wherein the calculation formula is:
[0086] .
[0087] in, Indicates the standard temperature difference value. This represents the temperature value at time j. This represents the number of temperature values at time points, where j represents the sequence number of the temperature value at time point, and j = 1, 2, 3...y. This represents the average temperature value.
[0088] The temperature effect coefficient is calculated based on the standard temperature difference value and the average temperature value, where the calculation formula is:
[0089] .
[0090] in, This indicates the coefficient of temperature difference that affects temperature. This represents the average temperature value. The standard temperature difference value is represented, and the temperature influence coefficient is used as the temperature influence factor.
[0091] By quantifying the relationship between temperature fluctuations and clock drift, signal distortion (e.g., the drift rate of a crystal oscillator increases when the temperature fluctuates, and signal transmission loss increases in temperature-dependent environments), and temperature-related factors, the correlation of "environmental fluctuations leading to amplified risks" can be clearly presented. Secondly, it can also enable risk assessment to dynamically respond to environmental changes and avoid underestimating synchronization risks in harsh environments.
[0092] Finally, the dynamic drift risk index for each channel is obtained based on multiple normalized values of clock drift rate, multiple normalized values of transient energy ratio, multiple normalized values of spectral distortion, and the temperature influence factor. The dynamic drift risk index is a comprehensive quantification of "time synchronization deviation + instantaneous signal fluctuation + signal spectral distortion," for example: Dynamic drift risk index = (normalized clock drift rate × a + normalized transient energy ratio × b + normalized spectral distortion × c) × temperature influence factor, where a, b, and c are the basic weights corresponding to the normalized clock drift rate, normalized transient energy ratio, and normalized spectral distortion, respectively. Furthermore, since the clock drift rate directly determines whether the time base of multi-channel data is aligned, it is a core prerequisite for data synchronization (e.g., an excessively high clock drift rate will lead to severe timestamp misalignment, rendering subsequent signal analysis meaningless), therefore, it is assigned the highest weight (e.g., 40%) to prioritize this aspect. Firstly, ensuring the reliability of synchronization in the time dimension is crucial. Secondly, the transient energy ratio reflects the instantaneous stability of the signal. Its anomalies (such as amplitude jumps caused by sudden electromagnetic pulses) can cause data failure in a single time period, significantly impacting scenarios with high real-time requirements (such as instantaneous status monitoring in industrial control). Its importance is secondary, and it is given a moderate weight (e.g., 30%). Finally, the spectral distortion reflects the long-term distortion of the signal's frequency characteristics. Its anomalies (such as characteristic frequency shifts) can lead to overall signal information distortion, significantly impacting scenarios that rely on frequency characteristic analysis (such as equipment fault diagnosis). However, compared to the fundamental role of clock synchronization, its weight is slightly lower (e.g., 30%). Furthermore, by incorporating the influence of environmental fluctuations through temperature factors, it achieves a coupled evaluation of "static indicators + dynamic environment." At the same time, it can convert multi-dimensional and multi-dimensional risk factors into a single value, facilitating direct comparison of the synchronization reliability of each channel and providing a clear basis for subsequent graded processing.
[0093] In summary, the data synchronization risk of multi-channel instruments is affected by multiple factors: clock drift rate reflects the degree of deviation of the time reference (time asynchrony risk), transient energy ratio reflects the severity of instantaneous signal fluctuations (instantaneous data invalidity risk), and spectral distortion reflects the degree of distortion of the signal frequency characteristics (long-term data invalidity risk). These factors have different dimensions and numerical ranges (e.g., clock drift rate is measured in ppm, while transient energy ratio is a dimensionless ratio), making direct merging for evaluation impossible. Furthermore, environmental factors such as temperature can amplify these risks (e.g., high temperatures accelerate clock drift and exacerbate signal distortion). Therefore, normalization is needed to eliminate dimensional differences, and environmental factors must be combined to quantify the overall risk in order to objectively assess the synchronization reliability of channel data.
[0094] In one embodiment, step S5, which compares the dynamic drift risk index of each channel with a preset threshold to obtain multiple comparison data, and the multi-channel instrument performs data synchronization based on the multiple comparison data, includes:
[0095] S501. Compare the dynamic drift risk index of each channel with a preset threshold.
[0096] If the dynamic drift risk index is less than a preset threshold, the channel data corresponding to the dynamic drift risk index is determined to be normal data, and the normal data of each channel is grouped into a synchronization group.
[0097] If the dynamic drift risk index is greater than a preset threshold, then the channel data corresponding to the dynamic drift risk index of each channel that is greater than the preset threshold is isolated to obtain multiple isolated channel data. The multiple isolated channel data are then corrected to obtain multiple corrected channel data.
[0098] S502. The data from multiple correction channels are merged into the synchronization group to obtain multi-channel instrument synchronization data. The multi-channel instrument performs data synchronization based on the multi-channel instrument synchronization data.
[0099] As described in steps S501-S502 above, the present invention first compares the dynamic drift risk index of each channel with a preset threshold.
[0100] If the dynamic drift risk index is less than a preset threshold, the channel data corresponding to the dynamic drift risk index is determined to be normal data, and the normal data of each channel is grouped into a synchronization group.
[0101] If the dynamic drift risk index is greater than a preset threshold, the channel data corresponding to the dynamic drift risk index is determined to be normal data. The channel data corresponding to the dynamic drift risk index of each channel that is greater than the preset threshold is isolated. Multiple isolated channel data are corrected to obtain multiple corrected channel data. In this way, the channel data is processed hierarchically by dividing the data by threshold. Priority is given to ensuring the synchronization efficiency of low-risk data, and high-risk data is corrected in a targeted manner. It can also avoid the failure of a single channel dragging down the overall synchronization and improve the fault tolerance of the synchronization system.
[0102] Finally, the data from multiple corrected channels are merged into the synchronization group to obtain multi-channel instrument synchronization data. The multi-channel instruments synchronize their data based on the multi-channel instrument synchronization data. This process reintegrates the corrected high-risk data back into the synchronization system, ensuring consistency of all channel data in terms of time and content. It also enables effective synchronization of all channel data, providing a reliable data foundation for the collaborative work of multi-channel instruments (such as multi-sensor data fusion analysis).
[0103] In one embodiment, step S501, which corrects the data of multiple isolated channels to obtain multiple corrected channel data, includes:
[0104] S5011. Reorder the multiple isolation channel data according to the preset reference time source to obtain an isolation channel data table.
[0105] S5012. Obtain multiple output signals corresponding to multiple isolation channel data, and compare the multiple output signals with a preset signal based on a phase-locked loop to obtain multiple phase differences between the multiple output signals and the preset signal.
[0106] S5013. Adjust the parameters of the multiple output signals according to the isolation channel data table based on the multiple phase differences to obtain multiple real-time compensated frequency offsets (adaptive filters).
[0107] S5014. Correct and compensate the multiple isolated channel data according to the multiple real-time compensation frequency offsets to obtain multiple corrected channel data.
[0108] As described in steps S5011-S5014 above, the present invention first reorders the data from multiple isolated channels according to the preset reference time source to obtain an isolated channel data table. The preset reference time source is a high-precision standard time (such as a GPS clock or atomic clock), from which a standard time series is obtained. The isolated channel data consists of channel data whose dynamic drift risk index exceeds the limit, including time series data and corresponding timestamps (derived from the local acquisition clock of each isolated channel). The timestamps of the isolated channel data are compared with the standard time of the preset reference time source, and the isolated channel data is rearranged according to the chronological order of the standard time to form an ordered isolated channel data table. This solves the problem of time sequence disorder caused by local clock drift in the isolated channel data and provides a unified time reference for subsequent signal comparison and parameter adjustment, avoiding correction deviations caused by incorrect time sequence.
[0109] Then, multiple output signals corresponding to the data from the multiple isolation channels are acquired, and these output signals are compared with a preset signal based on a phase-locked loop (PLL) to obtain multiple phase differences between the output signals and the preset signal. The output signals are electrical signals corresponding to the isolation channel data (converted from time-series data). The preset signal is a standard signal of the normal channel under the same operating conditions (obtainable from historical normal data or calibration data). The PLL uses a phase detector to compare the phases of the output signals and the preset signal in real time, calculating the phase difference (e.g., if the output signal phase leads the preset signal by 30°, the phase difference is 30°). This quantifies the phase deviation between the isolated channel output signal and the standard signal. The existence of this phase difference causes signal misalignment in the time dimension. Accurately capturing the phase shift of the signal provides key parameters for subsequent frequency offset compensation and is an important basis for achieving signal synchronization.
[0110] Next, the multiple phase differences are used to adjust the parameters of the multiple output signals according to the isolation channel data table, resulting in multiple real-time compensated frequency offsets. Furthermore, the isolation channel data table provides the time sequence of the isolation channel data. Based on this, the frequency of the output signal is adjusted by the voltage-controlled oscillator of the phase-locked loop according to the magnitude and sign (leading or lagging) of the phase difference. For example, when the phase difference is positive (output signal leading), the signal frequency is decreased. When the phase difference is negative (output signal lagging), the signal frequency is increased. Finally, the required frequency offset is calculated (e.g., +5Hz means the signal frequency needs to be increased by 5Hz). By converting the phase difference into a frequency offset parameter that can be directly used for correction, the phase deviation is gradually eliminated by adjusting the signal frequency. The real-time calculation of the frequency offset ensures the dynamic nature of the compensation, adapting to real-time changes in the signal and enabling dynamic calibration of the output signal frequency. This provides a specific adjustment basis for eliminating signal time misalignment, making it more adaptable than fixed-frequency compensation.
[0111] Finally, the isolated channel data is corrected and compensated based on the real-time compensated frequency offsets to obtain corrected channel data. Specifically, the timestamps and signal amplitudes of the isolated channel data are corrected using the real-time compensated frequency offsets. For example, for a signal with a frequency offset of +5Hz, its timestamp will accumulate deviations over time. The timestamp is adjusted using a compensation formula (e.g., corrected timestamp = original timestamp + frequency offset × time interval). Simultaneously, the signal amplitude is calibrated based on the frequency offset to ensure the accuracy of signal characteristics. This results in the corrected channel data. In this way, frequency offset compensation corrects the isolated channel data from both time and signal characteristic dimensions, ensuring consistency with normal channel data in terms of time reference and signal characteristics. It also completely eliminates time misalignment and signal deviation in the isolated channel data, enabling it to meet synchronization requirements and laying the foundation for subsequent merging into the synchronization group, thus guaranteeing the integrity and accuracy of multi-channel data synchronization.
[0112] In summary, during multi-channel instrument data transmission, some channels experience dynamic drift risk indices exceeding preset thresholds due to factors such as clock drift and environmental interference. Directly integrating this channel data into synchronization would disrupt the overall data's timing consistency and accuracy. This is because the timestamps of isolated channel data deviate from the preset reference time source, and the output signals may exhibit phase shifts and frequency deviations, resulting in a mismatch between the data and normal channel data in terms of time dimension and signal characteristics. Therefore, it is necessary to correct this isolated channel data to eliminate time misalignment and signal deviations, enabling it to be integrated into the synchronization group for effective synchronization.
[0113] In one embodiment, the step S502, in which multiple correction channel data are merged into the synchronization group to obtain multi-channel instrument synchronization data, and the multi-channel instrument performs data synchronization based on the multi-channel instrument synchronization data, includes:
[0114] SS5021. Obtain multiple point coordinates of the initial channel based on multiple isolation channel data, and mark the points of the synchronization group based on the multiple point coordinates to obtain multiple marked point coordinates.
[0115] SS5022. Placeholder data is set at the position corresponding to the coordinates of the marked point in the synchronization group.
[0116] SS5023. Replace the placeholder data with the multiple corrected channel data to obtain changed and replaced channel data, and use the changed and replaced channel data as multi-channel instrument synchronization data.
[0117] SS5024, The multi-channel instrument performs data synchronization based on the multi-channel instrument synchronization data.
[0118] As described in steps SS5021-SS5024 above, this invention first obtains multiple point coordinates of the initial channel based on the data from multiple isolated channels. Then, it marks the points in the synchronization group based on these multiple point coordinates, obtaining multiple marked point coordinates. The isolated channel data originates from channels with excessive dynamic drift risk index (e.g., channels 2 and 5). The point coordinates of the initial channels are the physical locations or logical numbers of these channels in the multi-channel instrument (e.g., the point coordinates of channel 2 are (2, t), where 2 is the channel number and t is the time axis coordinate). The synchronization group consists of normal data with acceptable dynamic drift risk index (e.g., channels 1, 3, and 4), containing the time-series data and corresponding position information of each channel. By comparing the initial number of the isolated channel with the channel number of the synchronization group, the position corresponding to the isolated channel is marked in the synchronization group (e.g., marking the positions of channels 2 and 5 in the synchronization group as marked point coordinates). This clarifies the original position of the isolated channel in the overall multi-channel system, providing a spatial reference for the accurate merging of corrected data. For example, in industrial monitoring, the temperature sensor corresponding to device A in channel 2 needs to have its coordinates adjacent to other parameter data of device A in the synchronization group. Marking the coordinates can ensure that the corrected data returns to that position, and can also avoid merging errors caused by unclear positions of the corrected data, providing an accurate target position for subsequent placement and replacement.
[0119] Next, placeholder data is set at the positions corresponding to the coordinates of the marked points in the synchronization group. This placeholder data is temporary data with a specific identifier (e.g., represented by "NULL" or the specific code "#"). Placeholder data is inserted at the time-series positions corresponding to the coordinates of the marked points in the synchronization group (e.g., inserting "#" at time axis positions t1 and t2 of channels 2 and 5 in the synchronization group). These positions originally contained abnormal data from the isolated channels before correction. Replacing them with placeholder data clears the abnormal data and reserves space, thus "reserving seats" for correction data. This ensures the continuity of the synchronization group in the time series (e.g., the placeholder data for channel 2 at time t1 is time-aligned with the data from other channels at time t1), while preventing abnormal data from interfering with overall synchronization. It also achieves the isolation and clearing of abnormal data and the reservation of space for correction data, providing a clear target area for subsequent replacement and ensuring the integrity of the synchronization group structure.
[0120] Then, the placeholder data is replaced by the multiple corrected channel data to obtain the changed and replaced channel data. The changed and replaced channel data is used as the multi-channel instrument synchronization data. The corrected channel data is the isolated channel data (such as the corrected data of channels 2 and 5) after being corrected by the five steps of the essential algorithm. Its timestamp and signal characteristics have been matched with the synchronization group. Through a data replacement algorithm (such as aligning by timestamp and writing the amplitude, timestamp and other parameters of the corrected data into the placeholder data position), the placeholder data at the coordinates of the marked point in the synchronization group is replaced with the corrected channel data (such as replacing "#" with the corrected data of channel 2), forming the changed and replaced channel data, that is, the multi-channel instrument synchronization data. This can complete the final fusion of the corrected data and the synchronization group, so that the corrected data of the isolated channel returns to its original position, ensuring the consistency of the multi-channel data in terms of time and space (such as the corrected data of channel 2 at time t1 is aligned with the data of channels 1 and 3 in time, and logically corresponds to the associated parameters of device A). At the same time, it can also achieve seamless splicing of the corrected data and normal data to form complete and orderly multi-channel synchronization data, providing a unified data foundation for the collaborative work of instruments.
[0121] Finally, the multi-channel instrument synchronizes its data based on the multi-channel instrument synchronization data. This synchronization data serves as a "common language" for the collaborative operation of the instruments, ensuring that the data from each channel remains consistent in terms of time reference and logical association. This avoids control errors or analysis errors caused by data asynchrony and also enables full-process synchronization of the multi-channel instruments from data acquisition to application, improving the system's collaborative accuracy (e.g., in scientific experiments, multi-sensor data synchronization can reduce measurement errors to within 0.1ms).
[0122] In this scheme, all numerical values with dimensional issues are normalized to ensure dimensional synchronization.
[0123] This application also provides a multi-channel instrument data synchronization system, including:
[0124] The first acquisition module is used to acquire channel data of each channel of the multi-channel instrument during transmission. The channel data includes time series data and timestamps corresponding to the time series data.
[0125] The second acquisition module is used to acquire the data sampling period based on the time series data, and to calculate the clock drift rate of each channel based on the preset reference time source, multiple timestamps and the data sampling period.
[0126] The third acquisition module is used to acquire time series signals of each channel based on the time series data, and to extract features from multiple time series signals in sequence to obtain multiple signal stability features, wherein the signal stability features include transient energy ratio and spectral distortion.
[0127] The fourth acquisition module is used to acquire the dynamic drift risk index of each channel based on the multiple clock drift rates, the multiple transient energy ratios, and the multiple spectral distortion degrees.
[0128] The judgment module is used to compare the dynamic drift risk index of each channel with a preset threshold to obtain multiple comparison data. The multi-channel instrument performs data synchronization based on the multiple comparison data.
[0129] In one embodiment, the second acquisition module includes:
[0130] The first acquisition unit is used to acquire the original time interval sequence and the initial sampling period based on the time series data, and to acquire the effective time interval based on the original time interval sequence and the initial sampling period.
[0131] The second acquisition unit is used to acquire the effective sampling period based on the effective time interval, and use the effective sampling period as the data sampling period.
[0132] The third acquisition unit is used to acquire a time offset sequence based on the time series data and a preset reference time source, acquire a long-term drift component based on the time offset sequence, and acquire an original drift rate sequence based on the long-term drift component.
[0133] The fourth acquisition unit is used to acquire environmental monitoring data of the space where the multi-channel instrument is located, wherein the environmental monitoring data includes temperature gradient parameters, power supply ripple coefficient and electromagnetic interference index.
[0134] The fifth acquisition unit is used to acquire the environmental drift component based on the temperature gradient parameter, the power supply ripple coefficient and the electromagnetic interference index, and to acquire the compensated drift rate based on the environmental drift component and the original drift rate sequence.
[0135] The sixth acquisition unit is used to acquire the smoothed drift rate according to the data sampling period, and to acquire the clock drift rate of each channel according to the smoothed drift rate, multiple timestamps and the compensated drift rate.
[0136] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0137] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0138] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0139] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0140] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method of synchronizing data from multiple channels of an instrument, the method comprising: include: Acquire channel data for each channel of the multi-channel instrument during transmission. The channel data includes time-series data and the timestamps corresponding to the time-series data. The data sampling period is obtained based on the time series data, and the clock drift rate of each channel is calculated based on the preset reference time source, multiple timestamps and the data sampling period; The time series signals of each channel are obtained based on the time series data, and features are extracted sequentially from the multiple time series signals to obtain multiple signal stability features, wherein the signal stability features include transient energy ratio and spectral distortion. The steps of obtaining the dynamic drift risk index of each channel based on multiple clock drift rates, multiple transient energy ratios, and multiple spectral distortion degrees include: The clock drift rates, transient energy ratios, and spectral distortions are normalized to obtain normalized values for the clock drift rates, transient energy ratios, and spectral distortions, respectively. The average temperature value is obtained based on the multiple temperature values transmitted by the multi-channel instrument within a preset time period. A standard temperature difference value is obtained based on multiple time-based temperature values and an average temperature value. A temperature influence coefficient is calculated based on the standard temperature difference value and the average temperature value, and the temperature influence coefficient is used as a temperature influence factor. The dynamic drift risk index of each channel is obtained based on multiple normalized values of clock drift rate, multiple normalized values of transient energy ratio, multiple normalized values of spectral distortion, and the temperature influence factor. The dynamic drift risk index of each channel is compared with a preset threshold to obtain multiple comparison data. The multi-channel instrument performs data synchronization based on the multiple comparison data.
2. The multi-channel instrument data synchronization method of claim 1, wherein, The step of obtaining the data sampling period based on the time series data, and calculating the clock drift rate of each channel based on a preset reference time source, multiple timestamps, and the data sampling period, includes: The original time interval sequence and initial sampling period are obtained based on the time series data, and the effective time interval is obtained based on the original time interval sequence and initial sampling period; The effective sampling period is obtained based on the effective time interval, and the effective sampling period is used as the data sampling period. A time offset sequence is obtained based on the time series data and a preset reference time source, and a long-term drift component is obtained based on the time offset sequence, and an original drift rate sequence is obtained based on the long-term drift component. Acquire environmental monitoring data of the space where the multi-channel instrument is located, wherein the environmental monitoring data includes temperature gradient parameters, power supply ripple coefficient and electromagnetic interference index; The environmental drift component is obtained based on the temperature gradient parameter, the power supply ripple coefficient, and the electromagnetic interference index, and the compensated drift rate is obtained based on the environmental drift component and the original drift rate sequence. The smoothed drift rate is obtained based on the data sampling period, and the clock drift rate of each channel is obtained based on the smoothed drift rate, multiple timestamps, and the compensated drift rate.
3. The method of claim 1, wherein, The step of acquiring time-series signals of each channel based on the time-series data, and sequentially extracting features from multiple time-series signals to obtain multiple signal stability features, wherein the signal stability features include transient energy ratio and spectral distortion, includes: The amplitude of the current sampling point is obtained based on the time series signal, and the amplitude of the current sampling point is used as the endpoint to obtain the amplitude of multiple sampling points before the endpoint. The amplitudes of multiple sampling points are compared with the amplitudes of preset historical standard sampling points to obtain the deviation amplitudes of multiple sampling points, and the average deviation amplitude is calculated based on the deviation amplitudes of multiple sampling points. The energy deviation ratio is obtained based on the current sampling point amplitude and the average deviation amplitude, and the energy deviation ratio is used as the amplitude deviation influence factor. The transient energy ratio is obtained based on the current sampling point amplitude, multiple sampling point amplitudes, and amplitude deviation influence factors.
4. The method of claim 3, wherein, After the step of obtaining the transient energy ratio based on the current sampling point amplitude, multiple sampling point amplitudes, and amplitude deviation influence factor, the method further includes: The time series signal is subjected to dual noise reduction and time-frequency analysis to obtain the baseband, feature band and noise band; The basic distortion degree of the baseband and the preset baseband is obtained based on the cosine similarity function; Based on the total energy of the characteristic bands of the time series signal; The current energy of the feature band is obtained according to the feature band, and the absolute energy deviation value is obtained according to the current feature band energy and the preset reference energy. The feature band energy ratio deviation is obtained according to the absolute energy deviation value and the total energy of the feature band. The total noise band is obtained based on the time series signal, and the noise band energy ratio deviation is obtained based on the noise band and the total noise band. The basic distortion degree, the characteristic band energy ratio deviation degree, and the noise band energy ratio deviation degree are weighted to obtain the comprehensive characteristic distortion degree, and the comprehensive characteristic distortion degree is used as the spectral distortion degree.
5. The method of claim 1, wherein, The step of comparing the dynamic drift risk index of each channel with a preset threshold to obtain multiple comparison data, and the step of the multi-channel instrument synchronizing data based on the multiple comparison data, includes: The dynamic drift risk index of each channel is compared with a preset threshold. If the dynamic drift risk index is less than a preset threshold, the channel data corresponding to the dynamic drift risk index is determined to be normal data, and the normal data of each channel is grouped into a synchronization group. If the dynamic drift risk index is greater than a preset threshold, then the channel data corresponding to the dynamic drift risk index of each channel that is greater than the preset threshold is isolated to obtain multiple isolated channel data. The multiple isolated channel data are then corrected to obtain multiple corrected channel data. Multiple correction channel data are merged into the synchronization group to obtain multi-channel instrument synchronization data, and the multi-channel instrument performs data synchronization based on the multi-channel instrument synchronization data.
6. The method of claim 5, wherein, The step of correcting the data of multiple isolated channels to obtain multiple corrected channel data includes: The isolation channel data is reordered according to the preset reference time source to obtain an isolation channel data table; Multiple output signals corresponding to multiple isolated channel data are acquired, and multiple output signals are compared with a preset signal based on a phase-locked loop to obtain multiple phase differences between the multiple output signals and the preset signal; The multiple phase differences are adjusted according to the isolation channel data table to obtain multiple real-time compensated frequency offsets for the multiple output signals. The isolated channel data are corrected and compensated based on the multiple real-time compensation frequency offsets to obtain multiple corrected channel data.
7. The method of claim 5, wherein, The step of merging multiple corrected channel data into the synchronization group to obtain multi-channel instrument synchronization data, and the multi-channel instrument synchronizing data based on the multi-channel instrument synchronization data, includes: Based on the data from the multiple isolation channels, obtain the coordinates of multiple points in the initial channel, and mark the points of the synchronization group based on the multiple point coordinates to obtain multiple marked point coordinates; Placeholder data is set at the position corresponding to the coordinates of the marked point in the synchronization group; The placeholder data is replaced by the multiple corrected channel data to obtain the changed and replaced channel data, and the changed and replaced channel data is used as the multi-channel instrument synchronization data; The multi-channel instrument synchronizes data based on the synchronization data of the multi-channel instrument.
8. A multi-channel instrument data synchronization system, characterized by, include: The first acquisition module is used to acquire channel data of each channel of the multi-channel instrument during transmission. The channel data includes time series data and timestamps corresponding to the time series data. The second acquisition module is used to acquire the data sampling period based on the time series data, and to calculate the clock drift rate of each channel based on the preset reference time source, multiple timestamps and the data sampling period; The third acquisition module is used to acquire time series signals of each channel based on the time series data, and to extract features from multiple time series signals in sequence to obtain multiple signal stability features, wherein the signal stability features include transient energy ratio and spectral distortion. The fourth acquisition module is used to acquire the dynamic drift risk index of each channel based on multiple clock drift rates, multiple transient energy ratios, and multiple spectral distortion degrees, including: The clock drift rates, transient energy ratios, and spectral distortions are normalized to obtain normalized values for the clock drift rates, transient energy ratios, and spectral distortions, respectively. The average temperature value is obtained based on the multiple temperature values transmitted by the multi-channel instrument within a preset time period. A standard temperature difference value is obtained based on multiple time-based temperature values and an average temperature value. A temperature influence coefficient is calculated based on the standard temperature difference value and the average temperature value, and the temperature influence coefficient is used as a temperature influence factor. The dynamic drift risk index of each channel is obtained based on multiple normalized values of clock drift rate, multiple normalized values of transient energy ratio, multiple normalized values of spectral distortion, and the temperature influence factor. The judgment module is used to compare the dynamic drift risk index of each channel with a preset threshold to obtain multiple comparison data. The multi-channel instrument performs data synchronization based on the multiple comparison data.
9. A multi-channel instrument data synchronization system according to claim 8, wherein, The second acquisition module includes: The first acquisition unit is used to acquire the original time interval sequence and the initial sampling period based on the time series data, and to acquire the effective time interval based on the original time interval sequence and the initial sampling period. The second acquisition unit is used to acquire the effective sampling period according to the effective time interval, and use the effective sampling period as the data sampling period. The third acquisition unit is used to acquire a time offset sequence based on the time series data and a preset reference time source, acquire a long-term drift component based on the time offset sequence, and acquire an original drift rate sequence based on the long-term drift component. The fourth acquisition unit is used to acquire environmental monitoring data of the space where the multi-channel instrument is located, wherein the environmental monitoring data includes temperature gradient parameters, power supply ripple coefficient and electromagnetic interference index; The fifth acquisition unit is used to acquire the environmental drift component based on the temperature gradient parameter, the power supply ripple coefficient and the electromagnetic interference index, and to acquire the compensated drift rate based on the environmental drift component and the original drift rate sequence. The sixth acquisition unit is used to acquire the smoothed drift rate according to the data sampling period, and to acquire the clock drift rate of each channel according to the smoothed drift rate, multiple timestamps and the compensated drift rate.