CN109857714A - Journal obtaining method, device, electronic equipment and computer readable storage medium - Google Patents

Journal obtaining method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN109857714A
CN109857714A CN201811585009.8A CN201811585009A CN109857714A CN 109857714 A CN109857714 A CN 109857714A CN 201811585009 A CN201811585009 A CN 201811585009A CN 109857714 A CN109857714 A CN 109857714A
Authority
CN
China
Prior art keywords
information
file
log
index value
journal
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.)
Withdrawn
Application number
CN201811585009.8A
Other languages
Chinese (zh)
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201811585009.8A priority Critical patent/CN109857714A/en
Publication of CN109857714A publication Critical patent/CN109857714A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of journal obtaining methods, comprising: extracts the file name in matching rule;Index value is generated using file name;When there are when index value, obtain the corresponding file path information of index value in log index information;Log information is corresponded to using file path acquisition of information;This method is when obtaining corresponding log information according to matching rule, it only needs to compare the corresponding index value of file name in matching rule log index information corresponding with journal file, that is, can determine in current log information with the presence or absence of log information corresponding with matching rule;It does not need to traverse whole journal files according to matching rule, greatly improves log acquisition efficiency, avoid in the related technology whenever analyze a matching rule and just need to be traversed for all journal files, cause the low efficiency of analysis the problem of.The invention also discloses a kind of log acquisition device, electronic equipment and computer readable storage mediums, have above-mentioned beneficial effect.

Description

Journal obtaining method, device, electronic equipment and computer readable storage medium
Technical field
The present invention relates to signal simulation technical field, in particular to a kind of journal obtaining method, device, electronic equipment and meter Calculation machine readable storage medium storing program for executing.
Background technique
With the development of information, data explosion formula increases, higher and higher to the processing requirement of server.In order to guarantee to service The stable operation of device needs that reliably server is safeguarded and repaired in time.Currently, the maintenance mode based on log analysis Also personnel are slowly maintained to be approved.But since server is constantly in operating status, a large amount of logs can be generated how Quick analyzing and positioning problem, becomes the maximum problem of log analysis in numerous logs.
Currently, the mode of log analysis is rule abnormal in pre-defined log analysis, each corresponding rule of exception Then, all rules can be matched when analyzing log;It will be by all logs whenever being matched to a rule File is looped through, and the geochemical anomalies studying that positioning can be obtained after analyzing successfully comes out, and obtains corresponding log information. That is, now whenever analysis one rule of matching just needs to be traversed for all journal files, with rule and journal file Increase, the efficiency of analysis is lower and lower.
Summary of the invention
The object of the present invention is to provide a kind of journal obtaining method, device, electronic equipment and computer readable storage medium, Can be avoided in the related technology whenever analyze a matching rule just need to be traversed for all journal files, cause analysis efficiency Low problem.
In order to solve the above technical problems, the present invention provides a kind of journal obtaining method, comprising:
Extract the file name in matching rule;
Index value is generated using the file name;
When there are when the index value, obtain the corresponding file path information of the index value in log index information;
Log information is corresponded to using the file path acquisition of information.
Optionally, index value is generated using the file name, comprising:
Hash index value is generated using the file name.
Optionally, the corresponding file path information of the index value is obtained, comprising:
Obtain the corresponding whole elements of index value described in the log index information;Wherein, each component identification one Journal file;
Obtain the file path information of each element.
Optionally, the file path information of each element is obtained, comprising:
Extract the relative path information in the matching rule;
Using the relative path information, go out file destination routing information as most from each file path information sifting Whole file path information.
Optionally, the acquisition modes of the log index information, comprising:
Journal file is traversed, the file path information and file name of each journal file are obtained;
Index value is generated using the file name, and is judged in the log index information with the presence or absence of the index Value;
If it does not exist, then the index value is stored in the log index information, and by the file name and institute File path information is stated as the corresponding element of the index value;
If it exists, then using the file name and the file path information as the corresponding element of the index value.
The present invention also provides a kind of log acquisition devices, comprising:
First extraction module, for extracting the file name in matching rule;
Index value generation module, for generating index value using the file name;
Routing information obtains module, for when, there are when the index value, obtaining the index value in log index information Corresponding file path information;
Log acquisition module, for corresponding to log information using the file path acquisition of information.
Optionally, the routing information obtains module, comprising:
Element acquiring unit, for obtaining the corresponding whole elements of index value described in the log index information;Wherein, One journal file of each component identification;
Route information acquisition unit, for obtaining the file path information of each element.
Optionally, the route information acquisition unit, comprising:
Second extracts subelement, for extracting the relative path information in the matching rule;
Routing information obtains subelement, for utilizing the relative path information, from each file path information sifting File destination routing information is as final file path information out.
The present invention also provides a kind of electronic equipment, comprising:
Memory, for storing computer program;
Processor, the step of journal obtaining method described above is realized when for executing the computer program.
The present invention also provides a kind of computer readable storage medium, calculating is stored on the computer readable storage medium The step of machine program, the computer program realizes journal obtaining method described above when being executed by processor.
A kind of journal obtaining method provided by the present invention, comprising: extract the file name in matching rule;Utilize file Title generates index value;When there are when index value, obtain the corresponding file path information of index value in log index information;It utilizes File path acquisition of information corresponds to log information.
As it can be seen that this method is when obtaining corresponding log information according to matching rule, it is only necessary to by filename in matching rule Claim corresponding index value log index information corresponding with journal file to compare, that is, can determine in current log information whether In the presence of log information corresponding with matching rule;It does not need to traverse whole journal files according to matching rule, it is only necessary to Index compare, greatly improve rule matching efficiency and log acquisition efficiency, avoid in the related technology whenever The problem of analyzing a matching rule and just need to be traversed for all journal files, causing the low efficiency of analysis.The present invention also provides A kind of log acquisition device, electronic equipment and computer readable storage medium, have above-mentioned beneficial effect, no longer superfluous herein It states.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart of journal obtaining method provided by the embodiment of the present invention;
Fig. 2 is the structural schematic diagram of array in a kind of log index information provided by the embodiment of the present invention;
Fig. 3 is array element quantity schematic diagram in a kind of log index information provided by the embodiment of the present invention;
Fig. 4 is the flow diagram of the acquisition modes of log index information provided by the embodiment of the present invention;
Fig. 5 is the structural block diagram of log acquisition device provided by the embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Currently, whenever to a rule (can be understood as abnormal matching rule, matching rule can also be referred to as, it is subsequent It is all unified regular at this to represent with matching rule in explanation) all journal files will be carried out to circulation time when being matched It goes through, the log information that positioning obtains can be obtained after successful match, has also just obtained exception information.That is, now whenever point It analyses a matching rule and just needs to be traversed for all journal files, with the increase of matching rule and journal file, the effect of analysis Rate is lower and lower.The present embodiment is by being arranged log index information for current whole journal files, to avoid in the related technology Target journaling information caused by looping through whole journal files is required in the matching process for carrying out each matching rule to obtain The problem of taking inefficiency.Specifically referring to FIG. 1, Fig. 1 is the flow chart of journal obtaining method provided by the embodiment of the present invention; This method may include:
File name in S101, extraction matching rule.
S102, index value is generated using file name.
In the present embodiment when obtaining corresponding log information using matching rule, it is necessary first at matching rule Reason, obtains the corresponding index value of the matching rule, to judge the corresponding log of current log file subsequently through the index value It whether there is corresponding index value in index information;If it exists, then it is corresponding with matching rule to prove that current log file exists Journal file;If it does not exist, then proving current log file, there is no journal file corresponding with matching rule, Ji Kezhi The processing for tapping into the next matching rule of row, do not need to traverse whole journal files as the relevant technologies be to determine It is no that there are the corresponding log information, that is, journal files of matching rule.
The concrete mode that index value is generated using file name is not limited in the present embodiment, in log index information Each index value acquisition modes are corresponding.Such as when each index value in log index information is by the text to journal file When the hash value that part title progress hash is calculated is as index value, at this point, utilizing the filename in matching rule accordingly Claim also to carry out hash value that corresponding hash is calculated as index value.Certainly, since hash calculates not only convenient and safety Reliably, file name is utilized to generate hash index it is therefore preferred that step S102 can be using file name generation index value Value.
The quantity of matching rule is not defined in the present embodiment, when only existing a matching rule, according to working as Front sequence executes.It, can be with each matching rule of parallel processing, it is of course also possible to be to follow when there are multiple matching rules Ring is successively handled each matching rule, when successively handling, can current matching rule executed the present embodiment provides Process after, process provided in this embodiment executed to next matching rule, circulation executes, to the last a matching Rule executes completion.It is of course also possible to be, step S101 and step S102 are to execute parallel, and step S103 and step S104 are Circulation executes.
S103, when there are when index value, obtaining the corresponding file path information of index value in log index information.
The form of log index information is not limited in the present embodiment, such as the log index information can be a log Index information table.It can certainly be a log index information array.Also unlimited settled date will index information in the present embodiment Acquisition form.As long as by being pre-processed to obtain the log that can be identified for that each journal file index letter to whole journal files Breath.That is, can determine corresponding journal file by the log index information.The present embodiment is not to log text Part carries out pretreated mode and is defined.Such as it can be and determine a corresponding index according to the Log Names of journal file Value, is stored in log index information for the index value.It is not limited in certain the present embodiment and determines index value according to Log Names Mode.As long as every kind of Log Names can have unique corresponding index value.Such as the Log Names according to journal file Corresponding hash value is calculated, and using the hash value as index value, hash index value can be referred to as.It is also possible to each day Will file pre-processes to form an array.The form of each element in array is not limited in the present embodiment.For example, in the array Each element form can be file name and file path information, can also be only file path information;Certainly, the array In each element form be also possible to hash-key-value data acquisition system;Each element of array includes three categories at this time Property, it is hash respectively, key, value;Wherein, value is used to store journal file path i.e. file path information, key and be used to The file name of journal file is stored, hash is for storing the hash index value generated according to the file name of journal file. Certainly, in same file title, there are when multiple journal files, can be used to store identical hash index value by next Next element.Data structure can be as shown in Figure 2.Index value in log index information can pass through ITME [hash] table Show.Such as it is element that hash value is 0 that ITME [0], which indicates to store in the array, manipulative indexing value is 0.
The present embodiment does not limit the quantity of element after every kind of index value, can be according to the index in current log file It is worth corresponding journal file quantity to determine.Fig. 3 can be referred to.Can see ITME [0], there are two elements afterwards, can indicate have The corresponding journal file of file name that hash value is 0 there are two having in current log file.It can be seen that having one after ITME [1] A element can indicate to have the corresponding journal file of file name for being 0 with a hash value in current log file.This When matching log without carrying out the traversal of journal file, the hash that need to be only generated according to Log Names in matching rule is direct Obtain the file information that the corresponding journal file of value of each element key under hash value is corresponded in log index information.
Journal file positioning is carried out according to rule for the ease of subsequent, the acquisition modes of log index information in the present embodiment May include:
Journal file is traversed, the file path information and file name of each journal file are obtained;
Index value is generated using file name, and is judged in log index information with the presence or absence of index value;
If it does not exist, then index value is stored in log index information, and file name and file path information is made For the corresponding element of index value;
If it exists, then using file name and file path information as the corresponding element of index value.
Specifically, not being defined to the quantity of the journal file needed to be traversed in the present embodiment.For example, if being currently Pretreatment is carried out to journal file for the first time and generates log index information, then current whole journal file can be located in advance Reason.Log index information is generated if being currently not and carrying out pretreatment to journal file for the first time, log rope can be generated to last time Fuse, which is ceased to journal file newly-increased in this Update log index information period, to be pre-processed.It is of course also possible to be After generating log index information for the first time, the new journal file of every generation just directly pre-processes it in follow-up system;Or It is just to be located in advance to newly-generated journal file at predetermined time intervals in follow-up system after generating log index information for the first time Reason.
Index value can be generated using file name for each journal file, and judge whether deposit in log index information In the index value, and if it exists, then explanation is presently in existence the journal file of this document title, at this time can be by the journal file File name and file path information as the corresponding element of index value, i.e., as in the index value in log index information An element.Certain element at this time may include the file name and file path information of journal file;The element It can be file path information only comprising journal file;Certainly, which is also possible to contain index value, journal file File name and file path information, as shown in Figure 2.If it does not exist, then there is currently no the days of this document title for explanation Will file, at this time, it may be necessary to increase the index value in log index information, and using file name and file path information as The corresponding element of index value, the index value only exists an element at this time.Equally, the element may include log text at this time The file name and file path information of part;The element is also possible to file path information only comprising journal file;When So, which is also possible to contain index value, the file name of journal file and file path information, as shown in Figure 2.
Specifically referring to FIG. 4, giving a kind of flow diagram of the acquisition modes of specific log index information.Traversal All journal files of system obtain the file path information and file name of each journal file;It is generated according to file name Hash value first judges the hash value in array with the presence or absence of (judging in log index information with the presence or absence of the hash value); If it does not exist, then the hash value is stored in an array element backmost, i.e., an element is created in array, and be inserted into Into array, the last one position (namely increases the hash value in log index information, and stores behind the hash value New element);It is associated with if it is present obtaining the hash value element and adding upper new element below according to next, i.e., it is existing The corresponding each element of the hash value is obtained, and is being finally inserted currently available new element.
Step S103 is i.e. when there are (illustrate current system journal file when index value in log index information in the present embodiment In there are the corresponding journal files of matching rule, that is, there are the abnormal log informations that user needs for current system), obtain rope Draw the corresponding file path information of value, and then corresponding log information can be obtained according to this document routing information.But work as log When index value being not present in index information, illustrate that the corresponding journal file of matching rule is not present in current system journal file, Namely the abnormal log information that user needs is not present in current system, can directly terminate the retrieval of the matching rule at this time Journey.
The detailed process of step S103 is not limited in the present embodiment, it is related to the generating mode of log index information. For example, then can directly be obtained according to the index value in log index information when the index value is only corresponding with file path information Its corresponding file path information.Work as what is said or talked about, obtaining the corresponding file path information of index value also may include:
Obtain the corresponding whole elements of index value in log index information;Wherein, one journal file of each component identification;
Obtain the file path information of each element.
Specifically, not limiting the quantity of the corresponding element of each index value in log index information in the present embodiment.Cause This in log index information there are when index value, the corresponding whole elements of index value in available log index information.This In one journal file of each component identification, that is to say, that there are 2 elements here, then can pass through this 2 elements and obtain To two file path information, and then get the corresponding log information of two journal files.That is, element here can With by its corresponding journal file of file path message identification, storage file routing information in element at this time;It is also possible to lead to Cross file path information and file name identify its corresponding journal file, at this time in element storage file routing information and File name;It is also possible to identify its corresponding journal file by file path information, file name and hash value, at this time Storage file routing information, file name and hash value in element.
In the present embodiment when the index value of target corresponds to multiple elements, the corresponding file path of available whole element Information.Certainly, in order to further increase the corresponding log information of matching rule acquisition efficiency and log information positioning essence Parasexuality.Preferably, the file path information of acquisition each element may include: in the present embodiment
Extract the relative path information in matching rule;
Using relative path information, go out file destination routing information as final file from each file path information sifting Routing information.
Specifically, carrying out postsearch screening i.e. Secondary Match by relative path information in the present embodiment, and then improve The accuracy of the log information finally obtained and the acquisition efficiency of log information.Due to that can believe comprising file path in element at this time Breath, however the relative path information of the identical journal file of title can be different, therefore, can use opposite in matching rule Routing information and then postsearch screening.Specifically, using the relative path information in matching rule, from each file path information sifting File destination routing information is as final file path information out.That is from the corresponding file of whole elements of index value It is obtained in routing information with the consistent file path information of relative path information in matching rule as final file path Information, and then step S104 is exactly to correspond to log information according to final file path acquisition of information.
Detailed process may is that when carrying out matching rule matching, file model first be obtained from matching rule, and utilize This document title generates hash value;Judged in log index information according to the hash value with the presence or absence of the hash value;If do not deposited Then continuing next matching rule;And if so, obtaining the corresponding whole elements of the hash value in log index information, sentence Whether disconnected element is multiple;The value value (i.e. file path information) of the element is obtained if only one if the element, is utilized Value value reads corresponding journal file, that is, log information, and executes the matching process of next matching rule;If there is more A element then carries out Secondary Match according to value value, returns to corresponding journal file after successful match, and execute next matching The matching process of rule.
S104, log information is corresponded to using file path acquisition of information.
The present embodiment is not defined step S104, can read corresponding log text according to file path information The log information of part.
Illustrate the above process below by a specific example: for example, working as matching rule: file name bmc.txt, relatively Path is /bmc/bmc.txt.Journal file is following (using relative path):
/bmc/bmc.txt
/os/bmc.txt
/os/os.txt
/bmc/fru.txt
Assuming that 1 when the hash of bmc.txt is the hash value of 0, os.txt, 2 when the hash value of fru.txt.
It is 0 that the process of the present embodiment, which can be and calculate index value according to the file name of matching rule, is indexed in log It determines that index value is 0 there are two element in information, is /bmc/bmc.txt and/os/bmc.txt respectively;At this time according to matching The really final log information of relative path/bmc/bmc.txt of rule is first journal file.
Based on the above-mentioned technical proposal, journal obtaining method provided in an embodiment of the present invention, this method is according to matching rule When obtaining corresponding log information, it is only necessary to by the log corresponding with journal file of the corresponding index value of file name in matching rule Index information compares, that is, can determine in current log information with the presence or absence of log information corresponding with matching rule;No It needs to traverse whole journal files according to matching rule, it is only necessary to compare with index, greatly improve rule With efficiency and log acquisition efficiency, avoid in the related technology whenever one matching rule of analysis just needs to be traversed for all days Will file, cause analysis low efficiency the problem of.And by Secondary Match, log file analysis efficiency is further increased.
Log acquisition device provided in an embodiment of the present invention, electronic equipment and computer readable storage medium are carried out below It introduces, log acquisition device, electronic equipment and computer readable storage medium described below and above-described log acquisition Method can correspond to each other reference.
Referring to FIG. 5, Fig. 5 is the structural block diagram of log acquisition device provided by the embodiment of the present invention;The device can be with Include:
First extraction module 100, for extracting the file name in matching rule;
Index value generation module 200, for generating index value using file name;
Routing information obtains module 300, for when, there are when index value, acquisition index value is corresponding in log index information File path information;
Log acquisition module 400, for corresponding to log information using file path acquisition of information.
Based on the above embodiment, routing information acquisition module 300 may include:
Element acquiring unit, for obtaining the corresponding whole elements of index value in log index information;Wherein, each element Identify a journal file;
Route information acquisition unit, for obtaining the file path information of each element.
Based on the above embodiment, route information acquisition unit, comprising:
Second extracts subelement, for extracting the relative path information in matching rule;
Routing information obtains subelement, for utilizing relative path information, goes out target text from each file path information sifting Part routing information is as final file path information.
Based on above-mentioned any embodiment, which can also include:
Log index information generation module, for traversing journal file, obtain the file path information of each journal file with And file name;Index value is generated using file name, and is judged in log index information with the presence or absence of index value;If not depositing Then index value is being stored in log index information, and file name and file path information is corresponding as index value Element;If it exists, then using file name and file path information as the corresponding element of index value.
It should be noted that being based on above-mentioned any embodiment, described device can be to be realized based on programmable logic device , programmable logic device includes FPGA, CPLD, single-chip microcontroller, processor etc..The programmable logic device can be to be set in electronics In standby (such as server).
The embodiment of the present invention also provides a kind of electronic equipment, comprising: memory, for storing computer program;Processor, The step of journal obtaining method described in above-mentioned any embodiment is realized when for executing computer program.If processor is for holding The file name extracted in matching rule is realized when row computer program;Index value is generated using file name;When log indexes There are when index value, obtain the corresponding file path information of index value in information;Log is corresponded to using file path acquisition of information Information.
The present embodiment is not defined electronic equipment, such as can be server.
The present invention also provides a kind of computer readable storage medium, computer journey is stored on computer readable storage medium Sequence, the step of journal obtaining method described in above-mentioned any embodiment is realized when computer program is executed by processor.As calculated The file name extracted in matching rule is realized when machine program is executed by processor;Index value is generated using file name;The same day There are when index value, obtain the corresponding file path information of index value in will index information;Utilize file path acquisition of information pair Answer log information.
The computer readable storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit Store up the medium of program code.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration ?.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
Above to a kind of journal obtaining method provided by the present invention, device, electronic equipment and computer-readable storage medium Matter is described in detail.Used herein a specific example illustrates the principle and implementation of the invention, above The explanation of embodiment is merely used to help understand method and its core concept of the invention.It should be pointed out that for the art Those of ordinary skill for, without departing from the principle of the present invention, can also to the present invention carry out it is several improvement and repair Decorations, these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims (10)

