CN115174344B - OneID generation method and generator suitable for network management system - Google Patents

OneID generation method and generator suitable for network management system Download PDF

Info

Publication number
CN115174344B
CN115174344B CN202210677333.2A CN202210677333A CN115174344B CN 115174344 B CN115174344 B CN 115174344B CN 202210677333 A CN202210677333 A CN 202210677333A CN 115174344 B CN115174344 B CN 115174344B
Authority
CN
China
Prior art keywords
port information
oneid
network element
database
disk
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
CN202210677333.2A
Other languages
Chinese (zh)
Other versions
CN115174344A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Wuhan Fiberhome Technical Services Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
Wuhan Fiberhome Technical Services 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 Fiberhome Telecommunication Technologies Co Ltd, Wuhan Fiberhome Technical Services Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202210677333.2A priority Critical patent/CN115174344B/en
Publication of CN115174344A publication Critical patent/CN115174344A/en
Application granted granted Critical
Publication of CN115174344B publication Critical patent/CN115174344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9014Indexing; Data structures therefor; Storage structures hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses an OneID generation method and a generator suitable for a network management system, and relates to the technical field of network big data. The method comprises the following steps: creating a one-to-one mapping relation between port information and port information ID and storing the mapping relation in a database; when OneID of the network management system needs to be generated, receiving the values of the corresponding network element ID, the disk ID and the port information; converting the input port information into corresponding port information ID according to the mapping relation between the port information and the port information ID stored in the database; if the incoming disc ID/network element ID is not null, combining the disc ID/network element ID with the converted port information ID to generate OneID; if the disk ID and the network element ID are both empty, the converted port information ID is directly used as OneID. The method can simply and efficiently generate the OneID, and can support one-to-one mapping relationship while ensuring the absolute uniqueness of the OneID.

Description

