The content of the invention
Based on this, it is necessary to during for the data stored in the file on different web sites being handled, during file process
The problem of code development heavy workload, there is provided a kind of site file processing method, device, site file processing platform and storage are situated between
Matter.
A kind of site file processing method, the described method includes:
The data file of current site is obtained, the data file carries the website logo of current site, data file
Type and the website logo of targeted website;
The corresponding document analysis rule of the current site is obtained according to the website logo of the current site;
The file of the corresponding data file is obtained from the document analysis rule according to the data file class
Resolution rules;
According to data file described in the document analysis rule parsing of the data file;
Data file after parsing is sent to targeted website corresponding with the website logo of the targeted website.
In one of the embodiments, the data file after by parsing is sent to the website logo with the targeted website
Before corresponding targeted website, further include:
When the document analysis for not getting the data file from the corresponding document analysis rule of the current site is advised
When then, then the instruction for increasing the document analysis rule is received;
According to the instruction of the increase document analysis rule, increase document analysis rule corresponding with the data file
Into the corresponding document analysis rule of the current site;
According to increased document analysis rule, the data file is parsed.
In one of the embodiments, the website logo according to the targeted website, by the data after parsing
File is sent to the step of targeted website, including:
The corresponding file encryption rule in the targeted website is obtained according to the targeted website of data file mark;
The encryption of the corresponding data file is obtained from the file encryption rule according to the data file class
Rule;
The data file is encrypted according to the encryption rule of the data file;
Encrypted data file is sent to the corresponding targeted website of website logo of the targeted website.
In one of the embodiments, the website logo that encrypted data file is sent to the targeted website
Before corresponding targeted website, further include:
When the file encryption for not getting the data file from the corresponding file encryption rule in the targeted website is advised
When then, then the instruction of the corresponding file encryption rule in increase targeted website is received;
It is corresponding with the data file according to the instruction of the corresponding file encryption rule in the increase targeted website, increase
File encryption rule into the corresponding file encryption rule in the targeted website;
According to increased file encryption rule, the data file is encrypted.
In one of the embodiments, the document analysis rule according to the data file, parses the data text
After the step of part, further include:
Generation operation log corresponding with the data file, works as according to the name acquiring of the operation log of generation is corresponding
Preceding log folder;
When the number of stored operation log in current log file folder is less than preset value, then by the behaviour of generation
Stored as daily record to the current log file in pressing from both sides;
When the number of stored operation log in current log file folder is equal to preset value, then described work as is obtained
Next log folder of preceding log folder, the operation log of generation is stored into next log folder;
Described in being equal to when the number of the operation log in the log folder for storing the corresponding operation log
During preset value, then the operation log deleted in the date preceding log folder obtains blank log folder;
The operation log of generation is stored into the blank log folder.
A kind of site file processing unit, described device include:
First acquisition module, for obtaining the data file of current site, the data file carries current site
Website logo, data file class and the website logo of targeted website;
Second acquisition module, for obtaining the corresponding file of the current site according to the website logo of the current site
Resolution rules;
3rd acquisition module, for obtaining corresponding institute from the document analysis rule according to the data file class
State the document analysis rule of data file;
First parsing module, for data file described in the document analysis rule parsing according to the data file;Send
Module:For the data file after parsing to be sent to targeted website corresponding with the website logo of the targeted website.
In one of the embodiments, described device further includes:
Receiving module, for the data file ought not got from the corresponding document analysis rule of the current site
Document analysis it is regular when, then receive the instruction of increase document analysis rule;
Increase module, it is corresponding with the data file for the instruction according to the increase document analysis rule, increase
Document analysis rule into the document analysis rule of the current site;
Second parsing module, for according to increased document analysis rule, parsing the data file.
In one of the embodiments, the sending module includes:
First acquisition unit, it is corresponding for obtaining the targeted website according to the targeted website of data file mark
File encryption rule;
Second acquisition unit, for obtaining corresponding institute from the file encryption rule according to the data file class
State the encryption rule of data file;
First encryption unit, is encrypted the data file for the encryption rule according to the data file;
Transmitting element, the corresponding target of website logo for encrypted data file to be sent to the targeted website
Website.
A kind of site file processing platform, including memory, processor and storage are on a memory and can be in processor
The computer program of upper operation, the processor realize the step in the above method when performing described program.
A kind of storage medium, is stored thereon with computer program, which realizes in the above method when being executed by processor
The step of.
Above-mentioned site file processing method, device, site file processing platform and storage medium, by the logarithm of different web sites
It is stored in advance according to the resolution rules of file in file process repository, in the file on parsing some targeted website, then only
Need directly to be identified according to current site and obtain resolution file with data file class so as to be parsed to data file, without
Whole code write according to different websites, greatly reduce exploitation amount, strengthen applicability.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is used only for explaining the present invention, and
It is not used in the restriction present invention.
Describe in detail according to an embodiment of the invention before, it should be noted that, the embodiment described essentially consist in
The combination of site file processing method, device, site file processing platform step and the device assembly related to storage medium.Cause
This, corresponding device component and method and step are showed in position by ordinary symbol in the accompanying drawings, and
The details related with understanding the embodiment of the present invention is merely illustrated, in order to avoid because of the ordinary skill for having benefited from the present invention
Those obvious details have obscured the disclosure for personnel.
Herein, such as left and right, upper and lower, front and rear, first and second etc relational terms are used merely to area
Divide an entity or action and another entity or action, and not necessarily require or imply and is between this entity or action any
Actual this relation or order.Term " comprising ", "comprising" or any other variant are intended to non-exclusive inclusion, by
This make it that including the process of a series of elements, method, article or equipment not only includes these key elements, but also comprising not bright
The other element really listed, or be elements inherent to such a process, method, article, or device.
Fig. 1 is refer to, Fig. 1 is the application scenario diagram of site file processing method in an embodiment, including website text
The Website server of part processing platform, the Website server of current site and targeted website, site file processing platform can divide
Do not realize and communicate with the Website server of current site and the Website server of targeted website, site file processing platform can be from
The Website server of current site receives data file, and data file is parsed, and the data file after parsing is carried out
The Website server of targeted website is sent to after encryption.
Fig. 2 is refer to, in one of the embodiments, there is provided a kind of flow chart of site file processing method, this implementation
Come in the site file processing platform that example is applied in above-mentioned Fig. 1 in this way for example, operation has website text on the platform
Part processing routine, implements site file processing by the site file processing routine.This method comprises the following steps:
S202:The data file of current site is obtained, data file carries the website logo of current site, data file
Type and the website logo of targeted website.
Specifically, data file refers to the file for being used for data storage in website.Different websites can pass through file
Transmission realize the interactions of data, wherein, data can be image data, text data and numerical data etc.;Website logo is
Refer to the mark that this website and other websites can be distinguished, website logo can be the URL (Uniform of website
Resoure Locator, uniform resource locator) address or the title of website etc.;Data file class refers to store
The type of the file of data in website, data file class can be picture/mb-type, text type and numeric type etc..Website text
Part processing platform obtains the data file of storage related data from current site, and the mark of current site is carried in data file
Know, also carry the mark of targeted website, while also carry the particular type of the data of storage hereof.
S204:The corresponding document analysis rule of current site is obtained according to the website logo of current site.
Specifically, document analysis rule refer to when after getting data file, it is necessary to be adopted when being parsed to data file
Uniform rules corresponding with current site, document analysis rule are uniformly stored in file process repository, document analysis
Rule can store private key, can also store corresponding decryption character string, data file is parsed according to private key, or according to storage
Decryption character string is matched, so as to parse data file, and then gets required data.There is correspondence in each different website
This website document analysis rule, the website logo according to entrained by the data file of current site, site file processing is flat
Platform obtains the corresponding document analysis rule of current site from file process repository, for example, can be according to the URL of current site
Address, site file processing platform obtain the corresponding document analysis rule of current site in file process repository.
File process repository refers to the database for the document analysis rule and file encryption rule for being stored with each website, when
During the data file for needing parsing to be obtained from current site, the corresponding text of current site can be obtained from file process repository
Part resolution rules, when needing to data file encryption, can obtain the corresponding text in targeted website from file process repository
Part encryption rule.
S206:The document analysis rule of corresponding data file are obtained from document analysis rule according to data file class
Then.
Specifically, the resolution rules of the file of different types of data are stored in the corresponding document analysis rule of current site,
The corresponding resolution rules of current site are got, can include data file class in the corresponding resolution rules of the current site
Corresponding resolution rules when corresponding resolution rules and numeric type when corresponding resolution rules, text type when being picture/mb-type
Deng, according to the data type included in data file, selection and the corresponding parsing rule of the data type included in data file
Then.
S208:According to the document analysis rule parsing data file of data file.
Specifically, document analysis rule corresponding with data file will be got, website processing platform is to data file
Parsed, obtain the related data of storage in the data file.For example, can be according to the private stored in document analysis rule
Key, according to the public key carried from the data file that current site obtains, parses data file;Can also be according to document analysis
The decryption character string stored in rule, the encrypted characters that will be carried in the decryption character string and the data file of current site acquisition
String is matched, and when successful match, parses data file, obtains the data that data file includes.
S210:Data file after parsing is sent to targeted website corresponding with the website logo of targeted website.
Specifically, will be parsed according to the website logo of the targeted website carried in data file, site file processing platform
Data file afterwards is sent to corresponding targeted website, for example, the URL addresses of targeted website are carried in data file, according to mesh
The URL addresses of website are marked, the data file after parsing will be sent to by corresponding target network according to corresponding document analysis rule
Stand.
In above-described embodiment, the resolution rules of the corresponding data file of different web sites are stored in advance at corresponding file
Manage in repository, when needing to parse the file on some websites, then only need directly according to the website logo and number of current site
The rule of resolution file is obtained according to file type, so as to be parsed to data file, without according to different website volumes
Whole code is write, reduces the exploitation amount of code, so as to strengthen applicability.
In one of the embodiments, reference can be made to Fig. 3, there is provided the flow chart of an increase document analysis rule, increase text
The step of part resolution rules can be that step S210 is carried out before in the embodiment depicted in figure 2, i.e., the data text after by parsing
Part performs after being sent to the step of corresponding targeted website with the website logo of targeted website, increases the step of document analysis rule
Suddenly can include:
S302:When the document analysis rule for not getting data file from the corresponding document analysis rule of current site
When, then receive the instruction of increase document analysis rule.
Specifically, obtained according to the website logo of current site, site file processing platform from file process repository
To the corresponding document analysis rule of current site, according to data file class, not in the corresponding document analysis rule of current site
In get data file document analysis it is regular when, then receive the instruction of increase document analysis rule.For example, from " Netease " phase
The website of pass such as gets corresponding data file on " Netease's mailbox ", includes lteral data in the data file, the website
The URL addresses of website " Netease's mailbox " are carried in the data file of " Netease's mailbox ", according to the URL addresses of " Netease's mailbox ",
" Netease's mailbox " corresponding document analysis rule is got, if not getting number in resolution rules corresponding with " Netease's mailbox "
When being the resolution rules of the data file of literal type according to file type, then data text of the addition parsing comprising lteral data is received
The instruction of the resolution rules of part.
S304:According to the instruction of increase document analysis rule, increase and the corresponding document analysis rule of data file are extremely
In the corresponding document analysis rule of current site.
Specifically, site file processing platform, will be with data file according to the instruction of the increase document analysis rule of reception
In the corresponding document analysis rule of current site that corresponding document analysis rule increases to acquisition.For example, work as site file
Processing platform does not get the data file that data file class is literal type from the corresponding resolution rules of current site
During resolution rules, then the interface display prompt message of site file processing platform, user can be according to prompt message input datas
File type is the resolution rules of the data file of literal type, or the data file class is the data of literal type
File chooses existing corresponding resolution rules, is submitted after the completion of user inputs and completes or choose, site file processing
Platform increases the instruction of document analysis rule according to the submission operation generation of user, according to the finger of the increase document analysis rule
Order, obtains resolution rules input by user or the corresponding resolution rules of selection, and site file processing platform will parse data text
Part type is that the document analysis rule of the data file of literal type increases to the corresponding document analysis rule of corresponding current site
In, it can will such as parse data file class and be added to the corresponding file in website " Netease " for the document analysis rule of literal type
In resolution rules.
S306:According to increased document analysis rule, data file is parsed.
Specifically, site file processing platform gets the file increased in the corresponding document analysis rule of current site
Resolution rules, according to increased document analysis rule, data file is parsed.For example, according to instruction, by website " Netease
Data file class is parsed on mailbox " increases to " Netease's mailbox " corresponding document analysis for the document analysis rule of literal type
In rule, then according to increased document analysis rule, parsing data file class is the data file of the data of literal type.
In above-described embodiment, when during data file is parsed, not getting corresponding document analysis rule, then may be used
To receive the instruction of this document resolution rules of increase missing, and this document resolution rules of missing are increased to and current site
In corresponding document analysis rule, it need to only increase corresponding document analysis rule according to instruction, without changing whole code
The accurately document analysis rule of addition missing, it is simple and practicable, improve work efficiency.
In one of the embodiments, reference can be made to Fig. 4, there is provided the flow chart of step S210, step in embodiment illustrated in fig. 2
S210, i.e., according to the website logo of targeted website, the step of data file after parsing is sent to targeted website, including:
S402:Identified according to the targeted website of data file and obtain the corresponding file encryption rule in targeted website.
Specifically, file encryption rule refers to after being parsed to data file, by data file and included in data
Data sending in file to before targeted website, it is necessary to using targeted website corresponding unified encryption rule to being parsed
Data file is encrypted, and file encryption rule is uniformly stored in file process repository, and file encryption rule can store
Public key, can also store corresponding encrypted characters string, and data file is encrypted according to public key, be needed when parsing data file
Decrypted, the data file after parsing can also be encrypted according to encrypted characters string with corresponding private key.Each different net
Standing has the file encryption rule of this corresponding website, and site file processing platform is according to the targeted website carried in data file
Website logo, obtain targeted website corresponding file encryption rule from file process repository, targeted website mark can be with
It is the URL addresses of targeted website or title of targeted website etc., for example, targeted website is " Tencent " relevant website,
Such as " Tencent's news ", then according to the URL addresses of website " Tencent's news ", it is right that " Tencent's news " is obtained from file process repository
The file encryption rule answered.
S404:The encryption rule of corresponding data file is obtained from file encryption rule according to data file class.
Specifically, the encryption rule of the file of different types of data is stored in the corresponding file encryption rule in targeted website,
Site file processing platform gets the corresponding encryption rule in targeted website, can be wrapped in the corresponding encryption rule in the targeted website
The corresponding encryption rule of image data, the corresponding encryption rule of text data and the corresponding encryption rule of numerical data etc. have been included,
According to the data type included in data file, the corresponding encryption rule of data type with being included in data file is chosen.
S406:Data file is encrypted according to the encryption rule of data file.
Specifically, site file processing platform will get file encryption rule corresponding with data file to data text
Part is encrypted.For example, data file can be encrypted according to the public key stored in file encryption rule, parsing data text
Need to be decrypted with corresponding private key during part, data file can also be encrypted according to encrypted characters string, when decryption needs to use
Matched according to decryption character string with encrypted characters string and be decrypted.
S408:Encrypted data file is sent to the corresponding targeted website of website logo of targeted website.
Specifically, according to the website logo of the targeted website carried in data file, encrypted data file is sent
To corresponding targeted website.For example, encrypted data file is sent to targeted website " Tencent's news ", then according to " Tencent
The URL addresses of news ", " Tencent's news " website is sent to by encrypted data file.
In above-described embodiment, the encryption rule of the corresponding data file of different web sites is stored in advance at corresponding file
Manage in repository, when needing the file after parsing being sent to targeted website, then only need directly to identify number according to targeted website
The rule of encryption file is obtained according to file type, it is not necessary to whole code is write according to different targeted websites, reduces code
Exploitation amount, so as to strengthen applicability, and sending data file to before targeted website, data file be encrypted, is protected
Demonstrate,prove the security of transmitting data file.
In one of the embodiments, reference can be made to Fig. 5, there is provided the flow chart of an increase file encryption rule, increase text
Part encryption rule can be that step S408 is carried out before in the embodiment shown in fig. 4, i.e., sent by encrypted data file
Performed before the corresponding targeted website of website logo to targeted website, the step of increase file encryption rule can include:
S502:When the file encryption rule for not getting data file from the corresponding file encryption rule in targeted website
When, then receive the instruction of the file encryption rule of increase targeted website.
Specifically, obtained according to the website logo of targeted website, site file processing platform from file process repository
To the corresponding file encryption rule in targeted website, according to data file class, not in the corresponding file encryption rule in targeted website
In get data file file encryption it is regular when, then receive the instruction of increase file encryption rule.For example, it is desired to it will include
The data file for having image data is sent to targeted website " Tencent's news " after encrypting, and includes in the data file of image data
The URL addresses of website " Tencent's news " are carried, according to the URL addresses of website " Tencent's news ", it is right to get " Tencent's news "
The file encryption rule answered, if not getting the number that encryption includes image data in encryption rule corresponding with " Tencent's news "
According to file encryption rule when, then receive addition encryption comprising image data data file encryption rule instruction.
S504:It is corresponding with data file according to the instruction of the corresponding file encryption rule in increase targeted website, increase
File encryption rule is into the corresponding file encryption rule in targeted website.
Specifically, site file processing platform, will be with data file according to the instruction of the increase file encryption rule of reception
In the corresponding file encryption rule in targeted website that corresponding file encryption rule increases to acquisition.For example, work as site file
When processing platform does not get the encryption rule of the data file comprising image data from the corresponding encryption rule in targeted website,
The then interface display prompt message of site file processing platform, user can input the number for including image data according to prompt message
According to the encryption rule of file, or the data file that should include image data chooses existing corresponding encryption rule, when
User, which inputs, to complete or is submitted after the completion of choosing, and site file processing platform operates generation increase text according to the submission of user
The instruction of part encryption rule, according to the instruction of the increase file encryption rule, obtains encryption rule input by user or selection
The rule for encrypting the data file comprising image data is increased to corresponding mesh by corresponding encryption rule, site file processing platform
Mark in the corresponding file encryption rule in website, such as can add the file encryption rule that encrypt the data file comprising image data
It is added in the corresponding file encryption rule in " Tencent's news " website.
S506:According to increased file encryption rule, data file is encrypted.
Specifically, site file processing platform gets the file increased in the corresponding file encryption rule in targeted website
Encryption rule, according to increased file encryption rule, data file is encrypted.For example, according to instruction, it would be desirable to be sent to
The encryption rule of the data file comprising image data of website " Tencent's news " increases to " Tencent's news " corresponding encryption rule
In then, then according to the encryption rule of increased data file of the encryption comprising image data, by the data text comprising lteral data
Part is encrypted.
In above-described embodiment, when during data file encryption, not getting corresponding file encryption rule, then
Corresponding this document encryption rule can be increased to and targeted website pair according to the instruction for increasing corresponding file encryption rule
In the file encryption rule answered, it need to only increase corresponding file encryption rule according to instruction, can add without changing whole code
Add the file encryption rule of missing, change is convenient, simple and practicable, improves work efficiency.
In one of the embodiments, reference can be made to Fig. 6, there is provided the flow chart of a log processing, the step of the log processing
Can be carried out after embodiment illustrated in fig. 2 step S208, i.e., in the document analysis rule according to data file, parse data
The step of execution after the step of file, log processing, can include:
S602:Generation operation log corresponding with data file, it is corresponding according to the name acquiring of the operation log of generation
Current log file presss from both sides.
Specifically, operation log refers to during data file is handled, the record of the processing data file of generation, should
Record can include the size of data file, the port address of downloading data file and obtain record of document analysis rule etc.,
After parsing data file, according to the operation of parsing data file, operation log corresponding with data file can be generated to remember
The process of resolution file is recorded, can be stored in per generic operation daily record in corresponding current log file folder, can be according to operation day
The title of will is stored in corresponding current log file folder, such as can be generated during data file is parsed and " be obtained text
The operation log of part resolution rules ", then be stored in current " acquisition file by the operation log that " should obtain document analysis rule "
In the log folder of resolution rules ".
S604:When the number of stored operation log in current log file folder is less than preset value, then by generation
Operation log is stored into current log file folder.
Specifically, the preset value of storage operation log number is both provided with to each log folder, when in current day
When the number of stored operation log is less than preset value in will file, then the operation log of generation is continued to be stored in current
In log folder.For example, storage is set " to obtain the log folder of the operation log of storage " obtaining document analysis rule "
The number of the operation log of document analysis rule " is 100, when the number of the operation log of current " obtaining document analysis rule "
During less than preset value 100, then the operation log of " obtaining document analysis rule " is continued to be stored in current log file folder.
It should be noted that the number of log folder storage operation log can also be 110,160,200 etc..
S606:When the number of stored operation log in current log file folder is equal to preset value, then obtain current
Next log folder of log folder, the operation log of generation is stored into next log folder.
Specifically, when during resolution file, every generic operation daily record of generation is stored in corresponding current log text
In part folder, when the number of the operation log of current log file storage is equal to preset value, then it is assumed that in current log file folder
Storage is full, then gets the next log folder for storing similar operation log, then will be generated in follow-up resolving
Operation log be stored in next log folder.For example, to the operation log of storage " obtain document analysis rule "
It is 100 that log folder, which sets the number of the operation log of storage " obtaining document analysis rule ", and " file solution is obtained when current
When the number of the operation log of analysis rule " is equal to 100, then the journal file of next storage " obtaining document analysis rule " is obtained
Folder, and the operation log storage of " obtaining document analysis rule " for being generated in follow-up resolving " is obtained into file to next
In the log folder of resolution rules ".
S608:When the number of the operation log in the log folder for storing corresponding operation log is equal to preset value
When, then the operation log deleted in date preceding log folder obtains blank log folder.
Specifically, storage has default number of folders per the log folder of a kind of operation log, when storage pair
When the number of operation log in each log folder for the operation log answered is equal to preset value, then it is assumed that storage is corresponding
Amount of storage in each log folder of operation log is full, then will be according to the date, by date preceding log folder
The operation log of storage is deleted, and then obtains the log folder of corresponding blank.For example, being provided with 20 storages " obtains text
The log folder of the operation log of part resolution rules ", 100 can be stored in each log folder and " obtains document analysis
The operation log of rule ", as the behaviour of " the obtaining document analysis rule " of each log folder storage in 20 log folders
When the number for making daily record is all 100, then by the operation day of " obtaining document analysis rule " in date preceding log folder
Will is deleted.It should be noted that the number of log folder can also be 22,25,30,38 etc..
S610:The operation log of generation is stored into blank log folder.
Specifically, after the log folder for obtaining blank, the operation log for the resolution file being subsequently generated, respective stored exists
In the blank log folder of corresponding title.For example, according to the date, the operation log that " will obtain document analysis rule " is from correspondence
Log folder in delete after, then obtain the journal file of the operation log of the storing of blank " obtaining document analysis rule "
Folder, the operation log of " obtaining document analysis rule " for being subsequently generated can be deposited into " the acquisition document analysis of corresponding blank
In the log folder of rule ".
In above-described embodiment, the operation log of data file is parsed, the process of parsing data file can be recorded, if solution
Analysis data file process goes wrong, and goes wrong during can getting parsing data file by inquiry operation daily record
Link, it is directly perceived accurate, reduce O&M cost;When being stored in current log file folder completely, corresponding operation log can be certainly
Dynamic storage reduces manual operation into next log folder, saves the working time;And all storage corresponding class operation days
When the log folder storage of will is expired, date preceding operation log can be automatically deleted, it is simple and practicable, save memory space.
In one of the embodiments, reference can be made to Fig. 7, there is provided the flow of site file processing method in another embodiment
Figure.The present embodiment is applied to site file processing system to illustrate in this way.
Specifically, first, site file processing system gets the data file that need to be parsed from current site, this needs to parse
Data file carry the website logo of current site, the URL addresses of such as current site or the title of current site, this is needed
The data file of parsing also carries data file class, such as comprising lteral data, image data or numerical data, then data
The corresponding data file class of file is for literal type, picture/mb-type or numeric type etc., while the data file that need to parse
The website logo of targeted website is also carried, such as the URL addresses of targeted website or the title of targeted website, according to the number that need to be parsed
The corresponding document analysis of current site is obtained from file process repository according to the website logo of the current site carried on file
Rule, and according to the type for the data file that need to be parsed, being obtained from the corresponding document analysis rule of current site needs to parse
Data file corresponding document analysis rule, if getting the corresponding document analysis rule of the data file that need to be parsed, root
According to corresponding document analysis rule parsing data file;If the corresponding document analysis rule of the data file that need to be parsed are not got
Then, then the instruction of increase this document resolution rules is received, will be with the data file according to the instruction of increase this document resolution rules
Corresponding document analysis rule is added in the corresponding document analysis rule of current site, regular according to increased document analysis,
The data file is parsed.
Then, after data file is parsed, the mark of the targeted website carried according to data file, at file
Manage and the corresponding file encryption rule in targeted website is obtained in repository, according to the type of data file, from the target network got
The corresponding file encryption rule of data file is obtained in corresponding file encryption rule of standing, if getting the corresponding text of data file
Part encryption rule, then be encrypted data file according to corresponding file encryption rule;Corresponded to if data file is got
File encryption rule, then receive increase the data file file encryption rule instruction, according to increase this document encryption advise
Instruction then, file encryption rule corresponding with data file is added in the corresponding document analysis rule in targeted website, root
According to increased file encryption rule, which is encrypted.
Finally, the data file after the parsing that will encrypt completion is sent to target corresponding with the website logo of targeted website
Website.
In above-described embodiment, the resolution rules of the corresponding data file of different web sites are stored in advance in phase with encryption rule
In the file process repository answered, when the file for needing to parse or encrypting on some websites, then it need to only be directly obtained corresponding
Document analysis rule with file encryption rule, so as to be parsed and be encrypted to data file, without according to different websites
Whole code is write, reduces the exploitation amount of code;Also, when data file document analysis rule or file encryption rule not
It is stored in file process repository in the corresponding file process rule in related website, then only needing directly to be added to the rule has
Close in the corresponding file process rule in website, it is not necessary to change whole code, O&M is simple, saves the working time;After parsing
Data file be sent to before targeted website, the data file after parsing is encrypted using file encryption rule, ensure
Information security.
In one of the embodiments, Fig. 8 is referred to, there is provided the structure diagram of a site file processing unit, website
Document handling apparatus 800 includes:
First acquisition module 810, for obtaining the data file of current site, data file carries the net of current site
Station identifications, data file class and the website logo of targeted website.
Second acquisition module 820, for obtaining the corresponding document analysis of current site according to the website logo of current site
Rule.
3rd acquisition module 830, for obtaining corresponding data text from document analysis rule according to data file class
The document analysis rule of part.
First parsing module 840, for the document analysis rule parsing data file according to data file.
Sending module 850, for the data file after parsing to be sent to mesh corresponding with the website logo of targeted website
Mark website.
In one of the embodiments, site file processing unit 800 can also include:
Receiving module, for ought not get the file solution of data file from the corresponding document analysis rule of current site
During analysis rule, then the instruction of increase document analysis rule is received.
Increase module, for the instruction according to increase document analysis rule, increase and the corresponding file solution of data file
Analysis rule is into the corresponding document analysis rule of current site.
Second parsing module:For according to increased document analysis rule, parsing data file.
In one of the embodiments, sending module 850 can include:
First acquisition unit, the corresponding file encryption in targeted website is obtained for being identified according to the targeted website of data file
Rule.
Second acquisition unit, for obtaining corresponding data file from file encryption rule according to data file class
Encryption rule.
First encryption unit, is encrypted data file for the encryption rule according to data file.
Transmitting element, the corresponding target network of website logo for encrypted data file to be sent to targeted website
Stand.
In one of the embodiments, sending module 850 can also include:
Receiving unit, the file for ought not get data file from the corresponding file encryption rule in targeted website add
During close rule, then the instruction of the corresponding file encryption rule in increase targeted website is received.
Adding unit, for the instruction according to the corresponding file encryption rule in increase targeted website, increase and data file
Corresponding file encryption rule is into the corresponding file encryption rule in targeted website.
Second encryption unit, for according to increased file encryption rule, data file to be encrypted.
In one of the embodiments, site file processing module can also include:
Operation log generation module, for generating operation log corresponding with data file, according to the operation log of generation
Name acquiring corresponding current log file folder.
First operation log memory module, the number for stored operation log in being pressed from both sides when current log file are less than
During preset value, then the operation log of generation is stored to current log file in pressing from both sides.
Log folder acquisition module, the number for stored operation log in being pressed from both sides when current log file are equal to pre-
If during value, then obtaining next log folder of current log file folder, the operation log of generation is stored to next daily record text
In part folder.
Operation log removing module, for as of the operation log in the log folder for storing corresponding operation log
When number is equal to preset value, then the operation log deleted in date preceding log folder obtains blank log folder.
Second operation log memory module, for storing the operation log of generation into blank log folder.
Above-mentioned specific limit on site file processing unit may refer to above in connection with site file processing method
Restriction, details are not described herein.
In one of the embodiments, it refer to Fig. 9, there is provided one performs the site file processing platform of site file processing
Structure diagram, which can be conventional terminal or other any suitable computer equipments, including
Memory, processor, operating system, database and storage are on a memory and at the site file that can run on a processor
Program is managed, wherein memory can include built-in storage, and processor realizes following steps when performing site file processing routine:Obtain
The data file of current site is taken, data file carries the website logo, data file class and target network of current site
The website logo stood.The corresponding document analysis rule of current site is obtained according to the website logo of current site.According to data text
Part type obtains the document analysis rule of corresponding data file from document analysis rule.According to the document analysis of data file
Rule parsing data file.Data file after parsing is sent to targeted website corresponding with the website logo of targeted website.
In one of the embodiments, following steps are also realized during processor executive program:When not from current site correspondence
Document analysis rule in get data file document analysis it is regular when, then receive the instruction of increase document analysis rule.
It is corresponding to current site with the corresponding document analysis rule of data file according to the instruction of increase document analysis rule, increase
In document analysis rule.According to increased document analysis rule, data file is parsed.
In one of the embodiments, following steps are also realized during processor executive program:According to the target of data file
Website logo obtains the corresponding file encryption rule in targeted website.Obtained according to data file class from file encryption rule pair
The encryption rule for the data file answered.Data file is encrypted according to the encryption rule of data file.By encrypted number
The corresponding targeted website of website logo of targeted website is sent to according to file.
In one of the embodiments, following steps are also realized during processor executive program:When not from targeted website correspondence
File encryption rule in get data file file encryption it is regular when, then receive the corresponding file in increase targeted website and add
Close regular instruction.It is corresponding with data file according to the instruction of the corresponding file encryption rule in increase targeted website, increase
File encryption rule is into the corresponding file encryption rule in targeted website.According to increased file encryption rule, to data file
It is encrypted.
In one of the embodiments, following steps are also realized during processor executive program:Generation is corresponding with data file
Operation log, pressed from both sides according to the corresponding current log file of the name acquiring of the operation log of generation.When current log file presss from both sides
In the number of stored operation log when being less than preset value, then the operation log of generation is stored to current log file and pressed from both sides
In.When the number of stored operation log in current log file folder is equal to preset value, then current log file folder is obtained
Next log folder, the operation log of generation is stored into next log folder.When the corresponding operation log of storage
Log folder in the number of operation log when being equal to preset value, then delete the behaviour in date preceding log folder
Blank log folder is obtained as daily record.The operation log of generation is stored into blank log folder.
Above-mentioned specific limit on site file processing platform may refer to above in connection with site file processing method
Restriction, details are not described herein.
In one embodiment, there is provided a kind of storage medium, is stored thereon with computer program, which is held by processor
Following steps are realized during row:The data file of current site is obtained, data file carries the website logo of current site, data
File type and the website logo of targeted website.The corresponding file solution of current site is obtained according to the website logo of current site
Analysis rule.The document analysis rule of corresponding data file is obtained from document analysis rule according to data file class.According to
The document analysis rule parsing data file of data file.Data file after parsing is sent to and is marked with the website of targeted website
Know corresponding targeted website.
In one of the embodiments, following steps can also be realized when which is executed by processor:When not from current
When the document analysis rule of data file is got in the corresponding document analysis rule in website, then increase document analysis rule is received
Instruction.According to the instruction of increase document analysis rule, increase and the corresponding document analysis rule of data file to current net
In corresponding document analysis rule of standing.According to increased document analysis rule, data file is parsed.
In one of the embodiments, following steps can also be realized when which is executed by processor:According to data text
The targeted website mark of part obtains the corresponding file encryption rule in targeted website.It is regular from file encryption according to data file class
The middle encryption rule for obtaining corresponding data file.Data file is encrypted according to the encryption rule of data file.It will add
Data file after close is sent to the corresponding targeted website of website logo of targeted website.
In one of the embodiments, following steps can also be realized when which is executed by processor:When not from target
When the file encryption rule of data file is got in the corresponding file encryption rule in website, then receive increase targeted website and correspond to
File encryption rule instruction.According to the instruction of the corresponding file encryption rule in increase targeted website, increase and data file
Corresponding file encryption rule is into the corresponding file encryption rule in targeted website.It is right according to increased file encryption rule
Data file is encrypted.
In one of the embodiments, following steps can also be realized when which is executed by processor:Generation and data
The corresponding operation log of file, is pressed from both sides according to the corresponding current log file of the name acquiring of the operation log of generation.When working as the day before yesterday
When the number of stored operation log is less than preset value in will file, then the operation log of generation is stored to current log
In file.When the number of stored operation log in current log file folder is equal to preset value, then current log is obtained
Next log folder of file, the operation log of generation is stored into next log folder.As the corresponding behaviour of storage
When making the number of the operation log in the log folder of daily record and being equal to preset value, then date preceding log folder is deleted
In operation log obtain blank log folder.The operation log of generation is stored into blank log folder.
It is above-mentioned to limit the restriction that may refer to above in connection with site file processing method on the specific of storage medium,
This is repeated no more.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The program for instructing relevant hardware to complete by computer program can be stored in a non-volatile computer and storage can be read
In medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, it is computer-readable to deposit
Storage media can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Each technical characteristic of above example can be combined arbitrarily, to make description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, lance is not present in the combination of these technical characteristics
Shield, is all considered to be the scope of this specification record.
Above example only expresses the several embodiments of the present invention, its description is more specific and detailed, but can not
Therefore it is construed as limiting the scope of the patent.It should be pointed out that for those of ordinary skill in the art,
On the premise of not departing from present inventive concept, various modifications and improvements can be made, these belong to protection scope of the present invention.
Therefore, the protection domain of patent of the present invention should be determined by the appended claims.