CN109684329B - Resource management method based on data center equipment - Google Patents

Resource management method based on data center equipment Download PDF

Info

Publication number
CN109684329B
CN109684329B CN201811528151.9A CN201811528151A CN109684329B CN 109684329 B CN109684329 B CN 109684329B CN 201811528151 A CN201811528151 A CN 201811528151A CN 109684329 B CN109684329 B CN 109684329B
Authority
CN
China
Prior art keywords
resource
definition
dynamic
field
database
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
CN201811528151.9A
Other languages
Chinese (zh)
Other versions
CN109684329A (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.)
Gosuncn Technology Group Co Ltd
Original Assignee
Gosuncn Technology Group 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 Gosuncn Technology Group Co Ltd filed Critical Gosuncn Technology Group Co Ltd
Priority to CN201811528151.9A priority Critical patent/CN109684329B/en
Publication of CN109684329A publication Critical patent/CN109684329A/en
Application granted granted Critical
Publication of CN109684329B publication Critical patent/CN109684329B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention belongs to the technical field of resource management, and particularly relates to a resource management method based on data center equipment, which is characterized in that according to a MySQL dynamic form, dynamic form database table definition design, dynamic form database table field definition design and dynamic form database expansion association table definition design are carried out, and dynamic configuration of dynamic form attributes and relations is realized; the visual configuration of the dynamic form can be realized by integrating Spring and Freemarker through Java technology, the entry of the form, the form field and the form type in the dynamic form is supported, the form is dynamically created, the product reusability is high, and the requirement change of a user is met.

Description

Resource management method based on data center equipment
Technical Field
The invention belongs to the technical field of resource management, and particularly relates to a resource management method based on data center equipment.
Background
The existing resource management technology mainly comprises a MySQL database technology and a Java object-oriented language technology. The MySQL database is a relational database management system, converts real objects into model objects based on scene requirements, stores data in different tables in a specific structured mode, supports a large database and a 5000-ten-thousand-record data warehouse, and is widely applied in the industry due to the advantages of free sources, cross-platform and use of a standard SQL data language form. The technology uses MySQL to design a table structure, and realizes complex relation storage. The technology is mainly applied to a service scene of operation and maintenance management of a data center, data of various devices in the data center are required to be maintained, and the data are classified according to the space physical positions of the devices and the types of the devices, different devices have different attributes, but the dynamic attributes of the devices of the same type are common. According to the service characteristics, the problems of dynamic attribute storage and display of the equipment need to be solved by means of a database technology, the equipment is defined as a resource object, and an established E-R graph relation table is shown in figure 1. As can be seen from fig. 1: 1. designing a universal attribute field of the resource by taking the resource object table as a main table T1; 2. designing a resource building ID in a T1 table as an external key of a T2 resource building table, and defining the resource building ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1; 3. designing a resource type ID in a T1 table as an external key of a T3 table, and defining the resource type ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1; 4. establishing a resource object expansion table T4, defining different attribute fields for each type according to business requirements, designing a resource type ID in a T4 table as an external key of a resource type table T3, and defining the corresponding relation of n to 1, wherein n is a positive integer greater than 1. In summary, the key point of the design of the scheme is the bold part in the figure, and a corresponding expansion table is established according to the resource type on the basis of the main table for data maintenance.
The Java object-oriented language technology is an object-oriented programming language, has the characteristics of simplicity, object orientation, distribution, robustness, safety, platform independence and portability, multithreading, dynamics and the like, and can write desktop application programs, WEB application programs, distributed system and embedded system application programs and the like. The technology uses Spring as a basic frame and integrates Freemarker as a page template engine to realize a dynamic form page.
The method has the disadvantages that the MySQL database design technology in the prior art is applicable to the condition that the data volume of the project is small or the equipment type is small, but as the types of the equipment types are increased, the corresponding extension tables are required to be added for each equipment type, and the attributes of the tables cannot be adapted along with the change of the requirements, so that certain maintenance cost exists.
Disclosure of Invention
The invention aims to provide a resource management method based on data center equipment, which aims to solve the technical problems that the table attribute in the existing MySQL database design technology cannot be adapted along with the change of requirements, and the maintenance cost is high.
The invention is realized by the following technical scheme:
a resource management method based on data center equipment carries out definition design on a dynamic form database table, field definition design on the dynamic form database table and extension association table definition design on the dynamic form database according to a MySQL dynamic form, and realizes dynamic configuration of attributes and relations of the dynamic form.
Further, the method specifically comprises the following steps:
1) designing a universal attribute field of the resource by taking the resource object table as a main table T1;
2) designing a resource building ID in a T1 table as an external key of a T2 resource building table, and defining the resource building ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
3) the resource type ID is designed in the T1 table as the foreign key of the T3 table, and is defined as the corresponding relation of n to 1, and n is a positive integer larger than 1.
Further, the method also comprises the following steps after the step 3):
4) establishing a dynamic database table definition T4, and storing a table structure definition, wherein the table structure definition comprises a table name of a database table establishment structure;
5) establishing a dynamic database table field definition T5, and storing a table structure field definition, wherein the table structure field definition comprises a field name of a table structure established by the database, and the table name field is designed to be used as an external key of a T4 table and defined as a corresponding relation of n to 1;
6) dynamically generating a resource expansion table T6 based on the steps 4) and 5);
7) a design resource expansion association table T7, a design resource type ID field association T3 table and a design data table ID association T4 table form a 1-to-1 relationship;
8) realizing dynamic attribute maintenance of a resource table: t1 table → T7 table → T4 table → T6 table.
Further, the dynamically generating the resource expansion table T6 in step 6) specifically includes: and 4) steps and 5) visual form configuration can be realized by utilizing a Java related technology Spring + Freemarker framework, after data of the T4 and T5 tables are recorded into the forms, database table building operation is executed through background codes, and a resource expansion table T6 is dynamically generated.
Further, the step 8) of implementing dynamic attribute maintenance of the resource table specifically includes the following steps:
a) fetching the resource type ID field from the T1 table, and searching the database table definition ID of the T7 table;
b) extracting a database table definition ID field from the T7 table, and searching the table name of the T4 table;
c) the actual dynamically generated extension table T6 is directly queried by the table name described above.
The invention also includes a computer-based system comprising:
a processor;
a non-volatile memory configured for communication with the processor, the non-volatile memory having instructions stored thereon that, in response to execution by the processor, cause the processor to: and the MySQL dynamic form carries out definition design of a dynamic form database table, field definition design of the dynamic form database table and extension association table definition design of the dynamic form database, and realizes dynamic configuration of the attributes and the relations of the dynamic form.
Further, the processor specifically executes the following steps:
1) designing a universal attribute field of the resource by taking the resource object table as a main table T1;
2) designing a resource building ID in a T1 table as an external key of a T2 resource building table, and defining the resource building ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
3) the resource type ID is designed in the T1 table as the foreign key of the T3 table, and is defined as the corresponding relation of n to 1, and n is a positive integer larger than 1.
Further, after the step 3) is executed, the method further comprises the following steps:
4) establishing a dynamic database table definition T4, and storing a table structure definition, wherein the table structure definition comprises a table name of a database table establishment structure;
5) establishing a dynamic database table field definition T5, and storing a table structure field definition, wherein the table structure field definition comprises a field name of a table establishing structure of a database, and a table name field is designed to be used as an external key of a T4 table and is defined as a corresponding relation of n to 1, and n is a positive integer greater than 1;
6) dynamically generating a resource expansion table T6 based on the steps 4) and 5);
7) a design resource expansion association table T7, a design resource type ID field association T3 table and a design data table ID association T4 table form a 1-to-1 relationship;
8) realizing dynamic attribute maintenance of a resource table: t1 table → T7 table → T4 table → T6 table.
Further, the dynamically generating the resource expansion table T6 in step 6) specifically includes: and 4) steps and 5) visual form configuration can be realized by utilizing a Java related technology Spring + Freemarker framework, after data of the T4 and T5 tables are recorded into the forms, database table building operation is executed through background codes, and a resource expansion table T6 is dynamically generated.
Further, the step 8) of implementing dynamic attribute maintenance of the resource table specifically includes the following steps:
a) fetching the resource type ID field from the T1 table, and searching the database table definition ID of the T7 table;
b) extracting a database table definition ID field from the T7 table, and searching the table name of the T4 table;
c) the actual dynamically generated extension table T6 is directly queried by the table name described above.
Compared with the prior art, the resource management method based on the data center equipment provided by the invention at least has the following beneficial effects or advantages:
1. the visual configuration of the dynamic form can be realized by integrating Spring and Freemarker through Java technology, the entry of the form, the form field and the form type in the dynamic form is supported, the form is dynamically created, the product reusability is high, and the requirement change of a user is met;
2. the method supports a large number of different types of equipment maintenance, can be expanded to be realized by a topological graph and a 3D configuration graph, and has little influence on performance requirements.
Drawings
The present invention will be described in further detail with reference to the accompanying drawings;
FIG. 1 is a prior art E-R diagram;
FIG. 2 is an E-R diagram of the invention improved on the basis of the original MySQL database design scheme.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a resource management method based on data center equipment, which improves the scheme designed in the original MySQL database according to a MySQL dynamic form, adds dynamic form definition and form field definition, and realizes the dynamic configuration of form attributes and relations, wherein the designed E-R diagram is shown in figure 2. As can be seen from fig. 2 above:
1. designing a universal attribute field of the resource by taking the resource object table as a main table T1;
2. designing a resource building ID in a T1 table as an external key of a T2 resource building table, and defining the resource building ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
3. designing a resource type ID in a T1 table as an external key of a T3 table, and defining the resource type ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
4. establishing a dynamic database table definition T4, and storing a table structure definition, such as a table name of a database table building structure;
5. establishing a dynamic database table field definition T5, storing a table structure field definition, such as a field name of a table structure established by a database, and designing a table name field as an external key of a T4 table, wherein the table name field is defined as a corresponding relation of n to 1, and n is a positive integer greater than 1;
6. steps 4 and 5, the visual form configuration can be realized by utilizing frameworks such as Java related technology Spring + Freemarker, and the like, after data of the T4 and T5 tables are input into the forms, the table building operation of the database is executed through background codes, and the resource expansion table T6 is dynamically generated;
7. a design resource expansion association table T7, a design resource type ID field association T3 table and a design data table ID association T4 table form a 1-to-1 relationship;
8. the method for realizing the dynamic attribute maintenance of the resource table comprises the following steps: t1 table → T7 table → T4 table → T6 table
a) Fetching the resource type ID field from the T1 table, and searching the database table definition ID of the T7 table;
b) extracting a database table definition ID field from the T7 table, and searching the table name of the T4 table;
c) the actual dynamically generated extended table T6 is directly queried by the table name.
In summary, the key point of the design of the scheme lies in the design of the dynamic database table and the database field, the actual extended attribute table is generated through codes, and the method is realized by associating resource types.
The present invention also provides a computer-based system, the system comprising:
a processor;
a non-volatile memory configured for communication with the processor, the non-volatile memory having instructions stored thereon that, in response to execution by the processor, cause the processor to: and according to the MySQL dynamic form, performing dynamic form database table definition design, dynamic form database table field definition design and dynamic form database expansion association table definition design to realize dynamic configuration of the attributes and relationships of the dynamic form.
1. Designing a universal attribute field of the resource by taking the resource object table as a main table T1;
2. designing a resource building ID in a T1 table as an external key of a T2 resource building table, and defining the resource building ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
3. designing a resource type ID in a T1 table as an external key of a T3 table, and defining the resource type ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
4. establishing a dynamic database table definition T4, and storing a table structure definition, such as a table name of a database table building structure;
5. establishing a dynamic database table field definition T5, storing a table structure field definition, such as a field name of a table structure established by a database, and designing a table name field as an external key of a T4 table, wherein the table name field is defined as a corresponding relation of n to 1;
6. steps 4 and 5, the visual form configuration can be realized by utilizing frameworks such as Java related technology Spring + Freemarker, and the like, after data of the T4 and T5 tables are input into the forms, the table building operation of the database is executed through background codes, and the resource expansion table T6 is dynamically generated; spring represents an open source framework, and can provide an integrated framework for JavaEE application development. Freemaker is a module engine written in the Java language that generates text output based on modules.
7. A design resource expansion association table T7, a design resource type ID field association T3 table and a design data table ID association T4 table form a 1-to-1 relationship;
8. the method for realizing the dynamic attribute maintenance of the resource table comprises the following steps: t1 table → T7 table → T4 table → T6 table
a) Fetching the resource type ID field from the T1 table, and searching the database table definition ID of the T7 table;
b) extracting a database table definition ID field from the T7 table, and searching the table name of the T4 table;
c) the actual dynamically generated extended table T6 is directly queried by the table name.
Compared with the MySQL dynamic form design technology mentioned in the present proposal, the MySQL database design technology in the prior art is applicable in the early stage of a project or in the case of a smaller data volume of device types, but as the types of the device types increase, it means that each device type needs to increase a corresponding extended form, and the properties of the extended forms cannot be adapted along with the change of requirements, so that certain maintenance cost exists.
The proposal provides a MySQL dynamic form design technology, improves the original MySQL database design scheme, adds dynamic form definition and form field definition, and realizes the dynamic configuration of form attributes and relations.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the invention are also within the protection scope of the invention.

Claims (4)

1. A resource management method based on data center equipment is characterized in that according to a MySQL dynamic form, dynamic form database table definition design, dynamic form database table field definition design and dynamic form database expansion association table definition design are carried out, and dynamic configuration of dynamic form attributes and relations is achieved;
the resource management method based on the data center equipment specifically comprises the following steps:
1) designing a universal attribute field of the resource by taking the resource object table as a main table T1;
2) designing a resource building ID in a T1 table as an external key of a T2 resource building table, and defining the resource building ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
3) designing a resource type ID in a T1 table as an external key of a T3 table, and defining the resource type ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
the method also comprises the following steps after the step 3):
4) establishing a dynamic database table definition T4, and storing a table structure definition, wherein the table structure definition comprises a table name of a database table establishment structure;
5) establishing a dynamic database table field definition T5, and storing a table structure field definition, wherein the table structure field definition comprises a field name of a table establishing structure of a database, and a table name field is designed to be used as an external key of a T4 table and is defined as a corresponding relation of n to 1, and n is a positive integer greater than 1;
6) dynamically generating a resource expansion table T6 based on the steps 4) and 5);
7) a design resource expansion association table T7, a design resource type ID field association T3 table and a design data table ID association T4 table form a 1-to-1 relationship;
8) realizing dynamic attribute maintenance of a resource table: table T1 → table T7 → table T4 → table T6;
the step 8) of implementing dynamic attribute maintenance of the resource table specifically includes the following steps:
a) fetching the resource type ID field from the T1 table, and searching the database table definition ID of the T7 table;
b) extracting a database table definition ID field from the T7 table, and searching the table name of the T4 table;
c) the actual dynamically generated extension table T6 is directly queried by the table name described above.
2. The resource management method based on the data center equipment according to claim 1, wherein the dynamically generating of the resource expansion table T6 in step 6) specifically includes: and 4) steps and 5) visual form configuration can be realized by utilizing a Java related technology Spring + Freemarker framework, after data of the T4 and T5 tables are recorded into the forms, database table building operation is executed through background codes, and a resource expansion table T6 is dynamically generated.
3. A computer-based system, the system comprising:
a processor;
a non-volatile memory configured for communication with the processor, the non-volatile memory having instructions stored thereon that, in response to execution by the processor, cause the processor to: according to the MySQL dynamic form, performing dynamic form database table definition design, dynamic form database table field definition design and dynamic form database expansion association table definition design to realize dynamic configuration of dynamic form attributes and relations;
the processor specifically executes the following steps:
1) designing a universal attribute field of the resource by taking the resource object table as a main table T1;
2) designing a resource building ID in a T1 table as an external key of a T2 resource building table, and defining the resource building ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
3) designing a resource type ID in a T1 table as an external key of a T3 table, and defining the resource type ID as a corresponding relation of n to 1, wherein n is a positive integer greater than 1;
after the step 3) is executed, the method further comprises the following steps:
4) establishing a dynamic database table definition T4, and storing a table structure definition, wherein the table structure definition comprises a table name of a database table establishment structure;
5) establishing a dynamic database table field definition T5, and storing a table structure field definition, wherein the table structure field definition comprises a field name of a table structure established by the database, and the table name field is designed to be used as an external key of a T4 table and defined as a corresponding relation of n to 1;
6) dynamically generating a resource expansion table T6 based on the steps 4) and 5);
7) a design resource expansion association table T7, a design resource type ID field association T3 table and a design data table ID association T4 table form a 1-to-1 relationship;
8) realizing dynamic attribute maintenance of a resource table: table T1 → table T7 → table T4 → table T6;
the step 8) of implementing dynamic attribute maintenance of the resource table specifically includes the following steps:
a) fetching the resource type ID field from the T1 table, and searching the database table definition ID of the T7 table;
b) extracting a database table definition ID field from the T7 table, and searching the table name of the T4 table;
c) the actual dynamically generated extension table T6 is directly queried by the table name described above.
4. The computer-based system according to claim 3, wherein the dynamically generating resource extension table T6 in step 6) comprises: and 4) steps and 5) visual form configuration can be realized by utilizing a Java related technology Spring + Freemarker framework, after data of the T4 and T5 tables are recorded into the forms, database table building operation is executed through background codes, and a resource expansion table T6 is dynamically generated.
CN201811528151.9A 2018-12-13 2018-12-13 Resource management method based on data center equipment Active CN109684329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811528151.9A CN109684329B (en) 2018-12-13 2018-12-13 Resource management method based on data center equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811528151.9A CN109684329B (en) 2018-12-13 2018-12-13 Resource management method based on data center equipment

Publications (2)

Publication Number Publication Date
CN109684329A CN109684329A (en) 2019-04-26
CN109684329B true CN109684329B (en) 2021-04-23

Family

ID=66187664

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811528151.9A Active CN109684329B (en) 2018-12-13 2018-12-13 Resource management method based on data center equipment

Country Status (1)

Country Link
CN (1) CN109684329B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752921A (en) * 2020-06-23 2020-10-09 广西壮族自治区农业科学院农业科技信息研究所 Seed resource information management system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data
CN102254021A (en) * 2011-07-26 2011-11-23 北京市计算中心 Method for constructing database based on virtual machine management system
CN102622436A (en) * 2012-02-29 2012-08-01 浙江吉利汽车研究院有限公司 Data table establishing method of human resource management system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070130505A1 (en) * 2005-08-21 2007-06-07 Woods Michael E Template filler, method, and computer program product
CN104834860B (en) * 2015-05-09 2018-01-12 福建六壬网安股份有限公司 A kind of security incident dynamic storage method
CN106202524A (en) * 2016-07-22 2016-12-07 努比亚技术有限公司 Data base and point meter apparatus and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data
CN102254021A (en) * 2011-07-26 2011-11-23 北京市计算中心 Method for constructing database based on virtual machine management system
CN102622436A (en) * 2012-02-29 2012-08-01 浙江吉利汽车研究院有限公司 Data table establishing method of human resource management system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
动态表单的数据库结构设计;h248980496;《https://www.iteye.com/problems/91934》;20130116;说明书第[0019]-[0023]段 *

Also Published As

Publication number Publication date
CN109684329A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
TWI748175B (en) Data processing method, device and equipment
CN104573115B (en) Support the realization method and system of the integrated interface of multi-type database operation
CN103714129B (en) Dynamic data structure based on conditional plan and the construction device of relation and construction method
US20160055233A1 (en) Pre-join tags for entity-relationship modeling of databases
US20130166602A1 (en) Cloud-enabled business object modeling
CN105138326B (en) A kind of method and system for realizing sql dynamic configuration based on ibatis
CN103744651A (en) Method for automatically generating business processing model oriented to business requirements
CN108829746B (en) Main data management system and device based on memory database
CN106407302B (en) It supports to call the special functional method of middleware database by Simple SQL
CN103338135A (en) Real-time monitoring method of cluster storage capacity
CN102968306A (en) Method and system for automatically generating code based on data model drive
CN109299074B (en) Data verification method and system based on templated database view
WO2021032146A1 (en) Metadata management method and apparatus, device, and storage medium
CN106611037A (en) Method and device for distributed diagram calculation
CN104216961A (en) Method and device for data processing
CN104834860A (en) Dynamic warehousing method for security events
CN109241054A (en) A kind of multimodal data library system, implementation method and server
CN110109983B (en) Method and device for operating Redis database
CN109684329B (en) Resource management method based on data center equipment
CN103544211A (en) General inquiry system and method for converting objects into SQL statements
CN113609100B (en) Data storage method, data query device and electronic equipment
CN113094039B (en) Automatic code generation system based on database table
CN106372152B (en) Online form development system
CN105573763A (en) Embedded system modeling method supporting RTOS
CN109542418A (en) Service code generating method and terminal

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