OneID generation method and generator suitable for network management system
Technical Field
The invention relates to the technical field of network big data, in particular to an OneID (unique identity) generating method and generator suitable for a network management system.
Background
As networks grow in size, the data generated by the networks also evolves to a great extent. The network management system has the advantages that the short plates are highlighted in data acquisition, management and analysis capabilities, and the network big data is high in data volume and quality, and has higher requirements on data query, calculation and query performance. Big data thinking and techniques were introduced to solve. The network data is imported into a big data system for analysis, and the work efficiency of network operation and maintenance personnel can be improved and the operation cost can be reduced through analysis report forms.
In data analysis of a network management system, clustering or connection query analysis is mostly performed by using specific ports, and the determination of the specific ports involves three internal identifiers: network element ID (Ne-ID), disk ID (Board-ID), port information (port-Key). The first two are int types, which have guaranteed uniqueness in the original system and uniqueness to each other, and port information (port-Key) is a character string type, whose length is variable and there is a certain repeatability.
In computational analysis, the performance of the three equivalent connection conditions is lower than that of a single equivalent connection condition, the equivalent connection efficiency of a character string type is lower than that of a digital type, and the overall efficiency is not ideal because the port-Key is poor in efficiency when a plurality of overlong port-Key equivalent connections are caused by variable port-Key lengths. Thus, in order to solve this problem, an idea of mapping three internal identifications to unique IDs (OneID) in a big data system and guaranteeing a one-to-one mapping relationship between the two has been proposed.
Currently, each well-known OneID generator is implemented using a random algorithm using a time stamp. Because the generation is based on the time stamp, when the generation is performed at different times, the same three internal identifiers can be mapped to different unique IDs (OneID), a one-to-many mapping relationship is generated, namely the existing scheme can only guarantee the unique one, does not support the one-to-one mapping relationship, and the problems of repeatability, large cache quantity and the like exist.
Disclosure of Invention
The invention aims to provide an OneID generation method and a generator suitable for a network management system, which not only can simply and efficiently generate OneID, but also can support one-to-one mapping relationship while ensuring the absolute uniqueness of OneID.
In order to achieve the above objective, in a first aspect, an embodiment of the present invention provides an OneID generation method applicable to a network management system, where the method includes:
creating a one-to-one mapping relation between port information and port information ID and storing the mapping relation in a database;
when OneID of the network management system needs to be generated, receiving the values of the corresponding network element ID, the disk ID and the port information;
converting the input port information into corresponding port information ID according to the mapping relation between the port information and the port information ID stored in the database;
if the incoming disc ID/network element ID is not null, combining the disc ID/network element ID with the converted port information ID to generate OneID; if the disk ID and the network element ID are both empty, the converted port information ID is directly used as OneID.
As a preferred embodiment, the port information is a character string type, and the port information ID is an int type; the creating of the one-to-one mapping relationship between the port information and the port information ID and storing the mapping relationship in the database includes the following operations:
selecting a database and creating a self-increasing sequence on the selected database;
generating a one-to-one corresponding port information ID for each port information by calling the self-increasing sequence;
and storing the port information and the corresponding port information ID into a cache in a key value pair form to form a one-to-one mapping relation between the port information and the port information ID.
As a preferred embodiment, the port information is a character string type, and the port information ID is an int type; the creating of the one-to-one mapping relationship between port information and port information ID and storing the mapping relationship in a database includes the following operations:
generating port information ID corresponding to the port information by using md5 algorithm;
inquiring whether the current port information and the generated port information ID have repeated corresponding relation in the database, if so, adding 1 to the generated port information ID, and repeating the duplicate checking operation until the database is successfully stored; if not, directly storing into a database.
As a preferred embodiment, when the disc ID/network element ID is combined with the converted port information ID to generate the OneID, the generated OneID is of 64-bit long type; and the first 32 bits of the OneID are disk ID/network element ID, and the last 32 bits are port information ID.
As a preferred embodiment, if the incoming disc ID/network element ID is not null, the disc ID/network element ID is combined with the converted port information ID to generate an OneID, which includes the following operations:
judging whether the incoming disc ID is empty;
if the disk ID is not empty, shifting the input disk ID by 32 bits left, and then adding and combining the disk ID with the port information ID to generate OneID;
if the network element ID is empty, judging whether the incoming network element ID is empty, if not, shifting the incoming network element ID left by 32 bits, and then adding and combining the port information ID to generate OneID.
In a second aspect, an embodiment of the present invention further provides an OneID generator applicable to a network management system, where the OneID generator includes a creation module, a receiving module, a conversion module, and a generation module;
the creation module is used for: creating a one-to-one mapping relation between port information and port information ID and storing the mapping relation in a database;
the receiving module is used for: when OneID of the network management system needs to be generated, receiving the values of the corresponding network element ID, the disk ID and the port information;
the conversion module is used for: converting the input port information into corresponding port information ID according to the mapping relation between the port information and the port information ID stored in the database;
the generating module is used for: if the incoming disc ID/network element ID is not null, combining the disc ID/network element ID with the converted port information ID to generate OneID; if the disk ID and the network element ID are both empty, the converted port information ID is directly used as OneID.
As a preferred embodiment, the port information is a character string type, and the port information ID is an int type; the creation module creates a one-to-one mapping relation between port information and port information ID and stores the mapping relation in a database, and the method comprises the following operations:
selecting a database and creating a self-increasing sequence on the selected database;
generating a one-to-one corresponding port information ID for each port information by calling the self-increasing sequence;
and storing the port information and the corresponding port information ID into a cache in a key value pair form to form a one-to-one mapping relation between the port information and the port information ID.
As a preferred embodiment, the port information is a character string type, and the port information ID is an int type; the creation module creates a one-to-one mapping relation between port information and port information ID and stores the mapping relation in a database, and the method comprises the following operations:
generating port information ID corresponding to the port information by using md5 algorithm;
inquiring whether the current port information and the generated port information ID have repeated corresponding relation in the database, if so, adding 1 to the generated port information ID, and repeating the duplicate checking operation until the database is successfully stored; if not, directly storing into a database.
As a preferred embodiment, the generating module combines the disc ID/network element ID with the converted port information ID, and when generating the OneID, the generated OneID adopts a 64-bit long type; and the first 32 bits of the OneID are disk ID/network element ID, and the last 32 bits are port information ID.
As a preferred embodiment, the generating module combines the disc ID/network element ID with the converted port information ID to generate OneID, including the following operations:
judging whether the incoming disc ID is empty;
if the disk ID is not empty, shifting the input disk ID by 32 bits left, and then adding and combining the disk ID with the port information ID to generate OneID;
if the network element ID is empty, judging whether the incoming network element ID is empty, if not, shifting the incoming network element ID left by 32 bits, and then adding and combining the port information ID to generate OneID.
The invention has the beneficial effects that:
(1) In the invention, the port information of the character string type is converted into the port information ID of the int type, and the converted port information ID has absolute uniqueness, so that the problem of certain repeatability of the existing port information can be well solved. And the one-to-one mapping relation between the port information and the port information ID is utilized for conversion, so that the port information ID can be directly used for generating the OneID in the follow-up process, thereby ensuring the one-to-one mapping relation between the three internal identifiers and the generated OneID, and meeting the actual application requirements.
(2) In the invention, when the one-to-one mapping relation between port information and port information ID is created, the mode of memory-based distributed KV cache and self-increasing sequence of Ignit is optimized, and the concurrency and access efficiency can be obviously improved.
(3) The invention has wide application range, and can be expanded and applied to an optimization scene when a plurality of internal identifiers determine data analysis and calculation of a grouping or equivalent connection. The absolute uniqueness of OneID and one-to-one mapping relation can fully ensure the correctness of grouping or equivalent connection results, greatly improve the calculation efficiency and save the calculation time, and has certain universality.
Drawings
Fig. 1 is a schematic diagram of a network device;
fig. 2 is a flowchart of an OneID generation method applicable to a network management system in an embodiment of the present invention;
FIG. 3 is a schematic diagram of generating OneID by combining a disk ID and a port information ID according to an embodiment of the present invention;
fig. 4 is a schematic diagram of generating OneID by combining a network element ID and a port information ID in an embodiment of the present invention;
FIG. 5 is a schematic diagram of generating OneID from port information ID according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an OneID generation method suitable for a network management system in an example.
Detailed Description
It will be appreciated that as shown in fig. 1, typically a network device has a unique identification ID, i.e. a network element ID (int type), in the network system; while a network device typically has a plurality of disks, each disk also has a corresponding unique identification ID, namely a disk ID (int type); a disk typically has multiple ports, different ports have different port descriptions, i.e., port information (string type), and there are cases where the port information of the same port is identical.
In general, the port is used as a dimension for calculating different indexes, so that a unique identification ID for the port is required in the network system. When determining the unique ID, three identifiers of the network element ID, the disk ID and the port information are needed, so that the three identifiers need to be converted into one unique ID, namely OneID. It can be seen that OneID herein refers to a unique identification ID of a network device port in a network system.
Aiming at the problems that in the prior art, as the traditional OneID generation method is based on time stamp generation, when OneID is generated at different time, the situation that the same three internal identifiers map out different unique IDs (OneID) occurs, so that a one-to-many mapping relationship occurs, the problems of repeatability, large cache quantity and the like exist. The invention aims to provide an OneID generation method and a generator suitable for a network management system, which not only can simply and efficiently generate OneID, but also can support one-to-one mapping relationship while ensuring the absolute uniqueness of OneID so as to meet the actual application requirements.
The main design thought is as follows: in order to support forward and reverse conversion, a mapping relationship must exist between the two, and it can be theoretically ensured that the mapping relationship is one-to-one. The most straightforward approach is to build a table in the database, but when the amount of data reaches a certain level, not only there will be a large cache and query conversion will be time consuming. In addition, the fact that different network elements and different single disks have the same port is considered, namely the port information has certain repeatability. However, because the network element ID and the disk ID are mutually unique, and cache and conversion efficiency factors are considered, the scheme can ensure the one-to-one mapping relationship between the internal identification port information and the port information ID by only converting the character string type port information into the int type unique ID, namely the port information ID (port-ID), and can only store the one-to-one mapping relationship between the port information and the port information ID when the database is used for building a table. Then, three network element IDs, disk IDs and port information IDs with unique internal identifiers are further utilized, and the network element IDs, the disk IDs and the port information IDs can be combined to generate an absolute unique OneID; meanwhile, due to the one-to-one mapping relation between the port information and the port information ID, the one-to-one mapping relation between a group of three internal identifiers and the generated OneID is further ensured.
In order to make the technical problems, technical solutions and advantages to be solved more apparent, the technical solutions of the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
However, it should be noted that: the examples to be presented below are only a few specific examples and are not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequences, etc. Those skilled in the art can, upon reading the present specification, make and use the concepts of the invention to construct further embodiments not mentioned in the specification.
Example 1
Referring to fig. 2, the embodiment provides an OneID generation method suitable for a network management system, which includes the following steps:
step A, creating a database: creating a one-to-one mapping relationship of port information (port-Key) and port information ID (port-ID) and storing the mapping relationship in a database; the port information is of character string type, and the port information ID is of int type.
It can be understood that various databases may be used for storage in practical applications, and various ways may be used to create a mapping relationship between port information and port information ID, so long as the created port information ID is of the int type, and the mapping relationship between port information and port information ID is one-to-one, which is not specifically limited in this embodiment. But for the convenience of implementation to those skilled in the art, the following is illustrated in only two alternative embodiments.
Example 1, as an alternative implementation, in step a, creates a one-to-one mapping relationship of port information (port-Key) and port information ID (port-ID), and stores the mapping relationship in a database, specifically includes the following operations:
a1, ignite (Ignite is an implementation of a distributed memory grid, is based on a Java platform, has the characteristics of persistence, distributed transaction, distributed computation and the like, supports rich key value storage and SQL grammar, and can be regarded as a distributed memory database) and is used as a database platform; and creates a self-increment sequence on Ignite to ensure that the new port information ID (port-ID) generated each time is unique.
A2, generating a one-to-one corresponding port information ID for each port information by calling the self-increasing sequence; specifically, the value obtained by calling the self-increment sequence can be directly used as the port information ID corresponding to the current port information.
A3, storing the port information and the corresponding port information ID into a cache (namely KV cache) in a key value pair mode, so that a one-to-one mapping relation between the port information and the port information ID is formed.
Example 2, as another alternative embodiment, in step a, a one-to-one mapping relationship of port information (port-Key) and port information ID (port-ID) is created and stored in a database, specifically comprising the following operations:
a1', using md5 algorithm to generate port information ID corresponding to the port information.
A2', inquiring whether the current port information and the generated port information ID have repeated corresponding relations in the database, if so, turning to a step A3'; if not, directly storing into a database.
A3', adding 1 to the generated port information ID, and repeating the step A2' to perform the duplicate checking operation until the data is successfully stored in the database.
In the two alternative embodiments, the scheme of example 2 is more complex, and the mapping needs to be checked again each time when the mapping is stored, at least one access operation is added, and a high concurrency bottleneck exists when the mapping is checked again to enter the library. The scheme of example 1 uses the distributed KV cache and self-increment sequence based on the memory by Ignite, and can remarkably improve concurrency and access efficiency. Therefore, in practical application, the implementation of the scheme of example 1 may be preferred.
Step B, receiving parameters: when OneID of the network management system needs to be generated, the values of the corresponding network element ID (Ne-ID), disk ID (Board-ID) and port information (port-Key) are received.
Step C, port information is converted: according to the mapping relation between port information (port-Key) and port information ID (port-Id) stored in the database, the input port information (port-Key) is converted into the corresponding port information ID.
It can be understood that in step C, the character string type port information is converted into the int type port information ID, and the converted port information ID has absolute uniqueness, so that the problem that the existing port information has certain repeatability can be well solved. And the one-to-one mapping relation between the port information and the port information ID is utilized for conversion, so that the port information ID can be directly used for generating OneID in the follow-up process, and the one-to-one mapping relation between the three internal identifications and the generated OneID is further ensured.
Illustratively, as an alternative embodiment, step C specifically comprises the following operations: inquiring the corresponding port information ID in the database by using the currently transmitted port information; if not, creating a corresponding new port information ID for the currently-transmitted port information in the database, and returning the created port information ID; if so, returning the inquired port information ID.
Further, in the actual application, in the step C, if not queried, when creating a new port information ID corresponding to the port information currently transmitted in the database, the creation is performed in the same manner as in the step a. Specifically, if the step a is implemented by using the Ignite data platform based on the memory distributed KV cache and the self-increment sequence, in the corresponding step C, a corresponding new port information ID is created in the database for the port information currently transferred, which specifically includes: calling a self-increasing sequence to obtain a value; taking the value as a port information ID corresponding to the port information which is currently transmitted; storing the current port information and the corresponding port information ID into a cache in a key value pair form to form a one-to-one mapping relation between the port information and the port information ID; finally, the current port information ID is returned. If the step a is implemented by using the md5 algorithm, in a corresponding step C, a corresponding new port information ID is created in the database for the port information currently transferred in, which specifically includes: firstly, using an md5 algorithm as current incoming port information to generate corresponding port information ID; then, inquiring whether the current port information and the generated port information ID have repeated corresponding relations in the database, if not, returning the current port information ID after storing the current port information and the generated port information ID in the database; if yes, adding 1 to the generated port information ID, and repeating the check operation until the port information ID is successfully stored in the database, and returning the successfully stored port information ID.
Step D, generating OneID: if the incoming disc ID/network element ID is not null, combining the disc ID/network element ID with the converted port information ID to generate OneID; if the disk ID and the network element ID are both empty, the converted port information ID is directly used as OneID.
Further, in this embodiment, the disc ID/network element ID is combined with the converted port information ID, and when the OneID is generated, the generated OneID is of 64-bit long type; and the first 32 bits of the OneID are the disc ID/element ID and the last 32 bits are the port information ID, as shown in fig. 3 and 4. When the converted port information ID is directly used as the OneID, the generated OneID is the port information ID, as shown in fig. 5. In this embodiment, the port information ID is placed in the last 32 bits, and the disk ID/element ID is placed in the first 32 bits, because the disk ID and the element ID are both normally 8 bits in length of 10 digits, and the length of the OneID can be effectively reduced by placing them in the first 32 bits. And, because the magnitude of network element and disk is far smaller than the magnitude of port, put network element ID or disk ID in the first 32 bits, can have some improvement in performance to the subsequent association calculation.
On this basis, as an alternative embodiment, the step D specifically includes the following operations:
d1, judging whether the incoming disc ID is empty or not, if not, shifting the incoming disc ID left by 32 bits and then adding and combining the port information ID to generate OneID; if the air is empty, the step D2 is carried out; it can be appreciated that since the identification range of the disc is smaller than the identification range of the network element, the disc ID and the port information ID can identify a specific port;
d2, judging whether the incoming network element ID is empty, if not, shifting the incoming network element ID left by 32 bits and then adding and combining the port information ID to generate OneID; if the air is empty, the step D3 is carried out; it will be appreciated that when the disc ID is empty, the network element ID and the port information ID may also identify a specific port;
d3, directly taking the port information ID as OneID; it will be appreciated that when both the disc ID and the network element ID are empty, a particular port is identified with the port information ID.
As can be seen from the above, in this embodiment, by converting the port information of the character string type into the port information ID of the int type, and the converted port information ID has absolute uniqueness, the problem that the existing port information has a certain repeatability can be well solved. And the one-to-one mapping relation between the port information and the port information ID is utilized for conversion, so that the port information ID can be directly used for generating OneID in the follow-up process, and the one-to-one mapping relation between the three internal identifications and the generated OneID is ensured. In addition, the generated OneID not only has absolute uniqueness, but also supports forward and reverse lookup conversion, simplifies the complexity of the original data in grouping and equivalent connection, improves the calculation efficiency, and meets the actual application requirements.
In order to more clearly understand the method of the present invention, the method of the present invention will be exemplified below in conjunction with the details of the above-described embodiments. Taking the creation of the mapping relationship by using the distributed KV cache and the self-increment sequence based on the memory of the Ignite data platform as an example, referring to fig. 6, an OneID generation method suitable for a network management system includes the following steps:
s1, creating KV cache and self-increasing sequences on Ignite: the KV cache is cached with a one-to-one mapping relation between port information and port information ID; the self-increment sequence is to generate a new port information ID.
S2, receiving parameters: when a certain OneID of the network management system needs to be generated, the values corresponding to the required network element ID, the disc ID and the port information are transmitted.
S3, acquiring port information ID corresponding to the port information: searching in the cache by using the currently transmitted port information as a key, and if the corresponding port information ID is queried, directly returning the corresponding port information ID, and turning to S6; if not, the process proceeds to S4.
S4, creating a new port information ID: and calling the self-increasing sequence to create a new port information ID, and turning to S5.
S5, record caching: and after the current incoming port information and the created corresponding port information ID are stored in the KV cache, returning the port information ID, and turning to S6.
S6, judging and taking the value: if the disk ID is not empty, returning the disk ID to S8; if the disc ID is empty, the process proceeds to S7.
S7, judging and taking the value: if the network element ID is not null, returning the network element ID, and switching to S9; if the network element ID is empty, the process proceeds to S10.
S8, generating OneID: the incoming disc ID is shifted to the left by 32 bits and added and combined with the port information ID to generate the required OneID, and the process goes to S11.
S9, generating OneID: and adding and combining the input network element ID with the port information ID by 32 bits to the left to generate the required OneID, and turning to S11.
S10, generating OneID: the port information ID is directly used as OneID, and the process proceeds to S11.
S11, returning OneID: returning the currently generated OneID.
Example two
Based on the same inventive concept, the embodiment of the invention also provides an OneID generator suitable for a network management system, which comprises a creation module, a receiving module, a conversion module and a generation module.
Wherein, the creation module is used for: creating a one-to-one mapping relation between port information and port information ID and storing the mapping relation in a database; the port information is of a character string type, and the port information ID is of an int type. A receiving module for: when OneID of the network management system needs to be generated, receiving the values of the corresponding network element ID, the disk ID and the port information. A conversion module for: and converting the input port information into the corresponding port information ID according to the mapping relation between the port information and the port information ID stored in the database. A generation module for: if the incoming disc ID/network element ID is not null, combining the disc ID/network element ID with the converted port information ID to generate OneID; if the disk ID and the network element ID are both empty, the converted port information ID is directly used as OneID.
It can be understood that, by adopting the OneID generator of the embodiment, the OneID can be simply and efficiently generated, and a one-to-one mapping relationship can be supported while ensuring that the OneID is absolutely unique. In addition, the generated OneID not only has absolute uniqueness, but also supports forward and reverse lookup conversion, simplifies the complexity of the original data in grouping and equivalent connection, improves the calculation efficiency, and meets the actual application requirements.
It should be noted that, the various modifications and specific examples of the foregoing method embodiment are equally applicable to the OneID generator of the present embodiment, and those skilled in the art will be able to clearly know the implementation method of the OneID generator of the present embodiment through the foregoing detailed description of the method, so that, for brevity, details will not be described herein.
Note that: the particular embodiments described above are illustrative only and not restrictive, and those skilled in the art may combine and combine steps and means from the various embodiments described above separately to achieve the benefits of the present invention in accordance with the concepts of the present invention, such combined and combined embodiments also being encompassed by the present invention, such combination and combination not being described in detail herein.
The advantages, effects, etc. mentioned in the embodiments of the present invention are merely examples, and are not to be construed as necessarily limiting the various embodiments of the present invention. In addition, the foregoing specific details of the embodiments of the invention have been disclosed for purposes of illustration and understanding only, and are not intended to be limiting, since the embodiments of the invention must not be practiced with the specific details.
The block diagrams of the devices, apparatuses, devices, systems according to the embodiments of the present invention are merely illustrative examples, and are not intended to require or imply that connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used in embodiments of the present invention refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used in embodiments of the present invention refers to, and is used interchangeably with, the phrase "such as, but not limited to.
The step flow diagrams in the embodiments of the invention and the method descriptions above are merely illustrative examples and are not intended to require or imply that the steps of the various embodiments must be performed in the order presented. The order of steps in the above embodiments may be performed in any order, as will be appreciated by those skilled in the art. Words such as "thereafter," "then," "next," and the like are not intended to limit the order of the steps; these words are simply used to guide the reader through the description of these methods. Furthermore, any reference to an element in the singular, for example, using the articles "a," "an," or "the," is not to be construed as limiting the element to the singular.
In addition, the steps and means in the various embodiments of the present invention are not limited to practice in a certain embodiment, and indeed, the relevant partial steps and partial means in the various embodiments herein may be combined according to the concept of the present invention to contemplate new embodiments, which are also included in the scope of the present invention.
The operations of embodiments of the present invention may be performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and/or software components and/or modules including, but not limited to, circuitry or a processor of the hardware.
The method of an embodiment of the invention includes one or more acts for implementing the method described above. The methods and/or acts may be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of acts is specified, the order and/or use of specific acts may be modified without departing from the scope of the claims.
The functions of the embodiments of the present invention may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions on a tangible computer-readable medium. A storage media may be any available tangible media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other tangible medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. As used herein, discs (disks) and disks include Compact Disks (CDs), laser disks, optical disks, DVDs (Digital Versatile Disc, digital versatile disks), floppy disks, and blu-ray disks where disks reproduce data magnetically, while disks reproduce data optically with lasers.
Thus, the computer program product may perform the operations presented herein. For example, such a computer program product may be a computer-readable tangible medium having instructions tangibly stored (and/or encoded) thereon, the instructions being executable by one or more processors to perform the operations described herein. The computer program product may comprise packaged material.
Other examples and implementations are within the scope and spirit of embodiments of the invention and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwired or any combination of these. Features that implement the functions may also be physically located at various locations including being distributed such that portions of the functions are implemented at different physical locations.
Various changes, substitutions, and alterations to the techniques described herein may be made by those skilled in the art without departing from the teachings as defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. The processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the invention. Thus, the present invention is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the invention to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof. And what is not described in detail in this specification is prior art known to those skilled in the art.

