Method and device for automatically generating radar interface control file
Automatically generate radar interface control files through the online platform, the problems of low efficiency, difficulty in reuse and poor standardization in the generation process of radar ICD are solved, and the results of simplifying the design process, reducing the probability of errors and improving the degree of reuse are achieved.
Patent Information
- Application Number
- CN202411316897.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-03
AI Technical Summary
The generation process of existing radar interface control files (ICDs) is inefficient, difficult to reuse, and poor standardization. Traditional manual editing is prone to errors. Semi-automated tools are cumbersome and not specialized enough, making it difficult to meet the needs of rapid molding of airborne radar ICDs.
Design a method and device for automatically generating radar interface control files, combine ICD document compilation and header file program editing process through an online platform to generate ICD files in multiple formats, provide the first editing interface for content editing, generate index items and Complete ICD files and generate header file programs through preset mapping specifications, supporting automatic hierarchical naming and variable specification constraints.
It simplifies the ICD design process, reduces communication costs and error probability, speeds up generation speed, improves ICD reuse and standardization, and improves the accuracy of the design.
Smart Images

Figure CN119248257A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of embedded software communication technology, and in particular to a method and device for automatically generating a radar interface control file. Background Art
[0002] Interface control file (ICD) is the basis for data transmission between the two communicating parties and is an important basis for the development of airborne radar software system. The two common forms of radar ICD are document files and header file programs. The two forms correspond to each other. Generally, document files are used as input for compiling header file programs and directly constrain the editing of header files. At present, the generation process of radar ICD is mainly divided into two types, one is the traditional method and the other is the semi-automatic method.
[0003] The so-called traditional method is that the radar system designer first compiles the ICD document file (mostly in word format), and then hands it over to the software designer to complete the header file (mostly .h file) design. The main problems of this implementation method are manifested in the following aspects:
[0004] 1) Low efficiency. For complex ICDs, manual editing is difficult and error-prone. Moreover, the editing processes of system personnel and software designers are independent of each other. There may be ambiguity in the understanding of the document content between the two parties, resulting in the ICD often needing to be revised multiple times.
[0005] 2) Reuse is difficult. Sometimes there are similarities between different ICD models. The reuse process usually involves finding a person first and then a document, which is a relatively troublesome process. Secondly, due to differences in document writing style and form, the modification process is cumbersome and time-consuming.
[0006] 3) Poor standardization. Even if there are coding standards, there is a lack of direct constraints on designers during the ICD editing process. Therefore, there is a lot of arbitrariness in variable naming, data structure design, etc., and it is difficult to reach consensus among different models.
[0007] The semi-automatic method is to use ICD auxiliary design tools to complete part of the ICD design process. At present, the shortcomings of this method are as follows:
[0008] 1) The operation is cumbersome, and most of the auxiliary tools are designed for the needs of the general public. Therefore, the functions are relatively broad, and there are relatively many redundant operations, which cannot effectively meet the needs of rapid prototyping of airborne radar ICD.
[0009] 2) Management-oriented. Auxiliary tools are generally used by radar system personnel to design and manage ICDs. They can provide good functions such as ICD sharing, modification, and storage, but do not have functions such as software coding specification import and header file program editing. Summary of the invention
[0010] In order to solve the above problems, the present application provides a method and device for automatically generating radar interface control files, which moves the traditional radar ICD offline design process to online, organically combines the ICD document compilation and header file program editing processes, and relies on the platform to automatically output ICD files in multiple formats.
[0011] The first aspect of the present application provides a method for automatically generating a radar interface control file, mainly comprising:
[0012] Step S1, forming a first editing interface for editing the content of the interface control file;
[0013] Step S2: in the first editing interface, generating index items of the interface control file according to the attributes of the interface control file input by the user;
[0014] Step S3: Generate a complete interface control file based on the content and attributes of each element and the hierarchical relationship between the elements input by the user;
[0015] Step S4: Generate a word document or an XML document from the complete interface control file according to the user's specification;
[0016] Step S5: In the second editing interface, the XML document is edited to generate a header file program according to a preset mapping specification.
[0017] Preferably, in step S2, the attributes of the interface control file include radar series, project code, communication protocol, communication rate, communication cycle, data source, data destination and interface description.
[0018] Preferably, step S3 further comprises:
[0019] Step S31: based on the user's selection of the Insert Sub-item checkbox, a hierarchical relationship of the elements is constructed and reflected through numbered automatic hierarchical naming;
[0020] Step S32: receiving the user's settings for the content and attributes of each element.
[0021] Preferably, in step S32, the content and attributes of each element include element name, element description, element type, element length, element unit, element value range and element precision.
[0022] Preferably, in step S5, the preset mapping specifications include: a mapping specification for constraining variable naming methods when generating a header file program, a mapping specification for constraining variable types, and a mapping specification for constraining variable expressions.
[0023] Preferably, step S5 further comprises:
[0024] Step S51, forming a tree structure part for displaying the hierarchical relationship of each element of the interface control file, an editing part for naming the specified element on the tree structure, and a preview part for displaying the header file program of the specified element on the tree structure on the second editing interface;
[0025] Step S52: according to the selected element, one or more optional names are fuzzily matched in a preset local temporary word library and / or a network general word library, so that the user can name the specified element on the tree structure, wherein the local temporary word library refers to a temporarily stored word library for naming the element, and the network general word library refers to a registered and approved word library for naming the element;
[0026] Step S53: export the edited interface control file as a header file program.
[0027] The second aspect of the present application provides a device for automatically generating a radar interface control file, mainly comprising:
[0028] A first editing interface generating module, used to form a first editing interface for content editing of the interface control file;
[0029] An index item editing module, used to generate index items of the interface control file according to the attributes of the interface control file input by the user in the first editing interface;
[0030] The interface control file element editing module is used to generate a complete interface control file based on the content, attributes and hierarchical relationship between elements input by the user;
[0031] A document export module is used to generate a word document or an xml document from the complete interface control file according to user specifications;
[0032] The header file program generating module is used to generate a header file program by editing the XML document in the second editing interface according to a preset mapping specification.
[0033] Preferably, the interface control file element editing module includes:
[0034] An element hierarchical relationship editing unit, which is used to construct the hierarchical relationship of each element based on the user's selection of the Insert Sub-item checkbox, and reflects it through numbered automatic hierarchical naming;
[0035] The element content and attribute editing unit is used to receive the user's settings for the content and attributes of each element.
[0036] Preferably, in step S5, the preset mapping specifications include: a mapping specification for constraining variable naming methods when generating a header file program, a mapping specification for constraining variable types, and a mapping specification for constraining variable expressions.
[0037] Preferably, the header file program generation module includes:
[0038] A second editing interface generating unit, configured to form, on the second editing interface, a tree structure portion for displaying the hierarchical relationship of the elements of the interface control file, an editing portion for naming the specified elements on the tree structure, and a preview portion for displaying the header file program of the specified elements on the tree structure;
[0039] The term search unit is used to fuzzily match one or more optional names in a preset local temporary word library and / or a network general word library according to the selected element, so that the user can name the specified element on the tree structure. The local temporary word library refers to a temporarily stored word library for naming elements, and the network general word library refers to a registered and approved word library for naming elements;
[0040] The header file program export unit is used to export the edited interface control file as a header file program.
[0041] This application simplifies the ICD design process, reduces communication costs and the error probability of ICD, speeds up ICD generation, improves ICD reuse, improves ICD standardization, and improves the accuracy of ICD design. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 The present invention is a flowchart of a preferred embodiment of a method for automatically generating a radar interface control file according to the present invention.
[0043] Figure 2 For this application Figure 1 A system architecture diagram of the illustrated embodiment.
[0044] Figure 3 For this application Figure 1 Schematic diagram of the first editing interface of the illustrated embodiment.
[0045] Figure 4 For this application Figure 1 Schematic diagram of the second editing interface of the illustrated embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the implementation of this application clearer, the technical scheme in the implementation of this application will be described in more detail in combination with the drawings in the implementation of this application. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described implementation is a part of the implementation of this application, not all of the implementations. The implementation described below with reference to the drawings is exemplary and is intended to be used to explain this application, and cannot be understood as a limitation on this application. Based on the implementation in this application, all other implementations obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The implementation of this application is described in detail below in combination with the drawings.
[0047] The first aspect of the present application provides a method for automatically generating a radar interface control file, such as Figure 1 As shown, the method mainly includes:
[0048] Step S1, forming a first editing interface for editing the content of the interface control file;
[0049] Step S2: in the first editing interface, generating index items of the interface control file according to the attributes of the interface control file input by the user;
[0050] Step S3: Generate a complete interface control file based on the content and attributes of each element and the hierarchical relationship between the elements input by the user;
[0051] Step S4: Generate a word document or an XML document from the complete interface control file according to the user's specification;
[0052] Step S5: In the second editing interface, the XML document is edited to generate a header file program according to a preset mapping specification.
[0053] In view of the many problems existing in the current ICD design process, the technical solution adopted by the present invention is to build a common design platform for all designers, and the entire design process is completed on the platform. By configuring, iterating, and optimizing the background operation parameters of the platform, the ICD design process is gradually made efficient and intelligent, and the ICD file is more standardized.
[0054] like Figure 2 As shown, this application uses the Qt software design framework to build an ICD design platform. Step S1 is used to form a first editing interface. In step S2, the system personnel compile specific ICD content based on the table editing function module in the first editing interface. In step S3, a complete interface control file is generated. Then, in step S4, based on Figure 2The XML conversion module converts XML format files, or based on Figure 2 The document automatic generation module converts the word document file, and the XML format file is used to deliver the software personnel. In step S5, the software personnel name the ICD elements in the program file online editing module, and the platform header file program automatic generation module generates the ICD document and program file.
[0055] The first editing interface formed in step S1 is as follows Figure 3 As shown, the left side shows the attributes of the interface control file. The attributes of the interface control file are mainly used for later retrieval of the interface file and are filled in by the user in step S2. In some optional implementations, in step S2, the attributes of the interface control file include radar series, project code, communication protocol, communication rate, communication cycle, data source, data purpose and interface description. This embodiment corresponds to Figure 2 The query reuse module and re-editing function module shown are aimed at all designers. They provide one-click viewing and editing functions for ICD templates with similar requirements. Designers can quickly enter the ICD design process under the newly imported function module.
[0056] The middle part of the first editing interface is the hierarchical structure of the interface control file, which is filled in by the user. In some optional implementations, step S3 further includes:
[0057] Step S31: based on the user's selection of the Insert Sub-item checkbox, a hierarchical relationship of the elements is constructed and reflected through numbered automatic hierarchical naming;
[0058] Step S32: receiving the user's settings for the content and attributes of each element.
[0059] In step S31, if the user does not check Figure 3 If the "Insert Sub-item" checkbox is checked, the user will continue to edit the content of the record numbered 2 after editing the record numbered 1. If the "Insert Sub-item" checkbox is checked, the user will continue to edit the content of the record numbered 1_1 after editing the record numbered 1. This can form records with hierarchical relationships, that is, the hierarchical relationship of each element is constructed through the automatic hierarchical naming of the number. In step S32, after the system automatically generates the hierarchical number as in step S31, the user sets the content and attributes of each element.
[0060] In some optional embodiments, such as Figure 3 As shown, in step S32, the content and attributes of each element include element name, element description, element type, element length, element unit, element value range and element precision. Figure 3 Click Add Columns above and specify the type of the added column to add new element content and attributes. You can also delete columns to retain the required element content and attributes.
[0061] In addition to the above functions, the platform has the function of importing the entire table, which is convenient for system designers to quickly integrate the ICD files of each extension; after the user selects the basic data type, the platform automatically gives the name, length and other information corresponding to the type. For complex number structures, the platform will automatically calculate the length when saving the table, such as Figure 3 The length of the preprocessing status information 1 structure numbered 1_1_1 is calculated based on the overall length of sub-items 1_1-1-1 to 1_1_1_7.
[0062] The first editing interface is mainly for system designers, who specify the system architecture. After the first editing interface is completed, in step S4, click Figure 3 Click "Import Table" below to convert the edited content into an XML document, or click Figure 3 Click "Generate Word" in the lower right corner to convert the edited content into a Word document.
[0063] The generated XML document is then delivered to the software designer, who further processes the XML document through the second editing interface. The second editing interface is provided with a file selection window. The platform automatically loads the XML file content and generates an ICD element tree structure, which is displayed in the left column of the second editing interface. The user then generates a header file program by editing the XML document for each item according to the preset mapping specification. The preset mapping specification and the program for generating a header file by editing are explained below.
[0064] In some optional implementations, in step S5, the preset mapping specifications include: a mapping specification for constraining variable naming methods when generating a header file program, a mapping specification for constraining variable types, and a mapping specification for constraining variable expressions.
[0065] It should be noted that mapping specifications mainly refer to different enterprise programming specification requirements. For example, when naming a structure variable, it is required to add "T_" before the variable name. This rule is the mapping specification that constrains the variable naming method. Figure 4 The non-editable item "T_" after "Structure Name" in the middle column. For another example, for integer, floating point and other variable types, the program requires that they must be represented by uniform characters, such as Figure 4 The tag "LH_UINT8" in the structure struct in the right column is a variable type. The system automatically changes the relevant type in the programming language to this tag. Another example is the expression method, which mainly refers to the parsing rules after the code line, such as Figure 4 The " / * Name: Self-test status information 1; Description: Self-test status information 1: Unit:: Range:: Precision:: * / " on the right column indicates that the program interprets each parameter according to these fields and writes them into the program in accordance with the unified specification. In fact, these field information is Figure 3 The first editing interface shown is filled in. In the second editing interface, the system will selectively call these fields according to the preset mapping rules.
[0066] With the above-mentioned specification constraints, software designers can gradually improve the header file program according to their modifications. In some optional implementations, step S5 further includes:
[0067] Step S51, forming a tree structure part for displaying the hierarchical relationship of each element of the interface control file, an editing part for naming the specified element on the tree structure, and a preview part for displaying the header file program of the specified element on the tree structure on the second editing interface;
[0068] Step S52: according to the selected element, one or more optional names are fuzzily matched in a preset local temporary word library and / or a network general word library, so that the user can name the specified element on the tree structure, wherein the local temporary word library refers to a temporarily stored word library for naming the element, and the network general word library refers to a registered and approved word library for naming the element;
[0069] Step S53: export the edited interface control file as a header file program.
[0070] In step S51, the tree structure part is as follows Figure 4 As shown in the left column of the second editing interface, it is automatically generated according to the hierarchical relationship of the elements in the first editing interface. Figure 4 The preview part is shown in the middle column of the second editing interface. Figure 4 As shown in the right column of the second editing interface. In step S52, after selecting the element to be edited on the left side of the second editing interface, the variable is named in the middle column of the second editing interface. In the naming process, a fuzzy matching method is adopted to automatically search the vocabulary library for the target variable, and the matching items are listed in a drop-down item manner, which is convenient for software designers to refer to and quote. For example, one or more optional names can be fuzzy matched in the preset local temporary vocabulary and / or network general vocabulary, and can also be rewritten by the user. The names rewritten by the user can be added to the local temporary vocabulary, and can also be added to the network general vocabulary after registration or approval for subsequent use.
[0071] According to the ICD tree hierarchy and the element naming, the platform automatically generates a header file preview and displays it in the right column of the second editing interface, so that the software designer can modify the name immediately. The header file used for preview can be exported at any time in step S53, providing a variety of header file output forms. Software designers do not need to reprocess the output header file program and can directly apply it to the model.
[0072] This application has the following advantages:
[0073] 1) Provides a common ICD development platform for system personnel and software designers. Compared with traditional methods, it simplifies the ICD design process, reduces communication costs and the probability of ICD errors;
[0074] 2) Establish an element library to provide a quick search function for existing ICD elements, which is convenient for designers to write, refer to, and reuse, speeding up the ICD generation speed and improving the degree of ICD reuse;
[0075] 3) By configuring the design specifications in the background, the entire ICD design process is constrained, the designer's subjective arbitrariness is avoided, and the ICD standardization is improved;
[0076] 4) Allows seamless switching between ICD documents and header file programs, provides instant preview function, and the platform automatically generates ICD files in a unified format, improving the accuracy of ICD design.
[0077] The second aspect of the present application provides a device for automatically generating a radar interface control file corresponding to the above method, mainly comprising:
[0078] A first editing interface generating module, used to form a first editing interface for content editing of the interface control file;
[0079] An index item editing module, used to generate index items of the interface control file according to the attributes of the interface control file input by the user in the first editing interface;
[0080] The interface control file element editing module is used to generate a complete interface control file based on the content, attributes and hierarchical relationship between elements input by the user;
[0081] A document export module is used to generate a word document or an xml document from the complete interface control file according to user specifications;
[0082] The header file program generating module is used to generate a header file program by editing the XML document in the second editing interface according to a preset mapping specification.
[0083] In some optional implementations, the interface control file element editing module includes:
[0084] An element hierarchical relationship editing unit, which is used to construct the hierarchical relationship of each element based on the user's selection of the Insert Sub-item checkbox, and reflects it through numbered automatic hierarchical naming;
[0085] The element content and attribute editing unit is used to receive the user's settings for the content and attributes of each element.
[0086] In some optional implementations, in step S5, the preset mapping specifications include: a mapping specification for constraining variable naming methods when generating a header file program, a mapping specification for constraining variable types, and a mapping specification for constraining variable expressions.
[0087] In some optional implementations, the header file program generation module includes:
[0088] A second editing interface generating unit, configured to form, on the second editing interface, a tree structure portion for displaying the hierarchical relationship of the elements of the interface control file, an editing portion for naming the specified elements on the tree structure, and a preview portion for displaying the header file program of the specified elements on the tree structure;
[0089] The term search unit is used to fuzzily match one or more optional names in a preset local temporary word library and / or a network general word library according to the selected element, so that the user can name the specified element on the tree structure. The local temporary word library refers to a temporarily stored word library for naming elements, and the network general word library refers to a registered and approved word library for naming elements;
[0090] The header file program export unit is used to export the edited interface control file as a header file program.
[0091] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for automatically generating a radar interface control file, characterized in that: include: Step S1, forming a first editing interface for editing the content of the interface control file; Step S2: in the first editing interface, generating index items of the interface control file according to the attributes of the interface control file input by the user; Step S3: Generate a complete interface control file based on the content and attributes of each element and the hierarchical relationship between the elements input by the user; Step S4: Generate a word document or an XML document from the complete interface control file according to the user's specification; Step S5: In the second editing interface, the XML document is edited to generate a header file program according to a preset mapping specification.
2. The method for automatically generating a radar interface control file according to claim 1, characterized in that: In step S2, the attributes of the interface control file include radar series, project code, communication protocol, communication rate, communication cycle, data source, data destination and interface description.
3. The method for automatically generating a radar interface control file according to claim 1, characterized in that: Step S3 further comprises: Step S31: based on the user's selection of the Insert Sub-item checkbox, a hierarchical relationship of the elements is constructed and reflected through numbered automatic hierarchical naming; Step S32: receiving the user's settings for the content and attributes of each element.
4. The method for automatically generating a radar interface control file as claimed in claim 3, characterized in that: In step S32, the content and attributes of each element include element name, element description, element type, element length, element unit, element value range and element precision.
5. The method for automatically generating a radar interface control file according to claim 1, characterized in that: In step S5, the preset mapping specifications include: a mapping specification for constraining variable naming methods when generating a header file program, a mapping specification for constraining variable types, and a mapping specification for constraining variable expressions.
6. The method for automatically generating a radar interface control file according to claim 1, characterized in that: Step S5 further comprises: Step S51, forming a tree structure part for displaying the hierarchical relationship of each element of the interface control file, an editing part for naming the specified element on the tree structure, and a preview part for displaying the header file program of the specified element on the tree structure on the second editing interface; Step S52: according to the selected element, one or more optional names are fuzzily matched in a preset local temporary word library and / or a network general word library, so that the user can name the specified element on the tree structure, wherein the local temporary word library refers to a temporarily stored word library for naming the element, and the network general word library refers to a registered and approved word library for naming the element; Step S53: export the edited interface control file as a header file program.
7. A device for automatically generating a radar interface control file, characterized in that: include: A first editing interface generating module, used to form a first editing interface for content editing of the interface control file; An index item editing module, used to generate index items of the interface control file according to the attributes of the interface control file input by the user in the first editing interface; The interface control file element editing module is used to generate a complete interface control file based on the content, attributes and hierarchical relationship between elements input by the user; A document export module is used to generate a word document or an xml document from the complete interface control file according to user specifications; The header file program generating module is used to generate a header file program by editing the XML document in the second editing interface according to a preset mapping specification.
8. The device for automatically generating a radar interface control file according to claim 7, characterized in that: The interface control file element editing module includes: An element hierarchical relationship editing unit, which is used to construct the hierarchical relationship of each element based on the user's selection of the Insert Sub-item checkbox, and reflects it through numbered automatic hierarchical naming; The element content and attribute editing unit is used to receive the user's settings for the content and attributes of each element.
9. The device for automatically generating a radar interface control file according to claim 7, characterized in that: In step S5, the preset mapping specifications include: a mapping specification for constraining variable naming methods when generating a header file program, a mapping specification for constraining variable types, and a mapping specification for constraining variable expressions.
10. The device for automatically generating a radar interface control file according to claim 7, characterized in that: The header file program generation module includes: A second editing interface generating unit, configured to form, on the second editing interface, a tree structure portion for displaying the hierarchical relationship of the elements of the interface control file, an editing portion for naming the specified elements on the tree structure, and a preview portion for displaying the header file program of the specified elements on the tree structure; The term search unit is used to fuzzily match one or more optional names in a preset local temporary word library and / or a network general word library according to the selected element, so that the user can name the specified element on the tree structure. The local temporary word library refers to a temporarily stored word library for naming elements, and the network general word library refers to a registered and approved word library for naming elements; The header file program export unit is used to export the edited interface control file as a header file program.
Citation Information
Cited By
Communication protocol analysis method and device based on graph theory, equipment and medium
CN120455567A