Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing in accompanying drawingThe exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should not be byEmbodiments set forth here is limited.On the contrary, there is provided these embodiments are able to be best understood from thisIt is open, and the scope of the present disclosure complete can be conveyed to those skilled in the art.
For making the advantage of technical solution of the present invention clearer, with reference to the accompanying drawings and examples to present invention workDescribe in detail.
A kind of output intent of journal file is embodiments provided, methods described is applied to server end,As shown in figure 1, methods described includes:
101st, the first journal file and daily record corresponding with first journal file that client sends are receivedContent type information.
Wherein, first journal file is the original journal file that client sends, and described firstJournal format in journal file can be according to the definition of system journal field standard.The first daily record textThe corresponding log content classification information of part is used for the journal format of the new journal file that definition will be generated, instituteState the log field that log content classification information is specifically as follows included in the first journal file, the daily recordOne or more described log fields can be included in classification information.For example, have in log content classification informationBody can be comprising field informations such as access time, access IP, return code, Client Agent marks.At thisIn bright embodiment, the particular content of the log content classification information can be carried out according to the actual demand of userArrange, it is also possible to configured by system default, the embodiment of the present invention is not specifically limited.
For the embodiment of the present invention, as shown in fig. 7, for the first journal file and with first daily record textThe corresponding log content classification information of part specifically can arrange interface by journal format and be configured.In daily recordForm is arranged in interface, and log content classification information can be configured by way of checking box, exampleSuch as, if user includes access time and accesses two contents of IP in needing to obtain the journal file for generating,Access time can be chosen in journal format arranges interface and accesses two check boxes of IP.And for described firstThe selection of journal file, the text selecting frame that can be arranged in the middle of interface by journal format are configured.NeedIt is noted that concrete for the first file and content type information corresponding with first journal fileConfiguration mode, the embodiment of the present invention are not specifically limited.
102nd, obtain the content type in the log content classification information.
Wherein, a content type, the content type tool are at least included in the log content classification informationBody can be the log field in the first journal file.For example, the log content classification information is:AccessTime, access IP, return code, then according to the log content classification information, from log content classification informationIn the content type that gets be respectively:Access time, access IP and return code.That is above three content classThe access time log field in the first journal file is not represented respectively, access IP log fields and return code dayWill field.
103rd, according to default log field sequence, the content type is ranked up.
Wherein, the default log field sequence can be configured according to the actual demand of user, it is also possible toIt is configured according to standard logs field sequence, can be to be configured by system default, the embodiment of the present invention is not doneIt is concrete to limit.For example, according to the content type of log content classification information acquisition it is:Access IP, visitTime, return code is asked, default log field sequence is set to by user:The sorting position of access time is theString, the sorting position of access IP are secondary series, the sorting position of return code is the 3rd row, then according to userThe default log field sequence for arranging, the content type after sequence is:Access time, access IP, return code.
For the embodiment of the present invention, it is ranked up according to content type described in default log field sequence pair, canSo that the content in the second journal file being subsequently generated is arranged according to advance default log field sequenceRow, check the demand of the second journal file, and then improve Consumer's Experience such that it is able to meet different user.
104th, each content type after sorting is extracted successively from first journal file distinguish correspondingLog information.
For example, each content type order after sequence is:Access time, access IP, return code, then it is firstLog information for access time of log field is extracted from first journal file first, then from describedIt is the log information for accessing IP to extract log field in first journal file, finally from first journal fileThe middle log information for extracting log field for return code.For the embodiment of the present invention, from first daily record textExtract each content type after sequence in part successively and distinguish corresponding log information, then basis is extracted successivelyLog information generate the second journal file, the demand that different user checks the second journal file can be met,And then improve Consumer's Experience.
105th, the log information for being extracted according to successively generates the second journal file.
Wherein, second journal file is for being exported in the client.The second daily record textPart is the journal file of the specific format for needing to generate, and the content in second journal file is basisWhat the content in the first journal file was generated.For example, according to the content type for obtaining successively from the first daily record textThe log information extracted in part is:Request time, conditional code, user browser, transmission byte number, thenAbove-mentioned log information according to extracting successively generates the second journal file.
Further, after the second journal file is generated, can also be to the content in second journal fileCounted, for the particular content of statistics, can be configured according to the actual demand of user, it is also possible toConfigured by system default, the embodiment of the present invention is not specifically limited.For example, the second journal file can be countedThe total number of the data of middle record, Deviant Behavior total number, sum of access IP etc..
It should be noted that second journal file specifically can with output display client screen interfaceOn, and the form of second journal file is exported, the second daily record specifically can be exported by way of textFile, the second journal file can also be exported by way of picture, can be exported again by way of formSecond journal file, the embodiment of the present invention are not specifically limited.
For the embodiment of the present invention, receive first the first journal file that client sends and with described first dayThe corresponding log content classification information of will file, then obtains the content class in the log content classification informationNot, further according to default log field sequence, the content type is ranked up, from first daily record textExtract each content type after sequence in part successively and distinguish corresponding log information, finally according to it is described successivelyThe log information of extraction generates the second journal file, and second journal file is for entering in the clientRow output.So as in the case where text-processing order need not be manually entered, you can complete to journal fileScreening output, and then improve the efficiency of the screening output of journal file.
A kind of output intent of journal file provided in an embodiment of the present invention, receive that client sends first theOne journal file and log content classification information corresponding with first journal file, then obtain the dayContent type in will content type information, further according to default log field sequence, enters to the content typeRow sequence, extracts each content type after sequence from first journal file successively and distinguishes corresponding dayWill information, generates the second journal file, second daily record finally according to the log information for extracting successivelyFile is for being exported in the client.With at present by way of being manually entered text-processing orderTo WEB access logs carry out screen output compare, the first journal file that the embodiment of the present invention is received first andLog content classification information corresponding with first journal file, then according to default log field sequence pairContent type in log content classification information is ranked up, finally according to from first journal file according toSecondary each content type extracted after sorting distinguishes corresponding log information, generates the second journal file, and willThe second journal file output, is manually entered Text Command acquisition particular log formatted file so as to instead ofMode, and then improve the screening delivery efficiency of journal file.
Further, the output intent of another kind of journal file is embodiments provided, methods described shouldFor server end, as shown in Fig. 2 methods described includes:
201st, receive in the first journal file and daily record corresponding with first journal file that client sendsHold classification information.
Wherein, first journal file is the original journal file that client sends, and described firstJournal format in journal file can be according to the definition of system journal field standard.The first daily record textThe corresponding log content classification information of part is used for the journal format of the new journal file that definition will be generated, instituteState the log field that log content classification information is specifically as follows included in the first journal file, the daily recordOne or more described log fields can be included in classification information.For example, have in log content classification informationBody can be comprising field informations such as access time, access IP, return code, Client Agent marks.At thisIn bright embodiment, the particular content of the log content classification information can be carried out according to the actual demand of userArrange, it is also possible to configured by system default, the embodiment of the present invention is not specifically limited.
For the embodiment of the present invention, as shown in fig. 7, for the first journal file and with first daily record textThe corresponding log content classification information of part specifically can arrange interface by journal format and be configured.In daily recordForm is arranged in interface, and log content classification information can be configured by way of checking box, exampleSuch as, if user includes access time and accesses two contents of IP in needing to obtain the journal file for generating,Access time can be chosen in journal format arranges interface and accesses two check boxes of IP.And for described firstThe selection of journal file, the text selecting frame that can be arranged in the middle of interface by journal format are configured.NeedIt is noted that concrete for the first file and content type information corresponding with first journal fileConfiguration mode, the embodiment of the present invention are not specifically limited.
202nd, obtain the content type in the log content classification information.
Wherein, a content type, the content type tool are at least included in the log content classification informationBody can be the log field in the first journal file.For example, the log content classification information is:AccessTime, access IP, return code, then according to the log content classification information, from log content classification informationIn get three content types and be respectively:Access time, access IP and return code.That is above three contentClassification represents access time log field in the first journal file respectively, accesses IP log fields and return codeLog field.
203rd, according to standard logs field sequence, the content type is ranked up.
Wherein, the standard logs order of the field is the sequence of positions of log field in raw log files.ExampleSuch as, the content type for obtaining from log content classification information is:Access time, access IP, return code,Standard logs order of the field is:Log field is that first row, log field are for the sequence of positions of access timeIt is the 3rd row, daily record for the sequence of positions of return code that the sequence of positions of response time is secondary series, log fieldIt is the 4th row that field is the sequence of positions of access IP.Then according to standard logs order of the field, to the above classOther order is ranked up, and the content type after sequence is:Access time, return code, access IP.At thisIn inventive embodiments, the content type is ranked up according to standard logs field sequence and can meet userDemand is checked to original log order, so as to without the need for the sequence in the journal file that extra definition is generatedRule, and then improve Consumer's Experience.
204th, each content type after sorting is extracted successively from first journal file distinguish corresponding positionPut identification information.
Wherein, the station location marker information is used for representing that each content type divides in first journal fileNot other corresponding index position mark, the index position mark specifically can with numeral, character or data withThe combination of character is indicated, and such as can be carried out using the combination { 1,2,3,4 } of character string and numerical valueRepresent, it is also possible to use alphabetical { A, B, C, C } and be indicated, the embodiment of the present invention is not specifically limited.NeedIt is noted that the content type in the log content classification information is the daily record word in the first journal fileSection, in journal file a log field one station location marker information of correspondence.
For example, each content type after sequence is specially:Access time, access IP, then from described firstLog field is obtained in journal file to be identified for access time, the corresponding index positions of access IP, in this example,The access time and access positional informationes of the IP in the first journal file are specifically as follows { $ 1, $ 3 }.
205th, extract daily record corresponding with the station location marker information difference from first journal file to believeBreath.
In embodiments of the present invention, each content class after extraction is sorted successively from first journal fileAfter corresponding station location marker information, then Fen Bie not extract from first journal file and position markThe corresponding log information of knowledge information.For example, the station location marker information of extraction is { $ 1, $ 3 }, then from described theIt is the corresponding log information of { $ 1, $ 3 } difference to extract in one journal file with the station location marker information, i.e., fromIt is { $ 1, $ 3 } corresponding data row to extract in first journal file with station location marker information.
206th, the log information for being extracted according to successively generates the second journal file.
Wherein, second journal file is for being exported in the client.The second daily record textPart is the journal file of the specific format for needing to generate, and the content in second journal file is basisWhat the content in the first journal file was generated.
Further, after the second journal file is generated, can also be to the content in second journal fileCounted, for the particular content of statistics, can be configured according to the actual demand of user, it is also possible toConfigured by system default, the embodiment of the present invention is not specifically limited.For example, the second journal file can be countedThe total number of the data of middle record, Deviant Behavior total number, sum of access IP etc..
It should be noted that second journal file specifically can with output display client screen interfaceOn, and the form of second journal file is exported, the second daily record specifically can be exported by way of textFile, the second journal file can also be exported by way of picture, can be exported again by way of formSecond journal file, the embodiment of the present invention are not specifically limited.
For the embodiment of the present invention, methods described also includes:Second journal file is saved as into txt formsFile so that the second journal file described in the client downloads.It should be noted that the txt for preservingThe file of form is consistent with the content shown in client.In embodiments of the present invention, by second daily recordFile saves as the file of txt forms, and user can be easy to locally to achieve second file.
For the embodiment of the present invention, adaptable scene with as described below, but can be not limited only to this, including:Receive the first journal file and log content classification corresponding with first journal file letter that client sendsBreath, the content type obtained from the log content classification information are specially:Access time and access IP,Then according to standard logs field sequence, the content type is ranked up, if in standard logs field sequenceBefore in row, the position of access IP comes the position of access time, then carried from first journal file successivelyTake access IP, access time and distinguish corresponding station location marker information, then extract from first journal fileWith the corresponding log information of the station location marker information difference, finally according to the log information for extracting successivelyGenerate the second journal file.In embodiments of the present invention, the first journal file that client sends is received firstAnd log content classification information corresponding with first journal file, then obtain the log content classificationContent type in information, further according to standard logs field sequence, is ranked up to the content type, fromExtract each content type after sequence in first journal file successively and distinguish corresponding station location marker letterBreath, extracts from first journal file and the corresponding log information of the station location marker information difference, mostThe log information for being extracted according to successively afterwards generates the second journal file.So as to improve the sieve of journal fileSelect delivery efficiency.
The output intent of another kind of journal file provided in an embodiment of the present invention, receives what client sent firstFirst journal file and log content classification information corresponding with first journal file, then obtain describedContent type in log content classification information, further according to default log field sequence, to the content typeIt is ranked up, extracts each content type difference after sequence from first journal file successively correspondingLog information, generates the second journal file, the second day finally according to the log information for extracting successivelyWill file is for being exported in the client.With at present by being manually entered the side of text-processing orderFormula carries out screening output and compares to WEB access logs, the first journal file that the embodiment of the present invention is received firstAnd log content classification information corresponding with first journal file, then according to default log field sequenceContent type in log content classification information is ranked up, finally according to from first journal fileEach content type after sequence is extracted successively and distinguishes corresponding log information, generate the second journal file, andSecond journal file is exported, and Text Command acquisition particular log form text is manually entered so as to instead ofThe mode of part, and then improve the screening delivery efficiency of journal file.
Further, the output intent of another journal file is embodiments provided, methods described shouldFor client, as shown in figure 3, methods described includes:
301st, the first journal file and log content corresponding with first journal file are sent to serverClassification information.
Further, so that the server according in first journal file with the log content classThe corresponding log information of other information, generates the second journal file.Wherein, first journal file is clientThe original journal file that end sends, and the content format in first journal file is standard definitionJournal format.It is new that the corresponding log content classification information of first journal file is used for that definition will to generateJournal file journal format, the log category information is specifically as follows the daily record in the first journal fileField, for example, log category information can be comprising access time, access IP, return code, Client AgentThe field informations such as mark.In embodiments of the present invention, the particular content of the log category information can basisThe actual demand of user is configured, it is also possible to configured by system default, and the embodiment of the present invention does not do concrete limitIt is fixed.
For the embodiment of the present invention, as shown in fig. 7, for the first journal file and with first daily record textThe corresponding log content classification information of part specifically can arrange interface by journal format and be configured.In daily recordForm is arranged in interface, and log content classification information can be configured by way of checking box, exampleSuch as, if user includes access time and accesses two contents of IP in needing to obtain the journal file for generating,Access time can be chosen in journal format arranges interface and accesses two check boxes of IP.And for described firstThe selection of journal file, the text selecting frame that can be arranged in the middle of interface by journal format are configured.NeedIt is noted that concrete for the first file and content type information corresponding with first journal fileConfiguration mode, the embodiment of the present invention are not specifically limited.
302nd, obtain the second journal file that the server is generated.
In embodiments of the present invention, can obtain server generation text form the second journal file,The second journal file of the picture format of server generation can also be obtained, server generation can be obtained againSecond journal file of statement form, the embodiment of the present invention are not specifically limited.
303rd, export second journal file.
For the embodiment of the present invention, first to server send the first journal file and with first daily record textThe corresponding log content classification information of part so that the server according in first journal file with instituteThe corresponding log information of log content classification information is stated, the second journal file is generated, is then obtained the serviceThe second journal file that device is generated, finally exports second journal file.So as to text need not be manually enteredIn the case of present treatment order, you can complete the screening to journal file and export, and then improve journal fileScreening output efficiency.
The output intent of another journal file provided in an embodiment of the present invention, receives what client sent firstFirst journal file and log content classification information corresponding with first journal file, then obtain describedContent type in log content classification information, further according to default log field sequence, to the content typeIt is ranked up, extracts each content type difference after sequence from first journal file successively correspondingLog information, generates the second journal file, the second day finally according to the log information for extracting successivelyWill file is for being exported in the client.With at present by being manually entered the side of text-processing orderFormula carries out screening output and compares to WEB access logs, the first journal file that the embodiment of the present invention is received firstAnd log content classification information corresponding with first journal file, then according to default log field sequenceContent type in log content classification information is ranked up, finally according to from first journal fileEach content type after sequence is extracted successively and distinguishes corresponding log information, generate the second journal file, andSecond journal file is exported, and Text Command acquisition particular log form text is manually entered so as to instead ofThe mode of part, and then improve the screening delivery efficiency of journal file.
Further, a kind of server is embodiments provided, as indicated at 4, the server includes:Receiving unit 41, acquiring unit 42, sequencing unit 43, extraction unit 44, signal generating unit 45.
Receiving unit 41, for receive client transmission the first journal file and with first journal fileCorresponding log content classification information.
Acquiring unit 42, for obtaining the content type in the log content classification information.
Sequencing unit 43, for according to default log field sequence, being ranked up to the content type.
Extraction unit 44, for extracting each content type after sequence successively from first journal fileThe corresponding log information of difference.
Signal generating unit 45, for according to the log information of the extraction generate the second journal file, described secondJournal file is for being exported in the client.
It should be noted that other of each functional unit involved by a kind of server provided in an embodiment of the present inventionIt is corresponding to describe, the correspondence description of method shown in Fig. 1 is may be referred to, be will not be described here.
A kind of server provided in an embodiment of the present invention, first receive client send the first journal file andLog content classification information corresponding with first journal file, then obtains the log content classification letterContent type in breath, further according to default log field sequence, is ranked up to the content type, from instituteExtract each content type after sequence in stating the first journal file successively and distinguish corresponding log information, finallySecond journal file is generated according to the log information for extracting successively, second journal file is in instituteExported in stating client.With at present by way of being manually entered text-processing order to WEB access dayWill carries out screening output to be compared, the first journal file that the embodiment of the present invention is received first and with described first dayThe corresponding log content classification information of will file, then according to default log field sequence pair log content classificationContent type in information is ranked up, and is extracted after sequence successively finally according to from first journal fileEach content type distinguish corresponding log information, generate the second journal file, and by second daily recordFile is exported, so as to instead of the mode for being manually entered that Text Command obtains particular log formatted file, and thenImprove the screening delivery efficiency of journal file.
Further, another kind of server is embodiments provided, as shown in figure 5, the serverIncluding:Receiving unit 51, acquiring unit 52, sequencing unit 53, extraction unit 54, signal generating unit 55.
Receiving unit 51, for receive client transmission the first journal file and with first journal fileCorresponding log content classification information.
Acquiring unit 52, for obtaining the content type in the log content classification information.
Sequencing unit 53, for according to default log field sequence, being ranked up to the content type.
Extraction unit 54, for extracting each content type after sequence successively from first journal fileThe corresponding log information of difference.
Signal generating unit 55, for according to the log information of the extraction generate the second journal file, described secondJournal file is for being exported in the client.
The sequencing unit 53, specifically for according to standard logs field sequence, carrying out to the content typeSequence.
The extraction unit 54, specifically for from first journal file successively extract sequence after eachContent type distinguishes corresponding station location marker information.
The extraction unit 54, be specifically additionally operable to from first journal file to extract successively with it is described eachStation location marker information distinguishes corresponding log information.
Further, the server also includes:Storage unit 56.
Storage unit 56, for second journal file to be saved as the file of txt forms, so that describedSecond journal file described in client downloads.
It should be noted that its of each functional unit involved by another kind of server provided in an embodiment of the present inventionHe accordingly describes, and may be referred to the correspondence description of method shown in Fig. 2, will not be described here.
Another kind of server provided in an embodiment of the present invention, receives the first journal file that client sends firstAnd log content classification information corresponding with first journal file, then obtain the log content classificationContent type in information, further according to default log field sequence, is ranked up to the content type, fromExtract each content type after sequence in first journal file successively and distinguish corresponding log information, mostAfterwards according to log information second journal file of generation for extracting successively, second journal file forExported in the client.With at present by way of being manually entered text-processing order to WEB accessDaily record carries out screening output to be compared, the first journal file that the embodiment of the present invention is received first and with described firstThe corresponding log content classification information of journal file, then according to default log field sequence pair log content classContent type in other information is ranked up, and sorts finally according to being extracted from first journal file successivelyEach content type afterwards distinguishes corresponding log information, generates the second journal file, and by the second dayWill file is exported, and so as to instead of the mode for being manually entered that Text Command obtains particular log formatted file, is enteredAnd improve the screening delivery efficiency of journal file.
Further, a kind of client is embodiments provided, as shown in fig. 6, the client bagInclude:Transmitting element 61, acquiring unit 62, output unit 63.
Transmitting element 61, for sending the first journal file and corresponding with first journal file to serverLog content classification information so that the server according in first journal file with the daily recordThe corresponding log information of content type information, generates the second journal file.
Acquiring unit 62, for obtaining the second journal file that the server is generated.
Output unit 63, for exporting second journal file.
It should be noted that other of each functional unit involved by a kind of client provided in an embodiment of the present inventionIt is corresponding to describe, the correspondence description of method shown in Fig. 3 is may be referred to, be will not be described here.
A kind of client provided in an embodiment of the present invention, first receive client send the first journal file andLog content classification information corresponding with first journal file, then obtains the log content classification letterContent type in breath, further according to default log field sequence, is ranked up to the content type, from instituteExtract each content type after sequence in stating the first journal file successively and distinguish corresponding log information, finallySecond journal file is generated according to the log information for extracting successively, second journal file is in instituteExported in stating client.With at present by way of being manually entered text-processing order to WEB access dayWill carries out screening output to be compared, the first journal file that the embodiment of the present invention is received first and with described first dayThe corresponding log content classification information of will file, then according to default log field sequence pair log content classificationContent type in information is ranked up, and is extracted after sequence successively finally according to from first journal fileEach content type distinguish corresponding log information, generate the second journal file, and by second daily recordFile is exported, so as to instead of the mode for being manually entered that Text Command obtains particular log formatted file, and thenImprove the screening delivery efficiency of journal file.
Through the above description of the embodiments, those skilled in the art can be understood that thisIt is bright to add the mode of required common hardware to realize by software, naturally it is also possible to by hardware, but a lotIn the case of the former is more preferably embodiment.Based on such understanding, technical scheme substantially orPerson says that the part contributed to prior art can be embodied in the form of software product, and the computer is softPart product is stored in the storage medium that can read, such as the floppy disk of computer, hard disk or CD etc., if includingDry instruction is used so that a computer equipment (can be personal computer, server, or the network equipmentDeng) perform method described in each embodiment of the invention.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited toThis, any those familiar with the art the invention discloses technical scope in, can readily occur inChange or replacement, should all be included within the scope of the present invention.Therefore, protection scope of the present invention shouldIt is defined by the scope of the claims.