C #-based SECS / GEM communication protocol implementation method and system and computer readable storage medium

By implementing the SECS/GEM protocol using a layered architecture based on C# and .NET 8, the problems of high platform dependence, high development complexity, and low communication efficiency in existing technologies are solved. This results in a SECS/GEM protocol application with cross-platform compatibility, high development efficiency, high reliability of communication concurrency performance, and excellent flexibility, and it is compatible with new protocol versions and custom variants.

CN121967546AActive Publication Date: 2026-05-01XUELONG CNC EQUIP (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XUELONG CNC EQUIP (SHENZHEN) CO LTD
Filing Date
2026-03-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing SECS/GEM protocol implementations suffer from high platform dependence, high development complexity, insufficient flexibility and scalability, low communication efficiency, and poor compatibility. They cannot be effectively applied in .NET environments and cloud deployments, and are difficult to adapt to new protocol versions and custom protocol variants.

Method used

It adopts a layered architecture based on the C# programming language and the .NET 8 technology framework. Through the collaborative processing of the protocol parsing layer, device management layer and communication interface layer, it achieves cross-platform compatibility, asynchronous communication and dynamic device management of the SECS/GEM protocol. It supports HSMS and SECS-I transmission modes and combines C# reflection and custom feature mechanisms to adapt to new protocols.

Benefits of technology

It achieves strong cross-platform compatibility, high development efficiency, high reliability of communication concurrency performance, and excellent flexibility and scalability, reducing equipment integration costs and improving system operation and maintenance efficiency and fault diagnosis convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967546A_ABST
    Figure CN121967546A_ABST
Patent Text Reader

Abstract

The invention discloses a C #-based SECS / GEM communication protocol implementation method and system and a computer readable storage medium, and is implemented based on a C # programming language and a. NET 8 technical framework, and the method comprises the following steps: S1, initialization: loading an equipment configuration file in an XML / JSON format, reading an equipment ID, a protocol version and a communication mode parameter, and storing the equipment ID, the protocol version and the communication mode parameter; the method comprises the following steps: initializing a protocol parser based on a. NET 8 framework, loading a SECS / GEM parsing rule of a corresponding version, meanwhile, initializing a communication interface, completing pre-configuration of a bottom layer communication channel, and establishing a binding relationship between equipment parameters and the parser and between the equipment parameters and the communication interface; s2, establishing connection; s3, core layer processing: on the basis of the communication link established in S2, executing three-layer cooperative processing of a protocol analysis layer, an equipment management layer and a communication interface layer; s4, performing session management; and S5, performing exception handling. The method has the advantages of being good in cross-platform compatibility, high in development efficiency, high in communication concurrency performance reliability, excellent in flexibility and expansibility, low in deployment cost, convenient to operate, maintain and diagnose faults and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Implementation method, system, and computer-readable storage medium of SECS / GEM communication protocol based on C# Technical Field

[0001] This invention belongs to the field of semiconductor device communication technology, specifically relating to a C#-based SECS / GEM communication protocol implementation method, system, and computer-readable storage medium. Background Technology

[0002] SECS / GEM is a standard protocol system for communication in the semiconductor manufacturing equipment industry developed by the SEMI organization. It includes sub-protocols such as SECS-I, SECS-II, HSMS, and GEM. It standardizes data exchange and control between equipment and host systems, significantly reduces the data interaction costs between semiconductor factories and equipment suppliers, breaks down data silos for smart manufacturing, and is widely used in semiconductor equipment-intensive production scenarios.

[0003] Existing implementations of the SECS / GEM protocol mostly rely on dedicated hardware or specific programming languages, and can be mainly divided into two categories: one is dedicated hardware solutions, which use dedicated SECS / GEM communication cards and gateway devices to achieve protocol parsing. These devices are based on fixed hardware platforms, require physical installation and on-site configuration, and have poor versatility; the other is software library implementation solutions, which provide protocol support through commercial or open-source libraries based on C / C++. However, these solutions are highly platform-dependent, only compatible with specific versions of Windows or Linux, and require extensive customization during integration, making them difficult to adapt for small and medium-sized equipment manufacturers.

[0004] While existing technologies can perform protocol parsing, data encapsulation, and basic device management, they suffer from several drawbacks: 1) High platform dependency: Implementations based on dedicated hardware or C / C++ cannot run across platforms, do not support .NET environments and cloud deployments, and limit device integration scenarios; 2) High development complexity: Requires writing a large amount of customized code, resulting in long development cycles and high costs for device adaptation; 3) Insufficient flexibility and scalability: Does not support dynamic addition and removal of devices, and cannot quickly adapt to new SECS / GEM protocol versions or custom protocol variants; 4) Low communication efficiency: Most adopt a single-threaded processing mode, which easily leads to data delays and loss issues in high-concurrency scenarios, resulting in poor real-time performance; 5) Poor compatibility: Some solutions cannot fully cover transmission modes such as SECS-I and HSMS, leading to low interoperability between different devices.

[0005] The SECS-I protocol defines a point-to-point serial communication interface, specifying hardware and underlying logic protocols such as physical connectors and signal levels, but does not define message data content. The SECS-II protocol defines a stream-function message passing method and is the core message specification of the SECS / GEM protocol. The HSMS protocol, as an alternative to SECS-I, achieves efficient data transmission based on TCP / IP and is currently the mainstream transmission mode in the semiconductor industry. Existing solutions cannot simultaneously support multiple transmission modes and meet the needs of cross-platform, high-concurrency communication, becoming a technical bottleneck for the widespread application of the SECS / GEM protocol. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a C#-based SECS / GEM communication protocol implementation method, system, and computer-readable storage medium. This eliminates the need for dedicated hardware, improves cross-platform compatibility, development efficiency, and communication concurrency performance, reduces device integration costs, enables dynamic device management and flexible protocol expansion, and ensures the reliability and real-time performance of communication between semiconductor devices and the host computer.

[0007] To solve the above technical problems, the present invention adopts the following technical solution: a C#-based SECS / GEM communication protocol implementation method, implemented using the C# programming language and the .NET 8 technology framework, including the following steps: S1, Initialization: Loading the device configuration file in XML / JSON format, reading the device ID, protocol version, and communication mode parameters, based on .NET... 8. The framework initializes the protocol parser and loads the corresponding version of the SECS / GEM parsing rules. Simultaneously, it initializes the communication interface and completes the pre-configuration of the underlying communication channel, establishing the binding relationship between device parameters, the parser, and the communication interface. S2. Connection Establishment: Based on the communication mode parameters in S1, a client / server working mode is selected to initiate a connection request. The protocol parser encapsulates the SECS / GEM standard handshake message, which is sent to the target host via the initialized communication interface. After receiving the host's response details, the device and host handshake authentication is completed, establishing the communication link. S3. Core Layer Processing: Based on the communication link established in S2, the protocol parsing layer, device management layer, and communication interface layer perform collaborative processing. The protocol parsing layer utilizes C# reflection and custom features to encode, decode, and verify SECS / GEM messages based on the parsing rules loaded in S1, supporting HSMS and SECS-I transmission modes. The device management layer, based on the device configuration file loaded in S1, dynamically registers, deregisters, and monitors the device status in real time, using a dictionary structure to store device information. The communication interface layer processes data based on the communication interface initialized by S1, providing a unified API interface. It uses C# async / await asynchronous programming to handle TCP / IP and serial port data transmission and reception, and combines this with the status monitoring results from the device management layer to implement timeout retransmission. S4, Session Management: During the core layer processing of S3, the protocol parser periodically encapsulates S1F13 / S1F14 standard heartbeat messages, which are sent by the communication interface layer to maintain communication session connectivity. Alarm messages and control command messages are prioritized for processing, and after processing by the protocol parsing layer, they are sent to the device management layer for response operations. If a link interruption is detected, the communication interface layer is triggered to execute a reconnection mechanism based on the parameters configured in S1, and the device management layer marks the corresponding device status as abnormal. S5, Anomaly Handling: Link anomalies in the communication interface layer, message parsing errors in the protocol parsing layer, and device status anomalies in the device management layer are captured in real time and categorized by type. Pre-defined processing strategies are executed for different types of anomalies, and the anomaly type, occurrence time, associated device ID, and corresponding processing results are recorded synchronously. A complete device status log is generated by combining the device information stored in the device management layer.

[0008] The protocol parsing layer in S3 processes data as follows: when sending data, the application layer data is encapsulated into a SECS-II specification message, Stream and Function code message headers are added, and a checksum is generated; when receiving data, the original data is parsed and verified for format, and the original data is automatically mapped into a readable message object through C# reflection mechanism to complete decoding.

