The processing method and processing device of database journal
Technical field
The present invention relates to computer fields, in particular to a kind of processing method and processing device of database journal.
Background technique
With the development of internet, the amount of access and data volume of website all ramp, and single server can not expire
Foot application needs.So more common way is the method using computer cluster equally loaded at present, by one or
The multiple front end load servers of person, by one group of server of the load distribution of server to rear end, back-end server, which receives, is asked
Seek simultaneously record log.
With the growth of website visiting amount, the journal file that access request is received for recording server is visited also with website
The growth for the amount of asking and constantly expand.But handling temporal requirement, there is no reduce to journal file.Therefore, how to mention
The treatment effeciency of high journal file, becoming must problems faced.
General log processing method is to directly read raw log files, then to the data in raw log files into
Row analysis.Because journal file itself is very huge, and the restriction by disk read-write speed, the reading speed ten of journal file
Divide slow.And all original logs will be re-read when carrying out different analyses to journal file, cause to imitate in this way
Rate is very low.
Make the pre- of web log file for read-write operation is carried out repeatedly to entire journal file in the prior art
The problem of time-consuming for processing, leads to the low efficiency of log processing, currently no effective solution has been proposed.
Summary of the invention
The main purpose of the present invention is to provide a kind of processing method and processing devices of database journal, to solve the prior art
In read-write operation is carried out repeatedly to entire journal file make the pretreatment of web log file time-consuming, cause at log
The problem of low efficiency of reason.
To achieve the goals above, according to an aspect of an embodiment of the present invention, a kind of place of database journal is provided
Reason method.This method comprises: obtaining journal file;Read the segmentation rule of journal file;According to segmentation rule to journal file
It is split, obtains at least two pretreatment journal files;At least two pretreatment journal files are sequentially written in pretreatment number
According to library.
To achieve the goals above, according to another aspect of an embodiment of the present invention, a kind of place of database journal is provided
Device is managed, which includes the first acquisition module, for obtaining journal file;First read module, for reading journal file
Segmentation rule;Divide module, for being split according to segmentation rule to journal file, obtains at least two pretreatment logs
File;First memory module, at least two pretreatment journal files to be sequentially written in preprocessed data library.
According to inventive embodiments, by obtaining journal file;Read the segmentation rule of journal file;It is right according to segmentation rule
Journal file is split, and obtains at least two pretreatment journal files;At least two pretreatment journal files are sequentially written in
Preprocessed data library, solving the prior art, read-write operation makes web log file repeatedly to the progress of entire journal file
Pretreatment time-consuming, the problem of leading to the low efficiency of log processing.Realize processing speed and the place improved to journal file
Manage the effect of efficiency.
Detailed description of the invention
The attached drawing constituted part of this application is used to provide further understanding of the present invention, schematic reality of the invention
It applies example and its explanation is used to explain the present invention, do not constitute improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the processing method of according to embodiments of the present invention one database journal;
Fig. 2 is the flow chart of the processing method of according to embodiments of the present invention one preferred database journal;
Fig. 3 is the flow chart of the processing method of according to embodiments of the present invention one preferred database journal;
Fig. 4 is the structural schematic diagram of the processing unit of two database journal according to embodiments of the present invention;
Fig. 5 is the structural schematic diagram of the processing unit of according to embodiments of the present invention two preferred database journals;And
Fig. 6 is the structural schematic diagram of the processing unit of according to embodiments of the present invention two preferred database journals.
Specific embodiment
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein.In addition, term " includes " and " tool
Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing a series of steps or units
Process, method, system, product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include without clear
Other step or units listing to Chu or intrinsic for these process, methods, product or equipment.
Embodiment 1
The embodiment of the invention provides a kind of processing methods of database journal.
Fig. 1 is the flow chart of the processing method of database journal according to an embodiment of the present invention.As shown in Figure 1, this method
It comprises the following steps that
Step S11 obtains journal file.
Specifically, S11 through the above steps, gets the journal file of server generation.
Step S13 reads the segmentation rule of journal file.
Specifically, S13 through the above steps, reads pre-set, to be split to journal file segmentation rule.
Step S15 is split journal file according to segmentation rule, obtains at least two pretreatment journal files.
Specifically, S15 through the above steps, according to the segmentation rule read, to the entire journal file got
It is split, journal file is divided into more than two pretreatment journal files, for subsequent use.
At least two pretreatment journal files are sequentially written in preprocessed data library by step S17.
Specifically, S17 through the above steps, the pretreatment journal file after segmentation is read out respectively, and successively writes
Enter in the preprocessed data library for storing pretreatment journal file.
The very big journal file of script single file is split by S11 to step S17 through the above steps respectively, point
It is cut into the lesser preprocessed file of several files, and the pretreatment journal file Jing Guo dividing processing is stored in pretreatment number
In library.
In practical application, many hardware resources, example are needed because reading to the huge journal file of single file
Such as: memory size and hard disk cache capacity.Restriction also by disk read-write speed causes reading efficiency very low.So
Journal file is split, several small pretreatment journal files are divided into.These small pretreatment journal files because
File size is smaller, and computer reads very fastly, is successively read out to each preprocessed file, and be stored in pretreatment number
According in library, to accelerate the reading speed of journal file.
In summary, the present invention solve in the prior art to entire journal file carry out repeatedly read-write operation make website
The problem of time-consuming for the pretreatment of access log file, leads to the low efficiency of log processing realizes raising to journal file
The effect of processing speed and treatment effeciency.
Preferably, in alternative embodiment provided by the present application, journal files are pre-processed successively by least two in step S17
It is written in preprocessed data library, step includes:
Step S171 reads the file attribute of journal file, wherein file attribute includes at least: when log recording originates
Between and log recording terminate the time.
Step S173 modifies the time configuration information in preprocessed data library according to file attribute.
Step S175 reads pretreatment journal file corresponding with time configuration information according to time configuration information.
Successively preprocessed data library is written in pretreatment journal file corresponding with time configuration information by step S177.
Specifically, S171 to step S177 through the above steps, obtains log recording initial time and the day of journal file
The will end of record time.Terminate the time according to log recording initial time and log recording, modify in preprocessed data library when
Between configuration information, the time configuration information may include pretreatment initial time and pretreatment terminate the time.Preprocessed data library
According to time configuration information, the determining pretreatment journal file to match with time configuration information.By determining pretreatment log
File is sequentially written in preprocessed data library.
Each pretreatment journal file has pretreatment journal file attribute, and pretreatment journal file attribute at least wraps
Include: pretreatment log recording initial time and pretreatment log recording terminate the time, and pretreatment log recording initial time can be with
It is determined according to the time of the first of the pretreatment journal file log recording, pretreatment log recording terminates the time then can root
It is determined according to the time of the last item log recording of the pretreatment journal file.
Preprocessed data library is according to time configuration information, the determining pretreatment log text to match with time configuration information
Part can be pretreatment log recording initial time and be more than or equal to pretreatment initial time and terminate the time less than or equal to pretreatment
Pretreatment journal file, be also possible to pre-process log recording terminate the time be more than or equal to pretreatment initial time and be less than etc.
The pretreatment journal file of time is terminated in pretreatment, can also be that pretreatment log recording initial time is more than or equal to pretreatment
Initial time and pretreatment log recording terminate the pretreatment journal file for the time being less than or equal to the pretreatment termination time.It is specific why
Selection those skilled in the art can set according to actual needs, and this will not be repeated here.
Under some scenes, in order to reduce journal file to the occupancy of database side storage resource, divide to journal file
After obtaining pretreatment journal file, the original journal file will be deleted, if the subsequent log for needing to read the journal file
Record start time and log recording terminate the time, can be before raw log files are deleted by the log recording of the journal file
Initial time and log recording termination time read out and are recorded, in case the reading of subsequent step is called.
Preferably, as shown in Fig. 2, in alternative embodiment provided by the present application, step S17 will pre-process journal file according to
After secondary write-in database, method further include:
The analysis processing period is calculated according to time configuration information in step S19.
Step S21 handles the period according to analysis, reads the pretreatment journal file in preprocessed data library.
Step S23, analysis pretreatment journal file, obtains standard logs tables of data.
Log database is written in standard logs tables of data by step S25.
Specifically, S19 to step S25 through the above steps, carries out the pretreatment journal file in preprocessed data library
It is further processed.The time is terminated according to the pretreatment initial time in time configuration information, pretreatment, is calculated and needs to carry out
The analysis of analysis processing handles the period.Because there is the pretreatment journal file of each time in preprocessed data library, need
According to the time interval that the analysis processing period determines, the pretreatment day in the preprocessed data library in the time interval is read
Will file.These pretreatment journal files are analyzed and processed, obtaining, which can be used for, is directly stored in database, uses
In the standard logs tables of data of analysis, obtained standard logs tables of data is stored in log database, so as at any time to day
Will content its be read out, analyze.
In practical application, pretreatment journal file is handled according to the analysis processing period, it can be according to service
The loading condition of device handles the pretreatment journal file in preprocessed data library.When can also be by handling analysis
The real time modifying of section, realization handle the pretreatment journal file in preprocessed data library in real time.It can also be by predetermined
The treatment process of pretreatment journal file in preprocessed data library has been evenly distributed to each generation log text by time interval
After part.In this way, it is only necessary to the modification analysis processing period, so that it may according to the actual situation, to the place of analysis processing journal file
Reason process is controlled.
Wherein, the analysis processing period is to terminate the time interval that the time determines by handling time started and processing, can
Using directly by log recording initial time as the processing time started in the analysis processing period, log recording terminates time conduct
Processing in the analysis processing period terminates the time, is analyzed and processed to be directed to each journal file in time.
Preferably, in alternative embodiment provided by the present application, pretreatment journal file is analyzed in step S23, obtains standard
In daily record data table, step includes:
The log content for pre-processing journal file is extracted, obtains target data by step S231.
Target data is converted to target data type and obtained by step S233 according to pre-set target data type
Processing result.
Step S235, aggregation process is as a result, generate standard logs tables of data.
Specifically, S231 to step S235, reading pretreatment journal file will pre-process journal file through the above steps
In content extraction come out, be converted to the data content that can store in database, obtain target data.By target data into
Row conversion, is converted to unified data type.Target data after conversion is summarized, standard logs tables of data is generated, deposits
It is stored in log database, to transfer at any time.
Preferably, as shown in figure 3, in alternative embodiment provided by the present application, journal file is divided in step S13 reading
Before cutting rule, method further include:
Step S121 obtains the amount of capacity of journal file.
Step S123 reads pre-set capacity threshold, wherein capacity threshold is used to judge the size of journal file.
Step S125 judges whether to be split journal file according to the amount of capacity and capacity threshold of journal file;
Wherein, when the capacity of journal file is greater than capacity threshold, determination is split processing to journal file;
When the capacity of journal file is less than or equal to capacity threshold, determination is not split processing to journal file.
Specifically, judging the amount of capacity of journal file by step S121 to step S125, working as journal file
Amount of capacity be more than or equal to pre-set capacity threshold when, processing is split to journal file.When the appearance of journal file
When measuring size less than pre-set capacity threshold, then processing is not split to journal file.
In practical application, in night or other idle periods, website visiting amount is simultaneously little, so the log text generated
Part is relatively small.And very big burden can't be caused to system in the process of processing to lesser journal file.So this
In joined judgment step, judge whether to be split journal file processing.
Preferably, in alternative embodiment provided by the present application, the segmentation rule of journal file is included at least: fixed number
Split plot design, fixed capacity split plot design.
Preferably, in alternative embodiment provided by the present application, when segmentation rule is fixes number split plot design, step S15
Include: according to the step of rule is split journal file, obtains at least two pretreatment journal files is divided
Step S151a reads pre-set segmentation number.
Step S153a averagely divides journal file according to segmentation number, obtains the pretreatment journal file of fixed number.
Specifically, S151a and step S153a through the above steps, journal file is carried out according to fixed number split plot design
Dividing processing.Pre-set segmentation number is read, all journal files are averagely divided into and preset segmentation number
Pre-process journal file.
Preferably, in alternative embodiment provided by the present application, when segmentation rule is fixed capacity split plot design, step S15
Include: according to the step of rule is split journal file, obtains at least two pretreatment journal files is divided
Step S151b reads pre-set segmentation capacity.
Step S153b is split journal file according to segmentation capacity, if obtaining the identical pretreatment log of dry capacity
File.
Specifically, S151b and step S153b through the above steps, journal file is carried out according to fixed capacity split plot design
Dividing processing.Read it is pre-set pretreatment journal file single file size, sequence by journal file to log text
Part is split, and is divided into the pretreatment journal file that capacity etc. is big.In practical application, most of journal file exists
It is divided to finally, remaining capacity and pre-set segmentation capacity is unsatisfactory for, at this point it is possible to which remaining log is generated one
A pretreatment journal file.
In conjunction with actual application, following steps can be divided into:
Step 1: segmentation journal file.Using log partition tools by large log file (such as: journal file capacity is super
Cross 20GB).Journal file is divided into several pretreatments journal file M1, M2 ... Mn.
Step 2: preliminary entry time is modified.The task scheduling of the logreader of halt system and schedulework's
Task scheduling modifies two times configuration in the configuration file of logreader: pretreatment initial time
(lastsuccesstime), pretreatment terminates time (untiltime).According to the pretreatment in the configuration file of Logreader
The corresponding small pretreatment journal file divided is read in preprocessed data by initial time and pretreatment termination time one by one
In library (receiver database).
Step 3: second of entry time of modification.
Allocation Analysis pre-processes the time (postprocess time) of journal file, is set greater than and closest to running through
The integral point time (such as: 10:00,11:00,12:00) of all pretreatment journal files divided.Operating analysis pre-processes day
Will Files step (postprocess).After completing above-mentioned steps, stored using data warehouse technology (ETL).
Step 4: circulation reads journal file.
Step 1 is repeated to step 3, until can not find big journal file to other journal files.
The present invention carry out at analysis with to pretreatment journal file after being split processing to journal file
The control for managing correlation time point can accelerate the performance of processing insertion log database, solve disposably to read in log memory and property
The deficiency of energy.
Embodiment 2
The embodiment of the invention also provides a kind of processing units of database journal, as shown in figure 4, the device can wrap
Include: first obtains module 31, the first read module 33, segmentation module 35 and the first memory module 37.
Wherein, first module 31 is obtained, for obtaining journal file.
Specifically, obtaining module 31 by above-mentioned first, the journal file of server generation is got.
First read module 33, for reading the segmentation rule of journal file.
Specifically, reading pre-set, to be split to journal file point by above-mentioned first read module 33
Cut rule.
Divide module 35, for being split according to segmentation rule to journal file, obtains at least two pretreatment logs
File.
Specifically, by above-mentioned segmentation module 35, according to the segmentation rule read, to the entire log text got
Part is split, and journal file is divided into more than two pretreatment journal files, for subsequent use.
First memory module 37, at least two pretreatment journal files to be sequentially written in preprocessed data library.
Specifically, be read out the pretreatment journal file after segmentation respectively by above-mentioned first memory module 37, and
It is sequentially written in the preprocessed data library for storing pretreatment journal file.
Module 31, the first read module 33, segmentation module 35 and the first memory module 37 are obtained by above-mentioned first, respectively
The very big journal file of script single file is split, is divided into the lesser preprocessed file of several files, and will be through
The pretreatment journal file of over-segmentation processing is stored in preprocessed data library.
In practical application, many hardware resources, example are needed because reading to the huge journal file of single file
Such as: memory size and hard disk cache capacity.Restriction also by disk read-write speed causes reading efficiency very low.So
Journal file is split, several small pretreatment journal files are divided into.These small pretreatment journal files because
File size is smaller, and computer reads very fastly, is successively read out to each preprocessed file, and be stored in pretreatment number
According in library, to accelerate the reading speed of journal file.
In summary, the present invention solve in the prior art to entire journal file carry out repeatedly read-write operation make website
The problem of time-consuming for the pretreatment of access log file, leads to the low efficiency of log processing realizes raising to journal file
The effect of processing speed and treatment effeciency.
Further, above-mentioned first memory module 37 execute by least two pretreatment journal files be sequentially written in it is pre-
During handling database, further includes:
Firstly, read journal file file attribute, wherein file attribute includes at least: log recording initial time and
Log recording terminates the time.
In turn, according to file attribute, the time configuration information in preprocessed data library is modified.
Then, according to time configuration information, pretreatment journal file corresponding with time configuration information is read.
Finally, preprocessed data library successively is written in pretreatment journal file corresponding with time configuration information.
Specifically, obtaining the log recording initial time and log note of journal file by above-mentioned first memory module 37
Record terminates the time.The time is terminated according to log recording initial time and log recording, the time modified in preprocessed data library matches
Confidence breath, the time configuration information may include that pretreatment initial time and pretreatment terminate the time.Preprocessed data library according to
Time configuration information, the determining pretreatment journal file to match with time configuration information.By determining pretreatment journal file
It is sequentially written in preprocessed data library.
Each pretreatment journal file has pretreatment journal file attribute, and pretreatment journal file attribute at least wraps
Include: pretreatment log recording initial time and pretreatment log recording terminate the time, and pretreatment log recording initial time can be with
It is determined according to the time of the first of the pretreatment journal file log recording, pretreatment log recording terminates the time then can root
It is determined according to the time of the last item log recording of the pretreatment journal file.
Preprocessed data library is according to time configuration information, the determining pretreatment log text to match with time configuration information
Part can be pretreatment log recording initial time and be more than or equal to pretreatment initial time and terminate the time less than or equal to pretreatment
Pretreatment journal file, be also possible to pre-process log recording terminate the time be more than or equal to pretreatment initial time and be less than etc.
The pretreatment journal file of time is terminated in pretreatment, can also be that pretreatment log recording initial time is more than or equal to pretreatment
Initial time and pretreatment log recording terminate the pretreatment journal file for the time being less than or equal to the pretreatment termination time.It is specific why
Selection those skilled in the art can set according to actual needs, and this will not be repeated here.
Under some scenes, in order to reduce journal file to the occupancy of database side storage resource, divide to journal file
After obtaining pretreatment journal file, the original journal file will be deleted, if the subsequent log for needing to read the journal file
Record start time and log recording terminate the time, can be before raw log files are deleted by the log recording of the journal file
Initial time and log recording termination time read out and are recorded, in case the reading of subsequent step is called.
Preferably, as shown in figure 5, in alternative embodiment provided by the present application, device further include: computing module 39, second
Read module 41, processing module 43 and the second memory module 45.
Wherein, computing module 39, for the analysis processing period to be calculated according to time configuration information;
Second read module 41 reads the pretreatment log text in preprocessed data library for handling the period according to analysis
Part;
Processing module 43 obtains standard logs tables of data for analyzing pretreatment journal file;
Second memory module 45, for log database to be written in standard logs tables of data.
Specifically, by computing module 39, the second read module 41, processing module 43 and the second memory module 45, to pre-
Pretreatment journal file in processing database is further processed.When being originated according to the pretreatment in time configuration information
Between, pretreatment terminate the time, be calculated need be analyzed and processed analysis processing the period.Because preprocessed data has in library
The pretreatment journal file of each time, so the time interval that needs are determined according to the analysis processing period, when reading is in this
Between pretreatment journal file in preprocessed data library in section.These pretreatment journal files are analyzed and processed, are obtained
To can be used for being directly stored in database, for the standard logs tables of data of analysis, the standard logs number that will be obtained
In table deposit log database, so as to log content, it is read out, analyzes at any time.
In practical application, pretreatment journal file is handled according to the analysis processing period, it can be according to service
The loading condition of device handles the pretreatment journal file in preprocessed data library.When can also be by handling analysis
The real time modifying of section, realization handle the pretreatment journal file in preprocessed data library in real time.It can also be by predetermined
The treatment process of pretreatment journal file in preprocessed data library has been evenly distributed to each generation log text by time interval
After part.In this way, it is only necessary to the modification analysis processing period, so that it may according to the actual situation, to the place of analysis processing journal file
Reason process is controlled.
Wherein, the analysis processing period is to terminate the time interval that the time determines by handling time started and processing, can
The time started is handled in the period directly to handle log recording initial time as analysis, the log recording termination time, which is used as, divides
Processing in the analysis processing period terminates the time, is analyzed and processed to be directed to each journal file in time.
Further, pretreatment journal file is analyzed in above-mentioned processing module 43, obtains the process of standard logs tables of data
In, further includes:
Firstly, the log content for pre-processing journal file is extracted, target data is obtained.
Then, according to pre-set target data type, target data is converted into target data type and is handled
As a result.
Finally, aggregation process is as a result, generate standard logs tables of data.
Specifically, reading pretreatment journal file by above-mentioned processing module 43, the content in journal file will be pre-processed
It extracts, is converted to the data content that can store in database, obtains target data.Target data is converted,
Be converted to unified data type.Target data after conversion is summarized, standard logs tables of data is generated, is stored in log
In database, to transfer at any time.
Preferably, as shown in fig. 6, in alternative embodiment provided by the present application, above-mentioned apparatus further include: second obtains module
321, third read module 323 and judgment module 325.
Wherein, second module 321 is obtained, for obtaining the amount of capacity of journal file.
Third read module 323, for reading pre-set capacity threshold, wherein capacity threshold is for judging log
The size of file.
Judgment module 325, for the amount of capacity and capacity threshold according to journal file, judge whether to journal file into
Row segmentation;
Wherein, when the capacity of journal file is greater than capacity threshold, determination is split processing to journal file;
When the capacity of journal file is less than or equal to capacity threshold, determination is not split processing to journal file.
Specifically, module 321, third read module 323 and judgment module 325 are obtained by above-mentioned second, to log text
The amount of capacity of part is judged, when the amount of capacity of journal file is more than or equal to pre-set capacity threshold, to log
File is split processing.When the amount of capacity of journal file is less than pre-set capacity threshold, then not to journal file
It is split processing.
In practical application, in night or other idle periods, website visiting amount is simultaneously little, so the log text generated
Part is relatively small.And very big burden can't be caused to system in the process of processing to lesser journal file.So this
In joined judgment step, judge whether to be split journal file processing.
Further, the segmentation rule of journal file is included at least: fixed number split plot design, fixed capacity split plot design.
Further, when segmentation rule is fixes number split plot design, above-mentioned segmentation module 35 is according to segmentation rule to day
The step of will file is split, and obtains at least two pretreatment journal files include:
Step 1: pre-set segmentation number is read.
Step 2: averagely divide journal file according to segmentation number, obtain the pretreatment journal file of fixed number.
Specifically, through the above steps one and step 2, place is split according to fixed number split plot design to journal file
Reason.Pre-set segmentation number is read, all journal files are averagely divided into the pretreatment for presetting segmentation number
Journal file.
Further, in alternative embodiment provided by the present application, when segmentation rule is fixed capacity split plot design, above-mentioned point
Cutting the step of module 35 is split journal file, obtains at least two pretreatment journal files according to segmentation rule includes:
Step 1: pre-set segmentation capacity is read.
Step 2: being split journal file according to segmentation capacity, if obtaining the identical pretreatment log text of dry capacity
Part.
Specifically, through the above steps one and step 2, place is split according to fixed capacity split plot design to journal file
Reason.The single file size of pre-set pretreatment journal file is read, sequence carries out journal file to journal file
Segmentation, is divided into the pretreatment journal file that capacity etc. is big.In practical application, most of journal file is being divided
To the end, remaining capacity and it is unsatisfactory for pre-set segmentation capacity, at this point it is possible to which remaining log is generated a pre- place
Manage journal file.
In conjunction with actual application, following steps can be divided into:
Step 1: segmentation journal file.Using log partition tools by large log file (such as: journal file capacity is super
Cross 20GB).Journal file is divided into several pretreatments journal file M1, M2 ... Mn.
Step 2: preliminary entry time is modified.The task scheduling of the logreader of halt system and schedulework's
Task scheduling modifies two times configuration in the configuration file of logreader: pretreatment initial time
(lastsuccesstime), pretreatment terminates time (untiltime).According to the pretreatment in the configuration file of Logreader
The corresponding small pretreatment journal file divided is read in preprocessed data by initial time and pretreatment termination time one by one
In library (receiver database).
Step 3: second of entry time of modification.
Allocation Analysis pre-processes the time (postprocess time) of journal file, is set greater than and closest to running through
The integral point time (such as: 10:00,11:00,12:00) of all pretreatment journal files divided.Operating analysis pre-processes day
Will Files step (postprocess).After completing above-mentioned steps, stored using data warehouse technology (ETL).
Step 4: circulation reads journal file.
Step 1 is repeated to step 3, until can not find big journal file to other journal files.
The present invention carry out at analysis with to pretreatment journal file after being split processing to journal file
The control for managing correlation time point can accelerate the performance of processing insertion log database, solve disposably to read in log memory and property
The deficiency of energy.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention
It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way
It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of
Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can
To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit,
It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, mobile terminal, server or network equipment etc.) executes side described in each embodiment of the present invention
The all or part of the steps of method.And storage medium above-mentioned include: USB flash disk, read-only memory (ROM, Read-Only Memory),
Random access memory (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. are various to be can store
The medium of program code.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.