ICD-based switch configuration generation method, device, equipment and medium

By extracting switch configuration information from the ICD interface control document and generating switch network and built-in end system configuration XML files, the high maintenance cost problem caused by hard coding is solved, configuration modification without modifying the source code is realized, and efficiency and accuracy are improved.

CN119883413BActive Publication Date: 2025-09-30XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411956995.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-29
Publication Date
2025-09-30
Estimated Expiration
2044-12-29

AI Technical Summary

Technical Problem

The hard-coding of switch configuration information in the onboard software leads to high maintenance costs, and configuration changes require modifying the source code, increasing workload and the risk of errors.

Method used

By extracting XML documents from ICD interface control documents, using HashMap to store and generate switch network and built-in end system configuration XML files, and using multi-threaded processing and format and content verification to finally generate switch binary configuration files, it avoids directly modifying the source code.

Benefits of technology

It reduces the maintenance cost of onboard software, improves the efficiency and accuracy of configuration modification, and reduces the need for manual modification of source code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883413B_ABST
    Figure CN119883413B_ABST
Patent Text Reader

Abstract

The present invention provides an ICD-based switch configuration generation method, apparatus, device, and medium, relating to the field of airborne software technology. The method comprises: extracting all XML documents from an ICD interface control document and storing them in a HashMap; extracting switch network configuration information and switch built-in end system configuration information from the HashMap to generate a switch network configuration XML file and a switch built-in end system configuration XML file; defining the format of a loadable binary configuration file for the switch, and filling the loadable binary configuration file with data from the switch network configuration XML file and the switch built-in end system configuration XML file. The present invention generates a loadable binary configuration file for airborne software to read, eliminating the need to modify the airborne software source code, reducing software maintenance costs, and avoiding the need for manual source code modification, thereby improving modification efficiency and information modification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of airborne software, and in particular to an ICD-based switch configuration generation method, device, equipment and medium. Background Art

[0002] The onboard software contains a lot of configuration information. The ICD interface control document is issued by the host or the integrated modular avionics system integrator, covering all configuration information of approximately forty aircraft-level subsystems, including four cabinet internal switches and four external switches in the ARINC664 network; the entire ICD interface control document consists of more than 1,500 XML files.

[0003] The ICD interface control document contains numerous XML documents and configuration attributes containing the required switch configuration information. Currently, this configuration information is often hard-coded into the corresponding software code. Whenever the configuration needs to be modified, the source code must be modified, which invisibly increases software maintenance costs. Summary of the Invention

[0004] In view of this, the embodiments of the present application provide a switch configuration generation method, device, equipment and medium based on ICD. When the configuration information needs to be modified, the onboard software function can be flexibly changed by changing the configuration, and there is no need to modify the source code, thereby solving the problem of increased software maintenance costs caused by hard-coding of configuration information.

[0005] The present application provides the following technical solution: a method for generating a switch configuration based on an ICD, comprising:

[0006] Extract all XML documents from the ICD interface control document and store them in a HashMap; search and extract the switch network configuration information and the switch internal end system configuration information from the HashMap; generate a switch network configuration XML file based on the switch network configuration information and generate a switch internal end system configuration XML file based on the switch internal end system configuration information in a multi-threaded manner;

[0007] Verify the switch network configuration information and the switch built-in end system configuration information extracted from the HashMap by matching the formats and contents of the switch network configuration XML file and the switch built-in end system configuration XML file, and generate a verification report;

[0008] Defining the format of a loadable binary configuration file for the switch, filling the loadable binary configuration file with data from the switch network configuration XML file and the switch built-in end system configuration XML file to generate a switch binary configuration file;

[0009] Parse all XML attributes in the switch network configuration XML file and the switch built-in system configuration XML file, verify that the formats and contents of the parsed switch network configuration XML file and the switch built-in system configuration XML file are matched with the formats and contents of the switch binary configuration file, and generate a verification report.

[0010] According to one embodiment of the present application, all XML documents are extracted from the ICD interface control document and stored in a HashMap, including:

[0011] Starting from the root directory of the ICD interface control document, a depth-first traversal is performed on all XML documents under the root directory, and the suffix-free file name and file absolute path information of all XML documents are stored in a HashMap.

[0012] According to an embodiment of the present application, the switch network configuration information includes basic switch configuration information, end system configuration information, virtual link configuration information and police management group configuration information.

[0013] According to an embodiment of the present application, generating a switch network configuration XML file according to the switch network configuration information includes:

[0014] In the HashMap, traverse all switch hardware definition XML files and switch application definition XML files in the ICD interface control document, obtain the basic switch configuration information, and store it in the corresponding basic switch configuration information Java object;

[0015] In the HashMap, traverse all hardware definition XML files under each subsystem in the ICD interface control document, obtain the end system configuration information, and store it in the corresponding end system configuration information Java object;

[0016] In the HashMap, traverse the virtual link XML nodes in all virtual link XML files, obtain the configuration information of each virtual link, and store it in the corresponding virtual link configuration information Java object;

[0017] In the HashMap, traverse the police management group XML file and all virtual link XML files to obtain the police management group configuration information and store it in the corresponding police management group configuration information Java object;

[0018] Traverse each Java object and its attributes, and generate a switch network configuration XML file in the user-specified directory. Calculate the CRC value of the configuration file using the standard CRC32 algorithm and fill the CRC value into the specified attribute of the configuration file root node.

[0019] According to an embodiment of the present application, the switch built-in end system configuration information includes built-in end system basic configuration information, virtual link configuration information, ICMP configuration information, SNMP configuration information and switch communication port configuration information.

[0020] According to an embodiment of the present application, generating a switch built-in end system configuration XML file according to the switch built-in end system configuration information includes:

[0021] In the HashMap, traverse the hardware definition XML file and application definition XML file of each switch in the ICD interface control document, obtain the basic configuration information of the built-in end system, and store it in the corresponding built-in end system basic configuration information Java object;

[0022] In the HashMap, traverse the virtual link XML nodes in all virtual link XML files in the ICD interface control document, obtain the virtual link configuration information, and store it in the corresponding virtual link configuration information Java object;

[0023] In the HashMap, traverse the virtual link XML files in the ICD interface control document, obtain the communication port number for receiving / sending ICMP requests, and store it in the corresponding ICMP configuration information Java object;

[0024] In the HashMap, traverse the virtual link XML file in the ICD interface control document, obtain the communication port number for receiving / sending SNMP requests, and store it in the corresponding SNMP configuration information Java object;

[0025] In the HashMap, traverse the switch application definition XML file in the ICD interface control document, obtain the switch communication port configuration information, and store it in the corresponding switch communication port configuration information Java object;

[0026] The system traverses each Java object and its attributes, generates a switch built-in system configuration XML file in the user-specified directory, calculates the CRC value of the configuration file using the standard CRC32 algorithm, and fills the CRC value into the specified attribute of the configuration file root node.

[0027] According to an embodiment of the present application, data in the switch network configuration XML file and the switch built-in end system configuration XML file are filled into the loadable binary configuration file to generate a switch binary configuration file, including:

[0028] Create XSD files corresponding to the switch network configuration XML file and the switch built-in end system configuration XML file respectively;

[0029] According to the switch hardware and software requirements, perform XSD check and CRC check on the switch network configuration XML file and the switch built-in end system configuration XML file respectively;

[0030] If no errors occur in the XSD check and the CRC check, the data in the switch network configuration XML file and the switch built-in end system configuration XML file are filled into the loadable binary configuration file according to the predefined mapping rules between XML files and binary files to generate the switch binary configuration file.

[0031] The present application also provides an ICD-based switch configuration generation device, comprising:

[0032] The switch configuration parsing module is configured to extract all XML documents from the ICD interface control document and store them in a HashMap; search and extract the switch network configuration information and the switch internal end system configuration information from the HashMap; generate a switch network configuration XML file based on the switch network configuration information and generate a switch internal end system configuration XML file based on the switch internal end system configuration information in a multi-threaded manner;

