AI microscope use process and system control method
By using the motorized stage, autofocus, and multi-light source imaging of the AI microscope system, combined with the spiral scanning path and adaptive sharpness evaluation, the problems of inaccurate positioning, inaccurate focusing, and cumbersome adjustment of light source parameters in traditional microscope operation are solved, realizing efficient, safe, fully automated and intelligent microscope operation.
Patent Information
- Application Number
- CN202611446078.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-20
AI Technical Summary
Traditional microscope operation relies on human experience, which leads to inaccurate positioning, inaccurate focusing, cumbersome adjustment of light source parameters, low degree of automation, and insufficient safety protection, affecting detection efficiency and result consistency.
Employing an AI microscope system, the entire process is automated and intelligently controlled through a motorized stage, autofocus, multi-source imaging, and safety protection mechanisms, combined with a spiral scanning path and adaptive sharpness evaluation.
It improves focusing accuracy and imaging quality, ensures ease of operation and consistency of results, reduces the risk of equipment damage, and meets the high timeliness requirements of clinical testing.
Smart Images

Figure CN123136876A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control and image acquisition technology for microscopes, and in particular to an AI microscope usage process and system control method. Background Technology
[0002] In traditional optical microscope operation, the operator needs to manually place the slide on the stage, select the magnification by rotating the objective dial, and then manually adjust the coarse and fine focus knobs to achieve a clear image of the sample. The image is then observed through the eyepiece or photographed using an external camera. This entire process is highly dependent on the operator's experience and skill, and presents several prominent problems: First, the movement of the stage in traditional microscopes relies entirely on manually rotating a screw or knob to achieve displacement in the forward, backward, left, and right directions. The distance of each movement cannot be precisely quantified, and operators can only estimate the range of movement by visual estimation. When it is necessary to repeatedly locate multiple target areas on the same slide, this method often results in the loss of the target due to manual errors, necessitating a re-search for the target area and greatly reducing detection efficiency.
[0003] Secondly, the focusing process of traditional microscopes relies entirely on manual judgment. Operators observe the sharpness of the sample image through the eyepiece and rotate the fine-tuning knob to achieve their subjectively optimal sharpness. However, different operators have significantly different visual sensitivities and judgment standards, meaning the same specimen may produce photographs with completely different levels of sharpness under different operators' conditions. More importantly, there is a long-neglected problem in microscope imaging: when the microscope's optical axis is not on the same vertical line as the object being measured—that is, when the object is off-center—traditional center-focusing methods mistakenly treat the reflective plane of the coverslip or slide surface as the optimal focusing plane, resulting in the actual sample layer being out of focus. This problem is particularly prominent in the field of microbial detection because microorganisms such as fungal hyphae and trichomonas are often unevenly distributed, making it difficult to guarantee that they are always centered in the field of view.
[0004] Third, traditional microscopes require operators to manually change filters or adjust light source brightness when photographing different types of microbial samples. For example, observing three common clinical microbial specimens—Candida, Trichomonas, and Aspergillus—each requires different lighting conditions to obtain images with good contrast. Candida requires strong transmitted light to highlight its spores and pseudohyphae, Trichomonas requires moderate brightness and a specific color temperature to reveal its flagella and motility, and Aspergillus requires high brightness combined with short-wavelength light to highlight its conidiophores and vesicles. Operators need to manually adjust the light source parameters before each image capture, which is not only cumbersome but also makes it difficult to guarantee parameter consistency, directly affecting the input quality of subsequent AI image recognition algorithms.
[0005] Fourth, traditional microscopes lack automated photo-taking and uploading processes. After taking photos, operators need to manually remove the memory card, import the photos into the computer using a card reader, and then upload them to the AI analysis server via the network. This process is not only time-consuming and labor-intensive, but also prone to human error in the fast-paced environment of clinical testing, leading to missed photos or incorrect numbering, which seriously affects the timeliness of test reports.
[0006] Fifth, traditional microscope stages lack any movement limits or collision protection mechanisms. When operators manually move the stage, excessive force or incorrect directional judgment may cause the stage to collide with the mechanical limiting structure of the microscope body, resulting in minor damage such as broken slides or, in severe cases, damage to the precision lead screw drive mechanism, leading to high repair costs.
[0007] Sixth, some existing so-called automated microscopes, although incorporating motorized stages and autofocus functions, typically employ a simple unidirectional Z-axis scan strategy, searching for the optimal sharpness plane layer by layer from bottom to top or front to back. This method has two fatal flaws: first, when a coverslip reflective surface exists above the sample layer, the algorithm may incorrectly lock the coverslip plane as the optimal focus position, causing the sample layer to become out of focus; second, unidirectional scanning cannot determine whether the currently found sharpness peak is a local extremum or a global extremum, easily leading to erroneous focusing results.
[0008] In view of the various shortcomings of the existing technologies, there is an urgent need in this field for a new AI microscope usage process and system control method that can achieve full automation and intelligence in all aspects, including power-on initialization, manual positioning, autofocus, multi-light source photography, parameter configuration, and safety protection, while ensuring ease of operation and consistency of results. Summary of the Invention
[0009] In view of this, the present invention provides an AI microscope usage process and system control method to solve or alleviate one of the technical problems existing in the prior art, and at least provides a beneficial option.
[0010] The technical solution of this invention is implemented as follows: an AI microscope usage process and system control method, comprising the following steps: S1: System power-on initialization; The host computer and the slave computer establish a communication connection, and the slave computer drives the electric stage to move to the preset origin position and displays a power-on interface on the touch screen to guide the user to place the sample; S2: The system detects the installation status of the slide. When the slide is detected to be in place, the stage is automatically fine-tuned to the preset starting focus area, and the system enters manual control mode. S3: In manual mode, in response to the user's direction control command, the lower computer drives the stage to perform multi-axis displacement according to a preset step size; in response to the user's shooting command, the camera captures images and generates preview data, and the system supports uploading the captured images to a preset AI server; S4: In automatic mode, the system scans layer by layer according to the user-marked area to be tested using a preset planar scanning path; within each field of view, the system controls the stage to perform bidirectional search in the Z-axis direction to lock the focal plane, and matches the light source parameters according to the preset microbial feature library to complete the imaging. S5: The host computer and the slave computer use a custom binary communication protocol for data interaction. The protocol encapsulates motion control commands and light source control commands in the same data frame for transmission. The slave computer has independent motion trajectory analysis and execution capabilities and feeds back the execution status to the host computer.
[0011] A further preferred embodiment includes a safety protection mechanism for the movement range of the platform, the mechanism specifically including: Using the origin of the stage after initialization as a reference, preset the maximum allowable displacement thresholds for the positive / negative X-axis, positive / negative Y-axis, and positive / negative Z-axis; The system calculates the current displacement of the stage relative to the origin on each axis in real time. When it receives a direction control command input by the user, it predicts whether the displacement of the stage on that axis after the command is executed will exceed the maximum allowable displacement threshold of the corresponding axis. If it is predicted that the threshold will be exceeded, the system triggers over-limit protection: suspends subsequent movement in that axis direction and outputs an over-limit prompt to the user. Direction control commands for non-over-limit axes can still be responded to normally. When a control command is received from the user in the opposite direction of the over-limit axis and the stage exits the over-limit state, the over-limit warning is automatically canceled and the motion control authority of that axis is restored.
[0012] Further optimizations include the scanning and focusing process in automatic mode: The user switches to automatic mode and triggers the marking operation. After adjusting the sample to be tested to the center of the field of view through directional control, the system records the X and Y coordinates of the confirmed point as the origin of the scanning center. The system starts from the origin of the scanning center and scans outward layer by layer according to a preset spiral expansion path. The spiral expansion path satisfies the following: the scanning trajectory of the Nth layer forms a closed loop, containing K field positions, and the value of K increases with the increase of the number of layers N to traverse all field positions to be tested. The scanning direction is clockwise or counterclockwise. After the stage reaches each field of view position, the system controls the stage to perform bidirectional scanning in the Z-axis direction with the current position as the reference, acquire multiple frames of images, and use the improved adaptive Laplacian sharpness evaluation function to calculate the sharpness score of each frame of image. The system determines the optimal focus plane based on the sharpness score: If only a single sharpness peak is detected, the Z-axis position corresponding to that peak is locked as the focus reference plane; If two sharpness peaks are detected, the Z-axis positions corresponding to the two peaks are compared, and the plane corresponding to the peak away from the objective lens is locked as the focus reference plane of the sample layer. If three or more sharpness peaks are detected, the plane corresponding to the lower of the two peaks furthest from the objective lens is selected as the focusing reference plane for the sample layer.
[0013] More preferably, after locking the focusing reference plane of the sample layer, the system executes a multi-parameter illumination imaging process, specifically including: The system calls the preset lighting configuration table and switches between at least two sets of preset lighting parameters in sequence. Each set of lighting parameters is independently configured with light source type, brightness level, color temperature and exposure time to adapt to the staining characteristics and morphological detection needs of different microbial samples. Under each set of illumination parameters, the system uses the locked sample layer focusing reference plane as a reference, performs macro scanning in the Z-axis direction according to the preset fine-tuning range and step size, acquires multiple macro images, and selects the frame with the highest sharpness score as the effective imaging frame under that set of illumination parameters. After all lighting parameter groups have been switched and imaging is complete, the system will package the multiple valid imaging frames obtained into a sample image dataset and store it in the memory card according to the preset naming rules.
[0014] Further preferred options include image storage and upload management processes, specifically including: The system automatically writes the photo set captured in each field of view to the memory card without requiring user confirmation; the photo set is a collection of multiple imaging frames captured under different lighting parameters in the same field of view. The system uses a circular storage mechanism to manage memory card space: preset maximum storage group number threshold and remaining space threshold. When the number of photo groups to be written will cause the total number of stored photo groups to exceed the maximum storage group number threshold, the earliest created photo group will be automatically deleted; if the remaining space of the memory card is lower than the remaining space threshold, the earliest photo group will be deleted first to free up space before writing is performed. The system adds the completed photo group to the upload queue and automatically uploads it in batches to the AI server preset in claim 1 when the WiFi connection is normal; after the current batch is uploaded, the system outputs a status prompt message.
[0015] More preferably, the parameter setting interface provides configuration functions for system operating parameters, which include: Wireless communication parameters include WiFi network identifier, security key and server address configuration items. The server address configuration item supports inputting IPv4 address and port number, and integrates connection test function. Device identification parameters, including physical address information used to uniquely identify the device; Motion control parameters include the single-step movement distance of the stage, the maximum travel threshold for each axis in the positive and negative directions, and the motion speed level for each axis. Imaging control parameters include at least two preset lighting parameter groups. Each lighting parameter group is independently configured with light source brightness, color temperature and exposure time to adapt to the detection needs of different microbial samples, and reserves an expansion interface to support parameter configuration for new detection scenarios.
[0016] Further preferred options include a mobile-based parameter-assisted configuration process, specifically including: The mobile configuration application automatically detects AI microscope devices within the same local area network via a local area network discovery protocol and generates a device list containing device identification information, which includes the last four digits of the device's physical address. Users select a target wireless access point and enter a security key through a mobile application, triggering a configuration synchronization command. The command contains the connection credentials of the target wireless access point. In response to the configuration synchronization command, the microscope updates its wireless communication parameters and attempts to reconnect to the network, then sends the connection result back to the mobile application for display.
[0017] More preferably, the specific method for the Z-axis bidirectional scanning and sharpness evaluation is as follows: Using the current Z-axis position of the stage as the reference midpoint, at least one frame of image is acquired upwards according to a preset first offset, and at least one frame of image is acquired downwards according to a preset second offset, forming a Z-axis scanning sequence containing multiple frames of images; the Z-axis position spacing between two adjacent frames of images is a preset fixed step size; For each frame of the Z-axis scanning sequence, an improved adaptive Laplacian sharpness evaluation function is used: the image is subjected to a 3×3 Laplacian convolution kernel operation, the sum of the absolute values of the convolution results is calculated, and the sum is used as the sharpness score of the frame image to quantify the image sharpness.
[0018] More preferably, the system includes: The host computer integrates a central processing unit, memory, storage interface and wireless communication unit. It is configured to run control logic and realize human-computer interaction, control command generation, image data processing, AI server communication, parameter configuration management and mobile terminal configuration collaboration. The lower-level machine is a driver board with an integrated independent microcontroller. It communicates with the upper-level machine via a serial port and is configured to receive control commands from the upper-level machine, independently parse and execute the motion trajectory planning, three-axis limit protection and motion feedback of the electric stage, and support the execution of spiral scanning and Z-axis bidirectional focusing. The image acquisition module communicates with the host computer and is configured to output a real-time preview stream and full-resolution still images. The acquired image data is uploaded to the host computer for sharpness evaluation. The light source module contains at least two independently controllable light source types and is configured to respond to control commands from the host computer to switch light source types, brightness, color temperature, and exposure time. It supports multiple sets of lighting parameters for alternating imaging and AI recognition results for linked dimming. The electric stage is configured to achieve precise displacement in three degrees of freedom (X-axis, Y-axis, and Z-axis) under the control of the lower-level computer. The displacement accuracy is guaranteed by the trajectory planning logic of the lower-level computer. The touch display module is connected to the host computer and is configured to display the camera's captured images, parameter configuration interface, system status prompts and over-limit alarm information, and receive user touch operation commands. The storage module is a non-volatile storage medium configured to store captured image datasets, system configuration parameters, and upload logs, and supports a circular overwrite storage mechanism. The power management module, which is electrically connected to each module, is configured to provide a stable operating voltage and has overvoltage protection and undervoltage lockout functions.
[0019] The embodiments of the present invention have the following advantages due to the adoption of the above technical solutions: 1. Significantly Improved Focusing Accuracy: This invention employs a spiral-expanding scanning path, covering the area layer by layer outwards from the center of the marked test area as the scanning origin. A bidirectional Z-axis search is performed at each field of view location, and a score for each focal plane is calculated using an improved adaptive Laplacian sharpness evaluation function. Differential judgment logic is set for multi-peak scenarios: if only a single peak exists, the plane is directly locked; if two peaks exist, the plane corresponding to the peak furthest from the objective lens is selected; if three or more peaks exist, the plane with the lower position among the two peaks furthest from the objective lens is selected as the focusing reference for the sample layer. This scheme can effectively distinguish the sharpness peaks of the coverslip reflective surface and the sample layer, solving the focusing error problem when the object being tested is off-center from the field of view.
[0020] 2. High Image Quality Consistency: After locking the focus reference plane of the sample layer, the system sequentially switches between multiple independently configured illumination parameters (covering light source type, brightness, color temperature, and exposure time). Under each set of parameters, Z-axis macro scanning is performed with the focus reference plane as the reference. The frame with the highest sharpness is selected as the effective imaging frame of that set. Finally, multiple sets of images from the same field of view are packaged into an image dataset for storage and uploading. This design ensures that each photo is obtained under optimal focus and lighting conditions, providing highly consistent and high-resolution input data for AI recognition algorithms.
[0021] 3. Robust Protection Mechanism: The system uses the stage's initialization origin as a reference and presets maximum allowable displacement thresholds in the X, Y, and Z axes. In manual mode, when the user triggers a directional control command, the system predicts in real time whether the moved position exceeds the threshold. If it is about to exceed the limit, the system pauses movement along that axis and outputs an over-limit warning. Control is only restored when the user moves the stage in the opposite direction to exit the over-limit state. This mechanism effectively avoids safety risks such as the stage colliding with mechanical limit structures and the glass slide breaking, reducing equipment maintenance costs.
[0022] 4. Optimized Storage Management Logic: The system employs a cyclic overwrite storage mechanism. When the number of stored image groups reaches the preset maximum storage group threshold, or when the remaining space on the storage card falls below the preset threshold, the earliest created image group is automatically deleted, ensuring that the storage card always retains the latest detection data. This solution avoids system downtime caused by storage overflow, guarantees that the latest detection data is always available, and meets the high timeliness requirements of clinical testing scenarios.
[0023] 5. Flexible and efficient parameter configuration: The system provides a local parameter configuration interface, supporting custom adjustments to WiFi parameters, AI server address, stage motion parameters, and multiple sets of illumination parameters. It also supports mobile-assisted configuration: the mobile device automatically identifies the device via a local area network discovery protocol. After the user completes the configuration, the parameters are sent to the microscope via synchronization commands, eliminating the need for local touchscreen input. This solution solves the problems of cumbersome parameter configuration and the difficulty of deploying multiple devices in batches using traditional microscopes.
[0024] 6. Stable operation of dual-control architecture: The dual-control architecture design of the host computer and the slave computer allows the slave computer to independently receive motion and lighting commands from the host computer, and independently complete trajectory planning, motor drive and status feedback. This avoids motion lag caused by excessive load on the host computer and ensures the detection efficiency of the equipment under long-term automatic operation.
[0025] The above overview is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the invention will become readily apparent from the accompanying drawings and the following detailed description. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart illustrating the overall operation interface of the AI microscope of the present invention. Figure 2 This is a schematic diagram of the power-on interface and manual mode interface of the present invention; Figure 3 This is a schematic diagram of the automatic mode interface of the present invention; Figure 4 This is a schematic diagram of the parameter setting interface of the present invention; Figure 5 This is a schematic diagram of the detailed parameter list for the parameter setting interface of the present invention. Detailed Implementation
[0028] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0029] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0030] Example 1: Manual Assisted Positioning and Photo Upload Process in Manual Mode
[0031] This embodiment is a preferred implementation of the present invention, which describes in detail the complete process of the user completing the initialization of the platform, manual positioning, taking pictures and uploading in manual mode, as well as the collaborative response logic of the host computer and the slave computer, corresponding to the core features of claims 1, 2 and 5.
[0032] Step S101: System power-on initialization
[0033] When the user presses the power switch on the microscope base, the host computer (integrated into the motherboard's core processor) and the slave computer (equipped with an independent microcontroller driver board) are simultaneously powered on. After completing its self-test, the host computer sends a command to the slave computer to return the stage to its origin. Upon receiving the command, the slave computer independently drives the stage to lift it upwards along the Z-axis and move it along the X and Y axes to the preset origin position—this origin position has been calibrated to ensure that the slide holder is fully exposed, facilitating the user's placement of slides. After the origin calibration is complete, the slave computer sends a calibration success signal back to the host computer via an 8-byte big-endian binary frame (conforming to the communication protocol of claim 1, including a command field and an axis identifier field).
[0034] This embodiment uses the brand logo in the center of the screen and the text prompt below as power-on status feedback. Alternatively, LED indicator lights, voice prompts, or other alternative solutions can also be used. This embodiment is only a preferred implementation.
[0035] Step S102: Background initialization and boot screen display
[0036] After receiving the origin calibration success signal from the slave device, the host computer silently performs three types of initialization operations in the background: ① Camera module initialization (configuring resolution, frame rate, and ISP parameters); ② WiFi module initialization (scanning for nearby hotspots and establishing socket connections); ③ Memory card mounting (checking remaining space and verifying the file system). Once all initialization operations are complete, the touchscreen illuminates, displaying the brand logo in the center and the message "Please place the slide into the circled area of the slide holder" below; a green checkmark icon appears in the lower right corner of the screen, indicating that initialization is complete.
[0037] The green checkmark in this embodiment is the preferred UI prompt method, but alternative solutions such as text prompts and progress bars can also be used.
[0038] Step S103: User prepares and places glass slide
[0039] Following the instructions, the user places the sample to be tested (such as a vaginal secretion sample) on the circularly marked area in the center of the slide, covers it with a coverslip and gently presses to remove air bubbles, then places the slide into the microscope's slide holder. In this embodiment, the diameter of the circularly marked area is Φ6mm, matching the field of view diameter of the 40× objective lens, ensuring that the sample is likely to fall within the camera's capture range.
[0040] The diameter of the circular mark can be adjusted according to the objective lens magnification; this embodiment is only a preferred value.
[0041] Step S104: The stage automatically fine-tunes to the initial focus position, entering manual mode.
[0042] The slide holder's cover is a magnetic structure with a built-in Hall sensor. When the cover is closed, the Hall sensor outputs a high-level signal to the host computer. The host computer determines that the slide is properly installed and sends a focus start command to the slave computer. The slave computer, based on the preset focus start Z-axis position parameters, drives the stage to fine-tune to the approximate focus area (Z-axis movement distance approximately 0.5mm), ensuring the sample is within the observable sharpness range. After approximately 2 seconds, the screen switches to the manual mode interface: the upper left corner displays two switchable controls for "Manual Mode" and "Automatic Mode," with "Manual Mode" highlighted.
[0043] The slide detection can also use microswitches, infrared beam sensors, etc. to replace Hall sensors; this embodiment is only a preferred implementation.
[0044] Step S105: Real-time display of camera footage
[0045] The manual mode interface features a live camera view window in the center, with a resolution of 1280×720 pixels, a refresh rate of 30 frames per second, and a YUV420SP image format (these parameters are only preferred for this embodiment; the actual format should be selected according to different screens). Three types of status information are overlaid at the bottom of the window: current timestamp, WiFi signal strength icon, and remaining storage space. Users can observe the sample distribution and current focus status through this window, providing a reference for subsequent positioning.
[0046] Step S106: Manually control the movement of the platform
[0047] Six directional control buttons are displayed on the right side of the screen, corresponding to the movement of the stage in the negative Y-axis direction (left), positive Y-axis direction (right), negative X-axis direction (forward), positive X-axis direction (backward), positive Z-axis direction (up), and negative Z-axis direction (down). Each time the user touches a directional button, the host computer generates a corresponding motion command: the command is encapsulated in an 8-byte big-endian binary frame conforming to claim 1, including an axis identifier field, a direction field, a step number field, and a speed field, and is sent to the slave computer via the 115200 8N1 serial port; after parsing the frame data, the slave computer independently drives the stepper motor of the corresponding axis to rotate, controlling the stage to move a preset fixed step length. This step length is determined by the "Single Step Movement Distance" parameter in the parameter setting interface. The default configuration in this embodiment is shown in the table below:
[0048] The single-step movement distance can be adjusted through the parameter setting interface. The default value in this embodiment is the preferred configuration adapted to microbial detection.
[0049] Step S107: Protection against exceeding the range of motion limits
[0050] The system uses the initialization origin of the stage as a reference and presets the maximum allowable displacement thresholds in the X, Y, and Z axes. The default configuration of this embodiment is shown in the table below:
[0051] When the user touches the direction button, the host computer first determines whether the displacement of the stage on that axis after the command is executed exceeds the maximum allowable displacement threshold of the corresponding axis. If it determines that the limit will be exceeded, it directly refuses to execute the movement command and does not send motion frames to the slave computer. At the same time, a full-screen semi-transparent prompt box pops up on the screen, displaying the red text "Stage exceeds the movement range, stage will stop moving soon" in the center, with a semi-transparent black background. The slave computer also triggers a buzzer to emit a short 1-second alarm. At this time, movement in that axis direction is locked, while movement in other axis directions is unaffected. The user needs to move the stage in the opposite direction. When it is determined that the movement will not exceed the limit, the prompt box disappears automatically, and the movement permission for that axis is restored.
[0052] Over-limit warnings can also be replaced by top pop-up windows, voice prompts, vibration feedback, etc. A buzzer alarm is the preferred alarm method and is not an essential technical feature.
[0053] Step S108: Taking a photo
[0054] The user moves the target sample to the center of the field of view using the directional buttons. After confirming the sample is clear by observing the real-time image, the user touches the "Take Photo" button in the lower left corner of the screen. Upon receiving the photo capture command, the host computer sends a static shooting command to the camera module: the camera pauses the real-time preview stream, switches to full-resolution shooting mode, and captures a 2592×1944 pixel Bayer format raw image. After ISP processing including automatic white balance, automatic exposure, and noise reduction, a JPG format photo is generated and stored on the memory card. After shooting, the photo is displayed as a 128×128 pixel thumbnail in the scrolling preview bar at the bottom of the screen. The preview bar supports swiping left and right to view multiple photos (the parameters are only preferred in this embodiment; the actual format should be selected according to different screens).
[0055] Step S109: Photo Preview and Deletion
[0056] When a user touches any thumbnail in the preview bar, the system pops up a full-screen preview window for that photo, displaying three operation buttons at the bottom: "Delete," "Retake Photo," and "Close." Touching the "Delete" button triggers a secondary confirmation dialog box asking, "Are you sure you want to delete this photo?" After user confirmation, the host computer sends a deletion command to the memory card, permanently removing the photo from the memory card and removing the corresponding thumbnail from the preview bar. Touching the "Retake Photo" button returns the system to the live view and automatically takes a new full-resolution photo, replacing the deleted photo's storage path and preview bar position. Touching the "Close" button closes the full-screen preview window and returns to the manual mode main interface.
[0057] Step S110: Upload the photo to the AI server
[0058] After the user confirms that the photos in the preview panel are correct, they touch the "Upload" button in the lower left corner of the screen. The host computer packages all the photos in the preview panel into an HTTP multipart request and sends it via the WiFi module to the preset AI server IPv4 address and port number in the parameter settings interface. During the upload process, a circular progress bar is displayed above the button, with the ratio of uploaded photos to the total number of photos updated in real time (e.g., "3 / 5"). After the upload is complete, the host computer receives a 200 success response code from the server, indicating a successful upload. A pop-up message box appears in the center of the screen displaying "Upload successful," which disappears automatically after 3 seconds.
[0059] If the network is interrupted during the upload process, the host computer will automatically trigger a retry mechanism: a maximum of 3 retries, with a 5-second interval between each retrieval; after all 3 retries fail, a red prompt box will be displayed on the screen: "Upload failed, please check network connection". The user can manually trigger a re-upload.
[0060] The number of retries and the retry interval are preferred configurations and can be adjusted through the parameter setting interface; the upload protocol can also use MQTT, FTP, etc. to replace HTTP, but this embodiment is only a preferred implementation.
[0061] Example 2: Square spiral scanning and multi-source imaging workflow in automatic mode
[0062] This embodiment is a preferred embodiment of the present invention, which describes in detail the complete process of the user completing the marking of the measured point, square spiral scanning, Z-axis autofocus, multi-light source rotation photography, and automatic uploading in automatic mode, corresponding to the core features of claims 1, 3, 4, 5, and 8. The collaborative interaction logic between the host computer and the slave computer is consistent with that in embodiment one.
[0063] Step S201: Switch mode to automatic mode
[0064] When the user touches the "Automatic Mode" button in the upper left corner of the manual mode interface, the host computer receives the switching command and controls the touch screen to switch to the automatic mode interface. The automatic mode interface shares the real-time screen display area with the manual mode interface, but the layout of the control buttons is adjusted to adapt to the logic of automatic scanning, and the direction control buttons are only activated during the "mark the measured point" stage.
[0065] Step S202: Mark the test point (scan center origin calibration)
[0066] The automatic mode interface displays a "Mark Measured Point" button on the right. Touching this button brings up directional control buttons (corresponding to X / Y / Z axis movement) on the right side of the screen, identical to those in manual mode. Users move the stage using these buttons until the target microbial sample is centered in the field of view and the image clarity is at its optimal level for subjective recognition. The host computer then records the current X and Y coordinates of the stage as the scan center origin and the current Z-axis position as the initial focusing reference value.
[0067] In other alternative embodiments, the scanning center origin can also be automatically identified and calibrated by AI algorithms in dense sample areas without manual intervention, all of which fall within the protection scope of this invention.
[0068] Step S203: Start the square spiral scan (preferred implementation of weight 3)
[0069] The user touches the "Mark Measured Point" button again (the button text changes to "Confirm and Start"). The host computer uses the recorded X and Y coordinates as the scanning center origin and sends a spiral scanning command to the lower computer. This embodiment preferably uses a square spiral path, corresponding to the "spiral expansion path" in claim 3: with the scanning center origin as layer 0, it expands outward layer by layer. The scanning trajectory of layer N is a square ring containing 8N field-of-view positions (N≥1). The total number of field-of-view positions K increases with the number of layers N. The scanning direction is clockwise. The path planning logic is as follows: 1. Layer 0: Only scans the central origin, field of view count 1, cumulative field of view count 1; 2. Layer N (N≥1): The side length of the square ring is 2N times the preset step distance, containing 8N field of view positions, and the cumulative number of fields of view is (2N+1)²; 3. Scanning sequence: Starting from the top midpoint of the Nth layer square ring, the scan proceeds sequentially through the top right corner, right midpoint, bottom right corner, bottom midpoint, bottom left corner, left midpoint, top left corner, and back to the top midpoint, thus completing the scan of that layer.
[0070] In this embodiment, 5 layers are preferably scanned, resulting in a total of 121 fields of view (1+8+16+24+32+40). The number of scanned layers and the step size can be adjusted through the parameter setting interface of claim 6. In other optional embodiments, the spiral path can also adopt a closed loop structure such as a hexagon, octagon, or circle. As long as the characteristic of "the number of fields of view K in the Nth layer increases with the number of layers N" is satisfied, it falls within the protection scope of this invention.
[0071] The following table shows the preferred parameter configuration for the 5-layer square spiral scanning of the present invention:
[0072] Step S204: Z-axis bidirectional scanning and adaptive Laplacian sharpness evaluation (improvement point of weight 8)
[0073] After the stage reaches each field of view position, the host computer sends a bidirectional Z-axis scanning command to the slave computer: with the current Z-axis position as the midpoint, move up a maximum of 20μm and down a maximum of 20μm, with the Z-axis spacing between adjacent frames being 10μm, and a total of 7 frames of images are acquired (1 frame at the midpoint + 3 frames above + 3 frames below).
[0074] This invention employs an improved adaptive Laplacian sharpness evaluation function to calculate the sharpness score of each frame of the image. The improvements are as follows: First, the global grayscale mean of the current image is calculated. If the grayscale mean is lower than the preset dark current threshold, low-brightness noise points in the convolution result are automatically filtered out. Then, a 3×3 Laplacian convolution operation is performed, and the sum of the absolute values of the convolution results is taken as the sharpness score of the frame, thus avoiding misjudgment of noise in dark fields.
[0075] The table below shows an example of image sharpness rating for 7 frames in a specific field of view:
[0076] The Z-axis scanning range and frame spacing are both optimally configured, with adjustable ranges of ±10-±50μm and 5-20μm, respectively, which can be adjusted according to the objective lens working distance.
[0077] Step S205: Sample layer locking strategy (multi-peak determination logic for weight 3)
[0078] Based on the sharpness score sequence obtained in step S204, the host computer identifies all local maxima using a peak detection algorithm and performs differential judgment based on the number of peaks, corresponding to the multi-peak processing logic of claim 3:
[0079] The Z-axis direction definition in this embodiment is consistent with that in claim 3: the larger the Z value, the closer the stage is to the objective lens; the smaller the Z value, the farther away it is from the objective lens.
[0080] Step S206: Multi-light source alternation photography (pathogenic bacteria adaptation characteristics of weights 4 and 9)
[0081] After the system locks the Z-axis position of the sample layer in the current field of view, it sequentially switches between three sets of preset illumination parameters to take pictures, corresponding to the detection needs of three common clinical pathogens: Candida, Trichomonas vaginalis, and Aspergillus, adapting to the "pathogenic bacteria feature library matching light source" logic of claim 9: 1. First group: Candida-suitable light source, using LED ring transmitted light, brightness 85 / 100, color temperature 6500K, exposure 120ms, to highlight spores and pseudohyphae; 2. Second group: Trichomonas vaginalis adapted light source, using LED side lighting, brightness 60 / 100, color temperature 5000K, exposure 80ms, to highlight flagella and undulating membrane; 3. Third group: Aspergillus-compatible light source, using LED ring transmitted light + blue light, brightness 95 / 100, color temperature 7500K, exposure 200ms, to highlight conidiophores and apical sacs.
[0082] When photographing each group of lights, the system uses the locked sample layer Z-axis position as a reference, fine-tunes the Z-axis within a range of ±5μm, acquires 5 frames of images (interval 2.5μm), and selects the frame with the highest clarity as the official imaging result of that group of lights.
[0083] The lighting parameters and fine-tuning range are all preferred configurations and can be customized according to the morphological characteristics of different pathogens. The light source parameters can also be dynamically switched according to the preliminary identification results of the AI server, all of which fall within the protection scope of this invention.
[0084] Step S207: Single-view data recording
[0085] Three photos of each field of view from different light sources are packaged together and stored on a memory card, named according to the rule Scan_Layer_N_Location_Group_Light_Type.jpg (e.g., Scan_2_07_Candida.jpg). Simultaneously, the host computer writes the metadata of the photos into an SQLite database, with the metadata fields corresponding to the storage logic of claim 5.
[0086] Step S208: Origin reset and parameter update after scanning
[0087] After completing the scanning of all preset layers, the lower-level computer drives the stage to automatically return to the power-on initialization origin, making it convenient for users to change slides. At the same time, the upper-level computer calculates the sharpness score of all fields of view and saves the Z-axis position corresponding to the highest global score as the initial focus reference value for the next scan, reducing the focusing time of subsequent scans.
[0088] The initial focus reference value is updated as an optional optimization feature, or this feature can be turned off, and each scan will start focusing from the origin Z-axis position.
[0089] Step S209: Automatic Upload and Progress Indication (Core Feature of Weight 5)
[0090] After all field-of-view photos are captured, the host computer automatically uploads all 363 photos (121 field-of-views x 3 photos / field of view) to the AI server in batches via WiFi. The upload uses a multi-threaded concurrent mode (uploading 8 photos at a time), and the screen displays an upload progress bar and a "Uploaded / Total Quantity" count in real time. After the upload is complete, a "Save successful, Upload successful" prompt box pops up on the screen and disappears automatically after 3 seconds. If the upload fails, it automatically retryes 3 times with a 5-second interval. If it still fails, the user is prompted to check the network.
[0091] The concurrent upload limit, number of retries, and retry interval are all optimal configurations and can be adjusted through the parameter settings interface.
[0092] Step S210: Rolling Overwrite Storage Management (Circular Storage Logic of Weight 5)
[0093] The system has a preset maximum storage limit of 10 groups (3 photos per group, 30 photos in total). When the number of stored photo groups exceeds the threshold, the oldest photo group is automatically deleted, and the 10 newest groups are retained. This mechanism ensures that the memory card always has enough space, preventing storage overflow that could cause system crashes.
[0094] The maximum number of storage groups is a preferred configuration, with an adjustable range of 5-50 groups. The deletion strategy can also be dynamically adjusted in conjunction with the remaining space threshold of the memory card, all of which fall within the protection scope of this invention.
[0095] The following table shows an example of the state changes in rolling over storage:
[0096] Example 3: Parameter Configuration and Wireless Communication Process
[0097] This embodiment is a preferred embodiment of the present invention, which describes in detail the configuration logic of the parameter setting interface, the WiFi connection process, and the interaction details of the mobile terminal auxiliary configuration, corresponding to the core features of claims 1, 6, and 7. The communication logic between the host computer and the slave computer is the same as in embodiments one and two.
[0098] Step S301: Enter the parameter setting interface
[0099] When a user touches the gear icon in the upper right corner of the manual / automatic mode interface, the system will pop up an administrator password verification dialog box. In this embodiment, the default password is preferably "admin". After the password verification is successful, the user will be switched to the parameter setting interface.
[0100] In other alternative embodiments, identity verification can also be performed using fingerprint recognition, facial recognition, U-shield authentication, etc., or the password verification function can be disabled to adapt to low-risk scenarios, all of which fall within the protection scope of this invention.
[0101] Step S302: WiFi Name Configuration (corresponding to wireless communication parameters in weight 6)
[0102] The first item in the parameter settings interface is the "WiFi Name" configuration item. After the system powers on, it automatically scans for nearby 2.4GHz / 5GHz WiFi networks and displays the scan results in a drop-down list. The list includes the SSID, signal strength (1-5 bar icons), security type (WPA2 / WPA3 / Open), channel number, and connection status. After the user selects a target WiFi network, the selected SSID is automatically filled into the configuration text box.
[0103] In this embodiment, the wpa_supplicant module is preferably used to manage the WiFi connection. In other alternative embodiments, conventional WiFi management components in the art, such as dhcpcd and NetworkManager, can also be used, and all of them are within the protection scope of this invention.
[0104] Step S303: WiFi password input and connection verification
[0105] After selecting a WiFi network, the user enters the password using the on-screen virtual keyboard (displayed as an asterisk mask). Touching the "Connect" button initiates the connection process: 0-3 seconds display "Connecting...", 3-8 seconds display "Obtaining IP address...", and 8-15 seconds display "Verifying server connectivity...". A successful connection displays a green "WiFi connection successful" message, and the WiFi icon becomes solid green; a failed connection displays a red message and provides a "Re-enter" option.
[0106] The virtual keyboard is the preferred input method, but alternatives such as external USB keyboards and mobile phone input are also supported. The connection timeout threshold and number of retries are the preferred configurations, with an adjustable range of 5-30 seconds for connection timeout and 1-5 times for retries.
[0107] Step S304: Mobile auxiliary configuration (corresponding to the mobile configuration feature in claim 7)
[0108] To address the inconvenience of entering complex passwords on the microscope's touchscreen, this embodiment preferably employs the mDNS protocol for mobile-side auxiliary configuration: After the user's mobile phone is connected to the same local area network, they open the configuration assistant application. The application automatically discovers AI microscope devices within the local area network via the mDNS protocol. The device name is in the format AI-Microscope-XXXX, where XXXX represents the last four digits of the device's WiFi chip MAC address. After the user selects the device, the mobile phone displays the same WiFi configuration interface as the microscope. After entering the password and clicking the "Sync" button, the configuration command is sent to the microscope via the HTTP protocol. The microscope automatically updates its WiFi configuration and reconnects.
[0109] mDNS is the preferred implementation of the LAN discovery protocol. In other alternative embodiments, UDP broadcast, SSDP, private discovery protocols, etc. can also be used to achieve automatic device discovery. The mobile application can also be replaced by a tablet or PC application, as long as parameter synchronization within the same LAN can be achieved, all of which are within the protection scope of this invention.
[0110] Step S305: Server address configuration (corresponding to AI server communication characteristics of weight 6)
[0111] The third item in the parameter settings interface is the "Server Address" configuration item. Users need to enter the IPv4 address and port number of the AI server. In this embodiment, the default port is preferably 8080. After entering the information, click the "Test Connection" button. The system sends an HTTP POST request to the server. The request body includes the device MAC address, timestamp, and device status information. If the server returns a 200 OK response, it will display "Server connection test successful". If there is no response or an error code is returned, it will indicate that the connection has failed.
[0112] HTTP POST is the preferred test protocol, but conventional application layer protocols in the field such as MQTT, FTP, and gRPC can also be used. The port number can be adjusted from 1 to 65535, all of which are within the protection scope of this invention.
[0113] Step S306: Display MAC address (corresponding to device identification parameter in weight 6)
[0114] The fourth item in the parameter settings interface is a read-only "MAC address" field, which displays the unique hardware number of the WiFi chip in the format XX:XX:XX:XX:XX:XX. This field is the unique identifier of the device and is reserved for extended scenarios such as cloud device management, multi-device collaboration, and access control. It completely corresponds to the "physical address information" feature in claim 6.
[0115] Step S307: Configure the single-step movement distance of the stage (corresponding to the motion control parameters of weight 6)
[0116] The fifth item in the parameter settings interface is the "Single Step Movement Distance" configuration item, which controls the trigger displacement of the direction buttons in manual mode. Users can adjust it in 0.01mm steps using the "+ / -" buttons, or directly input a value. After adjustment, tap "Apply" to apply the changes. This embodiment provides preferred configurations for different detection scenarios:
[0117] The adjustable range of single-step movement distance is 0.01-0.5mm on the X / Y axis and 0.005-0.2mm on the Z axis, which can be customized according to the objective lens magnification and sample characteristics.
[0118] Step S308: Automatic mode manual headlight adjustment switch (corresponding to the optional optimization feature of weight 4)
[0119] The sixth item in the parameter settings interface is a Boolean switch for "Manually Adjust Light in Automatic Mode," which is off by default. When enabled, a brightness adjustment slider will appear in the lower right corner of the automatic mode interface. Users can temporarily adjust the brightness of the currently active light source during automatic scanning to adapt to special scenarios such as abnormal staining or excessively thick specimens. The adjusted value only takes effect for this scan and does not override the preset light parameters.
[0120] This switch is an optional optimization feature. When turned off, the automatic mode strictly follows the preset lighting parameters and does not affect the core process.
[0121] Step S309: Configuration of the maximum three-axis movement distance of the stage (corresponding to the limit protection feature of weight 2)
[0122] The seventh item in the parameter settings interface is the "Maximum Travel Distance of Three Axes" configuration item, which includes three independent input boxes for the X-axis (front / back), Y-axis (left / right), and Z-axis (up / down). Centered on the power-on origin, it limits the maximum travel of each axis to avoid stage collisions. This embodiment provides a preferred configuration reference for different objectives.
[0123] The table below shows the recommended maximum movement distance for different objective lens configurations:
[0124] The adjustable range of the maximum movement distance of the three axes is 5-30mm for the X / Y axis and 1-5mm for the Z axis, which can be adjusted according to the slide size and objective working distance.
[0125] Step S310: Configure the stage movement speed (corresponding to the motion control parameters in weight 6)
[0126] The eighth and ninth items in the parameter setting interface are the "Horizontal Movement Speed" and "Vertical Movement Speed" configuration items, with units of mm / s. These control the movement speed of the download stage in automatic mode. Higher speeds result in higher scanning efficiency, but a slight decrease in positioning accuracy. This embodiment provides three preferred speed configurations:
[0127] The speed is adjustable from 0.5-10 mm / s horizontally and 0.1-2 mm / s vertically, and the acceleration / deceleration time is adjustable from 100-1000 ms to avoid slide displacement caused by sudden stops and starts.
[0128] Step S311: Three sets of light brightness configurations (corresponding to pathogenic bacteria adaptation characteristics of weights 4 and 9)
[0129] The tenth item in the parameter settings interface is the "Pathogenic Bacteria Light Brightness" configuration item, which includes three independent brightness sliders for Candida, Aspergillus, and Trichomonas, with a value range of 0-100. Users can adjust the value according to the sample characteristics to adapt to the morphological observation needs of different microorganisms.
[0130] This configuration item reserves an expansion interface, which can add lighting parameter groups for other pathogens, corresponding to the "reserved expansion detection scene parameter interface" feature of claim 6.
[0131] Step S312: Parameter saving and activation
[0132] After completing all necessary parameter modifications in the parameter settings interface, the user taps the "Save and Apply" button at the bottom of the interface. The system serializes all parameters into a persistent configuration file, preferably in JSON format, and stores it in the system partition. After writing is complete, the relevant service modules (including WiFi service, motion control service, and light source service) are restarted to make the parameters take effect. The screen displays the message "Parameters saved successfully, applying...", preferably for 3 seconds. The system then automatically returns to the manual mode interface, and the new parameters take effect in the next user operation.
[0133] The table below shows the preferred field definitions for the parameter configuration file of this invention. In other alternative embodiments, conventional data serialization formats in the art, such as XML, INI, and binary, may also be used:
[0134] Step S313: Restore factory settings
[0135] At the bottom of the parameter settings interface, there is also a "Restore Factory Settings" button. The preferred trigger method is to press and hold for 3 seconds. After the user presses and holds, the system will pop up a confirmation dialog box asking, "Are you sure you want to restore all parameters to factory defaults?". After the user confirms, the system deletes the custom configuration file and rewrites the default values shown in the table above, and then restarts all service modules. After the restoration is complete, the screen displays a message saying "Parameters have been restored to factory settings," and automatically returns to the main interface after 3 seconds.
[0136] The long press trigger duration and prompt duration are preferred configurations, with an adjustable range of 1-5 seconds for long press and 2-5 seconds for prompt. Other triggering methods such as double-click and password confirmation can also be used, all of which fall within the protection scope of this invention.
[0137] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in the present invention, and these should all be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A user process and system control method for an AI microscope, characterized in that, Includes the following steps: S1: System power-on initialization; The host computer and the slave computer establish a communication connection, and the slave computer drives the electric stage to move to the preset origin position and displays a power-on interface on the touch screen to guide the user to place the sample; S2: The system detects the installation status of the slide. When the slide is detected to be in place, the stage is automatically fine-tuned to the preset starting focus area, and the system enters manual control mode. S3: In manual mode, in response to the user's direction control command, the lower computer drives the stage to perform multi-axis displacement according to a preset step size; in response to the user's shooting command, the camera captures images and generates preview data, and the system supports uploading the captured images to a preset AI server; S4: In automatic mode, the system scans layer by layer according to the user-marked area to be tested using a preset planar scanning path; within each field of view, the system controls the stage to perform bidirectional search in the Z-axis direction to lock the focal plane, and matches the light source parameters according to the preset microbial feature library to complete the imaging. S5: The host computer and the slave computer use a custom binary communication protocol for data interaction. The protocol encapsulates motion control commands and light source control commands in the same data frame for transmission. The slave computer has independent motion trajectory analysis and execution capabilities and feeds back the execution status to the host computer.
2. The AI microscope usage process and system control method according to claim 1, characterized in that, It also includes a safety protection mechanism for the movement range of the platform, the mechanism specifically including: Using the origin of the stage after initialization as a reference, preset the maximum allowable displacement thresholds for the positive / negative X-axis, positive / negative Y-axis, and positive / negative Z-axis; The system calculates the current displacement of the stage relative to the origin on each axis in real time. When it receives a direction control command input by the user, it predicts whether the displacement of the stage on that axis after the command is executed will exceed the maximum allowable displacement threshold of the corresponding axis. If it is predicted that the threshold will be exceeded, the system triggers over-limit protection: suspends subsequent movement in that axis direction and outputs an over-limit prompt to the user. Direction control commands for non-over-limit axes can still be responded to normally. When a control command is received from the user in the opposite direction of the over-limit axis and the stage exits the over-limit state, the over-limit warning is automatically canceled and the motion control authority of that axis is restored.
3. The AI microscope usage process and system control method according to claim 1, characterized in that, It also includes the scanning and focusing process in automatic mode: The user switches to automatic mode and triggers the marking operation. After adjusting the sample to be tested to the center of the field of view through directional control, the system records the X and Y coordinates of the confirmed point as the origin of the scanning center. The system starts from the origin of the scanning center and scans outward layer by layer according to a preset spiral expansion path. The spiral expansion path satisfies the following: the scanning trajectory of the Nth layer forms a closed loop, containing K field positions, and the value of K increases with the increase of the number of layers N to traverse all field positions to be tested. The scanning direction is clockwise or counterclockwise. After the stage reaches each field of view position, the system controls the stage to perform bidirectional scanning in the Z-axis direction with the current position as the reference, acquire multiple frames of images, and use the improved adaptive Laplacian sharpness evaluation function to calculate the sharpness score of each frame of image. The system determines the optimal focus plane based on the sharpness score: If only a single sharpness peak is detected, the Z-axis position corresponding to that peak is locked as the focus reference plane; If two sharpness peaks are detected, the Z-axis positions corresponding to the two peaks are compared, and the plane corresponding to the peak away from the objective lens is locked as the focus reference plane of the sample layer. If three or more sharpness peaks are detected, the plane corresponding to the lower of the two peaks furthest from the objective lens is selected as the focusing reference plane for the sample layer.
4. The AI microscope usage process and system control method according to claim 3, characterized in that, After locking the focal reference plane of the sample layer, the system executes a multi-parameter illumination imaging process, which specifically includes: The system calls the preset lighting configuration table and switches between at least two sets of preset lighting parameters in sequence. Each set of lighting parameters is independently configured with light source type, brightness level, color temperature and exposure time to adapt to the staining characteristics and morphological detection needs of different microbial samples. Under each set of illumination parameters, the system uses the locked sample layer focusing reference plane as a reference, performs macro scanning in the Z-axis direction according to the preset fine-tuning range and step size, acquires multiple macro images, and selects the frame with the highest sharpness score as the effective imaging frame under that set of illumination parameters. After all lighting parameter groups have been switched and imaging is complete, the system will package the multiple valid imaging frames obtained into a sample image dataset and store it in the memory card according to the preset naming rules.
5. The AI microscope usage process and system control method according to claim 1, characterized in that, It also includes image storage and upload management processes, specifically including: The system automatically writes the photo set captured in each field of view to the memory card without requiring user confirmation; the photo set is a collection of multiple imaging frames captured under different lighting parameters in the same field of view. The system uses a circular storage mechanism to manage memory card space: preset maximum storage group number threshold and remaining space threshold. When the number of photo groups to be written will cause the total number of stored photo groups to exceed the maximum storage group number threshold, the earliest created photo group will be automatically deleted; if the remaining space of the memory card is lower than the remaining space threshold, the earliest photo group will be deleted first to free up space before writing is performed. The system adds the completed photo group to the upload queue and automatically uploads it in batches to the AI server preset in claim 1 when the WiFi connection is normal; after the current batch is uploaded, the system outputs a status prompt message.
6. The AI microscope usage process and system control method according to claim 1, characterized in that, The parameter setting interface provides configuration functions for system operating parameters, which include: Wireless communication parameters include WiFi network identifier, security key and server address configuration items. The server address configuration item supports inputting IPv4 address and port number, and integrates connection test function. Device identification parameters, including physical address information used to uniquely identify the device; Motion control parameters include the single-step movement distance of the stage, the maximum travel threshold for each axis in the positive and negative directions, and the motion speed level for each axis. Imaging control parameters include at least two preset lighting parameter groups. Each lighting parameter group is independently configured with light source brightness, color temperature and exposure time to adapt to the detection needs of different microbial samples, and reserves an expansion interface to support parameter configuration for new detection scenarios.
7. The AI microscope usage process and system control method according to claim 6, characterized in that, It also includes a mobile-based parameter-assisted configuration process, specifically including: The mobile configuration application automatically detects AI microscope devices within the same local area network via a local area network discovery protocol and generates a device list containing device identification information, which includes the last four digits of the device's physical address. Users select a target wireless access point and enter a security key through a mobile application, triggering a configuration synchronization command. The command contains the connection credentials of the target wireless access point. In response to the configuration synchronization command, the microscope updates its wireless communication parameters and attempts to reconnect to the network, then sends the connection result back to the mobile application for display.
8. The AI microscope usage process and system control method according to claim 3, characterized in that, The specific method for Z-axis bidirectional scanning and sharpness evaluation is as follows: Using the current Z-axis position of the stage as the reference midpoint, at least one frame of image is acquired upwards according to a preset first offset, and at least one frame of image is acquired downwards according to a preset second offset, forming a Z-axis scanning sequence containing multiple frames of images; the Z-axis position spacing between two adjacent frames of images is a preset fixed step size; For each frame of the Z-axis scanning sequence, an improved adaptive Laplacian sharpness evaluation function is used: the image is subjected to a 3×3 Laplacian convolution kernel operation, the sum of the absolute values of the convolution results is calculated, and the sum is used as the sharpness score of the frame image to quantify the image sharpness.
9. An AI microscope system, characterized in that, The system is used to execute the AI microscope usage process and system control method according to any one of claims 1-8, the system comprising: The host computer integrates a central processing unit, memory, storage interface and wireless communication unit. It is configured to run control logic and realize human-computer interaction, control command generation, image data processing, AI server communication, parameter configuration management and mobile terminal configuration collaboration. The lower-level machine is a driver board with an integrated independent microcontroller. It communicates with the upper-level machine via a serial port and is configured to receive control commands from the upper-level machine, independently parse and execute the motion trajectory planning, three-axis limit protection and motion feedback of the electric stage, and support the execution of spiral scanning and Z-axis bidirectional focusing. The image acquisition module communicates with the host computer and is configured to output a real-time preview stream and full-resolution still images. The acquired image data is uploaded to the host computer for sharpness evaluation. The light source module contains at least two independently controllable light source types and is configured to respond to control commands from the host computer to switch light source types, brightness, color temperature, and exposure time. It supports multiple sets of lighting parameters for alternating imaging and AI recognition results for linked dimming. The electric stage is configured to achieve precise displacement in three degrees of freedom (X-axis, Y-axis, and Z-axis) under the control of the lower-level computer. The displacement accuracy is guaranteed by the trajectory planning logic of the lower-level computer. The touch display module is connected to the host computer and is configured to display the camera's captured images, parameter configuration interface, system status prompts and over-limit alarm information, and receive user touch operation commands. The storage module is a non-volatile storage medium configured to store captured image datasets, system configuration parameters, and upload logs, and supports a circular overwrite storage mechanism. The power management module, which is electrically connected to each module, is configured to provide a stable operating voltage and has overvoltage protection and undervoltage lockout functions.
