CN114153892A - Node coding and checking method for data center, terminal and storage medium - Google Patents

Node coding and checking method for data center, terminal and storage medium Download PDF

Info

Publication number
CN114153892A
CN114153892A CN202111265682.5A CN202111265682A CN114153892A CN 114153892 A CN114153892 A CN 114153892A CN 202111265682 A CN202111265682 A CN 202111265682A CN 114153892 A CN114153892 A CN 114153892A
Authority
CN
China
Prior art keywords
node
nodes
checked
target
codes
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
CN202111265682.5A
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.)
Xiamen Kehua Digital Energy Tech Co Ltd
Original Assignee
Kehua Data Co Ltd
Xiamen Kehua Digital Energy Tech 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 Kehua Data Co Ltd, Xiamen Kehua Digital Energy Tech Co Ltd filed Critical Kehua Data Co Ltd
Priority to CN202111265682.5A priority Critical patent/CN114153892A/en
Publication of CN114153892A publication Critical patent/CN114153892A/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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2468Fuzzy queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The invention provides a node coding and checking method, a terminal and a storage medium for a data center. The method comprises the following steps: determining the serial numbers of all nodes of the level where the nodes are located, taking the serial numbers as subsequent codes of the nodes, and determining the level codes of father nodes of the nodes as front-order codes; combining the pre-sequence code and the subsequent code to be used as the grade code of the node; wherein, the serial numbers of the nodes in each hierarchy have the same number of bits; when the nodes to be associated are bound to the target nodes, if the nodes to be associated are not coded, the target nodes are taken as father nodes, and the sequence numbers of the nodes to be associated in all nodes of the level where the nodes to be associated are located and the subsequent operation are determined; otherwise, fuzzy query is carried out according to the grade codes of the nodes to be associated and the target nodes respectively, binding check is carried out based on the query result, and the nodes to be associated are bound to the target nodes when the binding conditions are met. The invention can simplify the node coding process, improve the verification reliability and avoid abnormal configuration.

Description

