Medical laboratory automation system based on OPC

By adopting the OPC protocol and intelligent scheduling module in the pharmaceutical laboratory automation system, combined with PLC, AGV and collaborative robots, real-time data interaction and closed-loop control are constructed, which solves the problems of response delay and insufficient intelligence in the existing system, realizes efficient and stable experimental task execution and data reliability, and improves the level of laboratory automation.

CN121559957APending Publication Date: 2026-02-24NINGBO XINGBOYUAN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511690607.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing automated systems for pharmaceutical laboratories suffer from response delays and complex synchronization logic at the information interaction level, lacking intelligent scheduling and adaptive capabilities. This results in insufficient system flexibility, an inability to meet the real-time and reliability requirements of pharmaceutical experiments, low overall intelligence levels, large human operation errors, and low efficiency.

Method used

The OPC protocol is used to realize real-time data interaction between Java application and WinCC configuration software. Combined with intelligent scheduling module and fault-tolerant control module, and using PLC control module, AGV automatic transportation unit and collaborative robot operation unit, a closed-loop control structure of perception-decision-execution-feedback is constructed through SLAM navigation technology and parameter self-learning function. The MQTT protocol gateway and real-time stream processing platform are integrated to support real-time stream processing and early warning functions.

Benefits of technology

It enables efficient and stable execution of medical experimental tasks, reduces human intervention and errors, improves the automation and intelligence of the laboratory, ensures the real-time nature and reliability of data, and enhances experimental efficiency and result repeatability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121559957A_ABST
    Figure CN121559957A_ABST
Patent Text Reader

Abstract

The invention discloses a medical laboratory automation system based on OPC. The medical laboratory automation system comprises an upper computer control layer, a business logic layer, a communication layer, an execution layer and a database layer. The upper computer control layer adopts WinCC configuration software to realize experiment monitoring and visualization; the business logic layer is responsible for task scheduling management based on a Java application program; the communication layer realizes real-time data interaction among the layers through an OPC protocol; the execution layer comprises a PLC control module, an AGV transportation unit and a collaborative robot unit, and completes experiment operation in a collaborative manner. And the database layer stores the whole-process data. According to the system, by establishing an OPC UA real-time communication link between Java and WinCC, instruction and state feedback delay is remarkably reduced, and data synchronization reliability is ensured; an intelligent scheduling algorithm and a fault-tolerant control mechanism are combined to realize efficient execution of tasks and dynamic allocation of resources; by constructing a complete processing closed loop, the automation and intelligence level of a medicine laboratory is effectively improved, manual intervention is greatly reduced, and the experiment efficiency and the result reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pharmaceutical laboratory automation control technology, and more specifically, to an OPC-based pharmaceutical laboratory automation system. Background Technology

[0002] With the rapid development of technologies such as pharmaceutical research and development and gene sequencing, laboratories are facing a dramatic increase in operational throughput and data complexity. Traditional pharmaceutical laboratories rely heavily on manual labor for material handling, instrument operation, and data recording. This approach is not only inefficient but also inherently flawed, with significant human error and a high risk of sample cross-contamination, becoming a bottleneck for improving research efficiency and data quality.

[0003] To address these challenges, laboratory automation systems have emerged. Existing technologies have attempted to utilize industrial configuration software (such as WinCC) for upper-level monitoring and introduce AGVs and collaborative robots to perform physical operations. However, these systems have significant shortcomings in information exchange, particularly between the Java application responsible for business logic and the WinCC system responsible for monitoring, which often requires data exchange via database transfers. This indirect communication method leads to significant response delays and complex synchronization logic, making it difficult to meet the stringent requirements of real-time process control and data reliability in pharmaceutical experiments.

[0004] Furthermore, existing automation solutions still fall short in terms of overall intelligence. Most systems can only achieve the mechanical repetition of preset processes, lacking intelligent scheduling of experimental tasks, adaptive adjustment of process parameters, and autonomous fault tolerance in abnormal situations. This makes the systems inflexible when facing complex and ever-changing experimental processes, with limited full automation, failing to fundamentally liberate manpower and maximize the input-output ratio of experiments. Summary of the Invention

[0005] In view of the above-mentioned technical problems in related technologies, the present invention proposes an OPC-based pharmaceutical laboratory automation system, which can overcome the above-mentioned shortcomings of the prior art.

[0006] To achieve the above-mentioned technical objectives, the technical solution of the present invention is implemented as follows: An OPC-based automated system for pharmaceutical laboratories; This OPC-based pharmaceutical laboratory automation system includes: The host computer control layer uses WinCC configuration software for monitoring and visual control of experimental tasks; The business logic layer, using Java applications, is used for the generation, scheduling, and management of experimental tasks. The communication layer uses the OPC protocol to realize real-time data interaction between the business logic layer and the host computer control layer. The execution layer includes a PLC control module, an AGV automated transport unit, and a collaborative robot operation unit. The PLC control module is used to receive control commands from the host computer control layer and drive the AGV automated transport unit and the collaborative robot operation unit to perform experimental operations. The database layer is used to store experimental task data, equipment status data, and experimental result data. The business logic layer sends task instructions to the host computer control layer through the communication layer. The host computer control layer controls the execution layer to complete the experimental task through the PLC control module and feeds back the task execution status to the business logic layer in real time through the communication layer.

[0007] Furthermore, the communication layer adopts the OPC UA protocol and uses the Eclipse Milo SDK to implement a secure communication connection between the Java application and the WinCC configuration software; the communication layer also integrates an MQTT protocol gateway to publish device status and experimental data to the message middleware, supporting real-time stream processing and early warning functions.

