CN112671821B - Cloud computing network equipment configuration difference comparison method - Google Patents

Cloud computing network equipment configuration difference comparison method Download PDF

Info

Publication number
CN112671821B
CN112671821B CN202010834685.5A CN202010834685A CN112671821B CN 112671821 B CN112671821 B CN 112671821B CN 202010834685 A CN202010834685 A CN 202010834685A CN 112671821 B CN112671821 B CN 112671821B
Authority
CN
China
Prior art keywords
configuration
difference
map1
equipment
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010834685.5A
Other languages
Chinese (zh)
Other versions
CN112671821A (en
Inventor
刘永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Unicloud Technology Co Ltd
Original Assignee
Unicloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Unicloud Technology Co Ltd filed Critical Unicloud Technology Co Ltd
Priority to CN202010834685.5A priority Critical patent/CN112671821B/en
Publication of CN112671821A publication Critical patent/CN112671821A/en
Application granted granted Critical
Publication of CN112671821B publication Critical patent/CN112671821B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method for comparing configuration differences of cloud computing network equipment, which comprises the following steps: s1, configuring an xml format by equipment, generating a unique hash value by each xml node, and storing the hash value in a key: map1 of value; s2, generating an xml node through each record of the database elements, wherein each node also generates a hash value which is stored in a key: map2 of value; s3, comparing by key of Map1 and Map 2; and S4, sequentially traversing the set 1 and the set 2 through circulation. According to the cloud computing network equipment configuration difference comparison method, the inquiry equipment configuration function is added on the basis of the original function, the configuration of the module under the equipment is obtained through the netconf protocol according to different characteristic modules of the equipment, the configuration difference between the equipment and the database can be rapidly compared, and the configuration information of the equipment is ensured to be consistent with the configuration information of the database.

Description

Cloud computing network equipment configuration difference comparison method
Technical Field
The invention belongs to the field of cloud computing network equipment, and particularly relates to a cloud computing network equipment configuration difference comparison method.
Background
The controller that currently issues configuration to the data center may cause mismatch between the device configuration and the database configuration due to issues such as failure of issuing, and once the device configuration fails to issue, or configuration information is manually issued on the device, the device configuration may cause mismatch between the device configuration and the database configuration, which may cause device configuration residue to affect the network device performance.
Disclosure of Invention
In view of this, the present invention provides a method for comparing configuration differences of cloud computing network devices to solve the above-mentioned problems.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a cloud computing network device configuration difference comparison method comprises the following steps:
s1, configuring an xml format by equipment, generating a unique hash value by each xml node, and storing the hash value in a key: map1 of value;
s2, generating an xml node through each record of the database elements, wherein each node also generates a hash value which is stored in a key: map2 of value;
s3, comparing by key of Map1 and Map 2;
s4, sequentially traversing the set 1 and the set 2 in a circulating manner;
s5, analyzing whether the keywords of the two xml node nodes are consistent, if so, putting the keywords into a difference list, and removing the keywords from the Map1 and the Map 2;
s6, if the difference is not consistent, respectively keeping the difference in Map1 and Map 2;
and S7, the rest Map1 and Map2 represent the redundant configuration of the equipment and the less-equipment configuration respectively.
Further, step S1 is used to find a unique corresponding xml node value through the hash value.
Further, the method for key comparison between Map1 and Map2 in step S3 is: the keys of the two maps generate a set 1 and a set 2, and a difference set of the sets is taken, namely different data needing to be compared between the two maps 1 and 2.
Further, the configuration with few devices in step S7 is the configuration with many databases.
Compared with the prior art, the cloud computing network equipment configuration difference comparison method has the following advantages:
(1) According to the cloud computing network equipment configuration difference comparison method, an efficient comparison algorithm is adopted, equipment configuration and database configuration difference are synchronized, equipment and database configuration are consistent, redundant configuration of the equipment is reduced, and equipment performance is improved;
(2) According to the cloud computing network equipment configuration difference comparison method, the inquiry equipment configuration function is added on the basis of the original function, the configuration of the module under the equipment is obtained through the netconf protocol according to different characteristic modules of the equipment, the configuration difference between the equipment and the database can be rapidly compared, and the configuration information of the equipment is ensured to be consistent with the configuration information of the database.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
fig. 1 is a schematic diagram illustrating a comparative flow of device configuration according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a system architecture description of a method for comparing configuration differences of cloud computing network devices according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art through specific situations.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1 and fig. 2, a cloud computing network device configuration difference comparing method includes the following steps:
s1, configuring an xml format by the equipment, generating a unique hash value by each xml node, and storing the hash value in a key: map1 of value;
s2, generating an xml node through each record of the database elements, wherein each node also generates a hash value which is stored in a key: map2 of value;
s3, comparing by key of Map1 and Map 2;
s4, sequentially traversing the set 1 and the set 2 in a circulating manner;
s5, analyzing whether the keywords of the two xml node nodes are consistent, if so, putting the keywords into a difference list, and removing the keywords from the Map1 and the Map 2;
s6, if the difference is not consistent, respectively keeping the difference in Map1 and Map 2;
and S7, the rest Map1 and Map2 represent the redundant configuration of the equipment and the less-equipment configuration respectively.
Step S1 is used for finding the only corresponding xml node value through the hash value.
The method for comparing Map1 and Map2 by key in step S3 is as follows: the keys of the two maps generate a set 1 and a set 2, and a difference set of the sets is taken, namely different data needing to be compared between the two maps 1 and 2.
The configuration with less devices in step S7 is the configuration with more databases.
As shown in fig. 1, the device agent service is responsible for receiving instructions from the network controller and obtaining configuration information of each module to be compared from the database.
The device agent also needs to obtain the configuration of the modules from the devices in turn, and compare the configuration through a comparison algorithm. Finally, three arrays are generated, wherein one array represents redundant configuration of the device, one array represents configuration with more databases (namely configuration with less devices), and one array stores different configurations of the device and non-critical fields of the configuration of the databases.
Since the format returned by the device is xml format, unlike database format, the design of the comparison algorithm determines the performance of the comparison.
As shown in fig. 2, the device configuration comparison process includes the following steps: 1. the device is configured with an xml format, each xml node generates a unique hash value, and the hash value is stored in a key: in Map1 of value, that is, a unique value (corresponding xml node) can be found through the hash value;
2. generating an xml node through each record of the database element, wherein each node also generates a hash value which is stored in a key: map2 of value;
3. comparing the keys of Map1 and Map2, namely generating a set 1 and a set 2 by the keys of the two maps, and taking the difference set of the sets, namely the different data to be compared of the two maps 1 and Map 2;
4. sequentially traversing the set 1 and the set 2 through circulation;
5. analyzing whether the keywords of the two xml node nodes are consistent, if so, putting the keywords into a difference list, and removing the keywords from Map1 and Map 2;
6. if not, respectively keeping in Map1 and Map 2;
7. the remaining maps 1 and 2 represent the device redundant configuration and the device less configuration (i.e., the database more configuration), respectively.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (4)

1. A cloud computing network equipment configuration difference comparison method is characterized by comprising the following steps:
s1, configuring an xml format by equipment, generating a unique hash value by each xml node, and storing the hash value in a key: map1 of value;
s2, generating an xml node through each record of the database elements, wherein each node also generates a hash value which is stored in a key: map2 of value;
s3, comparing Map1 and Map2 by key, wherein the comparison method comprises the following steps: generating a set 1 and a set 2 through keys of Map1 and Map2, and taking a difference set of the set 1 and the set 2 as different data to be compared between the two maps 1 and Map 2;
s4, sequentially traversing the set 1 and the set 2 in a circulating manner;
s5, analyzing whether the keywords of the two xml node nodes are consistent, if so, putting the keywords into a difference list, and removing the keywords from the Map1 and the Map 2;
s6, if the difference is not consistent, respectively keeping the difference in Map1 and Map 2;
s7, the rest Map1 and Map2 represent redundant configuration of equipment and less configuration of equipment respectively, and the less configuration of equipment is configuration with more databases;
in step S5, the proxy service of the device is responsible for receiving an instruction of the network controller, and obtaining configuration information of each module to be compared from the database; similarly, the agent program of the device needs to sequentially acquire the configuration of the module from the device, and the configuration is compared through a comparison algorithm, so that three arrays are finally generated, wherein the three arrays respectively represent redundant configuration of the device, configuration with many databases, and different configurations of non-key fields of the storage device and the database configuration.
2. The method for comparing the configuration difference of the cloud computing network equipment according to claim 1, wherein: step S1 is used to find the only corresponding xml node value through the hash value.
3. The method for comparing the configuration difference of the cloud computing network equipment according to claim 1, wherein: the method for comparing Map1 and Map2 by key in step S3 is as follows: the keys of the two maps generate a set 1 and a set 2, and the difference set of the sets is different data to be compared between the two maps 1 and 2.
4. The method for comparing the configuration difference of the cloud computing network equipment according to claim 1, wherein: the configuration with less devices in step S7 is the configuration with more databases.
CN202010834685.5A 2020-08-17 2020-08-17 Cloud computing network equipment configuration difference comparison method Active CN112671821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010834685.5A CN112671821B (en) 2020-08-17 2020-08-17 Cloud computing network equipment configuration difference comparison method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010834685.5A CN112671821B (en) 2020-08-17 2020-08-17 Cloud computing network equipment configuration difference comparison method

Publications (2)

Publication Number Publication Date
CN112671821A CN112671821A (en) 2021-04-16
CN112671821B true CN112671821B (en) 2023-04-18

Family

ID=75403204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010834685.5A Active CN112671821B (en) 2020-08-17 2020-08-17 Cloud computing network equipment configuration difference comparison method

Country Status (1)

Country Link
CN (1) CN112671821B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412996A (en) * 2011-11-24 2012-04-11 烽火通信科技股份有限公司 Method for carrying out rapid checking and verification on service information based on XML (extensive makeup language) NE (network element) dynamic script information
CN103577746A (en) * 2013-11-08 2014-02-12 国家电网公司 XML configuration-based detection method for authorization difference between information systems
CN103902666A (en) * 2014-03-11 2014-07-02 国家电网公司 Configuration file collecting and monitoring method based on OGG database replication
CN108334622A (en) * 2018-02-08 2018-07-27 竞技世界(北京)网络技术有限公司 A method of it obtains and formats complex data
CN109739934A (en) * 2019-01-08 2019-05-10 厦门投融汇网络有限公司 Difference set account checking method, medium, computer equipment and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412996A (en) * 2011-11-24 2012-04-11 烽火通信科技股份有限公司 Method for carrying out rapid checking and verification on service information based on XML (extensive makeup language) NE (network element) dynamic script information
CN103577746A (en) * 2013-11-08 2014-02-12 国家电网公司 XML configuration-based detection method for authorization difference between information systems
CN103902666A (en) * 2014-03-11 2014-07-02 国家电网公司 Configuration file collecting and monitoring method based on OGG database replication
CN108334622A (en) * 2018-02-08 2018-07-27 竞技世界(北京)网络技术有限公司 A method of it obtains and formats complex data
CN109739934A (en) * 2019-01-08 2019-05-10 厦门投融汇网络有限公司 Difference set account checking method, medium, computer equipment and system

Also Published As

Publication number Publication date
CN112671821A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
US20220405277A1 (en) Joining large database tables
Xue et al. A scalable location management scheme in mobile ad-hoc networks
US8793351B2 (en) Automated configuration of new racks and other computing assets in a data center
US7065562B2 (en) System and method for generating a representation of a configuration schema
CN109089398B (en) Method for determining slot position of equipment rack
US20160012118A1 (en) System and methods for mapping and searching objects in multidimensional space
CN113901131B (en) Index-based on-chain data query method and device
EP2713555B1 (en) Data configuration method and device, and rollback method and device for data configuration
CN111309523A (en) Data reading and writing method, data remote copying method and device and distributed storage system
CN112632065A (en) Data storage method and device, storage medium and server
CN112671821B (en) Cloud computing network equipment configuration difference comparison method
CN114372058A (en) Spatial data management method and device, storage medium and block chain system
CN103152198A (en) Micro-server-based automatic asset management method and device
CN112306996A (en) Method for realizing joint query and rapid data migration among multiple clusters
US7509405B2 (en) Method and apparatus for inferring topology of a network
CN115442201B (en) Method and equipment for dynamically collecting EMS data based on SNMP agent
CN115955489A (en) Cloud storage-oriented onboard software possession proving method
CN107066581B (en) The storage of distributed traffic monitor video data and quick retrieval system
CN115314518A (en) Internet of things management method and system and computer readable storage medium
TW201328245A (en) Generating method for container topology
CN111858956A (en) Knowledge graph construction method and device, network equipment and storage medium
Ma et al. Multi-sourced data storage and index construction for equipment condition assessment
CN111831742A (en) Smart city video positioning method and system
US20230344904A1 (en) Method, electronic device, and computer program product for looking up data
CN117539962B (en) Data processing method, device, computer equipment and storage medium

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