CN105069074A - Strategy configuration file processing method, device and system - Google Patents

Strategy configuration file processing method, device and system Download PDF

Info

Publication number
CN105069074A
CN105069074A CN201510461309.5A CN201510461309A CN105069074A CN 105069074 A CN105069074 A CN 105069074A CN 201510461309 A CN201510461309 A CN 201510461309A CN 105069074 A CN105069074 A CN 105069074A
Authority
CN
China
Prior art keywords
configuration file
policy configuration
policy
database
file example
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
CN201510461309.5A
Other languages
Chinese (zh)
Other versions
CN105069074B (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.)
JIANGSU TIANLIAN INFORMATION TECHNOLOGY DEVELOPMENT Co Ltd
Original Assignee
JIANGSU TIANLIAN INFORMATION TECHNOLOGY DEVELOPMENT 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 JIANGSU TIANLIAN INFORMATION TECHNOLOGY DEVELOPMENT Co Ltd filed Critical JIANGSU TIANLIAN INFORMATION TECHNOLOGY DEVELOPMENT Co Ltd
Priority to CN201510461309.5A priority Critical patent/CN105069074B/en
Publication of CN105069074A publication Critical patent/CN105069074A/en
Application granted granted Critical
Publication of CN105069074B publication Critical patent/CN105069074B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a strategy configuration file processing method, device and system. The method comprises the following steps: partitioning original strategy files which belong to the same type according to fields to obtain a plurality of strategy sub-blocks; removing the domain name and port information in the strategy sub-blocks; describing the strategy sub-blocks subjected to domain name and port information removal by an extensible language to obtain a corresponding strategy configuration file instance; and establishing a mapping relationship between the generated strategy configuration file instance and the domain name and the port of the corresponding original strategy configuration file, and storing the mapping relationship in a database. The above scheme can improve the maintenance efficiency of the strategy configuration file.

Description

