Laboratory program control instrument control management system and control method
Through Kubernetes cluster and Docker containerization technology, the management of laboratory program-controlled instruments and equipment is solved, and the problems of low efficiency and poor consistency of multi-device management are achieved, achieving efficient and flexible instrument management and scalability improvement.
Patent Information
- Application Number
- CN202411678917.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art is difficult to efficiently manage and control multiple experimental equipment, resulting in low efficiency, high inconsistency, and poor system scalability and portability.
The Kubernetes cluster management laboratory program-controlled instruments and equipment are adopted, and the instrument control software is independently packaged through Docker containerization technology to achieve the independence of each software environment and dependency library, and to provide remote management and monitoring functions through a centralized console.
It improves the consistency, flexibility and convenience of program-controlled instrument management, improves equipment scheduling and management efficiency, enhances the scalability and portability of the system, and is suitable for large-scale multi-instrument experimental environments.
Smart Images

Figure CN119511908A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a laboratory program-controlled instrument control management system and a control method, belonging to the field of program-controlled instrument control. Background Art
[0002] At present, the widely used program-controlled instruments in laboratories, such as oscilloscopes, signal generators, spectrum analyzers, etc., rely on highly accurate control systems. Traditional control management methods are usually based on the operation and control interface of a single device. However, with the expansion of experimental scale, the increase of experimental complexity and the increase of automation requirements, how to efficiently manage and control multiple experimental devices has become a major challenge.
[0003] In the existing technology, the traditional manual operation mode is inefficient, difficult to monitor the instrument status in real time, and there is a large inconsistency in the operation between devices. The traditional single management mode gradually exposed the following problems: lack of efficient instrument integration and control means; low efficiency in scheduling and management of equipment resources; poor scalability and portability of the system. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a laboratory programmable instrument control management system and control method, which can realize automatic management and scheduling according to experimental requirements, improve the consistency, flexibility and convenience of programmable instrument management, improve the scheduling and management efficiency of programmable instruments, and enhance the scalability and portability of the system, so as to be suitable for large-scale, multi-instrument experimental environments.
[0005] In order to solve the above technical problems, the technical solution of the present invention is: On the one hand, the present invention provides a laboratory program-controlled instrument control and management system, which includes a Kubernetes cluster master node, a host computer and a laboratory program-controlled instrument equipment group; The Kubernetes cluster master node is used to manage and schedule each node resource and container instance; The host computer is used to deploy Kubernetes Namespace slave nodes, Docker Runtime environment and instrument control software; The instrument control software is used to establish a TCP communication connection between the host computer and the laboratory program-controlled instrument equipment group and send commands to control the laboratory program-controlled instrument equipment group; The Docker Runtime environment is used to independently package the instrument control software of each program-controlled instrument into a Docker container; The Kubernetes Namespace slave node is used to host the operation of the Docker container.
[0006] Furthermore, a centralized console is deployed on the master node of the Kubernetes cluster, and the centralized console is used to remotely manage and monitor the laboratory program-controlled instrument equipment group.
[0007] Furthermore, the centralized console remotely manages and monitors the laboratory program-controlled instrument equipment group, including instrument status monitoring, instrument remote control, container scheduling management, alarms and logs; The instrument status monitoring includes real-time monitoring of the operating status and resource usage of laboratory program-controlled instruments; The remote control of the instrument includes issuing remote control commands through a Web control interface; The container scheduling management includes automatic scheduling and fault recovery of containers; The alarm and log include real-time monitoring of the status of laboratory program-controlled instruments and issuing alarms and providing operation logs when failures occur.
[0008] Furthermore, the remote control command includes a start instrument command, a stop instrument command and a restart instrument command.
[0009] Another aspect of the present invention provides a control method for a laboratory program-controlled instrument control management system, which comprises the following steps: Step S1, the user logs in to the centralized console; Step S2, selecting and monitoring the status of laboratory program-controlled instruments; Step S3: issuing remote control commands through a centralized console; Step S4: Schedule and control the Docker container through the Kubernetes API according to experimental requirements, and the tasks of the laboratory program-controlled instruments run in independent containers.
[0010] Furthermore, the containerization method of the Docker container comprises the following steps: Package the laboratory program instrument control software and dependent libraries into a Docker image; Define the image building process through Dockerfile; Start the corresponding Docker container on the host computer and control the laboratory program-controlled instrument equipment group.
[0011] Furthermore, the scheduling and control of the Docker container includes starting the container, stopping the container, and automatically expanding and shrinking the container.
[0012] By adopting the above technical scheme, the present invention independently packages each instrument control software in the laboratory into a Docker container, thereby realizing the independence of the operating environment and dependent libraries of each instrument control software, improving the scalability and portability of the system, and managing the deployment, expansion, monitoring and scheduling of Docker containers through Kubernetes, thereby realizing high availability and flexible expansion of the system, being able to realize automated management and scheduling according to experimental requirements, improving the environmental consistency of program-controlled instrument control, and providing a unified Web control interface by deploying a centralized console, so that experimenters can access and manage various program-controlled instruments in the laboratory through a browser, thereby improving the convenience and efficiency of scheduling and management of program-controlled instruments, and being suitable for multi-instrument management scenarios in large laboratories. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a principle block diagram of the laboratory program-controlled instrument control and management system of the present invention; Figure 2 It is a schematic diagram of the laboratory program-controlled instrument control management system of the present invention; Figure 3 It is a control method flow chart of the laboratory program-controlled instrument control management system of the present invention; Figure 4 This is a flow chart of the containerization method of the Docker container of the present invention. DETAILED DESCRIPTION
[0014] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments in conjunction with the accompanying drawings.
[0015] Embodiment 1 like Figure 1 As shown, this embodiment provides a laboratory program-controlled instrument control and management system, which includes a Kubernetes cluster master node, a host computer and a laboratory program-controlled instrument equipment group; like Figure 1 As shown, the Kubernetes cluster master node of this embodiment is used to automatically and customized manage and schedule each node resource and container instance, and perform operation, monitoring and alarm operations.
[0016] like Figure 2 As shown, the host computer of this embodiment is used to deploy Kubernetes Namespace slave nodes, DockerRuntime environment and instrument control software, and the number of host computers is not limited; The instrument control software is used to establish a TCP communication connection between the host computer and the laboratory program-controlled instrument equipment group and send commands to control the laboratory program-controlled instrument equipment group; The Docker Runtime environment is used to package the instrument control software of each program-controlled instrument independently into a Docker container, ensuring that the operating environment of the instrument control software is independent of the dependent libraries, making it easier to port and expand. Kubernetes Namespace slave nodes are used to host the operation of Docker containers; The laboratory program-controlled instrument equipment group is not limited to any type and only needs to support remote control and TCP communication.
[0017] Among them, Docker is a lightweight containerization technology that encapsulates software and all its dependencies through containers to ensure that the software can run consistently under different operating systems. Its core components include images, containers, and container repositories. Docker images contain the software's execution environment and dependency libraries, while containers are instantiations of images that run in an isolated environment. For laboratory programmable instrument control systems, Docker containerization can isolate different instrument control software, avoid dependency conflicts, and improve the portability and security of the system.
[0018] Kubernetes is an open source container orchestration platform that is mainly used to automate the deployment, expansion, and management of containerized applications. Kubernetes manages the deployment, expansion, monitoring, and scheduling of Docker containers to ensure high availability and flexible expansion of the system. It provides functions such as load balancing, automatic recovery, and rolling updates for containers, which can help laboratories manage multiple Docker containers. Through Kubernetes, laboratories can easily achieve unified management of multiple program-controlled instruments, efficient scheduling, and dynamic resource allocation, and automatically perform failover when program-controlled instruments fail.
[0019] The Kubernetes cluster can integrate CI / CD Jenkins to achieve continuous integration automation. It can use Grafana and Prometheus to display monitoring data on the dashboard and set alarm rules. It can operate and maintain most core functions and manage program-controlled instruments through a friendly front-end Web control interface.
[0020] Kubernetes is responsible for managing the operating status of multiple instrument control containers and enables efficient management of the system through the following functions: Automatic expansion: Dynamically expand the number of containers to accommodate experiments of different scales according to the needs of experimental tasks; Load balancing: Kubernetes can automatically balance resource usage in the cluster to ensure that each instrument control container has enough resources to run; Automatic fault recovery: When an instrument control container fails, Kubernetes automatically restarts the container to ensure high availability of the system.
[0021] like Figure 2 As shown, the instrument control software of this embodiment uses Python scripts. Laboratory program-controlled instruments usually support remote control through the TCP / IP protocol. In order to achieve program management of program-controlled instruments, this embodiment uses Python scripts and TCP communication to control laboratory program-controlled instruments. This solution is simple and effective, and the portability of Python scripts in different experimental environments can be ensured through containerization technology.
[0022] In this embodiment, the host computer establishes a TCP connection with the program-controlled instrument through a Python script and sends SCPI commands to control the program-controlled instrument, which specifically includes the following steps: Define the instrument's IP address and port number; Create a TCP / IP socket; Connect to the instrument; Send a command; Receive response; Close the connection.
[0023] In this embodiment, the network configuration and communication connection between the program-controlled instrument and the host computer are as follows: Network connection: The program-controlled instrument and the host computer are connected to the laboratory LAN via Ethernet, and the program-controlled instrument has a static IP address; Test communication: Use the ping command to ensure that the host computer can successfully access the IP address of the programmable instrument.
[0024] In this embodiment, in order to improve the consistency and portability of the operating environment, the Python script is containerized through Docker, and the method is as follows: Package the Python script into a Dockerfile; Build and run the container.
[0025] like Figure 2 As shown, a centralized console is deployed on the master node of the Kubernetes cluster of this embodiment, and the centralized console is used to remotely manage and monitor the laboratory program-controlled instrument equipment group, including instrument status monitoring, instrument remote control, container scheduling management, alarms and logs; Instrument status monitoring includes real-time monitoring of the operating status and resource usage of laboratory program-controlled instruments, such as CPU and memory usage; Instrument remote control includes issuing remote control commands through the Web control interface. Remote control commands include instrument start command, instrument stop command and instrument restart command. Container scheduling management includes the centralized console interacting with the Kubernetes cluster to achieve automatic scheduling and fault recovery of containers; Alarms and logs include real-time monitoring of the status of laboratory program-controlled instruments and issuing alarms when failures occur, and providing operation logs for auditing.
[0026] The technology stack and framework of the centralized console in this embodiment are: Front-end: The Web control interface is built with React and Vue.js. The Web control interface is used for experimenters to access and manage various program-controlled instruments in the laboratory through a browser; Backend: interact with Kubernetes API based on Node.js, Python Flask, and manage the control container of program-controlled instruments; Database: stores program-controlled instrument information, operation logs and user authority data.
[0027] In this embodiment, you can refer to the following open source or community version of the container management platform to help simplify system development and operation and maintenance: Rainbond: provides application management and Kubernetes resource scheduling capabilities in multi-cloud environments. KubeSphere: has powerful multi-cluster management and container monitoring capabilities, suitable for large-scale instrument management; Rancher - simplifies Kubernetes management and is suitable for distributed lab environments. Portainer: Manage lightweight containers, suitable for small labs.
[0028] In this embodiment, the centralized console is integrated with the containerized Python script, specifically including the following: Environment setup: Deploy a Kubernetes cluster to manage the programmable instrument control containers; Deploy a centralized console on the Kubernetes cluster to control laboratory program-controlled instruments through the front-end web interface and back-end API; Container Scheduling: The centralized console dynamically schedules containers through the Kubernetes API, including starting containers, stopping containers, and automatically scaling up and down. Python scripts run through containers and are managed through the centralized console's web control interface.
[0029] Embodiment 2 like Figure 3 As shown, this embodiment provides a control method of the laboratory program-controlled instrument control management system as in Embodiment 1, which comprises the following steps: Step S1, the user logs in to the centralized console; Step S2, selecting and monitoring the status of laboratory program-controlled instruments; Step S3: issuing remote control commands through the centralized console, such as starting an instrument or modifying parameters; Step S4: Schedule and control the Docker container through the Kubernetes API according to experimental requirements, including starting containers, stopping containers, and automatically expanding and shrinking capacity, to ensure that the tasks of different laboratory program-controlled instruments run in independent containers.
[0030] In this embodiment, the control software of each instrument and its dependent libraries are containerized through Docker, which can ensure the consistent operation of the instrument control software on different operating systems and hardware platforms. Figure 4 As shown, the containerization method of the Docker container of this embodiment includes the following steps: Package the laboratory program instrument control software and dependent libraries into a Docker image; Define the image building process through Dockerfile; Start the corresponding Docker container on the host computer to control the laboratory program-controlled instrument equipment group.
[0031] The working principle of the present invention is as follows: Users log in to the centralized console, select and monitor the status of laboratory program-controlled instruments, issue remote control commands through the centralized console, and schedule and control Docker containers through the Kubernetes API according to experimental requirements. Tasks of different laboratory program-controlled instruments run in independent containers.
[0032] By packaging each instrument control software in the laboratory as a Docker container, the operating environment and dependency library of each instrument control software are independent, which improves the scalability and portability of the system. By managing the deployment, expansion, monitoring and scheduling of Docker containers through Kubernetes, the system's high availability and flexible expansion are achieved. It can realize automated management and scheduling according to experimental requirements, and improve the environmental consistency of program-controlled instrument control. By deploying a centralized console and providing a unified Web control interface, it is convenient for experimenters to access and manage various program-controlled instruments in the laboratory through a browser, which improves the convenience and efficiency of scheduling and management of program-controlled instruments. It is suitable for multi-instrument management scenarios in large laboratories.
[0033] The specific embodiments described above further illustrate the technical problems, technical solutions and beneficial effects solved by the present invention. It should be understood that the above are only specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A laboratory program-controlled instrument control and management system, characterized in that: It includes the Kubernetes cluster master node, host computer, and laboratory program-controlled instrument equipment group; The Kubernetes cluster master node is used to manage and schedule each node resource and container instance; The host computer is used to deploy Kubernetes Namespace slave nodes, Docker Runtime environment and instrument control software; The instrument control software is used to establish a TCP communication connection between the host computer and the laboratory program-controlled instrument equipment group and send commands to control the laboratory program-controlled instrument equipment group; The Docker Runtime environment is used to independently package the instrument control software of each program-controlled instrument into a Docker container; The Kubernetes Namespace slave node is used to host the operation of the Docker container.
2. The laboratory program-controlled instrument control and management system according to claim 1, characterized in that: A centralized console is deployed on the master node of the Kubernetes cluster, and the centralized console is used to remotely manage and monitor the laboratory program-controlled instrument equipment group.
3. The laboratory program-controlled instrument control and management system according to claim 2, characterized in that: The centralized console remotely manages and monitors the laboratory program-controlled instrument equipment group, including instrument status monitoring, instrument remote control, container scheduling management, alarms and logs; The instrument status monitoring includes real-time monitoring of the operating status and resource usage of laboratory program-controlled instruments; The remote control of the instrument includes issuing remote control commands through a Web control interface; The container scheduling management includes automatic scheduling and fault recovery of containers; The alarm and log include real-time monitoring of the status of laboratory program-controlled instruments and issuing alarms and providing operation logs when failures occur.
4. The laboratory program-controlled instrument control and management system according to claim 3, characterized in that: The remote control command includes a start instrument command, a stop instrument command and a restart instrument command.
5. A control method for a laboratory program-controlled instrument control management system according to any one of claims 1 to 4, characterized in that: It includes the following steps: Step S1, the user logs in to the centralized console; Step S2, selecting and monitoring the status of laboratory program-controlled instruments; Step S3: issuing remote control commands through a centralized console; Step S4: Schedule and control the Docker container through the Kubernetes API according to experimental requirements, and the tasks of the laboratory program-controlled instruments run in independent containers.
6. The control method according to claim 5, characterized in that: The containerization method of the Docker container comprises the following steps: Package the laboratory program instrument control software and dependent libraries into a Docker image; Define the image building process through Dockerfile; Start the corresponding Docker container on the host computer and control the laboratory program-controlled instrument equipment group.
7. The control method according to claim 5, characterized in that: The scheduling and control of the Docker container includes starting the container, stopping the container, and automatically expanding and shrinking the container.