CN110688147A - Method for packing and analyzing metadata - Google Patents

Method for packing and analyzing metadata Download PDF

Info

Publication number
CN110688147A
CN110688147A CN201910931511.8A CN201910931511A CN110688147A CN 110688147 A CN110688147 A CN 110688147A CN 201910931511 A CN201910931511 A CN 201910931511A CN 110688147 A CN110688147 A CN 110688147A
Authority
CN
China
Prior art keywords
metadata
file
project
package
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.)
Pending
Application number
CN201910931511.8A
Other languages
Chinese (zh)
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.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft Information 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 Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN201910931511.8A priority Critical patent/CN110688147A/en
Publication of CN110688147A publication Critical patent/CN110688147A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for packing and analyzing metadata, which relates to the technical field of metadata and adopts the technical scheme that the method comprises the following steps: s10, storing the metadata in a file form, and using a management tool to perform life cycle management; s20, abstracting an engineering concept, and dividing metadata with similar business cohesion into an engineering; s30, encrypting and compressing the metadata files under the same project to form a metadata package, and completing the packaging operation; and S40, migrating and deploying the metadata package to the server, positioning the metadata package where the metadata is located according to the metadata request acquired by the server, and completing the analysis of the metadata. The method has the advantages of easy migration and deployment and high safety, is convenient for multi-version management, can avoid the direct exposure of the metadata used as the source code to a user, and can solve the problem that the metadata used for business modeling in the field of ERP systems is not easy to perform unified management, migration and deployment.

Description

Method for packing and analyzing metadata
Technical Field
The invention relates to metadata, in particular to a method for packaging and analyzing metadata.
Background
At present, most of business modeling languages of ERP system management software manufacturers are in a database storage form, and the development content of table preset data has three obvious disadvantages:
1. the development content is not suitable for version management;
2. development content is not suitable for migration, as the development of one metadata may need to associate more than ten tables, and correct migration can be performed only by association and selection in the more than ten tables, which is easy to cause problems;
3. the development content is easy to leak and be tampered, because the development content is stored in the database, and the data can be tampered by modifying the corresponding field as long as the user knows the table structure.
Disclosure of Invention
Aiming at the requirements and the defects of the prior art development, the invention provides a method for packaging and analyzing metadata, aiming at solving the problem that the metadata used for business modeling in the field of ERP systems is not easy to be uniformly managed, migrated and deployed.
The invention discloses a method for packing and analyzing metadata, which adopts the following technical scheme for solving the technical problems:
a method for packaging and analyzing metadata is provided, the implementation process of the method comprises:
s10, storing the metadata in a file form, and using a management tool to perform life cycle management;
s20, abstracting an engineering concept, and dividing metadata with similar business cohesion into an engineering;
s30, encrypting and compressing the metadata files under the same project to form a metadata package, and completing the packaging operation;
and S40, migrating and deploying the metadata package to the server, positioning the metadata package where the metadata is located according to the metadata request acquired by the server, and completing the analysis of the metadata.
In step S10, the metadata is stored in a file of json format;
the metadata file comprises a head node, a dependency relationship and a designer entity;
the head node is used for describing basic information of the metadata, including name, number, name space, affiliated business object, metadata type and internationalized information of the metadata;
the dependency relationship is used for recording metadata depended by the metadata, when one metadata is loaded, the function can be normally used only by loading the metadata depended on at the same time, and at the moment, all the metadata are loaded according to the dependency relationship node;
the designer entity is used as a carrier of a metadata designer interface, and can be displayed on the interface after being deserialized into an entity.
In step S20, when dividing the metadata with similar business cohesion into a project,
defining the range of different projects by using a folder, and identifying the projects by using special project files;
metadata that is divided into the same project can be of different types, with each project being a complete function.
Specifically, when the related metadata is stored in a json format file and the metadata with similar business cohesion is divided into a project,
the engineering file with suffix of 'csproj' is used as a carrier of engineering description, a special node of metadata engineering is added in the engineering file and used for recording basic information and dependency relationship of engineering, and all basic information of package name and version required in metadata packaging are also recorded in the engineering file.
In step S30, the specific execution step of performing the packing operation includes:
s31, triggering a packaging command in the development environment;
s32, transmitting the command to the server through the WebApi;
s33, the server analyzes the transmitted parameters, namely the engineering path, and recursively searches all files under the engineering path;
s34, each metadata type has a specific file suffix and is configured in a configuration file of the server, all metadata files under the project are identified according to all searched files under the project and the metadata type suffixes configured in the configuration files are matched according to the file suffixes, and the metadata files under the project are copied to a temporary directory under the project according to the directory structure of the metadata;
s35, the temporary directory is compressed into a compressed file suffixed with ". mdpkg", and the temporary directory is deleted.
Specifically, the related temporary directory name consists of an engineering name and a 36-bit GUID, is dynamically generated, and is deleted immediately after being packaged.
Furthermore, during the packaging operation, a manifest file named manifest is created, which is used to record which metadata are included in the package and which other metadata packages are depended on, the manifest file is packaged into a compressed file, and the metadata package is parsed, that is, the manifest file is parsed, so that the metadata list information in the metadata package is obtained.
In step S40, the specific operation of performing metadata parsing includes:
s41, registering an event in a server side starting service, when the service is started, recursively traversing all metadata packets under the server side, analyzing a manifest.
S42, triggering the service of acquiring the metadata by the front-end function;
s43, transmitting the command to the server through the WebApi;
s44, the server side caches the path of the metadata packet where the matched metadata is located in the pool according to the transmitted unique identifier of the metadata;
s45, loading the metadata package by stream loading, traversing the files in the package, matching the metadata file to be searched according to the unique metadata identification, and analyzing the metadata file to perform deserialization into an entity to return after the matching is successful.
In step S41, when the service is started, all metadata packets under the service are recursively traversed, all files with a suffix of ". mdpkg" are searched, the compressed files are directly read in a streaming manner, and the manifest.
Compared with the prior art, the method for packing and analyzing the metadata has the beneficial effects that:
1) firstly, sequentially performing file and engineering operations on metadata, then encrypting and compressing the metadata to finish packaging operation, finally migrating and deploying the compressed metadata package to a server side, wherein the server side does not decompress the metadata package, but directly performs analysis on the metadata according to a server side acquisition request so as to prevent the metadata serving as a source code from being directly exposed to a user and from being tampered;
2) the method has the advantages of easy migration and deployment and high safety, is convenient for multi-version management, and can solve the problem that the metadata used for business modeling in the field of ERP systems is not well uniformly managed, migrated and deployed.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
In order to make the technical solutions, technical problems to be solved, and technical effects of the present invention more clearly apparent, the technical solutions of the present invention are described below in detail and completely with reference to specific embodiments, and it is obvious that the described embodiments are only a part of embodiments of the present invention, but not all embodiments.
The first embodiment is as follows:
with reference to fig. 1, this embodiment provides a method for metadata packaging and parsing, where the implementation process of the method includes:
s10, storing the metadata in a file form, and using a Git management tool to manage the life cycle.
Metadata is a carrier of business modeling and is a source code.
In this embodiment, the metadata is stored in a json-formatted file. Unlike the metadata in the form of table preset data, the metadata after being documented has the advantages of easy migration, easy version management and the like, and migration between different development servers only needs simple file copying.
The metadata file comprises a head node, a dependency relationship and a designer entity;
the head node is used for describing basic information of the metadata, including name, number, name space, affiliated business object, metadata type and internationalized information of the metadata;
the dependency relationship is used for recording metadata depended by the metadata, when one metadata is loaded, the function can be normally used only by loading the metadata depended on at the same time, and at the moment, all the metadata are loaded according to the dependency relationship node;
the designer entity is used as a carrier of a metadata designer interface, and can be displayed on the interface after being deserialized into an entity.
And S20, abstracting an engineering concept, and dividing the metadata with similar business cohesion into one engineering.
In this embodiment, when metadata with similar business cohesion is divided into a project,
defining the range of different projects by using a folder, and identifying the projects by using special project files;
metadata that is divided into the same project can be of different types, with each project being a complete function.
When metadata is stored in a json format file and the metadata with similar business cohesion is divided into a project, a project file with a suffix of 'csproj' is used as a carrier of project description, a special node of the metadata project is added in the project file and used for recording basic information and dependency relationship of the project, and package names and version basic information required when the metadata is packaged are also recorded in the project file. The dependency relationship of the engineering is actually the dependency relationship among the metadata, because each metadata depends on one engineering, the metadata under each engineering can be packaged into a metadata package, and the metadata package is the minimum granularity of migration deployment, so that the dependency relationship between the packages needs to be known, so that when the metadata package is migrated, all related metadata packages can be migrated together according to the dependency relationship among the packages, and the dependency between the metadata can be found, so that the metadata dependency indirectly causes the dependency between the metadata packages, namely, the interdependence relationship among the relied engineering.
S30, encrypting and compressing the metadata files under the same project to form a metadata package, and completing the packaging operation, wherein the specific execution steps comprise:
s31, triggering a packaging command in the development environment;
s32, transmitting the command to the server through the WebApi;
s33, the server analyzes the transmitted parameters, namely the engineering path, and recursively searches all files under the engineering path;
s34, each metadata type has a specific file suffix and is configured in a configuration file of the server, all metadata files under the project are identified according to all searched files under the project and the metadata type suffixes configured in the configuration files are matched according to the file suffixes, and the metadata files under the project are copied to a temporary directory under the project according to the directory structure of the metadata; the related temporary directory name consists of an engineering name and a 36-bit GUID, is dynamically generated and can be immediately deleted after being packaged;
s35, the temporary directory is compressed into a compressed file suffixed with ". mdpkg", and the temporary directory is deleted.
In this embodiment, during the packaging operation, a manifest file named manifest is also created, where the manifest file is used to record which metadata is included in the package and which other metadata packages depend on, the manifest file is packaged into a compressed file, and the metadata package is analyzed, that is, the manifest file is analyzed, so as to obtain metadata list information in the metadata package.
S40, migrating and deploying the metadata package to the server, positioning the metadata package where the metadata is located according to the metadata request acquired by the server, and completing the analysis of the metadata, wherein the specific operation steps comprise:
s41, registering an event in a server side starting service, when the service is started, recursively traversing all metadata packets under the server side, analyzing a manifest.
S42, triggering the service of acquiring the metadata by the front-end function;
s43, transmitting the command to the server through the WebApi;
s44, the server side caches the path of the metadata packet where the matched metadata is located in the pool according to the transmitted unique identifier of the metadata;
s45, loading the metadata package by stream loading, traversing the files in the package, matching the metadata file to be searched according to the unique metadata identification, and analyzing the metadata file to perform deserialization into an entity to return after the matching is successful.
In step S41 of this embodiment, when the service is started, all metadata packets under the service are recursively traversed, all files with a suffix of ". mdpkg" are searched, the compressed files are directly read in a streaming manner, and the manifest.
In summary, the method for packaging and analyzing the metadata has the advantages of easy migration and deployment and high safety, is convenient for multi-version management, can avoid the metadata serving as the source code from being directly exposed to a user, and can solve the problem that the metadata used for business modeling in the field of ERP systems is not easy to be uniformly managed, migrated and deployed.
The principles and embodiments of the present invention have been described in detail using specific examples, which are provided only to aid in understanding the core technical content of the present invention. Based on the above embodiments of the present invention, those skilled in the art should make any improvements and modifications to the present invention without departing from the principle of the present invention, and therefore, the present invention should fall into the protection scope of the present invention.

