IDL interface modeling method, system, terminal and medium based on model-driven
Implementing IDL interface modeling in software radio systems through a model-driven approach solves the problem of low IDL interface modeling efficiency in traditional development environments, provides visual modeling and automatic compilation functions, and improves development efficiency and interface reuse. sex.
Patent Information
- Application Number
- CN202311338485.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-16
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-10-16
AI Technical Summary
The traditional software radio integrated development environment lacks the IDL interface modeling function, resulting in low development efficiency and the inability to reuse interfaces, requiring manual writing and compilation of IDL interface code.
Adopting a model-driven approach, by creating an IDL interface model, generating XML modeling documents and configuration information, automatically generating IDL interface code, verifying and encapsulating it into the database, providing model editing, parsing, compilation and database modules, and supporting graphics oriented modeling and automatic compilation.
It implements visual IDL interface modeling, lowers the development threshold, improves development efficiency, supports interface reuse and automatic compilation management, reduces errors, and improves development efficiency and interface consistency.
Smart Images

Figure CN117406981B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software communication, and in particular to a model-driven IDL interface modeling method, system, terminal and medium. Background Art
[0002] Today's software radio systems usually adopt common software architecture standards, including the internationally widely used SCA (Software Communication Architecture) standard and the domestic SRTF standard. These standards provide a unified architecture design and development method for software radio systems to ensure the interoperability, flexibility and scalability of the system. Applications running on software radio systems communicate through ports. These ports usually rely on different transmission mechanisms such as CORBA, adopt object request call communication model, and use IDL interfaces to describe and define communication interfaces. At the same time, the SRTF specification also allows service components to customize interfaces and provide services to the outside world. However, the traditional software radio integrated development environment only focuses on application modeling and logical device modeling, and does not have the function of IDL interface modeling. It is necessary to manually write IDL interface code and compile it, resulting in low development efficiency and the problem of interface non-reusability. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides an IDL interface modeling method, system, terminal and medium based on model-driven.
[0004] According to one aspect of the present invention, a model-driven IDL interface modeling method is provided, comprising:
[0005] Create an IDL interface model and generate an XML modeling document corresponding to the IDL interface model;
[0006] Configure the configuration information required for IDL compilation;
[0007] According to the XML modeling document and the configuration information, an IDL model file is generated and the IDL model file is compiled, and an IDL interface code is automatically generated. The IDL interface code is verified and packaged into a library, and the IDL interface modeling is completed.
[0008] Preferably, the IDL interface model is created to generate an XML modeling document corresponding to the IDL interface model:
[0009] Enter the IDL interface name and create an IDL interface modeling view;
[0010] Add the required interface element model in the IDL interface modeling view;
[0011] The interface element model is configured and placed into the corresponding interface hierarchy in the IDL interface modeling view to create an IDL interface model;
[0012] The IDL interface model is parsed to generate a corresponding readable XML modeling document.
[0013] Preferably, it also includes:
[0014] Analyze, layer and model the IDL interface, obtain the elements in the IDL interface and the hierarchical relationship between the elements, form a unified IDL metadata, and build an interface element model;
[0015] According to the IDL metadata, the required interface element model is configured and placed into the corresponding interface hierarchy in the IDL interface modeling view to create an IDL interface model;
[0016] Providing an XML parser for parsing the IDL interface model to obtain IDL metadata of the IDL interface model; formulating a mapping relationship between each tag and each element in the XML modeling document according to the IDL metadata;
[0017] According to the mapping relationship, a corresponding XML modeling document is formed;
[0018] And verify whether the IDL interface model is mapped to the XML modeling document.
[0019] Preferably, the configuration information required for IDL compilation, through compilation configuration, includes:
[0020] Select the middleware corresponding to the IDL interface in the IDL compilation configuration;
[0021] Select the IDL compiler in the IDL compilation configuration to determine the code type of the generated stub file;
[0022] Add header files in the IDL compilation configuration to obtain the header files that the IDL model file needs to reference during the compilation process;
[0023] Set the compilation options in the IDL compilation configuration to set the parameters required for the IDL model file during the compilation process.
[0024] Preferably, generating an IDL model file according to the XML modeling document and the configuration information, compiling the IDL model file, automatically generating an IDL interface code, verifying the IDL interface code and packaging it into a library, includes:
[0025] Generate an IDL model file named interfacename.idl according to the XML modeling document, wherein the IDL model file includes interface definition and related element information;
[0026] According to the configuration information, compile the IDL model file, generate corresponding IDL interface code, and verify the IDL interface code;
[0027] The IDL interface code that has passed the verification is packaged and stored in the model library.
[0028] Preferably, it also includes:
[0029] Providing an XML parser for parsing the IDL interface model and generating an XML modeling document;
[0030] Providing an IDL generator for obtaining IDL metadata of the IDL interface model according to the XML modeling document;
[0031] According to the specified IDL template file, a corresponding IDL model file is generated according to the IDL metadata;
[0032] Selecting corresponding compilation configuration information in the IDL metadata;
[0033] An IDL compiler is provided, which is used to compile the IDL model file according to the compilation configuration information to generate the required IDL interface code.
[0034] According to another aspect of the present invention, there is provided an IDL interface modeling system based on model-driven, comprising:
[0035] Model editing module, used to create IDL interface models;
[0036] A model parsing module, used to generate an XML modeling document corresponding to the IDL interface model, and to verify and parse the IDL interface model;
[0037] Interface compilation module, used to configure the configuration information required for IDL compilation;
[0038] A code generation module, used to generate an IDL model file according to the XML modeling document and compile the IDL model file; generate an IDL interface code according to the configuration information;
[0039] The model storage module is used to verify the IDL interface code and encapsulate it into the storage.
[0040] According to a third aspect of the present invention, there is provided an application of an IDL interface library model constructed based on a model-driven IDL interface modeling method, wherein a required IDL interface library model is selected from a model library for use in port modeling and / or service component modeling.
[0041] Preferably, the application includes:
[0042] Enter the port name and create a port modeling view;
[0043] Configure the attribute information of the port to obtain the port model;
[0044] From the model library, select the IDL interface library model to be used by the port, and assemble it into the port model;
[0045] Verify the assembled port model and store it in the library.
[0046] Preferably, the application includes:
[0047] Enter the application component name to create a visual application component model;
[0048] Selecting a port model to be used by the application component from a model library and assembling it into the application component model;
[0049] The assembled application component models are stored in the database.
[0050] According to a fourth aspect of the present invention, there is provided a computer terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, can be used to execute any of the methods described above in the present invention, or to run any of the systems described above in the present invention.
[0051] According to a fifth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can be used to execute any of the methods described above in the present invention, or to run any of the systems described above in the present invention.
[0052] Due to the adoption of the above technical solution, the present invention has at least one of the following beneficial effects compared with the prior art:
[0053] The model-driven IDL interface modeling method, system, terminal and medium provided by the present invention use a model-driven modeling method to realize a visualized IDL interface modeling function, shield IDL syntax details for developers, and lower the development threshold. Developers do not need to deeply study complex IDL syntax and can create and modify interface models more quickly.
[0054] The model-driven IDL interface modeling method, system, terminal and medium provided by the present invention support automatic compilation and storage management of IDL interfaces, eliminating the need to manually handle tedious compilation and management tasks, greatly improving development efficiency and reducing errors that may occur during the development process.
[0055] The model-driven IDL interface modeling method, system, terminal and medium provided by the present invention can enable developers to focus more on business logic rather than underlying interface details; in applications, component ports and service components can inherit IDL interfaces through graphical modeling, thereby improving development efficiency and interface reusability; developers can share interfaces between different components and services, reducing duplication of work while ensuring interface consistency. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0057] Figure 1 It is a working schematic diagram of the IDL interface modeling method based on model-driven in a preferred embodiment of the present invention.
[0058] Figure 2 It is a schematic diagram of the component modules of the IDL interface modeling system based on model-driven in a preferred embodiment of the present invention.
[0059] Figure 3 This is a schematic diagram of the IDL interface model construction process in a preferred embodiment of the present invention.
[0060] Figure 4 This is a schematic diagram of the IDL interface model compilation process in a preferred embodiment of the present invention.
[0061] Figure 5 The figure is a workflow diagram of the IDL interface modeling process and application in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following is a detailed description of the embodiments of the present invention: This embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation method and a specific operation process are given. It should be pointed out that for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
[0063] An embodiment of the present invention provides a model-driven IDL interface modeling method, which makes interface design and development more visual and abstract by adopting a graphical modeling method, and provides a visual and reusable IDL interface for a software radio system waveform.
[0064] like Figure 1 As shown, the model-driven IDL interface modeling method provided in this embodiment models the IDL interface in a software radio integrated development environment terminal, which may include:
[0065] S100, creating an IDL interface model and generating an XML modeling document corresponding to the IDL interface model;
[0066] S200, configuring the configuration information required for IDL compilation; further, the configuration information may include: middleware, compiler, header file and compilation options, etc.;
[0067] S300, based on the XML modeling document obtained in S100 and the configuration information obtained in S200, an IDL model file is generated and the IDL model file is compiled, an IDL interface code is automatically generated, the IDL interface code is verified and packaged into a library, and the IDL interface modeling is completed.
[0068] In a preferred embodiment of S100, the following operations may be further included:
[0069] S101, input the IDL interface name and create an IDL interface modeling view;
[0070] S102, according to the developer's design requirements for the IDL interface, add the required interface element model in the IDL interface modeling view; further, the interface element model may include: elements such as attributes, operations, and hierarchical relationships between the elements;
[0071] S103, configuring the interface element model and placing it into the corresponding interface hierarchy in the IDL interface modeling view to create an IDL interface model;
[0072] S104, parsing the IDL interface model to generate a corresponding readable XML modeling document.
[0073] Furthermore, the above S100 may further include the following operations:
[0074] S1001, analyzing, layering and modeling the IDL interface, obtaining the elements in the IDL interface and the hierarchical relationship between the elements, forming a unified IDL metadata, and building an interface element model;
[0075] S1002, configuring the required interface element model according to the IDL metadata, and putting it into the corresponding interface hierarchy in the IDL interface modeling view to create an IDL interface model;
[0076] S1003, providing an XML parser for parsing the IDL interface model to obtain IDL metadata of the IDL interface model; formulating a mapping relationship between each tag and each element in the XML modeling document according to the IDL metadata;
[0077] S1004, forming a corresponding XML modeling document according to the mapping relationship;
[0078] S1005, verify whether the IDL interface model is mapped to the XML modeling document.
[0079] The verified IDL interface model and XML modeling document can be applied to the software radio system to ensure that the various components of the system can correctly transmit and receive data.
[0080] In a preferred embodiment of S200, the following operations may be further included through compiling configuration:
[0081] S201, selecting the middleware corresponding to the IDL interface in the IDL compilation configuration; further, the middleware may include: such as CORBA, DDS, ICE, etc.;
[0082] S202, selecting an IDL compiler in the IDL compilation configuration to determine the code type of the generated stub file; further, the selectable version of the IDL compiler includes: programming language and platform, wherein the programming language includes: C, C++, etc., and the programming platform includes: Linux, Windows;
[0083] S203, adding a header file in the IDL compilation configuration to obtain a header file that needs to be referenced by the IDL model file during the compilation process;
[0084] S204, setting compilation options in the IDL compilation configuration, which is used to set the parameters required for the IDL model file during the compilation process (ie, information such as the compiler for compiling the IDL file and the type of generated code).
[0085] In a preferred embodiment of S300, the following operations may be further included:
[0086] S301, generating an IDL model file named interface name.idl according to the XML modeling document, the IDL model file including a standard interface definition and related parameter information (i.e., various element information added to the IDL interface model during modeling);
[0087] S302, compile the IDL model file according to the configuration information, generate the corresponding IDL interface code, and verify the syntax rules of the IDL interface code;
[0088] S303, encapsulating the verified IDL interface code and storing it in the model library.
[0089] Furthermore, the above S300 may further include the following operations:
[0090] S3001, providing an XML parser for parsing the IDL interface model and generating an XML modeling document;
[0091] S3002, providing an IDL generator for obtaining IDL metadata of the IDL interface model according to the XML modeling document, including interface elements such as attributes and operations and the hierarchical relationship between them;
[0092] S3003, generating a corresponding IDL model file according to the specified IDL template file and the IDL metadata;
[0093] S3004, selecting corresponding compilation configuration information in the IDL metadata;
[0094] S3005, providing an IDL compiler, for compiling the IDL model file according to the compilation configuration information to generate the required IDL interface code.
[0095] An embodiment of the present invention provides an IDL interface modeling system based on model-driven.
[0096] like Figure 2 As shown, the model-driven IDL interface modeling system provided in this embodiment may include: a model editing module, a model parsing module, an interface compiling module, a code generating module and a model storage module; wherein:
[0097] Model editing module, used to create IDL interface models;
[0098] Model parsing module, used to verify and parse the IDL interface model and generate the XML modeling document corresponding to the IDL interface model;
[0099] The interface compilation module is used to configure the configuration information required for compiling the IDL interface model;
[0100] The code generation module is used to generate an IDL model file according to the XML modeling document and compile the IDL model file; and generate an IDL interface code according to the configuration information.
[0101] The model storage module is used to verify and store the IDL interface model.
[0102] The technical solutions provided by the above embodiments of the present invention and the functions implemented by each module are described as follows.
[0103] Model editing module: IDL interface contains elements such as attributes, operations, arrays, constants and enumerations. This module models all these elements, so that when designing IDL interface, you only need to drag and add these built models in the interface modeling view to model the IDL interface, create the IDL interface model, and complete the design.
[0104] Model parsing module: This module is a crucial component of the system. Its responsibility is to parse and verify the IDL interface model to ensure that there will be no problems in the use of these models. The specific implementation method of this module is to convert the visual IDL interface model into a readable XML modeling document, and complete the parsing and verification of the IDL interface model by verifying the file content and format.
[0105] Interface compilation module: This module integrates different IDL compilers to adapt to various middleware such as CORBA, DDS, etc. At the same time, by setting parameters such as header files and compilation options, the IDL model file can be compiled into multiple programming language codes (such as C++, C, Java).
[0106] Code generation module: This module can parse the IDL interface model and generate the corresponding IDL model file, and call the compiler to compile the IDL model file to generate code.
[0107] It should be noted that the steps in the method provided by the present invention can be implemented by using corresponding modules, devices, units, etc. in the system. Those skilled in the art can refer to the technical solution of the method to realize the composition of the system, that is, the embodiments in the method can be understood as preferred examples for constructing the system, which will not be elaborated here.
[0108] One embodiment of the present invention provides an application of an IDL interface library model (i.e., the IDL interface code encapsulated and incorporated into the library obtained by constructing the model-driven IDL interface modeling method or system provided in the above-mentioned embodiment of the present invention), and selects the required IDL interface library model from the model library for port modeling and / or service component modeling.
[0109] In a preferred embodiment, the application may further include the following operations:
[0110] S1, enter the port name and create a port modeling view;
[0111] S2, configure the attribute information of the port to obtain the port model;
[0112] S3, select the IDL interface library model to be used by the port from the model library, and assemble it into the port model;
[0113] S4, verify the assembled port model and store it in the library.
[0114] In a preferred embodiment, the application may further include the following operations:
[0115] M1, enter the application component name and create a visual application component model;
[0116] M2, selects the port model to be used by the application component from the model library and assembles it into the application component model;
[0117] M3, put the assembled application component model into the warehouse.
[0118] The technical solutions and design principles provided by the above embodiments of the present invention are further described in detail below.
[0119] In the field of software radio, waveforms usually need to adapt to multiple environments and platforms, and different scenarios under the same business also require developers of different platforms. Therefore, it is necessary to adopt a unified way to stipulate collaboration at the beginning of waveform design. The model-driven IDL interface modeling method provided by the above embodiment of the present invention adopts model-driven modeling to separate business logic from underlying platform technology. Through a unified language specification, it can more flexibly meet the needs in various environments, reduce communication costs and misunderstandings, and improve development efficiency and code quality.
[0120] like Figure 3 As shown, the method provided by the above embodiment of the present invention first analyzes the various elements in the IDL interface, including the interface name, method, parameter type, etc., and then layers these elements to clarify the dependencies between the elements, and finally forms a unified IDL metadata, including the model type, ID, name, appearance, parent-child elements and other basic model specifications. The IDL interface model and the XML modeling document (i.e., the IDL model file) are mutually verified through the IDL metadata. The method provided by the above embodiment of the present invention also provides an XML parser, which verifies the IDL model file when creating and warehousing the IDL interface model to detect whether it is correctly mapped to the XML modeling document. The XML modeling document is parsed when editing and warehousing, so as to graph the XML modeling document into an IDL interface model. The part of the method that creates the IDL interface model includes the following steps:
[0121] Step 1: Analyze, layer and model the IDL interface, clarify the elements in the IDL interface and the hierarchical relationship between the elements, and form a unified set of IDL metadata;
[0122] Step 2: According to the IDL metadata, the mapping relationship between each tag in the XML modeling document and the IDL interface data is formulated to form a set of basic XML tag specifications including basic tag name, type, ID, parent element, child element, etc.
[0123] Step 3: Model the IDL interface according to the established mapping relationship and IDL metadata, and form an XML modeling document. Use the XML parser to implement parsing and verification between the IDL interface model and the XML modeling document.
[0124] Step 4: Apply the verified IDL model and XML modeling document to the software radio system to ensure that the various components of the system can correctly pass and receive data.
[0125] In software radio systems, IDL interfaces are widely used to describe and define interfaces between software components. It is a platform-independent technology. In the domestic SRTF specification, waveform component communication usually relies on various transmission mechanisms. Therefore, the interface code that implements the communication function needs to be adapted to different platforms and middleware. Figure 4 As shown, the IDL model file itself is platform-independent. It is necessary to select different systems (such as Windows, Linux) and middleware (such as CORBA, DDS, ICE, etc.) according to the actual application scenario, and use the corresponding compiler (such as C, C++, Java, etc.) to compile the IDL model file to generate an IDL interface code that meets actual needs. The method provided by the above embodiment of the present invention decouples the connection between the IDL model file and the IDL interface code by using the compilation configuration element in the IDL interface model to record the middleware, compiler and other information of the IDL interface model, and can flexibly increase or decrease the adaptive middleware and compiler to meet actual needs, thereby improving scalability. When generating and compiling the IDL model file, you only need to parse the IDL interface model to obtain the required information, which specifically includes the following steps:
[0126] Step i: Parse the IDL interface model through IDL metadata and generate XML modeling document;
[0127] Step ii: The IDL generator obtains IDL interface information according to the XML modeling document, including interface elements such as attributes and operations and the hierarchical relationship between them;
[0128] Step iii: Generate the corresponding IDL model file according to the specified IDL template file and the IDL interface information;
[0129] Step iv: Select the corresponding compilation configuration information in the parsed IDL interface information, and use the corresponding compiler to compile the IDL model file to generate the required IDL interface code.
[0130] IDL interface is usually used in two scenarios in software radio system: one is to provide support for ports to realize application port communication; the other is to provide support for service components to facilitate the service to provide external functions. The method provided by the above embodiment of the present invention uses model-driven IDL interface modeling in the software radio integrated development environment terminal to realize the application of IDL interface model in the above scenarios. Figure 5 As shown in the figure, the modeling and application of the IDL interface in the radio integrated development environment terminal specifically includes the following steps:
[0131] Step 1: In the software radio integrated development environment, create an IDL interface model, perform model verification and analysis, and generate an XML modeling document corresponding to the IDL interface model;
[0132] Step 2: Configure the middleware, compiler, header files, compilation options and other configuration information required for IDL compilation through compilation configuration;
[0133] Step 3: Based on the information obtained in Step 1 and Step 2, generate an IDL model file and compile the IDL model file, automatically generate interface code, verify the IDL interface model and store it in the database;
[0134] Step 4: When modeling ports and service components, select the IDL interface model to be used from the model library.
[0135] Wherein, step 1 comprises the following steps:
[0136] Step 1.1: Enter the IDL interface name and create an IDL interface modeling view;
[0137] Step 1.2: According to the developer's design requirements for the IDL interface, add the corresponding interface element model (including attributes, operations, etc.) to the IDL interface model;
[0138] Step 1.3: Configure the interface element model and put it into the corresponding interface hierarchy in the IDL interface model to obtain a visual IDL interface model;
[0139] Step 1.4: Parse the IDL interface model and generate the corresponding XML modeling document.
[0140] Wherein, step 2 comprises the following steps:
[0141] Step 2.1: Select the applicable middleware in the compilation configuration, such as CORBA, DDS, ICE, etc., to clarify the middleware corresponding to the IDL interface;
[0142] Step 2.2: Select the IDL compiler version in the compilation configuration, including the programming language and platform. The programming languages include C, C++, etc., and the programming platforms include Linux and Windows to determine the code type of the generated stub file;
[0143] Step 2.3: Add header files to the compilation configuration to meet the header files that need to be referenced during the compilation process of the IDL model file;
[0144] Step 2.4: Set the compilation options in the compilation configuration to set the parameters required for the IDL model file during the compilation process.
[0145] Wherein, step 3 comprises the following steps:
[0146] Step 3.1: Generate a readable IDL model file named interface name.idl according to the XML modeling document, which contains the standard interface definition and related parameter information;
[0147] Step 3.2: According to the configuration information in step 2, use the corresponding compiler to compile the IDL model file, generate the corresponding IDL interface code, and verify the IDL interface code;
[0148] Step 3.3: Encapsulate the verified IDL interface code and store it in the model library.
[0149] Step 4.1: Enter the port name and create a port modeling view;
[0150] Step 4.2: According to the developer's design requirements for the port, configure the port properties, including transmission type, maximum number of connections, etc., to obtain a visual port model;
[0151] Step 4.3: From the model library, select the IDL interface library model that the port needs to use. Parse the IDL interface library model into the corresponding IDL interface model and assemble it into the port model;
[0152] Step 4.4: Verify the port model and store it in the library;
[0153] Step 4.5: Enter the application component name, create an application component modeling view, and obtain a visual application component model;
[0154] Step 4.6: Select the port model required by the application component from the model library and assemble it into the application component model;
[0155] Step 4.7: Store the application component model into the database.
[0156] An embodiment of the present invention provides a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can be used to execute any method in the above-mentioned embodiments of the present invention, or to run any system in the above-mentioned embodiments of the present invention.
[0157] Optionally, the memory is used to store programs; the memory may include volatile memory (English: volatile memory), such as random-access memory (English: random-access memory, abbreviated: RAM), such as static random-access memory (English: static random-access memory, abbreviated: SRAM), double data rate synchronous dynamic random access memory (English: Double Data Rate Synchronous Dynamic Random Access Memory, abbreviated: DDR SDRAM), etc.; the memory may also include non-volatile memory (English: non-volatile memory), such as flash memory (English: flash memory). The memory is used to store computer programs (such as applications, functional modules, etc. that implement the above method), computer instructions, etc., and the above computer programs, computer instructions, etc. can be partitioned and stored in one or more memories. And the above computer programs, computer instructions, data, etc. can be called by the processor.
[0158] The above-mentioned computer programs, computer instructions, etc. may be stored in one or more memories in partitions, and the above-mentioned computer programs, computer instructions, data, etc. may be called by a processor.
[0159] The processor is used to execute the computer program stored in the memory to implement the various steps of the method or various modules of the system involved in the above embodiments. For details, please refer to the relevant descriptions in the above method and system embodiments.
[0160] The processor and the memory may be independent structures or integrated structures. When the processor and the memory are independent structures, the memory and the processor may be coupled and connected via a bus.
[0161] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can be used to execute any one of the methods in the above-mentioned embodiments of the present invention, or to run any one of the systems in the above-mentioned embodiments of the present invention.
[0162] The model-driven IDL interface modeling method, system, terminal and medium provided in the above embodiments of the present invention use a model-driven modeling method to realize a visual IDL interface modeling function, shield IDL syntax details for developers, and lower the development threshold; support automatic compilation and warehousing management of IDL interfaces, and in the application, component ports and service components can inherit IDL interfaces through graphical modeling, thereby improving development efficiency and interface reusability.
[0163] Those skilled in the art know that, in addition to implementing the system and its various devices provided by the present invention in a purely computer-readable program code, the system and its various devices provided by the present invention can be made to implement the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices provided by the present invention can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component; the devices for implementing various functions can also be considered as both software modules for implementing the method and structures within the hardware component.
[0164] All matters not covered in the above embodiments of the present invention are well known in the art.
[0165] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. A model-driven IDL interface modeling method, characterized in that: include: Create an IDL interface model and generate an XML modeling document corresponding to the IDL interface model; Configure the configuration information required for IDL compilation; Generate an IDL model file according to the XML modeling document and the configuration information, compile the IDL model file, automatically generate an IDL interface code, verify the IDL interface code and package it into a library, and complete the IDL interface modeling; in: The step of creating an IDL interface model and generating an XML modeling document corresponding to the IDL interface model includes: Enter the IDL interface name and create an IDL interface modeling view; Analyze, layer and model the IDL interface, obtain the elements in the IDL interface and the hierarchical relationship between the elements, form a unified IDL metadata, and build an interface element model; wherein the IDL metadata includes: the type, ID, name, appearance and parent-child elements of the model; the interface element model includes: attributes, operations and the hierarchical relationship between the elements; Add the required interface element model in the IDL interface modeling view; According to the IDL metadata, the required interface element model is configured, and the corresponding interface hierarchy is placed in the IDL interface modeling view to create an IDL interface model; Providing an XML parser for parsing the IDL interface model to obtain IDL metadata of the IDL interface model; formulating a mapping relationship between each tag and each element in the XML modeling document according to the IDL metadata; According to the mapping relationship, a corresponding XML modeling document is formed; Verify whether the IDL interface model is mapped to the XML modeling document; The configuration information required for IDL compilation is configured through compilation configuration, including: Select the middleware corresponding to the IDL interface in the IDL compilation configuration; Select the IDL compiler in the IDL compilation configuration to determine the code type of the generated stub file; Add header files in the IDL compilation configuration to obtain the header files that the IDL model file needs to reference during the compilation process; Set the compilation options in the IDL compilation configuration to set the parameters required for the IDL model file during the compilation process.
2. The model-driven IDL interface modeling method according to claim 1, characterized in that: The step of generating an IDL model file according to the XML modeling document and the configuration information, compiling the IDL model file, automatically generating an IDL interface code, and verifying and packaging the IDL interface code into a database includes: Generate an IDL model file named interfacename.idl according to the XML modeling document, wherein the IDL model file includes interface definition and related element information; According to the configuration information, compile the IDL model file, generate corresponding IDL interface code, and verify the IDL interface code; The IDL interface code that has passed the verification is packaged and stored in the model library.
3. The model-driven IDL interface modeling method according to claim 2, characterized in that: Also includes: Providing an XML parser for parsing the IDL interface model and generating an XML modeling document; Providing an IDL generator for obtaining IDL metadata of the IDL interface model according to the XML modeling document; According to the specified IDL template file, a corresponding IDL model file is generated according to the IDL metadata; Selecting corresponding compilation configuration information in the IDL metadata; An IDL compiler is provided, which is used to compile the IDL model file according to the compilation configuration information to generate the required IDL interface code.
4. A model-driven IDL interface modeling system for implementing the model-driven IDL interface modeling method according to any one of claims 1 to 3, characterized in that: include: Model editing module, used to create IDL interface models; A model parsing module, used to generate an XML modeling document corresponding to the IDL interface model, and to verify and parse the IDL interface model; Interface compilation module, used to configure the configuration information required for IDL compilation; A code generation module, used to generate an IDL model file according to the XML modeling document and compile the IDL model file; Generate IDL interface code according to the configuration information; The model storage module is used to verify the IDL interface code and encapsulate it into the storage.
5. An application of an IDL interface library model constructed by the model-driven IDL interface modeling method according to any one of claims 1 to 3, characterized in that: Select the required IDL interface library model from the model library for port modeling and / or service component modeling.
6. The use according to claim 5, characterized in that: include: Enter the port name and create a port modeling view; Configure the attribute information of the port to obtain the port model; Select an IDL interface library model to be used by the port from the model library, and assemble it into the port model; Verify the assembled port model and store it in the library; Enter the application component name to create a visual application component model; Selecting a port model to be used by the application component from a model library and assembling it into the application component model; The assembled application component models are stored in the database.
7. A computer terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it can be used to execute the method described in any one of claims 1-3 or 5-6, or run the system described in claim 4.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it can be used to perform the method described in any one of claims 1 to 3 or 5 to 6, or to run the system described in claim 4.
