CN109829081B - View matching processing method and device - Google Patents

View matching processing method and device Download PDF

Info

Publication number
CN109829081B
CN109829081B CN201710729644.8A CN201710729644A CN109829081B CN 109829081 B CN109829081 B CN 109829081B CN 201710729644 A CN201710729644 A CN 201710729644A CN 109829081 B CN109829081 B CN 109829081B
Authority
CN
China
Prior art keywords
matching
view
configuration file
views
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710729644.8A
Other languages
Chinese (zh)
Other versions
CN109829081A (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.)
Guizhou Baishancloud Technology Co Ltd
Original Assignee
Guizhou Baishancloud 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 Guizhou Baishancloud Technology Co Ltd filed Critical Guizhou Baishancloud Technology Co Ltd
Priority to CN201710729644.8A priority Critical patent/CN109829081B/en
Publication of CN109829081A publication Critical patent/CN109829081A/en
Application granted granted Critical
Publication of CN109829081B publication Critical patent/CN109829081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a view matching processing method and a device, wherein the method comprises the following steps: step 1, counting a matching effective index of a source IP matched to a view in a log in a preset time period; and 2, correspondingly setting the sequence of the views in the configuration file according to the sequence of the matching effective indexes of the views from large to small. The invention realizes the matching goal by the least times of sequence matching judgment within a certain time range on the premise of not influencing the original sequence matching service logic. On the premise of not changing view service configuration logic, aiming at the view of bind software, rules with more matching times are placed in front of a rule configuration file by calculating the rule matching times in a log, all the rules are sorted again to obtain an optimal sequence matching configuration scheme, the view matched by a DNS request packet is judged by view matching with the least times, and the matching efficiency is effectively improved.

Description

View matching processing method and device
Technical Field
The invention relates to the technical field of internet, in particular to a view matching processing method and device.
Background
With the development of the internet, the intelligent scheduling system is widely applied to the improvement of the internet range quality. Among solutions for implementing the intelligent scheduling function, a solution for implementing the intelligent scheduling using a view (view) function of bind software is widely adopted due to economy and ease of use. With the continuous improvement of the demand of the netizens on the network access quality, the ultimate improvement of the performance and efficiency of each link in the network access process is more important to finally improve the overall access quality.
The existing scheme generally uses a view sorting mode of order matching, for example, as follows:
the format of each view in the view configuration table in the configuration file comprises an associated IP base, a domain name and a network server address, namely view { IP base domain web server }.
For example, the view configuration table in the configuration file includes:
view1{192.168.0.1www.a.com 1.1.1.1}
view2{192.168.0.2www.a.com 1.1.1.2}
view3{192.168.0.3www.a.com 1.1.1.3}
view4{192.168.0.4www.a.com 1.1.1.4}
the source IP in the received IP request is 192.168.0.3 and the destination domain name is www.a.com.
And sequentially matching each view according to the sequence in the view configuration table by using the source IP, wherein when the view1 and the view2 are matched unsuccessfully and then are matched, the view3 is matched successfully, and the matching times are 3 times. The result of the match from this IP request is confirmed to be 1.1.1.3 in view 3.
The method has low matching efficiency and directly influences the processing performance of the bind software. The method for removing the view logic in the existing bind software to redevelop the new matching mode needs high research and development cost and is low in feasibility. Therefore, how to improve the efficiency of the sequence matching processing on the basis of using the existing view logic needs to be solved.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides a method and an apparatus for view matching processing.
The view matching processing method provided by the invention comprises the following steps:
step 1, counting a matching effective index of a source IP matched to a view in a log in a preset time period;
and 2, correspondingly setting the sequence of the views in the configuration file according to the sequence of the matching effective indexes of the views from large to small.
The view matching processing method also has the following characteristics:
the method further comprises, before step 1:
detecting whether the same IP exists in the IP libraries in different views, and executing mutual exclusion elimination processing to ensure that the same IP does not exist in the IP libraries in different views when detecting whether the same IP exists in the IP libraries in different views.
The view matching processing method also has the following characteristics:
the performing the mutual exclusion removal process includes deleting the same IP from the IP library of the views other than the view ordered first.
The view matching processing method also has the following characteristics:
the step 2 comprises the following steps: determining the view with the preset fixed line number in the original configuration file, placing the view in the line corresponding to the preset fixed line number, and setting the sequence of the views in the configuration file according to the sequence of the matching degree of the views from large to small.
The view matching processing method also has the following characteristics:
the method further comprises performing step 1 and step 2 according to a time period;
after the step 2 is executed every time, judging whether the configuration file is the same as the configuration file before the step 1 is executed, if the same, recording the corresponding time point and marking the non-updated mark, and if the different, recording the corresponding time point and marking the updated mark, counting the time intervals of two adjacent non-updated mark time points in the preset time length, and taking the average value of each time interval as a new time period.
The invention provides a view matching processing device, comprising:
the statistical module is used for counting the effective matching index of the source IP matched with the view in the log in a preset time period;
and the reconfiguration module is used for correspondingly setting the sequence of the views in the configuration file according to the sequence from large to small of the matching effective indexes of the views.
The view matching processing device also has the following characteristics:
the view matching processing device also has the following characteristics:
the mutual exclusion detection module is used for detecting whether the same IP exists in the IP libraries in different views;
and the mutual exclusion elimination module is used for executing mutual exclusion elimination processing when the mutual exclusion detection module detects whether the same IP exists in the IP libraries in different views so as to ensure that the same IP does not exist in the IP libraries in different views.
The view matching processing device also has the following characteristics:
and the mutual exclusion elimination module is used for deleting the same IP from the IP library of the views except the view ranked at the first.
The view matching processing device also has the following characteristics:
the reconfiguration module is used for determining the view with the preset fixed line number in the original configuration file, placing the view in the line corresponding to the preset fixed line number, and setting the sequence of the views in the configuration file according to the sequence of the matching degree of the views from large to small.
The view matching processing device also has the following characteristics:
the device also comprises a time period updating module used for judging whether the configuration file is the same as the configuration file before reconfiguration after the reconfiguration module executes reconfiguration, if the configuration file is the same as the configuration file before reconfiguration, recording corresponding time points and marking un-updated marks, and if the configuration file is different from the configuration file before reconfiguration, recording corresponding time points and marking updated marks, counting time intervals of two adjacent time points without updated marks in a preset time length, and taking the average value of each time interval as a new time period.
The invention realizes the matching goal by the least times of sequence matching judgment within a certain time range on the premise of not influencing the original sequence matching service logic. On the premise of not changing view service configuration logic, aiming at the view of bind software, rules with more matching times are placed in front of a rule configuration file by calculating the rule matching times in a log, all the rules are sorted again to obtain an optimal sequence matching configuration scheme, the view matched by a DNS request packet is judged by view matching with the least times, and the matching efficiency is effectively improved.
The invention also detects whether the view chart has the mutual exclusion condition, eliminates the mutual exclusion phenomenon, ensures that the mutual exclusion IP can be uniquely configured to the view configured in the original sequence under any sequence, and ensures that the invention does not influence the service logic after being executed.
In the invention, only the configuration file is modified, and software is not developed, so that the realization difficulty, the cost and the risk are low.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a view matching processing method according to an embodiment.
Fig. 2 is a configuration diagram of a view matching processing apparatus according to a second embodiment.
Fig. 3 is a flowchart of a view matching processing method according to the third embodiment.
FIG. 4 is a block diagram of a view matching apparatus according to a fourth embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Example one
FIG. 1 is a flowchart illustrating a view matching processing method according to an embodiment, the method including:
step 101, counting a matching effective index of a source IP matched to a view in a log in a preset time period;
and 102, correspondingly setting the sequence of the views in the configuration file according to the sequence of the matching effective indexes of the views from large to small.
Wherein, the matching effective index in step 101 is the matching success number or the matching success rate. The matching success frequency refers to the total number of times of matching to a view in a preset time period, and the matching success rate refers to the ratio of the total number of times of matching to a view in the preset time period to the time length of the preset time period. The matching validity index may set other parameters than the above two parameters as long as the matching validity index indicates the matching success.
Step 102 comprises: determining the view with the preset fixed line number in the original configuration file, placing the view in the line corresponding to the preset fixed line number, and setting the sequence of the views in the configuration file according to the sequence of the matching degree of the views from large to small. The views with the preset fixed line number in the original configuration file are preset special views, and do not participate in the reordering in the method, the views with the preset fixed line number are arranged at the fixed line number before the reordering, and other non-fixed line numbers are used for placing the reordered views. For example, if the view table of the configuration file includes 500 views, and a fixed number of rows of a view is pre-configured as the last row, the view is set in the last row before reordering, and the reordered views are placed using the number of rows other than the last row.
The method is performed in time cycles while being performed. The time period may be a fixed value or a value that is continuously dynamically adjusted. For example, after the step 2 is executed every time, whether the configuration file is the same as the configuration file before the step 1 is executed is judged, if the same record corresponds to a time point and the label is marked with an un-updated label, and if the record corresponds to a time point and the label is marked with an updated label, the time interval of two adjacent time points with un-updated labels in a preset time length is counted, and the average value of each time interval is used as a new time period.
Example two
Fig. 2 is a flowchart of a view matching processing method according to a second embodiment, the method including:
step 201, detecting whether the same IP exists in the IP libraries in different views, and executing mutual exclusion elimination processing to make the same IP not exist in the IP libraries in different views when detecting whether the same IP exists in the IP libraries in different views.
Step 202, counting a matching effective index of a source IP matched to a view in a log in a preset time period;
and step 203, correspondingly setting the sequence of the views in the configuration file according to the sequence of the matching effective indexes of the views from large to small.
The first embodiment is different from the first embodiment in that the method further includes an operation step of detecting and eliminating mutual exclusion. For example, the view table part in the configuration file includes:
view1{192.168.0.1www.a.com 1.1.1.1}
view2{192.168.0.2www.a.com 1.1.1.2}
view3{192.168.0.1、192.168.0.3www.a.com 1.1.1.3}
view4{192.168.0.4www.a.com 1.1.1.4}
the IP libraries of both view1 and view3 contain 192.168.0.1, and the two views have a mutually exclusive relationship. When an IP request with a source IP of 192.168.0.1 is received, the IP request is matched with the view1 according to the current rule, if the relative positions of the view3 and the view1 are exchanged during the rearrangement sequence of the subsequent views, the IP request is matched with the view3, the service logic is changed, the normal operation of the system is influenced, and therefore the mutual exclusion rule needs to be eliminated. When the mutual exclusion elimination processing is executed in step 101, the source IP is deleted from the IP banks of views other than the view ranked first, 192.168.0.1 of the IP bank of view3 is deleted in the above example, and the view table after the mutual exclusion elimination processing is executed is:
view1{192.168.0.1www.a.com 1.1.1.1}
view2{192.168.0.2www.a.com 1.1.1.2}
view3{192.168.0.3www.a.com 1.1.1.3}
view4{192.168.0.4www.a.com 1.1.1.4}
in the method, after executing the mutual exclusion elimination processing, the related information of the mutual exclusion elimination processing is also output, so that an operator can know the process of the mutual exclusion elimination processing. Eliminating the mutual exclusion processing related information comprises: the name of the view with the mutual exclusion relationship, the IP with the mutual exclusion relationship, the processing mode and the processing result are stored in the configuration file.
EXAMPLE III
The view matching processing apparatus in the present embodiment corresponds to the view matching processing method in the first embodiment.
As shown in fig. 3, the apparatus includes a statistics module and a reconfiguration module.
The statistical module is used for counting the effective matching index of the source IP matched to the view in the log in a preset time period;
the reconfiguration module is used for correspondingly setting the sequence of the views in the configuration file according to the sequence of the matching effective indexes of the views from large to small.
Wherein the content of the first and second substances,
the reconfiguration module is used for determining the view with the preset fixed line number in the original configuration file, placing the view in the line corresponding to the preset fixed line number, and setting the sequence of the views in the configuration file according to the sequence of the matching degree of the views from large to small.
The device also comprises a time period updating module used for judging whether the configuration file is the same as the configuration file before reconfiguration after the reconfiguration module executes reconfiguration, if the configuration file is the same as the configuration file before reconfiguration, recording corresponding time points and marking un-updated marks, and if the configuration file is different from the configuration file before reconfiguration, recording corresponding time points and marking updated marks, counting time intervals of two adjacent time points without updated marks in a preset time length, and taking the average value of each time interval as a new time period.
Example four
The view matching processing apparatus in this embodiment corresponds to the view matching processing method in the second embodiment.
As shown in FIG. 4, the apparatus includes a mutual exclusion detection module, a mutual exclusion elimination module, a statistics module, and a reconfiguration module.
And the mutual exclusion detection module is used for detecting whether the same IP exists in the IP libraries in different views.
And the mutual exclusion elimination module is used for executing mutual exclusion elimination processing when the mutual exclusion detection module detects whether the same IP exists in the IP libraries in different views so as to ensure that the same IP does not exist in the IP libraries in different views. Specifically for deleting the same IP from the IP library of views other than the view ordered first.
The statistical module is used for counting the effective matching index of the source IP matched to the view in the log in a preset time period;
the reconfiguration module is used for correspondingly setting the sequence of the views in the configuration file according to the sequence of the matching effective indexes of the views from large to small.
The invention realizes the matching goal by the least times of sequence matching judgment within a certain time range on the premise of not influencing the original sequence matching service logic. On the premise of not changing view service configuration logic, aiming at the view of bind software, rules with more matching times are placed in front of a rule configuration file by calculating the rule matching times in a log, all the rules are sorted again to obtain an optimal sequence matching configuration scheme, the view matched by a DNS request packet is judged by view matching with the least times, and the matching efficiency is effectively improved.
The invention also detects whether the view chart has the mutual exclusion condition, eliminates the mutual exclusion phenomenon, ensures that the mutual exclusion IP can be uniquely configured to the view configured in the original sequence under any sequence, and ensures that the invention does not influence the service logic after being executed.
In the invention, only the configuration file is modified, and software is not developed, so that the realization difficulty, the cost and the risk are low.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits, and accordingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
It is to be noted that, in this document, the terms "comprises", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, so that an article or apparatus including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional like elements in the article or device comprising the element.
The above embodiments are merely to illustrate the technical solutions of the present invention and not to limit the present invention, and the present invention has been described in detail with reference to the preferred embodiments. It will be understood by those skilled in the art that various modifications and equivalent arrangements may be made without departing from the spirit and scope of the present invention and it should be understood that the present invention is to be covered by the appended claims.

