Microscope system control method, microscope system and computer readable storage medium
By acquiring and utilizing the configuration information of candidate devices, the microscope system control method simplifies the equipment control process, solves the problems of insufficient complexity and adaptability of control programs in the prior art, and achieves higher flexibility and adaptability.
Patent Information
- Application Number
- CN202411700341.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Existing microscope systems require specific control programs for each device, resulting in increased complexity of control programs and reduced adaptability and flexibility to device changes.
By obtaining the current configuration information of the candidate device, the device service process is controlled to start, and communication is established with the candidate device through the device service process. After receiving the device control instructions, the target service process is called to manipulate the candidate device, which simplifies the control program and improves the adaptability to device changes.
It reduces the complexity of the microscope system control program, improves the adaptability and flexibility to equipment changes, and simplifies the equipment control process.
Smart Images

Figure CN119689899A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of microscope imaging control, and in particular to a microscope system control method, a microscope system, and a computer-readable storage medium. Background Art
[0002] Microscope systems usually need to control multiple devices to achieve accurate imaging of the target object. However, since each device has different control requirements and connection methods, existing microscope systems need to write specific control programs for each device in the main control module to achieve control of different devices, which increases the complexity of the microscope system control program and limits the adaptability and flexibility of the microscope system to device changes.
[0003] Therefore, how to reduce the complexity of the microscope system control program and improve the microscope system's adaptability and flexibility to equipment changes has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a microscope system control method, a microscope system, and a computer-readable storage medium, aiming to reduce the complexity of the microscope system control program and improve the adaptability and flexibility of the microscope system to equipment changes.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides a microscope system control method, wherein the microscope system comprises: a bus and at least two candidate devices connected to the bus, wherein the candidate devices are component devices for constructing the microscope system, and the method comprises:
[0006] Obtaining current configuration information of at least two of the candidate devices;
[0007] Controlling the device service process of each candidate device to perform a startup operation according to the current configuration information;
[0008] Establishing communication with the candidate device through the device service process;
[0009] Receive device control instructions;
[0010] Calling at least one target service process from the device service process according to the device control instruction;
[0011] The candidate device corresponding to the device control instruction is controlled through each target service process.
[0012] In some embodiments, the device control instruction includes at least one candidate sub-instruction, and calling at least one target service process from the device service process according to the device control instruction includes:
[0013] Obtaining the actual execution order and the logical execution order of the device control instructions;
[0014] Determine the process call mode of the candidate sub-instruction according to the actual execution order and the logical execution order of the candidate sub-instruction and the device control instruction;
[0015] The target service process is called from the device service process according to the candidate sub-instruction and the process calling mode.
[0016] In some embodiments, the process call mode includes: an asynchronous call mode and a synchronous call mode; the process call mode of the candidate sub-instruction is determined according to the actual execution order and the logical execution order of the candidate sub-instruction and the device control instruction, including:
[0017] Selecting a preceding sub-instruction and a succeeding sub-instruction from the candidate sub-instructions according to the actual execution order; wherein the preceding sub-instruction is the candidate sub-instruction preceding the succeeding sub-instruction;
[0018] Selecting a previous service process from the target service process according to the previous sub-instruction;
[0019] Filtering a target execution relationship from the logic execution sequence according to the preceding sub-instruction and the succeeding sub-instruction;
[0020] If the target execution relationship representation requires executing the subsequent sub-instruction according to the instruction execution status information fed back by the previous service process, determining that the process call mode of the previous sub-instruction is the synchronous call mode;
[0021] If the target execution relationship indicates that the subsequent sub-instruction does not need to be executed according to the instruction execution status information fed back by the previous service process, then the process calling mode of the previous sub-instruction is determined to be the asynchronous calling mode.
[0022] In some embodiments, calling the target service process from the device service process according to the candidate sub-instruction and the process calling mode includes:
[0023] Selecting the target service process called by the subsequent sub-instruction as the subsequent service process;
[0024] If the process calling mode of the preceding sub-instruction is the synchronous calling mode, calling the preceding service process according to the preceding sub-instruction, so as to call the succeeding service process according to the instruction execution status information fed back by the preceding service process and the succeeding sub-instruction;
[0025] If the process calling mode of the preceding sub-instruction is the asynchronous calling mode, the preceding service process is called according to the preceding sub-instruction, and the succeeding service process is called according to the succeeding sub-instruction.
[0026] In some embodiments, the microscope system further includes a display connected to the bus, and after establishing communication with the candidate device through the device service process, the method further includes:
[0027] Acquire the information notification mode of the device service process according to the current configuration information; wherein the information notification mode is a message publishing and subscription mode;
[0028] Receiving device feedback information sent by the device service process according to the message publishing and subscription mode; wherein the device feedback information includes device status information and image acquisition parameters of the candidate device;
[0029] Visually displaying the device status information through the display to obtain a device status view;
[0030] The image data collected by the candidate device is acquired according to the image acquisition parameters to obtain target image data.
[0031] In some embodiments, the microscope system further includes a shared memory module, the device control process of the candidate device includes an image acquisition control process, the shared memory module is communicatively connected to the image acquisition control process, the image acquisition parameters include acquired image information and image identification information; acquiring the image data acquired by the candidate device according to the image acquisition parameters to obtain the target image data includes:
[0032] Locking the shared memory module according to the acquired image information, and acquiring preliminary image data from the shared memory module according to the image identification information;
[0033] Performing data integrity check on the preliminary image data according to the image identification information to obtain data verification information; wherein the data verification information represents the integrity of the preliminary image data;
[0034] If the data verification information indicates that the preliminary image data is complete, the shared memory module is unlocked, and the preliminary image data is used as the target image data.
[0035] In some embodiments, after controlling the candidate device corresponding to the device control instruction through the target service process, the method further includes:
[0036] Get the exit system instruction;
[0037] Acquire the device operation status of the candidate device according to the exit system instruction;
[0038] Calling a selected service process from the device service process according to the device operation state; wherein the device operation state of the selected service process is a power-on state;
[0039] Sending the exit system instruction to the selected service process, so as to shut down the candidate device through the selected service process;
[0040] Receiving operation feedback information sent by the selected service process; wherein the operation feedback information represents the power on / off status of the candidate device;
[0041] Update the device operation status of the candidate device according to the operation feedback information to obtain an updated operation status;
[0042] If the update running status of all the candidate devices is the shutdown state, control the selected service process to perform a shutdown operation.
[0043] In some embodiments, the microscope control system further includes a process change module, the process change module is connected to the candidate device through the bus; after the device service process of each candidate device is controlled to perform a startup operation according to the current configuration information, the method further includes:
[0044] Obtaining a process change instruction; wherein the process change instruction is used to change the device service process of the selected device, and the current configuration information of the selected device cannot control the device service process to perform a startup operation;
[0045] Reading a configuration file of the system according to the process change instruction; wherein the configuration file includes a device list and historical configuration information, and the device list stores candidate identification information of the candidate device;
[0046] Filtering target identification information from the candidate identification information according to the process change instruction;
[0047] Filtering target configuration information from the historical configuration information according to the target identification information;
[0048] Filtering a selected service process from the device service processes according to the target configuration information;
[0049] Calling the process change module through the process change instruction, so as to associate the selected device and the selected service process through the process change module to obtain an associated service process;
[0050] The selected device is managed through the associated service process.
[0051] To achieve the above object, a second aspect of an embodiment of the present application provides a microscope system, the system comprising a main control module, a bus and at least two candidate devices connected to the bus, the main control module comprising:
[0052] A configuration information acquisition submodule, used to acquire current configuration information of at least two of the candidate devices;
[0053] A process startup submodule, used for controlling the device service process of each candidate device to perform a startup operation according to the current configuration information;
[0054] A communication establishment submodule, used to establish communication with the candidate device through the device service process;
[0055] The command receiving submodule is used to receive the device control command;
[0056] A process calling submodule, configured to call a target service process from at least one of the device service processes according to the device control instruction;
[0057] The device control submodule is used to control the candidate device corresponding to the device control instruction through each target service process.
[0058] To achieve the above-mentioned purpose, the third aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method of the above-mentioned first aspect is implemented.
[0059] The microscope system control method, microscope system, and computer-readable storage medium proposed in the present application first connect the candidate device to the bus, obtain the current configuration information of at least two candidate devices, control the device service process of each candidate device to perform the startup operation according to the current configuration information, and establish communication with the candidate device through the device service process. Then, receive the device control instruction, call at least one target service process from the device service process according to the device control instruction, and manipulate the candidate device corresponding to the device control instruction through each target service process. Therefore, in the microscope system control method shown in the embodiment of the present application, after receiving the device control instruction, the microscope system control program only needs to call the target service process to control the candidate device that needs to execute the device control instruction, which simplifies the control program of the microscope system and reduces the complexity of the microscope system control program; and when the candidate device changes, only the device service process of the changed device needs to be modified, and the control of the candidate device can be realized through the modified device service process, without modifying the control program of the microscope system and other device service processes, which improves the adaptability and flexibility of the microscope system to device changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 is a schematic structural diagram of a microscope system provided in an embodiment of the present application;
[0061] Figure 2 is a structural diagram of a main control module provided in an embodiment of the present application;
[0062] Figure 3 is an optional flow chart of the microscope system control method provided in the embodiment of the present application;
[0063] Figure 4 is another optional flow chart of the microscope system control method provided in the embodiment of the present application;
[0064] Figure 5 is another optional flow chart of the microscope system control method provided in the embodiment of the present application;
[0065] Figure 6 yes Figure 5 Flow chart of step S504 in FIG.
[0066] Figure 7 yes Figure 3 Flow chart of step S305 in FIG.
[0067] Figure 8 yes Figure 7 Flow chart of step S702 in FIG.
[0068] Fig. 9 yes Figure 7 Flow chart of step S703 in FIG.
[0069] Fig.10 This is another optional flow chart of the microscope system control method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0071] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0072] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0073] Modern microscope systems have become an indispensable tool in scientific research, with a wide range of applications, covering biology, materials science, physics and other fields. With the advancement of microscope technology, more and more types of equipment need to be controlled in microscope systems, including lasers, cameras, translation stages, filter wheels and other accessories. The control requirements of these devices vary, and they are usually provided by different manufacturers with different interfaces and communication protocols. This requires the microscope system to write specific control programs for each device in the main control module to achieve control of different devices, which increases the complexity of the microscope system control program and limits the adaptability and flexibility of the microscope system to equipment changes.
[0074] Therefore, how to reduce the complexity of the microscope system control program and improve the microscope system's adaptability and flexibility to equipment changes has become a technical problem that needs to be solved urgently.
[0075] Based on this, the embodiments of the present application provide a microscope system control method, a microscope system, and a computer-readable storage medium, aiming to reduce the complexity of the microscope system control program and improve the adaptability and flexibility of the microscope system to equipment changes.
[0076] The microscope system control method, microscope system, and computer-readable storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the microscope system in the embodiments of the present application is described.
[0077] Figure 1 is an optional structural diagram of a microscope system provided in an embodiment of the present application, Figure 1The system in the embodiment may include, but is not limited to, a main control module 110, a bus 120, at least two candidate devices 130, a shared memory module 140, a display (not shown in the figure), and a process change module 150. The main control module 110, each candidate device 130, and the process change module 150 are respectively connected to the bus 120 to transmit information through the bus 120. The candidate device 130 is a component device for constructing a microscope system, and each candidate device 130 stores current configuration information. The main control module 110 stores a microscope system control program and a configuration file, which is used to call a device service process according to a device control instruction to control the candidate device 130 through the device service process. The process change module 150 is used to change the device service process of the candidate device 130 so that the main control module 110 can call the device service process of the candidate device 130, and then control the candidate device 130 through the device service process. The microscope system shown in the embodiment of the present application can construct a distributed system architecture by setting an independent device service process and control program to simplify the microscope system control program and reduce the complexity of the microscope system control program. In addition, when adding, replacing or deleting candidate devices and updating the program version of candidate devices, it is only necessary to modify the device service process of the candidate device through the process change module to achieve control of the candidate device without modifying the microscope system control program, thereby reducing the difficulty of microscope system access equipment and maintenance of the microscope system, and improving the scalability of the microscope system control program as well as the adaptability and flexibility of the microscope system control program to changes in candidate devices.
[0078] For example, when adding a new device, it is only necessary to set the interface of the new device according to the current configuration information of the new device, and create the device service process of the new device through the process change module 150, so as to realize the control of the new device. When the candidate device is replaced or the program version of the candidate device is updated, it is only necessary to use the replaced candidate device or the candidate device after the program version is updated as the selected device, and use the device service process of the selected device as the selected service process, and then call the process change module 150 according to the process change instruction, and associate the selected device and the selected service process through the process change module 150, so as to manage the selected device through the selected service process, and realize the control of the selected device by the microscope system control program. When deleting a device, it is only necessary to disable the device service process of the device to be deleted through the process change module 150.
[0079] In some embodiments, the process change module 150 can also independently update or modify the microscope system control program stored in the main control module 110 to optimize the performance of the microscope control system so that the microscope system control program can better control the candidate device 130 according to the device control instructions.
[0080] In some embodiments, the candidate device 130 includes, but is not limited to: a laser 131, a camera 132, a translation stage 133, and a filter wheel 134. The device service process of the laser 131 is a laser control process, the device service process of the camera 132 is an image acquisition control process, the device service process of the translation stage 133 is a translation stage control process, and the device service process of the filter wheel 134 is a filter wheel control process. The microscope system control program may be a graphical user interface (GUI) application.
[0081] In some embodiments, bus 120 is a D-Bus bus, which is an inter-process communication (IPC) mechanism widely used in Linux environments. The D-Bus bus has cross-language support capabilities, allowing applications written in different programming languages to interact through a unified interface. In addition, the D-Bus bus supports remote procedure calls (RPCs), so that an application can call another application like calling a local function; at the same time, the D-Bus bus also supports asynchronous signal transmission, allowing applications to transmit event or state change information without direct interaction. On this basis, the microscope system shown in the embodiment of the present application can decompose the original control program of the microscope system into multiple independent device service processes, and define the device interface of the candidate device in advance, that is, the device service process of different programming languages can be called through the D-Bus bus and the device interface to control the device through the device service process, so that the disadvantage that the traditional microscope system must use a unified programming language to write a control program for each device can be overcome, and the adaptability and compatibility of the microscope system to the candidate device can be improved.
[0082] For example, the microscope control program can be developed using Python, the image acquisition control process can be developed using C / C++ or other programming languages, and the interface of the camera 132 can be a software development kit (SDK). When the model of the camera 132 changes, only the image acquisition control process needs to be redeveloped and tested. After the test passes, the microscope control program can call the updated image acquisition control process through the SDK interface to control the camera 132 after the model change.
[0083] In some embodiments, the shared memory module 140 is communicatively connected to the main control module 110 and the camera 132. Therefore, the microscope system shown in the embodiment of the present application can transmit preliminary image data to the shared memory module 140 through the image acquisition control process after the camera completes the operation of acquiring image data, and send the acquired image information and image identification information to the main control module 110 through the image acquisition control process, so that the main control module 110 obtains the target image data from the shared memory module 140 according to the acquired image information and image identification information. It should be noted that the transmission of preliminary image data and target image data between the image acquisition control process, the shared memory module 140 and the main control module 110 is not carried out through the D-Bus bus; the image acquisition control process sends the acquired image information and image identification information to the main control module 110 through the message publishing and subscription mode of the D-Bus bus, in which the image acquisition control process is the publisher and the main control module 110 is the subscriber. Therefore, the image acquisition control process shown in the embodiment of the present application quickly transmits the acquired image information and image identification information to the main control module through the D-Bus bus, so as to notify the main control module to obtain the image data uploaded by the image acquisition control process from the shared memory module, thereby realizing the transmission of image data between the image acquisition control process and the main control module, solving the problem of image transmission delay caused by the small amount of data transmitted by the D-Bus bus, and thus improving the real-time performance of image data transmission of the microscope system.
[0084] In some embodiments, the display is electrically or communicatively connected to the main control module 110, so that after the device service process of the candidate device 130 transmits the device status information to the main control module 110 through the message publish-subscribe mode of the D-Bus bus, the display can obtain and update the device status information of the candidate device 130 from the main control module 110 to ensure status monitoring of each candidate device.
[0085] See also Figure 2 The main control module 110 shown in the embodiment of the present application includes:
[0086] The configuration information acquisition submodule 111 is used to acquire current configuration information of at least two candidate devices;
[0087] The process startup submodule 112 is used to control the device service process of each candidate device to perform a startup operation according to the current configuration information;
[0088] The communication establishment submodule 113 is used to establish communication with the candidate device through the device service process;
[0089] The instruction receiving submodule 114 is used to receive device control instructions;
[0090] The process calling submodule 115 is used to call at least one target service process from the device service process according to the device control instruction;
[0091] The device control submodule 116 is used to control the candidate device corresponding to the device control instruction through each target service process.
[0092] In the microscope system shown in the embodiment of the present application, the configuration information acquisition submodule 111 of the main control module 110 acquires the current configuration information of at least two candidate devices, and controls the device service process of each candidate device to perform the startup operation according to the current configuration information through the process startup submodule 112, and the communication establishment submodule 113 establishes communication with the candidate device through the device service process. Then, the instruction receiving submodule 114 receives the device control instruction, and then calls at least one target service process from the device service process according to the device control instruction through the process calling submodule 115, and finally, the device control submodule 116 controls the candidate device corresponding to the device control instruction through each target service process. Therefore, in the microscope system shown in the embodiment of the present application, after receiving the device control instruction, the microscope system control program only needs to call the target service process to control the candidate device that needs to execute the device control instruction, which simplifies the control program of the microscope system and reduces the complexity of the microscope system control program; and, when the candidate device changes, it is only necessary to modify the device service process of the changed device, so that the candidate device can be controlled through the modified device service process, without modifying the control program of the microscope system and other device service processes, thereby improving the adaptability and flexibility of the microscope system to device changes.
[0093] The specific implementation of the microscope system is basically the same as the specific implementation example of the microscope system control method described below. Therefore, the specific implementation examples of the microscope system control method applied to each module, device, device service process or control program of the microscope system can all refer to the specific implementation example of the microscope system and will not be repeated below.
[0094] See also Figure 3 The embodiment of the present application also provides a microscope system control method, which can be applied to the above-mentioned microscope system. The method may include but is not limited to steps S301 to S306.
[0095] Step S301, obtaining current configuration information of at least two candidate devices;
[0096] Step S302, controlling the device service process of each candidate device to perform a startup operation according to the current configuration information;
[0097] Step S303, establishing communication with the candidate device through the device service process;
[0098] Step S304, receiving a device control instruction;
[0099] Step S305, calling at least one target service process from the device service process according to the device control instruction;
[0100] Step S306: controlling the candidate device corresponding to the device control instruction through each target service process.
[0101] In the steps S301 to S306 shown in the embodiment of the present application, the candidate device is first connected to the bus, the current configuration information of at least two candidate devices is obtained, the device service process of each candidate device is controlled to perform a startup operation according to the current configuration information, and communication is established with the candidate device through the device service process. Then, a device control instruction is received, at least one target service process is called from the device service process according to the device control instruction, and the candidate device corresponding to the device control instruction is controlled through each target service process. Therefore, in the microscope system control method shown in the embodiment of the present application, after receiving the device control instruction, the microscope system control program only needs to call the target service process to control the candidate device that needs to execute the device control instruction, which simplifies the control program of the microscope system and reduces the complexity of the microscope system control program; and when the candidate device changes, only the device service process of the changed device needs to be modified, and the control of the candidate device can be realized through the modified device service process, without modifying the control program of the microscope system and other device service processes, thereby improving the adaptability and flexibility of the microscope system to device changes.
[0102] In step S301 of some embodiments, the current configuration information may include, but is not limited to, at least one of the following: device identification information, device model information, interface type information, communication protocol information, or functional parameters. The device identification information is used to uniquely identify each candidate device so that the microscope system can distinguish between multiple candidate devices and select a specific device from multiple candidate devices. The device model information is used to provide information such as the manufacturer and model of the device so that the microscope system can load the driver corresponding to the device model. The interface type information facilitates the microscope system to physically or logically connect the candidate device, such as a serial port or SDK. The communication protocol information characterizes the rules for exchanging data between the system and the device, such as TCP / IP, serial communication, or other proprietary protocols. Functional parameters are used to describe the functional types and operating limitations of the candidate device. For example, for a camera device, the functional parameters may include, but are not limited to, at least one of the following: resolution, exposure range, or frame rate.
[0103] It should be noted that the current configuration information and the historical configuration information mentioned below are both device configuration information of the candidate device, and the only difference is that the current configuration information is the device configuration information obtained in step S301, and the historical configuration information is the device configuration information pre-stored in the system configuration file. Therefore, the specific implementation of the historical configuration information can refer to the specific implementation of the current configuration information, and will not be repeated below.
[0104] After step S301 in some embodiments, the method illustrated in the embodiments of the present application further includes activating a D-Bus daemon and connecting the microscope system control program to the D-Bus bus to register, activate and manage the device service process during the operation of the microscope system, ensuring that the microscope system control program can find and connect to the target service process. In addition, the D-Bus daemon can also handle access rights and restrict access to specific device service processes through access control lists (ACLs), thereby ensuring the security of the microscope system.
[0105] In step S302 of some embodiments, the microscope system control program controls the device service process of each candidate device to perform a startup operation according to the current configuration information to ensure that all candidate devices are ready to receive device control instructions from the microscope system. After the device service process completes the startup operation, the device service process automatically connects to the D-Bus bus.
[0106] See also Figure 4 In some embodiments, after step S302, the microscope system control method may further include but is not limited to steps S401 to S407:
[0107] Step S401, obtaining a process change instruction; wherein the process change instruction is used to change the device service process of the selected device, and the current configuration information of the selected device cannot control the device service process to perform a startup operation;
[0108] Step S402, reading a configuration file of the system according to the process change instruction; wherein the configuration file includes a device list and historical configuration information, and the device list stores candidate identification information of the candidate device;
[0109] Step S403, filtering out target identification information from candidate identification information according to the process change instruction;
[0110] Step S404, filtering out target configuration information from historical configuration information according to the target identification information;
[0111] Step S405, selecting a selected service process from the device service processes according to the target configuration information;
[0112] Step S406, calling the process change module through the process change instruction, so as to associate the selected device and the selected service process through the process change module to obtain the associated service process;
[0113] Step S407: managing the selected device through the associated service process.
[0114] In step S401 of some embodiments, the process change instruction includes: the current configuration information of the selected device and the startup error feedback information, and the startup error feedback information indicates that the current configuration information of the selected device cannot control the device service process to perform the startup operation. The process change instruction is used to change the device service process of the selected device, which can be specifically set by the user or automatically generated by an automated script.
[0115] In step S403 of some embodiments, the device identification information of the selected device is selected from the current configuration information of the selected device as the current device identification information, and the current device identification information is matched with the candidate identification information in the device list one by one, and the target identification information is screened out to check whether the device service process of the selected device is created in advance. If the target identification information can be screened out, it means that the process change module has already created the device service process of the selected device in advance, and the device service process of the selected device can be changed; if the target identification information cannot be screened out, it means that the process change module has not created the device service process of the selected device, and the device service process of the selected device needs to be created.
[0116] In step S406 of some embodiments, after the process change module is called through the process change instruction, the process change module replaces the historical configuration information according to the current configuration information of the selected device, obtains the updated configuration information, and associates the updated configuration information with the selected service process. Therefore, the selected device can be managed through the selected service process.
[0117] In the steps S401 to S407 shown in the embodiment of the present application, the process change instruction including the current configuration information of the selected device and the startup error feedback information is first obtained, and the device list and the historical configuration information are read through the process change instruction to filter out the target identification information from the candidate identification information stored in the device list, and then, the target configuration information is filtered out from the historical configuration information according to the target identification information, and the selected service process is filtered out from the device service process according to the target configuration information. Finally, the process change module is called through the process change instruction to associate the selected device and the selected service process through the process change module to obtain the associated service process, and the selected device is managed through the associated service process. Therefore, the microscope system control method shown in the embodiment of the present application can change the device service process after the device is replaced or the configuration information of the device is changed, and the device can be controlled again through the device service process without modifying the control program of the microscope system, so that the microscope system can quickly control the device after the replacement or configuration information change, and improve the adaptability of the microscope system to device changes.
[0118] See also Figure 5 In some embodiments, after step S303, the microscope system control method may further include but is not limited to steps S501 to S504:
[0119] Step S501, obtaining the information notification mode of the device service process according to the current configuration information; wherein the information notification mode is a message publishing and subscription mode;
[0120] Step S502, receiving device feedback information sent by the device service process according to the message publishing and subscription mode; wherein the device feedback information includes device status information and image acquisition parameters of the candidate device;
[0121] Step S503, visually displaying the device status information through a display to obtain a device status view;
[0122] Step S504: acquiring image data acquired by the candidate device according to the image acquisition parameters to obtain target image data.
[0123] In step S501 of some embodiments, the information notification mode of the device service process is a message publishing and subscription mode, so the device service process can actively send information to the main control module, wherein the publisher is the device service process and the subscriber is the main control module. By sending messages to the main control module through the message publishing and subscription mode, it is possible to avoid the main control module from polling each device service process, thereby saving processor (CPU) resources, and at the same time improving the response speed of the microscope system to emergencies and reducing the risk of missing important events due to polling delays.
[0124] Before step S502 of some embodiments, the method also performs image acquisition through a camera to obtain preliminary image data, image identification information and data acquired information; the image acquisition control process locks the shared memory according to the data acquired information, and uploads the preliminary image data according to the image identification information; after the preliminary image data is uploaded, the image acquisition control process unlocks the shared memory.
[0125] In step S502 of some embodiments, the device status information is used to send the current status information of the candidate device to the main control module, and the device status information may include but is not limited to at least one of the following: abnormal status information, current parameter information, and threshold prompt information. The abnormal status information indicates that the candidate device is abnormal and the main controller needs to handle the abnormality. The current parameter information is used to describe the current status of each functional parameter of the candidate device, so that the user or the main control module can adjust the functional parameters of the candidate device. The threshold prompt information is used to prompt the functional parameters that are close to or reach the threshold. For example, when the translation stage moves to the maximum moving distance, the movement threshold information is sent to the main control module through the translation stage control process. The image acquisition parameters may include but are not limited to at least one of the following: aperture parameters, field of view parameters, exposure time parameters, and imaging mode parameters.
[0126] In step S503 of some embodiments, the form of the device status view may include but is not limited to at least one of the following dynamic charts, trend charts or lists, and this application does not impose specific limitations.
[0127] In step S504 of some embodiments, the target image data may be displayed on a display interface of the main control module or on an external display, and this application does not impose any specific limitation thereto.
[0128] In steps S501 to S504 as shown in the embodiment of the present application, first, the information notification mode of the device service process is obtained according to the current configuration information; wherein the information notification mode is a message publishing and subscription mode. Then, the device feedback information sent by the device service process is received according to the message publishing and subscription mode; wherein the device feedback information includes the device status information and image acquisition parameters of the candidate device. Finally, the device status information is visualized through the display to obtain a device status view, and the image data collected by the candidate device is obtained according to the image acquisition parameters to obtain the target image data. Therefore, the microscope system control method shown in the embodiment of the present application can actively send the device status information and image acquisition data to the main control module through the device service process of the candidate device, so that effective communication can be carried out between the system and the candidate device, so that the main control module can quickly identify and solve potential problems of the candidate device, thereby improving the operating efficiency of the microscope system.
[0129] See also Figure 6 In some embodiments, the image acquisition parameters include acquired image information and image identification information; step S504 may also include but is not limited to steps S601 to S603:
[0130] Step S601, locking the shared memory module according to the collected image information, and obtaining preliminary image data from the shared memory module according to the image identification information;
[0131] Step S602, performing data integrity check on the preliminary image data according to the image identification information to obtain data verification information; wherein the data verification information represents the integrity of the preliminary image data;
[0132] Step S603 : if the data verification information indicates that the preliminary image data is complete, unlock the shared memory module and use the preliminary image data as target image data.
[0133] In step S602 of some embodiments, the specific operation of performing data integrity check on the preliminary image data according to the image identification information may include, but is not limited to, checking a cyclic redundancy check (CRC) value, a hash value, or other checksum of the data, which is not specifically limited in this application. By performing data integrity check on the preliminary image data, it can be verified whether the data has been damaged or altered during transmission.
[0134] In step S603 of some embodiments, if the data verification information indicates that the preliminary image data is incomplete, the main control module will re-acquire the preliminary image data based on the image identification information; if the data verification information indicates that the preliminary image data is complete, the main control module will unlock the shared memory module and use the preliminary image data as the target image data to ensure that the preliminary image data is completely transmitted to the main control module.
[0135] After step S603 in some embodiments, the target image data needs to be rendered according to the rendering requirement information to obtain the rendered image data. The rendering requirement information is set according to the user's needs, and may include but is not limited to at least one of the following: brightness adjustment information, contrast adjustment information, saturation adjustment information, size adjustment information, resolution adjustment information, or format conversion information, which is not limited in this application.
[0136] In the steps S601 to S603 shown in the embodiment of the present application, the shared memory module is first locked according to the collected image information, and the preliminary image data is obtained from the shared memory module according to the image identification information. Then, the preliminary image data is checked for data integrity according to the image identification information to obtain data verification information; wherein the data verification information represents the integrity of the preliminary image data, and if the data verification information represents that the preliminary image data is complete, the shared memory module is unlocked, and the preliminary image data is used as the target image data. Therefore, the microscope system control method shown in the embodiment of the present application, by locking and unlocking the shared memory module, can prevent other programs or device service processes from modifying the preliminary image data in the shared memory module when the main control module obtains the preliminary image data, thereby ensuring the consistency of the preliminary image data. In addition, by performing a complete data integrity check on the preliminary image data, it is possible to avoid problems such as missing of the obtained preliminary image data, so as to improve the reliability of the microscope system in acquiring image data.
[0137] In step S304 of some embodiments, the device control instruction may include but is not limited to at least one of the following candidate sub-instructions: a device startup sub-instruction, a device initialization sub-instruction, a device move sub-instruction, a device parameter adjustment sub-instruction or a device shutdown sub-instruction. The specific device control instruction can be set according to the actual needs of technical personnel in this field.
[0138] See also Figure 7 In some embodiments, step S305 may include but is not limited to steps S701 to S703:
[0139] Step S701, obtaining the actual execution order and logical execution order of the device control instruction;
[0140] Step S702, determining the process call mode of the candidate sub-instruction according to the actual execution order and logical execution order of the candidate sub-instruction and the device control instruction;
[0141] Step S703: calling the target service process from the device service process according to the candidate sub-instruction and the process calling mode.
[0142] In step S701 of some embodiments, the logical execution order of the device control instruction is used to describe the logical order of execution of the candidate sub-instructions by the main control module. The logical execution order determines the basic execution relationship between each candidate sub-instruction and other candidate sub-instructions. The basic execution relationship between any two candidate sub-instructions includes but is not limited to any one of the following: first execution, later execution, or parallel execution. The actual execution order is determined according to the logical execution order. For candidate sub-instructions with a logical execution order of first execution and later execution, the actual execution order is determined according to the logical execution order. For candidate sub-instructions with a logical execution order of parallel execution, the actual execution order may include any one of the following: randomly assigning the order of order or according to a preset execution order. The actual execution order may also be determined according to other methods that can be directly obtained by those skilled in the art.
[0143] In step S703 of some embodiments, the process call mode may include but is not limited to the following two modes: asynchronous call mode and synchronous call mode. When the microscope system control program controls the candidate device by calling the device service process through the asynchronous call mode, after initiating a call request and a candidate sub-instruction to a device service process, the main control module does not need to wait for the device service process to feedback the information of completing the candidate sub-instruction, and can execute the next candidate sub-instruction, which saves the time for the microscope system control program to wait for the device service process to respond to the candidate sub-instruction, and improves the working efficiency of the microscope system. When the microscope system control program controls the candidate device by calling the device service process through the synchronous call mode, after initiating a call request and a candidate sub-instruction to a device service process, it needs to wait for the device service process to feedback the information of completing the candidate sub-instruction, and the main control module can execute the next candidate sub-instruction, so as to ensure that the device control instructions are executed in sequence, and protect the device service process from interference during the execution of the device control instructions, and ensure the integrity and reliability of the device service process in executing the device control instructions.
[0144] Steps S701 to S703 shown in the embodiment of the present application first obtain the actual execution order and logical execution order of the device control instruction, then determine the process calling mode of the candidate sub-instruction according to the candidate sub-instruction and the actual execution order of the device control instruction, and finally call the target service process from the device service process according to the candidate sub-instruction and the process calling mode. Different process calling modes can be selected for each candidate sub-instruction of the device control instruction to improve the control efficiency of the microscope system for the candidate device.
[0145] See also Figure 8 In some embodiments, step S702 may include but is not limited to steps S801 to S805:
[0146] Step S801, selecting a preceding sub-instruction and a succeeding sub-instruction from candidate sub-instructions according to an actual execution order; wherein the preceding sub-instruction is a candidate sub-instruction preceding the succeeding sub-instruction;
[0147] Step S802, selecting a previous service process from the target service process according to the previous sub-instruction;
[0148] Step S803, filtering the target execution relationship from the logical execution order according to the preceding sub-instruction and the succeeding sub-instruction;
[0149] Step S804, if the target execution relationship indicates that the subsequent sub-instruction needs to be executed according to the instruction execution status information fed back by the previous service process, then the process call mode of the previous sub-instruction is determined to be a synchronous call mode;
[0150] Step S805 , if the target execution relationship indicates that the subsequent sub-instruction does not need to be executed according to the instruction execution status information fed back by the previous service process, then the process call mode of the previous sub-instruction is determined to be an asynchronous call mode.
[0151] In step S803 of some embodiments, the target execution relationship is a basic execution relationship between a preceding sub-instruction and a succeeding sub-instruction, which is used to describe whether it is necessary to wait for the preceding sub-instruction to be executed before executing the succeeding sub-instruction.
[0152] In step S804 of some embodiments, when the target execution relationship indicates that the subsequent sub-instruction needs to be executed according to the instruction execution status information fed back by the previous service process, it can be determined that the process call mode of the previous sub-instruction is a synchronous call mode. The previous service process will send instruction execution status information to the main control module according to a specific feedback cycle, and the instruction execution status information indicates that the previous sub-instruction has been executed or the previous sub-instruction is being executed. If the instruction execution status fed back by the previous service process indicates that the previous sub-instruction has been executed, the subsequent sub-instruction is executed. If the instruction execution status fed back by the previous service process indicates that the previous sub-instruction is being executed, the subsequent sub-instruction cannot be executed. For example: the device control instruction includes a power-on sub-instruction and an index finger aperture parameter sub-instruction, wherein the power-on sub-instruction is the previous sub-instruction, and the aperture parameter setting sub-instruction is the subsequent sub-instruction. The target execution relationship is to first execute the previous sub-instruction of turning on the power, and then execute the subsequent sub-instruction of setting the aperture parameter. Then, it is necessary to set the process call mode of the power-on sub-instruction to the synchronous call mode.
[0153] In step S805 of some embodiments, when the target execution relationship indicates that the subsequent sub-instruction does not need to be executed according to the instruction execution status information fed back by the previous service process, the process call mode of the previous sub-instruction can be determined to be the asynchronous call mode. For example, the device control instruction includes a first laser energy setting sub-instruction and a second laser energy setting sub-instruction, wherein the first laser energy setting sub-instruction is the previous sub-instruction and the second laser energy setting sub-instruction is the subsequent sub-instruction, and the target execution relationship of the first laser energy setting sub-instruction and the second laser energy setting sub-instruction are executed in parallel, then the process call mode of the first laser energy setting sub-instruction is set to the asynchronous call mode.
[0154] In other embodiments, if the device control instruction includes only one sub-instruction, one of the synchronous calling mode and the asynchronous calling mode can be selected as the process calling mode.
[0155] In steps S801 to S805 shown in the embodiment of the present application, first, a preceding sub-instruction and a succeeding sub-instruction are selected from the candidate sub-instructions according to the actual execution order of the device control instruction; wherein the preceding sub-instruction is the preceding candidate sub-instruction of the succeeding sub-instruction. Then, a preceding service process is selected from the target service process according to the preceding sub-instruction, and a target execution relationship is screened from the logical execution order of the device control instruction according to the preceding sub-instruction and the succeeding sub-instruction. If the target execution relationship characterizes that the succeeding sub-instruction needs to be executed according to the instruction execution status information fed back by the preceding service process, then the process call mode of the preceding sub-instruction is determined to be a synchronous call mode; if the target execution relationship characterizes that the succeeding sub-instruction does not need to be executed according to the instruction execution status information fed back by the preceding service process, then the process call mode of the preceding sub-instruction is determined to be an asynchronous call mode. Therefore, the microscope system control method illustrated in the embodiment of the present application enables the microscope system to intelligently select the most appropriate process call mode for each candidate sub-instruction according to the actual execution order and logical execution order of the device control instructions. This intelligent process call mode selection mechanism enables the microscope system to adapt to different device control requirements, optimize the utilization efficiency of processor resources, and ensure the accuracy of control instructions and the stability of the equipment.
[0156] See also Fig. 9 In some embodiments, step S703 may also include but is not limited to steps S901 to S903:
[0157] Step S901, selecting the target service process called by the subsequent sub-instruction as the subsequent service process;
[0158] Step S902, if the process calling mode of the previous sub-instruction is the synchronous calling mode, calling the previous service process according to the previous sub-instruction, and calling the subsequent service process according to the instruction execution status information fed back by the previous service process and the subsequent sub-instruction;
[0159] Step S903: If the process calling mode of the previous sub-instruction is the asynchronous calling mode, the previous service process is called according to the previous sub-instruction, and the subsequent service process is called according to the subsequent sub-instruction.
[0160] In step S902 of some embodiments, if the calling mode of the previous sub-instruction process is a synchronous calling mode, the previous service process can be called according to the previous sub-instruction, so as to control the candidate device corresponding to the previous sub-instruction through the previous service process, and after the previous service process executes the previous sub-instruction, it will feedback the instruction execution status information to the main control module. Therefore, the subsequent sub-instruction can be executed according to the instruction execution status information fed back by the previous service process, so as to call the subsequent service process according to the subsequent sub-instruction, and then control the candidate device corresponding to the subsequent sub-instruction through the subsequent service process. For example: if the device control instruction includes an image acquisition sub-instruction and a power-off sub-instruction, wherein the image acquisition sub-instruction is the preceding sub-instruction and the power-off sub-instruction is the succeeding sub-instruction, the process calling mode of the image acquisition sub-instruction is the synchronous calling mode, the image acquisition control process is the preceding service process, and the power-off control process is the succeeding service process, then the GUI application first calls the image acquisition control process according to the image acquisition sub-instruction to control the camera to acquire image data, and receives instruction execution status information fed back by the image acquisition control process; if the instruction execution status information indicates that the image acquisition has been completed, then the power-off control process is called according to the power-off sub-instruction to turn off the power.
[0161] In step S903 of some embodiments, if the process calling mode of the previous sub-instruction is an asynchronous calling mode, the previous service process can be called according to the previous sub-instruction, and then the candidate device corresponding to the previous sub-instruction can be controlled by the previous service process. At the same time, the subsequent service process can be called according to the subsequent sub-instruction, and then the candidate device corresponding to the subsequent sub-instruction can be controlled by the subsequent service process, without waiting for the instruction execution status information fed back by the previous service process before executing the subsequent sub-instruction. For example: if the device control instruction includes a first laser energy setting sub-instruction and a second laser energy setting sub-instruction, the first laser energy setting sub-instruction asyncCall("set_power", 100, laser_1) is a prior sub-instruction, the second laser energy setting sub-instruction asyncCall("set_power", 110, laser_2) is a subsequent sub-instruction, the process calling mode of the first laser energy setting sub-instruction is an asynchronous calling mode, the first laser control process laser_1 is a previous service process, and the second laser control process laser_2 is a previous service process, then the GUI application executes the first laser energy setting sub-instruction and the second laser energy setting sub-instruction respectively, so as to call the first laser control process laser_1 by calling the instruction asyncCall("set_power", 100, laser_1), and use the second laser control process laser_2 by calling the instruction asyncCal l("set_power", 110, laser_2), so as to set the energies of the two lasers respectively.
[0162] Steps S901 to S903 shown in the embodiment of the present application select the target service process called by the subsequent sub-instruction as the subsequent service process, and determine how to call the target service process according to the candidate sub-instructions and the process calling mode. If the process calling mode of the previous sub-instruction is a synchronous calling mode, the previous service process is called according to the previous sub-instruction, so as to call the subsequent service process according to the instruction execution status information fed back by the previous service process and the subsequent sub-instruction; if the process calling mode of the previous sub-instruction is an asynchronous calling mode, the previous service process is called according to the previous sub-instruction, and the subsequent service process is called according to the subsequent sub-instruction. Therefore, the microscope system control method shown in the embodiment of the present application enables the microscope system to flexibly call the device service process according to the candidate sub-instructions and the process calling mode of the candidate sub-instructions, so as to achieve efficient and accurate device control, and improve the response speed and processing power of the microscope system.
[0163] See also Fig.10 In some embodiments, after step S306, the microscope system control method further includes but is not limited to steps S1001 to S1007:
[0164] Step S1001, obtaining a system exit instruction;
[0165] Step S1002, obtaining the device operation status of the candidate device according to the exit system instruction;
[0166] Step S1003, calling a selected service process from the device service process according to the device operation state; wherein the device operation state of the selected service process is a boot state;
[0167] Step S1004, sending the exit system instruction to the selected service process, so as to shut down the candidate device through the selected service process;
[0168] Step S1005, receiving operation feedback information sent by the selected service process; wherein the operation feedback information represents the power on / off status of the candidate device;
[0169] Step S1006, updating the device operation status of the candidate device according to the operation feedback information to obtain an updated operation status;
[0170] Step S1007: If the update running status of all candidate devices is the shutdown status, the selected service process is controlled to perform a shutdown operation.
[0171] In step S1001 of some embodiments, the exit system instruction can also be generated by a user input command. In addition, the exit system instruction can be generated by an automated script when a candidate device stops responding or works abnormally, so as to shut down the abnormal candidate device through the exit system instruction, thereby preventing the problem from spreading to the protection microscope system control program or other candidate devices, thereby protecting the safety of the entire microscope system.
[0172] In step S1002 of some embodiments, the device operating state is any one of the following: a power-on state or a power-off state.
[0173] In step S1004 of some embodiments, the shutdown operation may include but is not limited to at least one of the following: saving current configuration information, data backup, ending the current task, turning off the device power or releasing occupied resources. The specific shutdown operation can be set by technical personnel in this field according to actual needs, and this application does not impose any restrictions.
[0174] In step S1005 of some embodiments, after the selected service process completes the shutdown operation, the device operation state is changed from the power-on state to the power-off state, and the device operation state is sent to the main control module in the form of operation feedback information. Therefore, the main control module can determine the power on and off status of the candidate device through the operation feedback information.
[0175] In step S1006 of some embodiments, the main control module can also obtain the device operating status of all candidate devices according to a specific inspection cycle, and update the device operating status of the candidate devices to obtain an updated operating status, and then update the selected service process according to the updated operating status to obtain an updated service process, and send an exit system instruction to the updated service process to control the candidate devices to perform a shutdown operation through the updated service process.
[0176] After step S1006 in some embodiments, the microscope system control method further includes shutting down the D-Bus daemon and exiting the microscope system.
[0177] In the steps S1001 to S1007 shown in the embodiment of the present application, the device operation status of the candidate device is first obtained by exiting the system instruction, and the selected service process is called from the device service process according to the device operation status; wherein the device operation status of the selected service process is the power-on state. Then, the exit system instruction is sent to the selected service process to shut down the candidate device through the selected service process, and the operation feedback information sent by the selected service process is received; wherein the operation feedback information characterizes the power on and off status of the candidate device. Finally, the device operation status of the candidate device is updated according to the operation feedback information to obtain the updated operation status. If the updated operation status of all candidate devices is the shutdown state, the selected service process is controlled to perform the shutdown operation. Therefore, the microscope system control method shown in the embodiment of the present application can ensure that all devices are safely shut down before shutting down the device, avoid equipment damage or data loss, and ensure that all devices can exit the microscope system after being shut down safely and orderly, thereby protecting the entire microscope system from unexpected effects.
[0178] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned microscope system control method is implemented.
[0179] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0180] The microscope system control method, microscope system, and computer-readable storage medium provided in the embodiment of the present application first connect the candidate device to the bus, obtain the current configuration information of at least two candidate devices, and control the device service process of each candidate device to perform a startup operation according to the current configuration information. Then, the device control instruction is received, and the message publishing and subscription mode calls at least one target service process from the device service process according to the device control instruction, controls the candidate device corresponding to the device control instruction through each target service process, and establishes communication with the candidate device through the device service process. Therefore, the microscope system control method shown in the embodiment of the present application, after receiving the device control instruction, the microscope system control program only needs to call the target service process to realize the control of the candidate device that needs to execute the device control instruction, simplifies the control program of the microscope system, and reduces the complexity of the microscope system control program; and when the candidate device changes, only the device service process of the changed device needs to be modified, and the control of the candidate device can be realized through the modified device service process, without modifying the control program of the microscope system and other device service processes, thereby improving the adaptability and flexibility of the microscope system to device changes.
[0181] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0182] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0183] The system embodiment described above is merely illustrative, wherein the modules and submodules described as separate components may or may not be physically separated, i.e., may be located in one place, or may be distributed on multiple network units. Some or all of the modules and submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0184] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, the functional modules and sub-modules in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0185] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps, modules or submodules is not necessarily limited to those steps, modules or submodules clearly listed, but may include other steps, modules or submodules that are not clearly listed or inherent to these processes, methods, products or devices.
[0186] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "At least one of the following (items)" or similar expressions refers to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0187] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules and submodules is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the system, module or submodule can be electrical, mechanical or other forms.
[0188] The modules and submodules described above as separate components may or may not be physically separated, and the components shown as modules or submodules may or may not be physical modules or physical submodules, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules and submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0189] In addition, each functional module and submodule in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules and submodules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0190] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0191] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A microscope system control method, characterized in that: The microscope system comprises: a bus and at least two candidate devices connected to the bus, wherein the candidate devices are component devices for constructing the microscope system, and the method comprises: Obtaining current configuration information of at least two of the candidate devices; Controlling the device service process of each candidate device to perform a startup operation according to the current configuration information; Establishing communication with the candidate device through the device service process; Receive device control instructions; Calling at least one target service process from the device service process according to the device control instruction; The candidate device corresponding to the device control instruction is controlled through each target service process.
2. The method according to claim 1, characterized in that The device control instruction includes at least one candidate sub-instruction, and calling at least one target service process from the device service process according to the device control instruction includes: Obtaining the actual execution order and the logical execution order of the device control instructions; Determine the process call mode of the candidate sub-instruction according to the actual execution order and the logical execution order of the candidate sub-instruction and the device control instruction; The target service process is called from the device service process according to the candidate sub-instruction and the process calling mode.
3. The method according to claim 2, characterized in that The process call mode includes: an asynchronous call mode and a synchronous call mode; the process call mode of the candidate sub-instruction is determined according to the actual execution order and the logical execution order of the candidate sub-instruction and the device control instruction, including: Selecting a preceding sub-instruction and a succeeding sub-instruction from the candidate sub-instructions according to the actual execution order; wherein the preceding sub-instruction is the candidate sub-instruction preceding the succeeding sub-instruction; Selecting a previous service process from the target service process according to the previous sub-instruction; Filtering a target execution relationship from the logic execution sequence according to the preceding sub-instruction and the succeeding sub-instruction; If the target execution relationship representation requires executing the subsequent sub-instruction according to the instruction execution status information fed back by the previous service process, determining that the process call mode of the previous sub-instruction is the synchronous call mode; If the target execution relationship indicates that the subsequent sub-instruction does not need to be executed according to the instruction execution status information fed back by the previous service process, then the process calling mode of the previous sub-instruction is determined to be the asynchronous calling mode.
4. The method according to claim 3, characterized in that The calling the target service process from the device service process according to the candidate sub-instruction and the process calling mode includes: Selecting the target service process called by the subsequent sub-instruction as the subsequent service process; If the process calling mode of the preceding sub-instruction is the synchronous calling mode, calling the preceding service process according to the preceding sub-instruction, so as to call the succeeding service process according to the instruction execution status information fed back by the preceding service process and the succeeding sub-instruction; If the process calling mode of the preceding sub-instruction is the asynchronous calling mode, the preceding service process is called according to the preceding sub-instruction, and the succeeding service process is called according to the succeeding sub-instruction.
5. The method according to claim 4, characterized in that The microscope system further includes a display connected to the bus. After establishing communication with the candidate device through the device service process, the method further includes: Acquire the information notification mode of the device service process according to the current configuration information; wherein the information notification mode is a message publishing and subscription mode; Receiving device feedback information sent by the device service process according to the message publishing and subscription mode; wherein the device feedback information includes device status information and image acquisition parameters of the candidate device; Visually displaying the device status information through the display to obtain a device status view; The image data collected by the candidate device is acquired according to the image acquisition parameters to obtain target image data.
6. The method according to claim 5, characterized in that The microscope system further includes a shared memory module, the device control process of the candidate device includes an image acquisition control process, the shared memory module is communicatively connected to the image acquisition control process, the image acquisition parameters include acquired image information and image identification information; the image data acquired by the candidate device according to the image acquisition parameters is acquired to obtain the target image data, including: Locking the shared memory module according to the acquired image information, and acquiring preliminary image data from the shared memory module according to the image identification information; Performing data integrity check on the preliminary image data according to the image identification information to obtain data verification information; wherein the data verification information represents the integrity of the preliminary image data; If the data verification information indicates that the preliminary image data is complete, the shared memory module is unlocked, and the preliminary image data is used as the target image data.
7. The method according to claim 5, characterized in that After controlling the candidate device corresponding to the device control instruction through the target service process, the method further includes: Get the exit system instruction; Acquire the device operation status of the candidate device according to the exit system instruction; Calling a selected service process from the device service process according to the device operation state; wherein the device operation state of the selected service process is a power-on state; Sending the exit system instruction to the selected service process, so as to shut down the candidate device through the selected service process; Receiving operation feedback information sent by the selected service process; wherein the operation feedback information represents the power on / off status of the candidate device; Update the device operation status of the candidate device according to the operation feedback information to obtain an updated operation status; If the update running status of all the candidate devices is the shutdown state, control the selected service process to perform a shutdown operation.
8. The method according to claim 1, characterized in that: The microscope control system further includes a process change module, and the process change module is connected to the candidate devices through the bus; after the device service process of each candidate device is controlled to perform a startup operation according to the current configuration information, the method further includes: Obtaining a process change instruction; wherein the process change instruction is used to change the device service process of the selected device, and the current configuration information of the selected device cannot control the device service process to perform a startup operation; Reading a configuration file of the system according to the process change instruction; wherein the configuration file includes a device list and historical configuration information, and the device list stores candidate identification information of the candidate device; Filtering target identification information from the candidate identification information according to the process change instruction; Filtering target configuration information from the historical configuration information according to the target identification information; Filtering a selected service process from the device service processes according to the target configuration information; Calling the process change module through the process change instruction, so as to associate the selected device and the selected service process through the process change module to obtain an associated service process; The selected device is managed through the associated service process.
9. A microscope system, characterized in that The system is used to implement the microscope system control method according to any one of claims 1 to 8, and the system includes a main control module, a bus, and at least two candidate devices connected to the bus, and the main control module includes: A configuration information acquisition submodule, used to acquire current configuration information of at least two of the candidate devices; A process startup submodule, used for controlling the device service process of each candidate device to perform a startup operation according to the current configuration information; A communication establishment submodule, used to establish communication with the candidate device through the device service process; The command receiving submodule is used to receive the device control command; A process calling submodule, used to call at least one target service process from the device service process according to the device control instruction; The device control submodule is used to control the candidate device corresponding to the device control instruction through each target service process.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the microscope system control method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method and system for data exchange when a call is established on a non-class A cellular endpoint
EP2088739A1
Image data storage controller
JP1997204326A
Shutter-type adaptive three-dimensional display system based on medical microscopic imaging
US11175490B1
Multifunctional apparatus, method for controlling multifunctional apparatus, control apparatus, method for controlling control apparatus, system for controlling multifunctional apparatus, control program, and computer-readable storage medium
US20070283295A1
System and method of acquiring images with a rolling shutter camera while asynchronously sequencing microscope devices
US20150301328A1