CN109495595B - IP address allocation method, device, communication system and storage medium - Google Patents

IP address allocation method, device, communication system and storage medium Download PDF

Info

Publication number
CN109495595B
CN109495595B CN201710819594.2A CN201710819594A CN109495595B CN 109495595 B CN109495595 B CN 109495595B CN 201710819594 A CN201710819594 A CN 201710819594A CN 109495595 B CN109495595 B CN 109495595B
Authority
CN
China
Prior art keywords
address
user
block
user group
category
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
CN201710819594.2A
Other languages
Chinese (zh)
Other versions
CN109495595A (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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN201710819594.2A priority Critical patent/CN109495595B/en
Publication of CN109495595A publication Critical patent/CN109495595A/en
Application granted granted Critical
Publication of CN109495595B publication Critical patent/CN109495595B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment

Landscapes

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

Abstract

The invention discloses an IP address allocation method, an IP address allocation device, a communication system and a storage medium, wherein the method comprises the following steps: extracting behavior characteristics of the IP address used by the user from the IP address use historical data; classifying the users according to the behavior characteristics, and determining the user group category to which the users belong; determining the user scale of the user group category, and determining the IP address scale corresponding to the user group category according to the user scale; and generating an IP address pre-allocation strategy according to the user group category and the IP address scale, and allocating the IP address based on the IP address pre-allocation strategy. The method, the device, the communication system and the storage medium can intelligently and adaptively adjust the scale of the user block, reduce the time consumption of user block resource adjustment, and have strong operability and high practicability; the allocation of the IP address can be dynamically adjusted, the request can be processed in a centralized way, the resource reallocation self-adaption of the IP address block is strong, the utilization rate is high, and the reallocation period is short.

Description

IP address allocation method, device, communication system and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an IP address allocation method, an IP address allocation apparatus, an IP address analysis system, and a storage medium.
Background
The intelligent dynamic IP allocation strategy is one of important applications in the aspect of network intelligent engines, for example, IPv4 address resources in a metropolitan area network are intelligently classified, and then unified scheduling management is performed by a VBRAS. At present, the following problems exist in the use of the existing IPv 4: the IPv4 addresses are in short supply, and the rest addresses are scattered; IPv4 addresses are under-utilized (internal addresses are under-utilized, such as by tidal effects); no address sharing between devices, insufficient utilization, etc. At present, the problem cannot be solved ideally by manually managing the IPv4 address, and the problems of complex configuration process, long configuration period and the like exist. Therefore, it is desirable to provide a new IP address assignment method.
Disclosure of Invention
In view of the above, an object of the present invention is to provide an IP address allocation method, device and analysis system.
According to an aspect of the present invention, there is provided an IP address allocation method, including: acquiring IP address use history data of a user; extracting behavior characteristics of the IP address used by the user from the IP address use historical data; classifying the users according to the behavior characteristics, and determining the user group category to which the users belong; determining the user scale of the user group category, and determining the IP address scale corresponding to the user group category according to the user scale; and generating an IP address pre-allocation strategy according to the user group category and the IP address scale, and allocating the IP address based on the IP address pre-allocation strategy.
Optionally, the generating an IP address pre-allocation policy according to the user group category and the IP address scale includes: and generating at least one IP address block corresponding to the user group category.
Optionally, the allocating an IP address based on the IP address pre-allocation policy includes: receiving an address allocation request sent by a user; determining a user group category to which a user belongs; and acquiring the IP address in the idle state from the IP address block corresponding to the user group type, configuring the IP address to the user, and setting the IP address in the use state after the configuration is successful.
Optionally, the determining the user group category to which the user belongs includes: setting a category label corresponding to the user group category; and identifying the users belonging to the user group category and the IP address blocks corresponding to the user group category by using the category labels.
Optionally, the acquiring an IP address in an idle state from an IP address block corresponding to the user group category and configuring the IP address to the user further includes: determining a category label corresponding to a user; and determining an IP address block corresponding to the user group category based on the category label.
Optionally, the acquiring an IP address in an idle state from an IP address block corresponding to the user group category and configuring the IP address to the user includes: and determining the IP address which is most frequently used and is in an idle state in the IP address block, and configuring the IP address to the user.
Optionally, it is determined whether there is an IP address in the block of IP addresses that the user has used once, and if so and it is determined that the IP address is in an idle state, the IP address is preferentially assigned to the user.
Optionally, one IP address block is selected from a plurality of IP address blocks corresponding to the user group category as an allocation block, and an IP address in an idle state is obtained from the allocation block and configured to the user; judging whether the number of the IP addresses in the idle state in the distribution block is less than or equal to a redistribution trigger threshold value or not; if yes, selecting an idle IP address block from the plurality of IP address blocks as a standby IP address block, and acquiring the IP address in an idle state from the standby IP address block and configuring the IP address to a user.
Optionally, when it is determined that all IP addresses in the IP address block are in an idle state, determining whether the IP address block is a standby IP address block, and if not, recycling the IP addresses in the IP address block.
Optionally, if the number of times that the address requirement of the user is determined to be not matched with the configured IP address reaches the preset allocation adjustment trigger threshold value within the preset time period, the user is reclassified and the user group category to which the user belongs is determined.
Optionally, the classifying the user according to the behavior feature includes: the algorithm for classifying the users according to the behavior characteristics comprises the following steps: and (4) a K-means clustering algorithm.
Optionally, the behavioral characteristics include: the time of requesting the IP address, the time of surfing the Internet, the time length of surfing the Internet and the frequency of surfing the Internet.
Optionally, the obtaining the IP address usage history data of the user includes: and acquiring a log file, and acquiring the IP address use history data according to the log file.
According to another aspect of the present invention, there is provided an IP address allocating apparatus including: the data acquisition module is used for acquiring the IP address use history data of the user; the data analysis module is used for extracting the behavior characteristics of the IP address used by the user from the IP address use historical data; the user classification module is used for classifying the users according to the behavior characteristics and determining the user group category to which the users belong; the strategy establishing module is used for determining the user scale of the user group category, determining the IP address scale corresponding to the user group category according to the user scale, and generating an IP address pre-allocation strategy according to the user group category and the IP address scale; and the address allocation module is used for allocating the IP address based on the IP address pre-allocation strategy.
Optionally, the policy establishing module is configured to generate at least one IP address block corresponding to the user group category.
Optionally, the address allocation module is configured to receive an address allocation request sent by a user, determine a user group category to which the user belongs, obtain an IP address in an idle state from an IP address block corresponding to the user group category, configure the IP address to the user, and set the IP address in a use state after the configuration is successful.
Optionally, the user classification module is configured to set a category label corresponding to the user group category, and identify the user belonging to the user group category by using the category label; and the strategy establishing module is used for identifying the IP address block corresponding to the user group category by using the category label.
Optionally, the address allocation module is configured to determine a category label corresponding to the user, and determine, based on the category label, an IP address block corresponding to the user group category.
Optionally, the address allocating module is configured to determine an IP address in an idle state with the highest usage frequency in the IP address block, and configure the IP address to the user.
Optionally, the address allocating module is configured to determine whether there is an IP address used by the user in the IP address block, and preferentially allocate the IP address to the user if there is an IP address used by the user and the IP address is determined to be in an idle state.
Optionally, the address allocation module is configured to select one IP address block from multiple IP address blocks corresponding to the user group category as an allocation block, obtain an IP address in an idle state from the allocation block, and configure the IP address to the user; judging whether the number of the IP addresses in the idle state in the distribution block is less than or equal to a redistribution trigger threshold value or not; if yes, selecting an idle IP address block from the plurality of IP address blocks as a standby IP address block, and acquiring the IP address in an idle state from the standby IP address block and configuring the IP address to a user.
Optionally, the address recovery module is configured to, when it is determined that all IP addresses in the IP address block are in an idle state, determine whether the IP address block is a standby IP address block, and if not, recover the IP addresses in the IP address block.
Optionally, the user classifying module is configured to, if it is determined within a preset time period that the number of times that the address requirement of the user is not matched with the configured IP address reaches a preset allocation adjustment trigger threshold, re-classify the user and determine a user group category to which the user belongs.
Optionally, the user classification module is configured to classify the user according to the behavior feature by using an algorithm that includes: and (4) a K-means clustering algorithm.
Optionally, the behavioral characteristics include: the time of requesting the IP address, the time of surfing the Internet, the time length of surfing the Internet and the frequency of surfing the Internet.
Optionally, the data acquisition module is configured to acquire a log file, and acquire the IP address usage history data according to the log file.
According to still another aspect of the present invention, there is provided a communication system including: an IP address assigning device according to any one of claims 14 to 26.
Optionally, the method further comprises: the virtual broadband remote access server VBRAS, the address distribution module of the IP address distribution device is arranged in the VBRAS.
According to still another aspect of the present invention, there is provided an IP address allocating apparatus, including: a memory; and a processor coupled to the memory, the processor configured to perform the IP address assignment method of any of the above based on instructions stored in the memory.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the IP address allocation method as described in any one of the above.
The IP address allocation method, the device, the analysis system and the storage medium extract the behavior characteristics of the IP address used by the user from the IP address use historical data, determine the user group category to which the user belongs and the corresponding IP address scale, generate an IP address pre-allocation strategy according to the division of the user group category and the IP address scale, and allocate the IP address; the real-time dynamic request is processed, the IPv4 address is recovered or redistributed in time, and the user with changed behavior state can be adjusted in time; the scale of the user block can be intelligently and adaptively adjusted, and the time consumption of user block resource adjustment is reduced; the allocation of the IP address can be dynamically adjusted, the request can be processed in a centralized way, the management is efficient, the IP address block resource reallocation self-adaption is strong, the utilization rate is high, and the reallocation period is short.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram illustrating one embodiment of a method for IP address assignment in accordance with the present invention;
fig. 2 is a schematic flowchart of classifying users in an embodiment of the IP address assignment method according to the present invention;
fig. 3 is a schematic flowchart of IP address allocation to a user in an embodiment of the IP address allocation method according to the present invention;
fig. 4 is a schematic flowchart of recovering an IP address in an embodiment of an IP address allocation method according to the present invention;
fig. 5 is a block diagram illustrating an embodiment of an IP address assignment apparatus according to the present invention;
fig. 6 is a block diagram of another embodiment of an IP address assignment device according to the present invention.
Detailed Description
The present invention now will be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of an embodiment of an IP address allocation method according to the present invention, as shown in fig. 1:
step 101, obtaining the IP address use history data of the user. There are various methods for acquiring the IP address use history data of the user, for example, acquiring a log file, and acquiring the IP address use history data from the log file.
And 102, extracting the behavior characteristics of the IP address used by the user from the IP address use historical data.
And 103, classifying the users according to the behavior characteristics, and determining the user group category to which the users belong.
And step 104, determining the user scale of the user group category, and determining the IP address scale corresponding to the user group category according to the user scale.
And 105, generating an IP address pre-allocation strategy according to the user group category and the IP address scale, and allocating the IP address based on the IP address pre-allocation strategy. Generating the IP address pre-allocation policy includes: generating at least one IP address block corresponding to the user group category, and the like.
In one embodiment, a variety of algorithms may be employed to classify users according to behavioral characteristics. For example, the users are classified according to the behavior characteristics, and a K-means clustering algorithm is adopted to build a model. The K-means algorithm is that a certain distance between a data point and a prototype is used as an optimized objective function, and an adjustment rule of iterative operation is obtained by using a function extremum solving method. The K-means algorithm can use Euclidean distance as similarity measure to solve the optimal classification of a corresponding initial clustering center vector V, so that the evaluation index J is minimum. The behavior characteristics of the user using the IP address comprise: the time of requesting the IP address, the time of surfing the internet, the time length of surfing the internet, the frequency of surfing the internet and the like. The existing modeling methods based on the K-means clustering algorithm can be adopted to establish a model, and users can be classified according to behavior characteristics.
Receiving an address allocation request sent by a user, determining a user group category to which the user belongs, acquiring an IP address in an idle state from an IP address block corresponding to the user group category, configuring the IP address to the user, and setting the IP address to be in a use state after the configuration is successful. Category labels corresponding to the user group categories may be set, and users belonging to the user group categories and IP address blocks corresponding to the user group categories may be identified using the category labels. When an address allocation request sent by a user is received, a category label corresponding to the user is determined, an IP address block corresponding to the user group category is determined based on the category label, and an IP address in an idle state is obtained from the IP address block and is configured to the user.
And determining the IP address which is most frequently used and is in an idle state in the IP address block, and configuring the IP address to the user. And determining whether the IP address block has the IP address used by the user once, and if so, preferentially allocating the IP address to the user, namely preferentially allocating the IP address used once in the idle state to the IP address in the idle state with the highest use frequency in the IP address block.
Fig. 2 is a schematic flowchart of classifying users in an embodiment of the IP address assignment method according to the present invention, as shown in fig. 2:
step 201, obtaining a log file, and obtaining the IP address use history data according to the log file.
Background capture is carried out on data of historical use conditions of the IP address of the user, and the data can be obtained by inquiring a log file. The IP address usage history data may have a plurality of data, such as the time when the user uses the IP address the earliest day, the time when the user surfs the internet every day, the total duration of the user using the IP address a week, the number of internet surfing days of the user in a peak period (for example, 8 o 'clock to 10 o' clock at night) in a week, the number of internet surfing days of the user in a peak period in a month, and the like.
Step 202, storing the IP address usage history data in a user database.
Step 203, reading out the IP address use history data from the user database, and performing data cleaning and data sorting
For example, the user database is a hive database, data meeting the conditions is screened by MySQL language (for example, the user on a specific date surfs the internet, and the limited conditions are the date of the day) and is logged in the database and an inquiry statement is input: SELECT FROM user IP info word date '2017-09-09', and using the screened data as the required IP address usage history data.
And (3) carrying out data cleaning and data arrangement on the historical data used by the IP address, and carrying out data preprocessing work, wherein the final data format is as follows: user equipment ID, region number, daily IP address demand period, holiday and festival IP address use condition, and weekday and weekend IP address use condition. And after the IP address use historical data is subjected to data cleaning and sorting, behavior characteristic data of the IP address used by the user is generated.
And step 204, constructing a model by using a K-means clustering algorithm.
And constructing a model by using a K-means clustering algorithm, classifying the user clusters according to the behavior characteristics of the user using the IP address, and setting labels for the users with different IP address requirements. For example, based on the behavior characteristics, the centroid number is adjusted according to the number of the virtualized broadband remote access servers, the input data is aggregated into different clusters according to the similarity of the characteristics, i.e., the classified user categories, and the sk-leann library in Python may be used. For example, the results of the user classification are shown in table 1 below:
user ID Attribution of user group categories
0001 A
0002 B
0003 A
0004 C
TABLE 1 results Table for user classifications
In Table 1, the category of A is characterized in that the Internet is accessed by using an IP address at a high frequency of 16: 00-21: 00 every day; the class characteristics of B are: surfing the Internet by using an IP address at a high frequency of 20: 00-23: 00 every day; the class C is characterized in that the IP address is used for surfing the Internet at a high frequency of 00: 00-02: 00 every day.
In one embodiment, the size of the block of IP addresses is sized according to the size of each user population category. For example: the users belonging to the user group category have x persons in total, the number of the IP addresses contained in the IP address block can be set to be alpha x, and alpha is a system, so that the redundancy of about 10 percent can be increased on the number of the users belonging to each user group category to supply for elastic processing of practical situations. And formulating a preliminary IP address pre-allocation strategy according to the classification condition of the user group categories and the scale of the IP address blocks.
And transmitting the IP address allocation strategy to the V-Bras system for configuration. Several consecutive blocks of IP addresses can be placed into a V-Bras, which is responsible for managing these several blocks of IP addresses uniformly. When a user puts forward an IP address requirement to V-Bras, the V-Bras finds a corresponding IP address block set according to a user label and configures an address in an IP address block with the highest current utilization rate, and on the basis, if the IP address used by the user in history is in an idle state at present, the address is preferentially configured to the IP address used by the user. For example, user M requests an IP address, determines an IP address block corresponding to the user category of M, and selects a first unused IP address from the IP address block to allocate to user M.
Fig. 3 is a schematic flowchart of allocating an IP address to a user in an embodiment of an IP address allocation method according to the present invention, as shown in fig. 3:
step 301, selecting one IP address block from a plurality of IP address blocks corresponding to the user group category as an allocation block, and acquiring an idle IP address from the allocation block and configuring the idle IP address to a user.
Step 302, determine whether the number of IP addresses in idle state in the allocation block is less than or equal to the reallocation trigger threshold. The redistribution trigger threshold may be set according to specific requirements, or may be a percentage.
And 303, if so, selecting an idle IP address block from the plurality of IP address blocks as a standby IP address block, and acquiring the IP address in an idle state from the standby IP address block and configuring the IP address to a user. For example, if it is detected that the usage of the current block of IP addresses has reached the trigger threshold, an idle block of IP addresses belonging to the same class label is prepared as a spare block.
Fig. 4 is a schematic flowchart of recovering an IP address in an embodiment of an IP address allocation method according to the present invention, as shown in fig. 4:
step 401, determining that all IP addresses in the IP address block are in an idle state.
Step 402, determine whether the IP address block is a backup IP address block.
Step 403, if not, the IP address in the IP address block is recycled.
For example, the address of the last use state of a certain IP address block is converted into an idle state, the address in the certain IP address block is completely idle, whether the IP address block is a standby IP address block is determined, and if the IP address block is the standby IP address block, no processing is performed; if not, the IP addresses in the segment of IP address block are uniformly recovered for later distribution. The use condition of the IP address blocks in the management range can be received through the monitoring interface in real time, and statistics can be carried out.
And if the number of times that the address requirement of the user is determined to be not matched with the configured IP address reaches the preset distribution adjustment triggering threshold value in the preset time period, reclassifying the user and determining the user group category to which the user belongs. When the IP address requirement of a certain user is inconsistent with the IP address allocated based on the pre-allocation strategy for a plurality of times within a period of time, the pre-allocation strategy adjustment process is triggered. Recording the user with the IP address requirement not in accordance with the IP address distributed based on the pre-distribution strategy, setting a distribution adjustment triggering threshold, placing the user with the number of times of the occurrence of the non-in accordance with the distribution adjustment triggering threshold into a redistribution set, and classifying and dividing the users in the redistribution set again.
After a period of time, the internet access habits of the users corresponding to some IP address blocks are changed for some subjective or objective reasons and reach a certain proportion (for example, 40% of the users do not conform to the original characteristic habits), the users are classified again, the user group categories to which the users belong are determined, the scale of each pre-allocated IP address block is re-formulated, the adjusted pre-allocation strategy is generated, and the IP addresses are allocated.
The IP address allocation method provided by the embodiment can intelligently and adaptively adjust the scale of the user block and reduce the time consumption of user block resource adjustment, and the adopted number and scale pre-allocation granularity of the user block are small, so that the method is strong in operability and high in practicability; the allocation of the IP address can be dynamically adjusted, so that the management is convenient and the controllability is strong; the method can process the request in a centralized way, has strong self-adaption of IP address block resource reallocation, high utilization rate and short reallocation period, and ensures that the pre-allocation of the IPv4 address is more reasonable.
As shown in fig. 5, the present invention provides an IP address assigning apparatus 50, including: a data collection module 51, a data analysis module 52, a user classification module 53, a policy creation module 54, an address assignment module 55, and an address reclamation module 56. The data collection module 51 acquires the IP address use history data of the user. The data analysis module 52 extracts the behavior characteristics of the user using the IP address from the IP address use history data. The user classification module 53 classifies the users according to the behavior characteristics, and determines the user group category to which the users belong.
The policy establishing module 54 determines the user scale of the user group category, determines the IP address scale corresponding to the user group category according to the user scale, and generates an IP address pre-allocation policy according to the user group category and the IP address scale. The address assignment module 55 performs IP address assignment based on an IP address pre-assignment policy.
The data acquisition module 51 acquires a log file, and acquires IP address use history data from the log file. The algorithm adopted by the user classification module 53 for classifying the users according to the behavior characteristics includes: k-means clustering algorithm, etc. The policy establishment module 54 generates at least one block of IP addresses corresponding to the user population category. The address allocation module 55 receives an address allocation request sent by a user, determines a user group category to which the user belongs, acquires an IP address in an idle state from an IP address block corresponding to the user group category, configures the IP address to the user, and sets the IP address in a use state after the configuration is successful. The user classification module 53 sets a category label corresponding to the user group category, and identifies users belonging to the user group category using the category label. The policy creation module 54 identifies IP address blocks corresponding to the user group category using the category label.
The address assignment module 55 determines a category label corresponding to the user, and determines an IP address block corresponding to the user group category based on the category label. The address assignment module 55 determines the IP address in the idle state with the highest usage frequency in the IP address block, and configures the IP address to the user. The address assignment module 55 determines whether there is an IP address in the IP address block that the user has used once, and preferentially assigns the IP address to the user if there is and it is determined that the IP address is in an idle state.
The address allocation module 55 selects one IP address block from a plurality of IP address blocks corresponding to the user group category as an allocation block, and acquires an IP address in an idle state from the allocation block and configures the IP address to the user. The address allocating module 55 determines whether the number of idle IP addresses in the allocation block is less than or equal to a reallocation trigger threshold, and if so, the address allocating module 55 selects an idle IP address block from the multiple IP address blocks as a spare IP address block, acquires an idle IP address from the spare IP address block, and configures the spare IP address to a user.
When determining that all IP addresses in the IP address block are in an idle state, the address recovery module 56 determines whether the IP address block is a standby IP address block, and if not, recovers the IP addresses in the IP address block. If the user classification module 53 determines that the number of times that the address requirement of the user is not matched with the configured IP address reaches the preset allocation adjustment trigger threshold value within the preset time period, the user classification module reclassifies the user and determines the user group category to which the user belongs.
In one embodiment, the present invention provides a communication system comprising the IP address allocating apparatus as in any one of the above embodiments. The address allocating module 55 and the address recycling module 56 of the IP address allocating apparatus may be provided within a virtualized broadband remote access server VBRAS that centralizes IP address blocks responsible for partial areas.
Fig. 6 is a block diagram of another embodiment of an IP address assignment device according to the present invention. As shown in fig. 6, the apparatus may include a memory 61, a processor 62, a communication interface 63, and a bus 66. The memory 61 is used for storing instructions, the processor 62 is coupled to the memory 61, and the processor 62 is configured to implement the IP address assignment method described above based on the instructions stored by the memory 61.
The memory 61 may be a high-speed RAM memory, a non-volatile memory (non-volatile memory), or the like, and the memory 61 may be a memory array. The storage 61 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules. The processor 62 may be a central processing unit CPU, or an application Specific Integrated circuit asic, or one or more Integrated circuits configured to implement the IP address assignment method of the present invention.
In one embodiment, the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement an IP address assignment method as in any of the above embodiments.
The IP address allocation method, apparatus, analysis system, and storage medium provided in the foregoing embodiments extract behavior characteristics of an IP address used by a user from IP address use history data, determine a user group category to which the user belongs and a corresponding IP address scale, generate an IP address pre-allocation policy according to the user group category division and the IP address scale, and perform IP address allocation; the real-time dynamic request can be processed, the IPv4 address can be recovered or redistributed in time, and the user with changed behavior state can be adjusted in time; the method has the advantages that the scale of the user blocks can be intelligently and adaptively adjusted, the time consumption of user block resource adjustment is reduced, the number and scale pre-distribution granularity of the adopted user blocks are small, the operability is high, and the practicability is high; the allocation of the IP address can be dynamically adjusted, so that the management is convenient and the controllability is strong; the method has the advantages of centralized request processing, high management efficiency, strong IP address block resource reallocation self-adaption, high utilization rate and short reallocation period, and enables IPv4 address pre-allocation to be more reasonable.
The method and system of the present invention may be implemented in a number of ways. For example, the methods and systems of the present invention may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustrative purposes only, and the steps of the method of the present invention are not limited to the order specifically described above unless specifically indicated otherwise. Furthermore, in some embodiments, the present invention may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (18)

1. An IP address assignment method, comprising:
acquiring IP address use history data of a user;
extracting behavior characteristics of the IP address used by the user from the IP address use historical data;
classifying the users according to the behavior characteristics, and determining the user group category to which the users belong;
determining the user scale of the user group category, and determining the IP address scale corresponding to the user group category according to the user scale;
generating an IP address pre-allocation strategy according to the user group category and the IP address scale, and allocating the IP address based on the IP address pre-allocation strategy, wherein the method comprises the following steps:
receiving an address allocation request sent by a user;
determining a user group category to which a user belongs;
acquiring an IP address in an idle state from an IP address block corresponding to the user group type, configuring the IP address to a user, and setting the IP address to be in a use state after the configuration is successful;
selecting one IP address block from a plurality of IP address blocks corresponding to the user group category as an allocation block, and acquiring an IP address in an idle state from the allocation block and configuring the IP address to a user;
judging whether the number of the IP addresses in the idle state in the distribution block is less than or equal to a redistribution trigger threshold value or not;
if yes, selecting an idle IP address block from the IP address blocks as a standby IP address block, and acquiring an IP address in an idle state from the standby IP address block and configuring the IP address to a user;
if the number of times that the address requirement of the user is determined to be not matched with the configured IP address reaches a preset distribution adjustment triggering threshold value within a preset time period, reclassifying the user and determining the user group category to which the user belongs;
the step of acquiring the IP address in the idle state from the IP address block corresponding to the user group category and configuring the IP address to the user comprises the following steps:
determining an IP address which has the highest use frequency and is in an idle state in an IP address block, and configuring the IP address to a user; or, determining whether there is an IP address used by the user once in the IP address block, and if so, preferentially allocating the IP address to the user;
and when all the IP addresses in the IP address block are determined to be in an idle state, judging whether the IP address block is a standby IP address block, and if not, recovering the IP addresses in the IP address block.
2. The method of claim 1, wherein the generating an IP address pre-allocation policy based on the user population category and IP address size comprises:
and generating at least one IP address block corresponding to the user group category.
3. The method of claim 1, wherein the determining the user group category to which the user belongs comprises:
setting a category label corresponding to the user group category;
and identifying the users belonging to the user group category and the IP address blocks corresponding to the user group category by using the category labels.
4. The method of claim 3, wherein the obtaining the IP address in idle state from the IP address block corresponding to the user group category and configuring the IP address to the user further comprises:
determining a category label corresponding to a user;
and determining an IP address block corresponding to the user group category based on the category label.
5. The method of claim 1, wherein the classifying the user according to the behavioral characteristics comprises:
the algorithm for classifying the users according to the behavior characteristics comprises the following steps: and (4) a K-means clustering algorithm.
6. The method of claim 1,
the behavior characteristics include: the time of requesting the IP address, the time of surfing the Internet, the time length of surfing the Internet and the frequency of surfing the Internet.
7. The method of claim 1, wherein the obtaining IP address usage history data for the user comprises:
and acquiring a log file, and acquiring the IP address use history data according to the log file.
8. An IP address assignment apparatus, comprising:
the data acquisition module is used for acquiring the IP address use history data of the user;
the data analysis module is used for extracting the behavior characteristics of the IP address used by the user from the IP address use historical data;
the user classification module is used for classifying the users according to the behavior characteristics and determining the user group category to which the users belong;
the strategy establishing module is used for determining the user scale of the user group category, determining the IP address scale corresponding to the user group category according to the user scale, and generating an IP address pre-allocation strategy according to the user group category and the IP address scale;
the address allocation module is used for allocating IP addresses based on the IP address pre-allocation strategy;
the address allocation module is used for receiving an address allocation request sent by a user, determining a user group category to which the user belongs, acquiring an IP address in an idle state from an IP address block corresponding to the user group category, configuring the IP address to the user, and setting the IP address to be in a use state after the configuration is successful; selecting one IP address block from a plurality of IP address blocks corresponding to the user group category as an allocation block, and acquiring an IP address in an idle state from the allocation block and configuring the IP address to a user; judging whether the number of the IP addresses in the idle state in the distribution block is less than or equal to a redistribution trigger threshold value or not; if yes, selecting an idle IP address block from the IP address blocks as a standby IP address block, and acquiring an IP address in an idle state from the standby IP address block and configuring the IP address to a user;
the user classification module is further configured to reclassify the user and determine a user group category to which the user belongs if the number of times that the address requirement of the user is determined to be not matched with the configured IP address reaches a preset allocation adjustment trigger threshold value within a preset time period;
the address allocation module is used for determining the IP address which is in the idle state and has the highest use frequency in the IP address block and configuring the IP address to a user; determining whether the IP address block has the IP address used by the user once, and if so, preferentially allocating the IP address to the user;
and the address recovery module is used for judging whether the IP address block is a standby IP address block or not when all the IP addresses in the IP address block are determined to be in an idle state, and recovering the IP addresses in the IP address block if the IP address block is not in the standby IP address block.
9. The apparatus of claim 8,
the strategy establishing module is used for generating at least one IP address block corresponding to the user group category.
10. The apparatus of claim 8,
the user classification module is used for setting a class label corresponding to the user group class and identifying the users belonging to the user group class by using the class label;
and the strategy establishing module is used for identifying the IP address block corresponding to the user group category by using the category label.
11. The apparatus of claim 10,
the address allocation module is used for determining a category label corresponding to the user and determining an IP address block corresponding to the user group category based on the category label.
12. The apparatus of claim 8,
the user classification module is used for classifying users according to the behavior characteristics by adopting an algorithm comprising: and (4) a K-means clustering algorithm.
13. The apparatus of claim 8,
the behavior characteristics include: the time of requesting the IP address, the time of surfing the Internet, the time length of surfing the Internet and the frequency of surfing the Internet.
14. The apparatus of claim 8,
and the data acquisition module is used for acquiring a log file and acquiring the IP address use history data according to the log file.
15. A communication system, comprising:
the IP address assigning apparatus according to any one of claims 8 to 14.
16. The system of claim 15, further comprising:
the virtual broadband remote access server VBRAS, the address distribution module of the IP address distribution device is arranged in the VBRAS.
17. An IP address assignment apparatus, comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the IP address assignment method of any of claims 1-7 based on instructions stored in the memory.
18. A computer-readable storage medium storing computer instructions which, when executed by a processor, implement the IP address assignment method of any one of claims 1 to 7.
CN201710819594.2A 2017-09-13 2017-09-13 IP address allocation method, device, communication system and storage medium Active CN109495595B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710819594.2A CN109495595B (en) 2017-09-13 2017-09-13 IP address allocation method, device, communication system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710819594.2A CN109495595B (en) 2017-09-13 2017-09-13 IP address allocation method, device, communication system and storage medium

Publications (2)

Publication Number Publication Date
CN109495595A CN109495595A (en) 2019-03-19
CN109495595B true CN109495595B (en) 2022-04-08

Family

ID=65688714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710819594.2A Active CN109495595B (en) 2017-09-13 2017-09-13 IP address allocation method, device, communication system and storage medium

Country Status (1)

Country Link
CN (1) CN109495595B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756865B (en) * 2019-03-28 2024-02-09 苏州铭威天欣信息科技有限公司 Communication management method for base station and user terminal
CN111371912B (en) * 2020-02-19 2022-09-06 中国铁路信息科技集团有限公司 IP address management system and method based on state
CN114567617B (en) * 2022-02-25 2023-08-04 苏州浪潮智能科技有限公司 IP address allocation method, system, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102694873B (en) * 2011-03-22 2016-02-10 中兴通讯股份有限公司 A kind of address pool distribution system and method
CN102404230A (en) * 2011-12-15 2012-04-04 杭州华三通信技术有限公司 Flow control method and device
CN103607482A (en) * 2013-11-27 2014-02-26 中国联合网络通信集团有限公司 IP address distribution method and device
CN106131242B (en) * 2016-08-17 2020-04-28 郑州埃文计算机科技有限公司 Classification method of IP application scenes

Also Published As

Publication number Publication date
CN109495595A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109167835B (en) Physical resource scheduling method and system based on kubernets
WO2021179462A1 (en) Improved quantum ant colony algorithm-based spark platform task scheduling method
CN109495595B (en) IP address allocation method, device, communication system and storage medium
CN104391749B (en) Resource allocation method and device
WO2021052394A1 (en) Model training method, apparatus, and system
CN110544109A (en) user portrait generation method and device, computer equipment and storage medium
CN111414070B (en) Case power consumption management method and system, electronic device and storage medium
CN113296929A (en) Resource matching method, device and system based on cloud computing
US11003959B1 (en) Vector norm algorithmic subsystems for improving clustering solutions
CN116385857B (en) Calculation power distribution method based on AI intelligent scheduling
CN114625523A (en) Resource allocation method, device and computer readable storage medium
WO2020170852A1 (en) Prediction device, prediction method, and program
CN112416590A (en) Server system resource adjusting method and device, computer equipment and storage medium
CN113886086A (en) Cloud platform computing resource allocation method, system, terminal and storage medium
CN111314234B (en) Flow distribution method and device, storage medium and electronic equipment
CN105893150B (en) Interface calling frequency control method and device and interface calling request processing method and device
CN104992060A (en) User age estimation method and apparatus
CN112685157A (en) Task processing method and device, computer equipment and storage medium
Ray et al. Is high performance computing (HPC) ready to handle big data?
CN112232774B (en) Account clearing and backing and memory allocation prediction method for office automation system
CN113032522A (en) Text parallel data mining system and method
CN111736981A (en) Container resource allocation method, device, equipment and storage medium
CN111311439A (en) Method, system and storage medium for screening order shops based on network order platform
Tong et al. Service reliability oriented modeling for the failure of cloud data center
CN112468546A (en) Account position determining method, account position determining device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant