Method for correcting heterogeneous module data synchronization system error in biological microscopic equipment

By establishing a data synchronization base point and clock module in the intelligent biological microscope, correcting the timestamp, and achieving time alignment of heterogeneous module data, the error problem caused by data transmission delay is solved, and the imaging accuracy and real-time control capability are improved.

CN120669818APending Publication Date: 2025-09-19WUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510769861.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In intelligent biological microscopes, imaging results are inaccurate due to data transmission delays and module errors. Existing methods fail to effectively eliminate data transmission errors, affecting imaging accuracy and real-time performance.

Method used

A data synchronization base point is established in the biological microscope equipment, and a clock module is equipped to provide timestamps and time calibration. The timestamps are corrected by calculating the calibration time instructions to achieve time alignment and synchronization of heterogeneous module data and reduce delay errors.

Benefits of technology

It improves the accuracy of data synchronization, ensures that data from different modules are correctly interpreted within a unified time frame, enhances the compatibility and real-time performance of the computing processing unit, and improves the accuracy and response speed of imaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120669818A_ABST
    Figure CN120669818A_ABST
Patent Text Reader

Abstract

The invention discloses a method for correcting heterogeneous module data synchronization system errors in biological microscopic equipment, and relates to the technical field of system error correction, and the method comprises the steps: setting a data synchronization base point in target biological microscopic equipment; a plurality of system modules in the target biological microscopic equipment are provided with clock modules used for providing timestamps and time calibration; calculating data transmission delay according to the obtained calculation calibration time instruction and the data synchronization base point, performing time base correction on the timestamp of each system module based on the data transmission delay, and associating the transmitted data stream with the real-time timestamp to perform data transmission; performing time alignment on the acquired data of the plurality of system modules to realize time sequence correction of the heterogeneous data; the application has the effects of effectively eliminating the error caused by data transmission delay in the intelligent biological microscope and reducing the system synchronization error of each module system in the intelligent biological microscope.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of system error correction, and in particular to a method for correcting system errors in data synchronization of heterogeneous modules in a biological microscope. Background Art

[0002] In an intelligent biological microscope, it can be mainly divided into an imaging system, a mechanism control system, and a sensor system. Generally, developers will use algorithms to calculate whether the image is in a clear position, and then control the motion mechanism to reach the corresponding position to achieve automatic focusing; by calculating the field of view size and the stroke of the stage, the field of view can be expanded by controlling the motor, and the corresponding position imaging is obtained through the sensor, and the clear area is calculated, and finally integrated to form a large depth of field photo; however, due to the magnification of the biological microscope, slight errors can lead to very different results obtained by these functional algorithms.

[0003] There are several aspects that lead to these errors: first, the errors in each module of the biological microscope itself, that is, the error caused by the time from data acquisition to data transmission, which is generally at the microsecond level (ranging from 100ns to 100μs); second, the error in the time it takes for data to be transmitted to the system for acquisition, which is generally at the millisecond level (ranging from 1ms to 500ms); third, the time-consuming error in data processing and calculation, which is related to the complexity of the algorithm and the computing power of the computer, is generally at the millisecond level. The accumulation of the above errors makes the results of biological microscopy imaging processing inaccurate.

[0004] The existing error processing methods for intelligent biological microscopes are mainly the following: Method 1: After each system collects data, wait for the data to stabilize before performing calculations.

[0005] The drawback of method one is that each time data collection is performed, it is necessary to wait until the data from all three systems are stable, which greatly increases the time required for the function.

[0006] Method 2: Increase the data transmission speed of each module and send more data information in the same cycle.

[0007] The drawback of method 2 is that the computer needs to process more data at the same time, which requires better computing power and increases costs. Method 2 only improves the accuracy of data within a cycle by using more data, but the error caused by data transmission delay still exists.

[0008] Method 3: Collect data first and then perform correction calculations The drawback of method three is that it cannot perform real-time calculations, which wastes time in the control process and increases the algorithm time. Data correction in this case can cause problems, such as matching the data of a certain cycle of the imaging system with the data of the previous or next cycle of the control system.

[0009] The above three methods do not essentially eliminate the errors caused by data transmission. The errors in data transmission in intelligent biological microscopes are still large, and there is room for improvement. Summary of the Invention

[0010] In order to effectively eliminate the errors caused by data transmission delay in intelligent biological microscopes and reduce the system synchronization errors of various module systems in intelligent biological microscopes, the present application provides a method for correcting the data synchronization system errors of heterogeneous modules in biological microscope equipment.

[0011] In the first aspect, the invention objectives of this application are achieved by adopting the following technical solutions: A method for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope device comprises: Establishing a data synchronization base point in the target biological microscope equipment; Equipping multiple system modules in a target biological microscopy device with a clock module for providing time stamping and time calibration; Calculating the data transmission delay according to the obtained calculation calibration time instruction and the data synchronization base point, performing time base correction on the timestamp of each system module based on the data transmission delay, and associating the transmitted data stream with the real-time timestamp for data transmission; The acquired data of the plurality of system modules are time-aligned to achieve timing correction of heterogeneous data.

[0012] By adopting the above technical solution, a heterogeneous data transmission method suitable for intelligent microscope equipment is provided, the imaging system, mechanism control system and sensor system in the intelligent microscope equipment are modified by means of timing alignment, and a time module is added to multiple heterogeneous modules in the intelligent microscope equipment (each system may include several heterogeneous modules, such as the imaging system includes multiple different heterogeneous modules, the sensor system includes an X-axis motor, a Y-axis motor, a Z-axis motor, etc. arranged along the stage) to provide a high-precision timestamp and time calibration basis; specifically, in order to effectively eliminate the error caused by the data transmission delay in the intelligent biological microscope and reduce the system synchronization error of each module system in the intelligent biological microscope, in each data transmission cycle, first pass The computing processing unit (such as a computer) of the target biological microscope device issues a calculation calibration time instruction based on the set correction frequency, controls the biological microscope device to perform a time base correction operation, and after performing time calibration, multiple system modules in the intelligent microscope device that performs data transmission interaction transmit data packets with the most accurate and real-time timestamps to a designated location (i.e., the computing processing unit) to synchronize the timestamps of data from different system modules after the actual acquisition is completed, thereby correcting the errors caused by data transmission. Then, by modifying the data streams of each system to include timestamp information for subsequent computer timing alignment, the system synchronization errors of each module system in the intelligent biological microscope are reduced through data timing synchronization, thereby achieving high-precision real-time control.

[0013] In a preferred embodiment of the present application, the method of calculating the data transmission delay based on the obtained calculation calibration time instruction and the data synchronization base point, performing time base correction on the timestamp of each system module based on the data transmission delay, and associating the transmitted data stream with the real-time timestamp for data transmission specifically includes: Setting module time bases in the plurality of system modules, obtaining a plurality of calculation calibration time instructions sent by a preset calculation processing unit based on a set frequency, wherein the calculation calibration time instructions include calculation time base information; When the number of the calculation calibration time instructions reaches a preset number threshold, calculating the data transmission delay of each system module and obtaining the data transmission delay corresponding to the calculation time reference information; Based on the data transmission delay, respectively correcting the module time base of each system module to perform a time base correction operation; When transmitting data, each system module is associated and adds a real-time timestamp for data transmission.

[0014] By adopting the above technical solution, the module time base is the time base point of each system module. Based on the calculation calibration time instruction, all system modules are controlled to perform time calibration to reduce cumulative errors. In the same data transmission cycle, by obtaining the timestamps of a predetermined number of calculation calibration time instructions, the specific value of the data transmission delay existing in each system module itself is calculated. Then, the module time base of each system module is corrected to ensure that multiple different system modules can achieve high synchronization precision. That is, through the real-time time base correction operation, it is ensured that all system modules in the target biological microscope device (even heterogeneous system modules) can use the same time standard during data transmission, thereby improving data synchronization accuracy, effectively reducing the delay error caused by data transmission, and enhancing the timing consistency of the heterogeneous data of the biological microscope.

[0015] In a preferred example of the present application, within the same data collection cycle, when the data collected by the system modules changes irregularly according to the data collection time, the time alignment of the data obtained by the plurality of system modules to achieve timing correction of heterogeneous data specifically includes: Acquire data transmission intervals and data transmission cycles of a plurality of the system modules, and determine a system module for timing alignment; The middle interval time between the two preceding and following data packets of the system module for timing alignment is determined as the time division point, and based on the corresponding data transmission cycle, the data acquired from multiple system modules are time-aligned within the same data acquisition cycle to obtain a data set that matches the timing synchronization of the target biological microscope device.

[0016] By adopting the above technical solution, the data obtained from multiple system modules are time-aligned, which can achieve timing correction of heterogeneous data and ensure that all data can correctly reflect the sample status; a system module is selected as the timing alignment benchmark, and the middle interval time of the module's data packet is used as the dividing point, and the corresponding data transmission cycle is used as the benchmark to time-align all data within the same data acquisition cycle, ensuring that even in complex data acquisition environments, a data set with timing synchronization that matches the target biological microscope equipment can be obtained.