Claims (8)

1. A view matching processing method, comprising:
step 1, counting a matching effective index of a source IP matched to a view in a log in a preset time period;
step 2, correspondingly setting the sequence of the views in the configuration file according to the sequence of the matching effective indexes of the views from large to small; the match validity index includes at least one of the following parameters: matching success times and matching success rate; the matching success frequency refers to the total number of times of matching to a view in a preset time period, and the matching success rate refers to the ratio of the total number of times of matching to the view in the preset time period to the time length of the preset time period;
the step 2 comprises the following steps: determining the view with the preset fixed line number in the original configuration file, placing the view in the line corresponding to the preset fixed line number, and setting the sequence of the views in the configuration file according to the sequence of the matching degree of the views from large to small.
2. The view matching processing method according to claim 1,
the method further comprises, before step 1:
detecting whether the same IP exists in the IP libraries in different views, and executing mutual exclusion elimination processing to ensure that the same IP does not exist in the IP libraries in different views when detecting whether the same IP exists in the IP libraries in different views.
3. The view matching processing method according to claim 2,
the performing the mutual exclusion removal process includes deleting the same IP from the IP library of the views other than the view ordered first.
4. The view matching processing method according to claim 1,
the method further comprises performing step 1 and step 2 according to a time period;
after the step 2 is executed every time, judging whether the configuration file is the same as the configuration file before the step 1 is executed, if the same, recording the corresponding time point and marking the non-updated mark, and if the different, recording the corresponding time point and marking the updated mark, counting the time intervals of two adjacent non-updated mark time points in the preset time length, and taking the average value of each time interval as a new time period.
5. A view matching processing apparatus, characterized by comprising:
the statistical module is used for counting the effective matching index of the source IP matched with the view in the log in a preset time period;
the reconfiguration module is used for correspondingly setting the sequence of each view in the configuration file according to the sequence of the matching effective indexes of the views from large to small; the match validity index includes at least one of the following parameters: matching success times and matching success rate; the matching success frequency refers to the total frequency of matching to a view in a preset time period, and the matching success rate refers to the ratio of the total frequency of matching to the view in the preset time period to the time length of the preset time period;
the reconfiguration module is used for determining the view with the preset fixed line number in the original configuration file, placing the view in the line corresponding to the preset fixed line number, and setting the sequence of the views in the configuration file according to the sequence of the matching degree of the views from large to small.
6. The view matching processing apparatus of claim 5,
the device further comprises:
the mutual exclusion detection module is used for detecting whether the same IP exists in the IP libraries in different views;
and the mutual exclusion elimination module is used for executing mutual exclusion elimination processing when the mutual exclusion detection module detects whether the same IP exists in the IP libraries in different views so as to ensure that the same IP does not exist in the IP libraries in different views.
7. The view matching processing apparatus of claim 6,
and the mutual exclusion elimination module is used for deleting the same IP from the IP library of the views except the view ranked at the first.
8. The view matching processing apparatus of claim 5,
the device also comprises a time period updating module used for judging whether the configuration file is the same as the configuration file before reconfiguration after the reconfiguration module executes reconfiguration, if the configuration file is the same as the configuration file before reconfiguration, recording corresponding time points and marking un-updated marks, and if the configuration file is different from the configuration file before reconfiguration, recording corresponding time points and marking updated marks, counting time intervals of two adjacent time points without updated marks in a preset time length, and taking the average value of each time interval as a new time period.
CN201710729644.8A 2017-08-23 2017-08-23 View matching processing method and device Active CN109829081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710729644.8A CN109829081B (en) 2017-08-23 2017-08-23 View matching processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710729644.8A CN109829081B (en) 2017-08-23 2017-08-23 View matching processing method and device

Publications (2)

Publication Number Publication Date
CN109829081A CN109829081A (en) 2019-05-31
CN109829081B true CN109829081B (en) 2021-02-12

Family

ID=66858068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710729644.8A Active CN109829081B (en) 2017-08-23 2017-08-23 View matching processing method and device

Country Status (1)

Country Link
CN (1) CN109829081B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030120822A1 (en) * 2001-04-19 2003-06-26 Langrind Nicholas A. Isolated control plane addressing
US9183248B2 (en) * 2009-06-09 2015-11-10 Oracle International Corporation Configuring object displays
CN102024056A (en) * 2010-12-15 2011-04-20 中国科学院自动化研究所 Computer aided newsmaker retrieval method based on multimedia analysis
CN102929938B (en) * 2012-09-28 2015-09-30 北京奇艺世纪科技有限公司 A kind of sort method and device playing type Internet resources
CN105512176B (en) * 2015-11-24 2019-07-09 北京中电普华信息技术有限公司 A kind of increment extraction method and system based on Informatica Powercenter
CN106506729B (en) * 2017-01-11 2019-11-19 中国互联网络信息中心 A kind of DNS policy resolution method and device based on DNS view

Also Published As

Publication number Publication date
CN109829081A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
US10069863B2 (en) Fake web address detection
CN105745870B (en) Extend operation from for detecting the serial multistage filter flowed greatly removal nose filter to remove stream to realize
CN108881515A (en) Domain name analytic method, device and the network equipment
CN108566296B (en) Network device layering method, network management device and computer readable storage medium
US20150341771A1 (en) Hotspot aggregation method and device
CN110601922A (en) Method and device for realizing comparison experiment, electronic equipment and storage medium
CN110648180B (en) Method and device for adjusting delivery channel and electronic equipment
CN107967279A (en) The data-updating method and device of distributed data base
CN108063685B (en) Log analysis method and device
CN111404768A (en) DPI recognition realization method and equipment
CN110380890A (en) A kind of CDN system service quality detection method and system
CN109067744A (en) Acl rule processing method, device and communication equipment
CN109829081B (en) View matching processing method and device
CN106503024A (en) Log information processing method and device
CN110691012B (en) Message processing method and tester
CN111209284B (en) Meta-data-based sub-table method and device
CN104951550B (en) Date storage method and device
CN113992364A (en) Network data packet blocking optimization method and system
US7159019B2 (en) Information collection apparatus and method
CN110808961B (en) Data processing method and device for security verification
CN108449226B (en) Method and system for quickly classifying information
CN111884927A (en) Link overhead obtaining method and device based on ospf link database
CN111884932A (en) Link determination method, device, equipment and computer readable storage medium
CN105978865B (en) application package name verification method and device
CN106559439A (en) A kind of method for processing business and equipment

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