[0033] A switch configuration parsing and verification module is used to match and verify the switch network configuration information and the switch built-in end system configuration information extracted from the HashMap with the formats and contents of the switch network configuration XML file and the switch built-in end system configuration XML file, respectively, and generate a verification report;

[0034] A switch configuration generation module, configured to define a format of a loadable binary configuration file for the switch, and to fill the loadable binary configuration file with data from the switch network configuration XML file and the switch built-in end system configuration XML file, thereby generating a switch binary configuration file;

[0035] The switch configuration generation and verification module is used to parse all XML attributes in the switch network configuration XML file and the switch built-in end system configuration XML file, match and verify the format and content of the parsed switch network configuration XML file and the switch built-in end system configuration XML file with the format and content of the switch binary configuration file, and generate a verification report.

[0036] The present application also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned ICD-based switch configuration generation method when executing the computer program.

[0037] The present application also provides a computer-readable storage medium storing a computer program for executing the above-mentioned ICD-based switch configuration generation method.

[0038] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above-mentioned technical solutions adopted in the embodiments of this specification include at least the following: the embodiments of the present invention propose an ICD-based switch configuration generation method, device, equipment and medium. Through the embodiments of the present invention, the switch network configuration information and the switch built-in end system configuration information contained in the ICD interface control document can be parsed, and a loadable binary configuration file can be generated. The onboard software obtains the configuration information required by the switch by parsing the binary configuration file. When the configuration information needs to be modified, the method of the present invention is used to regenerate the loadable binary configuration file for the software to read, and there is no need to modify the source code of the software, thereby reducing the maintenance cost of the software, while avoiding the link of manually modifying the source code, and improving the modification efficiency and the accuracy of information modification. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0040] Figure 1 1 is a flow chart of a method for generating a switch configuration based on ICD according to an embodiment of the present invention;

[0041] Figure 2 1 is a schematic diagram of an ICD-based switch configuration generation and execution process according to an embodiment of the present invention;

[0042] Figure 3 This is a schematic diagram of attribute information of a switch network configuration XML file according to an embodiment of the present invention;

[0043] Figure 4 This is a schematic diagram of attribute information of a switch built-in end system configuration XML file according to an embodiment of the present invention;

[0044] Figure 5 1 is a structural diagram of an ICD-based switch configuration generation device according to an embodiment of the present invention;

[0045] Figure 6 1 is a schematic diagram of a tool set architecture of an ICD-based switch configuration generation device according to an embodiment of the present invention;

[0046] Figure 7 Schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0048] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the features in the following embodiments and embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative work are within the scope of protection of this application.

[0049] like Figure 1 As shown, an embodiment of the present invention provides a switch configuration generation method based on ICD, including:

[0050] S101 extracts all XML documents from the ICD interface control document and stores them in a HashMap; searches and extracts the switch network configuration information and the switch built-in end system configuration information in the HashMap; in a multi-threaded manner, generates a switch network configuration XML file based on the switch network configuration information, generates a switch built-in end system configuration XML file based on the switch built-in end system configuration information;

[0051] S102. The switch network configuration information and the switch built-in end system configuration information extracted from the HashMap are matched with the format and content of the switch network configuration XML file and the switch built-in end system configuration XML file, and a verification report is generated;

[0052] S103 defines the format of the switch loadable binary configuration file, the switch network configuration XML file and the switch built-in end system configuration XML file data fill in the loadable binary configuration file to generate a switch binary configuration file;

[0053] S104. Parse all XML attributes in the switch network configuration XML file and the switch built-in end system configuration XML file, verify the format and content of the parsed switch network configuration XML file and the switch built-in end system configuration XML file against the format and content of the switch binary configuration file, and generate a verification report.

[0054] An embodiment of the present invention designs a switch configuration generation method based on an ICD interface control document. First, switch configuration information is extracted from the ICD interface control document to generate a switch network configuration XML file and a switch built-in end system configuration XML file. After verifying the format and attributes of the XML configuration files using an XSD file, a binary loadable switch configuration file is generated according to a binary configuration file format defined by the relevant system manufacturer. This ensures the configurability of the switch network information and the switch built-in end system information in the integrated avionics system, and solves the problem of increased software maintenance costs caused by hard-coding configuration information in software code.

