A fault management method based on INI configuration file
By adopting a fault management method based on INI configuration files in the aircraft ground system, the problem of inefficiency of traditional fault management methods is solved, and flexible management of fault information and improvement of operating efficiency are achieved.
Patent Information
- Application Number
- CN202110687556.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-21
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-06-21
AI Technical Summary
In aircraft ground systems, traditional fault management methods require recompiling the source code to add, delete or modify fault codes, resulting in low operating efficiency, and the embedded computer system has limited memory space and cannot effectively manage a large amount of fault information.
Adopt a fault management method based on INI configuration file, design the fault management content and store it in the INI type parameter configuration file, read the configuration file information through the QT setting class, use the associated container to store the fault information, and conduct it through the Ethernet interconnection system Fault analysis and recording.
Without changing the source code, the operations of adding, modifying and deleting fault information are simplified, the amount of code is reduced, operating efficiency is improved, and flexible management of fault information is achieved.
Smart Images

Figure CN113608904B_ABST
Abstract
Description
Technical Field
[0001] 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 Art
[0002] In the management of aircraft ground systems, fault management is a particularly important link. The ground subsystems are connected through a network switch, and each subsystem sends message data to the network. The fault management module receives fault information sent by different nodes and displays the fault through the human-computer interaction interface.
[0003] In the fault management of aircraft ground systems, the traditional method is to compile fault information into the program in the form of code, usually only storing the fault identifier. In actual use, the user matches the fault and fault description according to the fault identifier. This processing method requires recompiling the source code when adding, deleting, or modifying a fault code. At the same time, due to the memory space limitations of the embedded computer system, compiling a large amount of fault information into the source code affects the operating efficiency. Summary of the invention
[0004] The technical problem solved by the invention is to overcome the deficiencies of the prior art and propose a fault management method based on an INI configuration file.
[0005] The solution of the present invention is:
[0006] In a first aspect, the present invention provides a fault management method based on an INI configuration file, the method comprising the steps of:
[0007] Step 1: Design fault management content, including fault sequence number, fault source, fault identification code, fault severity, fault information description, fault solution, fault generation time and fault information notes;
[0008] Step 2: Design an INI type parameter configuration file and deploy the INI type parameter configuration file to the fault management system; the INI type parameter configuration file has a total of N sections, the first section stores the number of faults to be managed, and the i-th section stores the fault identification code, fault severity, fault information description and fault solution of the i-1th fault; i is a natural number, and i∈[2,N]; N is a natural number, and N≥2;
[0009] Step 3: Use the read method in the QT setting class to obtain the information in the INI parameter configuration file, use the fault identification code as the key, and the concatenation of the three characters of the fault severity, fault information description, and fault solution as the value, and store the fault information in the associated container MAP;
[0010] Step 4: interconnect all subsystems. After receiving the fault, the fault management system determines the source of the fault, parses the fault identification code, and obtains detailed fault information;
[0011] Step 5: Create a txt document and establish a text file log recording thread. When the fault management system receives a fault, the text file log recording thread uses standard stream input to record the fault details into the txt document to implement fault management.
[0012] In the step 2, the fault management system includes a fault management device and M system operation devices;
[0013] The method of deploying the INI type parameter configuration file to the fault management system is as follows:
[0014] With the fault management device as the server, M system operation devices as clients establish a connection, and the fault management device deploys the INI configuration file through FTP, where M is a natural number greater than 0.
[0015] In the step 1, the fault identification code is divided into M areas according to 16 bits.
[0016] In the step 3, when the three characters of the fault severity, fault information description and fault solution are concatenated, “&” is used to connect the characters.
[0017] The implementation of step 4 is as follows:
[0018] (1) Use Ethernet to interconnect the subsystems, configure Ethernet UDP connections, and set different subsystems that report faults to different IP addresses in the same network segment;
[0019] (2) After the fault management system receives the fault through Ethernet, it determines the source of the fault based on the IP and port number of the fault message and parses out the fault identification code;
[0020] (3) Use the search method in the associative container MAP, take the fault identification code key as the search variable, search in the associative container MAP, if the search is successful, write the found value into the string variable sum, if the search fails, prompt through a pop-up window;
[0021] (4) After the search is successful, decompose the variables of the sum element according to the "&" character to obtain the fault severity, fault information description, and fault solution;
[0022] (5) Read out the previous fault number and add 1 to it as the fault number of the current fault;
[0023] (6) Record the time when the fault occurs, which is the system time when the system receives the fault message, to complete the acquisition of detailed fault information.
[0024] The fault occurrence time is recorded in the form of a character string.
[0025] The implementation of step five is as follows:
[0026] (1) Define the file name of the txt document and set the type to string type;
[0027] (2) Create a QT file operation class file object file, use the open function in the file operation class to open the txt document, and the open attribute is write-only mode, text mode or append mode;
[0028] (3) Define a text stream class object stream, with the file object file as the constructor parameter; establish a text file log recording thread. When the fault management system receives a fault, the text file log recording thread uses the standard stream input "<<" through the text stream class object stream to record the fault details into a txt document. The fault details include the fault sequence number, fault source, fault identification code, fault level, fault information description, fault solution and fault generation time.
[0029] In a second aspect, the present invention provides a terminal device, comprising:
[0030] a memory for storing instructions executed by at least one processor;
[0031] The processor is used to execute the instructions stored in the memory to execute the method described in the first aspect.
[0032] In a third aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer executes the method described in the first aspect.
[0033] The beneficial effects of the present invention compared with the prior art are:
[0034] The present invention writes detailed information of system faults into the configuration file by using an INI configuration file. Without changing the source code, the faults in the INI configuration file can be added, modified and deleted. The fault information does not need to be compiled into the code, which reduces the amount of code and improves the operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flow chart of the method of the present invention;
[0036] Figure 2This is the topology diagram of the fault management system. DETAILED DESCRIPTION
[0037] The present invention will be further described below in conjunction with the accompanying drawings.
[0038] In order to solve the fault management of each node in the aircraft ground system, the present invention proposes a method for managing different equipment faults based on INI configuration files. INI configuration files belong to the common form of configuration files. The configuration files are composed of multiple sections, and all parameters are combined together in sections. A block does not have an obvious end identifier, and the beginning of a block is the end of the previous block. This configuration form improves the flexibility of the system.
[0039] Example:
[0040] Take the fault management system containing four system operation devices as an example. The four system operation devices are a ground station, a programmable execution unit, an information processing device and a control device. Figure 2 This is the topology diagram of the fault management system.
[0041] Combination Figure 1 A fault management method based on an INI type parameter configuration file is described. The specific steps are as follows:
[0042] S1: Design fault management content, which includes: fault number ErrNo, fault source ErrSrc, fault identification code ErrLabel, fault level ErrLevel, fault information description ErrDescrip, fault solution ErrSolution, fault generation time ErrTime and fault information note ErrNote. The above fault information can be displayed through the human-machine interface.
[0043] S2: Design an INI type parameter configuration file, which includes N sections in total. The configuration file includes the following parts of the fault management content designed in S1: fault identification code ErrLabel, fault level ErrLevel, fault information description ErrDescrip, and fault solution ErrSolution.
[0044] (1) The first section is the number of faults to be managed NUM (the value of NUM is N-1), and the second section to the N-1th section are the contents of each fault management, that is, the i-th section stores the fault management content of the i-1th fault, including the identification code ErrLabel, the fault severity ErrLevel, the fault information description ErrDescrip and the fault solution ErrSolution. i is a natural number, and i∈[2,N]; N is a natural number, and N≥2.
[0045] (2) The identification code ErrLabel is divided into four areas according to 16 bits. The area occupied by the ground station Ex01 is 0x0100~0x01ff, the area occupied by the programmable execution unit Ex02 is 0x0200~0x02ff, the area occupied by the information processing device Ex03 is 0x0300~0x03ff, and the area occupied by the control device Ex04 is 0x0400~0x04ff.
[0046] (3) ErrLevel is divided into four levels: critical, important, normal and warning.
[0047] (4) Fault information description ErrDescrip is a brief description of the fault provided by each system.
[0048] (5) ErrSolution is a solution provided to users.
[0049] The fault management device is used as the server and devices Ex01 to Ex04 are used as clients to establish a connection. The fault management device deploys the INI parameter configuration file through FTP.
[0050] S3: Parse the INI parameter configuration file designed in S2, and store the parsed fault information into the associated container MAP.
[0051] (1) Use the settings class (Qsettings) in QT to define the settings object set, set the format to the initialization format (IniFormat), use the beginGroup() function in the settings class (Qsettings) to start loading a section, use the endGroup() function to complete loading a section, and loop to load N sections to obtain the fault of this configuration.
[0052] (2) Define an associative container MAP object mapError. The key and value stored in this object are both string types. The key is the fault identification code ErrLabel, and the value is the concatenation of the fault severity ErrLevel, the fault information description ErrDescrip, and the fault solution ErrSolution. The characters are connected by "&".
[0053] (3) Use the insert() function of the associative container to loop and insert the key-value pair information into the associative container MAP object mapError.
[0054] S4: Use Ethernet to connect various systems, and the fault management system analyzes the reported faults.
[0055] (1) Perform Ethernet configuration and set different subsystems that report faults to different IP addresses in the same network segment (e.g., set ground station Ex01 to IP: 192.168.100.01 port number PORT: 0x8001, set executable logic unit Ex02 to IP: 192.168.100.02 port number PORT: 0x8002, set information processing device Ex03 to IP: 192.168.100.03 port number PORT: 0x8003, and set control device EX04 to IP: 192.168.100.04 port number PORT: 0x8004)
[0056] (2) After the fault management system receives the fault through Ethernet, it determines the fault source ErrSrc by the IP and port number of the fault message and parses out the fault identification code ErrLabel.
[0057] (3) Use the find() method in the associative container MAP to search the associative container MAP object mapError with the fault identification code ErrLabel as the search variable. If the search is successful, write the found value into the string variable sum. If the search fails, a pop-up window will be displayed to prompt.
[0058] (4) After the search is successful, the variables of the sum element are decomposed according to the “&” to obtain the fault severity ErrLevel, fault information description ErrDescrip, and fault solution ErrSolution.
[0059] (5) The method for generating the fault number ErrNo. is to read out the previous fault number each time and add one to it to obtain the new fault number.
[0060] (6) Record the fault occurrence time ErrTime. This time value is the system time when the system receives the fault message and is recorded in the form of a string. Complete the acquisition of fault detailed information.
[0061] (7) Display the fault details on the system interface through QtableWidget.
[0062] S5: Record the fault information parsed in S4 and create a txt file to record the process error data.
[0063] (1) Define the file name of the text file and set the type to string. The file is stored in the LogFile folder and the file name is "ErrTime+LogFile.txt" (ErrTime indicates the time when the fault occurred).
[0064] (2) Create a QT file operation class (QFile) file object file. The parameter passed into the constructor is the file name of the file object file. Use the open function open() in the file operation class (QFile) to open the file. The open attributes are write-only mode WriteOnly, text mode Text, and append mode Append.
[0065] (3) Define the text stream (QtextStream) class object stream, and use the file object file as the constructor parameter. Establish a text file log recording thread. When the system receives a fault, use the standard stream input "<<" to input the record file. The record includes the fault number ErrNo., fault source ErrSrc, fault identification code ErrLabel, fault level ErrLevel, fault information description ErrDescrip, fault solution ErrSolution, and fault generation time ErrTime.
[0066] The present invention uses an INI type parameter configuration file to store detailed information of system faults in the configuration file. Without changing the source code, the faults in the INI type parameter configuration file can be added, modified, and deleted. The fault information does not need to be compiled into the code, which reduces the amount of code and improves the operating efficiency.
[0067] The contents not described in detail in the specification of the present invention are well known to those skilled in the art.
Claims
1. A fault management method based on INI configuration file, characterized in that The steps of the method include: Step 1: Design fault management content, including fault sequence number, fault source, fault identification code, fault severity, fault information description, fault solution, fault generation time and fault information notes; Step 2: Design an INI type parameter configuration file and deploy the INI type parameter configuration file to the fault management system; the INI type parameter configuration file has a total of N sections, the first section stores the number of faults to be managed, and the i-th section stores the fault identification code, fault severity, fault information description and fault solution of the i-1th fault; i is a natural number, and i∈[2,N]; N is a natural number, and N≥2; The fault identification code is divided into M areas according to 16 bits. The area occupied by the ground station Ex01 is 0x0100~0x01ff, the area occupied by the programmable execution unit Ex02 is 0x0200~0x02ff, the area occupied by the information processing device Ex03 is 0x0300~0x03ff, and the area occupied by the control device Ex04 is 0x0400~0x04ff; The fault management system includes fault management equipment and M system operation equipment; The method of deploying the INI type parameter configuration file to the fault management system is as follows: The fault management device is used as the server, and M system operation devices are used as clients to establish a connection. The fault management device deploys the INI configuration file through FTP, where M is a natural number greater than 0. Step 3: Use the read method in the QT setting class to obtain the information in the INI parameter configuration file, use the fault identification code as the key, and the concatenation of the three characters of the fault severity, fault information description, and fault solution as the value, and store the fault information in the associated container MAP; Step 4: interconnect all subsystems. After receiving the fault, the fault management system determines the source of the fault, parses the fault identification code, and obtains detailed fault information; Step 5: Create a txt document and establish a text file log recording thread. When the fault management system receives a fault, the text file log recording thread uses standard stream input to record the fault details into the txt document to implement fault management. The implementation of step 4 is as follows: (1) Use Ethernet to interconnect the subsystems, configure Ethernet UDP connections, and set different subsystems that report faults to different IP addresses in the same network segment; (2) After the fault management system receives the fault through Ethernet, it determines the source of the fault based on the IP and port number of the fault message and parses out the fault identification code; (3) Use the search method in the associative container MAP, take the fault identification code key as the search variable, search in the associative container MAP, if the search is successful, write the found value into the string variable sum, if the search fails, prompt through a pop-up window; (4) After the search is successful, decompose the variables of the sum element according to the "&" character to obtain the fault severity, fault information description, and fault solution; (5) Read out the previous fault number and add 1 to it as the fault number of the current fault; (6) Record the time when the fault occurs, which is the system time when the system receives the fault message, and complete the acquisition of detailed fault information; The implementation of step five is as follows: (1) Define the file name of the txt document and set the type to string type; (2) Create a QT file operation class file object file, use the open function in the file operation class to open the txt document, and the open attribute is write-only mode, text mode or append mode; (3) Define a text stream class object stream, with the file object file as the constructor parameter; establish a text file log recording thread. When the fault management system receives a fault, the text file log recording thread uses the standard stream input "<<" through the text stream class object stream to record the fault details into a txt document. The fault details include the fault sequence number, fault source, fault identification code, fault level, fault information description, fault solution and fault generation time.
2. A fault management method based on INI configuration file according to claim 1, characterized in that: In step 3, when the three characters of fault severity, fault information description and fault solution are concatenated, "&" is used to connect the characters.
3. A fault management method based on INI configuration file according to claim 1, characterized in that: The fault occurrence time is recorded in the form of a character string.
4. A terminal device, characterized in that: include: a memory for storing instructions executed by at least one processor; A processor, configured to execute instructions stored in a memory to execute a method according to any one of claims 1 to 3.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 3.