[0009] Preferably, in step S3, a message class with custom C# attribute annotations is added to the protocol parsing layer to achieve adaptation to new protocol versions or custom protocol variants.

[0010] This invention also discloses a C#-based SECS / GEM communication protocol implementation system, adapted to the aforementioned C#-based SECS / GEM communication protocol implementation method, deployed on general-purpose computing devices with TCP / IP and serial communication capabilities, and based on the C# programming language and .NET. The technical framework is developed using a layered architecture and includes the following functional modules: a protocol parsing module with a built-in SECS / GEM parsing rule base, integrating a C# reflection and feature parsing engine to complete message encoding, decoding, verification, and validation, providing protocol extension interfaces, and supporting HSMS and SECS-I transmission modes; a device management module for parsing device configuration parameters, dynamic registration and deregistration, status monitoring, and full lifecycle management of communication sessions; a communication interface module for providing a unified API interface to achieve asynchronous data transmission and reception and port listening via TCP / IP and serial ports; and an exception handling and logging module for real-time exception capture, classification, and standardized recording of device status, communication data, and exception information. The device management module is connected to both the communication interface module and the protocol parsing module, and the communication interface module is connected to the protocol parsing module. The exception handling and logging module is connected to the protocol parsing module, the device management module, and the communication interface module, respectively.

[0011] Preferably, the device management module uses a dictionary data structure to store device ID, online / offline status, communication rate, and session status information, and provides standardized operation interfaces for adding, deleting, and querying devices.

[0012] Preferably, the communication interface module implements data sending and receiving based on the C# async / await asynchronous programming mode.

[0013] Preferably, the exception handling and logging module supports local log storage and remote monitoring terminal push. The exception handling and logging module performs timeout retransmission, data discarding, and status marking processing strategies for link interruption, message parsing error, and device offline anomaly, respectively.

[0014] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described C#-based SECS / GEM communication protocol implementation method.

[0015] The present invention has the following advantages by adopting the above technical solution: (1) Strong cross-platform compatibility: The present invention is based on C# and .NET 8 and can be deployed on mainstream operating systems such as Windows, Linux, and macOS without modification. It supports a variety of general computing devices such as cloud servers and industrial control machines. It also supports .NET environment and cloud deployment, which expands the application scenarios; (2) Significantly improved development and integration efficiency: The present invention uses a generalized configuration file and API interface, so device integration does not require a lot of customized coding, shortens the integration time, and reduces the adaptation cost; (3) High reliability of high-concurrency communication: The present invention uses an asynchronous communication model to process data interaction between multiple devices, and supports timeout retransmission and link reconnection mechanisms to ensure the real-time performance and integrity of data transmission in high-concurrency scenarios; (4) Excellent flexibility and scalability: The present invention supports dynamic registration, deregistration and status monitoring of devices, realizes plug-and-play, and can quickly adapt to SECS / GEM based on the dynamic protocol parsing mechanism of reflection. New protocol versions or custom protocol variants have short development time and do not affect the performance of the original system; (5) Deployment costs are significantly reduced: The overall process of this invention is to support the entire process of the SECS / GEM protocol in a pure software manner. There is no need to purchase and install dedicated SECS / GEM communication cards, gateways and other hardware devices. The software deployment cost is significantly lower than the existing hardware solution, and the maintenance and upgrade costs of hardware are also reduced; (6) Operation and maintenance and fault diagnosis are convenient: This invention has a built-in complete exception handling and log system to realize standardized recording and real-time monitoring of device status, communication data and exception information. It can quickly locate communication faults and device anomalies and improve the efficiency of system operation and maintenance; In summary, this invention has the advantages of good cross-platform compatibility, high development efficiency, high reliability of communication concurrency performance, excellent flexibility and scalability, low deployment cost and convenient operation and maintenance and fault diagnosis. Attached Figure Description

[0016] Figure 1 is a communication flowchart of one of the communication devices in this invention initiating a network connection with other communication devices; Figure 2 is an example of the system integration architecture diagram of this invention when applied in the circuit board and semiconductor industries. Detailed Implementation

[0017] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0018] The components of the embodiments of the invention described and shown in the accompanying drawings can typically be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention.

[0019] 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] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0021] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0022] Example 1 In this example, the present invention provides a C#-based SECS / GEM communication protocol implementation method, and also provides a SECS / GEM communication protocol implementation system adapted to the method and a computer-readable storage medium. The method is implemented based on the C# programming language and the .NET 8 technology framework. The system adopts a layered architecture design. Through the cooperation of the method and the system, the encoding, decoding, device management and high-concurrency data interaction of the SECS / GEM protocol are completed.

[0023] As shown in Figures 1 and 2, in one embodiment of the present invention, the SECS / GEM communication protocol implementation method based on C# is implemented using the C# programming language and the .NET 8 technology framework. This method adopts a core approach of layered processing combined with asynchronous communication and dynamic parsing to achieve full-process processing of the SECS / GEM protocol, including three core stages: protocol parsing layer processing, device management layer processing, and communication interface layer processing. It also includes a standardized communication process encompassing initialization, connection establishment, data exchange, and session management. Specifically, it includes the following steps: S1, Initialization: Loading the device configuration file in XML / JSON format, reading the device ID, protocol version, and communication mode parameters (including TCP / IP / serial port / port number, etc.), based on .NET... 8. The framework initializes the protocol parser and loads the corresponding version of the SECS / GEM parsing rules. Simultaneously, it initializes the communication interface and completes the pre-configuration of the underlying communication channel, establishing the binding relationship between device parameters, the parser, and the communication interface. S2. Connection Establishment: Based on the communication mode parameters in S1, a client / server working mode is selected to initiate a connection request. The protocol parser encapsulates the SECS / GEM standard handshake message, which is sent to the target host via the initialized communication interface. After receiving the host's response details, the device and host handshake authentication is completed, establishing the communication link. S3. Core Layer Processing: Based on the communication link established in S2, the protocol parsing layer, device management layer, and communication interface layer perform collaborative processing. The protocol parsing layer utilizes C# reflection and custom feature mechanisms to encode, decode, and verify SECS / GEM messages based on the parsing rules loaded in S1. It also supports HSMS and SECS-I transmission modes; that is, when sending data, application layer data is encapsulated into SECS-II standard messages and Strength is added. The m-Function code message header generates a checksum. When receiving data, it performs format parsing and checksum verification on the original data. It automatically maps the original data into a readable message object using C# reflection, completing the decoding. This invention's C#-based SECS / GEM communication protocol implementation method supports SECS / GEM protocol extensions. Specifically, by adding C# custom attribute-annotated message classes to the protocol parsing layer, it achieves adaptation to new protocol versions or custom protocol variants without rewriting the core parsing code. The device management layer processes the device configuration file loaded in S1, dynamically registering, deregistering, and monitoring the status of devices in real time by associating with the communication link status. It uses a dictionary structure to store device information. Specifically, it defines device parameters through the configuration file, supporting dynamic registration, deregistration, and status monitoring. It uses a dictionary structure to store information such as device online / offline status, communication rate, and session status, providing standardized operation interfaces for adding, deleting, and querying devices. It provides unified management of device communication sessions, recording session establishment and disconnection times and interaction logs.The communication interface layer handles the communication interface based on the S1 initialization, providing a unified API interface. It uses C# async / await asynchronous programming to handle TCP / IP and serial port data transmission and reception, and implements timeout retransmission based on the device management layer's status monitoring results. Specifically, it provides a unified API communication interface for TCP / IP and serial port, and uses C#'s async / await asynchronous programming model to handle data transmission and reception. When sending data, the standard message encapsulated by the protocol parsing layer is sent asynchronously through the corresponding communication channel to avoid thread blocking. When receiving data, it asynchronously listens to the communication channel, obtains the raw data in real time, and forwards it to the protocol parsing layer, while implementing a timeout retransmission mechanism. S4 and Session Management: During the core layer processing of S3, the protocol parser periodically encapsulates the S1F13 / S1F14 standard heartbeat message. The communication interface layer sends messages to maintain the connectivity of the communication session, prioritizing the identification and processing of alarm messages and control command messages. After processing by the protocol parsing layer, these messages are sent to the device management layer for response operations. If a link interruption is detected, the communication interface layer is triggered to execute a reconnection mechanism based on the parameters configured in S1, and the device management layer marks the corresponding device status as abnormal. S5, Abnormal Handling: Real-time capture of link abnormalities in the communication interface layer, message parsing errors in the protocol parsing layer, and device status abnormalities in the device management layer are categorized by type. Pre-set processing strategies are executed for different types of abnormalities, and the abnormality type, occurrence time, associated device ID, and corresponding processing results are recorded synchronously. Combined with the device information stored in the device management layer, a complete device status log is generated, and corresponding processing strategies are executed for different abnormality types, such as timeout retransmission, link reconnection, and device status marking.

[0024] This invention also discloses a C#-based SECS / GEM communication protocol implementation system, adapted to the aforementioned C#-based SECS / GEM communication protocol implementation method, and deployed on general-purpose computing devices (computers, cloud servers, industrial control machines) with TCP / IP and serial communication capabilities, based on the C# programming language and .NET. The system employs an 8-layered architecture to develop a technical framework that provides standardized support for the SECS / GEM protocol. The hardware platform is a general-purpose computing device with TCP / IP and serial communication capabilities, eliminating the need for dedicated hardware. It includes the following functional modules: a protocol parsing module, the core processing module, corresponding to the protocol parsing layer processing steps of the C#-based SECS / GEM communication protocol implementation. It incorporates a built-in SECS / GEM parsing rule base, supports both HSMS and SECS-I transmission modes, integrates a C# reflection and feature parsing engine to complete message encoding, decoding, verification, and validation, and provides protocol extension interfaces. By adding message classes with custom feature annotations, it enables rapid adaptation to new protocol variants. A device management module includes a configuration file parsing unit, a device status management unit, and a session management unit. This module handles device configuration parameter parsing, dynamic registration and deregistration, status monitoring, and full lifecycle management of communication sessions. It uses a dictionary data structure to store device ID, online / offline status, communication rate, and session status information, and provides standardized operation interfaces for adding, deleting, and querying devices. Specifically, the device management module corresponds to the C#-based SECS / GEM communication protocol implementation described above. The method's device management layer processing steps include a configuration file parsing unit, a device status management unit, and a session management unit. The configuration file parsing unit supports parsing device configuration files in XML / JSON format to extract core device parameters. The device status management unit uses a dictionary data structure to store device status information and provides interfaces for dynamic device registration, deregistration, and querying. The session management unit is responsible for establishing, maintaining, and disconnecting device communication sessions, recording the entire lifecycle information of the session. The communication interface module includes an abstract communication interface unit, a TCP communication subunit, and a Serial communication subunit, providing a unified API interface to implement asynchronous data transmission and reception and port listening for TCP / IP and serial ports. The communication interface module implements data transmission and reception based on the C# async / await asynchronous programming mode. Specifically, as the system's underlying communication module, the communication interface module corresponds to the communication interface layer processing steps of the method implemented using the C#-based SECS / GEM communication protocol, including the abstract communication interface unit, TCP communication subunit, and Serial communication subunit. The abstract communication interface unit provides a unified API interface to decouple the upper-layer module from the lower-layer communication channel. The TCP communication subunit implements asynchronous transmission and reception and port listening for TCP / IP communication based on .NET 8 Socket programming.The Serial communication subunit implements parameter configuration and asynchronous transmission and reception for serial communication, supporting standard serial port protocols such as RS232. The exception handling and logging module includes an exception capture unit, an exception handling unit, and a log recording unit. It is used to achieve real-time exception capture, classification and processing, and standardized recording of device status, communication data, and exception information. The exception handling and logging module supports local log storage and remote monitoring terminal push. For link interruption, message parsing errors, and device offline anomalies, the exception handling and logging module executes timeout retransmission, data discarding, and status marking processing strategies, respectively. Specifically, the exception handling and logging module, as an auxiliary module of the system, includes an exception capture unit, an exception handling unit, and a log recording unit. The exception capture unit captures and classifies operational anomalies of various modules in real time. The exception handling unit executes preset processing strategies (timeout retransmission, link reconnection, etc.) for different exception types. The log recording unit records device status, communication data, and exception information in a standardized manner, supports real-time log querying and remote push, and realizes fault diagnosis and status monitoring.The device management module is connected to both the communication interface module and the protocol parsing module. The exception handling and logging module is connected to the protocol parsing module, the device management module, and the communication interface module. Specifically, the device management module and the protocol parsing module establish a bidirectional interactive connection: the device management module sends device-specific protocol parameters (including SECS / GEM version, checksum rules, and Stream / Function support range) and parsing start / stop commands to the protocol parsing module through a standardized interface. The protocol parsing module provides feedback on the parsing status (including message parsing success / failure, protocol version matching result, and custom message loading status) to the device management module through an event-triggered mechanism. The device management module updates the operating status of the corresponding device based on the parsing status. The device management module and the communication interface module also establish a bidirectional interactive connection: the device management module allocates an independent communication interface instance to each device and sends communication parameters (including IP address / port, serial port baud rate / data bits, heartbeat interval, and reconnection strategy) and communication start / stop / reconnection commands to the communication interface module. The communication interface module provides feedback on the communication status (including connection success / failure, link interruption, and data transmission / reception results) to the device management module through an event-triggered mechanism. The management module updates the communication status of the corresponding device based on the communication status. The communication interface module and the protocol parsing module establish a bidirectional data interaction connection: the communication interface module pushes the raw binary data (with device ID and reception time metadata) received from the device / host to the protocol parsing module through a data reception event. After completing the message parsing, the protocol parsing module pushes the encapsulated standard SECS / GEM message to the communication interface module by calling the asynchronous sending method of the communication interface module. The communication interface module then distributes the message to the target device / host. The exception handling and logging module works in conjunction with the protocol parsing module, the device management module, and the communication interface module. Establishing a one-way access connection: The protocol parsing module proactively reports parsing anomalies (including message format errors, checksum failures, and reflection parsing anomalies) and parsing operation logs to the anomaly handling and logging module. The device management module proactively reports management anomalies (including duplicate device registration and status update failures) and device operation logs to the anomaly handling and logging module. The communication interface module proactively reports communication anomalies (including connection failures, port occupancy, and data transmission / reception failures) and communication operation logs to the anomaly handling and logging module. The anomaly handling and logging module only receives the reported information, performs classification processing, and standardizes its storage; it does not issue any instructions to upper-layer modules.

[0025] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described C#-based SECS / GEM communication protocol implementation method.

[0026] The C#-based SECS / GEM communication protocol implementation method of this invention can be applied to communication between semiconductor testing equipment and a host. Specifically, the C#-based SECS / GEM communication protocol implementation system of this invention is deployed on a Windows-based semiconductor testing equipment (hardware carrier: industrial control computer). The C#-based SECS / GEM communication protocol implementation method of this invention is used to implement standard SECS / GEM communication between the testing equipment and the host. The specific steps are as follows: a1. System deployment and configuration: Deploy the relevant software packages of the C#-based SECS / GEM communication protocol implementation system of this invention on the industrial control computer of the testing equipment, and write a JSON-formatted device configuration file, such as defining the device ID as 001, the protocol version as SECS / GEME5-0703, the communication mode as TCP / IP, the communication port as 5000, and the host IP as 192.168.1.100; a2. Initialization: Start the system and load the configuration. The system's device management module parses configuration parameters, the protocol parsing module initializes the SECS / GEME5-0703 parsing rules, and the communication interface module initializes the TCP communication subunit; a3. Connection Establishment: The system operates in client mode, initiating a TCP / IP connection request to the host 192.168.1.100 and sending an S1F1 standard message to complete the session establishment; a4. Data Interaction: The application layer of the test device generates test data and sends it to the system's protocol parsing module. The module encapsulates the data into an S6F11 standard message, adds a checksum, and forwards it to the communication interface module, which sends it to the host asynchronously; the host issues an S2F41 control command, which the communication interface module receives asynchronously and forwards to the protocol parsing module. After decoding, it sends the command to the application layer of the test device, driving the device to execute the corresponding test process; a5. Session Management: The system periodically sends S1F13 / S1F14 heartbeat messages to maintain the session connection with the host and records the device communication status in real time.

[0027] This approach enables standardized SECS / GEM communication between semiconductor test equipment and the host, resulting in high test data upload rates, low communication error rates, and fully meeting the real-time data interaction requirements of semiconductor test equipment. It also significantly shortens equipment integration time compared to existing solutions.

[0028] The C#-based SECS / GEM communication protocol implementation method of this invention can also be applied to centralized cloud communication management of multiple devices. Specifically, the C#-based SECS / GEM communication protocol implementation system of this invention is deployed on a Linux cloud server (hardware carrier: cloud server host). This method simultaneously manages 10 different types of semiconductor devices (etching machines, lithography machines), achieving centralized cloud communication management of multiple devices. The specific steps are as follows: b1. System Deployment and Configuration: The software package of the C#-based SECS / GEM communication protocol implementation system of this invention is deployed on a Linux cloud server. The system configuration parameters are modified, the communication protocol is adjusted to HSMS, and the communication port is set to 6000. The system runs in server mode. b2. Dynamic Device Registration: The communication interface module of the C#-based SECS / GEM communication protocol implementation system of this invention listens on port 6000. The 10 semiconductor devices sequentially initiate connection requests to the cloud server. The device management module of the SECS / GEM communication protocol implementation system based on C# of this invention completes the dynamic registration of all devices, assigns a unique identifier to each device, and uses a dictionary structure to store information such as device ID, status, and communication parameters; b3. High-concurrency data interaction: The SECS / GEM communication protocol implementation system based on C# of this invention adopts an asynchronous communication model to handle concurrent data requests from 10 devices simultaneously. The protocol parsing module performs parallel encoding / decoding of messages from each device, and the communication interface module completes asynchronous sending and receiving, realizing rapid data interaction among multiple devices; b4. Anomaly handling and early warning: When an etching machine malfunctions and sends an S5F1 alarm message, the system's anomaly capture unit captures the message in real time, the log module records the alarm information, and forwards the alarm message to the factory monitoring system in real time, realizing real-time fault early warning; b5. Flexible expansion: When adding a lithography machine, only a configuration file needs to be written and a connection request initiated, and the system can complete the dynamic registration of the device without restarting or modifying the core system code, realizing flexible expansion of devices.

[0029] Using this approach, the cloud server of the present invention can stably manage multiple types and quantities of semiconductor devices, with low communication latency, improved resource utilization of the cloud server, support seamless elastic expansion of devices, and meet the large-scale equipment management needs of semiconductor factories.

[0030] The C#-based SECS / GEM communication protocol implementation method of this invention can also be applied to the extension and adaptation of SECS / GEM protocol variants. Specifically, it verifies the protocol extension capability of the C#-based SECS / GEM communication protocol implementation method and system for the user-defined SECS message protocol variant of this invention. The specific steps are as follows: c1. Protocol extension configuration: In the protocol parsing module of the C#-based SECS / GEM communication protocol implementation system, the newly added message class is marked with a C# custom attribute, and the [SecsMessage(Stream=10,Function=1)] attribute is added to define the stream and function code of the custom protocol. There is no need to modify the core code of the protocol parsing module; c2. Parsing rule update: Based on The dynamic parsing engine of the C#-based SECS / GEM communication protocol implementation system automatically identifies newly added message classes through reflection, updates the protocol parsing rule base, and completes the adaptation of the custom protocol; c3, Functional testing: The custom message is sent to the C#-based SECS / GEM communication protocol implementation system through the test terminal. The protocol parsing module of the C#-based SECS / GEM communication protocol implementation system completes the encoding / decoding of the message, and the communication interface module implements data sending and receiving, verifying the accuracy of message processing; c4, Performance testing: During the test, the message processing rate, latency, and other performance indicators of the C#-based SECS / GEM communication protocol implementation system are monitored in real time to verify the operational stability of the C#-based SECS / GEM communication protocol implementation system after protocol extension.

[0031] In this way, the extension and adaptation time for custom protocol variants is short, and the system based on the C# SECS / GEM communication protocol can accurately process custom messages without any significant decrease in performance indicators such as message processing rate and latency. This fully demonstrates that the method and system of this invention have excellent protocol extension capabilities.

[0032] This embodiment does not impose any limitation on the shape, material, structure, etc. of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the technical solution of the present invention.

Claims

1. A C#-based implementation method for the SECS / GEM communication protocol, characterized in that, Implemented using the C# programming language and the .NET 8 technology framework, the following steps are included: S1, Initialization: Load the device configuration file in XML / JSON format, read the device ID, protocol version, and communication mode parameters, based on .NET...

8. The framework initializes the protocol parser and loads the corresponding version of the SECS / GEM parsing rules. Simultaneously, it initializes the communication interface and completes the pre-configuration of the underlying communication channel, establishing the binding relationship between device parameters, the parser, and the communication interface. S2. Connection Establishment: Based on the communication mode parameters in S1, a client / server working mode is selected to initiate a connection request. The protocol parser encapsulates the SECS / GEM standard handshake message, which is sent to the target host via the initialized communication interface. After receiving the host's response details, the device and host handshake authentication is completed, establishing the communication link. S3. Core Layer Processing: Based on the communication link established in S2, the protocol parsing layer, device management layer, and communication interface layer perform collaborative processing. The protocol parsing layer utilizes C# reflection and custom features to encode, decode, and verify SECS / GEM messages based on the parsing rules loaded in S1, supporting HSMS and SECS-I transmission modes. The device management layer, based on the device configuration file loaded in S1, dynamically registers, deregisters, and monitors the device status in real time, using a dictionary structure to store device information. The communication interface layer processes data based on the communication interface initialized by S1, providing a unified API interface. It uses C# async / await asynchronous programming to handle TCP / IP and serial port data transmission and reception, and combines this with the status monitoring results from the device management layer to implement timeout retransmission. S4, Session Management: During the core layer processing of S3, the protocol parser periodically encapsulates S1F13 / S1F14 standard heartbeat messages, which are sent by the communication interface layer to maintain communication session connectivity. Alarm messages and control command messages are prioritized for processing, and after processing by the protocol parsing layer, they are sent to the device management layer for response operations. If a link interruption is detected, the communication interface layer is triggered to execute a reconnection mechanism based on the parameters configured in S1, and the device management layer marks the corresponding device status as abnormal. S5, Anomaly Handling: Link anomalies in the communication interface layer, message parsing errors in the protocol parsing layer, and device status anomalies in the device management layer are captured in real time and categorized by type. Pre-defined processing strategies are executed for different types of anomalies, and the anomaly type, occurrence time, associated device ID, and corresponding processing results are recorded synchronously. A complete device status log is generated by combining the device information stored in the device management layer.

2. The C#-based SECS / GEM communication protocol implementation method according to claim 1, characterized in that: The protocol parsing layer in S3 processes data as follows: when sending data, the application layer data is encapsulated into a SECS-II specification message, Stream and Function code message headers are added, and a checksum is generated; when receiving data, the original data is parsed and verified for format, and the original data is automatically mapped into a readable message object through C# reflection mechanism to complete decoding.

3. The method for implementing the SECS / GEM communication protocol based on C# according to claim 1, characterized in that: In S3, a message class with custom C# attribute annotations is added to the protocol parsing layer to achieve adaptation to new protocol versions or custom protocol variants.

4. A system based on the SECS / GEM communication protocol in C#, characterized in that: This invention relates to the C#-based SECS / GEM communication protocol implementation method described in any one of claims 1-3, and is deployed on general-purpose computing devices with TCP / IP and serial communication capabilities. Developed using the C# programming language and the .NET 8 technology framework, it adopts a layered architecture and includes the following functional modules: a protocol parsing module with a built-in SECS / GEM parsing rule base, integrating a C# reflection and feature parsing engine to complete message encoding, decoding, verification, and validation, providing protocol extension interfaces, and supporting HSMS and SECS-I transmission modes; and a device management module for implementing device configuration parameter parsing, dynamic registration and deregistration, status monitoring, and full lifecycle management of communication sessions. The communication interface module provides a unified API interface to enable asynchronous data transmission and reception via TCP / IP and serial ports, as well as port listening. The exception handling and logging module enables real-time exception capture, classification, and standardized recording of device status, communication data, and exception information. The device management module is connected to both the communication interface module and the protocol parsing module. The communication interface module is also connected to the protocol parsing module. The exception handling and logging module is connected to the protocol parsing module, the device management module, and the communication interface module.

5. The SECS / GEM communication protocol implementation system based on C# according to claim 4, characterized in that: The device management module uses a dictionary data structure to store device ID, online / offline status, communication rate, and session status information, and provides standardized operation interfaces for adding, deleting, and querying devices.

6. The SECS / GEM communication protocol implementation system based on C# according to claim 4, characterized in that: The communication interface module implements data sending and receiving based on the C# async / await asynchronous programming mode.

7. The SECS / GEM communication protocol implementation system based on C# according to claim 4, characterized in that: The exception handling and logging module supports local log storage and remote monitoring terminal push. The exception handling and logging module performs timeout retransmission, data discarding, and status marking processing strategies for link interruption, message parsing error, and device offline anomaly, respectively.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the C#-based SECS / GEM communication protocol implementation method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • SECS communicating method based on SEMI standard

    CN101552794A

  • Implementation method of SECS HSMS reader-writer based on semiconductor protocol

    CN117411763A

  • SECS / GEM protocol-based semiconductor device communication system and method

    CN120750985A