Policy configuration file disposal route, device and system
Technical field
The invention belongs to content distribution techniques field, particularly relate to a kind of policy configuration file disposal route, device and system.
Background technology
Content distributing network (ContentDeliveryNetwork, CDN), by placing node server everywhere at network, one deck intelligent virtual network is built on existing Internet basic, the content of website is published to the network " edge " closest to user, make user can obtain required content nearby, to alleviate the situation of network congestion, improve the response speed of website.
Node server in CDN, can as proxy server or caching server according to function difference.For reaching acceleration object, in daily CDN operates, a series of tactful configuration operation can be done to the node server in CDN, comprise cache policy configuration (cache.config), access control policy configuration (remap.config), access control (AccessControlList, ACL) strategy configuration (remap.config), walk the operation that parent policy configures the various configuration file such as (parent.config) and self-defined plug-in unit strategy configuration (ats_plugin.config).Each accelerates domain name when accelerating, and operates according to policy configuration file.
But the policy configuration file of the node server in CDN, when usage data storehouse stores, usually needs to store a lot of tables of data, there is the problem that maintenance efficiency is low.
Summary of the invention
The problem that the embodiment of the present invention solves improves the maintenance efficiency of policy configuration file.
For solving the problem, embodiments provide a kind of policy configuration file disposal route, described method comprises:
The original strategy configuration file of same type is carried out piecemeal according to field and obtains multiple tactful piecemeal;
The information of the domain name in described tactful piecemeal and port is removed;
Adopt extensible language to be described the tactful piecemeal removing port and domain-name information and obtain corresponding policy configuration file example;
Set up the policy configuration file example and the corresponding domain name of original strategy configuration file and the mapping relations of port that generate, and store in a database.
Alternatively, describedly set up policy configuration file example and the corresponding domain name of original strategy configuration file and the mapping relations of port that generate, and storage is in a database, comprising:
Judge whether to exist in described database the policy configuration file example that the policy configuration file example of described generation is identical;
When determining to there is the policy configuration file example identical with the policy configuration file example of described generation in described database, then increase port and the mapping relations of domain name with policy configuration file example identical with the policy configuration file example of described generation in described database of the corresponding original strategy configuration file of policy configuration file of described generation in the database;
When determining there is not the policy configuration file example identical with the policy configuration file example of described generation in described database, then set up the mapping relations of the policy configuration file example of described generation and the port of corresponding original strategy configuration file and domain name and store in the database.
Alternatively, the policy configuration file example that the described policy configuration file example judging whether to exist in described database described generation is identical, comprising:
Calculate the MD5 value of the policy configuration file example of described generation;
The MD5 value of the policy configuration file example stored in the MD5 value of the policy configuration file example of the described generation calculated and described database is compared;
When the MD5 value of the policy configuration file example of described generation is identical with the MD5 value of the policy configuration file example stored in described database, then determine to there is the policy configuration file example identical with the policy configuration file example of described generation in described database;
When the MD5 value of the policy configuration file example of described generation is all not identical with the MD5 value of the policy configuration file example stored in described database, then determine in described database, to there is not the policy configuration file example identical with described new policy configuration file example.
Alternatively, when wrapping described original strategy configuration file increase expanding policy field, described method also comprises: adopt described extensible language described expanding policy field to be described, and is added in policy configuration file example corresponding to described original strategy configuration file and obtains new policy configuration file example.
Alternatively, described method also comprises:
When generation strategy configuration file, judge whether the strategy configuration of each node server is identical;
When determining that the strategy configuration of each node server is identical, the domain name of the policy configuration file example stored in usage data storehouse and correspondence and port generation strategy configuration file, and be sent to each node server;
When determining that the strategy configuration of each node server is different, each node server is according to the mapping relations of node server and policy configuration file example and corresponding port and domain name, from described database, obtain corresponding policy configuration file example and corresponding port and domain name, splicing generates corresponding policy configuration file and also stores.
Alternatively, described extensible language is XML language.
The embodiment of the present invention additionally provides a kind of policy configuration file treating apparatus, and described treating apparatus comprises:
Cutting unit, is suitable for that the original strategy configuration file of same type is carried out piecemeal according to field and obtains multiple tactful piecemeal;
Removal unit, is suitable for the information of the domain name in described tactful piecemeal and port to remove;
Generation unit, is suitable for adopting extensible language to be described the tactful piecemeal removing port and domain-name information and obtains corresponding policy configuration file example;
Mapping relations set up storage unit, be suitable for setting up policy configuration file example and the corresponding domain name of original strategy configuration file and the mapping relations of port that generate, and storage in a database.
Alternatively, described mapping relations are set up storage unit and are suitable for judging whether to exist in described database the identical policy configuration file example of the policy configuration file example of described generation; When determining to there is the policy configuration file example identical with the policy configuration file example of described generation in described database, then increase port and the mapping relations of domain name with policy configuration file example identical with the policy configuration file example of described generation in described database of the corresponding original strategy configuration file of policy configuration file of described generation in the database; When determining there is not the policy configuration file example identical with the policy configuration file example of described generation in described database, then set up the mapping relations of the policy configuration file example of described generation and the port of corresponding original strategy configuration file and domain name and store in the database.
Alternatively, described mapping relations set up the MD5 value that storage unit is suitable for calculating the policy configuration file example of described generation; The MD5 value of the policy configuration file example stored in the MD5 value of the policy configuration file example of the described generation calculated and described database is compared; When the MD5 value of the policy configuration file example of described generation is identical with the MD5 value of the policy configuration file example stored in described database, then determine to there is the policy configuration file example identical with the policy configuration file example of described generation in described database; When the MD5 value of the policy configuration file example of described generation is all not identical with the MD5 value of the policy configuration file example stored in described database, then determine in described database, to there is not the policy configuration file example identical with described new policy configuration file example.
Alternatively, described device also comprises: adding device, be suitable for when described original strategy configuration file increases expanding policy field, adopt described extensible language described expanding policy field to be described, and be added in policy configuration file example corresponding to described original strategy configuration file and obtain new policy configuration file example.
Alternatively, described extensible language is XML language.
The embodiment of the present invention additionally provides a kind of policy configuration file generation system, and described system comprises database, policy configuration file generation server and multiple node server, and above-mentioned policy configuration file treating apparatus, wherein:
Described policy configuration file treating apparatus, is suitable for generation strategy configuration file example, and the information of the policy configuration file example of generation and the domain name of corresponding original strategy configuration file and port is also stored in a database;
Described database, is suitable for storing the mapping relations between the domain name of policy configuration file example and the corresponding original strategy configuration file generated and the information of port;
Described strategy file generation server, be suitable for when determining that the strategy configuration of each node server described is identical, by according to the policy configuration file example stored in described database and the corresponding domain name of original strategy configuration file and the information of port, generation strategy configuration file, and be sent to described multiple node server respectively;
Each node server, is suitable for, when determining that the strategy configuration of each node server described is identical, receiving the policy configuration file of described strategy file generation server generation and storing; When determining that the strategy configuration of each node server described is different, according to node server and the policy configuration file example stored in database and the corresponding domain name of original strategy configuration file and the mapping relations of port, from described database, obtain corresponding policy configuration file example and the corresponding domain name of original strategy configuration file and the information of port, splicing generates corresponding policy configuration file and also stores.
Compared with prior art, technical scheme of the present invention has following advantage:
Above-mentioned scheme, original strategy configuration file is being carried out non-segmentation according to field, and after therefrom removing port and domain-name information, adopt the policy configuration file example that extensible language generates, the mapping relations of the domain name and port of setting up policy configuration file example and the corresponding original strategy configuration file generated also store in a database, can reduce the quantity of the tables of data stored in database, the efficiency improving data query can improve storage, promotes the experience of user.
Further, when increasing policy field in described original strategy configuration file, extensible language is adopted to be described described policy field, and be added in strategy file example corresponding to described original strategy configuration file, can the data structure in database do not changed, improve the maintenance efficiency of policy configuration file.
Further, XML language is adopted to define splitting each the tactful piecemeal obtained, simple, thus can improve the maintenance efficiency measuring file.
Further, when the new policy configuration file generated is stored in a database, judge in described database, whether to there is the policy configuration file identical with described new policy configuration file by the MD5 value calculating described new policy configuration file, the efficiency of inquiry can be improved, and then improve the maintenance efficiency of policy configuration file.
Accompanying drawing explanation
Fig. 1 is a kind of in embodiment of the present invention process flow diagram of policy configuration file disposal route;
Fig. 2 is the process flow diagram of alternative policy configuration file disposal route in the embodiment of the present invention;
Fig. 3 is the schematic diagram of the HTML list used in the embodiment of the present invention;
Fig. 4 is the structural representation of a kind of policy configuration file treating apparatus in the invention process;
Fig. 5 is the structural representation of a kind of policy configuration file disposal system in the embodiment of the present invention.
Embodiment
For solving the problem, policy configuration file disposal route in the embodiment of the present invention is by splitting original strategy configuration file according to field, and after therefrom removing port and domain-name information, adopt the policy configuration file example that extensible language generates, the mapping relations of the domain name and port of setting up policy configuration file example and the corresponding original strategy configuration file generated also store in a database, the quantity of the tables of data stored in database can be reduced, the efficiency improving data query can improve storage, promotes the experience of user.
For enabling above-mentioned purpose of the present invention, feature and advantage more become apparent, and are described in detail specific embodiments of the invention below in conjunction with accompanying drawing.
Fig. 1 is the process flow diagram of a kind of policy configuration file disposal route in the embodiment of the present invention.Policy configuration file disposal route as shown in Figure 1, can comprise:
Step S101: the original strategy configuration file of same type is carried out piecemeal according to field and obtains multiple tactful piecemeal.
Step S102: the information of the domain name in described tactful piecemeal and port is removed.
Step S103: adopt extensible language to be described the tactful piecemeal removing port and domain-name information and obtain corresponding policy configuration file example.
Step S104: set up the policy configuration file example and the corresponding domain name of original strategy configuration file and the mapping relations of port that generate, and store in a database.
Below in conjunction with Fig. 2 and specific embodiment, the policy configuration file disposal route in the present invention is further described in detail.
Fig. 2 is the process flow diagram of a kind of policy configuration file disposal route in the embodiment of the present invention.Policy configuration file disposal route as shown in Figure 2, can comprise:
Step S201: split according to field by the policy configuration file of same type, obtains different tactful piecemeals.
In concrete enforcement, the node server of CDN can perform corresponding operation according to policy configuration file.Described policy configuration file, according to different function types, can comprise cache policy configuration file, not cache policy configuration file, access control policy configuration file, plug-in unit policy configuration file and walk parent policy configuration file etc.
Wherein, the policy configuration file of various function type all can be split according to field.
Such as, not cache policy configuration file:
url_regex=http://www\.example\.com:8080/(r1|r2|r3).*\.(css|js)$scheme=httpaction=never-cache;
Following three parts can be divided into according to field:
(1) canonical matching field:
url_regex=http://www\.example\.com:8080/(r1|r2|r3).*\.(css|js)$;
(2) request URL protocol fields:
scheme=http;
(3) action field:
action=never-cache;
Wherein, after obtaining corresponding tactful piecemeal by above-mentioned segmentation, in conjunction with the content of concrete tactful piecemeal, each tactful piecemeal can be processed accordingly.Such as, by analyzing the content of the canonical matching field in above-mentioned example, can show that the content of described canonical matching field meets following condition:
(1) domain name prefix only has one or do not have;
(2) Uniform Resource Identifier (UniformResourceIdentifier, the URI) partial list of url_regex is empty, and entirely mates, and url_regex can be converted into the higher dest_domain of efficiency.Such as, above-mentioned example can be converted into:
Dest_domain=http://www\.example\.com:8080/(r1|r2|r3).*\.(css|js)$scheme=httpaction=never-cache。
Step S202: from corresponding tactful piecemeal after removal port and domain name, adopts extensible language to be described each tactful piecemeal and obtains corresponding policy configuration file example.
In concrete enforcement, after carrying out splitting according to field and obtaining multiple different tactful piecemeal, remove the information of port and domain name from corresponding strategy piecemeal after, extensible language is adopted to be described again respectively the tactful piecemeal and other tactful piecemeals of removing port and domain name.In an embodiment of the present invention, adopt XML language to be described each tactful piecemeal, simply, be easy to operation.
Same for above-mentioned cache policy configuration file, first from the URL canonical matching field, go out the information of domain name and port, namely remove http://www .example after .com and ": 8080 ", adopt XML language to be described respectively each tactful piecemeal.
Specifically, first adopt XML language to the function type of policy configuration file, namely action part is buffer memory or not buffer memory, is described.When the function type of policy configuration file to be described, is buffer memory, XML language is adopted to describe the time of buffer memory.
Then, XML language is adopted to be described to canonical matching field.Wherein, the information of domain name and port is present in canonical matching field, therefore, is adopting XML language to be described to canonical matching field, that is to say after removing domain name and port information, the remainder in described canonical matching field adopts XML language to be described.
Here it is to be noted, under normal conditions, URI part in canonical matching field comprises the information such as the whether fuzzy matching of catalogue set, suffix set, whether matching parameter, parameter, the content of matching parameter part, whether wide area name, and the content of XML language to the URI part in canonical matching field can be adopted correspondingly to describe.
When minority, as the specific demand etc. in order to meet user, URI part can also comprise some special strategies, namely according to the expanding policy field that the demand of client generates, described expanding policy field can adopt hand-written element <writes> to be described.Such as, when the demand of user is different caching server (Squid, Nginx etc.) carry out strategy switch time, the description of hand-written type XML attribute type=" nginx " can be increased in described hand-written element, to facilitate switchover policy between different caching server.
By above-mentioned mode, the structure of above-mentioned cache policy configuration file can obtain following cache policy XML structure after adopting XML language to be described:
In an embodiment of the present invention, after obtaining corresponding XML structure, the XML element in XML structure and attribute can be converted to visual instrument, as HyperText Markup Language (HyperTextMarkupLanguage, HTML) list, specifically shown in Figure 3.
Fig. 3 shows the schematic diagram of the list corresponding with above-mentioned cache policy configuration file.Shown in Figure 3, the data value (value) of corresponding XML element and attribute can be committed to server by described HTML list.Such as, policing type can be selected in " buffer memory ", " not buffer memory ", " walking father " etc. in the left side of the HTML list shown in Fig. 3.The data value of generation or the corresponding XML element of hand-written submission and attribute is automatically may be used on the right side of HTML list.In addition, the grey word in HTML list in respective selection frame is the input prompt information of respective item, as " please input multiple catalogue, multiple catalogue | segmentation " in the Option Box after CACHE DIRECTORY.
After receiving by the XML element of HTML submission of sheet and the data value of attribute, described server can adopt corresponding crossover tool, as JAXB (JavaArchitectureforXMLBinding), DOM4J (XML that increases income that dom4j.org produces resolves bag), SAX (SimpleAPIforXML) etc. in Java, be converted to corresponding policy configuration file example.
Same for above-mentioned cache policy configuration file, the cache policy configuration file example be finally converted to is as follows:
Above-mentioned for XML language to how to generate and the process of policy configuration file example of original strategy configuration file has done detailed introduction, what it will be appreciated by those skilled in the art that is, also other extensible language can be adopted to be described policy configuration file, not limit at this.
After obtaining policy configuration file example, the mapping relations example of the policy configuration file obtained and original strategy configuration file can be stored in a database.Wherein, the information of port and domain name is not comprised in each the policy configuration file example stored in described database, the difference of domain name and port information only may be between some policy configuration file of same type, therefore, with the policy configuration file example that the generate identical policy configuration file example corresponding with other port and domain-name information may be there is in described database.
In order to avoid same policy configuration file example repeated storage in the database, first can judge in described database, whether to have there is the policy configuration file example identical with the policy configuration file example generated.When determining to exist in described database with the identical policy configuration file example of policy configuration file example generated, then the domain name of the original strategy configuration file that newly-increased described policy configuration file example is corresponding and port with in described database and mapping relations between the policy configuration file example that the policy configuration file example of generation is identical.Otherwise, then the policy configuration file example of generation is stored in the database with the mapping relations between the domain name of corresponding original strategy configuration file and port.
In the present invention one implements, in order to improve judgement speed further, first Message Digest Algorithm 5 (the MessageDigestAlgorithm of the policy configuration file example of generation can be calculated, MD5) value, and the MD5 value of the policy configuration file example stored in the MD5 value calculated and database is contrasted, when the MD5 value of the policy configuration file example determining to store in described database is identical with the MD5 value of the policy configuration file example generated, then show to there is the policy configuration file example identical with the policy configuration file example generated in database.In other words, the policy configuration file example stored in described database with the MD5 value of correspondence for key word carries out storing.
In concrete enforcement, in order to improve correctness, can the policy configuration file example stored in database be audited.Such as, the policy configuration file stored in database can be obtained.
By in policy configuration file example again input database time, can adopt simultaneously two staff (staff's first and staff's second) come implementation strategy configuration file example typing operation.When typing, staff's first carries out writing of policy configuration file, in the policy configuration file example input database that staff's first is then write by staff's second.When two staff's first are write identical with the same policy configuration file example in the database of second typing, both sides exchange typing work, namely write policy configuration file example by staff's second, staff's first is audited the policy configuration file example that staff's second is write; If different, then show that the work having at least a people to do in staff's first and staff's second is wrong, now, two strategies are all return and are again write.Adopt the correctness that greatly can improve strategy examination & verification in this way.
Step S203: the policy configuration file example obtained is merged according to domain name.
In concrete enforcement, when generating corresponding policy configuration file, in order to reduce the number of generated policy configuration file, first the policy configuration file example stored in database can be taken out, and the policy configuration file example of same function type is divided into groups according to domain name, the policy configuration file example being also about to have identical second level domain is divided into one group.Before generating corresponding policy configuration file, can first the policy configuration file example with identical second level domain be merged.
Such as, three following policy configuration file examples
url_regex=http://www\.example\.com.*$scheme=httpttl-in-cache=360d;
url_regex=http://img\.example\.com.*$scheme=httpttl-in-cache=360d;
url_regex=http://game\.example\.com.*$scheme=httpttl-in-cache=360d;
A policy configuration file example can be merged into:
url_regex=http://(www|img|game)\.example\.com.*$scheme=httpttl-in-cache=360d。
In concrete enforcement, when there is default ordinal relation between policy configuration file example, after the policy configuration file example with identical second level domain is merged, the top-level domain in the consolidation strategy configuration file example generated after merging is carried out sorting.
Step S204: when the domain name of the policy configuration file example stored in usage data storehouse and correspondence and port generate corresponding policy configuration file, judge whether each node server has identical strategy configuration, when judged result is for being, step S205 can be performed, otherwise, then step S206 can be performed.
Step S205: the policy configuration file of the policy configuration file example stored in usage data storehouse and corresponding domain name and port generation correspondence, and be sent to each node server.
In concrete enforcement, when the strategy configuration of each node server is identical, then illustrate that the policy configuration file that each node server execution corresponding operating uses is identical, now, special policy configuration file generation server can be adopted the policy configuration file that stores in database and corresponding port and domain name to be taken out, generate corresponding policy configuration file and be also stored in described policy configuration file generation server.Afterwards, the policy configuration file of generation is sent to each node server by described policy configuration file generation server more respectively.
Step S206: each node server obtains port and the domain name of corresponding policy configuration file example and correspondence respectively from described database according to the mapping relations between node server and policy configuration file, generate corresponding policy configuration file and store.
In concrete enforcement, when the strategy configuration of each node server is not identical, then illustrate that the policy configuration file that each node server execution corresponding operating uses is not identical yet, now, each node server can according to the corresponding relation between node server and policy configuration file example, corresponding policy configuration file example is taken out from described database, and the information of the domain name corresponding to described policy configuration file example and port, generate corresponding policy configuration file and store.
Fig. 4 shows the structural representation of a kind of policy configuration file treating apparatus in the embodiment of the present invention.Policy configuration file treating apparatus 400 as shown in Figure 4, can comprise cutting unit 401, removal unit 402, generation unit 403 and mapping relations and set up storage unit 404, wherein:
Cutting unit 401, is suitable for that the original strategy configuration file of same type is carried out piecemeal according to field and obtains multiple tactful piecemeal.
Removal unit 402, is suitable for the information of the domain name in described tactful piecemeal and port to remove.
Generation unit 403, is suitable for adopting extensible language to be described the tactful piecemeal removing port and domain-name information and obtains corresponding policy configuration file example.
In concrete enforcement, described extensible language is XML language.
Mapping relations set up storage unit 404, be suitable for setting up policy configuration file example and the corresponding domain name of original strategy configuration file and the mapping relations of port that generate, and storage in a database.
In concrete enforcement, described mapping relations are set up storage unit 404 and are suitable for judging whether to exist in described database the identical policy configuration file example of the policy configuration file example of described generation; When determining to there is the policy configuration file example identical with the policy configuration file example of described generation in described database, then increase port and the mapping relations of domain name with policy configuration file example identical with the policy configuration file example of described generation in described database of the corresponding original strategy configuration file of policy configuration file of described generation in the database; When determining there is not the policy configuration file example identical with the policy configuration file example of described generation in described database, then set up the mapping relations of the policy configuration file example of described generation and the port of corresponding original strategy configuration file and domain name and store in the database.
In concrete enforcement, described mapping relations set up the MD5 value that storage unit 404 is suitable for calculating the policy configuration file example of described generation; The MD5 value of the policy configuration file example stored in the MD5 value of the policy configuration file example of the described generation calculated and described database is compared; When the MD5 value of the policy configuration file example of described generation is identical with the MD5 value of the policy configuration file example stored in described database, then determine to there is the policy configuration file example identical with the policy configuration file example of described generation in described database; When the MD5 value of the policy configuration file example of described generation is all not identical with the MD5 value of the policy configuration file example stored in described database, then determine in described database, to there is not the policy configuration file example identical with described new policy configuration file example.
In concrete enforcement, policy configuration file treating apparatus 400 as shown in Figure 4 can also comprise: adding device 405, wherein:
Adding device 405, be suitable for when described original strategy configuration file increases policy field, adopt described extensible language described policy field to be described, and be added in policy configuration file example corresponding to described original strategy configuration file and obtain new policy configuration file example.
Fig. 5 shows the structural representation of a kind of policy configuration file generation system in the embodiment of the present invention.Policy configuration file generation system as shown in Figure 5, policy configuration file treating apparatus 501, database 502, policy configuration file generation server 503 and multiple node server 504 (illustrate only a node server in figure) can be comprised, wherein:
Described policy configuration file treating apparatus 501, is suitable for generation strategy configuration file example, and the information of the domain name and port of setting up policy configuration file example and the corresponding original strategy configuration file generated also stores in a database.
Described database 502, is suitable for storing the policy configuration file example of described policy configuration file treating apparatus generation and the mapping relations of the corresponding domain name of original strategy configuration file and the information of port.
Described strategy file generation server 503, be suitable for when determining that the strategy configuration of each node server described is identical, by according to the policy configuration file example stored in described database and the corresponding domain name of original strategy configuration file and the information of port, generation strategy configuration file, and be sent to described multiple node server respectively.
Node server 504, is suitable for, when determining that the strategy configuration of each node server described is identical, receiving the policy configuration file of described strategy file generation server generation and storing; When determining that the strategy configuration of each node server described is different, according to node server and the policy configuration file example stored in database and the corresponding domain name of original strategy configuration file and the mapping relations of port, from described database, obtain corresponding policy configuration file example and the corresponding domain name of original strategy configuration file and the information of port, splicing generates corresponding policy configuration file and also stores.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
Done detailed introduction to the method and system of the embodiment of the present invention above, the present invention is not limited to this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.