Node coding and checking method for data center, terminal and storage medium
Technical Field
The invention relates to the technical field of data centers, in particular to a node coding and checking method, a terminal and a storage medium for a data center.
Background
The data center has a link topology and supports manual drawing, and the nodes can have a plurality of father nodes and a plurality of child nodes due to flexible configuration. By utilizing the existing coding mode, if the equipment nodes bound by the nodes are the existing nodes, the equipment nodes are combined into the same node, and the parent-child relationship is associated by adopting a node main key. And recursion of the parent node main key array is adopted to obtain all the parent nodes or child nodes. If the new child node exists, merging is carried out by adding the new bound parent node primary key to the existing parent node array of the child node, and the new bound parent node primary key is separated by commas.
As shown in fig. 1, node a has a parent node B, and node B has a parent node C. At this time, if a child node D is newly added to the node a, and the bound device measurement point is the same as that of the node C, the parent nodes of the node D are a and C, and the parent node of the node C is a, a loop is formed, and memory leakage is caused by using a conventional recursive algorithm, so that it is necessary to check whether a loop phenomenon exists in the parent node of the node D. Even if the device measurement point of node D is the same as that of node A, the parent nodes of node A are A and B, which results in node A dead-cycle. Both phenomena encode nodes based on the existing encoding mode, and all father nodes of the node A cannot be traversed by a recursive algorithm. Therefore, the reliability is checked based on the existing coding mode, and the equipment is configured according to the data center link topology, so that abnormal configuration is easily caused, and memory leakage is caused.
Disclosure of Invention
The embodiment of the invention provides a node coding and checking method, a terminal and a storage medium for a data center, and aims to solve the problem that the existing coding mode is poor in checking reliability and memory leakage is easily caused by abnormal configuration.
In a first aspect, an embodiment of the present invention provides a node encoding method for a data center, including:
determining the serial numbers of all nodes of the level where the nodes are located, taking the serial numbers as subsequent codes of the nodes, and determining the level codes of father nodes of the nodes as front-order codes;
combining the pre-sequence code and the subsequent code as a grade code of a node; wherein, the serial numbers of the nodes in each hierarchy have the same number of bits;
when a node to be associated is bound to a target node, if the node to be associated is not coded, the target node is taken as a father node, and the operation of determining the sequence numbers of the node to be associated in all nodes of the level where the node to be associated is located and the sequence numbers of the node to be associated behind the node to be associated is executed; otherwise, fuzzy query is carried out according to the grade codes of the nodes to be associated and the target node, binding check is carried out based on the query result, and the nodes to be associated are bound to the target node when the binding condition is met.
In one possible implementation, the binding condition includes:
and the intersection of the fuzzy query result of the node to be associated and the fuzzy query result of the grade code of the target node is empty.
In a possible implementation manner, the performing fuzzy query according to the level codes of the node to be associated and the target node respectively includes:
intercepting the level codes of the nodes to be associated according to different levels, performing fuzzy query according to the interception result, determining a node ID set of all nodes of a branch where the nodes to be associated are located, and taking the node ID set as the fuzzy query result of the nodes to be associated;
intercepting the level codes of the target nodes according to different levels, performing fuzzy query according to the interception result, determining father node ID sets of all nodes of the branch where the target nodes are located, and taking the node ID sets as fuzzy query results of the target nodes; where each node has a parent node ID array.
In a possible implementation manner, after the node to be associated is bound to the target node, the method further includes:
and adding the ID of the target node into the parent node ID array of the node to be associated.
In one possible implementation, the method further includes:
and generating binding prohibition prompt information when the binding condition is not met.
In a second aspect, an embodiment of the present invention provides a node checking method for a data center, including:
determining a father node ID array of a node to be checked;
and when the father node ID array contains the node ID of the node to be checked, determining that a link generates a dead cycle.
In a possible implementation manner, the node checking method further includes:
when the father node ID array does not contain the node ID of the node to be checked, inquiring according to the grade code of the node to be checked to determine the child node of the node to be checked;
and when the node to be checked comprises a child node and the father node ID array comprises the child node ID of the node to be checked, determining that a loop exists in the link.
In a possible implementation manner, when the node to be checked does not include a child node, or when the node to be checked includes a child node and the parent node ID array does not include the child node ID of the node to be checked, the check is passed.
In a third aspect, an embodiment of the present invention provides a node encoding apparatus for a data center, including:
the first determining module is used for determining the serial numbers of all nodes of the level where the nodes are located, taking the serial numbers as subsequent codes of the nodes, and determining the level codes of father nodes of the nodes as the previous codes;
the combination module is used for combining the front-sequence codes and the subsequent codes to be used as the grade codes of the nodes; wherein, the serial numbers of the nodes in each hierarchy have the same number of bits;
the binding module is used for binding the node to be associated to a target node, and if the node to be associated is not coded, the target node is taken as a father node; otherwise, fuzzy query is carried out according to the grade codes of the nodes to be associated and the target node, binding check is carried out based on the query result, and the nodes to be associated are bound to the target node when the binding condition is met.
In a possible implementation manner, the node encoding apparatus further includes:
and the adding module is used for adding the ID of the target node into the father node ID array of the node to be associated after the node to be associated is bound to the target node.
In a possible implementation manner, the node encoding apparatus further includes:
and the prompting module is used for generating binding prohibition prompting information when the binding condition is not met.
In a fourth aspect, an embodiment of the present invention provides a node checking apparatus for a data center, including:
the second determination module is used for determining a father node ID array of the node to be checked;
and the judging module is used for determining that the link generates dead cycle when the father node ID array contains the node ID of the node to be checked.
In a possible implementation manner, the second determining module is further configured to, when the parent node ID array does not include the node ID of the node to be checked, query and determine a child node of the node to be checked according to the level code of the node to be checked;
the judging module is further configured to determine that a link has a loop when the node to be checked includes a child node and the parent node ID array includes the child node ID of the node to be checked.
In a possible implementation manner, the determining module is further configured to pass the check when the node to be checked does not include a child node, or when the node to be checked includes a child node and the parent node ID array does not include the child node ID of the node to be checked.
In a fifth aspect, an embodiment of the present invention provides a terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the computer program, implements the steps of the method according to the first aspect or any possible implementation manner of the first aspect.
In a sixth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the method according to the first aspect or any one of the possible implementation manners of the first aspect.
The embodiment of the invention provides a node coding and checking method, a terminal and a storage medium for a data center. And a hierarchical coding mode is adopted, and coding is carried out on different levels in the same coding mode, so that the coding process of the nodes is simplified, and the nodes are conveniently checked based on the hierarchical coding of the nodes. When the node to be associated is bound to the target node, if the node to be associated is not coded, the sequence numbers of the node to be associated in all nodes of the hierarchy where the node to be associated is located and the subsequent operation are determined. Otherwise, fuzzy query is carried out according to the grade codes of the nodes to be associated and the target nodes respectively, binding check is carried out based on the query result, and the nodes to be associated are bound to the target nodes when the binding conditions are met. And the binding condition is that the node to be associated and the target node belong to different branches. The node level codes determined based on the hierarchical coding mode are subjected to fuzzy query, all father nodes of the nodes can be quickly traversed, the configuration of the data center is completed based on the check result of the node level codes, and the memory leakage caused by abnormal configuration 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 embodiments or the prior art descriptions will be briefly described 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 link topology diagram provided by an embodiment of the present invention;
fig. 2 is an application scenario diagram of a node encoding method for a data center according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an implementation of a node encoding method for a data center according to an embodiment of the present invention;
fig. 4 is an application scenario diagram of a node encoding method for a data center according to another embodiment of the present invention;
fig. 5 is an application scenario diagram of a node encoding method for a data center according to another embodiment of the present invention;
fig. 6 is an application scenario diagram of a node encoding method for a data center according to another embodiment of the present invention;
fig. 7 is an application scenario diagram of a node encoding method for a data center according to another embodiment of the present invention;
FIG. 8 is a flowchart illustrating an implementation of a node checking method for a data center according to an embodiment of the present invention;
FIG. 9 is a flowchart of an implementation of a node checking method for a data center according to another embodiment of the present invention;
fig. 10 is a schematic diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
Fig. 2 is an application scenario diagram of a node encoding method for a data center according to an embodiment of the present invention. As shown in fig. 2, the data center equipment room includes an electrical room and a data equipment room, the equipment in the electrical room includes switching equipment and an Uninterruptible Power Supply (UPS), and the equipment in the data equipment room includes a Power distribution cabinet and an IT load. Based on fig. 2, a link topology can be plotted, wherein nodes in the link topology are connected to an entity device of a data center.
Wherein the switching device may be connected to one or more UPSs. Fig. 2 illustrates only one UPS connected to the switching device. The UPS is connected with the power distribution cabinets and is used for providing uninterrupted power supply for the power distribution cabinets. The power distribution cabinet is connected with a plurality of IT loads and used for distributing electric energy for the connected IT loads. When the connection of the relevant device is not performed according to the correct link structure, for example: a certain device node generates dead circulation or locally forms a loop, so that the memory leakage is easily caused by abnormal configuration.
The invention aims to provide an optimized coding method to simplify coding and checking aiming at nodes in a link topology of a data center.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following description is made by way of specific embodiments with reference to the accompanying drawings.
Referring to fig. 3, it shows a flowchart of an implementation of a node encoding method for a data center according to an embodiment of the present invention, as shown in the figure, the method includes the following steps:
s301, determining the serial numbers of all nodes of the hierarchy where the nodes are located, taking the serial numbers as subsequent codes of the nodes, and determining the grade codes of the father nodes of the nodes as the front-order codes.
S302, combining the preamble codes and the subsequent codes to be used as the grade codes of the nodes; wherein the serial numbers of the nodes in each level have the same number of bits.
The embodiment of the invention introduces a new level coding mode, takes the serial number of the node in each level as three digits, takes the serial number range from 001 to 999 as an example for explanation, and the coding rule is as follows:
the root node is a first level, the node level coding of the first level is from 001 to 999 in sequence, and each level supports 999 nodes. The mounted level is the second level below the root node, the first three bits of the level code are the level code of the mounted first level, the fourth bit to the sixth bit are from 001 to 999, and the like, and the level code of the Nth level is composed of the level code of the Nth-1 level and one of the 001 to 999.
If two nodes have a common child node, the level code of the child node is based on the principle of first generation, the level code of the node a is extended on the basis of the parent node B, and the child node a is bound with the node E in the same level as the node B, so that the level code of the node a is unchanged, as shown in fig. 4:
node C has a level code of 001, node B has a level code of 001001, node E has a level code of 001002, and node a has a level code of 001001001.
S303, when the node to be associated is bound to the target node, if the node to be associated is not coded, the target node is taken as a father node, and the sequence numbers of the node to be associated in all nodes of the level where the node to be associated is located and the subsequent operation are determined; otherwise, fuzzy query is carried out according to the grade codes of the nodes to be associated and the target nodes respectively, binding check is carried out based on the query result, and the nodes to be associated are bound to the target nodes when the binding conditions are met.
Taking the embodiment shown in fig. 5 as an example, the child node F generated at the parent node E, that is, the child node F is a node to be associated, and the parent node E is a target node. And if the child node F does not exist and belongs to the newly added node, the node F expands on the basis of the grade code of the father node E.
Specifically, the level code of node C is 001, the level code of node B is 001001, the level code of node E is 001002, the level code of node a is 001001001, and the level code of node F is 001002001.
In a possible implementation manner, when the node to be associated is bound to the target node, if the node to be associated is already encoded, it is necessary to avoid generating a dead loop or a loop.
In the embodiment of the invention, the serial numbers of all nodes of the level where the nodes are located are determined, the serial numbers are used as the subsequent codes of the nodes, the level codes of father nodes of the nodes are determined to be the front-end codes, the front-end codes and the subsequent codes are combined to be used as the level codes of the nodes, and the serial numbers of the nodes in each level have the same number of bits. And a hierarchical coding mode is adopted, and coding is carried out on different levels in the same coding mode, so that the coding process of the nodes is simplified, and the nodes are conveniently checked based on the hierarchical coding of the nodes. When the node to be associated is bound to the target node, if the node to be associated is not coded, the sequence numbers of the node to be associated in all nodes of the hierarchy where the node to be associated is located and the subsequent operation are determined. Otherwise, fuzzy query is carried out according to the grade codes of the nodes to be associated and the target nodes respectively, binding check is carried out based on the query result, and the nodes to be associated are bound to the target nodes when the binding conditions are met. And the binding condition is that the node to be associated and the target node belong to different branches. The node level codes determined based on the hierarchical coding mode are subjected to fuzzy query, all father nodes of the nodes can be quickly traversed, the configuration of the data center is completed based on the check result of the node level codes, and the memory leakage caused by abnormal configuration can be avoided.
In one possible implementation manner, in step S301, the binding condition includes: and the intersection of the fuzzy query result of the node to be associated and the fuzzy query result of the grade code of the target node is empty.
In a possible implementation manner, the fuzzy query is performed according to the level codes of the node to be associated and the target node, respectively, and includes:
intercepting grade codes of nodes to be associated according to different grades, performing fuzzy query according to an interception result, determining a node ID set of all nodes of a branch where the nodes to be associated are located, and taking the node ID set as a fuzzy query result of the nodes to be associated;
intercepting the level codes of the target nodes according to different levels, performing fuzzy query according to the interception result, determining father node ID sets of all nodes of the branch where the target nodes are located, and taking the node ID sets as fuzzy query results of the target nodes; where each node has a parent node ID array.
In one possible implementation manner, after the node to be associated is bound to the target node, the method further includes:
and adding the ID of the target node into the parent node ID array of the node to be associated.
Referring to fig. 6, a link topology diagram is shown in accordance with a particular embodiment. The coding mode provided by the embodiment of the invention can determine the following codes of each node:
the code of node 1 is 001; the code of node 2 is 001001; the code for node 3 is 001002; node 4 is encoded as 001001001; node 5 is encoded as 001001002; node 6 is encoded as 001002001; node 7 is encoded as 001002002; the code of node 8 is 001001002001; the code of node 9 is 001001002002; the code for node 10 is 001002001001.
When the node 5 to be bound is bound to the target node 3, the binding process comprises the following steps: and finding the associated nodes of the node 5 and the node 3 through encoding, and allowing connection if the associated nodes do not have parent-child relationship. Specifically, the binding process includes the following steps:
firstly, a node 5 can acquire all nodes of a branch where the node is located through coded interception and fuzzy query, and a node 3 can acquire all nodes of the branch where the node is located through coded interception and fuzzy query;
secondly, extracting the ids of all nodes of the branch where the node 3 is located to be 3, 6, 7 and 10;
thirdly, extracting father node ids of all nodes of the branch where the node 5 is located, wherein the father node ids are 2 and 5;
and fourthly, taking the intersection of the results extracted in the second step and the third step as empty, indicating that the node 5 can be bound to the node 3, merging the branch where the node 5 is located and the branch where the node 3 is located, and updating the father node ID array of the node 5 to be (2, 3).
Specifically, in the first step, the level codes of the nodes to be associated are intercepted according to different levels, for example, the node 5 includes 001, 001001, and 001001002, and the fuzzy query is performed based on the interception result, that is, the interception result is used as a parent node to obtain the node of the branch where the node 5 is located.
Referring to fig. 7, a link topology diagram is shown after a branch merge is performed according to the embodiment shown in fig. 5. As shown in fig. 6, when node 4 binds node 7, the binding process includes: the associated nodes of the node 4 and the node 7 are found through encoding, and if the associated nodes have a parent-child relationship, connection is not allowed. Specifically, the binding process includes the following steps:
firstly, a node 4 can acquire all nodes of a branch where the node is located through coded interception and fuzzy query, and a node 7 can acquire all nodes of the branch where the node is located through coded interception and fuzzy query;
secondly, extracting the ids of all nodes of the branch where the node 7 is located, wherein the ids are 3, 6, 7 and 10;
thirdly, extracting father node ids of all nodes of the branch where the node 4 is located, wherein the father node ids are 2, 3 and 5;
and fourthly, taking intersection as the result extracted in the second step and the third step, wherein the intersection is not empty, and the result is 3, which indicates that the branch where the node 4 and the node 7 are located is merged.
In one possible implementation, the method further includes: and when the binding condition is not met, generating binding prohibition prompt information to prompt that the equipment connection corresponding to the middle joint point in the data center is wrong.
Referring to fig. 8, it shows a flowchart of an implementation of a node encoding method for a data center according to an embodiment of the present invention, as shown in the figure, the method includes the following steps:
s801, determining a father node ID array of the node to be checked.
S802, when the father node ID array contains the node ID of the node to be checked, determining that the link generates a dead loop. When the parent node ID array includes the node ID of the node to be checked, if node connection is performed, the parent node of the node is connected to its own node, and the connection mode may cause dead cycle.
The coding method provided by the embodiment of the invention is used for checking without traversing the root node. Because the hierarchical coding mode is adopted, the same coding mode is adopted for coding different levels, and the checking process of the nodes is simplified.
In a possible implementation manner, the node checking method further includes:
when the father node ID array does not contain the node ID of the node to be checked, inquiring according to the grade code of the node to be checked to determine the child node of the node to be checked;
and when the node to be checked comprises the child node and the parent node ID array comprises the child node ID of the node to be checked, determining that a loop exists in the link. When the node to be checked includes a child node and the parent node ID array includes the child node ID of the node to be checked, if node connection is performed, the parent node of the node is the same as the parent node of the parent node, and the connection mode may cause a loop.
In a possible implementation manner, the node checking method further includes:
when the father node ID array does not contain the node ID of the node to be checked, inquiring according to the grade code of the node to be checked to determine the child node of the node to be checked;
and when the node to be checked comprises the child node and the parent node ID array comprises the child node ID of the node to be checked, determining that a loop exists in the link.
In a possible implementation manner, determining child nodes of a node to be checked by querying according to a hierarchical code of the node to be checked includes:
and intercepting the level codes of the nodes to be verified according to different levels, and performing fuzzy query according to the interception result to determine the child nodes of the nodes to be verified.
In a possible implementation manner, when the node to be checked does not include a child node, or when the node to be checked includes a child node and the parent node ID array does not include a child node ID of the node to be checked, the check is passed.
Referring to fig. 9, which shows a flowchart of an implementation of a node encoding method for a data center according to an embodiment of the present invention, as shown in the figure, the method includes the following steps:
s901, determining a father node ID array of the node to be checked.
S902, judging whether the father node ID array contains the node ID of the node to be checked, determining that a link generates a dead cycle when the father node ID array contains the node ID of the node to be checked, and executing the step S906; otherwise, step S903 is executed.
S903, inquiring and determining the child nodes of the nodes to be checked according to the grade codes of the nodes to be checked.
S904, judging whether the father node ID array of the node to be checked contains the child node ID of the node to be checked, when the node to be checked comprises the child node and the father node ID array contains the child node ID of the node to be checked, determining that a loop exists in the link, and executing step S906, otherwise executing step S905.
And S905, confirming that the check is passed.
And S906, generating link abnormity prompting information.
The embodiment of the invention provides a node coding device for a data center, which comprises: the device comprises a first determining module, a combining module and a binding module.
The first determining module is used for determining the serial numbers of all nodes of the hierarchy where the nodes are located, taking the serial numbers as subsequent codes of the nodes, and determining that the grade codes of father nodes of the nodes are the previous codes.
The combination module is used for combining the front-sequence codes and the subsequent codes to be used as the grade codes of the nodes; wherein the serial numbers of the nodes in each level have the same number of bits.
The binding module is used for binding the node to be associated to the target node, and if the node to be associated is not coded, the target node is taken as a father node; otherwise, fuzzy query is carried out according to the grade codes of the nodes to be associated and the target nodes respectively, binding check is carried out based on the query result, and the nodes to be associated are bound to the target nodes when the binding conditions are met.
In a possible implementation manner, the node encoding apparatus further includes: and the adding module is used for adding the ID of the target node into the father node ID array of the node to be associated after the node to be associated is bound to the target node.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In a possible implementation manner, the node encoding apparatus further includes: and the prompting module is used for generating binding prohibition prompting information when the binding condition is not met.
The embodiment of the invention provides a node checking device for a data center, which comprises: the device comprises a second determining module and a judging module.
And the second determining module is used for determining the father node ID array of the node to be checked.
And the judging module is used for determining that the link generates dead cycle when the father node ID array contains the node ID of the node to be checked.
In a possible implementation manner, the second determining module is further configured to query and determine a child node of the node to be checked according to the level code of the node to be checked when the parent node ID array does not include the node ID of the node to be checked.
And the judging module is also used for determining that a loop exists in the link when the node to be checked comprises the child node and the parent node ID array comprises the child node ID of the node to be checked.
In a possible implementation manner, the determining module is further configured to pass the check when the node to be checked does not include the child node, or when the node to be checked includes the child node and the parent node ID array does not include the child node ID of the node to be checked.
Fig. 10 is a schematic diagram of a terminal according to an embodiment of the present invention. As shown in fig. 10, the terminal 10 of this embodiment includes: a processor 100, a memory 101 and a computer program 102 stored in said memory 101 and executable on said processor 100. The processor 100 executes the computer program 102 to implement the steps in the above-mentioned node encoding method embodiments for a data center, such as the steps S301 to S302 shown in fig. 3. Alternatively, when the processor 100 executes the computer program 102, the steps in the above-mentioned node verification method embodiments for a data center are implemented, for example, step S801 to step S802 shown in fig. 8, and step S901 to step S906 shown in fig. 9.
Illustratively, the computer program 102 may be partitioned into one or more modules/units that are stored in the memory 101 and executed by the processor 100 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 102 in the terminal 10. For example, the computer program 102 may be divided into the modules/units 41 to 43 shown in fig. 4.
The terminal 10 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal 10 may include, but is not limited to, a processor 100, a memory 101. Those skilled in the art will appreciate that fig. 10 is only an example of a terminal 10 and does not constitute a limitation of the terminal 10, and that it may include more or less components than those shown, or some components in combination, or different components, e.g., the terminal may also include input output devices, network access devices, buses, etc.
The Processor 100 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 101 may be an internal storage unit of the terminal 10, such as a hard disk or a memory of the terminal 10. The memory 101 may also be an external storage device of the terminal 10, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal 10. Further, the memory 101 may also include both an internal storage unit and an external storage device of the terminal 10. The memory 101 is used for storing the computer program and other programs and data required by the terminal. The memory 101 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described apparatus/terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the above embodiments may also be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the above embodiments of the node encoding method for a data center or the node checking method for a data center. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A node encoding method for a data center, the method comprising:
determining the serial numbers of all nodes of the level where the nodes are located, taking the serial numbers as subsequent codes of the nodes, and determining the level codes of father nodes of the nodes as front-order codes;
combining the pre-sequence code and the subsequent code as a grade code of a node; wherein, the serial numbers of the nodes in each hierarchy have the same number of bits;
when a node to be associated is bound to a target node, if the node to be associated is not coded, the target node is taken as a father node, and the operation of determining the sequence numbers of the node to be associated in all nodes of the level where the node to be associated is located and the sequence numbers of the node to be associated behind the node to be associated is executed; otherwise, fuzzy query is carried out according to the grade codes of the nodes to be associated and the target node, binding check is carried out based on the query result, and the nodes to be associated are bound to the target node when the binding condition is met.
2. The method of claim 1, wherein the binding condition comprises:
and the intersection of the fuzzy query result of the node to be associated and the fuzzy query result of the grade code of the target node is empty.
3. The method according to claim 1 or 2, wherein the fuzzy query is performed according to the level codes of the node to be associated and the target node, respectively, and comprises:
intercepting the level codes of the nodes to be associated according to different levels, performing fuzzy query according to the interception result, determining a node ID set of all nodes of a branch where the nodes to be associated are located, and taking the node ID set as the fuzzy query result of the nodes to be associated;
intercepting the level codes of the target nodes according to different levels, performing fuzzy query according to the interception result, determining father node ID sets of all nodes of the branch where the target nodes are located, and taking the node ID sets as fuzzy query results of the target nodes; where each node has a parent node ID array.
4. The method of claim 3, further comprising, after binding the node to be associated to the target node:
and adding the ID of the target node into the parent node ID array of the node to be associated.
5. The method of claim 1, further comprising:
and generating binding prohibition prompt information when the binding condition is not met.
6. A node verification method for a data center, the method comprising:
determining a father node ID array of a node to be checked;
and when the father node ID array contains the node ID of the node to be checked, determining that a link generates a dead cycle.
7. The method of claim 6, further comprising:
when the father node ID array does not contain the node ID of the node to be checked, inquiring according to the grade code of the node to be checked to determine the child node of the node to be checked;
and when the node to be checked comprises a child node and the father node ID array comprises the child node ID of the node to be checked, determining that a loop exists in the link.
8. The method of claim 7, wherein the check is passed when the node to be checked does not include a child node, or when the node to be checked includes a child node and the parent node ID array does not include the child node ID of the node to be checked.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of the preceding claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
CN202111265682.5A 2021-10-28 2021-10-28 Node coding and checking method for data center, terminal and storage medium Pending CN114153892A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111265682.5A CN114153892A (en) 2021-10-28 2021-10-28 Node coding and checking method for data center, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111265682.5A CN114153892A (en) 2021-10-28 2021-10-28 Node coding and checking method for data center, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN114153892A true CN114153892A (en) 2022-03-08

