CN117874393B - 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
CN117874393B
CN117874393B CN202410275455.8A CN202410275455A CN117874393B CN 117874393 B CN117874393 B CN 117874393B CN 202410275455 A CN202410275455 A CN 202410275455A CN 117874393 B CN117874393 B CN 117874393B
Authority
CN
China
Prior art keywords
model
sca
data
file
uml
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.)
Active
Application number
CN202410275455.8A
Other languages
Chinese (zh)
Other versions
CN117874393A (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 according to 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 emx suffix which can be identified by an RSA modeling tool through codes, then 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 displaying a corresponding UML model structure in a graphical interface after the RSA modeling tool identifies 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 purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application 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 application, as presented in the figures, 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 a person skilled in the art 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: firstly, converting the SCA specification into a specification file which can be identified by a corresponding code, comparing the file with the generated emx suffix by the specification file, converting and modifying data in the file with the emx suffix according to the SCA specification, finally, verifying whether the whole converted and modified model is a complete model engineering which accords with the SCA specification by the specification file, and outputting the verified SCA model engineering which accords with the SCA specification.
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 displaying a corresponding UML model structure in a graphical interface after the RSA modeling tool identifies 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 above examples merely illustrate specific embodiments of the application, which are described in more detail and are not to be construed as limiting the scope of the 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 application, which fall within the protection scope of the 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 emx suffix which can be identified by an RSA modeling tool through codes, then 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, 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.
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 displaying a corresponding UML model structure in a graphical interface after the RSA modeling tool identifies 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 CN117874393A (en) 2024-04-12
CN117874393B true 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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8640085B2 (en) * 2009-07-01 2014-01-28 International Business Machines Corporation Generating a service component architecture (SCA) module with service oriented architecture (SOA) model elements
US8719813B2 (en) * 2011-11-29 2014-05-06 Raytheon Company Optimized SCA CORBA descriptor for SCA CORBA descriptor files
US8949292B2 (en) * 2012-06-13 2015-02-03 International Business Machines Corporation Interoperability format translation and transformation between IFC architectural design file and simulation file formats
WO2016153423A1 (en) * 2015-03-25 2016-09-29 Sixscape Communications Pte Ltd Apparatus and method for managing digital certificates

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375842A (en) * 2014-12-05 2015-02-25 中国人民解放军理工大学 Adaptive software UML (unified modeling language) modeling and formal verification method
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
Case Study on a Software Communications Architecture Component for Hardware Acceleration;R Duarte 等;《2011 Fourth International Conference on Ubi-Media Computing》;20110818;36-40 *
Dynamic Deployment of Software Defined Radio Components for Mobile Wireless Internet Applications;S Kim 等;《Conference paper》;20030101;694-700 *
基于Web技术的工作流图形化建模工具的设计与实现;王昊 等;《万方数据》;20141031;1-71 *
基于组件技术的ERP系统分析与设计;孟昭良;《信息科技》;20141215;1-135 *

Also Published As

Publication number Publication date
CN117874393A (en) 2024-04-12

Similar Documents

Publication Publication Date Title
US7673292B2 (en) Auto conversion of tests between different functional testing tools
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
CN116755669A (en) Low code development method and tool based on DSL language operation model
CN113239016B (en) Database design assistance apparatus and method
CN109471637A (en) The examination script debugging method of circuit diagram
CN110737431B (en) Software development method, development platform, terminal device and storage medium
CN113448874A (en) Method and device for generating unit test script
WO2008075087A1 (en) Code translator and method of automatically translating modelling language code to hardware language code
CN115373655B (en) Information protocol code automatic generation method based on standardized template
CN115542882B (en) Controller interface configuration method and device
JP5683209B2 (en) Client computer with automatic document generation function
JP3112623B2 (en) Program production support equipment
CN114936165A (en) Method for generating Apium script by annotation variation
CN116339700A (en) Automatic user demand generation method for spacecraft control system based on C codes

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
GR01 Patent grant