[0008] Furthermore, the business logic layer includes an intelligent scheduling module and a fault-tolerant control module; The intelligent scheduling module is used to dynamically generate task queues and allocate resources based on experiment type, equipment status and historical execution data. It also integrates a machine learning model to predict task execution time and perform dynamic task scheduling and path planning based on reinforcement learning algorithms. The fault-tolerant control module is used to perform transactional rollback operations or enable redundant execution mechanisms according to predefined rollback strategies when task execution is abnormal, and manages the task execution status through a state machine. When the task times out or the equipment fails, it automatically triggers rollback or switches to backup equipment for execution.

[0009] Furthermore, the AGV automated transport unit adopts SLAM navigation technology and can dynamically adjust its path according to upper-level instructions to avoid obstacles or contaminated areas.

[0010] Furthermore, the collaborative robot operating unit has a parameter self-learning function, which can adjust the movement speed, acceleration or operating trajectory according to the optimized parameters from the business logic layer.

[0011] Furthermore, the database layer adopts a relational database and stores structured data including experimental master data, task execution logs, equipment operating parameters, and audit trail information; and the database layer is also connected to a real-time stream processing platform for performing anomaly detection and predictive maintenance analysis on sensor data.

[0012] Furthermore, the system is also equipped with a data interface for integration with LIMS or ELN systems, enabling bidirectional synchronization of experimental tasks and result data through a RESTful API.

[0013] Furthermore, the PLC control module in the execution layer communicates with the AGV automated transport unit and the collaborative robot operation unit via industrial Ethernet to achieve hard real-time safety interlocking and status monitoring.

[0014] Furthermore, the business logic layer is built using the Spring Boot framework and uses OPC UA client subscription and read / write services to achieve variable-level data interaction with the host computer control layer.

[0015] Furthermore, the system forms a closed-loop control structure of "perception-decision-execution-feedback" during task execution, realizing automated and intelligent management of the entire experimental process.

[0016] The beneficial effects of this invention are as follows: By establishing a real-time direct communication link between Java and WinCC based on OPC UA, the latency of instruction issuance and status feedback is significantly reduced and data synchronization is more reliable; furthermore, combined with intelligent scheduling and fault tolerance mechanisms, efficient and stable execution of experimental tasks and dynamic optimization of resource allocation are achieved; finally, by constructing a closed-loop control of perception, decision-making, execution, and feedback, the automation and intelligence levels of medical laboratories are comprehensively improved, effectively reducing manual intervention and errors, and improving experimental efficiency and result repeatability. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a system architecture diagram of an OPC-based pharmaceutical laboratory automation system according to an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] like Figure 1 As shown, an OPC-based pharmaceutical laboratory automation system according to an embodiment of the present invention includes: The host computer control layer uses WinCC configuration software for monitoring and visual control of experimental tasks; The business logic layer, using Java applications, is used for the generation, scheduling, and management of experimental tasks. The communication layer uses the OPC protocol to realize real-time data interaction between the business logic layer and the host computer control layer. The execution layer includes a PLC control module, an AGV automated transport unit, and a collaborative robot operation unit. The PLC control module is used to receive control commands from the host computer control layer and drive the AGV automated transport unit and the collaborative robot operation unit to perform experimental operations. The database layer is used to store experimental task data, equipment status data, and experimental result data. The business logic layer sends task instructions to the host computer control layer through the communication layer. The host computer control layer controls the execution layer to complete the experimental task through the PLC control module and feeds back the task execution status to the business logic layer in real time through the communication layer.

[0021] According to an embodiment of the present invention, a pharmaceutical laboratory automation system based on OPC is provided. In a specific embodiment, the communication layer adopts the OPC UA protocol and implements a secure communication connection between the Java application and the WinCC configuration software through the Eclipse Milo SDK. Furthermore, the communication layer also integrates an MQTT protocol gateway for publishing device status and experimental data to a message middleware, supporting real-time stream processing and early warning functions.

[0022] According to an embodiment of the present invention, a pharmaceutical laboratory automation system based on OPC is provided. In a specific embodiment, the business logic layer includes an intelligent scheduling module and a fault-tolerant control module. The intelligent scheduling module is used to dynamically generate task queues and allocate resources based on experiment type, equipment status and historical execution data. It also integrates a machine learning model to predict task execution time and perform dynamic task scheduling and path planning based on reinforcement learning algorithms. The fault-tolerant control module is used to perform transactional rollback operations or enable redundant execution mechanisms according to predefined rollback strategies when task execution is abnormal, and manages the task execution status through a state machine. When the task times out or the equipment fails, it automatically triggers rollback or switches to backup equipment for execution.

[0023] According to an embodiment of the present invention, an OPC-based pharmaceutical laboratory automation system is described. In a specific embodiment, the AGV (Automated Guided Vehicle) unit adopts SLAM navigation technology and can dynamically adjust its path according to upper-level instructions to avoid obstacles or contaminated areas.

[0024] According to an embodiment of the present invention, a pharmaceutical laboratory automation system based on OPC is provided. In a specific embodiment, the collaborative robot operating unit has a parameter self-learning function, which can adjust the movement speed, acceleration, or operating trajectory according to the optimized parameters from the business logic layer.

[0025] According to an embodiment of the present invention, a pharmaceutical laboratory automation system based on OPC is provided. In a specific embodiment, the database layer adopts a relational database and stores structured data including experimental master data, task execution logs, equipment operating parameters, and audit trail information. Furthermore, the database layer is connected to a real-time stream processing platform for performing anomaly detection and predictive maintenance analysis on sensor data.

[0026] According to an embodiment of the present invention, a pharmaceutical laboratory automation system based on OPC is provided. In a specific embodiment, the system is further provided with a data interface for integration with LIMS or ELN systems, and achieves bidirectional synchronization of experimental tasks and result data through RESTful API.

