Embedded log system design method and system suitable for secondary equipment of power system

By designing an embedded full-process logging system in the secondary equipment of the power system, the problem of difficulty in providing effective data support in abnormal detection in the prior art is solved, and the full-process logging and backup of the equipment is realized, which improves the efficiency of problem positioning and root cause analysis.

CN119512792APending Publication Date: 2025-02-25BEIJING SIFANG JIBAO AUTOMATION +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411577930.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art is difficult to provide effective data support in the abnormality check of secondary equipment of power system, especially in complex network environments, and it is difficult to analyze the root cause of the problem.

Method used

An embedded full-process logging system suitable for secondary equipment of the power system is designed. By intercepting communication data between the device and peripherals, backing up network messages, log files and database data, and generating and parsing core dump files when an exception occurs, monitoring system resource utilization and compression and display of log files are realized.

Benefits of technology

It realizes full-process logging and backup of secondary equipment of the power system, provides data support for abnormal reproduction and operating conditions analysis, and improves the efficiency of problem positioning and root cause analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512792A_ABST
    Figure CN119512792A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded log system design method and system suitable for secondary equipment of a power system. The method comprises the following steps: intercepting communication data of secondary equipment and peripheral equipment of the power system, storing the communication data in a network message file, setting an annular buffer between a peripheral interface and an application process to receive external driving data, and realizing inter-process message communication by adopting a shared memory; when the system detects an exception or an alarm, backing up the intercepted network message file, backing up log files in the annular buffer and task process running process and message data in a database and a shared memory, analyzing a core dump file, and compressing and backing up the core dump file; monitoring the utilization rate of system resources, and when the utilization rate exceeds a set threshold value, performing exception management on each process, and compressing collected log files; and analyzing and displaying the log file by using a log analysis tool. According to the scheme of the invention, the whole-process log management of the abnormity of the secondary equipment is realized, and the problem backtracking and positioning are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of operation and maintenance of secondary equipment in power systems, and in particular relates to a design method and system for an embedded log system suitable for secondary equipment in power systems. Background Art

[0002] Secondary equipment in power systems typically utilizes embedded devices. Historically, due to limitations in chip and manufacturing costs and limited device resources, manufacturers focused on functional development, resulting in relatively simple systems. However, with the application of information technology in power systems, secondary equipment has become increasingly complex, with a trend toward integrating multiple devices into one. Not only are the functions of secondary equipment increasing in complexity, but the operating environment has also undergone significant changes. In particular, the widespread adoption of network technology in power grids has led to the emergence of extreme operating conditions such as network storms, situational awareness, and even cyberattacks. These new operating conditions pose significant challenges to device stability and troubleshooting.

[0003] Traditional logging system design techniques typically focus on recording exception branches during operation and recording core dump files when a program crashes. While traditional solutions can help troubleshoot program anomalies and correct errors, they often lack effective data support for reproducing and analyzing the root cause of the problem, especially when anomalies are caused by operating uncertainty due to network environment changes. Summary of the Invention

[0004] In order to address the deficiencies in the prior art, the present invention provides an embedded log system design method and system suitable for secondary equipment in power systems, so as to realize a full-process log system for equipment when secondary equipment is abnormal, and provide data support for problem tracing and positioning.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions.

[0006] The present invention first discloses a method for designing an embedded log system suitable for secondary equipment in a power system, the method comprising the following steps:

[0007] Step 1: Intercept the communication data between the power system secondary equipment and peripherals, save it to a network message file, set up a ring buffer between the peripheral interface and the application process to receive external drive data, and use shared memory to implement inter-process message communication;

[0008] Step 2: When the system detects an anomaly or an alarm, it backs up the intercepted network message files, the ring buffer, the log files and database during the task process, and the message data in the shared memory. When a core dump file is generated, it parses the core dump file and compresses the backup core dump file.

[0009] Step 3: Monitor system resource utilization. When utilization exceeds the set threshold, perform exception management on each process and compress the collected log files.

[0010] Step 4: Use a log analysis tool to parse and display the log file.

[0011] The present invention further includes the following preferred embodiments:

[0012] The network message file adopts the A\B backup mode, that is, when file A is full, file B is written; when file B is full, file A is cyclically overwritten.

[0013] The core dump file saves the memory and register data at the time the process crashes.

[0014] The method further comprises: parsing the core dump file when generating the core dump file, and compressing and backing up the core dump file.

[0015] It is detected whether a core dump file is generated. If it is generated, the core dump file is parsed, stack information and memory mapping information are exported, and the core dump file is compressed and backed up.

[0016] The system resource utilization includes CPU occupancy, memory usage or file handle utilization.

[0017] The abnormal management of each process further includes:

[0018] Record detailed information about resource usage by the abnormal process and then restart the process.

[0019] The displaying of the log file further includes:

[0020] Parse ring buffer data, display external driver data, display message interaction process according to preset message format, and display stack information and system resource monitoring information.

[0021] The present invention also discloses an embedded log system applicable to power system secondary equipment using the aforementioned embedded log system design method applicable to power system secondary equipment, comprising:

[0022] Initialization module, used to intercept the communication data between the power system secondary equipment and peripherals, save it to the network message file, set up a ring buffer between the peripheral interface and the application process to receive external drive data, and use shared memory to realize inter-process message communication;

[0023] The abnormality alarm backup module is used to back up the intercepted network message files when the system detects an abnormality or an alarm, and also back up the log files and database of the ring buffer during the task process and the message data in the shared memory. When a core dump file is generated, it is parsed and the core dump file is compressed and backed up.

[0024] The system resource monitoring module is used to monitor the utilization of system resources. When the utilization exceeds the set threshold, it performs exception management on each process and compresses the collected log files.

[0025] Log analysis tool, used to parse and display the log files.

[0026] Accordingly, the present application also discloses a terminal, including a processor and a storage medium;

[0027] The storage medium is used to store instructions;

[0028] The processor is configured to operate according to the instructions to execute the steps of the aforementioned method for designing an embedded logging system applicable to secondary equipment in a power system.

[0029] Accordingly, the present application also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned method for designing an embedded log system applicable to secondary equipment in a power system.

[0030] The beneficial effects of the present invention are that, compared with existing technologies, it provides an embedded logging system design method and system suitable for power system secondary equipment. This full-process logging system not only has all the recording functions of existing logging systems, but also provides snapshot storage of original network messages, process intermediate data, system resources, and other information generated by external interactions. It can not only record abnormal section data but also save data before the abnormality occurs, providing data support for abnormality reproduction and operating condition analysis. This effectively improves the efficiency of problem location and root cause analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of network message capture and backup in the present invention.

[0032] Figure 2 This is a schematic diagram of peripheral communication message backup in the present invention.

[0033] Figure 3 This is a log file backup diagram in the present invention.

[0034] Figure 4 This is a schematic diagram of inter-process message buffer backup in the present invention.

[0035] Figure 5 This is a schematic diagram of the core dump file backup in the present invention.

[0036] Figure 6 It is a schematic diagram of system resource monitoring in the present invention.

[0037] Figure 7 This is a schematic diagram of the log collection function in the present invention.

[0038] Figure 8 Schematic diagram of the log analysis tool in the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0040] The embodiments described in this application are only part of the embodiments of the present invention, not all of the embodiments. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without making creative work are all within the scope of protection of the present invention.

[0041] To address the shortcomings of existing technologies, this paper focuses on the difficulty of troubleshooting equipment anomalies. It proposes a design method and system for an embedded, full-process logging system suitable for power system secondary equipment. The logging system covers network messages, application communication messages, inter-process interaction data, process runtime log files and database cross-sectional data, abnormal process stack information, and system resource logs. It also includes a log collection module and PC-side log analysis tools. This system can maximize the recording of various system data at the time of an anomaly, providing effective and comprehensive data support for post-anomaly analysis.

[0042] The present invention discloses an embedded log system design method applicable to power system secondary equipment, comprising the following steps:

[0043] Step 1: Intercept the communication data between the power system secondary equipment and peripherals, save it in a network message file, set up a ring buffer between the peripheral interface and the application process to receive external drive data, and use shared memory to implement inter-process message communication.

[0044] Specifically, in step 1, see Figure 1 Design and develop or use third-party packet capture tools to intercept communication data between secondary devices and peripherals. Network message files use the A\B backup method, that is, when file A is full, file B is written; when file B is full, file A is overwritten in a loop, and so on.

[0045] A ring buffer is added between the peripheral interface and the application (task process), and the buffer data is cleared and written by allocating space on demand when writing. Figure 2 This is a schematic diagram of peripheral communication message backup in the present invention.

[0046] Step 2: When the system detects an anomaly or an alarm, the intercepted network message files are backed up, and the ring buffer, the log files and database during the task process, and the message data in the shared memory are backed up. When a core dump file is generated, the core dump file is parsed and compressed to back up the core dump file.

[0047] See also Figure 3 When the system detects an anomaly or an alarm, the ring buffer is backed up. When the system detects an anomaly or an alarm, the two network message files A and B are backed up. Preferably, the network message file size is set to 1M by default. Figure 4 This is a schematic diagram of inter-process message buffer backup.

[0048] In addition, when the system detects an anomaly or an alarm, the log files and database files during the execution of the backup task process are backed up to prevent data in the log files and database from becoming invalid due to frequent log writing and refreshing.

[0049] like Figure 5 , enable the core file dump function to save the memory and register data when the process crashes. Detect whether a core dump file is generated. If so, parse the core dump file, export key information such as stack information and memory map, and compress and back up the core dump file.

[0050] Step 3: Monitor system resource utilization. When the utilization exceeds the set threshold, perform exception management on each process and compress the collected log files.

[0051] like Figure 6 As shown in the figure, a system resource monitoring module is designed to monitor system resources such as CPU occupancy, memory usage, and file handle utilization. When utilization exceeds a set threshold, the module records resource usage by each process and manages abnormal processes. After recording the detailed resource usage information of the abnormal process, the process is restarted.

[0052] like Figure 7 , design a log collection module to realize the log files generated above, and compress and package the collected log files.

[0053] Step 4: Use a log analysis tool to parse and display the log file.

[0054] like Figure 8As shown in the figure, a PC-based log analysis tool is designed to open and display collected log files. It supports network message file parsing and traffic analysis; parses ring buffer data and displays external driver data; displays log files and database files, and analyzes hotspot data; displays message interaction processes according to preset message formats, and displays stack information and system resource monitoring information.

[0055] The beneficial effects of the present invention are that, compared with existing technologies, it provides an embedded logging system design method and system suitable for power system secondary equipment. This full-process logging system not only has all the recording functions of existing logging systems, but also provides snapshot storage of original network messages, process intermediate data, system resources, and other information generated by external interactions. It can not only record abnormal section data but also save data before the abnormality occurs, providing data support for abnormality reproduction and operating condition analysis. This effectively improves the efficiency of problem location and root cause analysis.

[0056] The present invention may be a system, method, and / or computer program product. The present invention also discloses an embedded logging system for power system secondary equipment based on the aforementioned embedded logging system design method for power system secondary equipment, comprising:

[0057] Initialization module, used to intercept the communication data between the power system secondary equipment and peripherals, save it to the network message file, set up a ring buffer between the peripheral interface and the application process to receive external drive data, and use shared memory to realize inter-process message communication;

[0058] The abnormality alarm backup module is used to back up the intercepted network message files when the system detects an abnormality or an alarm, and also back up the log files and database of the ring buffer during the task process and the message data in the shared memory. When a core dump file is generated, it is parsed and the core dump file is compressed and backed up.

[0059] The system resource monitoring module is used to monitor the utilization of system resources. When the utilization exceeds the set threshold, it performs exception management on each process and compresses the collected log files.

[0060] Log analysis tool, used to parse and display the log files.

[0061] Based on the spirit of the present invention, those skilled in the art will readily appreciate that a computer program product can be derived based on the aforementioned method for designing an embedded logging system for power system secondary equipment. This computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure. Specifically, the present application also includes a terminal comprising a processor and a storage medium; the storage medium is configured to store instructions; and the processor is configured to operate according to the instructions to execute the steps of the aforementioned method for designing an embedded logging system for power system secondary equipment.

[0062] Computer-readable storage medium can be the tangible device that can keep and store the instruction used by instruction execution device.Computer-readable storage medium can be, for example, but not limited to, electric storage device, magnetic storage device, optical storage device, electromagnetic storage device, semiconductor storage device or above-mentioned any suitable combination.The more specific example (non-exhaustive list) of computer-readable storage medium comprises: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical coding device, for example, punch card or the convex structure in the groove that stores instruction thereon and above-mentioned any suitable combination.Computer-readable storage medium used here is not interpreted as instantaneous signal itself, such as radio wave or other free propagating electromagnetic wave, electromagnetic wave (for example, by the light pulse of fiber optic cable) that waveguide or other transmission medium propagates or the electric signal that is transmitted by wire.

[0063] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0064] The computer program instructions for performing the operation of the present disclosure can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions can be executed entirely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer and partially on a remote computer, or executed entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, by utilizing the state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A design method for an embedded log system suitable for secondary equipment in a power system, characterized in that: The following steps are involved: Step 1: intercept the communication data between the secondary equipment and the peripherals of the power system, save it in the network message file, set up a ring buffer between the peripheral interface and the application process to receive the external drive data, and use shared memory to realize the message communication between processes; Step 2: When the system detects an abnormality or an alarm, the intercepted network message files are backed up, and the log files and databases in the ring buffer, the task process running process, and the message data in the shared memory are backed up. When the core dump file is generated, the core dump file is parsed and the core dump file is compressed and backed up; Step 3: Monitor the utilization of system resources. When the utilization exceeds the set threshold, perform exception management on each process and compress the collected log files. Step 4: Use a log analysis tool to parse and display the log file.

2. The method for designing an embedded log system for secondary equipment in a power system according to claim 1, characterized in that: The network message file adopts the A\B backup mode, that is, when file A is full, file B is written; when file B is full, file A is cyclically overwritten.

3. The method for designing an embedded log system for secondary equipment in a power system according to claim 2, characterized in that: The core dump file saves the memory and register data when the process crashes.

4. The method for designing an embedded log system for secondary equipment in a power system according to claim 3, characterized in that: The method of parsing the core dump file when generating the core dump file and compressing and backing up the core dump file further comprises: It is detected whether a core dump file is generated. If it is generated, the core dump file is parsed, stack information and memory mapping information are exported, and the core dump file is compressed and backed up.

5. The method for designing an embedded log system for secondary equipment in a power system according to claim 4, characterized in that: The system resource utilization includes CPU occupancy, memory usage or file handle utilization.

6. The method for designing an embedded log system suitable for secondary equipment in a power system according to claim 5, characterized in that: The abnormal management of each process further includes: Record detailed information about resource usage by the abnormal process and then restart the process.

7. The method for designing an embedded log system for secondary equipment in a power system according to claim 6, characterized in that: The displaying of the log file further includes: Parse the ring buffer data, display the external driver data, display the message interaction process according to the preset message format, and display the stack information and system resource monitoring information.

8. An embedded log system suitable for secondary equipment in a power system, characterized in that: include: Initialization module, used to intercept the communication data between the secondary equipment of the power system and the peripherals, save it in the network message file, set up a ring buffer between the peripheral interface and the application process to receive the external drive data, and use shared memory to realize the message communication between processes; The abnormal alarm backup module is used to back up the intercepted network message files when the system detects an abnormality or an alarm, and also back up the log files and database of the ring buffer and the message data in the shared memory during the task process. When a core dump file is generated, the core dump file is parsed and the core dump file is compressed and backed up. The system resource monitoring module is used to monitor the utilization of system resources. When the utilization exceeds the set threshold, each process is managed abnormally and the collected log files are compressed. The log analysis tool is used to parse and display the log files.

9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method for designing an embedded log system applicable to secondary equipment of a power system according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for designing an embedded log system applicable to secondary equipment of a power system as described in any one of claims 1 to 7 are implemented.