CN113297181A - Configuration item management database, data processing method and device - Google Patents

Configuration item management database, data processing method and device Download PDF

Info

Publication number
CN113297181A
CN113297181A CN202110653290.XA CN202110653290A CN113297181A CN 113297181 A CN113297181 A CN 113297181A CN 202110653290 A CN202110653290 A CN 202110653290A CN 113297181 A CN113297181 A CN 113297181A
Authority
CN
China
Prior art keywords
database
data
configuration item
relational
item management
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
CN202110653290.XA
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.)
China Construction Bank Corp
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202110653290.XA priority Critical patent/CN113297181A/en
Publication of CN113297181A publication Critical patent/CN113297181A/en
Pending legal-status Critical Current

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/21Design, administration or maintenance of 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/25Integrating or interfacing systems involving database management systems
    • 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
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a configuration item management database, a data processing method and a data processing device, and relates to the technical field of automatic program design. One embodiment of the method comprises: the configuration item management database adopts a non-relational database and a graphic database as a back-end database of the configuration item management database, wherein the non-relational database is used for storing basic data of each configuration item in the configuration item management database; and the graphic database is used for storing the relation data of each configuration item in the configuration item management database. The embodiment can better solve the problem that the configuration items in the configuration item management database frequently change.

Description

Configuration item management database, data processing method and device
Technical Field
The invention relates to the technical field of automatic program design, in particular to a configuration item management database, a data processing method and a data processing device.
Background
A CMDB (Configuration Management Database) is used for storage Configuration of the IT infrastructure and IT service logic model. Building a CMDB is the basis for efficient IT service management.
CMDBs typically employ relational databases as the back-end database for the configuration item management database. Because the configuration items often need to add service fields or split into a plurality of configuration items, the database table often needs to be adjusted, and inconvenience is brought to the development, operation and maintenance of the CMDB.
Disclosure of Invention
In view of this, embodiments of the present invention provide a configuration item management database, a data processing method, and a device, which can better solve the problem that a configuration item in the configuration item management database frequently changes.
In a first aspect, embodiments of the present invention provide a configuration item management database, which uses a non-relational database and a graph database as a back-end database of the configuration item management database, wherein,
the non-relational database is used for storing the basic data of each configuration item in the configuration item management database;
and the graphic database is used for storing the relation data of each configuration item in the configuration item management database.
Optionally, the configuration item management database includes:
and the configuration item definition layer is used for storing the data model information of each configuration item in the configuration item management database.
Optionally, the configuration item management database includes:
an abstraction proxy layer to provide a programmatic interface for handling at least one of: a configuration item definition request, a configuration item data storage request and a management request of a configuration item relation;
and the database adaptation layer is used for receiving the processing request sent by the abstract proxy layer and converting the processing request into a database operation instruction.
Optionally, the database operation instruction includes: the system comprises a first database operation instruction and a second database operation instruction, wherein the first database operation instruction is applied to the non-relational database, and the second database operation instruction is applied to the graphic database.
Optionally, the database adaptation layer is specifically configured to: judging a data type corresponding to the processing request, wherein the data type comprises: a base data class or a relational data class;
and converting the processing request into a first database operation instruction or a second database operation instruction according to the data type.
Optionally, the database adaptation layer is specifically configured to:
if the data type corresponding to the processing request is a basic data type, converting the processing request into a first database operation instruction, and executing the first database operation instruction on the non-relational database;
and if the data type corresponding to the processing request is a relational data type, converting the processing request into a second database operation instruction, and executing the second database operation instruction on the graphic database.
In a second aspect, an embodiment of the present invention provides a data processing method, applied to the configuration item management database, including:
acquiring related data of the configuration item management database;
storing the relevant data in the non-relational database and/or the graph database.
Optionally, the related data is configuration item instance data in the configuration item management database;
the storing the relevant data into the non-relational database and/or the graphic database includes:
and generating node data in the graph database according to the configuration item instance data.
Optionally, the related data is relationship data of each configuration item in the configuration item management database;
the storing the relevant data into the non-relational database and/or the graphic database includes:
and generating edge data in the graph database according to the relation data.
Optionally, the relevant data is at least one of: instance data of configuration items, definition data of configuration items and attribute data of configuration items;
the storing the relevant data into the non-relational database and/or the graphic database includes:
and storing the related data into the non-relational database.
In a third aspect, an embodiment of the present invention provides a request processing method, applied to the configuration item management database, including:
acquiring a processing request of a user for the configuration item management database;
judging a data type corresponding to the processing request, wherein the data type comprises: a base data class or a relational data class;
and executing the processing request according to the data type.
Optionally, the executing the processing request according to the data type includes:
if the data type corresponding to the processing request is a basic data type, converting the processing request into a first database operation instruction, and executing the first database operation instruction on the non-relational database;
and if the data type corresponding to the processing request is a relational data type, converting the processing request into a second database operation instruction, and executing the second database operation instruction on the graphic database.
In a fourth aspect, an embodiment of the present invention provides a data processing apparatus, applied to the configuration item management database, including:
the data acquisition module is used for acquiring related data of the configuration item management database;
and the data storage module is used for storing the related data into the non-relational database and/or the graphic database.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any of the embodiments described above.
In a sixth aspect, the present invention provides a computer-readable medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method of any one of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: and storing the basic data of each configuration item in the configuration item management database by adopting a non-relational database. The underlying data may include: instance data of configuration items, definition data of configuration items, attribute data of configuration items and the like. Compared with the traditional relational database, the method can better solve the problem that the configuration items in the configuration item management database change frequently.
In addition, a graphic database is adopted to store the relation data of each configuration item in the configuration item management database. The graphic database is a database designed for analyzing complex graphic incidence relation data. Compared with the traditional relational database, the method can realize high-performance association analysis and query.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic structural diagram of a set of association relationships of configuration items according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a query method for implementing a recursive formula according to an embodiment of the present invention;
FIG. 3 is a block diagram of a configuration item management database according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating a data processing method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a request processing method according to an embodiment of the present invention;
FIG. 6 is a block diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In order to facilitate understanding of the scheme of the embodiment of the present invention, some terms of art related to the embodiment of the present invention are now explained.
Heterogeneous databases: generally, the Database System refers to Database systems of the same type and different brands having differences in functional characteristics (such as SQL syntax, built-in functions, interpreter logic, etc.), or different types of databases having differences from data models (RDBMS (Relational Database Management System), NOSQL (non-Relational Database, Not Only SQL), and graphic Database). The heterogeneous database referred by the embodiment of the invention is the latter, and the key point is to access different types of databases with larger differences in API and model design levels from an application system.
CMDB: the configuration item management database refers to a logical database which is responsible for storing and managing configurable resources such as equipment, an operating system, upper-layer software and the like in an enterprise IT operation and maintenance architecture. In order to connect various management systems in the operation and maintenance delivery system, besides basic configuration item data, the management system is also responsible for recording the logical relationship among the configuration items.
RDBMS: while RDBMS literally means a relational database, in general this term is used to refer to database management systems that use structured tables to record data in a logical organization of rows and columns. It is named "relationship" because the data recorded in its table typically has associations such that the associated data can be read out simultaneously in one query, rather than because it is designed specifically for analyzing data relationships.
NOSQL database: NOSQL database is a concept compared with the traditional structured database supporting SQL query, and it generally refers to the database products which abandon the traditional data correlation query function in order to optimize the read-write efficiency, and an additional benefit of this trade-off is the stronger horizontal expansion capability.
A graph database: the graphic database is a database management system designed for analyzing complex graphic associated relational data, and the implementation mode of the graphic database is different, but the common characteristic is that complex relational queries are expressed by simple syntax and query optimization is carried out for the complex relational data.
Two very important features of the CMDB system are metadata management and relational data management: the metadata in the CMDB has the characteristics of frequent structure change and continuous data splitting, and is a great challenge for a structured database; the relational data in the CDMB becomes very complex in a large IT enterprise architecture, and is difficult to be processed simply and efficiently by using a relational database or a document-based NOSQL database. The following methods can be used:
using unstructured databases: the NOSQL database is used for recording the configuration item information, and the unstructured mode is used for recording the incidence relation of a group of configuration items as an independent document.
Using a graph database: the relation management of the configuration items directly using the graphic database can effectively simplify the inquiry and modification of the relation of the complex configuration items, but generally, the graphic database is specially designed for analyzing the relation of the complex data, and the access to the simple structure or non-structure data has no advantages in function or performance.
Taking a specific scenario as an example, fig. 1 is a schematic structural diagram of a set of association relationships of configuration items according to an embodiment of the present invention. As shown in fig. 1, there is a set of Server information data (Server), which is associated with multiple sets of service data, such as Zone (Zone), deployment unit (DeployUnit), network Zone (NetworkZone), Host (Host), and Application (Application). When the environment where one Server is located needs to be summarized and analyzed, the implementation in the RDBMS is difficult, complex query statements need to be written, and meanwhile, business data related to the Server needs to be known. Because the unique association of the service table to the server information in the database is only embodied as the server _ id fields in different service tables and is dispersed in a plurality of service tables. If unfamiliar with the service, it is difficult to quickly integrate these implicit relationships with the Server data.
If a graphical database is used, the same kind of associations, such as the relationships between various services and the Customer as exemplified above, are stored in the database, and can be easily retrieved from the database and displayed when analysis or query is needed. The corresponding associated data can be obtained without using complex query statements.
A more common scenario is when there are extensive associations between the same class of business entities, for example, when a service node is applause, how many associated nodes will be affected. In a typical relational database, it is very difficult to implement recursive query by SQL, which can only be implemented by complicated storage procedures or database programming extension functions, but the same functional graph database query statement can be implemented very compactly.
Fig. 2 is a schematic diagram of a method for implementing recursive query according to an embodiment of the present invention. As shown in fig. 2, the basic Configuration Item (CI) dependency relationship in the CMDB may be recorded in the RDBMS in a table named CI _ config _ item _ depends. However, in the design, the dependency relationship needs to be traced from a specific configuration item layer by layer, and the panoramic dependency path is drawn, so that the same database table needs to be linked recursively and continuously. Query performance can be problematic when the level of association is deep, and query statements based on the SQL syntax can become tedious.
The following is an SQL statement that calculates the total number of configuration items within the seven-layer dependency of a particular configuration item corresponding to the query method shown in fig. 2. Obviously, such query statements lack flexibility and are cumbersome to write.
Figure BDA0003111729380000071
Figure BDA0003111729380000081
Figure BDA0003111729380000091
If a relational database is used, the CMDB is constructed. Although the method realizes the dynamic table structure, the optimization support of the relational database on the row data is lost, and the query of one piece of data is very complicated. The relation between configuration items is recorded by using an independent table, and the association query of simple relation can be realized, but when the relation is complex (multi-level association) or self-association is carried out in the same table, the SQL sentence becomes complex and difficult to write.
If a non-structured database is used, the CMDB is constructed. The NOSQL database is used for recording the configuration item information, and the independent table mode of the relational database is used for recording the configuration item relation, and the scheme has the defects of using the latter half part of the relational database. Or the incidence relation of a group of configuration items is recorded as an independent document in an unstructured mode, the method has the advantages of high overall reading speed and the defects that group data needs to be trimmed when only a small part of the relation changes, so that the modification performance is reduced, and meanwhile, part of the reading relation data is not supported.
If a graph database is used, the CMDB is constructed. The relation management of the configuration items directly using the graphic database can effectively simplify the inquiry and modification of the relation of the complex configuration items, but generally, the graphic database is specially designed for analyzing the relation of the complex data, and the access to the simple structure or non-structure data has no advantages in function or performance.
Based on the above analysis, the embodiment of the present invention provides a CMDB based on a heterogeneous database architecture. Fig. 3 is a schematic structural diagram of a configuration item management database according to an embodiment of the present invention. As shown in fig. 3, the configuration item management database uses a non-relational database and a graphic database as a back-end database of the configuration item management database, wherein the non-relational database is used for storing basic data of each configuration item in the configuration item management database; and the graphic database is used for storing the relation data of each configuration item in the configuration item management database.
The data model difference between the configuration items managed in the CMDB is large, and the same configuration item often needs to be added with a service field or split into a plurality of configuration items according to the level of operation and maintenance automation and the management requirement. The problem that comes with this is that database tables often need to be adjusted, such as the addition of fields and the splitting of table data. In the conventional RDBMS, because strict requirements are placed on the database table structure, the table structure must be predefined according to the data type before data is inserted, otherwise, the data cannot be inserted into the table. While modification of the table structure can block the insertion of data and affect the performance of the online system.
A conventional RDBMS requires a fixed set of attribute fields to be defined for each business entity, and access and update of data is done according to this definition. Although the definition can be modified, the increase and decrease of the fields need to be performed at the business system and the database level respectively, and cannot be performed at the system or the database end independently. And increasing or decreasing the field has a great influence on the database, which may cause the table to be modified to be locked (although the table may be modified without being locked, there is still a risk of data error), and affect the normal operation of the service.
In the embodiment of the invention, a non-relational database is adopted to store the basic data of each configuration item in the configuration item management database. The underlying data may include: instance data of configuration items, definition data of configuration items, attribute data of configuration items and the like. Compared with the traditional relational database, the method can better solve the problem that the configuration items in the configuration item management database change frequently.
The CMDB needs to manage not only the configuration items, but also maintain the association relationship between the configuration items. Because the configuration item data is used to service the operation and maintenance platform. The method of the embodiment of the invention adopts the graphic database to store the relational data of each configuration item in the configuration item management database. The graphic database is a database designed for analyzing complex graphic incidence relation data. Compared with the traditional relational database, the method can realize high-performance association analysis and query.
In one embodiment of the present invention, the configuration item management database includes: and the configuration item definition layer is used for storing the data model information of each configuration item in the configuration item management database. Data field definitions can be performed by a standard Java POJO definition data model in combination with JPA or a typical NOSQL document object management API, and configuration item metadata and fields and interrelations of configuration item data are explained in a comment manner. It should be noted that the configuration item relationship is a directed relationship, so an explicit direction definition needs to be added to the relationship definition annotation.
The simultaneous adoption of multiple database types in one system is a great challenge for developers, on one hand, the developers need to respectively learn different database characteristics and operation modes, on the other hand, a native cooperation solution is lacked among heterogeneous databases, and related interaction interfaces need to be designed independently aiming at the difference of different databases during system design, so that the complexity of system design is increased.
Based on this, in one embodiment of the present invention, the configuration item management database may include: an abstract proxy layer and a database adaptation layer. The abstract proxy layer is used for providing a program interface, and the program interface is used for processing at least one of the following: a configuration item definition request, a configuration item data storage request and a management request of a configuration item relation; the database adaptation layer is used for receiving the processing request sent by the abstract proxy layer and converting the processing request into a database operation instruction.
The abstract proxy layer is a key point of system design and performs uniform interface abstraction on configuration item definition, configuration item data storage and management of configuration item relations. And providing a common addition, deletion, modification and check API for configuration item data, providing platform-independent query condition data input and conversion based on a system development language, and realizing dynamic combination query of configuration items. And automatically recording the configuration item relation data to a bottom database while modifying the configuration item data according to the configuration item relation definition, and converting the preset relation query into a database relation query corresponding to the bottom according to the configuration item management service requirement. And realizing dynamic proxy class creation based on the fixed API by utilizing a proxy mechanism of a development language, and encapsulating lower-layer logic into general API operation facing a service scene.
The database adaptation layer converts the operation logic transmitted from the agent layer into actual database operation aiming at different database products, and records or modifies the corresponding configuration item data in the bottom database. And designing a model of a bottom database table, a document or a graph based on the configuration item definition, and performing classification management on the bottom database model according to different configuration item types or relation types.
In one embodiment of the invention, the database operation instructions include: the system comprises a first database operation instruction and a second database operation instruction, wherein the first database operation instruction is applied to a non-relational database, and the second database operation instruction is applied to a graphic database. And generating different data operation instructions aiming at different databases to realize the CMDB based on the heterogeneous database architecture.
In one embodiment of the invention, the database adaptation layer may be operable to: judging a data type corresponding to the processing request, wherein the data type comprises: a base data class or a relational data class; and converting the processing request into a first database operation instruction or a second database operation instruction according to the data type.
Specifically, the database adaptation layer is configured to: if the data type corresponding to the processing request is a basic data type, converting the processing request into a first database operation instruction, and executing the first database operation instruction on the non-relational database; and if the data type corresponding to the processing request is a relational data type, converting the processing request into a second database operation instruction, and executing the second database operation instruction on the graphic database.
The data type represents the type of the database where the operation data corresponding to the processing request is located. And if the operation data is stored in the non-relational database, the data type corresponding to the processing request is the basic data class. And if the operation data is stored in the graphic database, the data type corresponding to the processing request is a relational data class. And generating different data operation instructions aiming at the data type corresponding to the processing request so as to realize the CMDB based on the heterogeneous database architecture.
In the embodiment of the invention, NOSQL is used for solving the problem of dynamic models, the problem of panorama drawing is solved by using a graphic database, and the heterogeneous database design is used for enabling the system to utilize the core functions of different database products, so that the advantages and the disadvantages are made up, and the characteristics of the database products in the subdivision field are fully exerted.
In order to solve the problem of frequent changes of configuration item definitions, unstructured data models are used to record configuration item definitions and data information. The difficult problem of supporting complex data relationships in RDBMS and NOSQL databases is solved by using a database of graph structures. The system design of the heterogeneous database can simultaneously play the advantages of various database models, so that the system development is more convenient and faster, and the overall performance of the system is stronger. A layer of transparent proxy is added in an abstract interface mode, complexity brought by heterogeneous databases is hidden, functions of various databases are combined better, a data storage interface is simpler, and more data operation functions are provided.
The CMDB system provided by the embodiment of the invention has the following beneficial effects: the method provides a simple and efficient configuration item metadata management function and a configuration item data reading and writing function based on an unstructured database, has no influence on the reading and writing of the configuration item data by the management of the metadata, and has no requirement on the metadata of the configuration item by the reading and writing of the configuration item data, taking actual data as a standard.
Based on the graphic database, the method provides a convenient and rapid configuration item relation read-write function, and provides a rapid adjacent data query and a relation path query function without depth limitation.
And providing application layer transparency, developer-unaware automatic relation generation and data verification, and unstructured configuration item metadata and data storage and query functions based on the abstract proxy layer and the annotation.
Fig. 4 is a flowchart illustrating a data processing method according to an embodiment of the present invention. The method is applied to the configuration item management database, and as shown in fig. 4, the method includes:
step 401: and acquiring related data of the configuration item management database.
Step 402: storing the relevant data in a non-relational database and/or a graphical database.
In the embodiment of the invention, a non-relational database and a graphic database are used as a back-end database of a configuration item management database, wherein the non-relational database is used for storing basic data of each configuration item in the configuration item management database; and the graphic database is used for storing the relation data of each configuration item in the configuration item management database. Therefore, it is necessary to store relevant data in a non-relational database and/or a graph database to support the implementation of the CMDB based on the heterogeneous database architecture in the embodiment of the present invention.
In one embodiment of the invention, the related data is configuration item instance data in a configuration item management database; storing relevant data in a non-relational database and/or a graphical database, comprising: and generating node data in the graph database according to the configuration item instance data.
In another embodiment of the present invention, the related data may also be relationship data of the configuration items in the configuration item management database; storing relevant data in a non-relational database and/or a graphical database, comprising: and generating edge data in the graph database according to the relation data.
And generating node data in the graph database according to the configuration item instance data. And generating edge data in the graph database according to the relational data of the configuration items. The CMDB can efficiently provide services such as more complex relation inquiry, relation analysis and the like.
It should be noted that the configuration item relationship may be a directed relationship, so the edge data in the graph database may include the pointing information of the edge.
In one embodiment of the invention, the relevant data is at least one of: instance data of configuration items, definition data of configuration items and attribute data of configuration items; the storing the relevant data into the non-relational database and/or the graphic database includes: and storing the related data into the non-relational database. And storing the instance data of the configuration items, the definition data of the configuration items and the attribute data of the configuration items into a non-relational database. Based on the non-relational database, the problems of frequent change of configuration items in the CMDB and the like can be solved more efficiently.
Fig. 5 is a flowchart illustrating a request processing method according to an embodiment of the present invention, as shown in fig. 5, the method includes:
step 501: and acquiring a processing request of a user for the configuration item management database.
The processing request is used to manipulate data in the CMDB background database. The processing request can be used for adding, deleting, modifying and checking data in the CMDB background database.
Step 502: judging a data type corresponding to the processing request, wherein the data type comprises: a base data class or a relational data class.
The data type represents the type of the database where the operation data corresponding to the processing request is located. And if the operation data is stored in the non-relational database, the data type corresponding to the processing request is the basic data class. And if the operation data is stored in the graphic database, the data type corresponding to the processing request is a relational data class.
Step 503: and executing the processing request according to the data type.
Specifically, if the data type corresponding to the processing request is a basic data type, the processing request is converted into a first database operation instruction, and the first database operation instruction is executed on the non-relational database. And if the data type corresponding to the processing request is a relational data type, converting the processing request into a second database operation instruction, and executing the second database operation instruction on the graphic database.
And generating different data operation instructions aiming at the data type corresponding to the processing request so as to operate the data of the CMDB background based on the heterogeneous database architecture. The method and the device receive the user request, automatically convert the user request into the operation instruction of the corresponding database, hide the complexity brought by the heterogeneous database, better combine the functions of various databases and facilitate the operation of the user on the heterogeneous CMDB background data.
Fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, and as shown in fig. 6, the apparatus includes:
a data obtaining module 601, configured to obtain relevant data of the configuration item management database;
a data storage module 602, configured to store the relevant data in a non-relational database and/or a graph database.
Optionally, the related data is configuration item instance data in a configuration item management database;
the data storage module 602 is specifically configured to:
and generating node data in the graph database according to the configuration item instance data.
Optionally, the related data is relational data of the configuration items in the configuration item management database;
the data storage module 602 is specifically configured to:
and generating edge data in the graph database according to the relation data.
Optionally, the related data is configuration item data of the configuration items in the configuration item management database or attribute data of the configuration items;
the data storage module 602 is specifically configured to:
and storing the configuration item data or the attribute data into a non-relational database.
An embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method of any of the embodiments described above.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: the device comprises a data acquisition module and a data storage module. The names of these modules do not constitute a limitation to the module itself in some cases, and for example, the data acquisition module may also be described as a "module that acquires relevant data of the configuration item management database".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
acquiring relevant data of the configuration item management database, wherein the configuration item management database adopts a non-relational database and a graphic database as a back-end database of the configuration item management database;
storing the relevant data in the non-relational database and/or the graph database.
According to the technical scheme of the embodiment of the invention, a non-relational database is adopted to store the basic data of each configuration item in the configuration item management database. The underlying data may include: configuration item data of configuration items, definition data of configuration items, attribute data of configuration items, and the like. Compared with the traditional relational database, the method can better solve the problem that the configuration items in the configuration item management database change frequently.
In addition, a graphic database is adopted to store the relation data of each configuration item in the configuration item management database. The graphic database is a database designed for analyzing complex graphic incidence relation data. Compared with the traditional relational database, the method can realize high-performance association analysis and query.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A configuration item management database, characterized in that a non-relational database and a graphic database are used as a back-end database of the configuration item management database, wherein,
the non-relational database is used for storing the basic data of each configuration item in the configuration item management database;
and the graphic database is used for storing the relation data of each configuration item in the configuration item management database.
2. The configuration item management database according to claim 1, comprising:
and the configuration item definition layer is used for storing the data model information of each configuration item in the configuration item management database.
3. The configuration item management database according to claim 1, comprising:
an abstraction proxy layer to provide a programmatic interface for handling at least one of: a configuration item definition request, a configuration item data storage request and a management request of a configuration item relation;
and the database adaptation layer is used for receiving the processing request sent by the abstract proxy layer and converting the processing request into a database operation instruction.
4. The profile management database of claim 3, wherein the database operation instructions comprise: the system comprises a first database operation instruction and a second database operation instruction, wherein the first database operation instruction is applied to the non-relational database, and the second database operation instruction is applied to the graphic database.
5. The configuration item management database according to claim 4, wherein the database adaptation layer is specifically configured to:
judging a data type corresponding to the processing request, wherein the data type comprises: a base data class or a relational data class;
and converting the processing request into a first database operation instruction or a second database operation instruction according to the data type.
6. The configuration item management database according to claim 5, wherein the database adaptation layer is specifically configured to:
if the data type corresponding to the processing request is a basic data type, converting the processing request into a first database operation instruction, and executing the first database operation instruction on the non-relational database;
and if the data type corresponding to the processing request is a relational data type, converting the processing request into a second database operation instruction, and executing the second database operation instruction on the graphic database.
7. A data processing method applied to the configuration item management database according to any one of claims 1 to 6, comprising:
acquiring related data of the configuration item management database;
storing the relevant data in the non-relational database and/or the graph database.
8. The method of claim 7, wherein the related data is configuration item instance data in the configuration item management database;
the storing the relevant data into the non-relational database and/or the graphic database includes:
and generating node data in the graph database according to the configuration item instance data.
9. The method of claim 7, wherein the related data is relational data of configuration items in the configuration item management database;
the storing the relevant data into the non-relational database and/or the graphic database includes:
and generating edge data in the graph database according to the relation data.
10. The method of claim 7, wherein the related data is at least one of: instance data of configuration items, definition data of configuration items and attribute data of configuration items;
the storing the relevant data into the non-relational database and/or the graphic database includes:
and storing the related data into the non-relational database.
11. A request processing method applied to the configuration item management database according to any one of claims 1 to 6, comprising:
acquiring a processing request of a user for the configuration item management database;
judging a data type corresponding to the processing request, wherein the data type comprises: a base data class or a relational data class;
and executing the processing request according to the data type.
12. The method of claim 11, wherein said executing the processing request according to the data type comprises:
if the data type corresponding to the processing request is a basic data type, converting the processing request into a first database operation instruction, and executing the first database operation instruction on the non-relational database;
and if the data type corresponding to the processing request is a relational data type, converting the processing request into a second database operation instruction, and executing the second database operation instruction on the graphic database.
13. A data processing apparatus applied to the configuration item management database according to any one of claims 1 to 6, comprising:
the data acquisition module is used for acquiring related data of the configuration item management database;
and the data storage module is used for storing the related data into the non-relational database and/or the graphic database.
14. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 7-12.
15. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 7-12.
CN202110653290.XA 2021-06-11 2021-06-11 Configuration item management database, data processing method and device Pending CN113297181A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110653290.XA CN113297181A (en) 2021-06-11 2021-06-11 Configuration item management database, data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110653290.XA CN113297181A (en) 2021-06-11 2021-06-11 Configuration item management database, data processing method and device

Publications (1)

Publication Number Publication Date
CN113297181A true CN113297181A (en) 2021-08-24

Family

ID=77328002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110653290.XA Pending CN113297181A (en) 2021-06-11 2021-06-11 Configuration item management database, data processing method and device

Country Status (1)

Country Link
CN (1) CN113297181A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726871A (en) * 2021-08-27 2021-11-30 猪八戒股份有限公司 Dispatching method and system for automatic code release
CN114626556A (en) * 2021-09-14 2022-06-14 亚信科技(中国)有限公司 Resource management method and device of target system, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123369A (en) * 2014-07-24 2014-10-29 中国移动通信集团广东有限公司 CMDB system based on graphic data base and implementation method
CN105302842A (en) * 2014-07-31 2016-02-03 北大方正集团有限公司 Data processing method and device
CN106599711A (en) * 2015-10-15 2017-04-26 华为技术有限公司 Database access control method and device
US20180114153A1 (en) * 2016-10-26 2018-04-26 Servicenow, Inc. System and Method for Service Modeling
CN108009236A (en) * 2017-11-29 2018-05-08 北京锐安科技有限公司 A kind of big data querying method, system, computer and storage medium
US20190102477A1 (en) * 2017-10-03 2019-04-04 Servicenow, Inc. Novel metadata relationships in a configuration management database
CN111782672A (en) * 2020-06-30 2020-10-16 平安银行股份有限公司 Multi-field data management method and related device
CN111782673A (en) * 2020-07-13 2020-10-16 中国工商银行股份有限公司 Data processing method and device, computing equipment and medium
CN112711677A (en) * 2021-01-08 2021-04-27 北京仿真中心 Visual management device and method for Neo4j graph database

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123369A (en) * 2014-07-24 2014-10-29 中国移动通信集团广东有限公司 CMDB system based on graphic data base and implementation method
CN105302842A (en) * 2014-07-31 2016-02-03 北大方正集团有限公司 Data processing method and device
CN106599711A (en) * 2015-10-15 2017-04-26 华为技术有限公司 Database access control method and device
US20180114153A1 (en) * 2016-10-26 2018-04-26 Servicenow, Inc. System and Method for Service Modeling
US20190102477A1 (en) * 2017-10-03 2019-04-04 Servicenow, Inc. Novel metadata relationships in a configuration management database
CN108009236A (en) * 2017-11-29 2018-05-08 北京锐安科技有限公司 A kind of big data querying method, system, computer and storage medium
CN111782672A (en) * 2020-06-30 2020-10-16 平安银行股份有限公司 Multi-field data management method and related device
CN111782673A (en) * 2020-07-13 2020-10-16 中国工商银行股份有限公司 Data processing method and device, computing equipment and medium
CN112711677A (en) * 2021-01-08 2021-04-27 北京仿真中心 Visual management device and method for Neo4j graph database

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
中国图书馆学会, 北京图书馆出版社 *
石春菊等: "非关系型数据库在企业社交网络中的设计", 《电子技术与软件工程》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726871A (en) * 2021-08-27 2021-11-30 猪八戒股份有限公司 Dispatching method and system for automatic code release
CN113726871B (en) * 2021-08-27 2024-02-02 猪八戒股份有限公司 Scheduling method and system for automatic code release
CN114626556A (en) * 2021-09-14 2022-06-14 亚信科技(中国)有限公司 Resource management method and device of target system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10007698B2 (en) Table parameterized functions in database
US8260824B2 (en) Object-relational based data access for nested relational and hierarchical databases
US20160063063A1 (en) Database query system
US20070027862A1 (en) Anonymous types for statically typed queries
US9984121B2 (en) Database statistics based on transaction state
US7779047B2 (en) Pluggable merge patterns for data access services
US9569485B2 (en) Optimizing database query
CN111949693B (en) Data processing device, data processing method, storage medium and electronic equipment
US8881127B2 (en) Systems and methods to automatically generate classes from API source code
US9563650B2 (en) Migrating federated data to multi-source universe database environment
US9740713B1 (en) Dynamic modeling of data in relational databases
US11100173B2 (en) Autolayout of visualizations based on graph data
US10614062B2 (en) Data model extension generation
CN113297181A (en) Configuration item management database, data processing method and device
US10936640B2 (en) Intelligent visualization of unstructured data in column-oriented data tables
CN108334620A (en) A kind of method and device operating Cluster Database based on ORM frames
CN112970011A (en) Recording pedigrees in query optimization
US9430554B2 (en) Object-relational mapping based on virtual columns
WO2023231615A1 (en) Materialized-column creation method and data query method based on data lake
US11921710B2 (en) Systems and methods for accessing data entities managed by a data processing system
Reniers et al. Schema design support for semi-structured data: Finding the sweet spot between NF and De-NF
CA3048876C (en) Retroreflective join graph generation for relational database queries
CN113127496B (en) Method and device for determining change data in database, medium and equipment
US10025818B2 (en) Customize column sequence in projection list of select queries
US20230342357A1 (en) Bill of materials traversal to handle logical units of work for in-memory databases

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
TA01 Transfer of patent application right

Effective date of registration: 20220923

Address after: 25 Financial Street, Xicheng District, Beijing 100033

Applicant after: CHINA CONSTRUCTION BANK Corp.

Address before: 12 / F, 15 / F, No. 99, Yincheng Road, Shanghai pilot Free Trade Zone, 200120

Applicant before: Jianxin Financial Science and Technology Co.,Ltd.

TA01 Transfer of patent application right