## 1 Introduction
The results show that Kafka has advantages in partition scalability, throughput capacity, and ease of multi-node deployment, making it particularly suitable for real-time data processing needs in high-concurrency and distributed scenarios. Therefore, Kafka, with its strong scalability, natural support for partitioning mechanisms, and superior performance in large-scale distributed scenarios, has become an ideal choice for real-time data collection, transmission, and processing in edge computing environments. [PERSON] [11] studied the application of edge and fog computing in intelligent manufacturing, emphasized the importance of predictive maintenance as one of the core goals of Industry 4.0, and pointed out that edge AI technology has higher feasibility and application value to realize equipment condition monitoring and fault prediction in small- and medium-sized manufacturing enterprises. [PERSON] [12] studied the application of edge artificial intelligence (Edge-AI) in smart factories. He pointed out that it has significant advantages in real-time data collection, analysis, and prediction and can realize low-latency data transmission and risk warning between different devices. [PERSON] [13] proposed a smart factory reference framework that integrates digital twin and cloud-fog-edge collaborative computing (CFE), aiming to improve the efficiency of process data processing and enhance the generality and intelligent decision-making ability of the system. [PERSON] [14] provides a comprehensive analysis of AI methods and functions related to edge computing or edge AI, opening up new possibilities for real-time decision making, data confidentiality, and system security in smart factories. [PERSON] [15] proposed the introduction of edge computing in the intelligent robot factory (iRobot-Factory), which effectively improves the production efficiency and automation level and has important reference value for the development of intelligent manufacturing. Although the above research confirms the broad prospects of Edge-AI in the manufacturing industry, there is still a lack of a systematic framework and verifiable practice cases on efficiently integrating edge-side inference capabilities with underlying reliable data communication architectures (such as Kafka and OPC UA) in actual deployment. With the Industrial Internet of Things (IIoT) and cyber-physical systems (CPS) booming, manufacturing systems are moving toward higher levels of connectivity and intelligence. However, the current data management solutions have obvious shortcomings in communication bandwidth, processing capabilities for asynchronous data streams, and the collection and analysis of high-frequency heterogeneous data sources, which make it difficult to meet the increasingly complex data requirements in the new manufacturing environment. Despite the growing adoption of the OPC UA protocol as a standard for machine-to-machine communication, its default client-server model lacks an effective mechanism for large-scale real-time data streams. Similarly, traditional data-transfer protocols such as MQTT and RESTful APIs have limitations in handling high-throughput scenarios and ensuring strict real-time guarantees. This research aims to address these limitations by proposing a distributed real-time data management framework based on OPC UA and Apache Kafka and deploying it at the edge. Kafka's publish-subscribe architecture and persistence make it particularly suitable for high-concurrency and high-throughput industrial data transfers. The research content of this paper is as follows:  
1. Aiming at the difficulty of heterogeneous data collection in smart factories, a data-collection system based on the OPC UA protocol is developed. By modeling the workshop equipment with OPC UA or indirectly using PLC and other devices to communicate with the OPC UA client, real-time data collection of the underlying equipment is realized. 2. Based on edge computing technology, a data management framework for manufacturing production edge measurement is proposed.