CN110765218B - Relational database persistence configuration method for composite attribute data in CIM (common information model) class - Google Patents

Relational database persistence configuration method for composite attribute data in CIM (common information model) class Download PDF

Info

Publication number
CN110765218B
CN110765218B CN201911024874.XA CN201911024874A CN110765218B CN 110765218 B CN110765218 B CN 110765218B CN 201911024874 A CN201911024874 A CN 201911024874A CN 110765218 B CN110765218 B CN 110765218B
Authority
CN
China
Prior art keywords
feature
class
type
key
attribute
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
CN201911024874.XA
Other languages
Chinese (zh)
Other versions
CN110765218A (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.)
Shandong University
Original Assignee
Shandong University
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 University filed Critical Shandong University
Priority to CN201911024874.XA priority Critical patent/CN110765218B/en
Publication of CN110765218A publication Critical patent/CN110765218A/en
Application granted granted Critical
Publication of CN110765218B publication Critical patent/CN110765218B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24573Query processing with adaptation to user needs using data annotations, e.g. user-defined metadata

Landscapes

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

Abstract

The invention relates to the technical field of data transmission, in particular to a relational database persistence configuration method of composite attribute data in CIM class, which comprises the following steps: s10, analyzing whether the contained feature items are key features or not for all the composite types in the CIM, and calibrating key feature marks for the key features; s20, mapping the attribute with the value type of the composite type in each CIM class to a field of a character string type in a data table corresponding to the class, wherein the field is used for storing all information of the attribute; s30, reading a feature in the composite type; s40, judging whether the current feature is calibrated to be a key feature mark; if not, no treatment is carried out; if yes, mapping the characteristic to a field of one data table corresponding to the class; and S50, judging whether the traversal is finished or not, if not, turning to S30 to continue reading a feature in the conforming type, and if so, ending the persistent configuration of the current class. The method has the advantages of effectively improving the effectiveness of data storage, application convenience and the like.

Description

Relational database persistence configuration method for composite attribute data in CIM (common information model) class
Technical Field
The invention relates to the technical field of data transmission, in particular to a relation of composite attribute data in CIM class
A persistent configuration method for a database.
Background
Object/relationship Mapping (ORM) is generated as Object-oriented software development methods develop. The object-oriented development method is the mainstream development method in the current enterprise-level application development environment, and the relational database is the mainstream data storage system for permanently storing data in the enterprise-level application environment. The object and the relation data are two expression forms of the business entity, the business entity is expressed as an object in the memory, and is expressed as the relation data in the database. The objects in the memory have association and inheritance relationships, and in the database, the relationship data cannot directly express many-to-many association and inheritance relationships. Therefore, it is necessary to use object-relational mapping (ORM) to establish the storage rule of object data in the database and implement the mapping of program objects to relational database data.
CIM: common Information Model, IEC 61970 standard specifies a well-abstracted Common Information Model that provides for power system management and Information exchange. The information model adopts an object-oriented modeling mode, establishes abstract description of a real object of the power system as public semantics of information exchange, and defines information such as class names, class attribute names, data types of the class attributes, names and cardinality of class-class association and the like used in the information exchange, and all information exchange parties are based on unified information description, thereby effectively avoiding semantic confusion.
The power system is a very complex system and accordingly the CIM model describing the grid data is also very complex. The CIM version 17v23 issued in 2017 contains 1425 classes and the association relations of the classes for 1272.
After the IEC 61970 standard is widely applied, the mainstream power enterprise automation and informatization system adopts a Common Information Model (CIM) and power grid model data constructed by an object-oriented modeling technology at a program layer, and adopts a relational database with higher reliability and maturity at a storage end (a persistence layer). In this process, the mapping specifically adopted by the ORM, i.e., the relational database persistence method of the object data, plays a crucial role in the final object access efficiency and convenience. In the general processing mode of the object-oriented type, attribute and relational mapping relational database persistent ORM, the type is mapped to a table, the attribute is mapped to a field, and the incidence relation is mapped to the field at multiple ends or recorded by using an incidence table according to one-to-many or many-to-many.
In the ORM, a complex type (Compound) exists as a data type of a specific attribute in the CIM class, similar to the definition of a Structure (Structure) in an algorithm language, and in the ORM process, an existing mapping scheme adopts a form of mapping as a class built-in association or expanding into a plurality of attributes according to a Structure, which has some inconvenience for an application program.
For example, there is a class Crew (staff), which has a status attribute, and the data type of the class is a composite type (Compound), and if the built-in association processing is adopted, the composite type attribute is equivalent to a general class due to the existence of a plurality of attributes, and is mapped into a table, and then the composite type attribute is converted into the association processing. For Status attribute processing of the Crew type, namely, processing of Status is equivalent to association, processing is performed according to a one-to-one association mapping mode of ORM, each Crew object creates a Status object associated with the Status object, the Status objects are distributed in different data tables, and when the number of objects is increased and Crew object data is accessed in batch, the data access speed is slowed down due to multi-level association. Data access speed is further affected if there are more nested properties within Compound that are also of a certain Compound type. If the structural formula is expanded into a plurality of attributes, when the attributes contained in the composite type are expanded to be used as the attributes of the current class for processing, the attributes contained in the status are expanded for the status attribute processing of the Crew class, and when the status contains four attributes of dateTime, release, return and value, the status attribute of the Crew is actually mapped to four fields corresponding to status. The processing mode has more fields corresponding to the flattened attributes and is not convenient and fast to access. If the nested attribute is also of Compound type, the number of fields of the finally mapped data table is excessive, and certain influence is caused on the management of the database.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a method for persistently configuring the relational database of the composite attribute data in the CIM class, which can effectively improve the effectiveness of data storage and the convenience of application.
In order to realize the functions, the invention adopts the following technical scheme:
a relational database persistence configuration method of composite attribute data in CIM classes is characterized by comprising the following steps:
s10, for the compound type in CIM, analyzing whether the contained feature item is the key feature, and for the key feature, calibrating the key feature mark, the calibration method is to set and create the additional attribute named key feature through the mode editing tool, and set the additional attribute to the corresponding feature, for example, the feature status contained in Crew.status is the feature of the most concerned state value of the user, the mode editing tool is used to additionally describe the attribute "key feature" for status, the value of key feature is set to true, namely completing the calibration of the specified feature as the key feature, and other specified state time (dateTime), annotation (mark) and the like are entered, and the method is only used when the data needs to be analyzed in detail; similarly, mac, email1 features such as electronic Address, name of TownDetail, and the like; the packing mode is in a JSON format by default. . The additional attribute is information of self-defined meta-mode level which can add additional description to the mode element and is beyond the UML built-in mode element description information;
s20, mapping the attribute of which the value type is the compound type in each CIM class to a field of a character string type in a data table corresponding to the class, wherein the field is used for storing all information of the attribute, namely, all characteristic values in the compound type are packaged and stored, and traversing the characteristic;
s30, reading a feature in the composite type;
s40, judging whether the current feature is calibrated to be a key feature mark; if the current characteristic is not calibrated as the key characteristic, the current characteristic is not processed; if the current characteristic is calibrated as the key characteristic, mapping the characteristic to a field of a data table corresponding to the class;
and S50, judging whether the traversal is finished or not, if not, turning to S30, continuously reading a feature in the conforming type, and if so, ending the traversal, and ending the persistent configuration of the current class.
The calibration of the key features of the present invention is generally the frequency with which the features are expected to be used directly, most frequently, in a set of features when used by a user, according to which features are used directly.
When the key features are calibrated, two modes of system automatic calibration and manual calibration can be adopted, wherein when the system is automatic, the system presets and selects one feature with the highest frequency as the key features according to the statistics of the frequency of the features in the composite type attributes used in the system; a manual calibration method can also be adopted, and specifically, a designer can plan and select key features for calibration according to the specific use condition of a user.
The invention transforms the attribute value of the type of Compound into an integral description string, which corresponds to a single field in a data table; meanwhile, by analyzing the data description key points of the corresponding compound types, the key features in the compound types are calibrated, and the calibrated features are expanded and stored into corresponding fields of the data table (for distinguishing the member attributes in the general class from the member attributes in the compound types, the member attributes in the general class are called attributes, and the attributes in the compound types are called features). By adopting the method, the invention not only ensures the integrity of storage, can read the whole description string when the application needs all the characteristics contained in complete Compound, but also can quickly obtain the key characteristic data of Compound attributes under the condition that most application scenes use the 'key' characteristics, thereby effectively improving the effectiveness of data storage and the convenience of application.
Drawings
FIG. 1 is a flow chart of a relational database persistence configuration method for composite attribute data in CIM classes.
Detailed Description
The invention will be further described with reference to the accompanying drawings in which:
as shown in the figure, the method for persistently configuring the relational database of the compound attribute data in the CIM class is characterized by comprising the following steps of:
a relational database persistence configuration method of composite attribute data in CIM classes is characterized by comprising the following steps:
s10: for a composite type in CIM, analyzing whether a contained feature item is a key feature, and calibrating a key feature mark for the key feature, wherein the calibration method is to set and create an additional attribute named keyfeature through a mode editing tool and set the additional attribute to the corresponding feature, for example, a feature status contained in Crew.status is a feature of a state value most concerned by a user, a time additional description attribute "keyfeature" is obtained by using the mode editing tool, the value of keyfeature is set to be true, namely, the calibration of the specified feature as the key feature is completed, other specified state time (date) is entered, and a comment (mark) is used only when data needs to be analyzed in detail; similarly, mac, email1 features such as electronic Address, name of TownDetail, and the like; the packing mode is in a JSON format by default. . The additional attribute is information of self-defined meta-mode level which can add additional description to the mode element and is beyond the UML built-in mode element description information;
s20, mapping the attribute of which the value type is the compound type in each CIM class to a field of a character string type in a data table corresponding to the class, wherein the field is used for storing all information of the attribute, namely, all characteristic values in the compound type are packaged and stored, and traversing the characteristic;
s30, reading a feature in the composite type;
s40, judging whether the current feature is calibrated to be a key feature mark; if the current characteristic is not calibrated as the key characteristic, the current characteristic is not processed; if the current characteristic is calibrated as the key characteristic, mapping the characteristic to a field of a data table corresponding to the class;
and S50, judging whether the traversal is finished or not, if not, turning to S30 to continue reading a feature in the conforming type, and if so, ending the persistent configuration of the current class.
The calibration of the key features of the present invention is generally the frequency with which the features are expected to be used directly, most frequently, in a set of features when used by a user, according to which features are used directly.
The invention transforms the value of the attribute with the type of Compound type (Compound) into an integral description string which corresponds to a single field in a data table; meanwhile, by analyzing the data description key points of the corresponding compound types, the key features in the compound types are calibrated, and the calibrated features are expanded and stored into corresponding fields of the data table (for distinguishing the member attributes in the general class from the member attributes in the compound types, the member attributes in the general class are called attributes, and the attributes in the compound types are called features). By adopting the method, the invention not only ensures the integrity of storage, can read the whole description string when the application needs all the characteristics contained in complete Compound, but also can quickly obtain the key characteristic data of Compound attributes under the condition that most application scenes use the 'key' characteristics, thereby effectively improving the effectiveness of data storage and the convenience of application. The method realizes the persistent configuration of the attribute with the value type as the composite type in the CIM class by setting the specified characteristic as the key characteristic in the composite type, listing the composite type characteristic needing to be displayed and persisted in a list mode and combining the integral object storage of the class attribute with the value type as the composite type. The relational persistence built by the configuration can facilitate the integral access of the attribute and the extraction of the key characteristic of the attribute. The persistent configuration method effectively solves the application problem caused by the fact that the attribute with the value type being the composite type is stored as a small object or too many fields at present.

Claims (1)

1. A relational database persistence configuration method of composite attribute data in CIM classes is characterized in that: the method comprises the following steps:
s10, analyzing whether the contained feature items are key features or not for the composite type in the CIM, and calibrating key feature marks for the key features; calibrating the key features according to the frequency of the features being directly used; when the key features are calibrated, presetting and selecting one feature with the highest frequency as the key features according to the statistics of the frequency of the features in the composite type attributes used in the system;
s20, mapping the attribute of which the value type is the compound type in each CIM class to a field of a character string type in a data table corresponding to the class, wherein the field is used for storing all information of the attribute, namely, all characteristic values in the compound type are packaged and stored, and traversing the characteristic;
s30, reading a feature in the composite type;
s40, judging whether the current feature is calibrated to be a key feature mark; if the current characteristic is found not to be calibrated as the key characteristic, the processing is not carried out; if the current characteristic is found to be calibrated as the key characteristic, mapping the characteristic to a field of one data table corresponding to the class;
and S50, judging whether the traversal is finished or not, if not, turning to S30, continuously reading a feature in the conforming type, and if so, ending the traversal, and ending the persistent configuration of the current class.
CN201911024874.XA 2019-10-25 2019-10-25 Relational database persistence configuration method for composite attribute data in CIM (common information model) class Active CN110765218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911024874.XA CN110765218B (en) 2019-10-25 2019-10-25 Relational database persistence configuration method for composite attribute data in CIM (common information model) class

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911024874.XA CN110765218B (en) 2019-10-25 2019-10-25 Relational database persistence configuration method for composite attribute data in CIM (common information model) class

Publications (2)

Publication Number Publication Date
CN110765218A CN110765218A (en) 2020-02-07
CN110765218B true CN110765218B (en) 2022-05-13

Family

ID=69333695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911024874.XA Active CN110765218B (en) 2019-10-25 2019-10-25 Relational database persistence configuration method for composite attribute data in CIM (common information model) class

Country Status (1)

Country Link
CN (1) CN110765218B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279901A (en) * 2013-05-28 2013-09-04 北京中电普华信息技术有限公司 Method and device for converting CIM (Common Information Model) into logic model
CN104765694A (en) * 2015-03-18 2015-07-08 广东电网有限责任公司电力科学研究院 CIM memory bank loading method capable of configuring combination value
CN105630500A (en) * 2015-12-25 2016-06-01 江苏东大金智信息系统有限公司 CIM object model for data processing and programming frame thereof
CN105956054A (en) * 2016-04-27 2016-09-21 国家电网公司 Relational database-based power grid CIM model data storage method
CN108446396A (en) * 2018-03-26 2018-08-24 电子科技大学 A kind of electric power data processing method based on modified CIM model
CN109492055A (en) * 2018-08-29 2019-03-19 云南电网有限责任公司信息中心 A method of power grid big data warehouse is established based on CIM model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8392174B2 (en) * 2006-08-07 2013-03-05 International Characters, Inc. Method and apparatus for lexical analysis using parallel bit streams

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279901A (en) * 2013-05-28 2013-09-04 北京中电普华信息技术有限公司 Method and device for converting CIM (Common Information Model) into logic model
CN104765694A (en) * 2015-03-18 2015-07-08 广东电网有限责任公司电力科学研究院 CIM memory bank loading method capable of configuring combination value
CN105630500A (en) * 2015-12-25 2016-06-01 江苏东大金智信息系统有限公司 CIM object model for data processing and programming frame thereof
CN105956054A (en) * 2016-04-27 2016-09-21 国家电网公司 Relational database-based power grid CIM model data storage method
CN108446396A (en) * 2018-03-26 2018-08-24 电子科技大学 A kind of electric power data processing method based on modified CIM model
CN109492055A (en) * 2018-08-29 2019-03-19 云南电网有限责任公司信息中心 A method of power grid big data warehouse is established based on CIM model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"基于CIM/CIS的省地调电网模型拼接与数据交换";马强、荆铭、梁成辉;《电力自动化设备》;20120610;第32卷(第06期);第116-119页 *
A. Toueir ; J. Broisin ; M. Sibilla."Toward configurable performance monitoring:Introduction to mathematical support for metric representation and instrumentation for the CIM metricmodel".《 2011 5th International DMTF Academic Alliance Workshop on Systems and Virtualization Management: Standards and the Cloud (SVM)》.2011,第1-6页. *
CIM/E模式版本管理和映射方法;曹阳 等;《电力系统自动化》;20150425;第39卷(第08期);第149-154页 *

Also Published As

Publication number Publication date
CN110765218A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
US8190648B1 (en) Method and system for the storage and use of engineering modeling alternatives with unitized data
TWI709866B (en) Equipment model identification method, device and processing equipment
US8782081B2 (en) Query template definition and transformation
EP1482432A2 (en) System and method of modelling of a multi-dimensional data source in an entity-relationship model
CN109753537A (en) A kind of interactive data moving method from relation data to diagram data
EP2463790A1 (en) Manipulation of elements and their attributes in graphical user interfaces
AU2020298056B2 (en) Autolayout of visualizations based on graph data
CN108304463A (en) A kind of data managing method and its database application component for database
CN101493839A (en) Method for generating general-purpose test document
US20170193036A1 (en) Framework for joining datasets
WO2019153514A1 (en) Service system dynamic generation method and apparatus, computer device, and storage medium
CN103778239A (en) Multi-database data management method and system
US20230394023A1 (en) Automated feature engineering for multidimensional data
US10776351B2 (en) Automatic core data service view generator
US20180018372A1 (en) Semantic tagging of nodes
CN104951565B (en) XM (extensible messaging client) L (extensible markup language) configuration maintenance method and system based on memory database
CN116627418A (en) Multi-level form interface visual generation method and device based on recursion algorithm
CN117195818B (en) Power supply design command generation method and device, electronic equipment and storage medium
CN110765218B (en) Relational database persistence configuration method for composite attribute data in CIM (common information model) class
US20140149093A1 (en) Modeling content data for generating information models
CN115981625A (en) Extensible power system wiring diagram interface modeling method and system
CN116129460A (en) Drawing analysis method, device, equipment and storage medium
CN115168657A (en) Data storage method, device and storage medium
CN113343409A (en) Visual configuration method and device based on virtual equipment
US8910183B2 (en) Access to context information in a heterogeneous application environment

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