[0017] In a preferred example of the present application, when data collected by a certain system module changes according to a data collection time rule within the same data collection cycle, time alignment of the data obtained from multiple system modules to achieve timing correction of heterogeneous data further includes: Calculating the motion state information of the system module based on the current timestamp, and determining the current sampled image corresponding to the current timestamp; Obtain the sampled image information and image positioning position of the two frames before and after the current data acquisition cycle; Determine the image position information of the current timestamp by using data interpolation based on the motion state information, the sampled image information of the two frames before and after the current data acquisition period, and the image positioning position; Temporal alignment is performed based on the image position information at the current timestamp.

[0018] By adopting the above-mentioned technical solution, in the driving mechanism of the mechanism control system, such as the X-axis motor, Y-axis motor and Z-axis motor of the stage, since the motor speed curve is a trapezoidal curve, the motor speed changes regularly, and during certain precise operations, the motor is more on the rising edge of the speed and the speed is slow. In order to reduce the data processing error generated by the driving mechanism itself, this application adopts an interpolation method. For example, the motor speed is calculated based on the acceleration at the current moment. The interpolation method can provide a smoother and continuous data stream, further enhancing the accuracy of time alignment, and is particularly suitable for data processing under high-speed or high-resolution imaging conditions; finally, time alignment is performed based on the image position information of the current timestamp to ensure that the data of all modules can be correctly arranged on the time axis.

[0019] In a preferred example of the present application: the clock module provides a 13-bit timestamp, and the target biological microscope device includes an X-axis motor, a Y-axis motor and a Z-axis motor for driving the movement of the stage, and the driving shafts of the X-axis motor and the Y-axis motor are respectively telescopically arranged along the length and width directions of the stage, and the driving shaft of the Z-axis motor is telescopically arranged along the height direction of the stage.

[0020] By adopting the above technical solution, the 13-bit timestamp provided by the clock module has a higher time resolution, which can more finely distinguish data events occurring in a short period of time, and monitor the system delay errors of each module system with high precision, thereby realizing high-precision biological microscope observation and image acquisition operations; through the coordinated work of the X, Y, and Z three-axis motors, the sample can be positioned quickly and accurately, reducing the time required for manual adjustment, thereby improving the efficiency of the entire experimental process. At the same time, the high-precision timestamp ensures the temporal consistency of all actions and data records.

[0021] In a preferred embodiment of the present application, when using the target biological microscope to collect sample images, the method further includes: The three-axis motor of the biological microscope is driven by control instructions to move step by step between a predetermined starting position and an end position with a predetermined step length; At each moving position, an image of the sample is captured using an imaging device equipped with the biological microscope; For each captured image, an image processing algorithm is used to calculate the image clarity index; Based on each moving position and its corresponding clarity index storage, a position clarity sequence is generated; Analyzing the position clarity sequence and determining the position with the highest clarity index as the optimal focal length position; The three-axis motor of the microscope is controlled to move to the optimal focal length position to complete the automatic focusing process.

[0022] By adopting the above technical solution, the control instructions drive the three-axis motor of the biological microscope, which moves step by step between a predetermined starting position and an end position in a predetermined step size, so that the microscope can subsequently perform rapid automatic focusing. By adopting an image processing algorithm to calculate the image clarity index, the sample image quality is quantified, and the image clarity is accurately evaluated. The position clarity sequence generated by storing each moving position and its corresponding clarity index records the image clarity changes at different positions, providing a systematic reference for determining the optimal focal length position. The present application realizes a fully automated process from movement, image capture, clarity evaluation to final focusing, which reduces the user's operating burden and improves experimental efficiency.

[0023] In the second aspect, the invention objective of this application is achieved by adopting the following technical solutions: A system for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope is used to execute the method for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope as described above, the system comprising: A biological microscope device for collecting sample images, the biological microscope device comprising a plurality of system modules, the plurality of system modules being provided with a data synchronization base point and equipped with a clock module for providing a timestamp and time calibration; a computer configured to calculate a data transmission delay based on the obtained calculation calibration time instruction and the data synchronization base point, perform time base correction on the timestamp of each system module based on the data transmission delay, and associate the transmitted data stream with a real-time timestamp for data transmission; The acquired data of the plurality of system modules are time-aligned to achieve timing correction of heterogeneous data.

[0024] By adopting the above technical solutions, the data synchronization base point and clock module can significantly improve the data synchronization accuracy between different modules, so that all collected sample images and other related data can be accurately aligned in time; by time aligning the data of each system module, even in the presence of system errors, it can ensure that data from different sources can be correctly interpreted and analyzed within a unified time frame, greatly enhancing the compatibility and data processing capabilities of the computing processing unit; the computer calculates the data transmission delay based on the calculation calibration time instructions and the data synchronization base point, and corrects the timestamp of each module based on this, which not only helps to eliminate time deviations caused by network delays or hardware differences, but also optimizes the real-time performance of the entire system, allowing the biological microscope to respond to user operations more quickly and provide instant feedback. By time aligning the data obtained from multiple system modules, the timing correction of heterogeneous data is achieved, ensuring the consistency and traceability of all experimental data.

[0025] In a preferred example of the present application: the biological microscope device includes an aperture motor, an objective motor, a stage and a driving mechanism; the current magnification of the biological microscope is adjusted by the aperture motor and the objective motor, and the driving mechanism is used to drive the X-axis motor, Y-axis motor and Z-axis motor to move the stage, and the driving shafts of the X-axis motor and the Y-axis motor are respectively telescopically arranged along the length and width directions of the stage, and the driving shaft of the Z-axis motor is telescopically arranged along the height direction of the stage.

[0026] In summary, this application includes at least one of the following beneficial technical effects: 1. In order to effectively eliminate the errors caused by data transmission delays in intelligent biological microscopes and reduce the system synchronization errors of various module systems in the intelligent biological microscope, in each data transmission cycle, the calculation and calibration time instructions are first issued by the calculation processing unit (such as a computer) of the target biological microscope device based on the set correction frequency, controlling the biological microscope device to perform a time base correction operation. After the time calibration is performed, the multiple system modules in the intelligent microscope device that perform data transmission interaction transmit the data packets with the most accurate and real-time timestamps to the designated location (i.e., the calculation processing unit). After the actual acquisition is completed, the timestamps of the data of different system modules are synchronized to correct the errors caused by data transmission. Then, the data streams of each system are modified to include timestamp information for subsequent computer timing alignment. Through data timing synchronization, the system synchronization errors of various module systems in the intelligent biological microscope are reduced, and high-precision real-time control is achieved. 2. The data synchronization base point and clock module can significantly improve the data synchronization accuracy between different modules, so that all collected sample images and other related data can be accurately aligned in time; by time aligning the data of each system module, even in the presence of system errors, it can ensure that data from different sources can be correctly interpreted and analyzed within a unified time frame, greatly enhancing the compatibility and data processing capabilities of the computing processing unit; the computer calculates the data transmission delay based on the calculation calibration time instructions and the data synchronization base point, and corrects the timestamp of each module based on this, which not only helps to eliminate time deviations caused by network delays or hardware differences, but also optimizes the real-time performance of the entire system, allowing the biological microscope to respond to user operations more quickly and provide instant feedback. By time aligning the data obtained from multiple system modules, the timing correction of heterogeneous data is achieved, ensuring the consistency and traceability of all experimental data. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a flow chart of a method for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope in one embodiment of the present application; Figure 2 This is an example diagram of an application of a biological microscope device in a method for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope device according to an embodiment of the present application; Figure 3 1 is a schematic diagram of a biological microscope in a method for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope in one embodiment of the present application; Figure 4 This is another flow chart of a method for correcting system errors in data synchronization of heterogeneous modules in a biological microscope in one embodiment of the present application. DETAILED DESCRIPTION

[0028] The present application is further described in detail below with reference to the accompanying drawings.

[0029] In one embodiment, if Figure 1 As shown, the present application discloses a method for correcting the error of the heterogeneous module data synchronization system in a biological microscope, which specifically includes the following steps: S1: Establish a data synchronization base point in the target biological microscope device.

[0030] In this embodiment, if Figure 2 and Figure 3As shown, this is used in intelligent microscopy equipment. The equipment is mainly divided into three systems: the imaging system, the control system, and the sensor system. The imaging system is typically a digital camera or industrial camera, which primarily communicates with the computer via the UVC protocol and a USB interface. The control system typically uses a single-chip microcontroller (STM32) to control the motor driver (TMC5130), which primarily communicates with the computer via a serial port protocol. The sensor system typically uses a single-chip microcontroller to drive the sensor, which communicates with the computer via the CAN protocol and a USB interface. In this scenario, the sensor system and control system are integrated, using the same single-chip microcontroller to control the motor and collect sensor data. The CAN protocol and USB interface communicate with the computer to issue control commands and transmit sensor information.

[0031] like Figure 3 As shown, the control system includes an X-axis motor, a Y-axis motor and a Z-axis motor for driving the movement of the worktable. The driving shafts of the X-axis motor and the Y-axis motor are respectively telescopically set along the length and width directions of the worktable, and the driving shaft of the Z-axis motor is telescopically set along the height direction of the worktable.

[0032] Specifically, the data synchronization base point establishes a unified time reference for the entire intelligent biological microscope device, ensuring that all system modules can be understood and processed within the same time frame. This embodiment defines the imaging system as the default synchronization base point because image acquisition is usually the most critical operation.

[0033] S2: Equip multiple system modules in the target biological microscopy device with a clock module for providing time stamps and time calibration.

[0034] In this embodiment, a hardware-level clock module is installed for each system module (such as the imaging system, the control system, and the sensor system). This module can generate a high-precision timestamp and support periodic time calibration operations. The timestamp of this application is 13 bits.

[0035] Specifically, each module has a built-in precise real-time clock (RTC), whose output can be embedded in the data packet. The computer periodically sends calculation and calibration time instructions to keep each system module synchronized with the clock source. In the part where the hardware module cannot be modified, the computer adds a timestamp to the data after collecting it, and corrects the timestamp back to the timestamp when the data was sent based on the transmission delay obtained from the test.

[0036] S3: Calculate the data transmission delay based on the obtained calculation calibration time instruction and data synchronization base point, perform time base correction on the timestamp of each system module based on the data transmission delay, and associate the transmitted data stream with the real-time timestamp for data transmission.

[0037] In this embodiment, in order to compensate for the inevitable delay in data transmission and ensure that the received data can reflect the status at the actual time of occurrence, this application eliminates the impact of transmission delay by measuring and recording the transmission delay and then adjusting the timestamp.

[0038] Specifically, the data transmission time from each module to the computer is measured and recorded. Based on the measured transmission delay, the timestamp in the data packet sent by each module is adjusted; before data transmission, each data packet is ensured to be attached with a corrected timestamp.

[0039] S4: Time-align the data obtained from multiple system modules to achieve timing correction of heterogeneous data.

[0040] In this embodiment, data from different system modules are aligned according to their timestamps, even if the data from different sources are not generated at the same time.

[0041] Specifically, the data from the imaging system are selected as a reference. If the data timestamps of other modules do not match those of the imaging system, an interpolation algorithm is used to estimate the intermediate states, and all data are reordered according to the adjusted timestamps to ensure that they reflect the correct time order.

[0042] In one embodiment, in step S3, the data transmission delay is calculated based on the obtained calculation calibration time instruction and the data synchronization base point, the time base correction is performed on the timestamp of each system module based on the data transmission delay, and the transmitted data stream is associated with the real-time timestamp for data transmission, which specifically includes: S31: Setting module time bases in multiple system modules, obtaining multiple calculation calibration time instructions sent by a preset calculation processing unit based on a set frequency, where the calculation calibration time instructions include calculation time base information.

[0043] In this embodiment, the preset computing processing unit is a computer; each system module is configured with a high-precision clock as the local time base of the heterogeneous system module. Then, the computer broadcasts a calculation calibration time instruction to all system modules at a set frequency (e.g., once per second). The calibration instruction includes a global timestamp, which serves as the standard for all modules to adjust their own time bases. After receiving the calibration instruction, the module records the current local time and the received global timestamp, ensuring that each module has a stable and traceable time source, reducing errors caused by time drift between different modules.

[0044] S32: When the number of calculation calibration time instructions reaches a preset number threshold, the data transmission delay of each system module is calculated, and the data transmission delay corresponding to the calculation time reference information is obtained.

[0045] In this embodiment, the preset number threshold is 10 times, which can be defined by the user.

[0046] Specifically, each time a calibration instruction is received, the time difference between the time the instruction is issued and the time it arrives at each system module is recorded. When the preset number threshold is reached, the time difference of each system module is averaged to obtain the average transmission delay corresponding to each system module. The calculated average transmission delay is then associated with the corresponding global timestamp.

[0047] S33: Based on the data transmission delay, the module time base of each system module is corrected respectively to implement a time base correction operation.

[0048] In this embodiment, for each system module, the transmission delay calculated in the previous step is used to correct its local time base. If the transmission delay of a system module is a positive number, the time of the system module is adjusted forward; if it is a negative number, it is adjusted backward, to ensure that all system modules undergo the same correction process to maintain overall time consistency. This process ensures that even if there is a transmission delay, the time between system modules can remain highly consistent, which is conducive to eliminating time differences caused by network transmission and ensuring the synchronization of the time bases of all modules.

[0049] S34: When transmitting data, each system module associates and adds a real-time timestamp for data transmission.

[0050] In this embodiment, during the actual data transmission process, each module will add a corrected timestamp to the data packet it generates.

[0051] Specifically, each system module embeds the latest corrected timestamp in the data packet it generates. The data packet structure needs to be adjusted appropriately. For example, in an imaging system, a 13-bit timestamp is assigned to a pixel in the captured video frame and sent to the computer. When parsing the image, the computer can obtain the timestamp by reading this pixel. This allows the timestamp data to be appended without changing the original protocol. Other systems, such as control systems and sensor systems, generally use self-developed protocols rather than universal protocols, so they only need to add the timestamp information to the end of the data frame to accommodate the additional timestamp information. When the receiving end (such as a computer) parses the data packet, it first reads the timestamp and then processes the data based on it.

[0052] In one embodiment, when data collected by system modules changes irregularly according to data collection time within the same data collection cycle, in step S4, time alignment is performed on the data obtained from multiple system modules to achieve timing correction of heterogeneous data, specifically including: S41: Acquire data transmission intervals and data transmission cycles of multiple system modules, and determine a system module for timing alignment.

[0053] Specifically, the data transmission interval is the time difference between two consecutive data packets; the data transmission period is the time from data acquisition to transmission completion. The data transmission frequency and transmission time information of each system module is collected to select the most suitable module as the timing alignment benchmark. Typically, the module with the most stable or important data transmission interval (such as the imaging system) is selected as the reference.

[0054] S42: The middle interval between the two data packets of the system module to be time-aligned is used as the time division point, and the corresponding data transmission period is used as the benchmark. Within the same data acquisition period, the data of multiple system modules acquired are time-aligned to obtain a data set that matches the timing synchronization of the target biological microscope device.

[0055] In this embodiment, data alignment between different modules is achieved by defining time segmentation points to create a unified time frame so that data from different modules can be correctly interpreted at the same time point, even if the data acquisition time of different system modules varies irregularly and the data transmission period is different.

[0056] Specifically, for the selected benchmark module, the middle time point between the two data packets before and after it is calculated as the time division point, and this time division point will be used as the reference point for data alignment of other modules; the data transmission period of the benchmark module is used as the standard to adjust the data of other modules; if the data acquisition time of other modules does not match the time division point of the benchmark module, the data of the corresponding time point is calculated by interpolation based on the data transmission period of the module; within the same data acquisition period, the data of all modules are aligned according to the above-mentioned time division point and transmission period, and finally a time-aligned data set containing the data of all modules is output.

[0057] In one embodiment, when data collected by a certain system module changes according to a data collection time rule within the same data collection cycle, time alignment is performed on the data obtained from multiple system modules to achieve timing correction of heterogeneous data. Step S4 further includes: S401: Calculate the motion state information of the system module based on the current timestamp, and determine the current sampling image corresponding to the current timestamp.

[0058] In this embodiment, this step uses the current timestamp to evaluate the motion state of the system module (such as the microscope stage, the three-axis motor or the lens) at a specific moment, and determines the corresponding sample image accordingly; Specifically, the specific moment information is extracted from the timestamp; combined with the data provided by the motion sensor or other position feedback device, the motion state of the system module at that moment (such as displacement, velocity, acceleration, etc.) is calculated; based on the calculated motion state information, the sampling image corresponding to the current timestamp is determined, thereby ensuring that the sampling image matches the actual motion state and improving the accuracy of image positioning.

[0059] S402: Acquire the sampled image information and image positioning positions of the two frames before and after the current data acquisition cycle.

[0060] Specifically, the captured video frames are frame-processed to obtain multiple consecutive frames of sampled images, and the sampled image information includes the sampled image and the corresponding timestamp; the image positioning position refers to the image coordinate position of the captured image at different capture positions based on the same sample image in the same plane rectangular coordinate system.

[0061] S403: Determine the image position information of the current timestamp by using data interpolation based on the motion state information, the sampled image information of the two frames before and after the current data acquisition period, and the image positioning position.

[0062] In this embodiment, an interpolation algorithm is used to estimate the exact position of the image at the current timestamp based on two consecutive known image frames and motion state information; the interpolation algorithm includes a linear interpolation algorithm.

[0063] S404: Perform time alignment based on the image position information of the current timestamp.

[0064] In this embodiment, the data of all modules are adjusted so that their timestamps match the estimated image position information, ensuring that the positions of all data on the time axis are accurate and forming a consistent time series.

[0065] In one embodiment, if Figure 4 As shown, when using the target biological microscope to collect sample images, the method for correcting the data synchronization system error of the heterogeneous modules in the biological microscope also includes: S10: driving the three-axis motor of the biological microscope through control instructions to move step by step between a predetermined starting position and an end position with a predetermined step length.

[0066] In this embodiment, referring to Figure 2 , the driving direction of the three-axis motor drive shaft is as follows Figure 2 shown.

[0067] Specifically, write control instructions, define the starting position, end position and step size parameters; use a microcontroller (such as STM32) to control the motor driver (such as TMC5130) to perform movement.

[0068] S20: At each moving position, an image of the sample is captured using an imaging device equipped with the biological microscope.

[0069] Specifically, the imaging device moves along a preset moving path, and at each preset moving position, an imaging device (such as a digital camera or an industrial camera) is used to capture sample images, so as to complete image acquisition of the same sample at different positions in high-magnification image acquisition, thereby meeting subsequent image stitching requirements.

[0070] S30: For each captured image, an image processing algorithm is used to calculate a clarity index of the image.

[0071] Specifically, clarity indicators include image edge sharpness and image contrast. Edge detection algorithms (such as the Sobel operator) are used to extract image edge information. The grayscale variance or frequency domain energy of the image is calculated as a clarity indicator. The calculation results are stored and associated with a timestamp for subsequent analysis.

[0072] S40: Generating a position clarity sequence based on each moving position and its corresponding clarity index storage.

[0073] Specifically, create a data structure (such as a list or array) to record each move position and the corresponding clarity value, ensuring that the data is arranged in the order of move.

[0074] S50: Analyze the position clarity sequence and determine the position with the highest clarity index as the optimal focal length position.

[0075] Specifically, traverse the position clarity sequence and find the position with the largest clarity value. If there are multiple peaks, select the one closest to the center position and record the relevant parameters of the optimal focal length position (such as XYZ coordinates).

[0076] S60: Control the three-axis motor of the microscope to move to the optimal focal length position to complete the automatic focusing process.

[0077] Specifically, control instructions are sent to the motor driver to enable it to move quickly and smoothly to the optimal focal length position. After reaching the target position, the driver waits for the motor to completely stop and stabilize, and then takes a confirmation image to verify the focusing effect. By analyzing the clarity sequence, the optimal focal length position is accurately found, thereby improving the success rate of autofocus.

[0078] It should be understood that the serial numbers of the steps in the above embodiments do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0079] In one embodiment, a system for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope is provided. The system for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope corresponds to the method for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope in the above embodiment.

[0080] A system for correcting data synchronization errors in heterogeneous modules in a biological microscope, including a biological microscope and a computer. A detailed description of each functional module is as follows: A biological microscope device for collecting sample images, the biological microscope device comprising a plurality of system modules, the plurality of system modules being provided with a data synchronization base point and equipped with a clock module for providing a timestamp and time calibration; A computer, configured to calculate a data transmission delay based on the obtained calculation calibration time instruction and the data synchronization base point, perform time base correction on the timestamp of each system module based on the data transmission delay, and associate the transmitted data stream with the real-time timestamp for data transmission; The acquired data of multiple system modules are time-aligned to achieve timing correction of heterogeneous data.

[0081] Optionally, the biological microscope device includes an aperture motor, an objective motor, a stage and a driving mechanism; the current magnification of the biological microscope is adjusted by the aperture motor and the objective motor, and the driving mechanism is used to drive the X-axis motor, Y-axis motor and Z-axis motor to move the stage, and the driving shafts of the X-axis motor and the Y-axis motor are respectively telescopically arranged along the length and width directions of the stage, and the driving shaft of the Z-axis motor is telescopically arranged along the height direction of the stage.

[0082] Regarding the specific definition of the system for correcting errors in the data synchronization system of heterogeneous modules in a biological microscope device, please refer to the definition of the method for correcting errors in the data synchronization system of heterogeneous modules in a biological microscope device above, and will not be repeated here; each module in the above-mentioned system for correcting errors in the data synchronization system of heterogeneous modules in a biological microscope device can be implemented in whole or in part by software, hardware, and a combination thereof; each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0083] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0084] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for correcting errors in a data synchronization system of heterogeneous modules in a biological microscope, characterized in that: include: Establishing a data synchronization base point in the target biological microscope equipment; Equipping multiple system modules in a target biological microscopy device with a clock module for providing time stamping and time calibration; Calculating the data transmission delay according to the obtained calculation calibration time instruction and the data synchronization base point, performing time base correction on the timestamp of each system module based on the data transmission delay, and associating the transmitted data stream with the real-time timestamp for data transmission; The acquired data of the plurality of system modules are time-aligned to achieve timing correction of heterogeneous data.

2. The method for correcting the data synchronization system error of heterogeneous modules in a biological microscope according to claim 1, characterized in that: The step of calculating the data transmission delay based on the obtained calculation calibration time instruction and the data synchronization base point, performing time base correction on the timestamp of each system module based on the data transmission delay, and associating the transmitted data stream with the real-time timestamp for data transmission specifically includes: Setting module time bases in the plurality of system modules, obtaining a plurality of calculation calibration time instructions sent by a preset calculation processing unit based on a set frequency, wherein the calculation calibration time instructions include calculation time base information; When the number of the calculation calibration time instructions reaches a preset number threshold, calculating the data transmission delay of each system module and obtaining the data transmission delay corresponding to the calculation time reference information; Based on the data transmission delay, respectively correcting the module time base of each system module to perform a time base correction operation; When transmitting data, each system module is associated and adds a real-time timestamp for data transmission.

3. The method for correcting the system error of heterogeneous module data synchronization in a biological microscope according to claim 1, characterized in that: In the same data collection cycle, when the data collected by the system modules changes irregularly according to the data collection time, the time alignment of the data obtained by the plurality of system modules to achieve timing correction of heterogeneous data specifically includes: Acquire data transmission intervals and data transmission cycles of a plurality of the system modules, and determine a system module for timing alignment; The middle interval time between the two preceding and following data packets of the system module for timing alignment is determined as the time division point, and based on the corresponding data transmission cycle, the data acquired from multiple system modules are time-aligned within the same data acquisition cycle to obtain a data set that matches the timing synchronization of the target biological microscope device.

4. The method for correcting the system error of heterogeneous module data synchronization in a biological microscope according to claim 3, characterized in that: In the same data collection cycle, when the data collected by a certain system module changes according to the data collection time rule, the time alignment of the data obtained by multiple system modules to achieve timing correction of heterogeneous data also includes: Calculating the motion state information of the system module based on the current timestamp, and determining the current sampled image corresponding to the current timestamp; Obtain the sampled image information and image positioning position of the two frames before and after the current data acquisition cycle; Determine the image position information of the current timestamp by using data interpolation based on the motion state information, the sampled image information of the two frames before and after the current data acquisition period, and the image positioning position; Temporal alignment is performed based on the image position information at the current timestamp.

5. The method for correcting the system error of heterogeneous module data synchronization in a biological microscope according to claim 1, characterized in that: The clock module provides a 13-bit timestamp. The target biological microscope device includes an X-axis motor, a Y-axis motor, and a Z-axis motor for driving the movement of the stage. The driving shafts of the X-axis motor and the Y-axis motor are respectively telescopically arranged along the length and width directions of the stage, and the driving shaft of the Z-axis motor is telescopically arranged along the height direction of the stage.

6. The method for correcting the system error of heterogeneous module data synchronization in a biological microscope according to claim 1, characterized in that: When using the target biological microscopy device to collect sample images, the method further includes: The three-axis motor of the biological microscope is driven by control instructions to move step by step between a predetermined starting position and an end position with a predetermined step length; At each moving position, an image of the sample is captured using an imaging device equipped with the biological microscope; For each captured image, an image processing algorithm is used to calculate the image clarity index; Based on each moving position and its corresponding clarity index storage, a position clarity sequence is generated; Analyzing the position clarity sequence and determining the position with the highest clarity index as the optimal focal length position; The three-axis motor of the microscope is controlled to move to the optimal focal length position to complete the automatic focusing process.

7. A system for correcting errors in the data synchronization system of heterogeneous modules in a biological microscope, characterized in that: A method for correcting a data synchronization system error of heterogeneous modules in a biological microscope according to any one of claims 1 to 6, the system comprising: A biological microscope device for collecting sample images, the biological microscope device comprising a plurality of system modules, the plurality of system modules being provided with a data synchronization base point and equipped with a clock module for providing a timestamp and time calibration; a computer configured to calculate a data transmission delay based on the obtained calculation calibration time instruction and the data synchronization base point, perform time base correction on the timestamp of each system module based on the data transmission delay, and associate the transmitted data stream with a real-time timestamp for data transmission; The acquired data of the plurality of system modules are time-aligned to achieve timing correction of heterogeneous data.

8. The system for correcting data synchronization errors of heterogeneous modules in a biological microscope according to claim 7, characterized in that: The biological microscope device includes an aperture motor, an objective lens motor, a stage and a driving mechanism; the current magnification of the biological microscope is adjusted by the aperture motor and the objective lens motor, and the driving mechanism is used to drive the X-axis motor, Y-axis motor and Z-axis motor to move the stage. The driving shafts of the X-axis motor and the Y-axis motor are respectively telescopically arranged along the length and width directions of the stage, and the driving shaft of the Z-axis motor is telescopically arranged along the height direction of the stage.