Claims (9)

1. A method for packaging and parsing metadata is characterized in that the method is realized by the following steps:
s10, storing the metadata in a file form, and using a management tool to perform life cycle management;
s20, abstracting an engineering concept, and dividing metadata with similar business cohesion into an engineering;
s30, encrypting and compressing the metadata files under the same project to form a metadata package, and completing the packaging operation;
and S40, migrating and deploying the metadata package to the server, positioning the metadata package where the metadata is located according to the metadata request acquired by the server, and completing the analysis of the metadata.
2. The method for packaging and parsing metadata according to claim 1, wherein in step S10, the metadata is stored in json format;
the metadata file comprises a head node, a dependency relationship and a designer entity;
the head node is used for describing basic information of the metadata, including name, number, name space, affiliated business object, metadata type and internationalized information of the metadata;
the dependency relationship is used for recording metadata depended by the metadata, when one metadata is loaded, the function can be normally used only by loading the metadata depended on at the same time, and at the moment, all the metadata are loaded according to the dependency relationship node;
the designer entity is used as a carrier of a metadata designer interface, and can be displayed on the interface after being deserialized into an entity.
3. The method of claim 2, wherein in step S20, when dividing the metadata with similar business cohesion into a project,
defining the range of different projects by using a folder, and identifying the projects by using special project files;
metadata that is divided into the same project can be of different types, with each project being a complete function.
4. The method of claim 3, wherein when the metadata is stored in a json file and the metadata with similar business cohesion is divided into a project,
the engineering file with suffix of 'csproj' is used as a carrier of engineering description, a special node of metadata engineering is added in the engineering file and used for recording basic information and dependency relationship of engineering, and all basic information of package name and version required in metadata packaging are also recorded in the engineering file.
5. The method for packaging and parsing metadata according to claim 1, wherein in step S30, the step of performing the packaging operation specifically includes:
s31, triggering a packaging command in the development environment;
s32, transmitting the command to the server through the WebApi;
s33, the server analyzes the transmitted parameters, namely the engineering path, and recursively searches all files under the engineering path;
s34, each metadata type has a specific file suffix and is configured in a configuration file of the server, all metadata files under the project are identified according to all searched files under the project and the metadata type suffixes configured in the configuration files are matched according to the file suffixes, and the metadata files under the project are copied to a temporary directory under the project according to the directory structure of the metadata;
s35, the temporary directory is compressed into a compressed file suffixed with ". mdpkg", and the temporary directory is deleted.
6. The method of claim 5, wherein the temporary directory name is dynamically generated from project name + 36-bit GUID and is deleted immediately after packaging.
7. The method of claim 5, wherein during the packaging operation, a manifest file named manifest json is created, the manifest file is used to record which metadata is included in the package and which other metadata packages are depended on, the manifest file is packaged into a compressed file, and the metadata package is parsed, so as to obtain the metadata list information in the metadata package.
8. The method of claim 7, wherein in step S40, the specific operation step of performing metadata parsing includes:
s41, registering an event in a server side starting service, when the service is started, recursively traversing all metadata packets under the server side, analyzing a manifest.
S42, triggering the service of acquiring the metadata by the front-end function;
s43, transmitting the command to the server through the WebApi;
s44, the server side caches the path of the metadata packet where the matched metadata is located in the pool according to the transmitted unique identifier of the metadata;
s45, loading the metadata package by stream loading, traversing the files in the package, matching the metadata file to be searched according to the unique metadata identification, and analyzing the metadata file to perform deserialization into an entity to return after the matching is successful.
9. The method of claim 8, wherein in step S41, when the service is started, the service recursively traverses all metadata packets under the service, finds all files with a suffix of ". mdpkg", directly reads the compressed files in a streaming manner, and parses a manifest.
CN201910931511.8A 2019-09-29 2019-09-29 Method for packing and analyzing metadata Pending CN110688147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910931511.8A CN110688147A (en) 2019-09-29 2019-09-29 Method for packing and analyzing metadata

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910931511.8A CN110688147A (en) 2019-09-29 2019-09-29 Method for packing and analyzing metadata

Publications (1)

Publication Number Publication Date
CN110688147A true CN110688147A (en) 2020-01-14

Family

ID=69110951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910931511.8A Pending CN110688147A (en) 2019-09-29 2019-09-29 Method for packing and analyzing metadata

Country Status (1)

Country Link
CN (1) CN110688147A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132533A (en) * 2020-08-26 2020-12-25 山东浪潮通软信息科技有限公司 Method for searching dependence by self-defined development content
CN113596104A (en) * 2021-07-05 2021-11-02 武汉理工大学 Data transmission method and device for mobile robot and cloud server
CN115269495A (en) * 2022-06-18 2022-11-01 知学云(北京)科技股份有限公司 Service scheme metadata processing method and system based on aPaaS platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008052908A2 (en) * 2006-11-01 2008-05-08 Nokia Siemens Networks Gmbh & Co. Kg Method and system for optimizing metadata of audio-video asset in television network
CN103067461A (en) * 2012-12-18 2013-04-24 曙光信息产业(北京)有限公司 Metadata management system of document and metadata management method thereof
CN103473108A (en) * 2013-08-12 2013-12-25 福建富士通信息软件有限公司 Java code generating method
CN109522281A (en) * 2018-11-29 2019-03-26 郑州云海信息技术有限公司 A kind of method of Distributed File System Data rapid copy

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008052908A2 (en) * 2006-11-01 2008-05-08 Nokia Siemens Networks Gmbh & Co. Kg Method and system for optimizing metadata of audio-video asset in television network
CN103067461A (en) * 2012-12-18 2013-04-24 曙光信息产业(北京)有限公司 Metadata management system of document and metadata management method thereof
CN103473108A (en) * 2013-08-12 2013-12-25 福建富士通信息软件有限公司 Java code generating method
CN109522281A (en) * 2018-11-29 2019-03-26 郑州云海信息技术有限公司 A kind of method of Distributed File System Data rapid copy

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
佚名: "[asp.net core]project.json(1)", 《HTTPS://WWW.SHUZHIDUO.COM/A/LPDOYQPBJ3/》 *
大秦剑侠: "自动打包客户化开发的元数据和class并部署", 《HTTPS://BLOG.CSDN.NET/WISER/ARTICLE/DETAILS/4301109》 *
蔡涛等: "NVMMDS-一种面向非易失存储器的元数据管理方法", 《计算机研究与发展》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132533A (en) * 2020-08-26 2020-12-25 山东浪潮通软信息科技有限公司 Method for searching dependence by self-defined development content
CN112132533B (en) * 2020-08-26 2024-03-22 浪潮通用软件有限公司 Method for searching dependence of custom development content
CN113596104A (en) * 2021-07-05 2021-11-02 武汉理工大学 Data transmission method and device for mobile robot and cloud server
CN115269495A (en) * 2022-06-18 2022-11-01 知学云(北京)科技股份有限公司 Service scheme metadata processing method and system based on aPaaS platform
CN115269495B (en) * 2022-06-18 2023-08-08 知学云(北京)科技股份有限公司 Business scheme metadata processing method and system based on aPaaS platform

Similar Documents

Publication Publication Date Title
US10621211B2 (en) Language tag management on international data storage
CN110688147A (en) Method for packing and analyzing metadata
CN108614702B (en) Byte code optimization method and device
CN109032631B (en) Application program patch package obtaining method and device, computer equipment and storage medium
CN101308471B (en) Method and device for data restoration
CN110083360B (en) Compiling method, device, equipment and storage medium of application program code
CN105205053A (en) Method and system for analyzing database incremental logs
CN111158741B (en) Method and device for monitoring dependency relationship change of service module on third party class library
CN109634591B (en) File processing method and device
CN112099880B (en) Method and system for reducing application program driven by scene
US9658845B2 (en) Generating a where-used objects list for updating data
CN113419766A (en) Method, device, equipment and storage medium for intelligently updating program logic
US9411618B2 (en) Metadata-based class loading using a content repository
CN112286543B (en) Application service deployment method and device
CN111352631B (en) Interface compatibility detection method and device
CN113792026B (en) Method and device for deploying database script and computer-readable storage medium
JP5337187B2 (en) Migration test support system, migration test support program, migration test support method
US7506308B2 (en) System and method for using a split-directory structure for software development
CN114064111A (en) Management method and equipment for version information of deployment package
CN114816816A (en) Collapse stack information processing method, device, equipment and storage medium
CN114115982A (en) Code issuing method, device, equipment and storage medium
CN113536316A (en) Detection method and device for component dependence information
CN112699129A (en) Data processing system, method and device
CN111273944B (en) Method and device for generating program file and uploading program file to code warehouse
US11256602B2 (en) Source code file retrieval

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200114