Family

ID=80458507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111265682.5A Pending CN114153892A (en) 2021-10-28 2021-10-28 Node coding and checking method for data center, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114153892A (en)

Similar Documents

Publication Publication Date Title
CN109814524B (en) Vehicle diagnosis method, device and system
CN105389177A (en) Software version confirmation method, device and system
CN111931172B (en) Financial system business process abnormality early warning method and device
CN110597888B (en) Virtual resource acquisition method and device based on block chain, medium and equipment
CN112559635B (en) Service processing method, device, equipment and medium for Ethernet alliance chain node
CN110659905A (en) Transaction verification method, device, terminal equipment and storage medium
CN110555129B (en) Space image data interaction method and device based on alliance chain
CN111338869A (en) Configuration parameter management method, device, equipment and storage medium
CN112667638B (en) Dynamic report generation method and device, terminal equipment and readable storage medium
CN109862097A (en) ID generation method and device
CN112732982A (en) Fault code storage method and device, terminal equipment and readable storage medium
CN108804451B (en) Method and device for generating primary key, electronic equipment and readable storage medium
CN114153892A (en) Node coding and checking method for data center, terminal and storage medium
CN115933514A (en) Control method, device, terminal and storage medium based on soft PLC
CN113609156B (en) Data query and write method and device, electronic equipment and readable storage medium
CN113792285A (en) Nuclear power station service authority control method and device and terminal equipment
CN110264383B (en) Electronic contract filing method and device, readable storage medium and server
CN110119337B (en) Data analysis method and device and server
CN111459899A (en) Log sharing method and device and terminal equipment
CN110349025B (en) Method and device for preventing loss of contract assets based on non-cost transaction output
CN115358175B (en) Circuit formal model simplification method and system
CN114004311A (en) Power distribution network fault positioning method and device, server and storage medium
CN114363363B (en) Data storage method, device, equipment and medium based on multiple chains
CN116828404B (en) Industry short message accurate sending method and device, electronic equipment and medium
CN117473940B (en) Electronic design drawing management method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20220628

Address after: 361001 room 208-38, Hengye building, No. 100, Xiangxing Road, Xiamen Torch High tech Zone (Xiang'an) Industrial Zone, Xiamen, Fujian

Applicant after: Xiamen Kehua shuneng Technology Co.,Ltd.

Address before: 361100 room 208-38, Hengye building, No. 100, Xiangxing Road, torch high tech Zone (Xiang'an) Industrial Zone, Xiamen, Fujian

Applicant before: Xiamen Kehua shuneng Technology Co.,Ltd.

Applicant before: Kehua Data Co.,Ltd.

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination