CN108573018A - IP library generating methods, device, electronic equipment and computer readable storage medium - Google Patents

IP library generating methods, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN108573018A
CN108573018A CN201810030614.2A CN201810030614A CN108573018A CN 108573018 A CN108573018 A CN 108573018A CN 201810030614 A CN201810030614 A CN 201810030614A CN 108573018 A CN108573018 A CN 108573018A
Authority
CN
China
Prior art keywords
information
line
sections
keyword
mark
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.)
Granted
Application number
CN201810030614.2A
Other languages
Chinese (zh)
Other versions
CN108573018B (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.)
Beijing Jin Bo Xunrui Network Technology Co Ltd
Beijing Jinxun Ruibo Network Technology Co Ltd
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Jin Bo Xunrui Network Technology Co Ltd
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jin Bo Xunrui Network Technology Co Ltd, Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Jin Bo Xunrui Network Technology Co Ltd
Priority to CN201810030614.2A priority Critical patent/CN108573018B/en
Publication of CN108573018A publication Critical patent/CN108573018A/en
Application granted granted Critical
Publication of CN108573018B publication Critical patent/CN108573018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/668Internet protocol [IP] address subnets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/69Types of network addresses using geographic information, e.g. room number

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Telephonic Communication Services (AREA)

Abstract

An embodiment of the present invention provides a kind of IP library generating methods, device, electronic equipment and computer readable storage medium, methods to include:The first line for determining the corresponding IP sections of ownership of each first information using each first line and belongs to the IP sections of each first line, generates the libraries IP, wherein determines the corresponding IP sections of first line belonged to of each first information in the following manner:Judge in antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;If so, using the mark and weight and the mark and weight of operator that obtain the corresponding geographical location of each target keyword, the corresponding line identification of the first information is obtained, is identified as first line;Circuit table is searched, circuit corresponding with first line mark is obtained, determines that obtained circuit is the first line of the corresponding IP sections of ownership of the first information.Using technical solution provided in an embodiment of the present invention, the efficiency for generating the libraries IP is improved.

Description

IP library generating methods, device, electronic equipment and computer readable storage medium
Technical field
The present invention relates to technical field of information processing, more particularly to a kind of IP library generating methods, device, electronic equipment and Computer readable storage medium.
Background technology
With the development of Internet service, increasingly increased to optimize the demand of Internet service by obtaining user geographical location It is long, for example, CDN (Content Delivery Network, content distributing network) is optimized by obtaining user geographical location Dispatch service, to realize quickly and accurately response user request, to improve user experience.
For the ease of obtaining user geographical location, IP (Internet Protocol, the agreement interconnected between network) library is answered It transports and gives birth to.The libraries IP, are also IP address database, are for storing IP sections and its number in corresponding operator and/or geographical location According to library.IP sections include multiple IP address within the scope of from start ip address to end ip address, for example, 192.168.0.1- 192.168.0.254 it is one using 192.168.0.1 as start ip address, using 192.168.0.254 as the IP of end address sections, Operator refers to the supplier for providing network service, for example, telecommunications, unicom, movement etc., each operator corresponds to one or more It is IP sections a, and operator can be corresponded to from itself corresponding IP sections of one or more by region division diverse geographic location IP sections, for different regions user by IP sections access networks, since operator can also change IP sections of corresponding geography Position, that is to say, that same IP sections may correspond to different geographical locations in different times, and therefore, it is necessary to be periodically generated IP Library, to improve the accuracy in the libraries IP.
Since under different business demands, the dimension of circuit needed for business is different, circuit can be operator, geographical position One kind in setting or combination, it is, the circuit needed for some business is operator, some is geographical location, is also fortune Seek the combination of quotient and geographical location.In order to generate while meeting the libraries IP of multiple business demand, it usually needs in advance make circuit IP base configuration files are written for keyword, and IP base configuration file is used to store the key corresponding to a kind of circuit of dimension Word, for example, the corresponding circuits of IP base configuration files A are operator, then the keyword in IP base configuration files A is the name of operator Claim, such as telecommunications, unicom, movement etc..
Currently, the generation method in the libraries IP is:Read each IP base configuration files stored in the machine;Match for the libraries every IP File is set, by traversing a source IP library, it is IP sections corresponding to obtain each keyword institute terminated line in the IP base configuration files, For each keyword, determine that corresponding IP sections of the keyword institute terminated line belongs to the keyword, in each libraries IP of determination In configuration file after the IP sections of each keyword, the libraries IP are formed with the IP of each keyword and each keyword sections, to complete At the generation in the libraries IP.
As it can be seen that existing IP library generating methods need to meet multiple business demand simultaneously for the libraries IP to be generated It presets multiple IP base configuration files and needs to be traversed for a source IP library for every IP base configuration files, it is therefore, every in order to obtain The IP sections of each keyword, need the libraries multiple ergodic source IP in a IP base configuration files, lead to the inefficiency for generating the libraries IP.
Invention content
The embodiment of the present invention is designed to provide a kind of IP library generating methods, device, electronic equipment and computer-readable Storage medium improves the efficiency for generating the libraries IP to realize.
In a first aspect, an embodiment of the present invention provides a kind of IP library generating methods, it is applied to electronic equipment, method includes:
It determines the corresponding IP section first line belonged to of each first information in the correspondence of source IP library record, utilizes institute The IP sections of determining each first line and each first line determined by belonging to, the libraries generation IP, wherein the first information Including geographical location and/or operator, correspondence is:The first information and IP sections of correspondence;
The corresponding IP section first line belonged to of each first information in source IP library is determined in the following manner:
Judge in preset antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;Its In, antistop list is used to store keyword corresponding to the circuit of each dimension, the geographical location corresponding to each keyword Mark and weight and the mark and weight of operator, the weight in the corresponding geographical location of keyword, for characterizing keyword pair The matching degree of circuit corresponding to the geographical location answered and keyword, the weight of the corresponding operator of keyword are closed for characterizing The matching degree of the corresponding operator of keyword and circuit corresponding to keyword;
If so, the mark and weight in the corresponding geographical location of each target keyword are obtained from antistop list, and The mark and weight of operator;Utilize the mark and weight and the mark of each operator in each geographical location obtained And weight, the corresponding line identification of the first information is obtained, is identified as first line;
It is searched in preset circuit table, obtains circuit corresponding with first line mark, determine obtained line Road is the first line of the corresponding IP sections of ownership of the first information;Wherein, circuit table is used to store the circuit and circuit of each dimension Correspondence between mark.
Optionally, in the case of keyword matched with the first information is not present in preset antistop list, default Circuit table in searched, obtain with first line identify corresponding first line the step of before, method further includes:
Set the corresponding line identification of the first information to default line identification.
Optionally, the mark and weight and the mark and power of each operator in each geographical location obtained are utilized Weight obtains the corresponding line identification of the first information, including:
The mark of the mark in the maximum geographical location of weight and the maximum operator of weight in obtained mark is utilized, is counted The corresponding message identification of the first information is calculated, is identified as the first information;
It is searched in preset mapping table, obtains the first information and identify corresponding line identification, as the first information Corresponding line identification, wherein mapping table is used to store the mapping relations between message identification and line identification.
Optionally, there is no with after the matched keyword of the first information in judging preset antistop list, method is also Including:
It generates and increases keyword report newly, wherein newly-increased keyword report is for prompting the user whether the newly-increased and first information Matched keyword;
After receiving the instruction for confirming newly-increased and the matched keyword of the first information, obtain and the matched pass of the first information Keyword, and antistop list will be updated to the matched keyword of the first information.
Optionally, it is stored with reference table in electronic equipment, wherein reference table is used to preserve each second information, and every One second information is IP sections corresponding, is determining that obtained circuit is the step of the first line of the corresponding IP sections of ownership of the first information Before rapid, method further includes:
Judge in all second information with the presence or absence of with matched second information of the first information, as the second information of target; If it does, judging whether corresponding IP sections IP sections corresponding with the second information of target of the first information conflicts;If conflict, by the To reset to the second information of target IP sections corresponding for corresponding IP sections of one information.
Optionally, it is stored with reference table in electronic equipment, wherein reference table is used to preserve each second information, and every One second information is IP sections corresponding, using identified each first line and each first line determined by belonging to IP sections, generate the libraries IP the step of before, method further includes:
Determine the second circuit of the corresponding IP sections of ownership of every 1 second information;
For each identified first line, judge to whether there is in all fixed second circuits and first line Identical second circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belonging to target Whether the IP sections of the second circuit conflict;If conflict, the IP sections for belonging to first line are reset to and belong to the second line of target The IP sections on road.
Optionally, using identified each first line and the IP of each first line determined by belonging to Before the step of section, the generation libraries IP, method further includes:
Obtain the IP segment limits that the IP sections of each first line determined by belonging to are formed;
Verify whether IP segment limits are equal to default IP segment limits;
If so, executing using identified each first line and belonging to the IP of identified each first line The step of section, the generation libraries IP.
Optionally, using identified each first line and the IP of each first line determined by belonging to Before the step of section, the generation libraries IP, method further includes:
The representation that conversion belongs to the IP sections of identified each first line is to preset IP sections of representations.
Optionally, using identified each first line and the IP of each first line determined by belonging to After the step of section, the generation libraries IP, method further includes:
Generate the version number in the libraries IP;
The IP sections of identified each first line in the libraries backup IP and each first line determined by belonging to, Obtain the libraries copy IP;The libraries version labelled notation copy IP are used in combination.
Second aspect, an embodiment of the present invention provides a kind of libraries IP generating means, are applied to electronic equipment, and device includes:
Determining module, in the correspondence for determining source IP library record each first information it is corresponding IP section belong to the One circuit;
Generation module, using identified each first line and the IP of each first line determined by belonging to Section generates the libraries IP;
Wherein, the first information includes geographical location and/or operator, and correspondence, which is that the first information is corresponding with IP sections, to close System;
Determining module determines the corresponding IP section first line belonged to of each first information in source IP library in the following manner:
Judge in preset antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;Its In, antistop list is used to store keyword corresponding to the circuit of each dimension, the geographical location corresponding to each keyword Mark and weight and the mark and weight of operator, the weight in the corresponding geographical location of keyword, for characterizing keyword pair The matching degree of circuit corresponding to the geographical location answered and keyword, the weight of the corresponding operator of keyword are closed for characterizing The matching degree of the corresponding operator of keyword and circuit corresponding to keyword;
If so, the mark and weight in the corresponding geographical location of each target keyword are obtained from antistop list, and The mark and weight of operator;Utilize the mark and weight and the mark of each operator in each geographical location obtained And weight, the corresponding line identification of the first information is obtained, is identified as first line;
It is searched in preset circuit table, obtains circuit corresponding with first line mark, determine obtained line Road is the first line of the corresponding IP sections of ownership of the first information;Wherein, circuit table is used to store the circuit and circuit of each dimension Correspondence between mark.
Optionally, determining module is additionally operable to:
In the case of keyword matched with the first information is not present in preset antistop list, in preset circuit table In searched, before obtaining first line corresponding with first line mark, the corresponding line identification of the first information is arranged To preset line identification.
Optionally, determining module utilizes mark and weight and each operator in each geographical location obtained Mark and weight obtain the corresponding line identification of the first information, specially:
The mark of the mark in the maximum geographical location of weight and the maximum operator of weight in obtained mark is utilized, is counted The corresponding message identification of the first information is calculated, is identified as the first information;
It is searched in preset mapping table, obtains the first information and identify corresponding line identification, as the first information Corresponding line identification, wherein mapping table is used to store the mapping relations between message identification and line identification.
Optionally, determining module is additionally operable to:
There is no with after the matched keyword of the first information in judging preset antistop list, generates and increase keyword newly Report, wherein newly-increased keyword report is for prompting the user whether the newly-increased and matched keyword of the first information;
After receiving the instruction for confirming newly-increased and the matched keyword of the first information, obtain and the matched pass of the first information Keyword, and antistop list will be updated to the matched keyword of the first information.
Optionally, it is stored with reference table in electronic equipment, wherein reference table is used to preserve each second information, and every One second information is IP sections corresponding, and determining module is additionally operable to:
Before determining the first line that obtained circuit is the corresponding IP sections of ownership of the first information, all second are judged In information with the presence or absence of with matched second information of the first information, as the second information of target;If it does, judging the first information Whether corresponding IP sections IP sections corresponding with the second information of target conflict;If conflict, by the corresponding IP sections of resetting of the first information It is IP sections corresponding for the second information of target.
Optionally, it is stored with reference table in electronic equipment, wherein reference table is used to preserve each second information, and every One second information is IP sections corresponding, and determining module is additionally operable to:
Using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the second circuit of the corresponding IP sections of ownership of every 1 second information is determined;
For each identified first line, judge to whether there is in all fixed second circuits and first line Identical second circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belonging to target Whether the IP sections of the second circuit conflict;If conflict, the IP sections for belonging to first line are reset to and belong to the second line of target The IP sections on road.
Optionally, generation module is additionally operable to:
Using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the IP segment limits that the IP sections of each first line determined by belonging to are formed are obtained;
Verify whether IP segment limits are equal to default IP segment limits;
If so, using identified each first line and the IP sections of each first line determined by belonging to, Generate the libraries IP.
Optionally, generation module is additionally operable to:
Using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the representation that conversion belongs to the IP sections of identified each first line is to preset IP sections of representations.
Optionally, generation module is additionally operable to:
Using identified each first line and the IP sections of each first line determined by belonging to, generation IP After library, the version number in the libraries IP is generated;
The IP sections of identified each first line in the libraries backup IP and each first line determined by belonging to, Obtain the libraries copy IP;The libraries version labelled notation copy IP are used in combination.
The third aspect, an embodiment of the present invention provides a kind of electronic equipment, electronic equipment includes:Processor and memory, Wherein,
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any of the above-described IP library generating methods The step of.
Fourth aspect, an embodiment of the present invention provides a kind of computer readable storage medium, computer readable storage mediums It is inside stored with computer program, any of the above-described IP library generating methods are realized when computer program is executed by processor.
5th aspect, an embodiment of the present invention provides a kind of computer program products including instruction, when it is in computer When upper operation so that computer executes any of the above-described IP library generating methods.
6th aspect, an embodiment of the present invention provides a kind of computer programs, when run on a computer so that meter Calculation machine executes any of the above-described IP library generating methods.
Using method provided in an embodiment of the present invention, determine that each first information corresponds in the correspondence of source IP library record IP sections ownership first line, using identified each first line and each first line determined by belonging to IP sections, generate the libraries IP, wherein determine the first line of the corresponding IP sections of ownership of each first information in the following manner:Judge In antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;If so, each using obtaining The mark and weight in the corresponding geographical location of target keyword and the mark and weight of operator obtain the first information and correspond to Line identification, as first line identify;Circuit table is searched, circuit corresponding with first line mark is obtained, determines gained The circuit arrived is the first line of the corresponding IP sections of ownership of the first information.
As it can be seen that during generating the libraries IP, the libraries multiple ergodic source IP are not necessarily to, to improve the efficiency for generating the libraries IP.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow diagram of IP library generating methods provided in an embodiment of the present invention;
Fig. 2 is a kind of relation schematic diagram of tables of data provided in an embodiment of the present invention;
Fig. 3 is the relation schematic diagram of another tables of data provided in an embodiment of the present invention;
Fig. 4 is a kind of tables of data schematic diagram provided in an embodiment of the present invention;
Fig. 5 is a kind of flow signal of general_ipbinfo table methods in update Fig. 2 provided in an embodiment of the present invention Figure;
Fig. 6 is another flow diagram of IP library generating methods provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of the libraries IP provided in an embodiment of the present invention generating means;
Fig. 8 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
To improve the efficiency for generating the libraries IP, an embodiment of the present invention provides a kind of IP library generating methods, device, electronic equipments And computer readable storage medium.
A kind of IP library generating methods provided in an embodiment of the present invention are introduced first below.
It should be noted that the executive agent of IP library generating methods provided in an embodiment of the present invention, can be a kind of libraries IP Generating means, specifically, the libraries the IP generating means can be located in electronic equipment, electronic equipment can be for server, movement eventually End etc., is not construed as limiting herein.
Shown in Figure 1, a kind of IP library generating methods provided in an embodiment of the present invention are applied to electronic equipment, including such as Lower step:
S101 determines the corresponding IP section first line belonged to of each first information in the correspondence of source IP library record;
S102 is given birth to using identified each first line and the IP sections of each first line determined by belonging to At the libraries IP.
Wherein, the first information includes geographical location and/or operator, the correspondence of source IP library record be the first information with IP sections of correspondence;
The corresponding IP section first line belonged to of each first information in source IP library is determined in the following manner, and which can It is specific as follows to include step A1-A4:
Step A1, judge in preset antistop list with the presence or absence of with the matched keyword of the first information, as target close Keyword;If so, thening follow the steps A2;
Step A2 obtains the mark and weight in the corresponding geographical location of each target keyword from antistop list, and The mark and weight of operator;Utilize the mark and weight and the mark of each operator in each geographical location obtained And weight, the corresponding line identification of the first information is obtained, is identified as first line;
Step A3 is searched in preset circuit table, obtains circuit corresponding with first line mark;
Step A4 determines that obtained circuit is the first line of the corresponding IP sections of ownership of the first information;
Wherein, antistop list is used to store corresponding to keyword corresponding to the circuit of each dimension, each keyword The mark and weight in geographical location and the mark and weight of operator, the weight in the corresponding geographical location of keyword are used for table The matching degree in sign keyword corresponding geographical location and circuit corresponding to keyword, the weight of the corresponding operator of keyword, Matching degree for characterizing the corresponding operator of keyword and circuit corresponding to keyword;Circuit table is for storing each dimension Circuit and line identification between correspondence.
Source IP library record has the first information and IP sections of correspondence, after obtaining source IP library, can be obtained from source IP library It obtains the first information and the first information is IP sections corresponding.Source IP library can be the libraries IP that third party provides.The embodiment of the present invention pair The mode that electronic equipment obtains source IP library does not limit, for example, which can be:Every preset time period often reaches default Time point sends to third party and obtains request, to obtain source IP library of the third party for acquisition request feedback.Using this Mode can regularly update the source IP library in electronic equipment, to improve the real-time and accuracy in obtained source IP library.
Illustratively, it is assumed that preset time period is 1 hour, then every 1 hour, is sent to third party and obtain request, and obtained Obtain source IP library of the third party for acquisition request feedback;Assuming that preset time point is 9:00、14:00、18:00, then it often reaches Daily 9:00、14:00、18:It when 00, is sent to third party and obtains request, and obtain third party for acquisition request feedback Source IP library.
The first information includes geographical location and/or operator, it can be understood as, the first information can be by geographical location and The information of operator's composition, such as Guangzhou telecommunications;Can also be the information being made of geographical location, such as Hubei Wuhan;Also may be used With the information being made of operator, such as move;It can also be and be made of other information and geographical location and/or operator Information, for example, the first information being made of Hubei and the Central China University of Science and Technology.
Each first information corresponds to one IP sections, the embodiment of the present invention to IP corresponding to the first information sections of representation not It limits, specifically, IP sections of representation can be the form of one section of IP address range, such as:162.105.113.1- 162.105.1.254, or IP address adds the form of subnet mask, for example, 192.168.1.0/24.
In this application, circuit refers to IP sections of ownership side, it is, one IP sections belong to one or more circuit, One circuit may include IP sections one or more.Circuit can have different dimensions, for example, some circuits are operator, have It is geographical location, the combination of operator and geographical location also.
Illustratively, the geographical location of IP sections of 162.105.113.1-162.105.1.254 ownership is Guangzhou, the fortune of ownership Battalion quotient is telecommunications, and when circuit is operator, the circuit of 162.105.113.1-162.105.1.254 ownership is telecommunications;Work as line When road is geographical location, the circuit of 162.105.113.1-162.105.1.254 ownership is Guangzhou;When circuit is operator and ground When managing the combination of position, the circuit of 162.105.113.1-162.105.1.254 ownership is Guangzhou telecommunications.
During determining the first line of the corresponding IP sections of ownership of each first information, specifically, judging preset It whether there is and the matched keyword of the first information, Ke Yiwei in antistop list:Using preset matching algorithm, the first information is used Each keyword in matching keywords table, if one or more keywords, judgement are default on first information successful match Antistop list in exist and the matched keyword of the first information;Otherwise, it is determined that being not present and first in preset antistop list The keyword of information matches.In addition, the present invention does not limit used matching algorithm, for example, can be that canonical matching is calculated One kind in the matching algorithms such as method, fuzzy matching algorithm, pattern matching algorithm or combination.
In this application, keyword can be any natural language, for example, can be Beijing, Wuhan University, Shanghai shifting Dynamic, Kingsoft software etc., in antistop list, each keyword is corresponding with:The mark in geographical location, the weight in geographical location, The mark of operator and the weight of operator, wherein the mark in geographical location is used for unique mark geographical location, operator Mark be used for unique mark operator, the weight in geographical location, for characterizing the corresponding geographical location of keyword and keyword The matching degree of corresponding circuit, the weight of operator, for characterizing the corresponding operator of keyword and line corresponding to keyword The matching degree on road.
The form of expression of the mark in geographical location and the mark of operator can be identical, can not also be identical, for example, geographical The mark of position can be made of one or more in number, letter, underscore etc., and the mark of operator can also be by counting One or more compositions in word, letter, underscore etc..The weight in geographical location and the weight of operator can be arbitrary nature Number.
In addition, the embodiment of the present invention does not limit the mode for setting the mark in geographical location and the mark of operator, example Such as, geographical location can be quickly known by the mark in geographical location for the ease of user, in a kind of specific embodiment In, the area code of geographical location location can be used to be used as the mark in geographical location.
Illustratively, since Pekinese's area code is 010, the area code in Hebei Shijiazhuang is 0311, therefore, can be with Setting Pekinese is identified as 010, and the mark in Hebei Shijiazhuang can be 0311.
Further, due to being possible to one area code of multiple geographical sharings, for example, the area code in Haikou city is 0898, the area code in Sanya, Hainan city is also 0898, therefore, in order to avoid the mark in a geographical location corresponds to multiple geography The case where position, can reserve one again on the basis of area code, can such as set being identified as Haikou city 08980, Sanya, Hainan city is identified as 08981.
Antistop list can need to set according to user, it is, each keyword included in antistop list, and The mark and weight in the geographical location corresponding to each keyword and the mark and weight of operator can be previously set, The embodiment of the present invention is to specifically setting the mark and power in the geographical location corresponding to each keyword and each keyword Weight and the mark of operator and the mode of weight do not limit.
For example, keyword is Beijing, Pekinese is identified as 010, then can set the corresponding geographical location of the keyword It is identified as 010:Since the corresponding geographical location of keyword is Beijing, therefore can be complete by the geographical location corresponding to keyword Match geographical location be Pekinese's circuit, therefore, the weight setting in the corresponding geographical location of the keyword can be obtained it is very big, Such as 90, and since keyword does not embody the information of operator, it is specific that some can not be matched by the corresponding operator of keyword Circuit, therefore, can set the corresponding operator of the keyword is identified as default default identification, and the keyword is corresponding The weight setting in geographical location obtains very little, and such as 10.
In turn, if in preset antistop list exist with the matched keyword of the first information, can be from antistop list The middle mark for obtaining the corresponding geographical location of each target keyword and weight and the mark and weight of operator;And it utilizes The mark and weight in each geographical location obtained and the mark and weight of each operator obtain the first information and correspond to Line identification, as first line identify, wherein target keyword be antistop list in the matched key of the first information Word.
In a kind of specific embodiment, the mark and weight and each in each geographical location obtained are utilized The mark and weight of operator obtain the corresponding line identification of the first information, may comprise steps of:
Step B1 utilizes the mark in the maximum geographical location of weight and the maximum operator of weight in obtained mark Mark calculates the corresponding message identification of the first information, is identified as the first information;
Step B2 is searched in preset mapping table, is obtained the first information and is identified corresponding line identification, as the The corresponding line identification of one information.
Wherein, mapping table is used to store the mapping relations between message identification and line identification.
Since there may be one or more keywords to be matched with the first information in antistop list, that is, target keyword May there are one or it is multiple, when target keyword only there are one when, the corresponding geographical position of the target keyword can be directly obtained The mark of the mark and operator set;When target keyword has it is multiple when, the maximum geographical location of weight in being identified Mark and the maximum operator of weight mark.
For example, including with the matched keyword of the first information:L, M, N, the mark and power in the corresponding geographical locations keyword L Heavy and operator mark and weight are respectively:010、90、139、10;The mark and power in the corresponding geographical locations keyword M Heavy and operator mark and weight are respectively:012、60、139、50;The mark and power in the corresponding geographical locations keyword N Heavy and operator mark and weight are respectively:014,100,139,0, then due to the power in the corresponding geographical locations keyword N Weight is maximum, and the weight of the corresponding operators of keyword M is maximum, and therefore, the maximum geographical location of weight of acquisition is identified as:It closes The mark in the corresponding geographical locations keyword N, that is, 014;The maximum operator of weight is identified as:The corresponding fortune of keyword M Seek the mark of quotient, that is, 139.
Specifically, utilizing the mark in the maximum geographical location of weight and the maximum operator of weight in obtained mark Mark calculates the corresponding message identification of the first information, Ke Yiwei:By the mark in the maximum geographical location of weight in the mark obtained Know and the mark of the maximum operator of weight carries out linear superposition, obtains the corresponding message identification of the first information.Certainly, it actually answers Other calculations, the embodiment of the present invention can also be used not to limit specific calculation in.
Illustratively, the mark of the mark in the maximum geographical location of weight and the maximum operator of weight in the mark obtained It is respectively area_id and isp_id to know, then the corresponding message identification sv_id of the first information can be:Sv_id=area_id*a+ Isp_id*b, wherein a and b is respectively arbitrary number.For example, a be 100,90,80,70 etc., b 1,2,3,4,5 etc...
Line identification is used for unique mark circuit, it can be understood as, a circuit corresponds to a line identification, and mapping table is used Mapping relations between storage message identification and line identification, the mapping relations between specific message identification and line identification Can be:One message identification corresponds to a line identification.
It, can be preset after obtaining the corresponding message identification of the first information, that is, after acquisition first information mark It is searched in mapping table, obtains the first information and identify corresponding line identification, as the corresponding line identification of the first information, into And can be searched in preset circuit table, circuit corresponding with first line mark is obtained, determines obtained circuit For the first line of the corresponding IP sections of ownership of the first information.
Using mapping table and circuit table, is conducive to user and adjusts circuit according to actual conditions, be convenient for the management in the libraries IP.Tool Body is shown as:When needing to update the circuit in circuit table, it is, needing to add, modify or delete the line in circuit table Lu Shi, it is only necessary to mapping table and circuit table are updated, it is thereby achieved that simplifying the management process to the libraries IP.
Illustratively, after generating the libraries IP, if necessary to increase Guangzhou telecommunication line, then increase Guangzhou in circuit table Then telecommunications and the corresponding line identification of Guangzhou telecommunications utilize mark and the corresponding operation of telecommunications in the corresponding geographical location in Guangzhou The mark of quotient, calculates message identification, increases the message identification being calculated circuit corresponding with Guangzhou telecommunications in the mapping table Mapping relations between mark increase Guangzhou telecommunication line to realize in the generated libraries IP;It is wide if necessary to delete Telecommunications corresponding line identification in Guangzhou in mapping table can be revised as the corresponding line identification of Guangdong Telecom by state telecommunication line, To which when in later use Guangzhou, the corresponding message identification of telecommunications searches mapping table, obtained line identification is:Guangdong Telecom pair The line identification answered deletes Guangzhou telecommunication line to realize in the generated libraries IP.
After the first line for determining the corresponding IP sections of ownership of each first information, identified each first can be utilized Circuit and the IP sections for belonging to identified each first line, generate the libraries IP.
As it can be seen that using technical solution provided in an embodiment of the present invention, during generating the libraries IP, it is not necessarily to multiple ergodic source The libraries IP, to improve the efficiency for generating the libraries IP.
It should be noted that using method provided in an embodiment of the present invention, antistop list can store the line of each dimension Keyword corresponding to road, and keyword can be any natural language, compared with the existing technology in, directly using circuit as pass The method of keyword, the application can realize the accurate analysis to the first information, and then realize the accurate Analysis to source IP library.
For example, the first information includes Hubei and the Central China University of Science and Technology, if using the prior art, due in configuration file Keyword is circuit, that is, keyword is the one kind being only in operator, geographical location or combination, therefore the first information matches Keyword in upper configuration file is Hubei, to which corresponding IP sections belongs to Hubei by the first information, and applies the application, the It is the Central China University of Science and Technology that one information, which can match the keyword in antistop list, and then obtains the corresponding of the Central China University of Science and Technology Geographical location be identified as:The mark in Hubei Wuhan, operator is identified as:The mark of education network, thus by the first information Corresponding IP sections belongs to Hubei Wuhan education network, compared with the prior art will by the first information corresponding IP sections belong to Hubei For, it realizes the accurate matching to the first information, improves fineness and the accuracy in the libraries IP of generation.
In addition, in order to which the efficiency for further increasing the libraries generation IP may be used asynchronous in a kind of specific embodiment Processing mode obtains each first information mark, and each first information obtained mark, each first information is identified institute The corresponding first information and each first information are IP sections corresponding, store into resolution table, wherein resolution table is to build in advance A vertical tables of data, the tables of data are used to store corresponding first of each first information mark, each first information mark Information and each first information are IP sections corresponding.
Illustratively, using (such as the morning 12 of section during idle time:00-5:00) obtained source IP library is parsed, is obtained each A first information mark, the corresponding first information of each first information mark and each first information are IP sections corresponding;And By obtained each first information mark, the corresponding first information of each first information mark and each first information It is IP sections corresponding, it stores to resolution table, specifically includes following steps:
Step C1, the obtained source IP library of parsing obtain each first information of source IP library record and every one first letter It ceases IP sections corresponding;
Step C2 judges in preset antistop list for each first information with the presence or absence of matched with the first information Keyword, as target keyword;If so, obtaining the mark in the corresponding geographical location of each target keyword from antistop list Knowledge and weight and the mark and weight of operator;Utilize in obtained mark the mark in the maximum geographical location of weight and The mark of the maximum operator of weight calculates the corresponding message identification of the first information, is identified as the first information;
The each first information obtained mark, each first information are identified the corresponding first information by step C3, with And each first information is IP sections corresponding, stores to resolution table.
Using the embodiment of the present invention, section (such as 8 at work:00-18:00) it when carrying out the generation in the libraries IP, directly uses The data stored in resolution table do not have to parse source IP library during generating the libraries IP, greatly improve the effect for generating the libraries IP Rate.
In addition, in a kind of specific embodiment, electronic equipment can obtain multiple source IP libraries, for each source IP Library can pre-establish a corresponding resolution table, can be by analysis result after being parsed to it using step C1-C3 It stores into the corresponding resolution table in source IP library.
In this case, during generating the libraries IP, for each source IP library, can the source IP library be utilized to correspond to Resolution table in data, in the correspondence for determining source IP library record, each first information it is corresponding IP section belong to the One circuit.Since the information in each source IP library may be different, what same IP sections determined by different source IP libraries belonged to First line may be different.
Illustratively, source IP library includes:The libraries A, the libraries B and the libraries C determine ownership using the data in the corresponding resolution table in the libraries A In Beijing Telecom's circuit IP sections be 1.1.1.1-1.1.1.255;Using the data in the corresponding resolution table in the libraries B, ownership is determined In Hebei telecommunication line IP sections be 1.1.1.4-1.1.1.128;Using the data in the corresponding resolution table in the libraries C, ownership is determined In Tianjin telecommunication line IP sections be 1.1.1.25-1.1.1.192;It is, can determine 1.1.1.4- using the libraries A 1.1.1.128 belonging to Beijing Telecom's circuit;And it can determine that 1.1.1.4-1.1.1.128 belongs to Hebei telecommunications using the libraries B Circuit;Determine that 1.1.1.25-1.1.1.128 belongs to Hebei telecommunication line using the libraries B;And it can be determined using the libraries C 1.1.1.25-1.1.1.128 belonging to Tianjin telecommunication line.
As can be seen that for IP sections same, determine that the first line of its ownership may be different by different source IP libraries.Cause This, in order to avoid because of each source IP library information disunity, and influences the accuracy in the libraries IP generated, specifically, determining each source In the correspondence of the libraries IP record after the corresponding IP section first line belonged to of each first information, using identified each First line and the IP sections for belonging to identified each first line, generate the libraries IP, may comprise steps of:
All IP sections of all source IP library records are obtained, all IP sections be divided into non-overlapping copies each is IP sections sub-;
It is IP sections sub- for every, there is the source IP library that sub- IP sections of each source IP library determines highest priority from record, makees For the libraries target source IP, the sub- IP sections circuit belonged to that will be determined using the libraries target source IP, first as the sub- IP sections of ownership Circuit;
Using identified each first line and sub- IP the section of each first line determined by belonging to, generation IP Library.
Specifically, can be IP sections sub- by all IP sections be divided into non-overlapping copies each in the following way:
Obtain it is IP sections all in start ip address minimum IP address, as the first IP address, obtain it is IP sections all in remove In all IP address other than first IP address, the IP address with the difference minimum of the first IP address, as the second IP address;Sentence Whether disconnected first IP address is recorded in the same source IP library with the second IP address;If so, using the first IP address as first Sub- IP sections of start ip address, using the second IP address as first sub- IP sections of termination IP address, after the second IP address One IP address is as third IP address;Otherwise, using the first IP address as first sub- IP sections of start ip address, by second The previous IP address of IP address is as first sub- IP sections of termination IP address, using the second IP address as third IP address;
Obtain it is IP sections all in all IP address in addition to the first IP address, the second IP address and third IP address, With the IP address of the difference minimum of third IP address, as the 4th IP address;Judge whether are third IP address and the 4th IP address It is recorded in the same source IP library;If so, using third IP address as second sub- IP sections of start ip address, by the 4th IP Location is as second sub- IP sections of termination IP address, using the latter IP address of the 4th IP address as the 5th IP address;Otherwise, Using third IP address as second sub- IP sections of start ip address, using the previous IP address of the 4th IP address as second Sub- IP sections of termination IP address, using the 4th IP address as the 5th IP address;
And so on, to the last one sub- IP sections of termination IP address is:It is maximum that IP address is terminated in IP sections all IP address.
Assuming that all IP sections that obtain all source IP library records include:Come from the 1.1.1.1-1.1.1.255 in the libraries A, come From in the libraries B 1.1.1.4-1.1.1.128 and come from the 1.1.1.25-1.1.1.192 in the libraries C, then according to the method described above, will All IP sections be divided into non-overlapping copies each are IP sections sub-, can obtain first, second, third and the 4th sub- IP Section be respectively:1.1.1.1-1.1.1.3,1.1.1.4-1.1.1.24,1.1.1.25-1.1.1.192 and 1.1.1.193- 1.1.1.255。
In a kind of specific embodiment, obtain each it is IP sections sub- after, for every a IP sections sub-, can have from record Sub- IP sections of each source IP library determines the source IP library of highest priority, as the libraries target source IP, the libraries target source IP will be utilized true The circuit of the fixed sub- IP sections of ownership, the first line as the sub- IP sections of ownership.
On the basis of above-mentioned two is exemplary, each sub- the IP sections of non-overlapping copies after division is respectively:1.1.1.1- 1.1.1.3,1.1.1.4-1.1.1.24,1.1.1.25-1.1.1.192,1.1.1.193-1.1.1.255 record 1.1.1.1- 1.1.1.3 source IP is the libraries A, and the source IP for recording 1.1.1.4-1.1.1.24 is the libraries A and the libraries B, records 1.1.1.25- 1.1.1.192 source IP is the libraries A and the libraries C, the source IP for recording 1.1.1.193-1.1.1.255 is the libraries A, and the libraries A, the libraries B and the libraries C Priority is incremented by successively, it is determined that 1.1.1.1-1.1.1.3 belongs to Beijing Telecom's circuit, and 1.1.1.4-1.1.1.24 is belonged to Hebei telecommunication line determines that 1.1.1.25-1.1.1.192 belongs to Tianjin telecommunication line, determines 1.1.1.193-1.1.1.255 Belong to Beijing Telecom's circuit.
In addition, since the type of the first line of same IP sections of ownership of different source IP libraries determination may be different, for example, It is IP sections same, the geographical location of its ownership can be determined using a source IP library, it can be determined using another source IP library The operator of ownership, in such a case, it is possible to which the geographical location that identified IP sections is belonged to and operator combine, as this The first line of IP sections of ownership.
For example, can determine that 1.1.1.12-1.1.1.15 belongs to telecommunications using the libraries A, can be determined using the libraries B 1.1.1.12-1.1.1.15 belonging to Tianjin, then finally determine that 1.1.1.12-1.1.1.15 belongs to Tianjin telecommunications.
It should be noted that source IP library may come from electronic equipment itself, source IP library can in addition to can come from third party Think the libraries full dose IP, can be the libraries non-full dose IP, the libraries full dose IP refer to that the IP segment limits that the libraries IP are included are 0.0.0.0- 255.255.255.255, that is, the libraries IP cover all IP address, and the libraries non-full dose IP refer to the IP segment limits that the libraries IP are included It is not 0.0.0.0-255.255.255.255, that is, the libraries IP are not covered by all IP address.
In addition, be the libraries full dose IP to make the libraries IP of generation, in a kind of specific embodiment, all source IP library records All IP sections of full doses that can be formed IP sections.
The priority in each source IP library can be previously set according to user demand, and it is not limited in the embodiment of the present invention.
It illustratively, can be according to the reliability of the provider in source IP library, priority is arranged, for example, source IP library carries The reliability of supplier is higher, then the priority that source IP library is arranged is higher;It can also come according to the IP segment limits that source IP library is included Priority is set, for example, the IP segment limits that source IP library is included are bigger, then the priority that source IP library is arranged is higher;It can also be by According to the fineness of the first information recorded in source IP library, priority is arranged, for example, the essence of the first information recorded in source IP library Fineness is higher, then the priority that source IP library is arranged is higher.
In order to cope with the case where keyword matched with the first information is not present in antistop list, in a kind of specific implementation In mode, in the case of keyword matched with the first information is not present in preset antistop list, before step A3, Before the step of being exactly to be searched in preset circuit table, obtaining identifying corresponding first line with first line, the party Method can also include:
Set the corresponding line identification of the first information to default line identification.
Default line identification for indicate in preset antistop list there is no with the matched keyword of the first information, preset Line identification can be set according to user demand, for example, can be 0000,1111 etc..
As can be seen that apply the embodiment of the present invention, no matter whether there is in antistop list and the matched key of the first information Word can obtain the corresponding line identification of the first information.
In addition, in order to make the keyword for including in antistop list more comprehensively, it is not present in judging preset antistop list After the matched keyword of the first information, this method may also comprise the following steps::
Step D1 is generated and is increased keyword report newly;
Step D2, after receiving the instruction for confirming newly-increased and the matched keyword of the first information, acquisition and the first information Matched keyword, and antistop list will be updated to the matched keyword of the first information.
Wherein, keyword report is increased newly for prompting the user whether the newly-increased and matched keyword of the first information;
The embodiment of the present invention obtains electronic equipment and is not limited with the mode of the matched keyword of the first information, for example, Which can be:Electronic equipment can show newly-increased keyword report, to which user exists after generating newly-increased keyword report After seeing newly-increased keyword report, it can be determined that whether need the newly-increased and matched keyword of the first information;If it is determined that needing It is newly-increased with the matched keyword of the first information, then user can be from the option that electronic equipment provides, and selection confirms newly-increased with the The option of the keyword of one information matches, and input and the matched keyword of the first information, to which electronic equipment can receive Confirm the newly-increased instruction with the matched keyword of the first information, and obtains and the matched keyword of the first information.
As can be seen that electronic equipment in judging preset antistop list there is no with the matched keyword of the first information it Afterwards, can obtain with the matched keyword of the first information, and antistop list will be updated to the matched keyword of the first information, from And updated antistop list there will be with the matched keyword of the first information, therefore realize the pass for making to include in antistop list Keyword is more comprehensively.
In order to improve generation the libraries IP accuracy, ginseng is stored in a kind of specific embodiment, in electronic equipment Examine table, wherein reference table is used to preserve each second information and every one second information is IP sections corresponding, before step A4, It is, before determining the step of obtained circuit is the first line of the corresponding IP sections of ownership of the first information, method is also Including:
Step A31, judge in all second information with the presence or absence of with matched second information of the first information, as target the Two information;If it does, judging whether corresponding IP sections IP sections corresponding with the second information of target of the first information conflicts;If punching Prominent, by corresponding IP sections of the first information, to reset to the second information of target IP sections corresponding.
It should be noted that the second information is same type of information with the first information, it is, the second information includes Geographical location and/or operator can store in reference table and have been acknowledged as correct second information and IP sections of correspondence.
In addition, whether the embodiment of the present invention is to judging corresponding IP sections IP sections corresponding with the second information of target of the first information The mode of conflict does not limit.For example, which can be:When the first information it is corresponding IP sections it is corresponding with the second information of target IP sections when differing, corresponding IP section IP sections corresponding with the second information of target of the judgement first information conflicts;When the first information pair When the IP sections IP sections corresponding with the second information of target answered are identical, the judgement first information corresponding IP sections and the second information pair of target The IP sections answered do not conflict.
For example, the first information is Beijing Telecom, it is Beijing Telecom with matched second information of the first information, in reference table Corresponding IP sections of the Beijing Telecom of storage is 1.1.1.0-1.1.1.255, the corresponding IP of the first information recorded in source database Duan Wei:192.168.0.1-192.168.0.254, then judge the first information it is corresponding IP sections it is corresponding with the second information of target IP sections conflict, and by the first information corresponding IP sections reset to:1.1.1.0-1.1.1.255.
As can be seen that the embodiment of the present invention is applied, using reference table, to the first information and IP obtained from source database The correspondence of section is reset, and can correct the first information and IP sections obtained from source database before generating the libraries IP Correspondence, to improve generation the libraries IP accuracy.
Accuracy in order to improve the libraries IP of generation is stored in another specific embodiment in electronic equipment Reference table, wherein the reference table is used to preserve each second information and every one second information is IP sections corresponding, in step Before S102, it is, using identified each first line and the IP of each first line determined by belonging to Before the step of section, the generation libraries IP, method can also include:
S1011 determines the second circuit of the corresponding IP sections of ownership of every 1 second information;
S1012 judges in all fixed second circuits for each identified first line with the presence or absence of with the Identical second circuit of one circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belong to Whether conflict in the IP sections of the second circuit of target;If conflict, the IP sections for belonging to first line are reset to and belong to target The IP sections of second circuit.
Determine that the mode of the second circuit of the corresponding IP sections of ownership of every 1 second information is corresponding with each first information is determined IP sections ownership first line mode it is identical, detailed process can refer to step A1-A4, details are not described herein.
Judge the IP sections for belonging to first line and the mode that whether conflicts of the IP sections for belonging to the second circuit of target and sentences The disconnected corresponding IP sections of IP sections of mode whether to conflict corresponding with the second information of target of the first information is identical, and detailed process can join The description of relevant portion in step A31 is examined, details are not described herein.
As can be seen that applying the embodiment of the present invention, each second information stored in reference table and every one second are utilized Information is IP sections corresponding, it may be determined that the second circuit of the corresponding IP sections of ownership of every 1 second information is belonging to first in turn In the case that the IP sections of circuit conflict with the IP sections for belonging to the second circuit of target, the IP sections weight of first line can will be belonged to The IP sections for belonging to the second circuit of target are set to, to correct the IP sections for belonging to identified each first line obtained, To improve generation the libraries IP accuracy.
In order to ensure the IP segment limits that the libraries IP of generation are included disclosure satisfy that user demand, in a kind of specific embodiment party In formula, using identified each first line and the IP sections of each first line determined by belonging to, the libraries generation IP Before, this method can also include:
Step E1 obtains the IP segment limits that the IP sections of each first line determined by belonging to are formed;
Whether step E2, verification IP segment limit are equal to default IP segment limits;If so, thening follow the steps E3;
Step E3, using identified each first line and the IP sections of each first line determined by belonging to, Generate the libraries IP
Default IP segment limits can be set according to user demand, and it is not limited in the embodiment of the present invention, for example, default IP Segment limit can be:0.0.0.0-255.255.255.255.
As can be seen that applying the embodiment of the present invention, in the case where verifying IP segment limits equal to default IP segment limits, just hold Row utilizes identified each first line and belongs to the IP sections of identified each first line, generates the step in the libraries IP Suddenly, thus it is ensured that the IP segment limits that the libraries IP generated are included disclosure satisfy that user demand.
The representation for the IP sections for being included in order to ensure the libraries IP of generation disclosure satisfy that user demand, a kind of specific In embodiment, using identified each first line and the IP sections of each first line determined by belonging to, give birth to Before the step of the libraries IP, this method can also include:
The representation that conversion belongs to the IP sections of identified each first line is to preset IP sections of representations.
Default IP paragraph formats can be set according to user demand, and it is not limited in the embodiment of the present invention, for example, default IP Section representation can be:The form of one section of IP address range, or IP address adds the form of subnet mask.
As it can be seen that using the embodiment of the present invention, each using identified each first line and determined by belonging to The IP sections of a first line, before generating the libraries IP, the representation that will belong to the IP sections of identified each first line turns It is changed to default IP sections of representation, and default IP paragraph formats can be set according to user demand, thus it is ensured that the libraries IP generated Including the representations of IP sections disclosure satisfy that user demand.
For the ease of the generated libraries IP in subsequent processing procedure, can be obtained, identified each the is being utilized After the step of one circuit and IP sections for belonging to identified each first line, the generation libraries IP, this method can also wrap It includes:
Generate the version number in the libraries IP;
The IP sections of identified each first line in the libraries backup IP and each first line determined by belonging to, Obtain the libraries copy IP;The libraries version labelled notation copy IP are used in combination.
Version number is used for the libraries unique mark IP, in the different version labelled notation in the libraries IP that different times generate.
Therefore, it using the embodiment of the present invention, can quickly be obtained in the libraries IP that different times generate by version number. In addition, if gone wrong during generating the current libraries IP, and lead to not generate the current libraries IP, version number can be utilized The libraries IP generated before are return back to, it is current to complete to find the method solved the problems, such as to search the reason of going wrong The generation in the libraries IP.
Further, know that the reason of generating the libraries IP, electronic equipment can also be in the versions for generating the libraries IP for the ease of user Before this number, display reminding information, the prompt message is for prompting user to input remarks, the original that remarks are used to indicate to generate the libraries IP Cause;User can input remarks, to which electronic equipment can obtain user after seeing the prompt message by electronic equipment The remarks of input.And preserve obtained remarks.The embodiment of the present invention does not limit the particular content of remarks, for example, remarks In include content can be:Increase circuit, the data in the source IP that the libraries IP that generate before are relied on change etc..
The embodiment of the present invention is simply introduced below by a specific example.
IP library generating methods provided in an embodiment of the present invention are existed in advance as in Figure 2-4 applied to some electronic equipment Following data table is created in a kind of MySOL (MySQL is Relational DBMS of open source code) database: Province tables, area tables, isp tables, key_words tables, general_ipbinfo tables, confirmed_ipbinfo tables, View tables, sub_view tables, sv_view_map tables, version tables, wherein
Province tables:The title of title and mark and other countries for storing Chinese Provincial geographical location and Mark, wherein province_id indicates that the mark of Chinese Provincial geographical location/other countries, cn_name indicate Chinese Provincial The Chinese of geographical location/other countries, en_name indicate the English name of Chinese Provincial geographical location/other countries, Group_name indicates the great Qu belonging to Chinese Provincial geographical location/other countries, for example, in province tables Province_id is that 0715, cn_name is Hubei, and en_name Hubei, group_name are Central China area;
Area tables:Title and mark for storing Chinese city-level geographical location, and belonging to Chinese city-level geographical location Chinese Provincial geographical location mark, wherein area_id indicates the mark in Chinese city-level geographical location, during cn_name is indicated The Chinese in state's city-level geographical location, en_name indicate the English name in Chinese city-level geographical location, province_id (FK) mark in the Chinese Provincial geographical location belonging to Chinese city-level geographical location is indicated, and external key is province_id, also It is to be associated with area tables with province tables by province_id;
Isp tables:Title and mark for storing operator, wherein isp_id indicates the mark of operator, cn_name Indicate that the Chinese of operator, en_name indicate the English name of operator;
Key_words tables:The mark in the geographical location corresponding to title and mark, keyword for storing keyword and Weight and the mark and weight of operator, wherein key_id indicates that the mark of keyword, isp_id (FK) indicate keyword The mark of corresponding operator, and isp_id is external key, it is, key_words tables and isp tables are associated with by isp_id, Area_id (FK) indicates the mark in the geographical location corresponding to keyword, and area_id is external key, it is, passing through area_ Id is associated with key_words tables and area tables, and key_name indicates that the title of keyword, area_weight indicate that keyword institute is right The weight in the geographical location answered, isp_weight indicate the weight of the operator corresponding to keyword;
General_ipbinfo tables:For storing one or more first information record, each first information record is by the The first information and the first information that mark, first information mark, the first information mark of one information record are corresponding are corresponding IP sections of compositions, wherein the first information includes:Geographical location and operator, the geographical location in the first information include:county (country), province (province), city (city), continent (continent), isp indicate that the operator in the first information, id indicate The mark of first information record, startip and endip indicate that the first information is IP sections corresponding jointly, and startip indicates the first letter Corresponding IP sections of initial address is ceased, endip indicates corresponding IP sections of the end address of the first information, first information mark packet It includes:Isp_id (FK) and area_id (FK), isp_id (FK) indicate the mark of the operator in the first information, and isp_id is External key, it is, being associated with general_ipbinfo tables and isp tables by isp_id, area_id (FK) is indicated in the first information Geographical location mark, and area_id be external key, it is, by area_id be associated with general_ipbinfo tables with Area tables;
Confirmed_ipbinfo tables:For storing one or more second information records, each second information record by Mark, the second message identification, the second information corresponding to the second message identification and the second information of second information record correspond to IP sections composition, wherein the second information includes:Geographical location and operator, the geographical location in the second information include:county (country), province (province), city (city), continent (continent), isp indicate that the operator in the second information, id indicate The mark of second information record, startip and endip indicate that the second information is IP sections corresponding jointly, and startip indicates the second letter Corresponding IP sections of initial address is ceased, endip indicates corresponding IP sections of the end address of the second information, the second message identification packet It includes:Isp_id (FK) and area_id (FK) isp_id (FK) indicates the mark of the operator in the second information, and isp_id is outer Key, it is, being associated with confirmed_ipbinfo tables and isp tables by isp_id, area_id (FK) is indicated in the second information Geographical location mark, and area_id be external key, it is, by area_id be associated with confirmed_ipbinfo tables with Area tables;
View tables:For storing the correspondence between circuit and line identification, wherein view_id indicates line identification, Cn_name indicates that the Chinese of circuit, en_name indicate the English name of circuit;
Sub_view tables:For storing message identification, the corresponding information of message identification is:By geographical location and operator's group The information (hereinafter referred to as combined information) of synthesis is additionally operable to store in the mark in the geographical location in combined information, combined information Operator mark and combined information title, wherein sv_id indicate message identification, cn_name indicate combined information Chinese, en_name indicate combined information English name, area_id indicate combined information in geographical location mark Know, isp_id indicates the mark of the operator in combined information;
Sv_view_map tables:For storing one or more map records, each map record is by message identification and circuit Mapping relations composition between mark, wherein map_id indicates that the mark of map record, sv_id (FK) indicate message identification, and External key is sv_id, it is, being associated with sv_view_map tables with sub_view tables by sv_id, view_id (FK) indicates line Line, and external key is view_id, it is, sv_view_map tables are associated with view tables by view_id, sv_name Indicate that Chinese/English name of combined information, view_name indicate Chinese/English name of circuit;
Version tables:Version number, remarks and generated time for storing the generated libraries IP, wherein version_id Indicate that version number, remarks indicate that remarks, create_time indicate generated time;
It should be noted that the data in province tables, area tables, isp tables and sub_view tables are generally not necessarily to adjust It is whole;After the circuit that data in view tables and sv_view_map tables include in the generated libraries IP of increase/deletion/modification, into Row update;Data in key_words tables are updated after increase/deletion/modification keyword;General_ipbinfo tables In data be updated behind parsing source IP library;Data in confirmed_ipbinfo tables are in increase/deletion/modification After two information record, it is updated;Data in version tables are updated after generating the libraries IP.
After having created above-mentioned tables of data, the number in general_ipbinfo tables can be updated according to flow shown in fig. 5 According to detailed process is as follows:
S301, (Application ProgrammingInterface, are answered the API in the source IP library that calling third party provides With Program Interfaces);
S302 judges whether to successfully pass and API is called to obtain source IP library;If not, executing S303;If so, executing S304;
S303 generates the first switch fault report, and terminates flow;Wherein, the first switch fault report is for indicating to obtain not successfully Source IP library;
S304, the obtained source IP library of parsing obtain each first information of source IP library record and each first information It is IP sections corresponding;
S305 judges to whether there is and the matched pass of the first information in preset antistop list for each first information Keyword, as target keyword;If so, executing S306;If not, executing S309;
S306 obtains the mark and weight in the corresponding geographical location of each target keyword, Yi Jiyun from antistop list Seek the mark and weight of quotient;Utilize the mark in the maximum geographical location of weight and the maximum operator of weight in obtained mark Mark, calculate the corresponding message identification of the first information, identified as the first information;
S307, by the corresponding first information of each first information obtained mark, each first information mark, and Each first information is IP sections corresponding, stores to general_ipbinfo tables;
S308 judges whether successfully to store to general_ipbinfo tables;If it succeeds, terminating flow;If not at Work(then generates the second switch fault report, and terminates flow;Wherein, the second switch fault report for indicate to store not successfully to General_ipbinfo tables;
S309 is generated and is increased keyword report newly;
S310 is obtained and the first information after receiving the instruction for confirming newly-increased and the matched keyword of the first information The keyword matched, and antistop list will be updated to the matched keyword of the first information.
It, can be according to figure when the circuit in the libraries IP of required generation is operator and the combination in Chinese city-level geographical location Flow shown in 6 completes the generation in the libraries IP, specific as follows:
S401 generates remarks and inputs prompt message, and obtains remarks of the user for remarks input prompt message input; Wherein, remarks input prompt message is for prompting user to input remarks;Then, S402 and S403 is executed side by side;
S402 determines every 1 using the data in general_ipinfo tables, sv_view_map tables and view tables The first line of the corresponding IP sections of ownership of one information, judge whether successfully to determine each first information it is corresponding IP section belong to the One circuit, if not, executing S404;If so, executing S406;
S403 is determined each using the data in confirmed_ipbinfo tables, sv_view_map tables and view tables Second circuit of the corresponding IP sections of ownership of the second information;Judge whether successfully to determine the corresponding IP sections of ownership of every 1 second information Second circuit, if not, executing S405;If so, executing S406;
S404 generates first line failure reporting, and terminates flow;Wherein, first line failure reporting is for indicating not Success determines the first line of the corresponding IP sections of ownership of each first information, it is, in showing that the first information is IP sections corresponding In the presence of the IP sections that can not determine belonged to circuit;
S405 generates the second circuit failure reporting, and terminates flow;Wherein, the second circuit failure reporting is for indicating not Success determines the second circuit of the corresponding IP sections of ownership of every one second information, that is, shows to deposit during the second information is IP sections corresponding In the IP sections that can not determine belonged to circuit;
S406 judges in all fixed second circuits for each identified first line with the presence or absence of with the Identical second circuit of one circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belong to Whether conflict in the IP sections of the second circuit of target;If conflict, the IP sections for belonging to first line are reset to and belong to target The IP sections of second circuit;
S407 obtains the IP segment limits that the IP sections of each first line determined by belonging to are formed;And verify IP sections Whether range is equal to default IP segment limits;If not, executing S408;If so, executing S409;
S408 generates IP segment limit error reportings, and terminates flow, wherein IP segment limit error reportings are for indicating IP Segment limit is not equal to default IP segment limits;
S409, the representation that conversion belongs to the IP sections of identified each first line are that default IP segment tables show shape Formula;
S410 using identified each first line, and belongs to the IP sections of identified each first line, raw At the libraries IP;
S411 generates the version number in the libraries IP;The version number and the remarks obtained are stored to version tables;Backup The IP sections of identified each first line in the libraries IP and each first line determined by belonging to, obtain copy IP Library;The libraries version labelled notation copy IP are used in combination.
In addition, when the circuit in the libraries IP of required generation is operator, the life in the libraries IP can be completed according to following below scheme At:
S501 generates remarks and inputs prompt message, and obtains remarks of the user for remarks input prompt message input; Wherein, remarks input prompt message is for prompting user to input remarks;Then, S502 and S503 is executed side by side;
S502 obtains the mark of the operator in each first information using general_ipinfo tables, for being obtained Each first information in operator mark, search isp tables, obtain it is corresponding with the mark of the operator in the first information Operator title, identify corresponding circuit as the first information, determine that obtained circuit is the corresponding IP of the first information The first line of section ownership;
S503 obtains the mark of the operator in every 1 second information using confirmed_ipbinfo tables, for being obtained The mark of operator in every 1 second information obtained searches isp tables, obtains opposite with the mark of the operator in the second information The title for the operator answered determines that obtained circuit is that the second information is corresponding as the corresponding circuit of the second message identification Second circuit of IP sections of ownership;
S504 judges in all fixed second circuits for each identified first line with the presence or absence of with the Identical second circuit of one circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belong to Whether conflict in the IP sections of the second circuit of target;If conflict, the IP sections for belonging to first line are reset to and belong to target The IP sections of second circuit;
S505 obtains the IP segment limits that the IP sections of each first line determined by belonging to are formed;And verify IP sections Whether range is equal to default IP segment limits;If not, executing S506;If so, executing S507;
S506 generates IP segment limit error reportings, and terminates flow, wherein IP segment limit error reportings are for indicating IP Segment limit is not equal to default IP segment limits;
S507, the representation that conversion belongs to the IP sections of identified each first line are that default IP segment tables show shape Formula;
S508 using identified each first line, and belongs to the IP sections of identified each first line, raw At the libraries IP;
S509 generates the version number in the libraries IP;The version number and the remarks obtained are stored to version tables;Backup The IP sections of identified each first line in the libraries IP and each first line determined by belonging to, obtain copy IP Library;The libraries version labelled notation copy IP are used in combination.
When the circuit in the libraries IP of required generation is Chinese Provincial geographical location, the libraries IP can be completed according to following below scheme Generation:
S601 generates remarks and inputs prompt message, and obtains remarks of the user for remarks input prompt message input; Wherein, remarks input prompt message is for prompting user to input remarks;Then, S602 and S603 is executed side by side;
S602 obtains the mark in the geographical location in each first information using general_ipinfo tables, for being obtained The mark in the geographical location in each first information obtained searches area tables, obtains the mark with the geographical location in the first information The mark in sensible corresponding Chinese Provincial geographical location utilizes the mark in obtained Chinese Provincial geographical location, searches Province tables obtain the title in Chinese Provincial geographical location corresponding with the mark in Chinese Provincial geographical location, as first The corresponding circuit of message identification determines that obtained circuit is the first line of the corresponding IP sections of ownership of the first information;
S603 obtains the mark in the geographical location in every 1 second information using confirmed_ipbinfo tables, for institute The mark in the geographical location in every 1 second information obtained searches area tables, obtains and the geographical location in the second information The mark for identifying corresponding Chinese Provincial geographical location utilizes the mark in obtained Chinese Provincial geographical location, searches Province tables obtain the title in Chinese Provincial geographical location corresponding with the mark in Chinese Provincial geographical location, as second The corresponding circuit of message identification determines that obtained circuit is the second circuit of the corresponding IP sections of ownership of the second information;
S604 judges in all fixed second circuits for each identified first line with the presence or absence of with the Identical second circuit of one circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belong to Whether conflict in the IP sections of the second circuit of target;If conflict, the IP sections for belonging to first line are reset to and belong to target The IP sections of second circuit;
S605 obtains the IP segment limits that the IP sections of each first line determined by belonging to are formed;And verify IP sections Whether range is equal to default IP segment limits;If not, executing S606;If so, executing S607;
S606 generates IP segment limit error reportings, and terminates flow, wherein IP segment limit error reportings are for indicating IP Segment limit is not equal to default IP segment limits;
S607, the representation that conversion belongs to the IP sections of identified each first line are that default IP segment tables show shape Formula;
S608 using identified each first line, and belongs to the IP sections of identified each first line, raw At the libraries IP;
S609 generates the version number in the libraries IP;The version number and the remarks obtained are stored to version tables;Backup The IP sections of identified each first line in the libraries IP and each first line determined by belonging to, obtain copy IP Library;The libraries version labelled notation copy IP are used in combination.
As it can be seen that using technical solution provided in an embodiment of the present invention, during generating the libraries IP, it is not necessarily to multiple ergodic source The libraries IP to improve the efficiency for generating the libraries IP, also, using antistop list parsing source IP library, realize the essence to source IP library Really parsing when carrying out the generation in the libraries IP, directly using the data stored in general_ipbinfo tables, does not have to further Source IP library is parsed during generating the libraries IP, greatly improves the efficiency for generating the libraries IP, in increase/modification/libraries deletion IP Circuit when, it is only necessary to update mapping table and circuit table, it is thereby achieved that simplify the management process to the libraries IP, in addition, If gone wrong during generating the current libraries IP, and lead to not generate the current libraries IP, version number can be utilized to retract To the libraries IP generated before, to search the reason of going wrong, and the method solved the problems, such as is found, to complete the current libraries IP It generates, and realizes the independent management of geographical location and operator using province tables, area tables, isp tables, convenient for generating The libraries IP disclosure satisfy that the line requirements of different dimensions.
Corresponding to above-mentioned IP library generating methods embodiment, an embodiment of the present invention provides a kind of libraries IP generating means, applications Shown in Figure 7 in electronic equipment, corresponding with flow shown in Fig. 1, device includes:
Determining module 501, corresponding IP section of each first information belongs in the correspondence for determining source IP library record First line;
Generation module 502 using identified each first line and belongs to identified each first line IP sections, generate the libraries IP;
Wherein, the first information includes geographical location and/or operator, and correspondence, which is that the first information is corresponding with IP sections, to close System;
Determining module 501 determines the corresponding IP section First Line belonged to of each first information in source IP library in the following manner Road:
Judge in preset antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;Its In, antistop list is used to store keyword corresponding to the circuit of each dimension, the geographical location corresponding to each keyword Mark and weight and the mark and weight of operator, the weight in the corresponding geographical location of keyword, for characterizing keyword pair The matching degree of circuit corresponding to the geographical location answered and keyword, the weight of the corresponding operator of keyword are closed for characterizing The matching degree of the corresponding operator of keyword and circuit corresponding to keyword;
If so, the mark and weight in the corresponding geographical location of each target keyword are obtained from antistop list, and The mark and weight of operator;Utilize the mark and weight and the mark of each operator in each geographical location obtained And weight, the corresponding line identification of the first information is obtained, is identified as first line;
It is searched in preset circuit table, obtains circuit corresponding with first line mark, determine obtained line Road is the first line of the corresponding IP sections of ownership of the first information;Wherein, circuit table is used to store the circuit and circuit of each dimension Correspondence between mark.
As it can be seen that using technical solution provided in an embodiment of the present invention, during generating the libraries IP, it is not necessarily to multiple ergodic source The libraries IP, to improve the efficiency for generating the libraries IP
Optionally, determining module 501 is additionally operable to:
In the case of keyword matched with the first information is not present in preset antistop list, in preset circuit table In searched, before obtaining first line corresponding with first line mark, the corresponding line identification of the first information is arranged To preset line identification.
Optionally, determining module 501 utilizes mark and weight and each operator in each geographical location obtained Mark and weight, obtain the corresponding line identification of the first information, specially:
The mark of the mark in the maximum geographical location of weight and the maximum operator of weight in obtained mark is utilized, is counted The corresponding message identification of the first information is calculated, is identified as the first information;
It is searched in preset mapping table, obtains the first information and identify corresponding line identification, as the first information Corresponding line identification, wherein mapping table is used to store the mapping relations between message identification and line identification.
Optionally, determining module 501 is additionally operable to:
There is no with after the matched keyword of the first information in judging preset antistop list, generates and increase keyword newly Report, wherein newly-increased keyword report is for prompting the user whether the newly-increased and matched keyword of the first information;
After receiving the instruction for confirming newly-increased and the matched keyword of the first information, obtain and the matched pass of the first information Keyword, and antistop list will be updated to the matched keyword of the first information.
Optionally, it is stored with reference table in electronic equipment, wherein reference table is used to preserve each second information, and every One second information is IP sections corresponding, and determining module 501 is additionally operable to:
Before determining the first line that obtained circuit is the corresponding IP sections of ownership of the first information, all second are judged In information with the presence or absence of with matched second information of the first information, as the second information of target;If it does, judging the first information Whether corresponding IP sections IP sections corresponding with the second information of target conflict;If conflict, by the corresponding IP sections of resetting of the first information It is IP sections corresponding for the second information of target.
Optionally, it is stored with reference table in electronic equipment, wherein reference table is used to preserve each second information, and every One second information is IP sections corresponding, and determining module 501 is additionally operable to:
Using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the second circuit of the corresponding IP sections of ownership of every 1 second information is determined;
For each identified first line, judge to whether there is in all fixed second circuits and first line Identical second circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belonging to target Whether the IP sections of the second circuit conflict;If conflict, the IP sections for belonging to first line are reset to and belong to the second line of target The IP sections on road.
Optionally, generation module 502 is additionally operable to:
Using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the IP segment limits that the IP sections of each first line determined by belonging to are formed are obtained;
Verify whether IP segment limits are equal to default IP segment limits;
If so, using identified each first line and the IP sections of each first line determined by belonging to, Generate the libraries IP.
Optionally, generation module 502 is additionally operable to:
Using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the representation that conversion belongs to the IP sections of identified each first line is to preset IP sections of representations.
Optionally, generation module 502 is additionally operable to:
Using identified each first line and the IP sections of each first line determined by belonging to, generation IP After library, the version number in the libraries IP is generated;
The IP sections of identified each first line in the libraries backup IP and each first line determined by belonging to, Obtain the libraries copy IP;The libraries version labelled notation copy IP are used in combination.
The embodiment of the present invention additionally provides a kind of electronic equipment, as shown in figure 8, electronic equipment includes:It processor 601 and deposits Reservoir 602, wherein
Memory 602, for storing computer program;
Processor 601 when for executing the program stored on memory, realizes the libraries IP that the embodiment of the present invention is provided Generation method.
Wherein, which includes the following steps:
It determines the corresponding IP section first line belonged to of each first information in the correspondence of source IP library record, utilizes institute The IP sections of determining each first line and each first line determined by belonging to, the libraries generation IP, wherein the first information Including geographical location and/or operator, correspondence is the first information and IP sections of correspondence;
The corresponding IP section first line belonged to of each first information in source IP library is determined in the following manner:
Judge in preset antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;Its In, antistop list is used to store keyword corresponding to the circuit of each dimension, the geographical location corresponding to each keyword Mark and weight and the mark and weight of operator, the weight in the corresponding geographical location of keyword, for characterizing keyword pair The matching degree of circuit corresponding to the geographical location answered and keyword, the weight of the corresponding operator of keyword are closed for characterizing The matching degree of the corresponding operator of keyword and circuit corresponding to keyword;
If so, the mark and weight in the corresponding geographical location of each target keyword are obtained from antistop list, and The mark and weight of operator;Utilize the mark and weight and the mark of each operator in each geographical location obtained And weight, the corresponding line identification of the first information is obtained, is identified as first line;
It is searched in preset circuit table, obtains circuit corresponding with first line mark, determine obtained line Road is the first line of the corresponding IP sections of ownership of the first information;Wherein, circuit table is used to store the circuit and circuit of each dimension Correspondence between mark.
As it can be seen that the application present invention implements the technical solution provided, during generating the libraries IP, it is not necessarily to multiple ergodic source IP Library, to improve the efficiency for generating the libraries IP.
It should be noted that processor 601 executes the program stored on memory 602 and the IP library generating methods realized Other embodiment, identical as the embodiment for the IP library generating methods that preceding method part refers to, details are not described herein.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, controlling bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), can also include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, storage in the computer readable storage medium There is computer program, which realizes above-mentioned IP library generating method steps when being executed by processor.
Wherein, which includes the following steps:
It determines the corresponding IP section first line belonged to of each first information in the correspondence of source IP library record, utilizes institute The IP sections of determining each first line and each first line determined by belonging to, the libraries generation IP, wherein the first information Including geographical location and/or operator, correspondence is the first information and IP sections of correspondence;
The corresponding IP section first line belonged to of each first information in source IP library is determined in the following manner:
Judge in preset antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;Its In, antistop list is used to store keyword corresponding to the circuit of each dimension, the geographical location corresponding to each keyword Mark and weight and the mark and weight of operator, the weight in the corresponding geographical location of keyword, for characterizing keyword pair The matching degree of circuit corresponding to the geographical location answered and keyword, the weight of the corresponding operator of keyword are closed for characterizing The matching degree of the corresponding operator of keyword and circuit corresponding to keyword;
If so, the mark and weight in the corresponding geographical location of each target keyword are obtained from antistop list, and The mark and weight of operator;Utilize the mark and weight and the mark of each operator in each geographical location obtained And weight, the corresponding line identification of the first information is obtained, is identified as first line;
It is searched in preset circuit table, obtains circuit corresponding with first line mark, determine obtained line Road is the first line of the corresponding IP sections of ownership of the first information;Wherein, circuit table is used to store the circuit and circuit of each dimension Correspondence between mark.
As it can be seen that the application present invention implements the technical solution provided, during generating the libraries IP, it is not necessarily to multiple ergodic source IP Library, to improve the efficiency for generating the libraries IP.
It should be noted that other implementations for the IP library generating methods that above computer program is realized when being executed by processor Example, identical as the embodiment for the IP library generating methods that preceding method part refers to, details are not described herein.
An embodiment of the present invention provides a kind of computer program products including instruction, when run on a computer, So that computer executes the IP library generating methods that above-mentioned each embodiment provides.
An embodiment of the present invention provides a kind of computer programs, when run on a computer so that computer executes The IP library generating methods that above-mentioned each embodiment provides.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device, Electronic equipment, computer readable storage medium, the computer program product comprising instruction, for computer program embodiments, by It is substantially similar to embodiment of the method in it, so description is fairly simple, referring to the part explanation of embodiment of the method in place of correlation .
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (20)

1. a kind of IP library generating methods, which is characterized in that it is applied to electronic equipment, the method includes:
The corresponding IP section first line belonged to of each first information in the correspondence of source IP library record is determined, using determining Each first line and each first line determined by belonging to IP sections, the libraries generation IP, wherein the first information Including geographical location and/or operator, the correspondence is the first information and IP sections of correspondence;
The corresponding IP section first line belonged to of each first information in the source IP library is determined in the following manner:
Judge in preset antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;Wherein, institute State mark of the antistop list for storing the keyword corresponding to the circuit of each dimension, the geographical location corresponding to each keyword Know the mark and weight with weight and operator, the weight in the corresponding geographical location of keyword is corresponded to for characterizing keyword Geographical location and keyword corresponding to circuit matching degree, the weight of the corresponding operator of keyword, for characterizing key The matching degree of the corresponding operator of word and circuit corresponding to keyword;
If so, the mark and weight in the corresponding geographical location of each target keyword are obtained from the antistop list, and The mark and weight of operator;Utilize the mark and weight and the mark of each operator in each geographical location obtained And weight, the corresponding line identification of the first information is obtained, is identified as first line;
It is searched in preset circuit table, obtains circuit corresponding with first line mark, determine that obtained circuit is The first line of the corresponding IP sections of ownership of the first information;Wherein, the circuit table is used to store the circuit and circuit of each dimension Correspondence between mark.
2. according to the method described in claim 1, it is characterized in that, there is no believe with first in the preset antistop list It is described to be searched in preset circuit table in the case of ceasing matched keyword, it obtains corresponding with first line mark Before the step of first line, the method further includes:
Set the corresponding line identification of the first information to default line identification.
3. according to the method described in claim 1, it is characterized in that, the mark for utilizing each geographical location obtained and Weight and the mark and weight of each operator obtain the corresponding line identification of the first information, including:
It utilizes the mark of the mark in the maximum geographical location of weight and the maximum operator of weight in obtained mark, calculates the The corresponding message identification of one information is identified as the first information;
It is searched in preset mapping table, obtains the first information and identify corresponding line identification, corresponded to as the first information Line identification, wherein the mapping table is used to store mapping relations between message identification and line identification.
4. according to the method described in claim 1, it is characterized in that, there is no believe with first in judging preset antistop list After ceasing matched keyword, the method further includes:
It generates and increases keyword report newly, wherein the newly-increased keyword report is for prompting the user whether the newly-increased and first information Matched keyword;
After receiving the instruction for confirming newly-increased and the matched keyword of the first information, obtain and the matched key of the first information Word, and the antistop list will be updated to the matched keyword of the first information.
5. according to claim 1-4 any one of them methods, which is characterized in that it is stored with reference table in the electronic equipment, Wherein, the reference table is used to preserve each second information and every one second information is IP sections corresponding, obtained determining Before the step of circuit is the first line of the corresponding IP sections of ownership of the first information, the method further includes:
Judge in all second information with the presence or absence of with matched second information of the first information, as the second information of target;If In the presence of judging whether corresponding IP sections IP sections corresponding with the second information of target of the first information conflicts;If conflict, by the first letter Ceasing corresponding IP sections, to reset to the second information of target IP sections corresponding.
6. according to claim 1-4 any one of them methods, which is characterized in that it is stored with reference table in the electronic equipment, Wherein, the reference table is used to preserve each second information and every one second information is IP sections corresponding, described true using institute It is described before the step of IP sections of fixed each first line and each first line determined by belonging to, the generation libraries IP Method further includes:
Determine the second circuit of the corresponding IP sections of ownership of every 1 second information;
For each identified first line, judge in all fixed second circuits with the presence or absence of identical as first line The second circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belonging to target second Whether the IP sections of circuit conflict;If conflict, the IP sections for belonging to first line are reset to and belong to the second circuit of target IP sections.
7. according to the method described in claim 1, it is characterized in that, in the identified each first line of the utilization and returning Before the step of IP sections of each first line determined by belonging to, the generation libraries IP, the method further includes:
Obtain the IP segment limits that the IP sections of each first line determined by belonging to are formed;
Verify whether the IP segment limits are equal to default IP segment limits;
If so, the IP sections of identified each first line are executed using identified each first line and belong to, The step of generating the libraries IP.
8. according to the method described in claim 1, it is characterized in that, in the identified each first line of the utilization and returning Before the step of IP sections of each first line determined by belonging to, the generation libraries IP, the method further includes:
The representation that conversion belongs to the IP sections of identified each first line is to preset IP sections of representations.
9. according to the method described in claim 1, it is characterized in that, in the identified each first line of the utilization and returning After the step of IP sections of each first line determined by belonging to, the generation libraries IP, the method further includes:
Generate the version number in the libraries IP;
It backs up identified each first line in the libraries IP and belongs to the IP sections of identified each first line, Obtain the libraries copy IP;The libraries copy IP described in the version labelled notation are used in combination.
10. a kind of libraries IP generating means, which is characterized in that be applied to electronic equipment, described device includes:
Determining module, the corresponding IP section First Line belonged to of each first information in the correspondence for determining source IP library record Road;
Generation module is given birth to using identified each first line and the IP sections of each first line determined by belonging to At the libraries IP;
Wherein, the first information includes geographical location and/or operator, and the correspondence is the first information and IP sections of pair It should be related to;
The determining module determines first of the corresponding IP sections of ownership of each first information in the source IP library in the following manner Circuit:
Judge in preset antistop list with the presence or absence of with the matched keyword of the first information, as target keyword;Wherein, institute State mark of the antistop list for storing the keyword corresponding to the circuit of each dimension, the geographical location corresponding to each keyword Knowledge and weight and the mark and weight of operator, the weight in the corresponding geographical location of keyword are corresponded to for characterizing keyword Geographical location and keyword corresponding to circuit matching degree, the weight of the corresponding operator of keyword, for characterizing key The matching degree of the corresponding operator of word and circuit corresponding to keyword;
If so, the mark and weight in the corresponding geographical location of each target keyword are obtained from the antistop list, and The mark and weight of operator;Utilize the mark and weight and the mark of each operator in each geographical location obtained And weight, the corresponding line identification of the first information is obtained, is identified as first line;
It is searched in preset circuit table, obtains circuit corresponding with first line mark, determine that obtained circuit is The first line of the corresponding IP sections of ownership of the first information;Wherein, the circuit table is used to store the circuit and circuit of each dimension Correspondence between mark.
11. device according to claim 10, which is characterized in that the determining module is additionally operable to:
In the case of keyword matched with the first information is not present in the preset antistop list, in preset circuit table In searched, before obtaining first line corresponding with first line mark, the corresponding line identification of the first information is arranged To preset line identification.
12. device according to claim 10, which is characterized in that the determining module utilizes each geographical position obtained The mark and weight of the mark and weight and each operator set obtain the corresponding line identification of the first information, specially:
It utilizes the mark of the mark in the maximum geographical location of weight and the maximum operator of weight in obtained mark, calculates the The corresponding message identification of one information is identified as the first information;
It is searched in preset mapping table, obtains the first information and identify corresponding line identification, corresponded to as the first information Line identification, wherein the mapping table is used to store mapping relations between message identification and line identification.
13. device according to claim 10, which is characterized in that the determining module is additionally operable to:
There is no with after the matched keyword of the first information in judging preset antistop list, generates and increase keyword report newly It accuses, wherein the newly-increased keyword report is for prompting the user whether the newly-increased and matched keyword of the first information;
After receiving the instruction for confirming newly-increased and the matched keyword of the first information, obtain and the matched key of the first information Word, and the antistop list will be updated to the matched keyword of the first information.
14. according to claim 10-13 any one of them devices, which is characterized in that be stored with reference in the electronic equipment Table, wherein the reference table is used to preserve each second information and every one second information is IP sections corresponding, the determining mould Block is additionally operable to:
Before determining the first line that obtained circuit is the corresponding IP sections of ownership of the first information, all second information are judged In with the presence or absence of with matched second information of the first information, as the second information of target;If it does, judging that the first information corresponds to IP sections corresponding with the second information of target of IP sections whether conflict;If conflict, mesh is reset to for corresponding IP sections by the first information It is IP sections corresponding to mark the second information.
15. according to claim 10-13 any one of them devices, which is characterized in that be stored with reference in the electronic equipment Table, wherein the reference table is used to preserve each second information and every one second information is IP sections corresponding, the determining mould Block is additionally operable to:
Described using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the second circuit of the corresponding IP sections of ownership of every 1 second information is determined;
For each identified first line, judge in all fixed second circuits with the presence or absence of identical as first line The second circuit, as the second circuit of target;If it does, judging to belong to the IP sections of first line and belonging to target second Whether the IP sections of circuit conflict;If conflict, the IP sections for belonging to first line are reset to and belong to the second circuit of target IP sections.
16. device according to claim 10, which is characterized in that the generation module is additionally operable to:
Described using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the IP segment limits that the IP sections of each first line determined by belonging to are formed are obtained;
Verify whether the IP segment limits are equal to default IP segment limits;
If so, using identified each first line and the IP sections of each first line determined by belonging to, generation The libraries IP.
17. device according to claim 10, which is characterized in that the generation module is additionally operable to:
Described using identified each first line and the IP sections of each first line determined by belonging to, generation IP Before library, the representation that conversion belongs to the IP sections of identified each first line is to preset IP sections of representations.
18. device according to claim 10, which is characterized in that the generation module is additionally operable to:
Described using identified each first line and the IP sections of each first line determined by belonging to, generation IP After library, the version number in the libraries IP is generated;
It backs up identified each first line in the libraries IP and belongs to the IP sections of identified each first line, Obtain the libraries copy IP;The libraries copy IP described in the version labelled notation are used in combination.
19. a kind of electronic equipment, which is characterized in that the electronic equipment includes:Processor and memory, wherein
The memory, for storing computer program;
The processor when for executing the program stored on memory, realizes any method steps of claim 1-9 Suddenly.
20. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-9 any method and steps when the computer program is executed by processor.
CN201810030614.2A 2018-01-12 2018-01-12 IP library generation method and device, electronic equipment and computer readable storage medium Active CN108573018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810030614.2A CN108573018B (en) 2018-01-12 2018-01-12 IP library generation method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810030614.2A CN108573018B (en) 2018-01-12 2018-01-12 IP library generation method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108573018A true CN108573018A (en) 2018-09-25
CN108573018B CN108573018B (en) 2020-08-07

Family

ID=63575863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810030614.2A Active CN108573018B (en) 2018-01-12 2018-01-12 IP library generation method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108573018B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465979A (en) * 2021-12-21 2022-05-10 天翼云科技有限公司 IP library generation method, system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177000A (en) * 2011-12-21 2013-06-26 卓望数码技术(深圳)有限公司 Grouping method of Internet protocol (IP) addresses or cell phone numbers and query method of attribution place
CN103678676A (en) * 2013-12-25 2014-03-26 乐视网信息技术(北京)股份有限公司 IP library processing method and system
CN103716282A (en) * 2012-09-28 2014-04-09 北京新媒传信科技有限公司 Method and system for correcting IP library
CN104427519A (en) * 2013-08-23 2015-03-18 深圳市腾讯计算机系统有限公司 Method and device for managing attributions of IP (Internet Protocol) addresses
CN106302843A (en) * 2015-05-26 2017-01-04 上海帝联信息科技股份有限公司 A kind of IP address base update method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177000A (en) * 2011-12-21 2013-06-26 卓望数码技术(深圳)有限公司 Grouping method of Internet protocol (IP) addresses or cell phone numbers and query method of attribution place
CN103716282A (en) * 2012-09-28 2014-04-09 北京新媒传信科技有限公司 Method and system for correcting IP library
CN104427519A (en) * 2013-08-23 2015-03-18 深圳市腾讯计算机系统有限公司 Method and device for managing attributions of IP (Internet Protocol) addresses
CN103678676A (en) * 2013-12-25 2014-03-26 乐视网信息技术(北京)股份有限公司 IP library processing method and system
CN106302843A (en) * 2015-05-26 2017-01-04 上海帝联信息科技股份有限公司 A kind of IP address base update method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465979A (en) * 2021-12-21 2022-05-10 天翼云科技有限公司 IP library generation method, system and electronic equipment
CN114465979B (en) * 2021-12-21 2024-01-02 天翼云科技有限公司 IP library generation method, system and electronic equipment

Also Published As

Publication number Publication date
CN108573018B (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN105635345B (en) Domain name resources record management method and apparatus
CN109040337A (en) A kind of information query method, Edge Server and information query system
CN106462639A (en) Processing mutations for remote database
CN102054000B (en) Data querying method, device and system
CN109447820B (en) Data processing method, device, computer equipment and storage medium
CN110198530B (en) Flow-free service scheduling processing method, device, equipment and storage medium
CN108268216B (en) Data processing method, device and server
US20190229931A1 (en) Distributed telephone number ledger and register
CN108762949A (en) Centralized dispatching method, system, computer equipment and storage medium
CN106528844B (en) A kind of data request method and device and data-storage system
CN109213604A (en) A kind of management method and device of data source
CN109635063A (en) Information processing method, device, electronic equipment and the storage medium of address base
CN107730375A (en) A kind of method, system and the terminal device of tax management map
CN110402435A (en) Dull transaction in more primary databases with loose couplings node
CN110431580A (en) Concurrent block chain Fail Transaction is reduced using the table of random numbers
CN110659943B (en) Method and device for adjusting delivery channel based on user structure characteristics and electronic equipment
CN110046155A (en) The update of property data base, data characteristics determination method, device and equipment
CN108573018A (en) IP library generating methods, device, electronic equipment and computer readable storage medium
CN104866603B (en) The call method and metadata management system of metadata
JP2015502619A (en) Data filing system method and system
CN111428114B (en) Index creation method and device of elastic search engine
KR101614890B1 (en) Method of creating multi tenancy history, server performing the same and storage media storing the same
CN110399530A (en) Data matching method, device and computer equipment
CN110532254A (en) The method and apparatus of fused data table
CN109947842A (en) Date storage method, apparatus and system in distributed memory system

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