CN113608904A - Fault management method based on INI configuration file - Google Patents
Fault management method based on INI configuration file Download PDFInfo
- Publication number
- CN113608904A CN113608904A CN202110687556.2A CN202110687556A CN113608904A CN 113608904 A CN113608904 A CN 113608904A CN 202110687556 A CN202110687556 A CN 202110687556A CN 113608904 A CN113608904 A CN 113608904A
- Authority
- CN
- China
- Prior art keywords
- fault
- ini
- file
- information
- configuration file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000007726 management method Methods 0.000 title claims abstract description 60
- 238000000034 method Methods 0.000 claims abstract description 21
- 230000006870 function Effects 0.000 claims description 10
- 238000010276 construction Methods 0.000 claims description 4
- 230000010365 information processing Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
- G06F11/0775—Content or structure details of the error report, e.g. specific table structure, specific error fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/079—Root cause analysis, i.e. error or fault diagnosis
Abstract
A fault management method based on an INI configuration file comprises the steps of firstly designing fault management contents and an INI parameter configuration file, and deploying the INI parameter configuration file into a fault management system; acquiring information in an INI parameter configuration file by using a reading method in a QT setting class, and storing fault information into an associated container MAP by using a fault identification code as a key and splicing three characters of fault severity, fault information description and a fault solution as values; interconnecting all subsystems, judging a fault source after the fault management system receives the fault, analyzing a fault identification code, and acquiring detailed fault information; and creating a txt document, and when the fault management system receives a fault, recording the fault detailed information into the txt document by using a text file log recording thread by using standard stream input to realize fault management. The invention can add, modify and delete the fault in the INI configuration file under the condition of not changing the source code, and the fault information does not need to be compiled into the code, thereby improving the operation efficiency.
Description
Technical Field
The invention belongs to the field of aerospace system data communication, and relates to a fault management method based on an INI configuration file.
Background
In the management of the ground system of the aircraft, fault management is an important link, all the subsystems on the ground are connected through a network switch, all the subsystems send message data to the network, and a fault management module receives fault information sent by different nodes and displays faults through a human-computer interaction interface.
In the fault management of the aircraft ground system, the traditional method is to compile fault information into a program in the form of codes, usually only store fault identifiers, and a user matches faults and fault descriptions according to the fault identifiers in actual use.
Disclosure of Invention
The technical problem solved by the invention is as follows: the defects of the prior art are overcome, and a fault management method based on an INI configuration file is provided.
The technical scheme of the invention is as follows:
in a first aspect, the present invention provides a fault management method based on an INI configuration file, the method including the steps of:
designing fault management contents including a fault sequence number, a fault source, a fault identification code, a fault severity, fault information description, a fault solution, fault generation time and fault information remarks;
designing an INI type parameter configuration file, and deploying the INI type parameter configuration file into a fault management system; the INI type parameter configuration files comprise N sections, the first section stores the number of faults to be managed, and the ith section stores fault identification codes, fault severity, fault information description and fault solution of the (i-1) th fault; i is a natural number, and i belongs to [2, N ]; n is a natural number and is more than or equal to 2;
step three, acquiring information in an INI parameter configuration file by using a reading method in a QT setting class, and storing fault information into an associated container MAP by using a fault identification code as a key and splicing three characters of fault severity, fault information description and a fault solution as values;
step four, interconnecting all subsystems, judging a fault source after the fault management system receives the fault, analyzing a fault identification code, and acquiring detailed fault information;
and fifthly, creating a txt document, establishing a text file log recording thread, and recording fault detailed information into the txt document by using standard stream input through the text file log recording thread when the fault management system receives a fault so as to realize fault management.
In the second step, the fault management system comprises fault management equipment and M system operation equipment;
the INI type parameter configuration file is deployed into the fault management system in the following manner:
the method comprises the steps that a fault management device serves as a server side, M system operation devices serve as client sides to establish connection, the fault management device deploys an INI configuration file in an ftp mode, and M is a natural number larger than 0.
In the first step, the fault identification code is divided into M areas according to 16 bits.
In the third step, when three characters of the fault severity, the fault information description and the fault solution are spliced, the characters are connected by using "&".
The implementation manner of the step four is as follows:
(1) the subsystems are interconnected by using Ethernet, the connection configuration of the Ethernet UDP is carried out, and different subsystems reporting faults are set to be different IPs in the same network segment;
(2) after receiving the fault through the Ethernet, the fault management system judges the source of the fault through the IP and the port number of the fault message and analyzes the fault identification code;
(3) searching in the associated container MAP by using a searching method in the associated container MAP and taking a fault identification code key as a searching variable, writing a searched value into a character string variable sum if the searching is successful, and prompting through a popup window if the searching is failed;
(4) after the search is successful, decomposing each variable of the sum element according to the character of &toobtain the fault severity, the fault information description and the fault solution;
(5) reading the last fault serial number, and performing plus 1 operation on the basis to serve as the fault serial number of the current fault;
(6) and recording the fault occurrence time, wherein the fault occurrence time is the system time when the system receives the fault message, and the acquisition of the fault detailed information is completed.
The time of occurrence of the failure is recorded in the form of a character string.
The implementation manner of the step five is as follows:
(1) defining the file name of the txt document, and setting the type as a character string type;
(2) establishing a QT file operation class file object file, and opening the txt file by using an opening function in a file operation class, wherein the opening attribute is a write-only mode, a text mode or an additional mode;
(3) defining a text stream type object stream, and taking a file object file as a construction function parameter; establishing a text file log recording thread, and when a fault management system receives a fault, recording fault detailed information into a txt document by the text file log recording thread through a text stream class object stream by using a standard stream input "<", wherein the fault detailed information comprises a fault sequence number, a fault source, a fault identification code, a fault grade, a fault information description, a fault solution and fault generation time.
In a second aspect, the present invention provides a terminal device, comprising:
a memory for storing instructions for execution by at least one processor;
a processor for executing instructions stored in a memory to perform the method of the first aspect.
In a third aspect, the present invention provides a computer readable storage medium storing computer instructions which, when run on a computer, cause the computer to perform the method of the first aspect.
Compared with the prior art, the invention has the beneficial effects that:
the invention writes the detailed information of the system fault into the configuration file by using the INI configuration file, can add, modify and delete the fault in the INI configuration file under the condition of not changing the source code, does not need to compile the fault information into the code, reduces the code amount and improves the operation efficiency.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
fig. 2 is a fault management system topology.
Detailed Description
The invention is further elucidated with reference to the drawing.
In order to solve the problem of fault management of each node in an aircraft ground system, the invention provides a method for managing different equipment faults based on an INI configuration file. The INI profile belongs to a common form of a profile, which is composed of a plurality of sections (sections), and all parameters are combined together in the unit of section. A block has no distinct end identifier and the start of a block is the end of the previous block. This configuration increases the flexibility of the system.
Example (b):
taking an example that the fault management system comprises four system operation devices, the four system operation devices are respectively a ground station, a programmable execution unit, an information processing device and a control device. Fig. 2 is a fault management system topology.
With reference to fig. 1, a fault management method based on an INI type parameter configuration file is described, which specifically includes the following steps:
s1, designing fault management contents, wherein the fault management contents comprise: the fault information comprises a fault serial number ErrNo, a fault source ErrSrc, a fault identification code ErrLabel, a fault level ErrLevel, a fault information description ErrDescript, a fault solution Errsolution, fault generation time ErrTime and fault information remark ErrNote, and the fault information can be displayed through a human-computer interface.
S2: designing an INI type parameter configuration file, which comprises N sections (sections), wherein the configuration file comprises the following parts in the designed fault management content in S1: fault identification code ErrLabel, fault level ErrLevel, fault information description errdeccript, and fault resolution ErrSolution.
(1) The first section is the number NUM (NUM value is N-1) of faults needing to be managed, and the second section (section) to the (N-1) th section (section) are the contents of each fault management, namely the ith section stores the fault management contents of the (i-1) th fault, and the fault management contents comprise an identification code ErrLabel, a fault severity ErrLevel, and fault information description ErrDescript and a fault solution ErrSolution. i is a natural number, and i belongs to [2, N ]; n is a natural number and is more than or equal to 2.
(2) The identification code ErrLabel is divided into four areas according to 16 bits, the area occupied by the ground station Ex01 is 0x 0100-0 x01ff, the area occupied by the programmable execution unit Ex02 is 0x 0200-0 x02ff, the area occupied by the information processing equipment Ex03 is 0x 0300-0 x03ff, and the area occupied by the control equipment Ex04 is 0x 0400-0 x04 ff.
(3) The fault severity ErrLevel is divided into four levels of severity criticality, important, general normal and warning.
(4) The fault information description ErrDescrip provides a short description of the fault for each system.
(5) The failure solution ErrSolution is a solution provided for users.
The fault management device is used as a server side, the devices Ex 01-Ex 04 are used as clients to establish connection, and the fault management device deploys the INI parameter configuration file in an ftp mode.
And S3, analyzing the INI parameter configuration file designed in the S2, and storing the analyzed fault information into an associated container MAP.
(1) Defining a set object set by using a setting class (Qsettings) in the QT, setting the format to be an initialization format (IniFormat), starting to load one section (section) by using a begin group () function in the setting class (Qsettings), finishing to load one section (section) by using an end group () function, and circularly loading N sections (sections) to acquire the fault of the configuration.
(2) Defining an associated container MAP object mapError, wherein keys (keys) and values (values) stored in the object are both of a character string type, the keys are fault identification codes ErrLabel, the values are fault severity ErrLevel, fault information describes the splicing of three characters of ErrDescript and a fault solution Errsolution, and the characters are connected by using "&".
(3) The key-value pair (key-value) information is inserted into the association container MAP object mapError using an insertion function insert () loop of the association container.
And S4, connecting the systems by using the Ethernet, and analyzing the reported fault by the fault management system.
(1) Ethernet configuration is carried out, different subsystems reporting faults are set to be different IPs in the same network segment (for example, ground station Ex01 is set to be IP:192.168.100.01 PORT number PORT:0x8001, executable logic unit Ex02 is set to be IP:192.168.100.02 PORT number PORT:0x8002, information processing equipment Ex03 is set to be IP:192.168.100.03 PORT number PORT:0x8003, and control equipment EX04 is set to be IP:192.168.100.04 PORT number PORT:0x8004)
(2) After receiving the fault through the Ethernet, the fault management system judges the fault source ErrSrc through the IP and the port number of the fault message. And analyzing the fault identification code ErrLabel.
(3) And (3) searching in the associated container MAP object mapError by using a searching method find () in the associated container MAP and taking a fault identification code ErrLabel key as a searching variable, and writing the searched value into a character string variable sum if the searching is successful. And if the search fails, prompting through a popup window.
(4) After the search is successful, decomposing each variable of the sum element according to &toobtain the fault severity ErrLevel, describing ErrDescript by fault information and solving the ErrSolution.
(5) The method for generating the fault serial number errNo. is to read out the last fault serial number each time, and then add one on the basis to obtain a new fault label.
(6) And recording the fault occurrence time ErrTime, wherein the time value is the system time when the system receives the fault message, and the recording is carried out in a character string mode. And finishing the acquisition of the detailed fault information.
(7) And displaying the detailed fault information on a system interface through the QtableWidget.
S5: and recording the fault information analyzed in the step S4. Creating a txt-type text file records process error data.
(1) The file name of the text file is defined, and the type is set as a character string type. Files are stored under a LogFile folder with the file name "ErrTime + LogFile. txt" (ErrTime identifies the time of failure).
(2) Establishing a QT file operation class (QFile) file object file, wherein parameters transmitted by a construction function are the file name of the file object file, an opening function open () in the file operation class (QFile) is used for opening the file, and the opening attributes are a write-only mode WriteOnly, a Text mode Text and an additional mode appendix.
(3) A text stream (Qtextstream) class object stream is defined, and a file object file is used as a construction function parameter. Establishing a text file log recording thread, and inputting a recording file by using a standard stream input "<", wherein the record comprises a fault serial number ErrNo., a fault source ErrSrc, a fault identification code ErrLabel, a fault level ErrLevel, a fault information description ErrRescript, a fault solution Errsolution and a fault generation time ErrTime when a system receives a fault.
The invention stores the detailed system fault information into the configuration file by using the INI type parameter configuration file, can add, modify and delete the fault in the INI type parameter configuration file under the condition of not changing the source code, does not need to compile the fault information into the code, reduces the code amount and improves the operation efficiency.
Those skilled in the art will appreciate that the details not described in the present specification are well known.
Claims (9)
1. A fault management method based on an INI configuration file is characterized by comprising the following steps:
designing fault management contents including a fault sequence number, a fault source, a fault identification code, a fault severity, fault information description, a fault solution, fault generation time and fault information remarks;
designing an INI type parameter configuration file, and deploying the INI type parameter configuration file into a fault management system; the INI type parameter configuration files comprise N sections, the first section stores the number of faults to be managed, and the ith section stores fault identification codes, fault severity, fault information description and fault solution of the (i-1) th fault; i is a natural number, and i belongs to [2, N ]; n is a natural number and is more than or equal to 2;
step three, acquiring information in an INI parameter configuration file by using a reading method in a QT setting class, and storing fault information into an associated container MAP by using a fault identification code as a key and splicing three characters of fault severity, fault information description and a fault solution as values;
step four, interconnecting all subsystems, judging a fault source after the fault management system receives the fault, analyzing a fault identification code, and acquiring detailed fault information;
and fifthly, creating a txt document, establishing a text file log recording thread, and recording fault detailed information into the txt document by using standard stream input through the text file log recording thread when the fault management system receives a fault so as to realize fault management.
2. The INI-profile-based fault management method according to claim 1, wherein in the second step, the fault management system comprises a fault management device and M system operating devices;
the INI type parameter configuration file is deployed into the fault management system in the following manner:
the method comprises the steps that a fault management device serves as a server side, M system operation devices serve as client sides to establish connection, the fault management device deploys an INI configuration file in an ftp mode, and M is a natural number larger than 0.
3. The INI-profile-based fault management method as claimed in claim 2, wherein in the first step, the fault id code is divided into M regions by 16 bits.
4. The method for managing faults based on the INI configuration file is characterized in that in the third step, when three characters of fault severity, fault information description and fault solution are spliced, the characters are connected by using "&".
5. The method for fault management based on the INI profile as claimed in claim 1, wherein the fourth step is implemented as follows:
(1) the subsystems are interconnected by using Ethernet, the connection configuration of the Ethernet UDP is carried out, and different subsystems reporting faults are set to be different IPs in the same network segment;
(2) after receiving the fault through the Ethernet, the fault management system judges the source of the fault through the IP and the port number of the fault message and analyzes the fault identification code;
(3) searching in the associated container MAP by using a searching method in the associated container MAP and taking a fault identification code key as a searching variable, writing a searched value into a character string variable sum if the searching is successful, and prompting through a popup window if the searching is failed;
(4) after the search is successful, decomposing each variable of the sum element according to the character of &toobtain the fault severity, the fault information description and the fault solution;
(5) reading the last fault serial number, and performing plus 1 operation on the basis to serve as the fault serial number of the current fault;
(6) and recording the fault occurrence time, wherein the fault occurrence time is the system time when the system receives the fault message, and the acquisition of the fault detailed information is completed.
6. The INI-profile-based fault management method according to claim 5, wherein the fault occurrence time is recorded in a string form.
7. The method for fault management based on the INI profile as claimed in claim 1, wherein the step five is implemented as follows:
(1) defining the file name of the txt document, and setting the type as a character string type;
(2) establishing a QT file operation class file object file, and opening the txt file by using an opening function in a file operation class, wherein the opening attribute is a write-only mode, a text mode or an additional mode;
(3) defining a text stream type object stream, and taking a file object file as a construction function parameter; establishing a text file log recording thread, and when a fault management system receives a fault, recording fault detailed information into a txt document by the text file log recording thread through a text stream class object stream by using a standard stream input "<", wherein the fault detailed information comprises a fault sequence number, a fault source, a fault identification code, a fault grade, a fault information description, a fault solution and fault generation time.
8. A terminal device, comprising:
a memory for storing instructions for execution by at least one processor;
a processor for executing instructions stored in the memory to perform the method of any one of claims 1-7.
9. A computer-readable storage medium having stored thereon computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110687556.2A CN113608904A (en) | 2021-06-21 | 2021-06-21 | Fault management method based on INI configuration file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110687556.2A CN113608904A (en) | 2021-06-21 | 2021-06-21 | Fault management method based on INI configuration file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113608904A true CN113608904A (en) | 2021-11-05 |
Family
ID=78336685
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110687556.2A Pending CN113608904A (en) | 2021-06-21 | 2021-06-21 | Fault management method based on INI configuration file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113608904A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5652832A (en) * | 1995-11-13 | 1997-07-29 | Systemsoft Corporation | Method and apparatus for diagnosis and correction of peripheral device allocation faults |
CN101442758A (en) * | 2007-11-19 | 2009-05-27 | 华为技术有限公司 | Failure diagnosis method and apparatus |
CN107450931A (en) * | 2017-08-15 | 2017-12-08 | 竞技世界(北京)网络技术有限公司 | Visualizing editing method and device based on INI configuration files |
CN112230892A (en) * | 2020-10-15 | 2021-01-15 | 天津津航计算技术研究所 | Fault management method based on extensible markup language |
-
2021
- 2021-06-21 CN CN202110687556.2A patent/CN113608904A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5652832A (en) * | 1995-11-13 | 1997-07-29 | Systemsoft Corporation | Method and apparatus for diagnosis and correction of peripheral device allocation faults |
CN101442758A (en) * | 2007-11-19 | 2009-05-27 | 华为技术有限公司 | Failure diagnosis method and apparatus |
CN107450931A (en) * | 2017-08-15 | 2017-12-08 | 竞技世界(北京)网络技术有限公司 | Visualizing editing method and device based on INI configuration files |
CN112230892A (en) * | 2020-10-15 | 2021-01-15 | 天津津航计算技术研究所 | Fault management method based on extensible markup language |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10649838B2 (en) | Automatic correlation of dynamic system events within computing devices | |
US7809822B2 (en) | Method for the automatic generation of workflow models, in particular for interventions in a telecommunication network | |
US8775387B2 (en) | Methods and systems for validating accessibility and currency of replicated data | |
US10073876B2 (en) | Bloom filter index for device discovery | |
CN110162509A (en) | File comparison method, device, computer equipment and storage medium | |
CN111683066B (en) | Heterogeneous system integration method, heterogeneous system integration device, computer equipment and storage medium | |
CN112230892B (en) | Fault management method based on extensible markup language | |
CN115129736A (en) | Rule engine-based rule event dynamic loading and updating method and related equipment | |
CN114968754A (en) | Application program interface API test method and device | |
US9558298B2 (en) | Method for the approximate matching of regular expressions, in particular for generating intervention workflows in a telecommunication network | |
CN112667860A (en) | Sub-graph matching method, device, equipment and storage medium | |
CN114153980A (en) | Knowledge graph construction method and device, inspection method and storage medium | |
CN106294769B (en) | The mthods, systems and devices of synchronous engineering data | |
CN101170436B (en) | A method for managing template in network management system | |
CN113608903A (en) | Fault management method based on XML language | |
CA3138761A1 (en) | Method, device, computer equipment and storage medium for verifying inter-system data admission | |
CN113489593A (en) | JSON message checking method and JSON message checking device | |
CN113608904A (en) | Fault management method based on INI configuration file | |
KR101927689B1 (en) | Method for processing of cim network diagram | |
Seipel et al. | Mining complex event patterns in computer networks | |
Lamperti | Temporal determinization of mutating finite automata: Reconstructing or restructuring | |
CN117389908B (en) | Dependency analysis method, system and medium for interface automation test case | |
CN113992549B (en) | Test method, test device, electronic equipment and storage medium | |
EP4246909A1 (en) | Method and apparatus for configuring node | |
CN110096504B (en) | Streaming event feature matching method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |