The content of the invention
It is a primary object of the present invention to provide a kind for the treatment of method and apparatus of partition data, to solve in the prior art
The problem of partition data treatment effeciency is low.
To achieve these goals, according to an aspect of the invention, there is provided a kind of processing method of partition data, bag
Include:Value of statistical indicant is obtained, wherein, the initial value of value of statistical indicant is null value;In target partition, the start to process target point at value of statistical indicant
Data in area, wherein, target partition is the corresponding subregion of newly-increased data;And value of statistical indicant is updated to the maximum of newly-increased data
Key assignments.
Further, after value of statistical indicant to be updated to the largest key value of newly-increased data, processing method also includes:Storage mark
Will value to the target location of target partition, wherein, obtain value of statistical indicant include:Value of statistical indicant is obtained from target location.
Further, target partition is multiple, and obtaining value of statistical indicant includes:Obtained from the target location of each target partition
Value of statistical indicant is taken, in target partition, the data at value of statistical indicant in start to process target partition include:In each target partition
In, proceed by data processing at corresponding value of statistical indicant.
Further, target location is determined by increasing the attribute of target partition.
To achieve these goals, should according to another aspect of the present invention there is provided a kind of processing unit of partition data
Processing unit is mainly used in performing the processing method for any partition data that the above of the present invention is provided.
To achieve these goals, there is provided a kind of processing unit of partition data, bag according to another aspect of the present invention
Include:Acquiring unit, for obtaining value of statistical indicant, wherein, the initial value of value of statistical indicant is null value;Processing unit, in target partition
In, the data at value of statistical indicant in start to process target partition, wherein, target partition is the corresponding subregion of newly-increased data;And
Updating block, the largest key value for value of statistical indicant to be updated to newly-increased data.
Further, processing unit also includes:Memory cell, the target location for storage mark value to target partition.
Further, target partition is multiple, and acquiring unit includes multiple acquisition subelements, wherein, it is each to obtain sub single
Member is used to obtain value of statistical indicant from the target location of corresponding target partition, and processing unit includes multiple processing subelements, often
Individual processing subelement is used in corresponding target partition, and data processing is proceeded by corresponding value of statistical indicant.
Further, processing unit also includes:Adding unit, target position is determined for increasing the attribute of target partition
Put.
The present invention is using value of statistical indicant is obtained, and the wherein initial value of value of statistical indicant is null value;In target partition, at value of statistical indicant
Data in start to process target partition, wherein, target partition is the corresponding subregion of newly-increased data;And be updated to value of statistical indicant
The largest key value of newly-increased data, it is to avoid when having newly-increased data in database, all data to whole subregion are handled, and
The position simply terminated from last time data processing proceeds by data processing, solves that partition data treatment effeciency is relatively low to ask
Topic, and then reached the effect for improving partition data treatment effeciency.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
The embodiment of the present invention provides a kind of processing method of partition data, below to the partition data of the embodiment of the present invention
Processing method is specifically introduced:
Fig. 1 is the flow chart of the partition data processing method of the present invention, as shown in figure 1, the processing method of the partition data
Including steps S102 to step S106:
Step S102, obtains value of statistical indicant, the wherein initial value of value of statistical indicant is null value.Ident value be stored in one it is self-defined
In attribute, when first time data processing is carried out, this Custom Attributes should be not present, also just without value of statistical indicant
Record, so to proceed by data processing at first key assignments, then the initial value of value of statistical indicant be null value.
Step S104, in target partition, the data at value of statistical indicant in start to process target partition, wherein, target point
Area is the corresponding subregion of newly-increased data.If not first time carry out data processing, when there is newly-increased data in database, then from
Data processing is proceeded by the position that last data processing terminates in the subregion.Data in so-called processing target partition are
It is by newly-increased data storage to target partition.
Step S106, value of statistical indicant is updated to the largest key value of newly-increased data(Key values).It is complete per a collection of newly-increased data processing
Cheng Hou, the largest key value of the newly-increased data of record, and the occurrence of value of statistical indicant is updated to the largest key value of newly-increased data.Value of statistical indicant
It is the largest key value in the last newly-increased data handled, the position that last data processing terminates is represented with value of statistical indicant.
By obtaining value of statistical indicant, in target partition, the data at value of statistical indicant in start to process target partition will indicate
Value is updated to the largest key value of newly-increased data, it is to avoid when having newly-increased data in database, all data to whole subregion are entered
Row processing, and the position simply terminated from last time data processing proceeds by data processing, solves partition data treatment effeciency
Relatively low the problem of, and then reached the effect for improving partition data treatment effeciency.
Wherein, before value of statistical indicant is obtained, the processing method of the partition data of the embodiment of the present invention also needs first to determine target
Subregion, specific determination mode can be:Judge whether there is the subregion of data variation in database, wherein, in data at judgement
In the case of the subregion for having data variation, the subregion for determining data variation is target partition.
Further, the processing method of the partition data of the embodiment of the present invention also includes:Value of statistical indicant is being updated to increase newly
After the largest key value of data, the target location of storage mark value to target partition, when being identified the acquisition of value again next time,
It is then to obtain value of statistical indicant from target location.
Further, a Custom Attributes can be increased in the attribute list of target partition, i.e. by increasing target
The attribute of subregion determines target location, wherein, Custom Attributes has attribute-name and property value, attribute-name can arbitrarily determine
Justice, value of statistical indicant is property value.Indicated when obtaining value of statistical indicant by the property value of the acquisition Custom Attributes
Value.
Further, multiple subregions have newly-increased data, i.e. target partition to include in the case of multiple, to obtain value of statistical indicant
Value of statistical indicant is obtained from the target location of each target partition.It is in this mesh accordingly for any one target partition
Mark in subregion, the data from this target partition of start to process at its value of statistical indicant, i.e. from this in each target partition
Data processing is proceeded by the value of statistical indicant of subregion.
The embodiment of the present invention also provides a kind of processing unit of partition data, and the processing unit is mainly used in performing the present invention
The processing method for any partition data that embodiment the above is provided, below to the partition data of this method embodiment
Processing unit is specifically introduced:
Fig. 2 is the structural representation of the partitionable data processing arrangement of the present invention, as shown in Fig. 2 the processing of the partition data
Device includes:Acquiring unit 10, processing unit 20 and updating block 30.
Acquiring unit 10 is used to obtain value of statistical indicant, and the wherein initial value of value of statistical indicant is null value.Ident value is stored in one
In Custom Attributes, when first time data processing is carried out, this Custom Attributes should be not present, and also just not have
The record of value of statistical indicant, so to proceed by data processing at first key assignments, then the initial value of value of statistical indicant is null value.
Processing unit 20 is used in target partition, the data at value of statistical indicant in start to process target partition, wherein, mesh
It is the corresponding subregion of newly-increased data to mark subregion.Data processing is carried out if not first time, when there is newly-increased data in database,
Data processing is proceeded by the position that then last data processing terminates from the subregion.Number in so-called processing target partition
According to being by newly-increased data storage to target partition.
Updating block 30 is used for the largest key value that value of statistical indicant is updated to newly-increased data(Key values).Per a collection of newly-increased data
After the completion of processing, the largest key value of the newly-increased data of record, and the occurrence of value of statistical indicant is updated to the largest key value of newly-increased data.
Value of statistical indicant is the largest key value in the newly-increased data of last processing, and the position that last data processing terminates is represented with value of statistical indicant
Put.
By obtaining value of statistical indicant, in target partition, the data at value of statistical indicant in start to process target partition will indicate
Value is updated to the largest key value of newly-increased data, it is to avoid when having newly-increased data in database, all data to whole subregion are entered
Row processing, and the position simply terminated from last time data processing proceeds by data processing, solves partition data treatment effeciency
Relatively low the problem of, and then reached the effect for improving partition data treatment effeciency.
Wherein, the processing unit of the partition data of the embodiment of the present invention also includes the determining unit for determining target partition, tool
Body, determining unit mainly includes judgment sub-unit and determination subelement, wherein, judgment sub-unit be used to judge in database be
The no subregion for having a data variation, in the case of having the subregion of data variation in data at judgement, determination subelement determines data
The subregion of change is target partition.
Further, the processing unit of the partition data of the embodiment of the present invention also includes:Memory cell, for storage mark
It is worth to target location.After value of statistical indicant to be updated to updating block 30 largest key value of newly-increased data, pass through memory cell
Effect stores value of statistical indicant to target location, when being identified the acquisition of value again next time, then is to obtain to mark from target location
Will value.
Further, the processing unit of the partition data of the embodiment of the present invention also includes:Adding unit, for increasing target
The attribute of subregion determines target location.Specifically, adding unit increase in the attribute list of target partition one it is self-defined
Attribute, i.e. determine target location by increasing the attribute of target partition, wherein, Custom Attributes has attribute-name and attribute
Value, attribute-name can be defined arbitrarily, and value of statistical indicant is property value.Acquiring unit 10 is somebody's turn to do when value of statistical indicant is obtained by obtaining
The property value of Custom Attributes obtains value of statistical indicant.
Further, in embodiments of the present invention, the quantity of target partition is multiple, and acquiring unit 10 includes multiple obtain
Subelement, one obtains the mark that subelement accordingly obtains this target partition from the target location of a target partition
Value, i.e. each obtains subelement and is used to obtain value of statistical indicant from the target location of corresponding target partition.Processing unit 20
Including multiple processing subelements, a processing subelement accordingly acts on a target partition, i.e. each processing subelement
For in a target partition, data processing to be proceeded by the value of statistical indicant of this target partition, that is, each is handled
Subelement is used in corresponding target partition, and data processing is proceeded by the value of statistical indicant of the subregion.
Specifically, multiple subregions have newly-increased data, i.e. target partition in the case of multiple, it is necessary to from each target
The target location of subregion obtains the value of statistical indicant of the subregion, and proceeds by data processing at the value of statistical indicant of the subregion.This
In the case of, subelement and processing subelement collaboration one target partition of processing can be obtained by one, i.e. for each
For target partition, there are a corresponding acquisition subelement and processing subelement, and obtain subelement acquisition value of statistical indicant
Method and data processing subelement processing target partition data method with only one of which target partition when method it is identical.
As can be seen from the above description, the problem of partition data treatment effeciency that the present invention is solved is relatively low, reaches
Improve the effect of partition data treatment effeciency.
It should be noted that can be in such as one group computer executable instructions the step of the flow of accompanying drawing is illustrated
Performed in computer system, and, although logical order is shown in flow charts, but in some cases, can be with not
The order being same as herein performs shown or described step.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general
Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and constituted
Network on, alternatively, the program code that they can be can perform with computing device be realized, it is thus possible to they are stored
Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they
In multiple modules or step single integrated circuit module is fabricated to realize.So, the present invention is not restricted to any specific
Hardware and software is combined.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should be included in the scope of the protection.