Claims (10)

1. The OneID generation method suitable for the network management system is characterized by comprising the following steps:
creating a one-to-one mapping relation between port information and port information ID and storing the mapping relation in a database;
when OneID of the network management system needs to be generated, receiving the corresponding network element ID, disk ID and port information;
converting the input port information into corresponding port information ID according to the mapping relation between the port information and the port information ID stored in the database;
if the incoming disc ID/network element ID is not null, combining the disc ID/network element ID with the converted port information ID to generate OneID; if the disk ID and the network element ID are both empty, the converted port information ID is directly used as OneID.
2. The OneID generation method for a network management system according to claim 1, wherein the port information is a character string type, and the port information ID is an int type;
the creating of the one-to-one mapping relationship between the port information and the port information ID and storing the mapping relationship in the database includes the following operations:
selecting a database and creating a self-increasing sequence on the selected database;
generating a one-to-one corresponding port information ID for each port information by calling the self-increasing sequence;
and storing the port information and the corresponding port information ID into a cache in a key value pair form to form a one-to-one mapping relation between the port information and the port information ID.
3. The OneID generation method for a network management system according to claim 1, wherein the port information is a character string type, and the port information ID is an int type;
the creating of the one-to-one mapping relationship between port information and port information ID and storing the mapping relationship in a database includes the following operations:
generating port information ID corresponding to the port information by using md5 algorithm;
inquiring whether the current port information and the generated port information ID have repeated corresponding relation in the database, if so, adding 1 to the generated port information ID, and repeating the duplicate checking operation until the database is successfully stored; if not, directly storing into a database.
4. The OneID generation method applicable to a network management system as claimed in claim 1, wherein: combining the disk ID/network element ID with the converted port information ID, and generating OneID by adopting a 64-bit long type when generating OneID; and the first 32 bits of the OneID are disk ID/network element ID, and the last 32 bits are port information ID.
5. The method for generating OneID applicable to network management system as recited in claim 4, wherein if the incoming disc ID/element ID is not null, combining the disc ID/element ID with the converted port information ID to generate OneID, comprising the following operations:
judging whether the incoming disc ID is empty;
if the disk ID is not empty, shifting the input disk ID by 32 bits left, and then adding and combining the disk ID with the port information ID to generate OneID;
if the network element ID is empty, judging whether the incoming network element ID is empty, if not, shifting the incoming network element ID left by 32 bits, and then adding and combining the port information ID to generate OneID.
6. The OneID generator is characterized by comprising a creation module, a receiving module, a conversion module and a generation module;
the creation module is used for: creating a one-to-one mapping relation between port information and port information ID and storing the mapping relation in a database; the port information is of a character string type, and the port information ID is of an int type;
the receiving module is used for: when OneID of the network management system needs to be generated, receiving the values of the corresponding network element ID, the disk ID and the port information;
the conversion module is used for: converting the input port information into corresponding port information ID according to the mapping relation between the port information and the port information ID stored in the database;
the generating module is used for: if the incoming disc ID/network element ID is not null, combining the disc ID/network element ID with the converted port information ID to generate OneID; if the disk ID and the network element ID are both empty, the converted port information ID is directly used as OneID.
7. The OneID generator for a network management system according to claim 6, wherein the port information is a character string type, and the port information ID is an int type; the creation module creates a one-to-one mapping relation between port information and port information ID and stores the mapping relation in a database, and the method comprises the following operations:
selecting a database and creating a self-increasing sequence on the selected database;
generating a one-to-one corresponding port information ID for each port information by calling the self-increasing sequence;
and storing the port information and the corresponding port information ID into a cache in a key value pair form to form a one-to-one mapping relation between the port information and the port information ID.
8. The OneID generator for a network management system according to claim 6, wherein the port information is a character string type, and the port information ID is an int type; the creation module creates a one-to-one mapping relation between port information and port information ID and stores the mapping relation in a database, and the method comprises the following operations:
generating port information ID corresponding to the port information by using md5 algorithm;
inquiring whether the current port information and the generated port information ID have repeated corresponding relation in the database, if so, adding 1 to the generated port information ID, and repeating the duplicate checking operation until the database is successfully stored; if not, directly storing into a database.
9. The OneID generator for a network management system according to claim 6, wherein: the generation module combines the disk ID/network element ID with the converted port information ID, and when OneID is generated, the generated OneID adopts a 64-bit long type; and the first 32 bits of the OneID are disk ID/network element ID, and the last 32 bits are port information ID.
10. The OneID generator according to claim 9, wherein the generation module combines the disc ID/element ID with the converted port information ID to generate the OneID, comprising the operations of:
judging whether the incoming disc ID is empty;
if the disk ID is not empty, shifting the input disk ID by 32 bits left, and then adding and combining the disk ID with the port information ID to generate OneID;
if the network element ID is empty, judging whether the incoming network element ID is empty, if not, shifting the incoming network element ID left by 32 bits, and then adding and combining the port information ID to generate OneID.
CN202210677333.2A 2022-06-15 2022-06-15 OneID generation method and generator suitable for network management system Active CN115174344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210677333.2A CN115174344B (en) 2022-06-15 2022-06-15 OneID generation method and generator suitable for network management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210677333.2A CN115174344B (en) 2022-06-15 2022-06-15 OneID generation method and generator suitable for network management system

Publications (2)

Publication Number Publication Date
CN115174344A CN115174344A (en) 2022-10-11
CN115174344B true CN115174344B (en) 2023-05-23

Family

ID=83484867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210677333.2A Active CN115174344B (en) 2022-06-15 2022-06-15 OneID generation method and generator suitable for network management system

Country Status (1)

Country Link
CN (1) CN115174344B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467492A (en) * 2023-04-23 2023-07-21 北京欧拉认知智能科技有限公司 Graph-based OneID implementation method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571420A (en) * 2011-12-20 2012-07-11 深圳市同洲视讯传媒有限公司 Method and system for network element data management
CN104683148A (en) * 2015-02-06 2015-06-03 烽火通信科技股份有限公司 Uniform port model and method for accessing logical port thereof
WO2015138517A1 (en) * 2014-03-11 2015-09-17 Vectra Networks, Inc. A method and system for generating durable host identifiers using network artifacts
CN110572274A (en) * 2019-07-29 2019-12-13 杭州电子科技大学 named data network method for optimizing deployment and management of edge computing nodes
CN113900907A (en) * 2021-11-17 2022-01-07 杭州推啊网络科技有限公司 Mapping construction method and system
CN114238349A (en) * 2021-12-08 2022-03-25 中国联合网络通信集团有限公司 Data verification method, device, equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7730065B2 (en) * 2007-04-27 2010-06-01 Microsoft Corporation File formats for external specification of object-relational mapping
US20100153274A1 (en) * 2008-12-16 2010-06-17 Palo Alto Research Center Incorporated Method and apparatus for mutual authentication using small payments
US9647894B2 (en) * 2014-07-30 2017-05-09 International Business Machines Corporation Mapping relationships among virtual elements across a system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571420A (en) * 2011-12-20 2012-07-11 深圳市同洲视讯传媒有限公司 Method and system for network element data management
WO2015138517A1 (en) * 2014-03-11 2015-09-17 Vectra Networks, Inc. A method and system for generating durable host identifiers using network artifacts
CN104683148A (en) * 2015-02-06 2015-06-03 烽火通信科技股份有限公司 Uniform port model and method for accessing logical port thereof
CN110572274A (en) * 2019-07-29 2019-12-13 杭州电子科技大学 named data network method for optimizing deployment and management of edge computing nodes
CN113900907A (en) * 2021-11-17 2022-01-07 杭州推啊网络科技有限公司 Mapping construction method and system
CN114238349A (en) * 2021-12-08 2022-03-25 中国联合网络通信集团有限公司 Data verification method, device, equipment and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Dirk Balfanz.The Future of Authentication.《IEEE Security &amp Privacy 》.2012,全文. *
基于One ID民航机场旅客出行研究;阚劲军;张博;;信息技术与信息化(06);全文 *
基于网络资源管理系统的网格化分析展示应用;夏卉;陈宁;郭皓;李怀森;;有线电视技术(02);全文 *

Also Published As

Publication number Publication date
CN115174344A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
CN110602148B (en) Method and device for generating state tree of block and verifying data on chain
CN101540723B (en) Flow stream searching method and device
CN104408159B (en) A kind of data correlation, loading, querying method and device
CN105677683A (en) Batch data query method and device
CN104077423A (en) Consistent hash based structural data storage, inquiry and migration method
CN104298687B (en) A kind of hash partition management method and device
CN103838770A (en) Logic data partition method and system
CN115174344B (en) OneID generation method and generator suitable for network management system
CN107766445B (en) Efficient and rapid data retrieval method supporting multi-dimensional retrieval
CN106415534B (en) The method and apparatus of contingency table subregion in a kind of distributed data base
CN102333036A (en) Method and system for realizing high-speed routing lookup
CN110597852A (en) Data processing method, device, terminal and storage medium
CN104268298A (en) Method for creating database index and inquiring data
CN106599091A (en) Storage and indexing method of RDF graph structures stored based on key values
Goyal et al. Cross platform (RDBMS to NoSQL) database validation tool using bloom filter
CN109800228B (en) Method for efficiently and quickly solving hash conflict
CN115543993A (en) Data processing method and device, electronic equipment and storage medium
CN113535803A (en) Block chain efficient retrieval and reliability verification method based on keyword index
CN112182021A (en) User data query method, device and system
CN110221778A (en) Processing method, system, storage medium and the electronic equipment of hotel's data
CN115114289A (en) Data query method and device and electronic equipment
CN111209272B (en) Method, device and system for checking call ticket
CN110134834B (en) Method for accelerating IP positioning by using dynamic AVL forest cache
CN110674524A (en) Mixed ciphertext indexing method and system
CN107592207B (en) Network management service data management method and network management service data management 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