CN117874393A - Method and system for constructing SCA model engineering through XML file - Google Patents

Method and system for constructing SCA model engineering through XML file Download PDF

Info

Publication number
CN117874393A
CN117874393A CN202410275455.8A CN202410275455A CN117874393A CN 117874393 A CN117874393 A CN 117874393A CN 202410275455 A CN202410275455 A CN 202410275455A CN 117874393 A CN117874393 A CN 117874393A
Authority
CN
China
Prior art keywords
model
sca
data
file
engineering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410275455.8A
Other languages
Chinese (zh)
Other versions
CN117874393B (en
Inventor
朱骏霄
朱小武
许忠文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Xieying Technology Co ltd
Original Assignee
Chengdu Xieying Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Xieying Technology Co ltd filed Critical Chengdu Xieying Technology Co ltd
Priority to CN202410275455.8A priority Critical patent/CN117874393B/en
Publication of CN117874393A publication Critical patent/CN117874393A/en
Application granted granted Critical
Publication of CN117874393B publication Critical patent/CN117874393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the field of data processing, in particular to a method and a system for constructing SCA model engineering through XML files, wherein the method comprises the following steps of data extraction: analyzing the XML file to extract data for constructing the SCA model engineering; data conversion: correspondingly dividing XML elements in the data into classes, attributes or methods in the SCA model; and (3) model generation: splicing the data into a file which can be identified by a modeling tool through codes, and displaying a UML model structure corresponding to the file in a graphical interface by the modeling tool; model verification: verifying the UML model through a verification function of a modeling tool; model output: the UML model is exported as SCA model engineering conforming to the SCA specification. According to the invention, the user does not need to learn UML modeling any more, the time and labor cost of using the SCA framework by the user are simplified, the development speed is improved, and the using steps are simplified.

Description

Method and system for constructing SCA model engineering through XML file
Technical Field
The invention relates to the field of data processing, in particular to a method and a system for constructing SCA model engineering through an XML file.
Background
SCA (Software Communication Architecture) is a generic software communication architecture, the aim of which is to ensure portability and configurability of software and hardware and to ensure interworking between products developed in accordance with SCA. Thereafter, software Defined Radio (SDR) also accepted the SCA specification and developed SCA as a standard for commercial applications.
In the construction of the SCA model, the prior art firstly utilizes UML unified modeling language to create SCA model engineering according to the part shift, and then generates a corresponding XML file through the SCA model. This requires that the user using the SCA must learn the UML modeling before the SCA can be used in its entirety.
In the reverse reconstruction of the XML file, only the technology of reversely reconstructing the XML file into the UML model exists at present, and no technology capable of directly constructing the SCA model from the XML file exists. The construction of SCA model engineering from XML files has the following main problems:
1. inconsistencies in data formats: the format of the XML file may be different from XML parser to XML parser, which makes it very difficult to reverse the generation of the SCA model engineering for the XML file.
2. Data loss or error: XML files may cause data loss or errors for various reasons, which may also present difficulties for the reverse generation of SCA model engineering of XML files.
3. Data structure complexity: XML files may contain complex data structures such as nesting, references, etc., which also increase the difficulty of reverse engineering the SCA model of the XML file.
4. Complexity of code generation: the XML reverse generation SCA model also requires the generation of its corresponding code, which also increases the difficulty. Various factors such as readability, maintainability, extensibility, etc. of the code need to be considered.
To address these difficulties, complex techniques such as data structure analysis, error detection and repair, code generation techniques, etc. are required. In addition, an extensive understanding of the XML file and UML model is required to effectively solve these difficulties. This clearly requires a high level of professional ability for the user, which is inconvenient for the popularization of the technology and the development of the actual work.
Therefore, a method for constructing the SCA model engineering from the XML file is needed, so that a user does not need to learn UML modeling any more, the time cost and the labor cost of using the SCA framework by the user are simplified, the development speed is improved, and the using steps are simplified.
Disclosure of Invention
The invention provides a method and a system for constructing SCA model engineering through an XML file, which enable a user not to learn UML modeling any more, simplify the time cost and labor cost of using the SCA frame by the user, promote the development speed and simplify the use steps.
The invention constructs the SCA model engineering method through XML file, which comprises data extraction, data conversion, model generation, model verification and model output; wherein,
and (3) data extraction: analyzing an XML file, and extracting data required by constructing SCA model engineering from the XML file;
data conversion: the extracted data needs to be converted because the format is not consistent with the SCA model. Correspondingly dividing XML elements in the data into classes, attributes or methods in an SCA model through encoding;
and (3) model generation: the converted data is spliced into a file with a suffix of emx which can be identified by an RSA modeling tool through codes, the file is imported into the RSA modeling tool, and the corresponding UML model structure is displayed in a graphical interface after the RSA modeling tool identifies the file;
model verification: verifying the generated UML model by calling a verification function of an RSA modeling tool, so as to ensure the integrity of the UML model;
model output: and finally, exporting the UML model which is verified as SCA model engineering which accords with the SCA specification.
Aiming at the difficulty of constructing SCA model engineering by XML files in the prior art, the invention solves the problem of inconsistent data formats through a data extraction step, solves the problems of data deletion or error and complexity of a data structure through a data conversion step, and solves the problem of complexity of code generation through a model generation step.
The invention can generate the SCA model engineering conforming to the SCA specification by handwriting the XML file conforming to the SCA specification and importing the XML file. A plurality of models and various correlations between the plurality of models are included in one model project. When a user needs to read a model to know the component setting, the data flow direction and the like of the whole model engineering, but does not have the complete SCA model engineering, and only the package file of the compiling deployment (because the XML file for describing the SCA model engineering is complete in the package of the compiling deployment) is compiled, the compiling deployment package can be imported through the invention, so that the complete SCA model engineering is generated. Therefore, the user can avoid learning UML modeling, and can completely use the SCA model process only by knowing the SCA specification, thereby greatly reducing the cost and workload of using the SCA by the user.
Specifically, during data extraction, data in an XML file is analyzed into a tree structure, and then the tree structure is traversed to extract data required by construction of SCA model engineering.
Specifically, during data conversion, the data extracted in the data extraction step are traversed through encoding, and the data are divided into different modules according to the SCA specification and the structure of the SCA model, wherein the modules comprise classes, attributes or methods in the SCA model.
Specifically, during model verification, the UML model is verified by calling a verification function of an RSA modeling tool to verify whether the generated UML model accords with UML specifications.
Specifically, when the model is output, the SCA specification is firstly converted into a specification file which can be identified by a corresponding code, then the generated file with the emx suffix is compared through the specification file, the data in the file with the emx suffix is converted and modified according to the SCA specification, finally whether the whole converted and modified model is a complete model project which accords with the SCA specification is verified through the specification file, and then the verified SCA model project which accords with the SCA specification is output.
The invention also provides a system for constructing SCA model engineering through XML files, which is used for the method; the system comprises a data extraction unit, a data conversion unit, a model generation unit, a model verification unit and a model output unit; wherein,
the data extraction unit is used for analyzing the XML file and extracting data needed by construction of the SCA model engineering from the XML file;
the data conversion unit is used for correspondingly dividing XML elements in the data into classes, attributes or methods in the SCA model;
the model generating unit is used for splicing the converted data into a file with a emx suffix which can be identified by an RSA modeling tool through codes, and the RSA modeling tool displays a corresponding UML model structure in a graphical interface after identifying the file;
the model verification unit is used for verifying the generated UML model and ensuring the integrity of the UML model;
the model output unit is used for exporting the UML model which is completed to be verified into SCA model engineering which accords with SCA specifications.
The beneficial effects of the invention include:
1. the model is more convenient to import: XML is a common markup language, and SCA models will have a complete XML file describing the SCA model in the deployment package on the station. Thus, a user can generate a visual SCA model by importing a deployment package in one key without manually reading an XML file to learn about the SCA project.
2. Lower cost: by reversely generating the SCA model from the XML file, the process of manually creating the SCA model can be avoided, thereby greatly reducing the learning cost, the time cost and the workload.
3. Better model consistency: by reverse reconstructing the SCA model from the XML file, consistency of the model, as well as integrity, can be ensured. Because in the SCA specification file the structure and specification of the XML file is fully and explicitly described. So, as long as XML is created from specification, the reverse generated SCA model must be SCA compliant.
Drawings
FIG. 1 is a flow chart of a method of constructing SCA model engineering via XML files in accordance with the present invention.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
As shown in FIG. 1, the method for constructing the SCA model engineering through the XML file comprises data extraction, data conversion, model generation, model verification and model output; wherein,
and (3) data extraction: the imported XML file is parsed by calling an XML parsing class of an Eclipse framework (a code editing program), the XML parsing class parses data in the XML file into a tree structure, and then the tree structure is traversed through codes, so that data needed for constructing SCA model engineering is extracted from the XML file.
Data conversion: the extracted data needs to be converted because the format is not consistent with the SCA model. Through encoding, traversing the data extracted in the data extraction step, and correspondingly dividing XML elements in the data into classes, attributes or methods in the SCA model according to the SCA specification. For example, some XML elements in the data should be classes of the model, some XML elements are classified as attributes of the model, and finally the classified XML elements are converted into corresponding classes, attributes or methods through written type conversion codes respectively.
And (3) model generation: and splicing the converted data into a file with a emx suffix which can be identified by an RSA modeling tool through codes, then importing the file into the RSA modeling tool, and displaying a corresponding UML model structure in a graphical interface after the RSA modeling tool identifies the file.
Model verification: and verifying the generated UML model by calling a verification function of the RSA modeling tool, so as to ensure that the generated UML model accords with UML specifications and ensure the integrity of the model UML model. The verification function is a self-contained function of the RSA modeling tool, the operation of which is not described in detail herein.
Model output: the SCA specification is converted into a specification file which can be identified by a corresponding code, the generated file with the emx suffix is compared through the specification file, data in the file with the emx suffix is converted and modified according to the SCA specification, finally whether the whole converted and modified model is a complete model engineering which accords with the SCA specification is verified through the specification file, and then the verified SCA model engineering which accords with the SCA specification is output.
The invention also provides a system for constructing SCA model engineering through XML files, which is used for the method and comprises a data extraction unit, a data conversion unit, a model generation unit, a model verification unit and a model output unit; wherein,
the data extraction unit is used for analyzing the XML file and extracting data needed by construction of the SCA model engineering from the XML file;
the data conversion unit is used for correspondingly dividing XML elements in the data into classes, attributes or methods in the SCA model;
the model generating unit is used for splicing the converted data into a file with a emx suffix which can be identified by an RSA modeling tool through codes, and the RSA modeling tool displays a corresponding UML model structure in a graphical interface after identifying the file;
the model verification unit is used for verifying the generated UML model and ensuring the integrity of the UML model;
the model output unit is used for exporting the UML model which is completed to be verified into SCA model engineering which accords with SCA specifications.
Aiming at the difficulty of constructing SCA model engineering by XML files in the prior art, the invention solves the problem of inconsistent data formats through a data extraction step, solves the problems of data deletion or error and complexity of a data structure through a data conversion step, and solves the problem of complexity of code generation through a model generation step.
The invention can generate the SCA model engineering conforming to the SCA specification by handwriting the XML file conforming to the SCA specification and importing the XML file. A plurality of models and various correlations between the plurality of models are included in one model project. When a user needs to read a model to know the component setting, the data flow direction and the like of the whole model engineering, but does not have the complete SCA model engineering, and only the package file of the compiling deployment (because the XML file for describing the SCA model engineering is complete in the package of the compiling deployment) is compiled, the compiling deployment package can be imported through the invention, so that the complete SCA model engineering is generated. Therefore, the user can avoid learning UML modeling, and can completely use the SCA model process only by knowing the SCA specification, thereby greatly reducing the cost and workload of using the SCA by the user.
The foregoing examples merely represent specific embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that, for those skilled in the art, it is possible to make related modifications and improvements without departing from the technical idea of the present application, which are all included in the protection scope of the present application.

Claims (6)

1. The method for constructing the SCA model engineering through the XML file is characterized in that: the method comprises data extraction, data conversion, model generation, model verification and model output; wherein,
and (3) data extraction: analyzing an XML file, and extracting data required by constructing SCA model engineering from the XML file;
data conversion: correspondingly dividing XML elements in the data into classes, attributes or methods in an SCA model through encoding;
and (3) model generation: the converted data is spliced into a file with a suffix of emx which can be identified by an RSA modeling tool through codes, the file is imported into the RSA modeling tool, and the corresponding UML model structure is displayed in a graphical interface after the RSA modeling tool identifies the file;
model verification: verifying the generated UML model by calling a verification function of an RSA modeling tool, so as to ensure the integrity of the UML model;
model output: and finally, exporting the UML model which is verified as SCA model engineering which accords with the SCA specification.
2. The method for constructing SCA model engineering through XML file according to claim 1, wherein: when the data is extracted, the data in the XML file is analyzed into a tree structure, and then the tree structure is traversed, and the data required by the construction of the SCA model engineering is extracted.
3. The method for constructing SCA model engineering through XML file according to claim 1, wherein: during data conversion, the data extracted in the data extraction step are traversed through encoding, the data are divided into different modules according to the SCA specification and the structure of the SCA model, and the modules comprise classes, attributes or methods in the SCA model.
4. The method for constructing SCA model engineering through XML file according to claim 1, wherein: during model verification, the UML model is verified by calling a verification function of an RSA modeling tool to verify whether the generated UML model accords with UML specifications.
5. The method for constructing SCA model engineering through XML file according to claim 1, wherein: when the model is output, the SCA specification is converted into a specification file which can be identified by a corresponding code, the generated file with the emx suffix is compared through the specification file, data in the file with the emx suffix is converted and modified according to the SCA specification, finally whether the whole converted and modified model is a complete model engineering which accords with the SCA specification is verified through the specification file, and then the verified SCA model engineering which accords with the SCA specification is output.
6. The system for constructing SCA model engineering through XML files is characterized in that: for use in the method of one of claims 1 to 5; the system comprises a data extraction unit, a data conversion unit, a model generation unit, a model verification unit and a model output unit; wherein,
the data extraction unit is used for analyzing the XML file and extracting data needed by construction of the SCA model engineering from the XML file;
the data conversion unit is used for correspondingly dividing XML elements in the data into classes, attributes or methods in the SCA model;
the model generating unit is used for splicing the converted data into a file with a emx suffix which can be identified by an RSA modeling tool through codes, and the RSA modeling tool displays a corresponding UML model structure in a graphical interface after identifying the file;
the model verification unit is used for verifying the generated UML model and ensuring the integrity of the UML model;
the model output unit is used for exporting the UML model which is completed to be verified into SCA model engineering which accords with SCA specifications.
CN202410275455.8A 2024-03-12 2024-03-12 Method and system for constructing SCA model engineering through XML file Active CN117874393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410275455.8A CN117874393B (en) 2024-03-12 2024-03-12 Method and system for constructing SCA model engineering through XML file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410275455.8A CN117874393B (en) 2024-03-12 2024-03-12 Method and system for constructing SCA model engineering through XML file

Publications (2)

Publication Number Publication Date
CN117874393A true CN117874393A (en) 2024-04-12
CN117874393B CN117874393B (en) 2024-05-14

Family

ID=90583405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410275455.8A Active CN117874393B (en) 2024-03-12 2024-03-12 Method and system for constructing SCA model engineering through XML file

Country Status (1)

Country Link
CN (1) CN117874393B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110004862A1 (en) * 2009-07-01 2011-01-06 International Business Machines Corporation Generating a service component architecture (sca) module with service oriented architecture (soa) model elements
US20130139146A1 (en) * 2011-11-29 2013-05-30 Raytheon Company Optimized SCA CORBA descriptor for SCA CORBA descriptor files
US20130339403A1 (en) * 2012-06-13 2013-12-19 International Business Machines Corporation Interoperability format translation and transformation between ifc architectural design file and simulation file formats
CN104375842A (en) * 2014-12-05 2015-02-25 中国人民解放军理工大学 Adaptive software UML (unified modeling language) modeling and formal verification method
CN109375903A (en) * 2018-09-25 2019-02-22 湖南理工学院 SCA waveform components construction method, device, computer equipment and storage medium
US20190074982A1 (en) * 2015-03-25 2019-03-07 Sixscape Communications Pte Ltd Apparatus and method for managing digital certificates
CN109857389A (en) * 2019-01-14 2019-06-07 平安科技(深圳)有限公司 Model data generation method, device, computer equipment and storage medium
CN110020307A (en) * 2017-11-30 2019-07-16 阿里巴巴集团控股有限公司 A kind of method for drafting and device of client's end-view
CN117493309A (en) * 2023-11-21 2024-02-02 广东亿迅科技有限公司 Standard model generation method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110004862A1 (en) * 2009-07-01 2011-01-06 International Business Machines Corporation Generating a service component architecture (sca) module with service oriented architecture (soa) model elements
US20130139146A1 (en) * 2011-11-29 2013-05-30 Raytheon Company Optimized SCA CORBA descriptor for SCA CORBA descriptor files
US20130339403A1 (en) * 2012-06-13 2013-12-19 International Business Machines Corporation Interoperability format translation and transformation between ifc architectural design file and simulation file formats
CN104375842A (en) * 2014-12-05 2015-02-25 中国人民解放军理工大学 Adaptive software UML (unified modeling language) modeling and formal verification method
US20190074982A1 (en) * 2015-03-25 2019-03-07 Sixscape Communications Pte Ltd Apparatus and method for managing digital certificates
CN110020307A (en) * 2017-11-30 2019-07-16 阿里巴巴集团控股有限公司 A kind of method for drafting and device of client's end-view
CN109375903A (en) * 2018-09-25 2019-02-22 湖南理工学院 SCA waveform components construction method, device, computer equipment and storage medium
CN109857389A (en) * 2019-01-14 2019-06-07 平安科技(深圳)有限公司 Model data generation method, device, computer equipment and storage medium
CN117493309A (en) * 2023-11-21 2024-02-02 广东亿迅科技有限公司 Standard model generation method, device, equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
R DUARTE 等: "Case Study on a Software Communications Architecture Component for Hardware Acceleration", 《2011 FOURTH INTERNATIONAL CONFERENCE ON UBI-MEDIA COMPUTING》, 18 August 2011 (2011-08-18), pages 36 - 40 *
S KIM 等: "Dynamic Deployment of Software Defined Radio Components for Mobile Wireless Internet Applications", 《CONFERENCE PAPER》, 1 January 2003 (2003-01-01), pages 694 - 700 *
孟昭良: "基于组件技术的ERP系统分析与设计", 《信息科技》, 15 December 2014 (2014-12-15), pages 1 - 135 *
王昊 等: "基于Web技术的工作流图形化建模工具的设计与实现", 《万方数据》, 31 October 2014 (2014-10-31), pages 1 - 71 *

Also Published As

Publication number Publication date
CN117874393B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
US7673292B2 (en) Auto conversion of tests between different functional testing tools
Fritzson et al. The OpenModelica integrated modeling, simulation and optimization environment
CN109032577B (en) Data simulation method
KR101770292B1 (en) Computer-executable model reverse engineering method and apparatus performing the same
CN103605556A (en) Virtual test subject integrally-constructing system and method
CN111078555B (en) Test file generation method, system, server and storage medium
CN111782117B (en) Interface display method and device, storage medium and electronic device
WO2004012082A1 (en) Bi-directional programming system/method for program development
CN114756213B (en) Automatic code generation method and device for intelligent control system
CN115858336A (en) Test vector generation method and device, computing equipment and storage medium
CN109062816A (en) A kind of method, device and equipment of software test
CN117874393B (en) Method and system for constructing SCA model engineering through XML file
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN115470152B (en) Test code generation method, test code generation device, and storage medium
CN113239016B (en) Database design assistance apparatus and method
CN109471637A (en) The examination script debugging method of circuit diagram
CN113987764A (en) Simulation model construction method and system based on SCA domain description file
CN113448874A (en) Method and device for generating unit test script
CN110737431A (en) Software development method, development platform, terminal device and storage medium
CN117648833B (en) Simulink-to-SysML model generation method and device
JP5683209B2 (en) Client computer with automatic document generation function
CN115542882B (en) Controller interface configuration method and device
CN115373655B (en) Information protocol code automatic generation method based on standardized template
CN116339700A (en) Automatic user demand generation method for spacecraft control system based on C codes
JP3112623B2 (en) Program production support equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant