CN105610593B - Method and device for distributing resource identification in network management system - Google Patents

Method and device for distributing resource identification in network management system Download PDF

Info

Publication number
CN105610593B
CN105610593B CN201410618049.3A CN201410618049A CN105610593B CN 105610593 B CN105610593 B CN 105610593B CN 201410618049 A CN201410618049 A CN 201410618049A CN 105610593 B CN105610593 B CN 105610593B
Authority
CN
China
Prior art keywords
resource
value
resource identifier
identifiers
identifier
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
CN201410618049.3A
Other languages
Chinese (zh)
Other versions
CN105610593A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201410618049.3A priority Critical patent/CN105610593B/en
Priority to PCT/CN2015/075861 priority patent/WO2016070564A1/en
Publication of CN105610593A publication Critical patent/CN105610593A/en
Application granted granted Critical
Publication of CN105610593B publication Critical patent/CN105610593B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for distributing resource identifiers in a network management system, wherein the method for distributing the resource identifiers in the network management system comprises the following steps: acquiring the resource type of the service resource to be allocated and the value number of the resource identifier, and acquiring the resource type supported by the system according to the resource type; acquiring a value range of resource identifiers of resource types supported by the system, and searching all used resource identifiers in the value range; and distributing the resource identifiers to the service resources according to the value quantity, the value range and the used resource identifiers. The invention can greatly reduce the occupied space of the memory and improve the allocation speed when allocating the resource identifiers in a larger range.

Description

