A data acquisition system and method for substation access control system

By designing UDP and Modbus protocol modules in the substation access control system, combined with thread management and log modules, the rapid collection and conversion of access control system data is achieved, solving the problems of resource waste and complex configuration in the existing technology, improving response speed and compatibility.

CN114095586BActive Publication Date: 2024-08-27上海许继电气有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111356538.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2024-08-27
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

The existing power protocol conversion device needs to re-develop the program when processing non-standard power protocols, resulting in waste of resources, high cost, long response time, and complex configuration, making it difficult to quickly connect the access control system to the auxiliary equipment monitoring backend.

Method used

Design a substation access control system data collection system, including UDP protocol module, Modbus module, thread management module, log module and shared space. Select the communication protocol through the configuration file, build the UDP and Modbus protocol framework, and realize the rapid collection and collection of access control system data. conversion, reducing costs and increasing message response times.

Benefits of technology

It achieves rapid collection of access control system data, reduces costs, improves message response speed, simplifies the configuration process, and adapts to the compatibility needs of traditional substations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114095586B
    Figure CN114095586B
Patent Text Reader

Abstract

The present invention relates to a data acquisition system and method for a substation access control system, which parses a configuration file; constructs a UDP protocol and a Modbus protocol framework based on the configuration file; creates a thread for each access control system; parses a message based on the UDP protocol or the Modbus protocol of the access control system; reads data in a message based on the UDP protocol or the Modbus protocol and writes it into a shared space; or reads structure data in the shared space, packages it into a UDP message and a Modbus message, and sends it to the access control system through a UDP protocol module and a Modbus protocol module. The present invention first selects a communication protocol through a configuration file, constructs a corresponding communication framework according to the content of the configuration file, and the coexistence mode of the two protocols realizes the compatibility of traditional substations; the records of the log module can quickly view the operation information, message information and locate errors. The establishment of a shared space provides a platform for protocol conversion. The coexistence of the UDP protocol and the Modbus protocol for collecting access control system data is realized, which reduces the cost and improves the message response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned transformer substation, and in particular to a data acquisition system and method for a transformer substation access control system. Background Art

[0002] With the development of the power system and the deepening reform of the power system, the concept of unmanned substation operation mode has been fully promoted. Traditional substations need to be transformed into more intelligent substations in terms of renovation and expansion, operation and maintenance mode, and operation and maintenance mode to improve the efficiency of operation, inspection and dispatch. In the early days of the unmanned or unmanned mode, theft cases against unmanned substations occurred from time to time, and fires caused by live equipment in substations were also common. Auxiliary information such as anti-theft and fire prevention has become the top priority of substation safety work.

[0003] In order to improve work efficiency and uniformly manage subsystems such as environmental detection, security, fire protection, lighting control, online monitoring, and SF6 monitoring, the smart substation requires all auxiliary equipment in the substation to be uniformly connected to the auxiliary equipment monitoring background, which greatly improves the management efficiency and monitoring level of the operation and maintenance personnel. Immediately after the introduction of the smart substation, it is required that subsystems such as environmental detection, security, fire protection, lighting control, online monitoring, and SF6 monitoring be uniformly connected to the auxiliary equipment monitoring system in a standard protocol format. As part of the security subsystem, the access control system manages the opening / closing of all doors in the substation, providing important support for the safe operation of the substation.

[0004] Normally, the auxiliary device monitoring background receives auxiliary device data information through the standard IEC61850 protocol, so all auxiliary devices must be accessed using the IEC61850 protocol. However, the incompatibility between the access control system protocol and the IEC61850 protocol requires protocol conversion.

[0005] Currently, the more common method is to use a special power protocol conversion device, develop a door access system acquisition program on the protocol conversion device, and then convert the collected data information into IEC61850 format and send it to the auxiliary equipment monitoring background.

[0006] The existing power protocol conversion device is more suitable for standard protocol conversion, such as IEC103, IEC104, IEC61850, etc. For non-standard power protocols, the corresponding program needs to be redeveloped. This mode of using the power protocol conversion device also causes a waste of resources, increases the cost of use, and prolongs the message response time. In addition, the configuration of the power protocol conversion device is relatively cumbersome, which increases the complexity for on-site engineers. Summary of the invention

[0007] In order to solve the problem of rapid access of the access control system to the auxiliary equipment monitoring background, the present invention proposes a substation access control system data acquisition system and method, the purpose of which is to solve the problem of rapid acquisition of access control system data and reduce costs, and compatibility processing is also performed on the Modbus protocol used in traditional substations.

[0008] To achieve the above object, the present invention provides a substation access control system data acquisition system, comprising:

[0009] UDP protocol module, Modbus module, thread management module, log module, message processing module and shared space;

[0010] The UDP protocol module is used to collect UDP protocol messages of the access control system, exchange information with the access control system, and parse UDP protocol messages of the access control system;

[0011] The Modbus module is used to collect Modbus messages of the access control system, exchange information with the access control system, and parse the messages of the Modbus protocol of the access control system;

[0012] The thread management module is used to manage the establishment and closing of threads;

[0013] The log module is used to record program operation information, message information and error information;

[0014] The message processing module is used to receive the messages parsed by the UDP protocol module and the Modbus protocol module and send them to the shared space, and read the data in the shared space and pass them to the UDP protocol module and the Modbus protocol module;

[0015] The shared space is used to store data.

[0016] A data acquisition method based on the substation access control system data acquisition system is provided, comprising:

[0017] Parse the configuration file;

[0018] Build UDP protocol and Modbus protocol framework based on configuration files;

[0019] Create a thread for each access control system;

[0020] Parse the access control system's messages based on UDP protocol or Modbus protocol;

[0021] Read data from messages based on UDP protocol or Modbus protocol and write them into shared space; or read structured data in shared space, package them into UDP messages and Modbus messages, and send them to the access control system through UDP protocol module and Modbus protocol module.

[0022] Further, the configuration files are parsed, including the protocol type file, the UDP protocol configuration file and the Modbus protocol configuration file;

[0023] The protocol type file is used to select the access control system communication protocol; the UDP protocol configuration file is used to configure the basic information of the UDP protocol communication; the Modbus protocol configuration file is used to configure the basic information of the Modbus protocol communication.

[0024] Furthermore, the UDP protocol and Modbus protocol framework are constructed, including: establishing the number of threads based on the DEVNUM of the UDP protocol configuration file; configuring the IP, mask, port, creating a UDP communication link, establishing a thread for each access control system to process its related information, and providing a basis for file interaction based on the serial number and sequence number.

[0025] Create RS485 communication link according to the Modbus configuration file, and set up a separate thread for Modbus protocol parsing to process related information;

[0026] Form UDP protocol module and Modbus module.

[0027] Furthermore, the management module creates a thread for the access control system with UDP protocol through the DEVNUM and sequence number in the configuration file, and binds the sequence number to the IP and port to facilitate subsequent file reading and writing and thread release; a dedicated thread is used for receiving and sending Modbus messages.

[0028] Furthermore, the shared space data is read through an independent thread, the reading state is maintained, and it is determined whether the message has been read based on the flag in the message structure of the read position. If it is a new message that has not been read, it is determined whether the current message is the required message based on the message type. If so, the message is read, the reading position is updated, and the message structure flag is marked as read. The name in the message is parsed and compared with the program ID to see if they are the same. If they are the same, further parsing is performed; if they are not the same, discarding them.

[0029] Furthermore, a running log file is written for each operation performed, and the running log file is recorded; a UDP module protocol log file is written for operations on the UDP protocol module, and a Modbus protocol log file is written for operations on the Modbus module.

[0030] The above technical solution of the present invention has the following beneficial technical effects:

[0031] (1) The present invention first selects the communication protocol (UDP, Modbus) through the configuration file, and builds the corresponding communication framework according to the content of the configuration file. The coexistence mode of the two protocols realizes the compatibility of traditional substations; the records of the log module can quickly view the operation information, message information and locate errors. The establishment of a shared space provides a platform for protocol conversion.

[0032] (2) The present invention realizes the coexistence of UDP protocol and Modbus protocol for collecting access control system data, reduces costs and improves message response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic diagram of the data acquisition framework of the substation access control system;

[0034] Figure 2 Schematic diagram of the collection process. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0036] The technical solution of the present invention is: selecting the protocol type of the access control system according to the configuration file, and then configuring the protocol related information according to the selected protocol type; starting the log module to record operation information, message information and error information; creating a shared memory space for data interaction with other processes.

[0037] Substation access control system data acquisition framework see Figure 1 , including 6 parts, namely UDP protocol module, Modbus module, thread management module, log module, message processing module and shared space.

[0038] The UDP protocol module and Modbus module are used to collect data from the access control system, exchange information with the access control system, and parse the messages of the access control system. Considering the complexity of the substation environment, there are two protocols of access control systems, and the UDP protocol module and Modbus protocol module can coexist. The thread management module is used to manage the establishment and closing of threads. The log module is used to record the running information, message information and error information of the program. The message processing module is used to receive the messages parsed by the UDP protocol module and the Modbus protocol module and send them to the shared space, and read the data in the shared space and pass it to the UDP protocol module and the Modbus protocol module; the shared space is used to store data that meets a certain format.

[0039] The message processing module mainly writes the data in the UDP message and Modbus message into the specified structure, sends it to the shared space and stores it. It reads the structure data in the shared space, packages it into UDP message and Modbus message, and sends it to the access control system through the UDP protocol module and Modbus protocol module. This method can complete the interaction with other processes, thereby realizing the function of protocol conversion.

[0040] The data structure storing UDP messages and Modbus messages uses srcid to define a unique ID for each process to identify different processes. Since both sending and receiving messages are in the same shared space, it is not necessary to read the message sent by the current process based on the ID; the four-byte flag readflag is used to mark the reading status, and the 32 bits are initialized to all 1 (unread flag); Timeout is used to specify the life cycle of the message. After this time, the message is considered invalid; msgtype is used to define the message type (such as telesignal change, telemetering change, remote control selection, remote control execution, etc.), and this message type is also used as a process to receive messages; msg is specific message data (telemetering, telesignal, remote control, remote adjustment, etc.).

[0041] The log module is used to record the program's running information, message information, and error information. Log files are divided into: running log files and protocol log files. Protocol log files are named after the protocol name and time (for example, "UDP2021-10-09 14" and "Modbus2021-10-09 14"), and output log files every hour. The specific examples are as follows:

[0042] Run the log file:

[0043] 2021-20-09 14:12:23 Successfully read the configuration file!

[0044] 2021-20-09 14:12:24 Start Modbus thread!

[0045] 2021-20-09 14:12:24 Successfully created UDP thread!

[0046] 2021-20-09 14:12:25 Successfully created Modbus thread!

[0047] The system operation process is as follows Figure 2 As shown. It includes the following processes:

[0048] (1) Configuration file parsing

[0049] The configuration file mainly includes three files: protocol type file, UDP protocol configuration file, Modbus protocol configuration file, and its format is as follows:

[0050] ① Specification type file

[0051] When the program starts, it first reads the xml configuration file and selects the protocol type according to TYPE. Determine the communication protocol of the access control system, 1: UDP protocol 2: Modbus protocol 3: Both exist at the same time.

[0052] ②UDP protocol configuration file

[0053] According to the DEVNUM in the UDP protocol configuration file, the number of threads is established, so that a thread is created for each access control system to interact with data relatively independently. The IP, port, serial number, and sequence number of the access control system are obtained through other entries, and finally a communication link is established based on this information.

[0054] ③Modbus protocol configuration file

[0055] Create RS485 communication link according to Modbus configuration file, use RESENDNUM to determine the number of retransmissions when no reply message is received; ACKTIME parameter determines frame transmission interval (that is, the interval between the last command transmission time and the current time); ZDTIME parameter determines serial port interruption time (communication is considered interrupted if this time is exceeded). Create a separate thread for Modbus protocol parsing to process related information.

[0056] The protocol type file is used to select the access control system communication protocol; the UDP protocol configuration file is used to configure the basic information of UDP protocol communication; the Modbus protocol configuration file is used to configure the basic information of Modbus protocol communication.

[0057] (2) Building UDP protocol and Modbus protocol framework based on configuration files

[0058] According to the above configuration file, parse the contents to initialize the serial port (Modbus) and network port (UDP).

[0059] The number of threads is established based on the DEVNUM of the UDP protocol configuration file; IP, mask, port, and UDP communication link are configured, and a thread is established for each access control system to process its related information, providing a basis for file interaction based on the sequence number and serial number.

[0060] Create RS485 communication link according to the Modbus configuration file, and set up a separate thread for Modbus protocol parsing to process related information;

[0061] Form UDP protocol module and Modbus module.

[0062] (3) Create a thread for each access control system and establish a communication link.

[0063] (4) Analyze the access control system's messages based on UDP protocol or Modbus protocol.

[0064] (5) Read data from messages based on the UDP protocol or the Modbus protocol and write them into the shared space; or read structured data in the shared space, package them into UDP messages and Modbus messages, and send them to the access control system through the UDP protocol module and the Modbus protocol module.

[0065] The management module creates a thread for the access control system with UDP protocol through the DEVNUM and serial number in the configuration file. The serial number is bound to the IP and port to facilitate subsequent file reading and writing and thread release; a dedicated thread is used for receiving and sending Modbus messages.

[0066] An independent thread reads the shared space data, maintains the reading status, and determines whether the message has been read based on the flag in the message structure at the read position. If it is a new message that has not been read, determine whether the current message is the required message based on the message type. If so, read the message, update the reading position and mark the message structure flag as read, parse out the name in the message, and compare it with the program ID to see if they are the same. If they are the same, parse it further; if they are not the same, discard it.

[0067] A running log file is written for each operation performed, and the running log file is recorded; operations on the UDP protocol module are written into a UDP module protocol log file, and operations on the Modbus module are written into a Modbus protocol log file.

[0068] In summary, the present invention relates to a data acquisition system and method for a substation access control system, which parses a configuration file; constructs a UDP protocol and a Modbus protocol framework based on the configuration file; creates a thread for each access control system; parses a message based on the UDP protocol or the Modbus protocol of the access control system; reads data in a message based on the UDP protocol or the Modbus protocol and writes it into a shared space; or reads structure data in a shared space, packages it into a UDP message and a Modbus message, and sends it to the access control system through a UDP protocol module and a Modbus protocol module. The present invention first selects a communication protocol through a configuration file, constructs a corresponding communication framework according to the content of the configuration file, and the coexistence mode of the two protocols realizes the compatibility of traditional substations; the records of the log module can quickly view the operation information, message information, and locate errors. The establishment of a shared space provides a platform for protocol conversion. The coexistence of the UDP protocol and the Modbus protocol for collecting access control system data is realized, which reduces the cost and improves the message response speed.

[0069] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.

Claims

1. A data acquisition method for a substation access control system data acquisition system, characterized in that: The substation access control system data acquisition system includes: UDP protocol module, Modbus module, thread management module, log module, message processing module and shared space; The UDP protocol module is used to collect UDP protocol messages of the access control system, exchange information with the access control system, and parse UDP protocol messages of the access control system; The Modbus module is used to collect Modbus messages of the access control system, exchange information with the access control system, and parse the messages of the Modbus protocol of the access control system; The thread management module is used to manage the establishment and closing of threads; The log module is used to record program operation information, message information and error information; The message processing module is used to receive the messages parsed by the UDP protocol module and the Modbus protocol module and send them to the shared space, and read the data in the shared space and pass them to the UDP protocol module and the Modbus protocol module; The shared space is used to store data; include: Parse the configuration file; Build UDP protocol and Modbus protocol framework based on configuration files; Create a thread for each access control system; Parse the access control system's messages based on UDP protocol or Modbus protocol; Read data from messages based on UDP protocol or Modbus protocol and write them into shared space; or read structured data in shared space, package them into UDP messages and Modbus messages, and send them to the access control system through UDP protocol module and Modbus protocol module.

2. The data collection method according to claim 1, characterized in that: Parse configuration files, including protocol type files, UDP protocol configuration files, and Modbus protocol configuration files; The protocol type file is used to select the access control system communication protocol; the UDP protocol configuration file is used to configure the basic information of the UDP protocol communication; the Modbus protocol configuration file is used to configure the basic information of the Modbus protocol communication.

3. The data collection method according to claim 2, characterized in that: Construct the UDP protocol and Modbus protocol framework, including: establishing the number of threads based on the DEVNUM of the UDP protocol configuration file; configuring IP, mask, port, creating a UDP communication link, establishing a thread for each access control system to process its related information, and providing a basis for file interaction based on the sequence number and serial number; Create RS485 communication link according to the Modbus configuration file, and set up a separate thread for Modbus protocol parsing to process related information; Form UDP protocol module and Modbus module.

4. The data collection method according to claim 2, characterized in that: The management module creates a thread for the access control system with UDP protocol through the DEVNUM and serial number in the configuration file. The serial number is bound to the IP and port to facilitate subsequent file reading and writing and thread release; a dedicated thread is used for receiving and sending Modbus messages.

5. The data collection method according to claim 2, characterized in that: Read the shared space data through an independent thread, keep the reading status, and determine whether the message has been read according to the flag in the message structure of the read position. If it is a new message that has not been read, determine whether the current message is the required message according to the message type. If so, read the message, update the reading position and mark the message structure flag as read, parse out the name in the message, and compare it with the program ID to see if they are the same. If they are the same, parse it further; if they are not the same, discard it.

6. The data collection method according to claim 5, characterized in that: Write a running log file for each operation performed, and record the running log file; A UDP module protocol log file is written for operations on the UDP protocol module, and a Modbus protocol log file is written for operations on the Modbus module.