Claims (11)

1. a policy configuration file disposal route, is characterized in that, comprising:
The original strategy configuration file of same type is carried out piecemeal according to field and obtains multiple tactful piecemeal;
The information of the domain name in described tactful piecemeal and port is removed;
Adopt extensible language to be described the tactful piecemeal removing port and domain-name information and obtain corresponding policy configuration file example;
Set up the policy configuration file example and the corresponding domain name of original strategy configuration file and the mapping relations of port that generate, and store in a database.
2. policy configuration file disposal route according to claim 1, is characterized in that, describedly sets up policy configuration file example and the corresponding domain name of original strategy configuration file and the mapping relations of port that generate, and storage is in a database, comprising:
Judge whether to exist in described database the policy configuration file example that the policy configuration file example of described generation is identical;
When determining to there is identical with the policy configuration file example of described generation policy configuration file example in described database, then increase port and the mapping relations of domain name with policy configuration file example identical with the policy configuration file example of described generation in described database of original strategy configuration file corresponding to the policy configuration file of described generation in the database;
When determining there is not the policy configuration file example identical with the policy configuration file example of described generation in described database, then set up the mapping relations of the policy configuration file example of described generation and the port of corresponding original strategy configuration file and domain name and store in the database.
3. policy configuration file disposal route according to claim 2, is characterized in that, the policy configuration file example that the described policy configuration file example judging whether to exist in described database described generation is identical, comprising:
Calculate the MD5 value of the policy configuration file example of described generation;
The MD5 value of the policy configuration file example stored in the MD5 value of the policy configuration file example of the described generation calculated and described database is compared;
When the MD5 value of the policy configuration file example of described generation is identical with the MD5 value of the policy configuration file example stored in described database, then determine to there is the policy configuration file example identical with the policy configuration file example of described generation in described database;
When the MD5 value of the policy configuration file example of described generation is all not identical with the MD5 value of the policy configuration file example stored in described database, then determine in described database, to there is not the policy configuration file example identical with described new policy configuration file example.
4. policy configuration file disposal route according to claim 1, it is characterized in that, when described original strategy configuration file increases expanding policy field, also comprise: adopt described extensible language described expanding policy field to be described, and be added in policy configuration file example corresponding to described original strategy configuration file and obtain new policy configuration file example.
5. the policy configuration file disposal route according to any one of claim 1-4, is characterized in that, described extensible language is XML language.
6. a policy configuration file treating apparatus, is characterized in that, comprising:
Cutting unit, is suitable for that the original strategy configuration file of same type is carried out piecemeal according to field and obtains multiple tactful piecemeal;
Removal unit, is suitable for the information of the domain name in described tactful piecemeal and port to remove;
Generation unit, is suitable for adopting extensible language to be described the tactful piecemeal removing port and domain-name information and obtains corresponding policy configuration file example;
Mapping relations set up storage unit, be suitable for setting up policy configuration file example and the corresponding domain name of original strategy configuration file and the mapping relations of port that generate, and storage in a database.
7. policy configuration file treating apparatus according to claim 6, is characterized in that, described mapping relations are set up storage unit and are suitable for judging whether to exist in described database the identical policy configuration file example of the policy configuration file example of described generation; When determining to there is the policy configuration file example identical with the policy configuration file example of described generation in described database, then increase port and the mapping relations of domain name with policy configuration file example identical with the policy configuration file example of described generation in described database of the corresponding original strategy configuration file of policy configuration file of described generation in the database; When determining there is not the policy configuration file example identical with the policy configuration file example of described generation in described database, then set up the mapping relations of the policy configuration file example of described generation and the port of corresponding original strategy configuration file and domain name and store in the database.
8. policy configuration file treating apparatus according to claim 6, is characterized in that, described mapping relations set up the MD5 value that storage unit is suitable for calculating the policy configuration file example of described generation; The MD5 value of the policy configuration file example stored in the MD5 value of the policy configuration file example of the described generation calculated and described database is compared; When the MD5 value of the policy configuration file example of described generation is identical with the MD5 value of the policy configuration file example stored in described database, then determine to there is the policy configuration file example identical with the policy configuration file example of described generation in described database; When the MD5 value of the policy configuration file example of described generation is all not identical with the MD5 value of the policy configuration file example stored in described database, then determine in described database, to there is not the policy configuration file example identical with described new policy configuration file example.
9. policy configuration file treating apparatus according to claim 6, it is characterized in that, also comprise: adding device, be suitable for when described original strategy configuration file increases expanding policy field, adopt described extensible language described expanding policy field to be described, and be added in policy configuration file example corresponding to described original strategy configuration file and obtain new policy configuration file example.
10. the policy configuration file treating apparatus according to any one of claim 7-9, is characterized in that, described extensible language is XML language.
11. 1 kinds of policy configuration file generation systems, is characterized in that, comprise policy configuration file generation server and multiple node server, and policy configuration file treating apparatus, wherein:
Described policy configuration file treating apparatus, is suitable for generation strategy configuration file example, and the information of the domain name and port of setting up policy configuration file example and the corresponding original strategy configuration file generated also stores in a database;
Described strategy file generation server, be suitable for when determining that the strategy configuration of each node server described is identical, by according to the policy configuration file example stored in described database and the corresponding domain name of original strategy configuration file and the information of port, generation strategy configuration file, and be sent to described multiple node server respectively;
Each node server, is suitable for, when determining that the strategy configuration of each node server described is identical, receiving the policy configuration file of described strategy file generation server generation and storing; When determining that the strategy configuration of each node server described is different, according to node server and the policy configuration file example stored in database and the corresponding domain name of original strategy configuration file and the mapping relations of port, from described database, obtain corresponding policy configuration file example and the corresponding domain name of original strategy configuration file and the information of port, splicing generates corresponding policy configuration file and also stores.
CN201510461309.5A 2015-07-30 2015-07-30 policy configuration file processing method, device and system Expired - Fee Related CN105069074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510461309.5A CN105069074B (en) 2015-07-30 2015-07-30 policy configuration file processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510461309.5A CN105069074B (en) 2015-07-30 2015-07-30 policy configuration file processing method, device and system

Publications (2)

Publication Number Publication Date
CN105069074A true CN105069074A (en) 2015-11-18
CN105069074B CN105069074B (en) 2018-11-20

Family

ID=54498444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510461309.5A Expired - Fee Related CN105069074B (en) 2015-07-30 2015-07-30 policy configuration file processing method, device and system

Country Status (1)

Country Link
CN (1) CN105069074B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558421A (en) * 2018-10-29 2019-04-02 中国建设银行股份有限公司 Data processing method, system, device and storage medium based on caching
CN109617713A (en) * 2018-11-26 2019-04-12 网宿科技股份有限公司 The implementation method and server of resource dissemination
CN113377352A (en) * 2021-07-05 2021-09-10 重庆市规划和自然资源信息中心 Big data form modeling generation method for government affair business
CN113656098A (en) * 2021-08-13 2021-11-16 上海哔哩哔哩科技有限公司 Configuration acquisition method and system
CN115842803A (en) * 2022-10-27 2023-03-24 新浪技术(中国)有限公司 File processing method, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7240100B1 (en) * 2000-04-14 2007-07-03 Akamai Technologies, Inc. Content delivery network (CDN) content server request handling mechanism with metadata framework support
CN1622095A (en) * 2004-12-27 2005-06-01 中国科学院软件研究所 Method of storing extensible markup language file and inserting relational database sheet
US20110055312A1 (en) * 2009-08-28 2011-03-03 Apple Inc. Chunked downloads over a content delivery network
CN103747047A (en) * 2013-12-24 2014-04-23 乐视网信息技术(北京)股份有限公司 CDN file storage method, file distribution control center and system thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558421A (en) * 2018-10-29 2019-04-02 中国建设银行股份有限公司 Data processing method, system, device and storage medium based on caching
CN109617713A (en) * 2018-11-26 2019-04-12 网宿科技股份有限公司 The implementation method and server of resource dissemination
CN113377352A (en) * 2021-07-05 2021-09-10 重庆市规划和自然资源信息中心 Big data form modeling generation method for government affair business
CN113656098A (en) * 2021-08-13 2021-11-16 上海哔哩哔哩科技有限公司 Configuration acquisition method and system
CN113656098B (en) * 2021-08-13 2024-02-06 上海哔哩哔哩科技有限公司 Configuration acquisition method and system
CN115842803A (en) * 2022-10-27 2023-03-24 新浪技术(中国)有限公司 File processing method, device and system

Also Published As

Publication number Publication date
CN105069074B (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN105069074A (en) Strategy configuration file processing method, device and system
US9448999B2 (en) Method and device to detect similar documents
JP5756386B2 (en) Method, apparatus, and program for supporting generation and management of metadata for correcting problems of dynamic web application
CN103678293B (en) Data storage method and device
CN108932257B (en) Multi-dimensional data query method and device
US8041893B1 (en) System and method for managing large filesystem-based caches
CN106960020B (en) A kind of method and apparatus creating concordance list
US20130185429A1 (en) Processing Store Visiting Data
CN105677904B (en) Small documents storage method and device based on distributed file system
WO2021022875A1 (en) Distributed data storage method and system
KR102061466B1 (en) Conservative garbage collecting and tagged integers for memory management
US20140059094A1 (en) Making use of a file path to determine file locality for applications
CN103077254A (en) Webpage acquiring method and device
CN104320312A (en) Network application safety test tool and fuzz test case generation method and system
CN110134738A (en) Distributed memory system resource predictor method, device
CN110674427A (en) Method, device, equipment and storage medium for responding to webpage access request
CN103093377B (en) A kind of advertisement placement method and system
CN105138675A (en) Database auditing method and device
CN110020272B (en) Caching method and device and computer storage medium
CN111368227A (en) URL processing method and device
CN104503983A (en) Method and device for providing website certification data for search engine
US20180196653A1 (en) Methods for adaptive placement of applications and devices thereof
US8219667B2 (en) Automated identification of computing system resources based on computing resource DNA
Abawajy et al. A framework for scalable distributed provenance storage system
KR101441000B1 (en) A parallel change detection method for triple data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181120

Termination date: 20210730

CF01 Termination of patent right due to non-payment of annual fee