[0055] In one embodiment, the switch configuration generation method of this embodiment is executed as follows: Figure 2 As shown, there are several steps as follows:

[0056] Step 1: Starting from the root directory of the ICD interface control document, perform a depth-first traversal of all XML documents in the directory and store the XML document's suffix-free file name and file absolute path information in a HashMap to facilitate parsing the XML file with the specified name in the code and improve the tool execution speed.

[0057] Step 2: Generate the switch network configuration file and the switch built-in system configuration file simultaneously in a multi-threaded manner to improve the tool execution speed. The specific execution process is shown in Steps 3 and 4.

[0058] Step 3: The switch network configuration generation process is to obtain the following information simultaneously in a multi-threaded manner: Figure 3 Configuration properties of each part are shown.

[0059] Step 3.1: Obtain basic switch configuration information. In the HashMap, traverse all switch hardware definition XML files and switch application definition XML files in the ICD interface control document, obtain the name and IP address of each switch, and the names, speed, port status, forwarding delay, and other information of all physical ports of each switch, and store them in the corresponding switch configuration basic information Java object.

[0060] Step 3.2: Obtain the end system configuration information. In the HashMap, traverse all hardware definition XML files under each subsystem in the ICD interface control document. If there is an "end system physical port" XML child node under the root node of the XML file, then this XML file describes the hardware information of the end system. Then obtain the end system name of the hardware, as well as the name and port rate of each physical port of the end system, and store them in the corresponding end system configuration information Java object.

[0061] Step 3.3: Get the virtual link configuration information. In the HashMap, traverse the "virtual link" XML nodes in all virtual link XML files to obtain the name and maximum / minimum frame length of each virtual link. Also, perform string parsing on the XML attributes that describe the virtual link path and store them in the corresponding virtual link configuration information Java object.

[0062] Step 3.4: Get the police management group configuration information. In the HashMap, traverse the police management group XML file and all virtual link XML files, obtain the virtual link police management group name, the maximum frame length in the virtual link police management group and other information, and store it in the corresponding police management group configuration information Java object.

[0063] Step 3.5: Traverse each Java object and its attributes generated in steps 3.1 to 3.4, and generate a switch network configuration XML file in the user-specified directory. Calculate the CRC value of the configuration file using the standard CRC32 algorithm and fill the CRC value into the specified attribute of the configuration file root node.

[0064] Step 4: The switch built-in end system configuration generation process is to obtain the following information in a multi-threaded manner: Figure 4 The configuration properties of each part are shown.

[0065] Step 4.1: Obtain the basic configuration information of the built-in end system. In the HashMap, traverse the hardware definition XML file and application definition XML file of each switch in the ICD interface control document to obtain the name of the switch's built-in end system, the switch IP address; as well as the built-in end system physical port name, port speed and other information, and store them in the corresponding built-in end system basic configuration information Java object.

[0066] Step 4.2: Obtain virtual link configuration information. In the HashMap, traverse the "virtual link" XML nodes in all virtual link XML files in the ICD interface control document. The XML node contains an XML attribute that describes the path of the virtual link. Parse this attribute to filter out those virtual links that use the switch as the starting or ending point of the virtual link. Obtain the sending virtual link name, source port number, receiving virtual link name, and destination port number, and store them in the corresponding virtual link configuration information Java object.

[0067] Step 4.3: Get ICMP configuration information. In the HashMap, traverse the virtual link XML file in the ICD, obtain the communication port number for receiving / sending ICMP requests, and store it in the corresponding ICMP configuration information Java object.

[0068] Step 4.4: Get SNMP configuration information. In the HashMap, traverse the virtual link XML file in the ICD, obtain the communication port number for receiving / sending SNMP requests, and store it in the corresponding SNMP configuration information Java object.

[0069] Step 4.5: Obtain the switch communication port configuration information. In the HashMap, traverse the switch application definition XML file in the ICD, obtain the communication port number, port type and other information of the sampling port and queue port, and store them in the corresponding switch communication port configuration information Java object.

[0070] Step 4.6: Traverse each Java object and attribute generated in 4.1 to 4.5, and generate the switch built-in end system configuration XML file in the user-specified directory. Calculate the CRC value of the configuration file using the standard CRC32 algorithm and fill the CRC value into the specified attribute of the configuration file root node.

[0071] Step 5: The process and principle of switch configuration parsing and verification.

[0072] Step 5.1: Parse the ICD interface control file, the switch network configuration XML file generated by the switch configuration parsing in the previous section, and compare the two.

[0073] Step 5.2: After the comparison in Step 5.1 is complete, a verification report is generated. The verification report includes the following information: all attributes in the two XML configuration files, their corresponding values ​​in the ICD interface control document, the comparison results, the number of compared attributes, the number of matching attributes, the number of mismatching attributes, the attribute names of all mismatching attributes, and the comparison completion time.

[0074] Step 6: Switch configuration generation process and principles.

[0075] Step 6.1: Create XSD files corresponding to the switch network configuration XML file and the switch built-in system configuration XML file to constrain the structure and element attribute range of the XML configuration files.

[0076] Step 6.2: Define the format of the binary configuration file that the switch can load based on the switch software and hardware requirements.

[0077] Step 6.3: Read the switch network configuration XML file and the switch built-in system configuration XML file generated by the switch configuration parsing tool, perform XSD verification, and then perform CRC verification.

[0078] Step 6.4: If the XSD and CRC checks are correct, the XML configuration file's format and attribute ranges meet the requirements. Now, according to the corresponding mapping rules, fill the contents of the XML configuration file into the loadable binary configuration file.

[0079] Step 7: The process and principles of switch configuration generation and verification.

[0080] Step 7.1: Parse all XML attributes in the switch network configuration XML file generated by the switch configuration parser, the switch built-in system configuration XML file, and the binary configuration file generated by the switch configuration generation tool; and compare the input and output according to the defined mapping rules (predefined mapping rules between XML files and binary files).

[0081] Step 7.2: After the comparison in Step 7.1 is complete, a verification report is generated. The verification report includes the following information: the value of each attribute in the input XML file and the output BIN file, the comparison results between the two, the number of compared attributes, the number of matching attributes, the number of mismatching attributes, the attribute names of all mismatching attributes, and the comparison completion time.

[0082] like Figure 5 As shown, the present application also provides an ICD-based switch configuration generation device 200, comprising:

[0083] The switch configuration parsing module 201 is configured to extract all XML documents from the ICD interface control document and store them in a HashMap; search and extract the switch network configuration information and the switch internal end system configuration information from the HashMap; and generate a switch network configuration XML file based on the switch network configuration information and a switch internal end system configuration XML file based on the switch internal end system configuration information in a multi-threaded manner.

[0084] The switch configuration parsing and verification module 202 is used to match the switch network configuration information and the switch internal end system configuration information extracted from the HashMap with the formats and contents of the switch network configuration XML file and the switch internal end system configuration XML file, respectively, and generate a verification report;

[0085] The switch configuration generation module 203 is used to define the format of a loadable binary configuration file for the switch, fill the data in the switch network configuration XML file and the switch built-in end system configuration XML file into the loadable binary configuration file, and generate a switch binary configuration file;

[0086] The switch configuration generation and verification module 204 is configured to parse all XML attributes in the switch network configuration XML file and the switch internal end system configuration XML file, verify the format and content of the parsed switch network configuration XML file and the switch internal end system configuration XML file against the format and content of the switch binary configuration file, and generate a verification report.

[0087] The embodiment of the present invention defines a configuration generation device for parsing multiple end system XML configuration files from an ICD interface control document and generating a loadable binary file. The architecture of the device is as follows: Figure 6 As shown, the entire device includes four module tools, and the specific functions of each module tool are as follows:

[0088] (1) Switch Configuration Parsing Module Tool: This tool parses the switch network configuration file and the switch built-in system configuration file in XML format from the ICD interface control document. The tool can write the operation information and error information during the execution process into the log file, making it easier for users to understand the tool operation status.

[0089] (2) Switch Configuration Parsing Verification Module Tool: This tool verifies whether the input and output of the switch configuration parsing tool in (1) match, and whether the format and content of the output file are correct. The tool writes the verification results into a verification report.

[0090] (3) Switch Configuration Generation Module Tool: This tool uses the XML-formatted switch network configuration file and the switch's built-in system configuration file to create a loadable binary configuration file, following the binary configuration file format defined by the system vendor. The tool also writes operational information and error messages to a log file, making it easier for users to understand the tool's performance.

[0091] (4) Switch Configuration Generation Verification Module Tool: This tool verifies whether the input and output of the switch configuration generation tool in (3) match, and whether the format and content of the output file are correct. The tool writes the verification results into a verification report.

[0092] The "switch configuration parsing and verification module tool" and the "switch configuration generation and verification module tool" in this embodiment are introduced to reduce the level of tool certification. According to the tool certification requirements of the DO-178C standard, the tool certification level of the switch configuration parsing module tool and the switch configuration generation and verification module tool is relatively high and the cost is relatively high. Therefore, two verification tools are developed to verify the correctness of the output files of the configuration parsing module tool and the configuration generation module tool respectively. During the tool certification process, only the two verification module tools need to be certified, and the "switch configuration parsing and verification module tool" and the "switch configuration generation and verification module tool" themselves do not need to be certified. This reduces the level of tool certification and reduces costs.

[0093] In one embodiment, a computer device is provided, such as Figure 7 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned ICD-based switch configuration generation method is implemented.

[0094] Specifically, the computer device may be a computer terminal, a server or a similar computing device.

[0095] In this embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned ICD-based switch configuration generation method.

[0096] Specifically, computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include transitory media such as modulated data signals and carrier waves.

[0097] Obviously, those skilled in the art should understand that the various modules or steps of the above-mentioned embodiments of the present invention can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0098] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A switch configuration generation method based on ICD, characterized in that: include: Extract all XML documents from the ICD interface control document and store them in a HashMap; Searching and extracting the switch network configuration information and the switch built-in end system configuration information from the HashMap; generating a switch network configuration XML file based on the switch network configuration information and generating a switch built-in end system configuration XML file based on the switch built-in end system configuration information in a multi-threaded manner; Verify the switch network configuration information and the switch built-in end system configuration information extracted from the HashMap by matching the formats and contents of the switch network configuration XML file and the switch built-in end system configuration XML file, and generate a verification report; Defining the format of a loadable binary configuration file for the switch, filling the loadable binary configuration file with data from the switch network configuration XML file and the switch built-in end system configuration XML file to generate a switch binary configuration file; Parsing all XML attributes in the switch network configuration XML file and the switch built-in end system configuration XML file, verifying the formats and contents of the parsed switch network configuration XML file and the switch built-in end system configuration XML file against the formats and contents of the switch binary configuration file, and generating a verification report; The switch network configuration information includes basic switch configuration information, end system configuration information, virtual link configuration information, and police management group configuration information; the switch built-in end system configuration information includes basic built-in end system configuration information, virtual link configuration information, ICMP configuration information, SNMP configuration information, and switch communication port configuration information; Generating a switch network configuration XML file according to the switch network configuration information includes: In the HashMap, traverse all switch hardware definition XML files and switch application definition XML files in the ICD interface control document, obtain the basic switch configuration information, and store it in the corresponding basic switch configuration information Java object; In the HashMap, traverse all hardware definition XML files under each subsystem in the ICD interface control document, obtain the end system configuration information, and store it in the corresponding end system configuration information Java object; In the HashMap, traverse the virtual link XML nodes in all virtual link XML files, obtain the configuration information of each virtual link, and store it in the corresponding virtual link configuration information Java object; In the HashMap, traverse the police management group XML file and all virtual link XML files to obtain the police management group configuration information and store it in the corresponding police management group configuration information Java object; Traverse each Java object and its attributes, and generate a switch network configuration XML file in the user-specified directory. Calculate the CRC value of the configuration file using the standard CRC32 algorithm and fill the CRC value into the specified attribute of the configuration file root node.

2. The switch configuration generation method based on ICD according to claim 1, characterized in that: Extract all XML documents from the ICD interface control document and store them in a HashMap, including: Starting from the root directory of the ICD interface control document, a depth-first traversal is performed on all XML documents under the root directory, and the suffix-free file name and file absolute path information of all XML documents are stored in a HashMap.

3. The switch configuration generation method based on ICD according to claim 1, characterized in that: Generating a switch built-in end system configuration XML file according to the switch built-in end system configuration information includes: In the HashMap, traverse the hardware definition XML file and application definition XML file of each switch in the ICD interface control document, obtain the basic configuration information of the built-in end system, and store it in the corresponding built-in end system basic configuration information Java object; In the HashMap, traverse the virtual link XML nodes in all virtual link XML files in the ICD interface control document, obtain the virtual link configuration information, and store it in the corresponding virtual link configuration information Java object; In the HashMap, traverse the virtual link XML files in the ICD interface control document, obtain the communication port number for receiving / sending ICMP requests, and store it in the corresponding ICMP configuration information Java object; In the HashMap, traverse the virtual link XML file in the ICD interface control document, obtain the communication port number for receiving / sending SNMP requests, and store it in the corresponding SNMP configuration information Java object; In the HashMap, traverse the switch application definition XML file in the ICD interface control document, obtain the switch communication port configuration information, and store it in the corresponding switch communication port configuration information Java object; The system traverses each Java object and its attributes, generates a switch built-in system configuration XML file in the user-specified directory, calculates the CRC value of the configuration file using the standard CRC32 algorithm, and fills the CRC value into the specified attribute of the configuration file root node.

4. The switch configuration generation method based on ICD according to claim 1, characterized in that: Filling the data in the switch network configuration XML file and the switch built-in end system configuration XML file into the loadable binary configuration file to generate the switch binary configuration file includes: Create XSD files corresponding to the switch network configuration XML file and the switch built-in end system configuration XML file respectively; According to the switch hardware and software requirements, perform XSD check and CRC check on the switch network configuration XML file and the switch built-in end system configuration XML file respectively; If no errors occur in the XSD check and the CRC check, the data in the switch network configuration XML file and the switch built-in end system configuration XML file are filled into the loadable binary configuration file according to the predefined mapping rules between XML files and binary files to generate the switch binary configuration file.

5. A switch configuration generation device based on ICD, applying the switch configuration generation method based on ICD according to any one of claims 1 to 4, characterized in that: include: The switch configuration parsing module is used to extract all XML documents from the ICD interface control document and store them in a HashMap; Searching and extracting the switch network configuration information and the switch built-in end system configuration information from the HashMap; generating a switch network configuration XML file based on the switch network configuration information and generating a switch built-in end system configuration XML file based on the switch built-in end system configuration information in a multi-threaded manner; A switch configuration parsing and verification module is used to match and verify the switch network configuration information and the switch built-in end system configuration information extracted from the HashMap with the formats and contents of the switch network configuration XML file and the switch built-in end system configuration XML file, respectively, and generate a verification report; A switch configuration generation module, configured to define a format of a loadable binary configuration file for the switch, and to fill the loadable binary configuration file with data from the switch network configuration XML file and the switch built-in end system configuration XML file, thereby generating a switch binary configuration file; The switch configuration generation and verification module is used to parse all XML attributes in the switch network configuration XML file and the switch built-in end system configuration XML file, match and verify the format and content of the parsed switch network configuration XML file and the switch built-in end system configuration XML file with the format and content of the switch binary configuration file, and generate a verification report.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the ICD-based switch configuration generation method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program for executing the ICD-based switch configuration generation method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Configuration information design and information extraction of AFDX (Avionics Full Duplex Switched Ethernet) network

    CN104410581A

  • Cross-platform avionics system configuration data generation and recovery method

    CN105607923A