CN107832446B - Configuration item information searching method and computing device - Google Patents
Configuration item information searching method and computing device Download PDFInfo
- Publication number
- CN107832446B CN107832446B CN201711173520.2A CN201711173520A CN107832446B CN 107832446 B CN107832446 B CN 107832446B CN 201711173520 A CN201711173520 A CN 201711173520A CN 107832446 B CN107832446 B CN 107832446B
- Authority
- CN
- China
- Prior art keywords
- configuration item
- classification
- attribute
- association
- item classification
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
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)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention discloses a method for searching configuration item information, which comprises the following steps: determining the configuration item classification to which the known configuration item example belongs, then searching an association path between the known configuration item classification and the target configuration item classification according to the configuration classification relation graph, and further determining the target configuration item example from each example corresponding to the target configuration item classification through the association attribute between each configuration item classification in the association path and the known configuration item example. Compared with the prior art, the embodiment of the invention only stores the association relationship between the configuration item classifications, and stores the association relationship between any one configuration item classification and each other configuration item classification in the configuration item classification relationship graph by adopting the graph data structure, so that when the configuration item information is searched, the association path between the known configuration item classification and the target configuration item classification is searched through the configuration item classification relationship graph, the searching efficiency can be effectively improved, and the occurrence of data isolation faults can be avoided.
Description
Technical Field
The invention relates to the field of computer data processing, in particular to a method for searching configuration item information and computing equipment.
Background
With the development of the internet industry, the IT environment of an enterprise is more and more complex, and a large amount of data generated in the enterprise is various, large in quantity and inconsistent in format, and is difficult to be effectively managed, not to mention various IT services based on the data. Therefore, it is necessary to construct a resource management center for managing all data, so as to record and manage various types of related data and the life cycle of the data.
CMDB is an abbreviation of Configuration management database, i.e., a Configuration management database. The CMDB can be used for storing and managing various configuration item information of equipment in an enterprise IT framework and the incidence relation among various configuration items, is a logic embodiment of service assets in a real environment in a software system, and not only can be used for effectively managing the assets, but also can provide support for other service management processes.
In the prior art, configuration item information in the CMDB is stored in a classified and hierarchical manner, and a relationship type between one configuration item instance and another configuration item instance are specifically stored in the CMDB. Since the relationship type between configuration items usually only includes composition, connection and needs 3 types, the CMDB is actually an association relationship between configuration items stored by using a tree data structure, and it can be seen that such a tree data structure is suitable for deep search, but is inefficient when parallel search is needed. In addition, due to the characteristics of the tree data structure, if data of a certain configuration item is faulty, all data below the configuration item cannot be normally accessed, and thus a data isolation fault is caused.
Therefore, there is a need for a method for searching configuration item information, which is used to solve the technical problems in the prior art that the retrieval efficiency of the CMDB is low and data isolation failure is easily caused.
Disclosure of Invention
The invention provides a method for searching configuration item information and computing equipment, which are used for solving the technical problems that the CMDB has low retrieval efficiency and is easy to cause data isolation faults in the prior art.
The method for searching the configuration item information provided by the embodiment of the invention comprises the following steps:
determining a known configuration item classification to which the known configuration item instance belongs;
determining an association path between the known configuration item classification and a target configuration item classification according to a configuration item classification relation graph, wherein the association path at least comprises association attributes, and the association attributes between any two configuration item classifications are the same attributes of any two configuration item classifications;
and determining a target configuration item instance from the instances corresponding to the target configuration item classification according to the known configuration item instance and the association attribute.
Optionally, the association path includes m association configuration item classifications and m +1 association attributes, where m is an integer greater than or equal to 0; the association path from the known configuration item classification to the target configuration item classification is: when m is 0, the known configuration item classification is associated with the target associated configuration item classification through a 1 st associated attribute; when m is not 0, the known configuration item classification is associated with the 1 st associated configuration item classification through the 1 st associated attribute, the ith configuration item classification is associated with the i +1 th associated configuration item classification through the i +1 th associated attribute, the mth associated configuration item classification is associated with the target configuration item classification through the m +1 th associated attribute, and i is an integer greater than or equal to 0 and less than or equal to m;
determining a target configuration item instance from the instances corresponding to the target configuration item classification according to the known configuration item instance and the association attribute, including:
determining the associated attribute value of the 1 st associated attribute corresponding to the known configuration item instance;
and determining the associated attribute value of the (i + 1) th associated attribute corresponding to the associated attribute value of the ith associated attribute from the configuration table of the ith associated configuration item classification until the target configuration item instance is determined.
Optionally, the configuration table of the configuration item classification includes a data table corresponding to each attribute and an association relation table corresponding to each association attribute in the configuration item classification;
determining the associated attribute value of the (i + 1) th associated attribute corresponding to the associated attribute value of the ith associated attribute from the configuration table of the ith associated configuration item classification, wherein the method comprises the following steps:
determining an associated configuration item example in the ith associated configuration item classification according to the associated attribute value of the ith associated attribute and an associated relation table corresponding to the ith associated attribute;
and determining the associated attribute value of the (i + 1) th associated attribute according to the associated configuration item examples in the ith associated configuration item classification and the data table corresponding to the (i + 1) th associated attribute.
Optionally, the configuration item classification relationship graph is obtained by:
acquiring each configuration item instance, and classifying the configuration item instances according to a set rule to obtain a plurality of configuration item classifications;
for any two configuration item classifications in the plurality of configuration item classifications, if the any two configuration item classifications are determined to have the same attribute, determining that an association relationship exists between the any two configuration item classifications, and setting the relationship type of the association relationship according to the same attribute;
and obtaining the configuration item classification relation graph according to the incidence relation between any two configuration item classifications and the relation type.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, where the computing device includes:
the determining module is used for determining the classification of the known configuration items to which the known configuration item instances belong;
the searching module is used for determining an association path between the known configuration item classification and the target configuration item classification according to the configuration item classification relation graph, wherein the association path at least comprises association attributes, and the association attributes between any two configuration item classifications are the same attributes of any two configuration item classifications;
the searching module is further configured to determine a target configuration item instance from the instances corresponding to the target configuration item classification according to the known configuration item instance and the association attribute.
Optionally, the association path includes m association configuration item classifications and m +1 association attributes, where m is an integer greater than or equal to 0; the association path from the known configuration item classification to the target configuration item classification is: when m is 0, the known configuration item classification is associated with the target associated configuration item classification through a 1 st associated attribute; when m is not 0, the known configuration item classification is associated with the 1 st associated configuration item classification through the 1 st associated attribute, the ith configuration item classification is associated with the i +1 th associated configuration item classification through the i +1 th associated attribute, the mth associated configuration item classification is associated with the target configuration item classification through the m +1 th associated attribute, and i is an integer greater than or equal to 0 and less than or equal to m;
the search module is specifically configured to:
determining the associated attribute value of the 1 st associated attribute corresponding to the known configuration item instance;
and determining the associated attribute value of the (i + 1) th associated attribute corresponding to the associated attribute value of the ith associated attribute from the configuration table of the ith associated configuration item classification until the target configuration item instance is determined.
Optionally, the configuration table of the configuration item classification includes a data table corresponding to each attribute and an association relation table corresponding to each association attribute in the configuration item classification;
the search module is specifically configured to:
determining an associated configuration item example in the ith associated configuration item classification according to the associated attribute value of the ith associated attribute and an associated relation table corresponding to the ith associated attribute;
and determining the associated attribute value of the (i + 1) th associated attribute according to the associated configuration item examples in the ith associated configuration item classification and the data table corresponding to the (i + 1) th associated attribute.
Optionally, the computing device further includes a processing module, configured to:
acquiring each configuration item instance, and classifying the configuration item instances according to a set rule to obtain a plurality of configuration item classifications;
for any two configuration item classifications in the plurality of configuration item classifications, if the any two configuration item classifications are determined to have the same attribute, determining that an association relationship exists between the any two configuration item classifications, and setting the relationship type of the association relationship according to the same attribute;
and obtaining the configuration item classification relation graph according to the incidence relation between any two configuration item classifications and the relation type.
Another embodiment of the present invention provides a computing device, which includes a memory for storing program instructions and a processor for calling the program instructions stored in the memory to execute any one of the above methods according to the obtained program.
Another embodiment of the present invention provides a computer storage medium having stored thereon computer-executable instructions for causing a computer to perform any one of the methods described above.
In the embodiment of the invention, when searching the configuration item information, the configuration item classification to which the known configuration item example belongs is determined, then the association path between the known configuration item classification and the target configuration item classification is searched according to the configuration classification relation graph, and the target configuration item example is determined from each example corresponding to the target configuration item classification through the association attribute between each configuration item classification in the association path and the known configuration item example. Compared with the prior art, the embodiment of the invention only stores the association relationship between the configuration item classifications, and stores the association relationship between any one configuration item classification and each other configuration item classification in the configuration item classification relationship graph by adopting the graph data structure, so that when the configuration item information is searched, the association path between the known configuration item classification and the target configuration item classification is searched through the configuration item classification relationship graph, the searching efficiency can be effectively improved, and the occurrence of data isolation faults can be avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart corresponding to a method for searching configuration item information according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a direct association between a known configuration item classification and a target configuration item classification provided in an embodiment of the present invention;
FIG. 3 is a diagram illustrating an indirect association between a known configuration item classification and a target configuration item classification provided in an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for obtaining a classification relationship diagram of configuration items according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a classification relationship of configuration items in a computer room stored in the CMDB according to an embodiment of the present invention;
fig. 6 is a schematic internal structural diagram of a computing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. 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 configuration item (i.e. a configuration item, abbreviated as CI) in the embodiment of the present invention may be multiple types of configuration items inside an enterprise, in a data center, or in an IT computer room, for example, may be a server, a hard disk, an operating system, a virtual machine, a CPU, a motherboard, an IP address, a port, an application, a configuration file, a code packet, and the like, which is not limited in this respect.
In general, the configuration items described in the embodiments of the present invention refer to configuration item classifications, and one configuration item classification may include one or more configuration item instances. For the configuration item of the server, all servers existing in the computer room belong to the configuration item category of the server, but each specific server is an instance of the configuration item in the configuration item category of the server, and any server has a unique identifier (such as a server number) for distinguishing from other servers.
Specifically, all configuration item instances in a configuration item classification have the same attribute (also called field), that is, the attribute of the configuration item classification, and of course, the specific attribute values of the configuration item instances in the configuration item classification may be the same or different.
In the embodiment of the present invention, the configuration item information may include information of a configuration item classification and information of each configuration item instance in one configuration item classification. These configuration item information are stored in a configuration management database CMDB, and the configuration item information is searched through the CMDB.
The embodiments of the present invention will be described in further detail with reference to the drawings attached hereto.
Fig. 1 is a schematic flow chart corresponding to a method for searching configuration item information according to an embodiment of the present invention, as shown in fig. 2, including the following steps:
step S101: determining a known configuration item classification to which the known configuration item instance belongs;
step S102: determining an association path between the known configuration item classification and a target configuration item classification according to a configuration item classification relation graph, wherein the association path at least comprises association attributes, and the association attributes between any two configuration item classifications are the same attributes of any two configuration item classifications;
step S103: and determining a target configuration item instance from the instances corresponding to the target configuration item classification according to the known configuration item instance and the association attribute.
In the embodiment of the invention, when searching the configuration item information, the configuration item classification to which the known configuration item example belongs is determined, then the association path between the known configuration item classification and the target configuration item classification is searched according to the configuration classification relation graph, and the target configuration item example is determined from each example corresponding to the target configuration item classification through the association attribute between each configuration item classification in the association path and the known configuration item example. Compared with the prior art, the embodiment of the invention only stores the association relationship between the configuration item classifications, and stores the association relationship between any one configuration item classification and each other configuration item classification in the configuration item classification relationship graph by adopting the graph data structure, so that when the configuration item information is searched, the association path between the known configuration item classification and the target configuration item classification is searched through the configuration item classification relationship graph, the searching efficiency can be effectively improved, and the occurrence of data isolation faults can be avoided.
Specifically, in the embodiment of the present invention, configuration item information may be searched according to a known configuration item instance, and in such a scenario, the configuration item classification and the configuration item instance to be searched are referred to as a target configuration item classification and a target configuration item instance, respectively. Thus, in step S101, a known configuration item classification to which a known configuration item instance belongs is first determined.
Furthermore, in step S102, an association path between the known configuration item classification and the target configuration item classification is determined according to the configuration item classification relationship diagram. Wherein the associated path at least comprises an associated attribute.
In the embodiment of the present invention, the association relationship between the known configuration item classification and the target configuration item classification can be divided into two types:
in the first type, the known configuration item classification is directly associated with the target configuration item classification, as shown in fig. 2, so that the associated attribute in the associated path is the associated attribute between the known configuration item classification and the target configuration item classification, and the associated attribute is the same attribute that the known configuration item classification and the target configuration item classification have. Or, the association path may also be considered to include 0 association configuration item classification and 1 association attribute, where the association attribute is an association attribute between the known configuration item classification and the target configuration item classification.
And a second type, in which the known configuration item classification is indirectly associated with the target configuration item classification, as shown in fig. 3, so that the association path between the known configuration item classification and the target configuration item classification further includes other configuration item classifications, and these configuration item classifications are sequentially associated with the known configuration item classification and the target configuration item classification through each association attribute on the association path. Specifically, two adjacent configuration item classifications in each configuration item classification on the association path are associated through an association attribute. In the embodiment of the present invention, the association attribute between any two configuration item classifications is the same attribute that the any two configuration item classifications have.
Taking the example that the association path includes m association configuration item classifications (where m is an integer greater than or equal to 0) in addition to the known configuration item classification and the target configuration item classification, the m association configuration item classifications are associated with the known configuration item classification and the target configuration item classification through m +1 association attributes.
Specifically, the association path from the known configuration item classification to the target configuration item classification is: when m is 0, the known configuration item classification is associated with the target associated configuration item classification through the 1 st associated attribute; when m is not 0, the known configuration item classification is associated with the 1 st associated configuration item classification through the 1 st associated attribute, the ith configuration item classification is associated with the (i + 1) th associated configuration item classification through the (i + 1) th associated attribute, and the mth associated configuration item classification is associated with the target configuration item classification through the (m + 1) th associated attribute. Wherein i is an integer of 0 or more and m or less;
further, in step S103, a target configuration item instance may be determined from the instances corresponding to the target configuration item classification according to the known configuration item instance and the associated attributes on the associated path. Specifically, along the direction from the known configuration item classification to the target configuration item classification on the association path, firstly, determining an association attribute value of a 1 st association attribute corresponding to the known configuration item instance, subsequently, determining an association attribute value … … of a 2 nd association attribute corresponding to the 1 st association attribute in the configuration table of the 1 st association configuration item classification, determining an association attribute value of an i +1 th association attribute corresponding to the association attribute value of the i th association attribute from the configuration table of the i th association configuration item classification, and so on until the target configuration item instance is determined.
In the embodiment of the invention, a data table and a configuration table corresponding to each configuration item classification are stored in the CMDB database. Taking any configuration item classification as an example, the data table corresponding to the configuration item classification stores each configuration item instance included in the configuration item classification, and the configuration table corresponding to the configuration item classification includes a data table corresponding to each attribute of the configuration item classification and an association relation table corresponding to each association attribute.
That is, the CMDB database is further provided with a corresponding data table for each attribute, and the data table stores attribute values corresponding to the attribute for each profile instance of the profile class having the attribute. Specifically, taking any attribute as an example, if only one configuration item classification has the attribute, the attribute is not an associated attribute, and the data table corresponding to the attribute only includes attribute values corresponding to each configuration item instance in the configuration item classification having the attribute. If two or more configuration item classifications have the attribute, the attribute can be used as the association attribute between the configuration item classifications or a part of the configuration item classifications, and the data table corresponding to the attribute comprises the attribute value corresponding to each configuration item instance in all the configuration item classifications having the attribute.
Therefore, for each association attribute, the CMDB may further set a corresponding association relationship table for each association attribute, where the association relationship between the configuration item instances in the configuration item categories that are associated by the association attribute is stored in the association relationship table.
It should be noted that, when two configuration item classifications have only one same attribute, only the same attribute may be used as an association attribute to implement association between the two configuration item classifications, and when two configuration item classifications have multiple same attributes, one or more attributes of the same attributes may be used as an association attribute to implement association between the two configuration item classifications, preferably, only one attribute of the same attributes is used as an association attribute to implement association between the two configuration item classifications. In the embodiment of the present invention, a person skilled in the art may set the association attribute between two configuration item classifications according to actual needs, which is not specifically limited by the present invention.
Thus, in this embodiment of the present invention, the determining, from the configuration table of the ith associated configuration item classification, the associated attribute value of the (i + 1) th associated attribute corresponding to the associated attribute value of the ith associated attribute may specifically include: firstly, determining an associated configuration item example in the ith associated configuration item classification according to the associated attribute value of the ith associated attribute and an associated relation table corresponding to the ith associated attribute. The configuration item instances in the ith associated configuration item category are configuration item instances which have an association relationship with known configuration item instances in the ith associated configuration item category.
And further, determining the associated attribute value of the (i + 1) th associated attribute according to the associated configuration item examples in the ith associated configuration item classification and the data table corresponding to the (i + 1) th associated attribute.
It can be seen that, because each association attribute also has a corresponding data table, in the embodiment of the present invention, the association relationship between the configuration item instances in the configuration item classification that is associated with a certain association attribute may be stored in the data table corresponding to the association attribute without setting a corresponding association relationship table in which the association attribute is set individually.
Thus, by means of the method, each attribute of the configuration item classification is mapped to a single database table, and the effect of data layering can be achieved. When the database needs to operate a certain attribute (such as modifying an attribute value), the database operation can quickly locate the data table corresponding to the attribute and the attribute value in the table, so that the database operation efficiency is improved.
It should be noted that, in the embodiment of the present invention, before searching the configuration item information through the method flows in the above steps S101 to S103, a configuration item classification relationship diagram for searching the association path in the above step S102 needs to be established. The configuration item classification relation graph stores the incidence relation among the configuration item classifications in the system, and the method can be specifically obtained through the following steps:
step S401: acquiring each configuration item instance, and classifying the configuration item instances according to a set rule to obtain a plurality of configuration item classifications;
in the embodiment of the present invention, a person skilled in the art may classify the obtained configuration item examples as needed to obtain each configuration item classification. Wherein, each configuration item classification has a plurality of attributes, that is, each configuration item instance in the same configuration item classification has the same attribute. In addition, those skilled in the art can also layer and rank the various categories of configuration items as desired.
Step S402: and aiming at any two configuration item classifications in the plurality of configuration item classifications, if the any two configuration item classifications are determined to have the same attribute, determining that an association relationship exists between the any two configuration item classifications, and setting the relationship type of the association relationship according to the same attribute.
In the embodiment of the invention, if two configuration item classifications have multiple same attributes, one or more attributes can be selected from the multiple same attributes to establish the association relationship between the two configuration item classifications. In addition, in the embodiment of the present invention, after the two configuration item classifications are associated by using the same attribute (i.e., the association attribute) of the two configuration item classifications, the relationship type of the association relationship may be specifically set according to the association attribute. For example, fig. 5 is a configuration item classification relation diagram stored in a certain computer room in the CMDB provided in the embodiment of the present invention, as shown in fig. 5, the configuration item classification relation diagram collectively includes configuration item classifications of the computer room, the server, the virtual machine, the operating system, the hard disk, the CPU, the motherboard, the IP, the application, the configuration file, the code package, the port, and the like, according to an attribute of each configuration item, an attribute of an IP address that both the server and the virtual machine have can be used as an association attribute, the two configuration item classifications are associated, and further, a relation type of an association relation between the server and the virtual machine is set as a relation between the server and the virtual machine.
Step S403: and obtaining the configuration item classification relation graph according to the incidence relation between any two configuration item classifications and the relation type.
In the embodiment of the invention, the association relation among all the configuration item classifications is stored through a graph data structure, because of the connectivity of a graph, a plurality of association paths can be arranged between one configuration item classification and the other configuration item classification, and when a certain node on the association path from the known configuration item classification to the target configuration item classification fails, the target configuration item example can be searched through other association paths, so that the risk of data isolation failure can be effectively reduced, and the safety of the CMDB is improved.
In addition, because the configuration item classification relation graph is set, in the embodiment of the invention, the shortest associated path can be searched on a plurality of associated paths of the known configuration item classification reaching the target configuration item classification, and then the target configuration item example is searched on the shortest associated path, thereby improving the searching efficiency.
Because the data structure of the graph has mathematical characteristics of no dependence on the root node, the node corresponding to each configuration item classification can be used as the root node of the graph, so that the data stored in the CMDB is more accurate, and the problem of deviation of the data range caused by using different nodes as the root nodes is avoided.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, fig. 6 is a schematic structural diagram of the computing device provided in the embodiment of the present invention, and as shown in fig. 6, the computing device 600 includes:
a determining module 601, configured to determine a known configuration item classification to which a known configuration item instance belongs;
a searching module 602, configured to determine, according to a configuration item classification relationship diagram, an association path between the known configuration item classification and a target configuration item classification, where the association path at least includes an association attribute, and an association attribute between any two configuration item classifications is a same attribute that any two configuration item classifications have;
the search module 602 is further configured to determine a target configuration item instance from the instances corresponding to the target configuration item classification according to the known configuration item instance and the association attribute.
Optionally, the association path includes m association configuration item classifications and m +1 association attributes, where m is an integer greater than or equal to 0; the association path from the known configuration item classification to the target configuration item classification is: when m is 0, the known configuration item classification is associated with the target associated configuration item classification through a 1 st associated attribute; when m is not 0, the known configuration item classification is associated with the 1 st associated configuration item classification through the 1 st associated attribute, the ith configuration item classification is associated with the i +1 th associated configuration item classification through the i +1 th associated attribute, the mth associated configuration item classification is associated with the target configuration item classification through the m +1 th associated attribute, and i is an integer greater than or equal to 0 and less than or equal to m;
the search module 602 is specifically configured to:
determining the associated attribute value of the 1 st associated attribute corresponding to the known configuration item instance;
and determining the associated attribute value of the (i + 1) th associated attribute corresponding to the associated attribute value of the ith associated attribute from the configuration table of the ith associated configuration item classification until the target configuration item instance is determined.
Optionally, the configuration table of the configuration item classification includes a data table corresponding to each attribute and an association relation table corresponding to each association attribute in the configuration item classification;
the search module 602 is specifically configured to:
determining an associated configuration item example in the ith associated configuration item classification according to the associated attribute value of the ith associated attribute and an associated relation table corresponding to the ith associated attribute;
and determining the associated attribute value of the (i + 1) th associated attribute according to the associated configuration item examples in the ith associated configuration item classification and the data table corresponding to the (i + 1) th associated attribute.
Optionally, the computing device 600 further includes a processing module 603 configured to:
acquiring each configuration item instance, and classifying the configuration item instances according to a set rule to obtain a plurality of configuration item classifications;
for any two configuration item classifications in the plurality of configuration item classifications, if the any two configuration item classifications are determined to have the same attribute, determining that an association relationship exists between the any two configuration item classifications, and setting the relationship type of the association relationship according to the same attribute;
and obtaining the configuration item classification relation graph according to the incidence relation between any two configuration item classifications and the relation type.
Based on the same inventive concept, the embodiment of the present invention also provides another computing device, which may include a Central Processing Unit (CPU), a memory, an input/output device, etc., the input device may include a keyboard, a mouse, a touch screen, etc., and the output device may include a display device, such as a liquid crystal display (L acquired crystal display, <tttranslation = L "&tttl/t &tttcd), a Cathode Ray Tube (Cathode Ray Tube, CRT), etc.
The memory may include Read Only Memory (ROM) and Random Access Memory (RAM), and provides the processor with program instructions and data stored in the memory. In an embodiment of the present invention, the memory may be used to store a program of the above-described search method of the configuration item information.
The processor is used for executing the searching method of the configuration item information according to the obtained program instruction by calling the program instruction stored in the memory.
Based on the same inventive concept, embodiments of the present invention provide a computer storage medium for storing computer program instructions for the above-described computing device, which contains a program for executing the above-described search method for configuration item information.
The computer storage media may be any available media or data storage device that can be accessed by a computer, including but not limited to magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND F L ASH), Solid State Disks (SSDs)), etc.
From the above, it can be seen that:
in the embodiment of the invention, when searching the configuration item information, the configuration item classification to which the known configuration item example belongs is determined, then the association path between the known configuration item classification and the target configuration item classification is searched according to the configuration classification relation graph, and the target configuration item example is determined from each example corresponding to the target configuration item classification through the association attribute between each configuration item classification in the association path and the known configuration item example. Compared with the prior art, the embodiment of the invention only stores the association relationship between the configuration item classifications, and stores the association relationship between any one configuration item classification and each other configuration item classification in the configuration item classification relationship graph by adopting the graph data structure, so that when the configuration item information is searched, the association path between the known configuration item classification and the target configuration item classification is searched through the configuration item classification relationship graph, the searching efficiency can be effectively improved, and the occurrence of data isolation faults can be avoided.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (9)
1. A method for searching configuration item information, the method comprising:
determining a known configuration item classification to which the known configuration item instance belongs;
determining an association path between the known configuration item classification and a target configuration item classification according to a configuration item classification relation graph, wherein the association path at least comprises association attributes, and the association attributes between any two configuration item classifications are the same attributes of any two configuration item classifications;
and determining a target configuration item instance from the instances corresponding to the target configuration item classification according to the known configuration item instance and the association attribute.
2. The method according to claim 1, wherein the association path comprises m association configuration item classifications and m +1 association attributes, m being an integer greater than or equal to 0; the association path from the known configuration item classification to the target configuration item classification is: when m is 0, the known configuration item classification is associated with the target associated configuration item classification through a 1 st associated attribute; when m is not 0, the known configuration item classification is associated with the 1 st associated configuration item classification through the 1 st associated attribute, the ith configuration item classification is associated with the i +1 th associated configuration item classification through the i +1 th associated attribute, the mth associated configuration item classification is associated with the target configuration item classification through the m +1 th associated attribute, and i is an integer greater than or equal to 0 and less than or equal to m;
determining a target configuration item instance from the instances corresponding to the target configuration item classification according to the known configuration item instance and the association attribute, including:
determining the associated attribute value of the 1 st associated attribute corresponding to the known configuration item instance;
and determining the associated attribute value of the (i + 1) th associated attribute corresponding to the associated attribute value of the ith associated attribute from the configuration table of the ith associated configuration item classification until the target configuration item instance is determined.
3. The method according to claim 2, wherein the configuration table of the configuration item classification includes a data table corresponding to each attribute and an association table corresponding to each associated attribute in the configuration item classification;
determining the associated attribute value of the (i + 1) th associated attribute corresponding to the associated attribute value of the ith associated attribute from the configuration table of the ith associated configuration item classification, wherein the method comprises the following steps:
determining an associated configuration item example in the ith associated configuration item classification according to the associated attribute value of the ith associated attribute and an associated relation table corresponding to the ith associated attribute;
and determining the associated attribute value of the (i + 1) th associated attribute according to the associated configuration item examples in the ith associated configuration item classification and the data table corresponding to the (i + 1) th associated attribute.
4. The method of claim 1, wherein the configuration item classification relationship graph is obtained by:
acquiring each configuration item instance, and classifying the configuration item instances according to a set rule to obtain a plurality of configuration item classifications;
for any two configuration item classifications in the plurality of configuration item classifications, if the any two configuration item classifications are determined to have the same attribute, determining that an association relationship exists between the any two configuration item classifications, and setting the relationship type of the association relationship according to the same attribute;
and obtaining the configuration item classification relation graph according to the incidence relation between any two configuration item classifications and the relation type.
5. A computing device that configures a search for item information, the computing device comprising:
the determining module is used for determining the classification of the known configuration items to which the known configuration item instances belong;
the searching module is used for determining an association path between the known configuration item classification and the target configuration item classification according to the configuration item classification relation graph, wherein the association path at least comprises association attributes, and the association attributes between any two configuration item classifications are the same attributes of any two configuration item classifications;
the searching module is further configured to determine a target configuration item instance from the instances corresponding to the target configuration item classification according to the known configuration item instance and the association attribute.
6. The computing device of claim 5, wherein the association path includes m association configuration item classifications and m +1 association attributes, m being an integer greater than or equal to 0; the association path from the known configuration item classification to the target configuration item classification is: when m is 0, the known configuration item classification is associated with the target associated configuration item classification through a 1 st associated attribute; when m is not 0, the known configuration item classification is associated with the 1 st associated configuration item classification through the 1 st associated attribute, the ith configuration item classification is associated with the i +1 th associated configuration item classification through the i +1 th associated attribute, the mth associated configuration item classification is associated with the target configuration item classification through the m +1 th associated attribute, and i is an integer greater than or equal to 0 and less than or equal to m;
the search module is specifically configured to:
determining the associated attribute value of the 1 st associated attribute corresponding to the known configuration item instance;
and determining the associated attribute value of the (i + 1) th associated attribute corresponding to the associated attribute value of the ith associated attribute from the configuration table of the ith associated configuration item classification until the target configuration item instance is determined.
7. The computing device of claim 6, wherein the configuration table of the configuration item classification includes a data table corresponding to each attribute and an association table corresponding to each association attribute in the configuration item classification;
the search module is specifically configured to:
determining an associated configuration item example in the ith associated configuration item classification according to the associated attribute value of the ith associated attribute and an associated relation table corresponding to the ith associated attribute;
and determining the associated attribute value of the (i + 1) th associated attribute according to the associated configuration item examples in the ith associated configuration item classification and the data table corresponding to the (i + 1) th associated attribute.
8. The computing device of claim 5, further comprising a processing module to:
acquiring each configuration item instance, and classifying the configuration item instances according to a set rule to obtain a plurality of configuration item classifications;
for any two configuration item classifications in the plurality of configuration item classifications, if the any two configuration item classifications are determined to have the same attribute, determining that an association relationship exists between the any two configuration item classifications, and setting the relationship type of the association relationship according to the same attribute;
and obtaining the configuration item classification relation graph according to the incidence relation between any two configuration item classifications and the relation type.
9. A computer storage medium having computer-executable instructions stored thereon for causing a computer to perform the method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711173520.2A CN107832446B (en) | 2017-11-22 | 2017-11-22 | Configuration item information searching method and computing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711173520.2A CN107832446B (en) | 2017-11-22 | 2017-11-22 | Configuration item information searching method and computing device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107832446A CN107832446A (en) | 2018-03-23 |
CN107832446B true CN107832446B (en) | 2020-07-14 |
Family
ID=61652604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711173520.2A Active CN107832446B (en) | 2017-11-22 | 2017-11-22 | Configuration item information searching method and computing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107832446B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109683989A (en) * | 2018-12-26 | 2019-04-26 | 北京中亦安图科技股份有限公司 | The automatic acquiring method and device of incidence relation between a kind of configuration item |
CN110532371B (en) * | 2019-07-08 | 2020-08-07 | 北京中亦安图科技股份有限公司 | Full-text retrieval method and device based on configuration management database and electronic equipment |
CN113656139B (en) * | 2021-08-27 | 2024-06-04 | 上海云轴信息科技有限公司 | Interface rule adding method and device |
CN113810235B (en) * | 2021-09-22 | 2024-02-23 | 国网吉林省电力有限公司 | CMDB automatic operation and maintenance management method and system based on configuration intelligent discovery |
CN114610407B (en) * | 2022-03-10 | 2024-10-11 | 中国建设银行股份有限公司 | Method and device for creating configuration management object, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5937189A (en) * | 1996-11-12 | 1999-08-10 | International Business Machines Corporation | Object oriented framework mechanism for determining configuration relations |
CN103562863A (en) * | 2011-04-04 | 2014-02-05 | 惠普发展公司,有限责任合伙企业 | Creating a correlation rule defining a relationship between event types |
-
2017
- 2017-11-22 CN CN201711173520.2A patent/CN107832446B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5937189A (en) * | 1996-11-12 | 1999-08-10 | International Business Machines Corporation | Object oriented framework mechanism for determining configuration relations |
CN103562863A (en) * | 2011-04-04 | 2014-02-05 | 惠普发展公司,有限责任合伙企业 | Creating a correlation rule defining a relationship between event types |
Non-Patent Citations (1)
Title |
---|
CMDB配置管理系统研究及设计;王刚;《中国优秀硕士学位论文全文数据库信息科技辑》;20160415(第4期);第I138-718页 * |
Also Published As
Publication number | Publication date |
---|---|
CN107832446A (en) | 2018-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107832446B (en) | Configuration item information searching method and computing device | |
US11710131B2 (en) | Method and apparatus of identifying a transaction risk | |
US20220342693A1 (en) | Custom placement policies for virtual machines | |
CN107665228B (en) | Associated information query method, terminal and equipment | |
US9003222B2 (en) | Configuration fault localization in shared resource environments | |
CN107092491B (en) | Configuration loading method and system | |
CN106557486A (en) | A kind of storage method and device of data | |
US8719788B2 (en) | Techniques for dynamically determining test platforms | |
CN112181804A (en) | Parameter checking method, equipment and storage medium | |
JP2019523952A (en) | Streaming data distributed processing method and apparatus | |
US10656934B2 (en) | Efficient software testing | |
CN110084486B (en) | Resource management method and device | |
US11449407B2 (en) | System and method for monitoring computing platform parameters and dynamically generating and deploying monitoring packages | |
JP2011138405A (en) | System, apparatus and method for estimating failure part | |
JP2023522882A (en) | Dynamic detection and correction of data quality issues | |
CN106897342A (en) | A kind of data verification method and equipment | |
TW201816627A (en) | Resource scheduling method, device, and system | |
TW201727517A (en) | Data storage and service processing method and device | |
US11797487B2 (en) | Maintaining stable record identifiers in the presence of updated data records | |
US11847120B2 (en) | Performance of SQL execution sequence in production database instance | |
US10379973B2 (en) | Allocating storage in a distributed storage system | |
CN106570029B (en) | Data processing method and system for distributed relational database | |
US10762088B2 (en) | Automated database manager | |
CN110532248B (en) | CMDB-based server application information acquisition and adjustment method | |
CN110928941A (en) | Data fragment extraction method and device |
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 |