[0027] According to an embodiment of the present invention, in a specific embodiment of a pharmaceutical laboratory automation system based on OPC, the PLC control module in the execution layer communicates with the AGV automated transport unit and the collaborative robot operation unit via industrial Ethernet to achieve hard real-time safety interlocking and status monitoring.

[0028] According to an embodiment of the present invention, a pharmaceutical laboratory automation system based on OPC is provided. In a specific embodiment, the business logic layer is built using the Spring Boot framework and uses OPC UA client subscription and read / write services to achieve variable-level data interaction with the host computer control layer.

[0029] According to an embodiment of the present invention, an OPC-based pharmaceutical laboratory automation system is provided. In a specific embodiment, the system forms a closed-loop control structure of "perception-decision-execution-feedback" during task execution, thereby realizing automated and intelligent management of the entire experimental process.

[0030] To facilitate understanding of the above technical solutions of the present invention, the following detailed description of the above technical solutions of the present invention is provided through specific frameworks and embodiments.

[0031] In practical use, the OPC-based pharmaceutical laboratory automation system according to the present invention includes a host computer control layer, a business logic layer, a communication layer, an execution layer, and a database layer.

[0032] The host computer control layer consists of WinCC configuration software, which enables real-time monitoring and visualization of PLC signals and provides a user-friendly graphical interface for easy editing and monitoring of experimental tasks.

[0033] As the intelligent hub of the entire laboratory automation system, the business logic layer's core is to construct a closed-loop intelligent agent encompassing "perception-decision-execution-learning-optimization." While ensuring compliance and data integrity, it introduces a data-driven model to achieve dynamic optimization of experimental processes, adaptive parameter calibration, and self-healing of anomalies, ultimately improving R&D efficiency and experimental success rates.

[0034] 1. Core architecture: Java-WinCC-PLC three-layer real-time communication closed loop; This architecture serves as a bridge between the information world (IT) and experimental equipment (OT), ensuring accurate and reliable control and data acquisition.

[0035] Command flow: Java application → OPC UA (ensuring security and structured data) → WinCC (for SCADA monitoring) → Industrial network → PLC → Laboratory equipment (such as AGV, robotic arm, microplate reader, liquid handling workstation).

[0036] Status uplink: Equipment sensor data → PLC → WinCC → OPC UA → Java application (real-time status monitoring and historical data storage).

[0037] Data integrity: All critical parameters and results transmitted via OPC UA are timestamped and integrated with the Electronic Lab Notebook (ELN) or Laboratory Information Management System (LIMS) to meet audit trail requirements.

[0038] 2. Intelligent scheduling and dynamic optimization for pharmaceutical experiments; a. Prediction of experimental task execution time: Input characteristics: Experiment type (e.g., "cell passage", "ELISA detection", "PCR preparation"), reagent preparation complexity, estimated equipment usage time (based on equipment logs), historical average execution time, and current temperature and humidity conditions.

[0039] Model applications: Using ensemble learning models (such as XGBoost) to predict task durations can generate more accurate schedules and improve the utilization of key equipment such as high-throughput screening.

[0040] b. Dynamic resource scheduling based on reinforcement learning (RL): State space: queue status of all experimental tasks, real-time position and status of AGV / robotic arm, occupancy status of incubator / biosafety cabinet, inventory of critical reagents, and priority of urgent experimental tasks (such as time-sensitive sample processing).

[0041] Action space: the ID of the next experimental task to be executed, AGV path selection (prioritizing clean paths or avoiding cross-contamination areas), and task allocation (assigning tasks to idle or more suitable equipment).

[0042] Reward function: Reward metrics include: maximizing overall experimental throughput, timely processing of key samples, avoiding equipment idle waiting, and reducing the total time of the experimental process.

[0043] Application scenario: When the door of an incubator is left open for too long, causing internal temperature fluctuations, the system can automatically delay sensitive experiments that depend on the temperature control accuracy of the incubator and swap their order with temperature-insensitive experimental tasks.

[0044] c. Experimental procedure and parameter prefitting: AGV path dynamic obstacle avoidance: When the AGV is carrying precious samples or dangerous reagents, the system can not only avoid physical obstacles, but also avoid potentially contaminated areas, or plan fixed flow paths for materials of different risk levels.

[0045] Cross-regional collaboration: The scheduler understands the physical layout of the laboratory and automatically coordinates the linkage between AGVs, pass-through windows, and biosafety cabinets to ensure seamless task connection while complying with safety regulations.

[0046] 3. Adaptive parameter adjustment module for pharmaceutical experiments; This module is a core technology for ensuring the robustness of experimental methods and the reproducibility of results, and it is especially valuable in process development and quality control (QC) experiments.

[0047] a. Real-time quality monitoring and deviation detection: Java programs read key quality attribute data from a PLC or directly from analytical devices such as HPLC and mass spectrometer interfaces.

[0048] Examples: In cell culture experiments, pH, dissolved oxygen (DO), and viable cell density (VCD) in the bioreactor are monitored in real time. In chromatographic analysis, peak area, retention time, and signal-to-noise ratio are monitored.

[0049] Compare real-time data with a preset ideal trajectory or acceptable range.

[0050] b. Deviation Root Cause Analysis and Threshold Triggering: The module is pre-set with thresholds based on statistical process control (SPC). It is activated when data points exceed control limits or exhibit a specific trend.

[0051] The system performed multivariate association analysis. For example, it found that a slowdown in cell growth rate was correlated with small fluctuations in dissolved oxygen levels and changes in substrate consumption rates.

[0052] c. An automated calibration process that conforms to scientific principles: Parameter mapping library (based on Design of Experiments): The system has a built-in "critical process parameters - critical quality attributes" relationship model established based on Design of Experiments (DoE). For example, known CPPs that affect cell culture yield include temperature, pH, stirring rate, and feeding strategy.

[0053] Calibration strategy: PID control (basic): used to maintain basic physical parameters (such as temperature, pH).

[0054] Model Predictive Control (MPC - Higher Order): This method uses a dynamic model of the process to predict future outputs and calculate the optimal control action. For example, it can predict cell growth and nutrient consumption over the next two hours and adjust the feeding rate in advance.

[0055] Bayesian optimization (for complex processes): When the process model is inaccurate, it finds the optimal combination of parameters with the fewest experiments (cost). For example, optimizing the parameters of a multi-step protein purification process.

[0056] Execution and Audit Tracking: The Java program sends the calibrated parameters (such as the new feed pump flow rate setting) to the PLC via OPC.

[0057] All parameter adjustment actions, adjustment reasons (based on the deviation of which data), executor (system-automatic operations should be recorded as "System"), and timestamps are automatically recorded and synchronized to LIMS / ELN to generate a complete audit trail record.

[0058] The execution layer is the physical core of the system for achieving automated operation, consisting of three main parts: the PLC control module, the AGV automated transport unit, and the collaborative robot operation unit. This layer receives control commands from WinCC via the OPC UA protocol and converts them into precise physical actions, jointly completing the entire automation process from material flow to experimental operation.

[0059] 1. PLC control module: The real-time control center of the system; As the core of the logic control in the execution layer, the PLC plays a crucial role in connecting the upper and lower layers: Command parsing and execution: Real-time parsing of commands from WinCC and direct control of AGV start-up and shutdown, path switching, and triggering of collaborative robot action sequences.

[0060] Safety interlocking and monitoring: Programmatic implementation of hard real-time safety logic, such as emergency stop handling, area interlocking (ensuring that the robot and AGV do not interfere with each other in space), and equipment status monitoring, providing the highest level of safety assurance for the entire physical system.

[0061] Low-level I / O management: Directly connects to and executes all sensors and actuators in the execution layer, processes digital / analog signals, and achieves precise low-level control.

[0062] 2. AGV Automated Guided Vehicle (AGV): Intelligent and flexible logistics backbone; The AGV unit is responsible for unmanned material transfer between various functional areas of the laboratory (such as sample storage, preparation area, and experimental table).

[0063] Precise navigation and obstacle avoidance: Employing SLAM (Simultaneous Localization and Mapping) technology, the vehicle achieves high-precision positioning and flexible navigation along natural paths. A multi-sensor fusion system (LiDAR, visual sensors, and bumper guards) ensures safe obstacle avoidance in dynamic environments.

[0064] Real-time status feedback: The PLC continuously uploads its real-time status (including location, power, vehicle status, task execution progress, and fault codes) to WinCC, providing decision-making basis for the intelligent scheduling algorithm in the Java layer.

[0065] Dynamic path adaptation: It receives dynamic path instructions from the upper-level system, can actively avoid temporary obstacles or contaminated areas, and can work collaboratively with robots, automatic doors and other equipment.

[0066] 3. Collaborative robot operating unit: an experimental expert in anthropomorphism and self-learning; Collaborative robots are the direct executors of precise experimental operations, possessing high precision, high repeatability, and safety.

[0067] Precision experimental operation: Through the end-effector, different tools can be mounted to accurately complete a series of complex experimental operations such as sampling, pipetting, micro-sampling, plate coating, and oscillation mixing. Its operational precision and consistency far exceed those of manual operation.

[0068] Force-controlled sensing and safe interaction: The built-in force sensor enables it to sense touch, stop immediately in case of accidental contact, ensure the safety of human-machine collaboration, and perform force-sensitive operations such as "gentle insertion" and "force-controlled cap tightening".

[0069] Parameter self-learning and optimization: Data-driven optimization: The robot does not simply repeat fixed procedures. Its operational data (such as the actual time taken to complete a pipetting operation and stability indicators) is recorded and uploaded.

[0070] Adaptive Adjustment: When the "Adaptive Parameter Adjustment Module" in the business logic layer determines that the efficiency or quality of a certain operation can be optimized, it will send a new set of optimized parameters (such as adjusting the movement speed, acceleration, or operation trajectory) to the robot via OPC UA. The robot updates its program accordingly, realizing continuous iteration and self-optimization of the operation parameters, and continuously improving the efficiency and success rate of experiments.

[0071] 4. Example of system collaboration workflow; The Java scheduler generates a "sample analysis" task.

[0072] The instruction is sent to the PLC via OPC UA: AGV goes to the sample library to retrieve a sample → transports it to analysis station No. 3 → collaborative robot performs sampling.

[0073] The PLC controls the AGV to travel along the optimal path to the target location and sends back a "in position" signal.

[0074] Subsequently, the PLC triggers the collaborative robot program, and the robot performs a high-precision sampling operation.

[0075] After the operation is completed, the robot sends a "operation completed" message via the PLC, and the AGV delivers the sample to the next stage or returns it to its original location.

[0076] All status data throughout the process is recorded in real time, forming a complete and auditable operational loop.

[0077] The database layer, serving as the data foundation of the entire system, employs a mature and stable relational database (such as PostgreSQL or MySQL) to handle the structured storage and management of all core business data. It is not only a static data repository but also an active, intelligent unit supporting complex queries and in-depth analysis, directly providing data-driven power for researchers' decision optimization and the system's self-learning.

[0078] 1. Comprehensive data modeling and structured storage; The database has been carefully designed to establish a data model covering the entire laboratory operation process, and mainly stores the following types of key information: Master data of the experiment: definition of the experiment, standard operating procedures, and information on the materials and samples involved.

[0079] Task execution data includes: task queue, scheduling plan, task status (e.g., pending execution, executing, completed, rolled back), dependencies between tasks, and detailed audit trail logs (recording the entire process of each task's creation, start, end, interruption, and parameter modification).

[0080] Equipment and process data: AGV trajectory, robot motion parameters, sensor readings (temperature, humidity, pressure), PLC status words, and historical records of key quality control parameters (such as pH and dissolved oxygen).

[0081] Experimental results data: raw data generated by analytical instruments or collected by the system, processed data, and final report.

[0082] 2. Data integrity, security, and compliance assurance; To address the stringent data reliability requirements of the pharmaceutical industry, multiple safeguards have been implemented at the database layer: Transaction consistency: All critical data operations (such as task status updates) are encapsulated in database transactions to ensure the ACID properties of data and avoid data inconsistency caused by partial updates.

[0083] Access control and audit trail: Implement strict role-based access control and combine it with application logs to form a complete audit trail chain from user login to every data modification, meeting the compliance requirements of regulations such as GxP and 21 CFR Part 11.

[0084] Data Backup and Archiving: Develop and implement regular data backup and long-term archiving strategies to ensure that data can be safely recovered in the event of system failure or disaster.

[0085] 3. Data analysis and decision support module; The database layer has built-in powerful data analysis capabilities, transforming raw data into valuable insights in the following ways: Multidimensional statistical analysis: It provides standardized data query interfaces and pre-built reports to support researchers in trend analysis, consistency testing (such as CPK calculation), and correlation analysis of experimental results.

[0086] For example, it can quickly calculate the success rate and key parameter distribution of a certain experimental process across different batches, assisting in the assessment of process robustness.

[0087] Advanced Analysis and Visualization: Integrate or connect to professional data analysis tools (such as Python / R environments, Grafana and other visualization platforms) to achieve in-depth mining and interactive visualization of historical data.

[0088] It can generate operational indicator dashboards such as equipment utilization, task cycle time, and frequency of anomalies, helping laboratory managers optimize resource allocation.

[0089] Data supply for intelligent algorithms: This module serves as the "training data source" for the upper-level machine learning model. It continuously provides historical data for predictive models (such as task duration prediction), state-action-reward records for the reinforcement learning scheduler, and parameter-result pairing data for the adaptive parameter adjustment module.

[0090] In this way, the database layer directly empowers the system's continuous self-optimization and intelligent evolution.

[0091] 4. System integration and collaboration; Business logic layer integration: Java applications interact efficiently with the database through JDBC or ORM frameworks to achieve task persistence, state updates, and experiment report generation.

[0092] Integration with LIMS / ELN systems: Through the designed RESTful API, the database layer can perform bidirectional data synchronization with the laboratory information management system and electronic lab logbook, ensuring data consistency and process continuity across all systems and eliminating information silos.

[0093] During system operation, the Java layer generates a task queue according to the experiment scheduling plan and writes the task flag into the PLC register via the OPC protocol to trigger the execution of the corresponding task. When a task is completed, the PLC feeds back the result status to WinCC, which then transmits the information to the Java layer via the OPC protocol. The Java layer updates the database and generates an experiment report based on the feedback result.

[0094] To improve the system's reliability and fault tolerance, we designed a multi-layered task closed-loop fault-tolerant control mechanism, the core of which includes task state machine management, transactional rollback and redundant execution, to ensure that the system can automatically and safely recover when faced with anomalies such as communication interruption, equipment failure or execution timeout.

[0095] 1. State-driven task closure and persistence; Each task is assigned a state machine when it is created (e.g., pending execution, in execution, completed, failed, pending rollback, rolled back).

[0096] Before issuing task instructions, the Java layer will first persist the task status "in execution" and key context information (such as task parameters and initial device status) as a transaction snapshot to the database.

[0097] This snapshot forms the basis for the rollback operation, ensuring that the system has a recoverable baseline at any time.

[0098] 2. Intelligent timeout monitoring and anomaly detection; The Java layer sets a dynamic timeout threshold for each task (which can be adjusted based on a historical execution time prediction model).

[0099] The system continuously monitors the task status. If no "complete" signal is received from the PLC via WinCC within the timeout period, or if a fault code is received from the PLC, the system automatically determines that the task execution is abnormal and immediately triggers the fault-tolerant process.

[0100] 3. Transactional task rollback mechanism; When a task fails or times out, the system does not simply retry, but instead initiates a transactional rollback process.

[0101] Rollback logic generation: Based on the type of failed task, the system calls the corresponding rollback script from a predefined rollback strategy library. For example: For the "Move Sample" task, the rollback command is "Move the sample back to its original position".

[0102] For the "Add Reagent" task, since it is physically irreversible, the rollback instruction may be "Record the current volume and skip this step", while marking the exception in the experiment report.

[0103] Safe rollback execution: The Java layer sends a rollback instruction sequence to the PLC via the OPC protocol, restoring the driven device to its previous stable state (i.e., the state before the task started). After a successful rollback, the system updates the task status to "rolled back".

[0104] 4. Redundant execution mechanism for critical tasks; For core tasks involving critical samples or determining the success or failure of an experiment, the system enables redundant execution.

[0105] This mechanism employs a "primary-backup" mode: the system first executes the task through the primary device. If the primary device fails, the fault tolerance mechanism is triggered, and after automatic rollback, the system automatically sends the same task instruction to the pre-configured backup device for execution.

[0106] Redundant execution ensures the continuity of critical processes and provides high availability for core experimental operations.

[0107] 5. Fault recovery and task resumption; After a rollback is completed or execution is successful via a backup device, the system will automatically reschedule and execute subsequent task queues from the breakpoint or the previous successful node, based on task dependencies.

[0108] All actions in the fault tolerance process (including anomaly detection, rollback triggering, and redundancy switching) are recorded in detail and integrated into the final experimental report, providing a complete audit trail.

[0109] Example 1: This invention provides a pharmaceutical laboratory automation system based on WinCC and Java, interacting via the OPC protocol. The system achieves full-process automation through a five-layer architecture, and its specific implementation is as follows: 1. Specific implementation of the host computer control layer (WinCC); The upper computer control layer uses Siemens WinCC configuration software as the core monitoring and data acquisition (SCADA) system, which is deployed on an industrial computer.

[0110] Visual interface development: Experiment task editing area: Utilizing WinCC's graphical designer, an interface was developed that includes drop-down menus, form inputs, and flowcharts. Users can visually arrange experimental steps, define parameters (such as temperature, time, and rotation speed), and save them as reusable "experiment templates."

[0111] Operational status monitoring area: integrates real-time trend graphs, equipment status indicator lights (such as AGV "Run / Stop / Fault", robot "Busy / Idle / Alarm"), and key parameter display panels (such as reactor temperature, pH value). Through data binding, these elements are synchronized with variables in the PLC in real time.

[0112] Data Analysis Area: By integrating WinCC / DataMonitor or calling external web pages, predefined statistical analysis charts (such as mean-range control charts and historical data comparisons) can be embedded, supporting users to perform multi-dimensional retrospective analysis on completed experiments.

[0113] Remote control area: Set up buttons and input boxes with permission verification, allowing authorized users to manually intervene in emergency situations, such as stopping a device, manually setting a parameter, or forcibly jumping to a certain experimental step.

[0114] Data interface configuration: Create and configure the communication connection channel with the PLC in WinCC, and define all variables (tags) that need to be monitored and controlled, including but not limited to: task start flag, device status word, sensor reading value, alarm signal, etc.

[0115] 2. Specific implementation of the business logic layer (Java); This layer uses the Spring Boot framework to build highly cohesive, loosely coupled microservice applications.

[0116] Intelligent scheduler: Implementation: Quartz or Spring Scheduler is used as the base scheduling framework. A machine learning model trained in Python is integrated on top of this (either via JPython or encapsulated as a gRPC microservice). The scheduler calls the predictive model to obtain the estimated task duration and combines it with a reinforcement learning algorithm based on Deep Q-Network (DQN) (using the DL4J library) for dynamic decision-making.

[0117] Task queue management: Task objects are encapsulated using the Java class LabTask, which includes attributes such as ID, type, parameters, status, and dependencies. The queue is implemented using PriorityBlockingQueue, and the priority is dynamically calculated by the RL algorithm.

[0118] State machines and fault tolerance mechanisms: Implementation: Each LabTask instance is associated with a state machine, with the states and state transition conditions explicitly defined.

[0119] Rollback execution: The system maintains a RollbackStrategy interface, with specific implementations for each task type (such as MoveSampleRollbackStrategy). When a task fails, the state machine enters the FAILED state and automatically invokes the corresponding rollback strategy, generating a rollback instruction sequence.

[0120] Redundant execution: A backup device ID is marked for critical devices in the device table of the database. When the primary device task fails, the scheduler automatically queries the backup device from the database and recreates the task instance to assign it to the backup device.

[0121] Communicating with WinCC: Create an OPC UA client using the Eclipse Milo open-source OPC UA SDK. Establish a secure connection (certificate, username / password) with the WinCC OPC UA server by configuring OpcUaClientConfig, and achieve real-time data interaction with the lower-level machine through subscription and read / write services.

[0122] 3. Specific implementation of the communication layer (OPC UA and multiple protocols); OPC UA Secure Communication: Certificate Management: Use the Java KeyTool or Bouncy Castle library to generate key pairs and Certificate Signing Requests (CSRs) for Java clients. After issuance by an internal or public CA, configure the certificate and private key in the Milo client's KeyStore. Similarly, configure a list of trusted client certificates on the WinCC OPC UA server to implement two-way TLS authentication.

[0123] Message security: When creating a Milo client, set SecurityPolicy to Basic256Sha256 and MessageSecurityMode to SignAndEncrypt to achieve end-to-end signing and encryption.

[0124] Multiprotocol conversion gateway: MQTT Bridging: Integrate the Eclipse Paho MQTT client into a Java application. When critical data (such as device status updates and experimental results) arrives at the Java layer via OPC UA, the business logic will simultaneously publish it to the specified MQTTTopic (such as lab / device / agv1 / status).

[0125] RESTful API: Exposing REST endpoints using the Spring MVC framework. For example, `@PostMapping` is used to receive experimental requests from LIMS, and `@PutMapping` is used to send results back to LIMS. All API interactions use JSON format and Spring Security for interface-level authentication and authorization.

[0126] 4. Specific implementation at the execution layer; PLC control module: The system uses a Siemens S7-1500 series PLC. TIA Portal software is used for programming, employing structured programming of organization blocks (OB), function blocks (FB), and data blocks (DB).

[0127] Create data blocks in the PLC corresponding to the WinCC variable tables to store task instructions, equipment status, and process data. Write function blocks (FBs) to control the AGVs and robots, achieving precise sequence control, interlocking protection, and fault handling.

[0128] AGV Automated Guided Vehicle (AGV) Unit: AGVs equipped with SLAM navigation systems were selected. ROS was integrated into their upper-level controller to process data from LiDAR and ultrasonic sensors, enabling positioning and obstacle avoidance.

[0129] The AGV controller communicates with the PLC via industrial Ethernet (Profinet). The PLC sends the target location ID and task ID to the AGV, and the AGV feeds back its status information (current position, battery level, task status) to the PLC in real time during execution.

[0130] Collaborative robot operating unit: Choose collaborative robots from brands such as UR or Omron. Develop basic sampling, pipetting, and other motion scripts using their proprietary scripting languages ​​(such as URScript) or SDKs (such as ur_rtde for Python).

[0131] Parameter self-learning implementation: The robot's control parameters (such as velocity, acceleration, and force threshold) are designed as externally configurable variables. When the adaptive module in the Java layer calculates new optimization parameters, it sends the new parameter set via the OPC UA-WinCC-PLC path or directly through the robot's REST API. The robot controller loads the new parameters the next time it performs a similar task, achieving iterative optimization of behavior.

[0132] 5. Specific implementation of the database layer and real-time analytics; Database design: Use MySQL 8.0 or PostgreSQL database.

[0133] The core tables include: experiments (main experiment table), tasks (task table), devices (device table), sensor_data (sensor data table), and audit_trail (audit log table). The table structure design follows the third normal form and includes appropriate indexes to optimize query performance.

[0134] Real-time stream processing and predictive maintenance: Technology selection: Apache Kafka is used as the real-time data streaming platform, and Apache Flink or Spark Streaming is used as the stream processing engine.

[0135] Implementation: The Java application publishes sensor data and device status messages uploaded by the PLC to a KafkaTopic in real time. A Flink stream processing job consumes this data and performs the following operations: Real-time monitoring: Calculates the moving average of key parameters, compares it with preset thresholds, and triggers real-time alarms.

[0136] Predictive maintenance: Using built-in machine learning models (such as isolated forests for anomaly detection), analyze time-series data such as motor vibration and current to predict bearing wear or potential faults and generate maintenance work orders in advance.

[0137] Edge deployment: To reduce latency, Kafka and Flink clusters can be deployed on local edge servers in the lab.

[0138] 6. System workflow integration; After the system starts up, it will operate according to the following typical process: Users can create a "cell culture" experiment through the WinCC interface or via the LIMS API.

[0139] The Java business layer receives the request, and the intelligent scheduler combines historical data to generate a task queue containing sub-tasks such as "AGV transporting culture medium", "robot inoculating cells", and "shaking culture".

[0140] The scheduler writes the start flag of the first "AGV transport" task into the corresponding variable in WinCC via the Milo OPC UA client.

[0141] WinCC transmits instructions to the PLC, which then controls the AGV to perform transportation tasks. The AGV provides real-time status feedback to the PLC, which in turn sends feedback to the Java layer via WinCC and OPC UA.

[0142] The Java layer updates the task status to "complete" and triggers the next "robot inoculation" task. Simultaneously, the AGV's operational data is stored in the database and published to MQTT.

[0143] The robot performs the vaccination task, and force sensor data is monitored in real time during the process. If abnormal force feedback occurs, the robot immediately stops and reports the fault through the PLC.

[0144] When the Java layer receives a fault signal, it triggers the fault tolerance mechanism: first, it calls the rollback strategy to return the robot to a safe position; then it checks the status of the backup robot, and if there is no backup, it notifies the maintenance personnel.

[0145] During the experiment, all equipment and environmental data were analyzed in real time by the Kafka-Flink stream processing platform. Once a potential fault risk was predicted in the shaking table motor, an alert was immediately generated in the WinCC interface and Java logs.

[0146] After the experiment, all data is archived, and the Java layer calls a report generator (such as JasperReports) to create an experiment report containing a complete audit trail, which is then sent back to the LIMS system via a REST API.

[0147] Through the above specific implementation methods, the system constructs a safe, intelligent, and highly available closed-loop automated control system for pharmaceutical laboratories.

[0148] Example 2: The specific implementation steps of the pharmaceutical laboratory automation system provided by this invention are as follows: Step 1: System Initialization. WinCC connects to the PLC, and the Java client establishes an OPC session and subscribes to relevant nodes. Specifically, a new project is created using the WinCC configuration software, a PLC controller is added, and the communication protocol is set to OPC UA; on the Java side, a client is created using the Eclipse Milo SDK and connected to the PLC server, subscribing to the required node address space.

[0149] Step 2: The Java system generates a task queue based on the experiment scheduling plan and writes the task flag (TaskFlag=1) via OPC. Specifically, Java code is written to read the experiment scheduling plan file, extract task information and convert it into a task queue, and then the OPC client is used to write the TaskFlag flag into the corresponding register of the PLC.

[0150] Step 3: WinCC detects a change in the task flag and triggers a script to write the command to the PLC register (e.g., DB10.Command = Start_AGV). Specifically, the data variable DB10.Command is set as the trigger condition on the WinCC interface, and a corresponding event handler is written using the scripting language VBS to write the command to the PLC register based on the task information in the task queue.

[0151] Step 4: The PLC parses the command and drives the AGV to the designated storage location to retrieve materials. The AGV then sends a "position signal" (AGV_Pos_OK). Specifically, the PLC determines the material retrieval instruction by scanning the command string, sends a motion instruction to the AGV, and continues until the position sensor triggers the position signal.

[0152] Step 5: The PLC starts the collaborative robot to perform sampling or experimental operations based on the feedback, and WinCC displays the robot's operating status in real time. Specifically, the PLC controls the robot's start-up through the digital output port, receives operating status feedback through the analog input port, and displays the real-time status on the WinCC interface.

[0153] Step 6: After the collaborative robot completes its operation, it sends the result status back to WinCC via the PLC, and then synchronizes it back to the Java system via OPC. Specifically, after the robot completes its operation, it stores the result in its built-in memory. The PLC uploads the result to WinCC via the OPC client, and WinCC then transmits it to the Java system.

[0154] Step 7: The Java system updates the task status database based on the feedback and generates an experiment result report. Specifically, the Java system updates the task status in the database by parsing the OPC response messages and generates an HTML format experiment report according to the experiment requirements.

[0155] Step 8: The system enters standby mode, ready to receive the next task. Specifically, the system clears the task flag to zero, returns to the initial state, and waits for the next task instruction.

[0156] Example 3: The main hardware configuration of the pharmaceutical laboratory automation system provided by this invention is as follows: Upper computer control layer: Configure computer with Intel Core i7 processor, 16GB memory, Windows 10 operating system, and WinCC 7.3SP1 or later installed; Business logic layer: Industrial-grade server, Intel Xeon E-2276M processor, 64GB memory, CentOS 7.6 operating system, with Java 1.8.0_202 or higher installed; Communication layer: PLC controller: S7-1200 series or S7-1500 series; OPC server: Kepware KEPServerEX 5.6 or later; OPC client: Eclipse MiloSDK 1.6.0 or later; Execution layer: AGV automated transport unit: autonomous navigation AGV, maximum load 500kg, maximum speed 2m / s; Collaborative robot: KR 16ib type, maximum load 16kg, maximum speed 0.5m / s; Database layer: MySQL 8.0 or later.

[0157] The system also includes other auxiliary equipment, such as laboratory refrigerators, biosafety cabinets, and precision balances. The laboratory instruments and equipment use standard RS232 / RS485 interfaces or Ethernet interfaces to interact with the system via a PLC or Java interface.

[0158] In summary, by utilizing the technical solutions described above in this invention, a real-time direct communication link between Java and WinCC based on OPC UA is established, thereby significantly reducing the latency of instruction issuance and status feedback and making data synchronization more reliable. Furthermore, combined with intelligent scheduling and fault-tolerance mechanisms, efficient and stable execution of experimental tasks and dynamic optimization of resource allocation are achieved. Finally, by constructing a closed-loop control system of perception, decision-making, execution, and feedback, the automation and intelligence levels of medical laboratories are comprehensively improved, effectively reducing manual intervention and errors, and increasing experimental efficiency and result repeatability.

[0159] The above description is only a preferred embodiment of the present invention and is 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 within the protection scope of the present invention.

Claims

1. An OPC-based automated pharmaceutical laboratory system, characterized in that, include: The host computer control layer uses WinCC configuration software for monitoring and visual control of experimental tasks; The business logic layer, using Java applications, is used for the generation, scheduling, and management of experimental tasks. The communication layer uses the OPC protocol to realize real-time data interaction between the business logic layer and the host computer control layer. The execution layer includes a PLC control module, an AGV automated transport unit, and a collaborative robot operation unit. The PLC control module is used to receive control commands from the host computer control layer and drive the AGV automated transport unit and the collaborative robot operation unit to perform experimental operations. The database layer is used to store experimental task data, equipment status data, and experimental result data. The business logic layer sends task instructions to the host computer control layer through the communication layer. The host computer control layer controls the execution layer to complete the experimental task through the PLC control module and feeds back the task execution status to the business logic layer in real time through the communication layer.

2. The OPC-based pharmaceutical laboratory automation system according to claim 1, characterized in that, The communication layer adopts the OPC UA protocol and uses the Eclipse Milo SDK to implement a secure communication connection between the Java application and the WinCC configuration software. The communication layer also integrates an MQTT protocol gateway to publish device status and experimental data to the message middleware, supporting real-time stream processing and early warning functions.

3. The OPC-based pharmaceutical laboratory automation system according to claim 1, characterized in that, The business logic layer includes an intelligent scheduling module and a fault-tolerant control module; The intelligent scheduling module is used to dynamically generate task queues and allocate resources based on experiment type, equipment status and historical execution data. It also integrates a machine learning model to predict task execution time and perform dynamic task scheduling and path planning based on reinforcement learning algorithms. The fault-tolerant control module is used to perform transactional rollback operations or enable redundant execution mechanisms according to predefined rollback strategies when task execution is abnormal, and manages the task execution status through a state machine. When the task times out or the equipment fails, it automatically triggers rollback or switches to backup equipment for execution.

4. The OPC-based pharmaceutical laboratory automation system according to claim 1, characterized in that, The AGV automated transport unit adopts SLAM navigation technology and can dynamically adjust its path according to upper-level instructions to avoid obstacles or contaminated areas.

5. The OPC-based pharmaceutical laboratory automation system according to claim 1, characterized in that, The collaborative robot operating unit has a parameter self-learning function, which can adjust the movement speed, acceleration or operation trajectory according to the optimized parameters from the business logic layer.

6. The OPC-based pharmaceutical laboratory automation system according to claim 1, characterized in that, The database layer adopts a relational database and stores structured data including experimental master data, task execution logs, equipment operating parameters and audit trail information; and the database layer is also connected to a real-time stream processing platform for performing anomaly detection and predictive maintenance analysis on sensor data.

7. A pharmaceutical laboratory automation system based on OPC according to claim 1, characterized in that, The system also has a data interface for integration with LIMS or ELN systems, enabling bidirectional synchronization of experimental tasks and result data through a RESTful API.

8. The OPC-based pharmaceutical laboratory automation system according to claim 1, characterized in that, The PLC control module in the execution layer communicates with the AGV automated transport unit and the collaborative robot operation unit via industrial Ethernet to achieve hard real-time safety interlocking and status monitoring.

9. A pharmaceutical laboratory automation system based on OPC according to claim 1, characterized in that, The business logic layer is built using the Spring Boot framework and uses OPC UA client subscription and read / write services to achieve variable-level data interaction with the host computer control layer.

10. The OPC-based pharmaceutical laboratory automation system according to claim 1, characterized in that, The system forms a closed-loop control structure of "perception-decision-execution-feedback" during task execution, realizing automated and intelligent management of the entire experimental process.