Method and system for receiving configuration tool log based on communication decentralized control system background
By using socket connections for inter-process communication, the log communication problem between logic configuration tools and the backend system in distributed control systems was solved, enabling real-time transmission and display of operation logs and maintenance logs, and improving the efficiency of problem location and recall.
Patent Information
- Application Number
- CN202111257195.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-27
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2041-10-27
AI Technical Summary
In distributed control systems, the logic configuration tools and the back-end system are designed independently, making it impossible to achieve communication between operation logs and maintenance logs, which leads to difficulties in problem localization and recall.
By establishing inter-process communication and utilizing the socket connection between the local server and the client, log transmission and parsing between the logic configuration tool and the backend system are realized, generating log events and storing them in the database for display.
It enables real-time transmission of operation and maintenance logs between the logic configuration tool and the backend system, improving the efficiency of problem localization and recall.
Smart Images

Figure CN113946494B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a distributed control system operation communication system, and in particular to a method and system for receiving configuration tool logs in the background of a distributed control system based on inter-process communication. Background Technology
[0002] During the operation of a distributed control system, the operation logs and maintenance logs of engineers in the logic configuration tool are sent to the back-end system and displayed through the back-end interface. This helps operators to locate and recall relevant problems during the configuration process when the system is running and maintained.
[0003] However, in a distributed control system, the logic configuration tool and the back-end system are two independent design frameworks, and their operation and maintenance are carried out independently. The back-end system and the logic configuration tool are independent of each other and cannot communicate operation logs and maintenance logs, making it impossible to locate and recall problems during system operation and maintenance.
[0004] To enable log forwarding between two independent applications and to facilitate communication of operation and maintenance logs between the logic configuration tool and the backend system, there is an urgent need for a method based on inter-process communication to enable the backend program of the distributed control system to receive logs from the configuration tool. Summary of the Invention
[0005] To address the aforementioned deficiencies in the existing technology, the present invention aims to provide a method and system for implementing background programs to monitor, parse, and forward operation and maintenance logs occurring in logic configuration software based on inter-process communication.
[0006] The present invention is achieved through the following technical solution.
[0007] In one aspect, this invention provides a method for receiving configuration tool logs in the background of a distributed communication control system, comprising the following steps:
[0008] Establish a local server and client for inter-process communication and set up a communication connection;
[0009] Logs are generated in the client-side logic configuration tool; the configuration tool software then sends the logs to the local server of the backend system.
[0010] The local server of the backend system listens for and receives log messages sent from the client, calls the callback function to parse the log messages, extracts the logs, and uses the logs to generate log events;
[0011] The background system log collection process sends log events to the background alarm receiving module;
[0012] The background alarm receiving module receives log events, parses the log events, stores the log events in the database, and displays the logs in the database through the alarm monitoring and display module.
[0013] Regarding the above technical solution, the present invention has a further preferred embodiment:
[0014] Preferably, the local server and client establish inter-process communication and establish a communication connection, including:
[0015] In the background system, a log collection process is started, which establishes a local server based on local sockets and listens for connections from local sockets.
[0016] In the logic configuration tool, create a client based on a local socket as a client for background log listening and forwarding;
[0017] A socket-based communication connection is established between the client and the local server. The client sends a communication connection request, the local server receives the connection request, and specifies a callback function in the local server to receive and parse log messages from the client.
[0018] Preferably, the configuration tool software acts as a client, connecting to the local server via a socket. If the connection is successful, the logs are packaged into log messages and sent to the local server of the background system log collection process.
[0019] Preferably, it is necessary to check whether the local host computer has started the local server. Only one local server can run on a host computer.
[0020] Preferably, the logs include operation logs and maintenance logs; the log events include operation log events and maintenance log events; each log event object includes operation method, action content, process control station name, operator and operation time information.
[0021] Preferably, the operation logs and maintenance logs are stored in a log hash table; the key of the hash table is the process control station name, and the value is a list of operation and maintenance records for the corresponding process control station.
[0022] Preferably, the operation log and maintenance log include: operation method, action content, process control station name, operator and operation time.
[0023] Preferably, in the operation log and maintenance log:
[0024] The operation method is used to distinguish between operation log records and maintenance log records;
[0025] The action description specifies the exact operation or maintenance action.
[0026] The process control station name is the name of the process control station currently being operated or maintained.
[0027] The operator is the username currently logged into the configuration tool;
[0028] Operation time is the time at which the operation or maintenance action occurs.
[0029] Preferably, when the configuration tool software sends the operation log and maintenance log to the local server of the backend system, it also adds the operation log and maintenance log to the operation and maintenance record list of the corresponding process control station in the log hash table.
[0030] In another aspect, the present invention provides a log receiving system for a background configuration tool based on a distributed communication control system, comprising: a client for sending logs generated in a logic configuration tool to a local server of the background system;
[0031] The local server listens for and receives log messages sent from clients, calls callback functions to parse the log messages, extracts the logs, and uses the logs to generate log events.
[0032] The background system alarm receiving module is used to receive log events generated by the local server;
[0033] The alarm monitoring and display module is used to display the logs in the database.
[0034] The present invention, by adopting the above technical solution, has the following beneficial effects:
[0035] 1. This invention establishes a communication connection between the logic configuration tool and the backend system based on local inter-process communication, and sends the operation log and maintenance log records in the logic configuration tool to the backend system in real time, solving the problem that operation logs and maintenance logs cannot be directly forwarded between the two independently maintained and running design applications, the logic configuration tool and the backend system.
[0036] 2. This invention enables the forwarding of operation and maintenance logs from logic configuration tools, sending the operation and maintenance logs of engineers in the logic configuration tool to the backend system and displaying them through the alarm interface. This improves the efficiency of operators in locating and recalling relevant problems during the configuration process when the system is running and maintained. Attached Figure Description
[0037] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, do not constitute an undue limitation of the invention. In the drawings:
[0038] Figure 1 This is a flowchart of inter-process communication. Detailed Implementation
[0039] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention.
[0040] like Figure 1 As shown, this invention provides a method for receiving configuration tool logs in the background of a communication-based distributed control system, comprising the following steps:
[0041] Step 1: Establish a local server and client for process communication and set up a communication connection. The local server is the backend system, and the client is the logic configuration tool. Specifically:
[0042] 101. In the background system, start the log collection process. In this process, establish a local server based on the local socket. The specific operation of establishing the server is through a function. Listen for connections from a local socket. Check (the specific operation is through a function) whether the local (host computer) server has been started. Multiple local servers are not allowed to run at the same time. Only one local server can run on a host computer.
[0043] 102. In the logic configuration tool, create a client based on a local socket as a client for background log listening and forwarding.
[0044] 103. A socket-based communication connection is established between the client and the local server. The communication between the client and the local server is based on the local socket. The client sends a communication connection request, the local server receives the connection request, and specifies a callback function in the local server to receive and parse log messages from the client.
[0045] Step 2: Generate logs in the logic configuration tool: The logs include operation logs and maintenance logs; the operation logs and maintenance logs are stored in a log hash table; the key of the hash table is the process control station name, and the value is a list of operation records on the corresponding process control station.
[0046] The configuration tool software records the operations and maintenance work performed by configuration personnel in real time and generates relevant logs. The software sends these operation and maintenance logs to the local server of the backend system and adds them to the log list of the corresponding process control station in the operation log hash table, thus storing operation and maintenance logs within the configuration tool. Log content includes: operation method, action content, process control station name, operator, and operation time. The operation method is used to distinguish between operation log records and maintenance log records, categorizing logs by operation type into: operation log records and maintenance log records.
[0047] The action content describes the specific operation or maintenance action. The process control station name is the name of the process control station to which the current operation or maintenance is performed. The operator is the username currently logged into the configuration tool. The operation time is the time when the operation or maintenance action occurs.
[0048] Step 3: The configuration tool software connects to the local server of the backend system and sends the operation logs and maintenance logs to the local server of the backend system. The configuration tool software acts as a client and connects to the local server through a socket. If the connection is successful, the log content in Step 2 is sent as a message to the local server of the backend system log collection process.
[0049] Step 4: The local server of the backend system listens for and receives log messages sent from the client, and calls a callback function to parse the log messages, extracting information about the logs such as operation method, action content, process control station name, operator, and operation time. Based on the operation method, it distinguishes between operation logs and maintenance logs, and uses the information about the logs to generate log events. Log events include operation log events and maintenance log events. Each log event object includes information such as operation method, action content, process control station name, operator, and operation time.
[0050] Step 5: The background system log collection process sends log events to the background alarm receiving module.
[0051] Step 6: After receiving the log event, the background alarm receiving module parses the log event, stores the operation log and maintenance log in the database, and finally displays the operation log in the database through the alarm monitoring and display module (the process is display).
[0052] The present invention further provides a log receiving system for a distributed communication control system, comprising: a client for sending operation logs and maintenance logs generated in the logic configuration tool to a local server of the backend system.
[0053] The local server listens for and receives operation log and maintenance log messages sent from the client, calls a callback function to parse the log messages, extracts the operation log and maintenance log, and uses the operation log and maintenance log to generate log events;
[0054] The background system alarm receiving module is used to receive log events generated by the local server;
[0055] The alarm monitoring and display module is used to display the operation logs and maintenance logs in the database.
[0056] The present invention will be further illustrated by a specific embodiment below.
[0057] Step 1: Establish a local server and client for inter-process communication and set up a communication connection.
[0058] 101. In the background system, start the log collection process. In this process, establish a local server based on the local socket. The specific establishment operation is carried out through a function. Listen for connections from a local socket and check whether the local server has been started. Multiple local servers are not allowed to run at the same time.
[0059] 102. In the logic configuration tool, create a client based on a local socket as a client for background log listening and forwarding.
[0060] 103. A socket-based communication connection is established between the client and the local server. The communication between the client and the local server is based on the local socket. The client sends a communication connection request, the local server receives the connection request, and specifies a callback function (slotReadLocalSocket()) in the local server to receive and parse log messages from the client.
[0061] Step 2: Generate logs in the logic configuration tool: Operation logs and maintenance logs are stored in a log hash table; the key of the hash table is the process control station name, and the value is a list of operation records on the corresponding process control station. For the process control station with address 1001, the key of its log hash table is DPU1001, and the value is a list of operation records on that process control station.
[0062] The configuration tool software records the operations and maintenance work performed by the configuration personnel in the configuration tool in real time and generates relevant logs. When the configuration personnel ZhangSan performs a download operation on DPU1001 in the configuration tool, a relevant operation log is generated in the client logic configuration tool. The log content is: Operation; Download all tasks; DPU1001; ZhangSan; 2021-06-21 14:12:00. This operation log is added to the operation and maintenance record log list with the key DPU1001 in the operation log and maintenance log hash table.
[0063] Step 3: The configuration tool software connects to the local server of the backend system and sends the operation and maintenance logs to the local server of the backend system. The configuration tool software acts as a client and connects to the local server through a socket. If the connection is successful, the operation logs in Step 2 are packaged into a message and sent to the local server of the backend system log collection process.
[0064] Step 4: The local server of the backend system listens for and receives log messages sent from the client, calls the callback function slotReadLocalSocket() to parse the log messages, and extracts the operation mode as Operation, the action content as Download all tasks, the process control station name as DPU1001, the operator as ZhangSan, and the operation time as 2021-06-21 14:12:00. Based on the operation mode Operation, it can be determined that the log is an operation log. An operation log event is generated using the log information. The event object includes the operation mode Operation, the action content Download all tasks, the process control station name as DPU1001, the operator as ZhangSan, and the operation time as 2021-06-21 14:12:00.
[0065] Step 5: The background system log collection process sends log events to the background alarm receiving module.
[0066] Step 6: After receiving the operation log event, the background alarm receiving module parses the operation event, stores the operation log in the database, and finally displays the operation log in the database through the alarm monitoring and display module, including information such as: Operator: ZhangSan, Operation Category: Operation, Operation Content: Download all tasks, Action Time: 2021-06-21 14:12:00, etc.
[0067] As can be seen from the above embodiments, the method of the present invention realizes the communication connection between the logic configuration tool and the back-end system, and sends the operation log records in the logic configuration tool to the back-end system in real time, thereby improving the efficiency of operators in locating and recalling relevant problems in the configuration process during system operation and maintenance.
[0068] This invention is not limited to the above embodiments. Based on the technical solutions disclosed in this invention, those skilled in the art can make some substitutions and modifications to some of the technical features without creative effort, and all such substitutions and modifications are within the protection scope of this invention.
Claims
1. A method for receiving configuration tool logs in the background of a distributed communication control system, characterized in that, Includes the following steps: Establish a local server and client for inter-process communication and set up a communication connection, including: In the background system, a log collection process is started, which establishes a local server based on local sockets and listens for connections from local sockets. In the logic configuration tool, create a client based on a local socket as a client for background log listening and forwarding; A socket-based communication connection is established between the client and the local server. The client sends a communication connection request, the local server receives the connection request, and specifies a callback function in the local server to receive and parse log messages from the client. The configuration tool software acts as a client, connecting to the local server via a socket. If the connection is successful, the logs are packaged into log messages and sent to the local server of the background system log collection process. Logs are generated in the client-side logic configuration tool; the configuration tool software then sends the logs to the local server of the backend system. The local server of the backend system listens for and receives log messages sent from the client, calls the callback function to parse the log messages, extracts the logs, and uses the logs to generate log events; Logs include operation logs and maintenance logs; log events include operation log events and maintenance log events; each log event object includes operation method, action content, process control station name, operator, and operation time information; Operation logs and maintenance logs are stored in a log hash table; the key of the hash table is the process control station name, and the value is a list of operation and maintenance records for the corresponding process control station. The background system log collection process sends log events to the background alarm receiving module; The background alarm receiving module receives log events, parses the log events, stores the log events in the database, and displays the logs in the database through the alarm monitoring and display module.
2. The method for receiving configuration tool logs in the background of a distributed communication control system according to claim 1, characterized in that, You need to check whether the local host computer has started the local server. Only one local server can run on a host computer.
3. The method for receiving configuration tool logs in the background of a distributed communication control system according to claim 1, characterized in that, In the operation log and maintenance log: The operation method is used to distinguish between operation log records and maintenance log records; The action description specifies the exact operation or maintenance action. The process control station name is the name of the process control station currently being operated or maintained. The operator is the username currently logged into the configuration tool; Operation time is the time at which the operation or maintenance action occurs.
4. The method for receiving configuration tool logs in the background of a distributed communication control system according to claim 1, characterized in that, When the configuration tool software sends the operation log and maintenance log to the local server of the backend system, it also adds the operation log and maintenance log to the operation and maintenance record list of the corresponding process control station in the log hash table.
5. A log system based on a communication distributed control system background receiving configuration tool used in the method described in any one of claims 1-4, characterized in that, include: The client is used to send logs generated in the logic configuration tool to the local server of the backend system. The local server listens for and receives log messages sent from clients, calls callback functions to parse the log messages, extracts the logs, and uses the logs to generate log events. The background system alarm receiving module is used to receive log events generated by the local server; The alarm monitoring and display module is used to display the logs in the database.
Citation Information
Patent Citations
Log treatment method for public medical system
CN104408136A
Method and system of interprocess communications
US7051108B1