1. a kind of journal obtaining method characterized by comprising
Extract the file name in matching rule;
Index value is generated using the file name;
When there are when the index value, obtain the corresponding file path information of the index value in log index information;
Log information is corresponded to using the file path acquisition of information.
2. journal obtaining method according to claim 1, which is characterized in that index value is generated using the file name, Include:
Hash index value is generated using the file name.
3. journal obtaining method according to claim 1, which is characterized in that obtain the corresponding file path of the index value Information, comprising:
Obtain the corresponding whole elements of index value described in the log index information;Wherein, one log of each component identification File;
Obtain the file path information of each element.
4. journal obtaining method according to claim 3, which is characterized in that obtain the file path letter of each element Breath, comprising:
Extract the relative path information in the matching rule;
Using the relative path information, go out file destination routing information as final from each file path information sifting File path information.
5. journal obtaining method according to claim 1-4, which is characterized in that the log index information obtains Take mode, comprising:
Journal file is traversed, the file path information and file name of each journal file are obtained;
Index value is generated using the file name, and is judged in the log index information with the presence or absence of the index value;
If it does not exist, then the index value is stored in the log index information, and by the file name and the text Part routing information is as the corresponding element of the index value;
If it exists, then using the file name and the file path information as the corresponding element of the index value.
6. a kind of log acquisition device characterized by comprising
First extraction module, for extracting the file name in matching rule;
Index value generation module, for generating index value using the file name;
Routing information obtains module, for when corresponding there are the index value when index value, is obtained in log index information File path information;
Log acquisition module, for corresponding to log information using the file path acquisition of information.
7. log acquisition device according to claim 6, which is characterized in that the routing information obtains module, comprising:
Element acquiring unit, for obtaining the corresponding whole elements of index value described in the log index information;Wherein, each One journal file of component identification;
Route information acquisition unit, for obtaining the file path information of each element.
8. log acquisition device according to claim 7, which is characterized in that the route information acquisition unit, comprising:
Second extracts subelement, for extracting the relative path information in the matching rule;
Routing information obtains subelement, for utilizing the relative path information, goes out mesh from each file path information sifting File path information is marked as final file path information.
9. a kind of electronic equipment characterized by comprising
Memory, for storing computer program;
Processor realizes such as journal obtaining method described in any one of claim 1 to 5 when for executing the computer program The step of.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program is realized when the computer program is executed by processor such as journal obtaining method described in any one of claim 1 to 5 Step.
CN201811585009.8A 2018-12-24 2018-12-24 Journal obtaining method, device, electronic equipment and computer readable storage medium Withdrawn CN109857714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811585009.8A CN109857714A (en) 2018-12-24 2018-12-24 Journal obtaining method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811585009.8A CN109857714A (en) 2018-12-24 2018-12-24 Journal obtaining method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109857714A true CN109857714A (en) 2019-06-07

Family

ID=66892111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811585009.8A Withdrawn CN109857714A (en) 2018-12-24 2018-12-24 Journal obtaining method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109857714A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737531A (en) * 2019-09-27 2020-01-31 山东英信计算机技术有限公司 fault diagnosis method, device, equipment and medium
CN112445760A (en) * 2020-11-13 2021-03-05 北京鸿腾智能科技有限公司 File classification method, equipment, storage medium and device
CN112800006A (en) * 2021-01-27 2021-05-14 杭州迪普科技股份有限公司 Log storage method and device for network equipment
CN113064807A (en) * 2021-04-22 2021-07-02 中国工商银行股份有限公司 Log diagnosis method and device
CN113407508A (en) * 2021-06-11 2021-09-17 济南浪潮数据技术有限公司 Method, system, equipment and medium for compressing log file

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609461A (en) * 2009-07-29 2009-12-23 孟小峰 A kind of space querying system of personal core data and method based on user characteristics
CN102609453A (en) * 2012-01-11 2012-07-25 中国农业大学 Embedded file searching method and embedded file searching system
CN104281672A (en) * 2014-09-28 2015-01-14 网神信息技术(北京)股份有限公司 Log data processing method and device
CN105488085A (en) * 2014-12-27 2016-04-13 北京安天电子设备有限公司 File positioning method and system through log
CN106055621A (en) * 2016-05-26 2016-10-26 浪潮电子信息产业股份有限公司 Log retrieval method and device
CN107480233A (en) * 2017-08-07 2017-12-15 郑州云海信息技术有限公司 A kind of method and system of daily record data positioning

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609461A (en) * 2009-07-29 2009-12-23 孟小峰 A kind of space querying system of personal core data and method based on user characteristics
CN102609453A (en) * 2012-01-11 2012-07-25 中国农业大学 Embedded file searching method and embedded file searching system
CN104281672A (en) * 2014-09-28 2015-01-14 网神信息技术(北京)股份有限公司 Log data processing method and device
CN105488085A (en) * 2014-12-27 2016-04-13 北京安天电子设备有限公司 File positioning method and system through log
CN106055621A (en) * 2016-05-26 2016-10-26 浪潮电子信息产业股份有限公司 Log retrieval method and device
CN107480233A (en) * 2017-08-07 2017-12-15 郑州云海信息技术有限公司 A kind of method and system of daily record data positioning

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737531A (en) * 2019-09-27 2020-01-31 山东英信计算机技术有限公司 fault diagnosis method, device, equipment and medium
CN112445760A (en) * 2020-11-13 2021-03-05 北京鸿腾智能科技有限公司 File classification method, equipment, storage medium and device
CN112445760B (en) * 2020-11-13 2024-05-14 三六零数字安全科技集团有限公司 File classification method, device, storage medium and apparatus
CN112800006A (en) * 2021-01-27 2021-05-14 杭州迪普科技股份有限公司 Log storage method and device for network equipment
CN112800006B (en) * 2021-01-27 2023-05-26 杭州迪普科技股份有限公司 Log storage method and device for network equipment
CN113064807A (en) * 2021-04-22 2021-07-02 中国工商银行股份有限公司 Log diagnosis method and device
CN113407508A (en) * 2021-06-11 2021-09-17 济南浪潮数据技术有限公司 Method, system, equipment and medium for compressing log file

Similar Documents

Publication Publication Date Title
CN109857714A (en) Journal obtaining method, device, electronic equipment and computer readable storage medium
CN110232056B (en) Blood margin analysis method and tool of structured query language
US8949166B2 (en) Creating and processing a data rule for data quality
CN108182215B (en) Structured Query Language (SQL) performance statistics method and device
CN106886509A (en) A kind of academic dissertation form automatic testing method
US10521407B2 (en) Grouping of database objects
Barberis et al. The ATLAS EventIndex: architecture, design choices, deployment and first operation experience
CN108647357A (en) The method and device of data query
CN104102701A (en) Hive-based method for filing and inquiring historical data
CN110347407A (en) A kind of method, apparatus, computer equipment and medium obtaining EMS memory occupation amount
CN104158682A (en) Contribution degree-based synchronous digital hierarchy (SDH) fault positioning method
CN109240917A (en) A kind of blog management method and relevant apparatus
CN109582504A (en) A kind of data reconstruction method and device for apple equipment
CN109815697A (en) Wrong report behavior processing method and processing device
CN114328566A (en) Relationship graph updating method, device, medium, equipment and generating method
CN109583773A (en) A kind of method, system and relevant apparatus that taxpaying credit integral is determining
CN113138906A (en) Call chain data acquisition method, device, equipment and storage medium
CN108491432A (en) Electric system cumulative amount storage based on eap-message digest and abstracting method, electronic equipment and storage medium
KR20130048025A (en) Device for handling korean variable message format message and method thereof
CN111831528A (en) Computer system log association method and related device
CN113988761A (en) Logistics track query updating method, device, equipment and storage medium
CN114610385B (en) Running environment adaptation system and method
CN115292321A (en) Data processing method, system, device, electronic equipment and storage medium
US20160085807A1 (en) Deriving a Multi-Pass Matching Algorithm for Data De-Duplication
CN109324963A (en) The method and terminal device of automatic test profitable result

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20190607

WW01 Invention patent application withdrawn after publication