Method and device for distributing resource identification in network management system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for allocating resource identifiers in a network management system.
Background
A Packet Transport Network (PTN) is a Transport Network suitable for Packet services as a main Transport Network, and various services carried on a pseudo wire of a PTN tunnel are main Transport contents thereof and also important service deployments of operators.
The network management system provides important guarantee and good human-computer interface operation for the PTN technology to be better applied to a deployment network of an operator. At present, the identifiers of multiple types of service resources require to be configured in a unified manner (i.e. adopt unified coding), so when a network management system creates various services, the allocation of the identifiers of multiple types of service resources is generally as follows: the resource identification is automatically distributed according to different equipment types and service types, in the resource identification distribution process, an array related to the resource identification is generally generated according to the range supported by the service type, the array is traversed according to a certain distribution algorithm, and the memory and the time required by the network management system for processing the resource identification distribution are determined by the range of the resource identification distribution.
The above method for allocating resource identifiers has the following disadvantages: 1. although different types of services also support allocation of resource identifiers in a larger range, the usable range is actually smaller, and once the number of the resource identifiers exceeds a certain value, the allocated data may consume the memory in a certain process of the network management system, resulting in failure of resource identifier allocation. 2. The adoption of a fixed allocation of the full-range array in the network management system can waste a lot of memory space and consume allocation time, which is not beneficial to resource ID allocation in a large range. These deficiencies all lead to poor performance in terms of stability, reliability, maintainability, etc. of the network management system.
Disclosure of Invention
The invention mainly aims to solve the technical problems of small resource identifier distribution range and slow distribution of a network management system.
In order to achieve the above object, the present invention provides a method for allocating resource identifiers in a network management system, wherein the method for allocating resource identifiers in the network management system comprises the following steps:
acquiring the resource type of the service resource to be allocated and the value number of the resource identifier, and acquiring the resource type supported by the system according to the resource type;
acquiring a value range of resource identifiers of resource types supported by the system, and searching all used resource identifiers in the value range;
and distributing the resource identifiers to the service resources according to the value quantity, the value range and the used resource identifiers.
Preferably, the step of allocating the resource identifier to the service resource according to the value number, the value range and the used resource identifier includes:
generating a random number within the value range;
comparing the resource identifiers between the random number as the initial value and the maximum value of the value range and between the minimum value of the value range as the initial value and the random number one by one with the used resource identifiers;
and if the resource identifier is different from the used resource identifier, taking the resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
Preferably, the step of allocating the resource identifier to the service resource according to the value number, the value range and the used resource identifier further includes:
comparing the first resource identifiers between the random number as the initial value and the maximum value of the value range with the used resource identifiers one by one;
if the first resource identifier is different from the used resource identifier, taking the first resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number;
if the number of the resource identifiers distributed between the random number and the maximum value does not reach the value number, comparing second resource identifiers between the random number and the minimum value of the value range with the used resource identifiers one by one;
and if the second resource identifier is different from the used resource identifier, taking the second resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
Preferably, the step of allocating the resource identifier to the service resource according to the value number, the value range and the used resource identifier further includes:
and if the quantity of the allocated resource identifiers does not reach the value quantity, performing exception prompting and quitting.
Preferably, the step of obtaining a value range of the resource identifier of the resource type supported by the system, and searching all the used resource identifiers in the value range includes:
and acquiring the service data which is already used by the resource types supported by the system, and acquiring the corresponding resource identification according to the service data.
In addition, in order to achieve the above object, the present invention further provides a device for allocating resource identifiers in a network management system, where the device for allocating resource identifiers in a network management system includes:
the acquisition module is used for acquiring the resource type of the service resource to be allocated and the value number of the resource identifier, and acquiring the resource type supported by the system according to the resource type;
the searching module is used for acquiring the value range of the resource identifier of the resource type supported by the system and searching all used resource identifiers in the value range;
and the allocation module is used for allocating the resource identifiers to the service resources according to the value quantity, the value range and the used resource identifiers.
Preferably, the allocation module comprises:
the generating unit is used for generating a random number in the value range;
the comparing unit is used for comparing the resource identifiers between the random number as the initial value and the maximum value of the value range and between the minimum value of the value range as the initial value and the random number one by one with the used resource identifiers;
and the allocation unit is used for taking the resource identifier as the allocated resource identifier if the resource identifier is different from the used resource identifier until the number of the allocated resource identifiers reaches the value number.
Preferably, the comparing unit includes a first comparing subunit and a second comparing subunit, and the allocating unit includes a first allocating subunit and a second allocating subunit, wherein:
the first comparing subunit is used for comparing the first resource identifiers between the random number as the start and the maximum value of the value range with the used resource identifiers one by one;
a first allocating subunit, configured to, if the first resource identifier is different from the used resource identifier, use the first resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number;
a second comparing subunit, configured to compare, if the number of the resource identifiers allocated between the random number and the maximum value does not reach the value number, the second resource identifiers between the random number and the minimum value of the value range as a start with the used resource identifiers one by one;
and the second allocating subunit is configured to, if the second resource identifier is different from the used resource identifier, use the second resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
Preferably, the allocation module further comprises:
and the prompting unit is used for performing exception prompting and quitting if the quantity of the allocated resource identifiers does not reach the value quantity.
Preferably, the search module is specifically configured to acquire service data already used by a resource type supported by the system, and acquire a corresponding resource identifier according to the service data.
The invention relates to a method and a device for allocating resource identifiers in a network management system, which allocate a certain amount of resource identifiers for service resources to be allocated according to the value range of the resource types supported by the system and the used resource identifiers when allocating the resource identifiers in the network management system.
Drawings
Fig. 1 is a schematic flow chart of a method for allocating resource identifiers in a network management system according to an embodiment of the present invention;
fig. 2 is a schematic view of a detailed flow of an embodiment of allocating resource identifiers to the service resources according to the value numbers, the value ranges, and the used resource identifiers in fig. 1;
fig. 3 is a schematic diagram of a detailed flow of another embodiment of allocating resource identifiers to the service resources according to the value number, the value range, and the used resource identifiers in fig. 1;
fig. 4 is a functional module diagram of an embodiment of a device for allocating resource identifiers in a network management system according to the present invention;
FIG. 5 is a block diagram illustrating a detailed function of one embodiment of the assignment module of FIG. 4;
fig. 6 is a schematic diagram of a detailed functional module of another embodiment of the distribution module in fig. 4.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a method for allocating resource identifiers in a network management system, and referring to fig. 1, in an embodiment, the method for allocating resource identifiers in the network management system comprises the following steps:
step S101, acquiring the resource type of the service resource to be allocated and the value number of the resource identifier, and acquiring the resource type supported by the system according to the resource type;
in this embodiment, the value ranges of the resource identifiers of all types of service resources supported by the network management system are preset. The resource identifications are ordered during the allocation. It is assumed that there are three types of service resources supported by the network management system, which are respectively a type a, a type B and a type C, and the value ranges of the resource identifiers thereof are 1-500, 100001-. And presetting the service resources and the corresponding value ranges in a network management system.
Acquiring the resource type of the service resource to be allocated, and judging whether the network management system has the service resource supporting the resource type. If the resource type supported by the network management system is not the resource type supported by the network management system, for example, the resource type is the D type, the allocation is directly quitted.
In this embodiment, the value number of the resource identifier of the service resource to be allocated is specified and input by the user, and may be any positive integer.
Step S102, obtaining the value range of the resource identification of the resource type supported by the system, and searching all used resource identifications in the value range;
in this embodiment, a value range of the resource identifier of the resource type supported by the system is obtained, and if the resource type supported by the system is the type a, the value range is 1 to 500.
Because the types of resources in the network management system are various and may be stored in different database tables under the same type, finding all the used resource identifiers includes: inquiring various service (such as Ethernet service, ATM service, etc.) data, inquiring the service of the used identification value of the resource type from the database of the network management system, and exiting if the service is abnormal; otherwise, calculating the used service identifiers from the inquired service data, stripping the service resource identifiers to generate a resource identifier set, and then sequencing the generated resource identifier set so as to facilitate the subsequent search operation.
And step S103, distributing the resource identifiers to the service resources according to the value quantity, the value range and the used resource identifiers.
In this embodiment, a memory space of a used resource identifier is applied in a network management system, an existing binary tree search algorithm is adopted, the resource identifiers in a value range are compared with the used resource identifiers one by one, specifically, a resource identifier in the value range is used as an initial value (which may be a random value), if the initial value is the used resource identifier, the initial value is +1, then the value added with 1 is compared with the used resource identifier, if the value is not searched in the used resource identifier, the value is an available resource identifier, the value is recorded, and a next value is searched continuously until a resource identifier set with a specified number of users is queried.
In addition, if the resource identifier with the number specified by the user is not queried in the value range, an exception prompt is performed to prompt the user that the resource identifier with the specified number cannot be allocated, that is, if the user requires to allocate 10 resource identifiers and only 8 resource identifiers in the value range can be used, the prompt obtained by the user finally indicates that enough resource identifiers cannot be allocated.
In this embodiment, there is no need to apply for the memory space of the array determined by the range from the minimum to the maximum of the resource identifier, and if the range from the minimum to the maximum of the resource identifier exceeds a certain value, the memory space applied for may have hundreds of megabits, and may exhaust the memory space of a certain process of the network management system; in this embodiment, the memory space within the range from the minimum value to the maximum value of the resource identifier does not need to be applied, and only the memory space using the resource identifier needs to be applied, which is generally very small and only has thousands of bits.
Compared with the prior art, when the resource identifier is allocated in the network management system, a certain number of resource identifiers are allocated to the service resource to be allocated according to the value range of the resource types supported by the system and the used resource identifier, and because only the memory space of the used resource identifier needs to be applied, the allocation cannot be performed due to the overlarge range supported by the resource identifier, so that the space occupied by the memory is greatly reduced, the allocation speed is higher, and the performance of the network management system can be improved.
In a preferred embodiment, as shown in fig. 2, on the basis of the embodiment of fig. 1, the step S103 includes:
step S1031, generating a random number in the value range;
step S1032, comparing the resource identifiers between the random number as the initial value and the maximum value of the value range and between the minimum value of the value range and the random number one by one with the used resource identifiers;
step S1033, if the resource identifier is different from the used resource identifier, using the resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
In this embodiment, according to the value range of the resource types supported by the system, a random number is generated based on the minimum value and the maximum value of the value range, and the random number is greater than the minimum value and smaller than the maximum value.
Allocating by taking a random number as an allocated initial value, firstly comparing the initial value with the used resource identifier, if the initial value is different from the used resource identifier, the initial value can be used for allocation and recording, and if the initial value is the same as the used resource identifier, the initial value is used and cannot be used for allocation; and then skipping the initial value, and comparing until the number of the allocated resource identifiers reaches the value number.
In this embodiment, the distribution may be performed between the random value and the maximum value, and then between the minimum value and the random number, or may be performed between the minimum value and the random number, and then between the random value and the maximum value.
In a preferred embodiment, the step S103 further includes:
comparing the first resource identifiers between the random number as the initial value and the maximum value of the value range with the used resource identifiers one by one;
if the first resource identifier is different from the used resource identifier, taking the first resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number;
if the number of the resource identifiers distributed between the random number and the maximum value does not reach the value number, comparing second resource identifiers between the random number and the minimum value of the value range with the used resource identifiers one by one;
and if the second resource identifier is different from the used resource identifier, taking the second resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
The random number is firstly distributed to the maximum value, and then the optimal distribution is carried out between the minimum value and the random number, so that the distribution hit rate can be improved, and the rapid distribution is realized.
Allocating by taking a random number as an allocated initial value, firstly comparing the initial value (namely the first resource identifier) with the used resource identifier, if the initial value is different from the used resource identifier, the initial value can be used for allocation and recording, and if the initial value is the same as the used resource identifier, the initial value is used and cannot be used for allocation; and then comparing the initial value +1 until the number of the allocated resource identifiers reaches the value number.
For example, the value range of the resource identifier of type a is 1-500, the random number is 301 in 1-500, and 301 is used as the initial value of the subsequent operation. Starting from the random number 301 and up to 500, values are taken within this range, e.g. 301,302,303 301,302,303 … … 500, and each value is compared with the used resource identifier, and then the next value is incremented by 1, i.e. 302, and 302 is compared with the used resource identifier.
The role of the random number of the present embodiment is to avoid the following possible scenarios: if the minimum value is used as the initial value for distribution, if a certain resource identifier is distributed and the resource identifier is issued to the equipment to report errors, when the distribution is carried out again, the same resource identifier is also distributed, the equipment is issued again to report errors, and thus, the dead cycle is entered. And the random number is set, so that even if a certain resource identifier is issued to the equipment for error reporting, the random number in the next allocation is different from the previous random number, and the previously allocated resource identifier is skipped, thereby avoiding entering dead cycle.
In addition, in the embodiment, because the initial value is a random number, a pre-stored value in the resource identifier allocation process does not need to be queried, so that query of the database is reduced, allocation of the resource identifiers can be accelerated, and rapid allocation is realized.
In this embodiment, if the value number of the resource identifier specified by the user cannot be obtained between the random number and the maximum value of the value range, the value range needs to be changed, the value (i.e., the second resource identifier) can be obtained between the minimum value of the value range as the initial value and the random number, the minimum value is first compared with the used resource identifier, if the minimum value is different from the used resource identifier, the minimum value can be used for allocation and recording, and if the minimum value is the same as the used resource identifier, the minimum value is already used and cannot be used for allocation; and then comparing the minimum value of +1 until the number of the allocated resource identifiers reaches the value number.
For example, the value range of the resource identifier of type a is 1-500, the random number is 301 in 1-500, the value is taken in 1-300, firstly, 1 is compared with the used resource identifier, then the next value needs to be increased by 1, namely 2, and then 2 is compared with the used resource identifier.
In a preferred embodiment, as shown in fig. 3, on the basis of the embodiment of fig. 2, the step S103 further includes: and S1034, if the quantity of the allocated resource identifiers does not reach the value quantity, performing exception prompting and quitting.
And when all the values in the value range are compared and the value number of the resource identifier specified by the user still cannot be obtained, the network management system directly performs exception prompt and quits. If 400 resource identifiers are required to be acquired in the value range of 1-500 and the number of used resource identifiers exceeds 100, the network management system throws the exception and exits.
The present invention also provides a device for allocating resource identifiers in a network management system, as shown in fig. 4, in an embodiment, the device for allocating resource identifiers in a network management system includes:
an obtaining module 101, configured to obtain a resource type of a service resource to be allocated and a value number of a resource identifier, and obtain a resource type supported by a system according to the resource type;
in this embodiment, the value ranges of the resource identifiers of all types of service resources supported by the network management system are preset. The resource identifications are ordered during the allocation. It is assumed that there are three types of service resources supported by the network management system, which are respectively a type a, a type B and a type C, and the value ranges of the resource identifiers thereof are 1-500, 100001-. And presetting the service resources and the corresponding value ranges in a network management system.
Acquiring the resource type of the service resource to be allocated, and judging whether the network management system has the service resource supporting the resource type. If the resource type supported by the network management system is not the resource type supported by the network management system, for example, the resource type is the D type, the allocation is directly quitted.
In this embodiment, the value number of the resource identifier of the service resource to be allocated is specified and input by the user, and may be any positive integer.
The searching module 102 is configured to obtain a value range of the resource identifier of the resource type supported by the system, and search all used resource identifiers in the value range;
in this embodiment, a value range of the resource identifier of the resource type supported by the system is obtained, and if the resource type supported by the system is the type a, the value range is 1 to 500.
Because the types of resources in the network management system are various and may be stored in different database tables under the same type, finding all the used resource identifiers includes: inquiring various service (such as Ethernet service, ATM service, etc.) data, inquiring the service of the used identification value of the resource type from the database of the network management system, and exiting if the service is abnormal; otherwise, the used service identifiers are calculated from the inquired service data, the resource identifiers of the services are stripped, a set of the resource identifiers is generated, and then the generated set of the resource identifiers is sequenced so as to facilitate the subsequent searching operation.
And the allocation module 103 is configured to allocate the resource identifier to the service resource according to the value number, the value range, and the used resource identifier.
In this embodiment, a memory space of a used resource identifier is applied in a network management system, an existing binary tree search algorithm is adopted, the resource identifiers in a value range are compared with the used resource identifiers one by one, specifically, a resource identifier in the value range is used as an initial value (which may be a random value), if the initial value is the used resource identifier, the initial value is +1, then the value added with 1 is compared with the used resource identifier, if the value is not searched in the used resource identifier, the value is an available resource identifier, the value is recorded, and a next value is searched continuously until a resource identifier set with a specified number of users is queried.
In addition, if the resource identifier with the number specified by the user is not queried in the value range, an exception prompt is performed to prompt the user that the resource identifier with the specified number cannot be allocated, that is, if the user requires to allocate 10 resource identifiers and only 8 resource identifiers in the value range can be used, the prompt obtained by the user finally indicates that enough resource identifiers cannot be allocated.
In this embodiment, there is no need to apply for the memory space of the array determined by the range from the minimum to the maximum of the resource identifier, and if the range from the minimum to the maximum of the resource identifier exceeds a certain value, the memory space applied for may have hundreds of megabits, and may exhaust the memory space of a certain process of the network management system; in this embodiment, the memory space within the range from the minimum value to the maximum value of the resource identifier does not need to be applied, and only the memory space using the resource identifier needs to be applied, which is generally very small and only has thousands of bits.
In a preferred embodiment, as shown in fig. 5, on the basis of the above-mentioned embodiment of fig. 4, the allocation module 103 includes:
a generating unit 1031, configured to generate a random number within the value range;
a comparing unit 1032, configured to compare the resource identifiers between the random number as the start and the maximum value of the value range and between the minimum value of the value range and the random number one by one with the used resource identifiers;
an allocating unit 1033, configured to, if the resource identifier is different from the used resource identifier, use the resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
In this embodiment, according to the value range of the resource types supported by the system, a random number is generated based on the minimum value and the maximum value of the value range, and the random number is greater than the minimum value and smaller than the maximum value.
Allocating by taking a random number as an allocated initial value, firstly comparing the initial value with the used resource identifier, if the initial value is different from the used resource identifier, the initial value can be used for allocation and recording, and if the initial value is the same as the used resource identifier, the initial value is used and cannot be used for allocation; and then skipping the initial value, and comparing until the number of the allocated resource identifiers reaches the value number.
In this embodiment, the distribution may be performed between the random value and the maximum value, and then between the minimum value and the random number, or may be performed between the minimum value and the random number, and then between the random value and the maximum value.
In a preferred embodiment, the comparing unit 1032 comprises a first comparing subunit and a second comparing subunit, and the allocating unit 1033 comprises a first allocating subunit and a second allocating subunit, wherein:
the first comparing subunit is used for comparing the first resource identifiers between the random number as the start and the maximum value of the value range with the used resource identifiers one by one;
a first allocating subunit, configured to, if the first resource identifier is different from the used resource identifier, use the first resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number;
a second comparing subunit, configured to compare, if the number of the resource identifiers allocated between the random number and the maximum value does not reach the value number, the second resource identifiers between the random number and the minimum value of the value range as a start with the used resource identifiers one by one;
and the second allocating subunit is configured to, if the second resource identifier is different from the used resource identifier, use the second resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
Allocating by taking a random number as an allocated initial value, firstly comparing the initial value (namely the first resource identifier) with the used resource identifier, if the initial value is different from the used resource identifier, the initial value can be used for allocation and recording, and if the initial value is the same as the used resource identifier, the initial value is used and cannot be used for allocation; and then comparing the initial value +1 until the number of the allocated resource identifiers reaches the value number.
For example, the value range of the resource identifier of type a is 1-500, the random number is 301 in 1-500, and 301 is used as the initial value of the subsequent operation. Starting from the random number 301 and up to 500, values are taken within this range, e.g. 301,302,303 301,302,303 … … 500, and each value is compared with the used resource identifier, and then the next value is incremented by 1, i.e. 302, and 302 is compared with the used resource identifier.
The role of the random number of the present embodiment is to avoid the following possible scenarios: if the minimum value is used as the initial value for distribution, if a certain resource identifier is distributed and the resource identifier is issued to the equipment to report errors, when the distribution is carried out again, the same resource identifier is also distributed, the equipment is issued again to report errors, and thus, the dead cycle is entered. And the random number is set, so that even if a certain resource identifier is issued to the equipment for error reporting, the random number in the next allocation is different from the previous random number, and the previously allocated resource identifier is skipped, thereby avoiding entering dead cycle.
In addition, in the embodiment, because the initial value is a random number, a pre-stored value in the resource identifier allocation process does not need to be queried, so that query of the database is reduced, allocation of the resource identifiers can be accelerated, and rapid allocation is realized.
In this embodiment, if the value number of the resource identifier specified by the user cannot be obtained between the random number and the maximum value of the value range, the value range needs to be changed, the value (i.e., the second resource identifier) can be obtained between the minimum value of the value range as the initial value and the random number, the minimum value is first compared with the used resource identifier, if the minimum value is different from the used resource identifier, the minimum value can be used for allocation and recording, and if the minimum value is the same as the used resource identifier, the minimum value is already used and cannot be used for allocation; and then comparing the minimum value of +1 until the number of the allocated resource identifiers reaches the value number.
For example, the value range of the resource identifier of type a is 1-500, the random number is 301 in 1-500, the value is taken in 1-300, firstly, 1 is compared with the used resource identifier, then the next value needs to be increased by 1, namely 2, and then 2 is compared with the used resource identifier.
In a preferred embodiment, as shown in fig. 6, on the basis of the above embodiment of fig. 5, the allocating module 103 further includes: and the prompting unit is used for performing exception prompting and quitting if the quantity of the allocated resource identifiers does not reach the value quantity.
And when all the values in the value range are compared and the value number of the resource identifier specified by the user still cannot be obtained, the network management system directly performs exception prompt and quits. If 400 resource identifiers are required to be acquired in the value range of 1-500 and the number of used resource identifiers exceeds 100, the network management system throws the exception and exits.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for allocating resource identifiers in a network management system is characterized in that the method for allocating resource identifiers in the network management system comprises the following steps:
acquiring the resource type of the service resource to be allocated and the value number of the resource identifier, and acquiring the resource type supported by the system according to the resource type;
acquiring a value range of resource identifiers of resource types supported by the system, and searching all used resource identifiers in the value range;
generating a random number within the value range;
comparing the resource identifiers between the random number as the initial value and the maximum value of the value range and between the minimum value of the value range as the initial value and the random number one by one with the used resource identifiers;
and if the resource identifier is different from the used resource identifier, taking the resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
2. The method of resource identifier allocation in a network management system according to claim 1, wherein the step of allocating the resource identifier to the service resource according to the value number, the value range and the used resource identifier further comprises:
comparing the first resource identifiers between the random number as the initial value and the maximum value of the value range with the used resource identifiers one by one;
if the first resource identifier is different from the used resource identifier, taking the first resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number;
if the number of the resource identifiers distributed between the random number and the maximum value does not reach the value number, comparing second resource identifiers between the random number and the minimum value of the value range with the used resource identifiers one by one;
and if the second resource identifier is different from the used resource identifier, taking the second resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
3. The method of resource identifier allocation in a network management system according to claim 1, wherein the step of allocating the resource identifier to the service resource according to the value number, the value range and the used resource identifier further comprises:
and if the quantity of the allocated resource identifiers does not reach the value quantity, performing exception prompting and quitting.
4. The method of resource identifier allocation in a network management system according to claim 1, wherein the step of obtaining a value range of the resource identifier of the resource type supported by the system, and searching all the used resource identifiers in the value range comprises:
and acquiring the service data which is already used by the resource types supported by the system, and acquiring the corresponding resource identification according to the service data.
5. A device for allocating resource identifiers in a network management system is characterized in that the device for allocating resource identifiers in the network management system comprises:
the acquisition module is used for acquiring the resource type of the service resource to be allocated and the value number of the resource identifier, and acquiring the resource type supported by the system according to the resource type;
the searching module is used for acquiring the value range of the resource identifier of the resource type supported by the system and searching all used resource identifiers in the value range;
the distribution module comprises a generation unit, a comparison unit and a distribution unit; the generating unit is used for generating a random number in the value range; the comparing unit is used for comparing the resource identifiers between the random number as the initial value and the maximum value of the value range and between the minimum value of the value range as the initial value and the random number one by one with the used resource identifiers; the allocation unit is configured to use the resource identifier as the allocated resource identifier when the resource identifier is different from the used resource identifier, until the number of the allocated resource identifiers reaches the value number.
6. The apparatus for resource identifier allocation in a network management system according to claim 5, wherein the comparing unit comprises a first comparing subunit and a second comparing subunit, and the allocating unit comprises a first allocating subunit and a second allocating subunit, wherein:
the first comparing subunit is used for comparing the first resource identifiers between the random number as the start and the maximum value of the value range with the used resource identifiers one by one;
a first allocating subunit, configured to, if the first resource identifier is different from the used resource identifier, use the first resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number;
a second comparing subunit, configured to compare, if the number of the resource identifiers allocated between the random number and the maximum value does not reach the value number, the second resource identifiers between the random number and the minimum value of the value range as a start with the used resource identifiers one by one;
and the second allocating subunit is configured to, if the second resource identifier is different from the used resource identifier, use the second resource identifier as the allocated resource identifier until the number of the allocated resource identifiers reaches the value number.
7. The apparatus for resource identifier allocation in a network management system according to claim 5, wherein said allocation module further comprises:
and the prompting unit is used for performing exception prompting and quitting if the quantity of the allocated resource identifiers does not reach the value quantity.
8. The apparatus for resource identifier allocation in a network management system according to claim 5, wherein the lookup module is specifically configured to obtain service data already used by a resource type supported by the system, and obtain a corresponding resource identifier according to the service data.
CN201410618049.3A 2014-11-05 2014-11-05 Method and device for distributing resource identification in network management system Active CN105610593B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410618049.3A CN105610593B (en) 2014-11-05 2014-11-05 Method and device for distributing resource identification in network management system
PCT/CN2015/075861 WO2016070564A1 (en) 2014-11-05 2015-04-03 Method and apparatus for allocating resource identifiers in network management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410618049.3A CN105610593B (en) 2014-11-05 2014-11-05 Method and device for distributing resource identification in network management system

Publications (2)

Publication Number Publication Date
CN105610593A CN105610593A (en) 2016-05-25
CN105610593B true CN105610593B (en) 2020-06-16

Family

ID=55908476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410618049.3A Active CN105610593B (en) 2014-11-05 2014-11-05 Method and device for distributing resource identification in network management system

Country Status (2)

Country Link
CN (1) CN105610593B (en)
WO (1) WO2016070564A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302858A (en) * 2016-08-31 2017-01-04 郑州众智科技股份有限公司 A kind of method of unit parallel controller random assortment communication ID
CN108509535B (en) * 2018-03-15 2020-12-01 烽火通信科技股份有限公司 Resource ID management system and method based on interval
CN110245017B (en) * 2019-05-29 2024-03-26 华为技术有限公司 Resource identifier allocation method and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719793A (en) * 2004-07-08 2006-01-11 华为技术有限公司 Method for allocating channel resources
CN102195957A (en) * 2010-03-19 2011-09-21 华为技术有限公司 Resource sharing method, device and system
CN102487382A (en) * 2010-12-02 2012-06-06 ***通信集团上海有限公司 Resource providing method, apparatus thereof and system thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101291512B (en) * 2007-04-18 2012-05-23 华为技术有限公司 Downlink resource indicating method and device
JP5159574B2 (en) * 2008-11-14 2013-03-06 株式会社東芝 Transmitter and transmission method
CN104125109B (en) * 2013-04-27 2017-06-20 ***通信集团山东有限公司 A kind of method and device for determining network resource status

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719793A (en) * 2004-07-08 2006-01-11 华为技术有限公司 Method for allocating channel resources
CN102195957A (en) * 2010-03-19 2011-09-21 华为技术有限公司 Resource sharing method, device and system
CN102487382A (en) * 2010-12-02 2012-06-06 ***通信集团上海有限公司 Resource providing method, apparatus thereof and system thereof

Also Published As

Publication number Publication date
CN105610593A (en) 2016-05-25
WO2016070564A1 (en) 2016-05-12

Similar Documents

Publication Publication Date Title
CN106657216B (en) Serial number generation method and device
CN110716796B (en) Intelligent task scheduling method and device, storage medium and electronic equipment
CN105610593B (en) Method and device for distributing resource identification in network management system
CN110769080B (en) Domain name resolution method, related product and computer readable storage medium
CN105471700B (en) A kind of methods, devices and systems of Message Processing
CN103997412B (en) Management information base file generation method and device, data handling system
CN111224831B (en) Method and system for generating call ticket
CN104144223B (en) A kind of data capture method and device
CN110868435B (en) Bare metal server scheduling method and device and storage medium
CN111859127A (en) Subscription method and device of consumption data and storage medium
CN105792247B (en) data pushing method and device
CN110855424B (en) Method and device for synthesizing asymmetric flow xDR in DPI field
CN110365605B (en) Message sending method, device, equipment and storage medium
US20220166842A1 (en) Data distribution method and electronic device
CN113014422B (en) Method, device and equipment for scheduling content distribution network bandwidth
CN108834130B (en) Identification distribution method, device, terminal and computer readable storage medium
CN106210159B (en) Domain name resolution method and device
CN106992999B (en) Cross-server data communication processing method
CN106612295B (en) Application downloading method, application pushing method, application downloading device, application pushing device and application downloading system
CN105447141A (en) Data processing method and node
CN114338383B (en) Simplified configuration method and system for video equipment
CN111736944A (en) Docker container positioning method and device based on Kubernetes
CN111666155A (en) Resource configuration file management method, device, equipment and medium
CN113449159A (en) Node data processing method, device, equipment and computer readable storage medium
Anisfeld et al. Scaling of cloud resources-principal component analysis and random forest approach

Legal Events

Date Code Title Description
C06 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