CN105608204A - Generation method and device for incremental index list - Google Patents

Generation method and device for incremental index list Download PDF

Info

Publication number
CN105608204A
CN105608204A CN201510997495.4A CN201510997495A CN105608204A CN 105608204 A CN105608204 A CN 105608204A CN 201510997495 A CN201510997495 A CN 201510997495A CN 105608204 A CN105608204 A CN 105608204A
Authority
CN
China
Prior art keywords
index
index list
list
newly
former
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.)
Pending
Application number
CN201510997495.4A
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510997495.4A priority Critical patent/CN105608204A/en
Publication of CN105608204A publication Critical patent/CN105608204A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures

Abstract

The invention provides a generation method and device for an incremental index list. The method includes the steps that last indexing time recorded in the index list is read from an index list in which index item information is stored according to the time sequence; the independent incremental index list is created, a storage format the same as that of the index list is adopted, and newly-added index data with the last indexing time as a starting point is sequentially stored; a new index list is generated in combination of the index list and the newly-added incremental index list. By means of the technical scheme, consumed time is short, indexing efficiency is improved, no error is easily caused when indexes are created for newly-added data, and accuracy is guaranteed.

Description

Generation method and the device of increment type index list
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of generation method of increment type index listAnd device.
Background technology
Index is a kind of structure that the value of row or multiple row in database table is sorted. Owing to making index of referenceCustomizing messages in can fast access database table, single-row or multiple row wound that therefore can be based in database tableIndex, form index list. Search corresponding data by the index list creating, accelerate the retrieval of dataSpeed, the while also can be improved the performance of system.
Because the data in database are in continuous increase, in order to meet user's demand, need to be to increasingThe corresponding index entry of data creation, further index list is upgraded.
In prior art, in the time there are newly-increased data in database, be heavy again to all data in databaseIndex corresponding to new establishment, generates new index list. Because the method is to all data in databaseCreate index, therefore create the time that the process of index expends long, efficiency is low, and it is more to take systemResource. In addition, because the Data Update speed in database is very fast, in database, constantly occur newData, once in database, there are new data, just need to be to all data creation indexes in database,Therefore the process that creates index is repeated process, and repeated is all data creation in databaseIndex, the burden of meeting heavy system, even may cause systemic breakdown.
Summary of the invention
In view of the above problems, the present invention has been proposed to provide one to overcome the problems referred to above or at least in partGeneration method and the device of the increment type index list addressing the above problem.
Based on one aspect of the present invention, a kind of generation method of increment type index list is provided, comprising:
Storing according to time sequencing in the former index list of each index entry information, read described index listThe time of the last index of middle record;
Create independently increment index list, adopt the identical storage format of described former index list, to instituteThe newly-increased index data that the time of stating last index is starting point carries out sequential storage;
In conjunction with described former index list and newly-increased increment index list, generate new index list.
Alternatively, after the new index list of described generation, also comprise:
Use described new index list to replace described former index list.
Alternatively, described method also comprises: the last index entry that reads described former index list;
In conjunction with described former index list and newly-increased increment index list, generate new index list, specifically bagDraw together: taking the last index entry in described former index list as binding site, in conjunction with described former index list and described inNewly-increased increment index list, generates new index list.
Alternatively, independently increment index list of described establishment, specifically comprises: adopt and described former index columnShow the state table of identical storage format as described increment index list.
Alternatively, in conjunction with described former index list and described newly-increased increment index list, generate new indexList, specifically comprises:
Set up the first intermediate file text1 and the second intermediate file text2;
In described the second intermediate file text2, write described newly-increased increment index list;
Give described the first intermediate file text1 by the content of described the second intermediate file text2;
In the index file text0 of the described former index list of carrying, continue in chronological order to write described firstThe content of intermediate file text1, to generate described new index list.
Alternatively, the initial state of described the first intermediate file text1 and described the second intermediate file text2 is equalFor space state.
Alternatively, also comprise:
Described new index list is deleted the content in described the second intermediate file text2 after generating;
If there is the increment index list that another is newly-increased, continue the content of this increment index list to writeDelete the described second intermediate file text2 of content.
Alternatively, also comprise:
If described new index list failed regeneration, by described new index list rollback to not in conjunction with described inThe former index list state of newly-increased increment index list.
Based on another aspect of the present invention, also provide a kind of generating apparatus of increment type index list, bagDraw together:
Read module, is suitable for, storing according to time sequencing in the former index list of each index entry information, readingGet the time of the last index of recording in described index list;
Creation module, is suitable for creating independently increment index list, adopts identical the depositing of described former index listStorage form, carries out sequential storage to the time taking described last index as the newly-increased index data of starting point;
Generation module, is suitable for, in conjunction with described former index list and newly-increased increment index list, generating new ropeDraw list.
Alternatively, described device also comprises:
Replacement module, is suitable for using described new index list to replace described former index list.
Alternatively, described read module is also suitable for: the last index entry that reads described former index list;
Described generation module is also suitable for: taking the last index entry in described former index list as binding site, in conjunction withDescribed former index list and described newly-increased increment index list, generate new index list.
Alternatively, described creation module is also suitable for: adopt the shape with the identical storage format of described former index listState table is as described increment index list.
Alternatively, described generation module is also suitable for:
Set up the first intermediate file text1 and the second intermediate file text2;
In described the second intermediate file text2, write described newly-increased increment index list;
Give described the first intermediate file text1 by the content of described the second intermediate file text2;
In the index file text0 of the described former index list of carrying, continue in chronological order to write described firstThe content of intermediate file text1, to generate described new index list.
Alternatively, the initial state of described the first intermediate file text1 and described the second intermediate file text2 is equalFor space state.
Alternatively, described generation module is also suitable for:
Described new index list is deleted the content in described the second intermediate file text2 after generating;
If there is the increment index list that another is newly-increased, continue the content of this increment index list to writeDelete the described second intermediate file text2 of content.
Alternatively, described device also comprises:
Rollback module, if be suitable for described new index list failed regeneration, returns described new index listRetreat to the not former index list state in conjunction with described newly-increased increment index list.
Adopt the method in the embodiment of the present invention, after the data in database change, read index columnThe time of the last index of recording in table, taking time of last index as starting point finds out newly-increased index data,And for newly-increased index data creates increment index list, more former index list and increment index list are tiedClose, generate new index list. Compared with prior art, in the time there is newly-increased index data in database,In the embodiment of the present invention, being only for newly-increased index data creates index, is to be no longer all numbers in databaseAccording to creating index, due to the quantity of newly-increased index data to be far smaller than with database in the quantity of all data,Therefore for newly-increased index data, to create the time that index expends short, improved efficiency, and be newly-increased data woundThe process indexing is comparatively simple, is not easy to occur mistake, has ensured accuracy rate. In addition, when in databaseThe speed of Data Update time, in database, constantly there is newly-increased index data, therefore need repeatedly to weighBe newly-increased index data establishment index again, and the embodiment of the present invention only create index for increasing index data newly,Because the quantity of newly-increased index data is relatively less, avoid because repeatedly repeating to generate rope corresponding to mass dataDraw the systemic breakdown causing.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to better understand technology of the present inventionMeans, and can being implemented according to the content of description, and for allow above and other objects of the present invention,Feature and advantage can become apparent, below especially exemplified by the specific embodiment of the present invention.
According to the detailed description to the specific embodiment of the invention by reference to the accompanying drawings below, those skilled in the art willMore understand above-mentioned and other objects, advantage and feature of the present invention.
Brief description of the drawings
By reading below detailed description of the preferred embodiment, various other advantage and benefit for abilityIt is cheer and bright that territory those of ordinary skill will become. Accompanying drawing is only for the object of preferred embodiment is shown, and alsoDo not think limitation of the present invention. And in whole accompanying drawing, represent identical by identical reference symbolParts. In the accompanying drawings:
Fig. 1 shows the processing stream of the generation method of increment type index list according to an embodiment of the inventionJourney schematic diagram;
Fig. 2 shows the handling process schematic diagram that generates according to an embodiment of the invention new index list;
Fig. 3 shows locating of former according to an embodiment of the invention index list and increment index list combinationReason schematic flow sheet;
Fig. 4 shows the handling process of new according to an embodiment of the invention index list failed regeneration and showsIntention;
Fig. 5 shows the former index column after new according to an embodiment of the invention index list failed regenerationTable and the increment index list handling process schematic diagram of combination again;
Fig. 6 shows the structure of the generating apparatus of increment type index list according to an embodiment of the invention and showsIntention; And
Fig. 7 shows the another kind of the generating apparatus of increment type index list according to an embodiment of the inventionStructural representation.
Detailed description of the invention
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail. Although aobvious in accompanying drawingShow exemplary embodiment of the present disclosure, but should be appreciated that and can realize the disclosure with various formsAnd the embodiment that should do not set forth here limits. On the contrary, providing these embodiment is for can be moreThoroughly understand the disclosure, and can be by the technology that conveys to this area complete the scope of the present disclosurePersonnel.
For solving the problems of the technologies described above, the embodiment of the present invention provides a kind of generation side of increment type index listMethod. Fig. 1 shows the processing stream of the generation method of increment type index list according to an embodiment of the inventionJourney schematic diagram. Referring to Fig. 1, the method at least comprises the following steps S102 to step S106.
In the embodiment of the present invention, first, execution step S102, is storing each index entry according to time sequencingIn the former index list of information, read the time of the last index of recording in index list.
According to the time of the last index reading in step S102, execution step S104, creates independently and increasesAmount index list, adopt the storage format that former index list is identical, to the time taking last index be starting pointNewly-increased index data carry out sequential storage.
Finally, execution step S106, in conjunction with former index list and newly-increased increment index list, generates newIndex list.
Adopt the method in the embodiment of the present invention, after the data in database change, read former indexThe time of the last index of recording in list, taking time of last index as starting point finds out newly-increased index numberAccording to, and for newly-increased index data creates increment index list, more former index list and increment index list are enteredRow combination, generates new index list. Compared with prior art, when occurring newly-increased index data in databaseTime, in the embodiment of the present invention, be only for newly-increased index data creates index, be to be no longer the institute in databaseHave data creation index, due to the quantity of newly-increased index data to be far smaller than with database in all dataQuantity, therefore, for the time that newly-increased index data establishment index expends is short, has improved efficiency, and for newly-increasedThe process of data creation index is comparatively simple, is not easy to occur mistake, has ensured accuracy rate. In addition, work as numberDuring according to the speed of the Data Update in storehouse, in database, constantly there is newly-increased index data, therefore needBe newly-increased index data establishment index over and over again, and the embodiment of the present invention is only for newly-increased index data createIndex, because the quantity of newly-increased index data is relatively less, has avoided because repeatedly repeating to generate mass data pairThe systemic breakdown that the index of answering causes.
Embodiment mono-
In a preferred embodiment of the invention, taking time of the last index in former index list as initialPoint finds out the newly-increased index data in database, for newly-increased index data creates increment index list, with formerLast index entry in index list is binding site, and former index list is combined with newly-increased increment index listTogether, generate new index list.
Particularly, former index list comprises the index entry that initial data is corresponding, for 1-10000 item, works as dataWhile increasing by 1000 data in storehouse, be 1000 newly-increased data creation indexes, generate increment index list.Increment index list comprises newly-increased index entry corresponding to index data, is 1-1000 item. Then by increment ropeThe index entry drawing in list is attached to last index entry place in former index list, and the 10000th place, realizes formerThe combination of index list and newly-increased increment index list, the index entry in the index list of generation is1-11000 item, comprises the primary index item and the newly-increased index entry that generate in order.
In order more former index list and newly-increased increment index list to be carried out to combination, will walkThe increment index list creating in rapid S104, is set to one and has the storage lattice identical with former index listThe state table of formula. Wherein, former index list is identical with the information category in state table, while at least comprising indexBetween, index sequence number etc., and former index list is identical with state tableau format. By former index list and stateWhen table merges, because form is consistent, do not need to carry out uniform format, in addition, due to information categoryUnanimously, directly newly-increased index entry is attached to the last index entry place of former index list, does not need information categoryInconsistent content is carried out additions and deletions.
In order more clearly to understand the state table of establishment and the cohesive process of former index list, Fig. 2 shows rootAccording to the handling process schematic diagram of the new index list of the generation of one embodiment of the invention. Referring to Fig. 2, Fig. 2Comprise former index list, state table and new index list, wherein, former index list, state table and newIndex list in include index time, index sequence number. From former index list, can obtain last indexTime be 2015.12.1515:06, last index entry is the 10000th. With the time of last index2015.12.1515:06 be starting point, find out the newly-increased index data in database, wherein, comprise 1000When the new data of bar. For 1000 newly-increased data creation indexes, and by corresponding newly-increased data 1000In index entry write state table. Finally, by the end of 1000 entry index Xiang Congyuan index list in state tableSecondary index item starts to write, and is written in former index list since the 10000th, generates new indexList. Wherein, the time of the last index in new index list is the 1000th entry index item in state tableBe written to the time 2015.12.1610:58 of new index list, the last index entry in new index list isThe 11000th.
Embodiment mono-has only illustrated taking last index entry as binding site, by former index list and increment index listCarry out the process of combination, in addition, can also select time using last index as binding site, by former indexCombination is carried out in list and increment index list, does not make any restriction in this present invention.
Embodiment bis-
With a specific embodiment, the cohesive process of former index list and increment index list is retouched belowState. Fig. 3 shows locating of former according to an embodiment of the invention index list and increment index list combinationReason schematic flow sheet. Referring to Fig. 3, set up three storage files, i.e. index file text0, first is middleFile text1, the second intermediate file text2. Wherein, index file text0 comprises in former index listAll information, the initial state of the first intermediate file text1 and the second intermediate file text2 is space state.
When occurring for the first time, after newly-increased index data, for newly-increased index data creates index, generating in databaseIncrement index list. By increment index list and former index list carry out in conjunction with time, first increment index is listed asIndex entry information corresponding in table writes the second intermediate file text2, after writing, then by the second middle literary compositionIndex entry information in part text2 is written to the first intermediate file text1, finally the first intermediate file justThe index entry information of text1 is written in the index file text0 of the former index list of carrying, in chronological orderThe index entry information of the first intermediate file text1 is directly imparted to the end place of index file text0, generatesNew index list. Now, in index file text0, store in order index entry corresponding to initial dataThe index entry corresponding with newly-increased index data.
After having given, empty index corresponding to increment index list writing in the second intermediate file text2Information, so that the writing of the index entry in the newly-increased increment index list creating next time.
When the index entry information in the first intermediate file text1 is imparted to after index file text0, the present invention is realExecute example and provide the index entry information directly emptying in the second intermediate file text2, in addition, can also selectSelect and delete the second intermediate file text2. For the concrete mode that empties the second intermediate file text2, the present inventionEmbodiment does not make any restriction.
When occurring for the second time in database after newly-increased index data, continue as newly-increased index data and create index,Generate increment index list. Then index entry information corresponding in the increment index list of this generation is continuedWrite the second intermediate file text2, after writing, then by the index entry letter in the second intermediate file text2Breath is written to the first intermediate file text1, and the index entry information in the second intermediate file text2 writes in firstBetween when file, be equivalent to override the index entry information that is written to for the first time the first intermediate file text1.Or, first create the 3rd intermediate file text3, then by index entry information corresponding in increment index listWrite the second intermediate file text3, after writing, then by the index entry letter in the 3rd intermediate file text3Breath is written to the first intermediate file text1, finally the index entry information of the first intermediate file text1 is written toCarry in the index file text0 of former index list.
Only there is for the first time newly-increased index data, the newly-increased rope of appearance for the second time in database in the embodiment of the present inventionDrawing data instance makes and exemplifying. Because the data in database are constantly being upgraded, when in database the 3rdInferior, the 4th time ... occur for the N time, after newly-increased index data, all can providing according to the embodiment of the present inventionMethod is carried out combination to increment index list and former index list.
Embodiment tri-
In a preferred embodiment of the invention, if new index list failed regeneration for example, will increase newlyIncrement index list and former index list carry out in conjunction with time, due to Installed System Memory deficiency, can not by createCorresponding all index entries in state table are written in former index list, cause in conjunction with failure. Now, willNew index list rollback is not in conjunction with the index list state of newly-increased increment index list.
Particularly, former index list comprises the index entry that initial data is corresponding, is 1-10000 item, stateTable comprises newly-increased index entry corresponding to index data, is 1-1000 item. Former index list and state table are enteredRow in conjunction with time, due to Installed System Memory deficiency, 1000 entry indexs in state table all can not be attached to former ropeThe last index entry place of drawing list, therefore can not generate new index list, and now, index list is not enteredRow upgrades, and returns the state that retreats to former index list. Wherein, the time of the last index in index list,Last index entry does not change, with time, the last index entry of the last index of former index listIdentical.
Particularly, Fig. 4 shows locating of new according to an embodiment of the invention index list failed regenerationReason schematic flow sheet. Fig. 4 comprises former index list, state table and new index list, wherein, and former ropeDraw in list, state table and new index list and include index time, index sequence number. From former index listIn can obtain last index time be 2015.12.1515:06, last index entry is the 10000th. WhenWhile there are 1000 new data in database, be 1000 newly-increased data creation indexes, generation stateTable. The last index entry of 1000 entry index Xiang Congyuan index list in state table is started to write, due toInstalled System Memory deficiency, can only write former index list by the front 500 entry index items in state table, causes newIndex list failed regeneration. Now, index list is not upgraded, and returns the shape that retreats to former index listState, the time of the last index in index list is also 2015.12.1515:06, last index entry is also10000.
When index list rollback is to the state of former index list, in database, increase again 500 newly-increased indexesData, because index list is not upgraded, therefore, taking time of the last index in index list asStarting point, searches newly-increased index data, and wherein, newly-increased index data comprises this newly-increased indexThe newly-increased index data of data and last time, correspondingly, the rope of the newly-increased increment index list of this establishmentDraw item for 1-1500 item.
Particularly, Fig. 5 shows after new according to an embodiment of the invention index list failed regenerationFormer index list and increment index list be the handling process schematic diagram of combination again. Referring to Fig. 5, in Fig. 5, wrapDraw together former index list, state table and new index list, wherein, former index list, state table and new ropeDraw and in list, include index time, index sequence number. From former index list, can obtain last index timeBetween be 2015.12.1515:06, last index entry is the 10000th. New when increasing again 500 in databaseIncrease after index data, find out taking time of the last index in former index list as starting point 1500 newIncrease index data, comprising 1000 the newly-increased index datas of last time in conjunction with failure. Then be newly-increasedArticle 1500, data creation index, generates state table. By 1500 entry index Xiang Congyuan index column in state tableThe last index entry of table starts to write, and generates new index list. Wherein, the last in new index listThe time of index is the time 2015.12.17 that in state table, the 1500th entry index item is written to new index list10:00, the last index entry in new index list is the 11500th.
If new index list failed regeneration, by new index list rollback to not in conjunction with newly-increased increment indexThe index list state of list, in the time again there is newly-increased index data in database, also can inquire last timeNewly-increased index data, and newly-increased index data of last time and this newly-increased index data are created to increment index,Therefore, can not omit newly-increased index data, ensure newly-increased index data all can create corresponding index entry,And then ensure the accuracy of the index list generating.
In a preferred embodiment of the present invention, after execution of step S106 generates new index list,Use new index list to replace former index list, and then externally provide index service by new index list.
Based on same inventive concept, the embodiment of the present invention also provides a kind of generation dress of increment type index listPut, for supporting the generation method of increment type index list of above-mentioned arbitrary embodiment. Fig. 6 shows rootAccording to the structural representation of the generating apparatus of the increment type index list of one embodiment of the invention. Referring to Fig. 6,This device at least comprises:
Read module 610, is suitable for storing according to time sequencing in the former index list of each index entry information,Read the time of the last index of recording in index list;
Creation module 620, is coupled with read module 610, is suitable for creating independently increment index list, adoptsThe storage format that index of reference list is identical, entered as the newly-increased index data of starting point the time taking last indexRow sequential storage;
Generation module 630, is coupled with creation module 620, is suitable in conjunction with former index list and newly-increased incrementIndex list, generates new index list.
In a preferred embodiment of the invention, referring to Fig. 7, the generating apparatus of increment type index list alsoComprise:
Replacement module 640, is coupled with generation module 630, is suitable for using new index list to replace former indexList.
In a preferred embodiment of the invention, read module 610 is also suitable for: read former index listLast index entry;
Generation module 630 is also suitable for: taking the last index entry in former index list as binding site, in conjunction with former ropeDraw list and newly-increased increment index list, generate new index list.
In a preferred embodiment of the invention, creation module 620 is also suitable for: adopt and former index listThe state table of identical storage format is as increment index list.
In a preferred embodiment of the invention, generation module 630 is also suitable for:
Set up the first intermediate file text1 and the second intermediate file text2;
In the second intermediate file text2, write newly-increased increment index list;
Give the first intermediate file text1 by the content of the second intermediate file text2;
In the index file text0 of the former index list of carrying, continue in chronological order to write the first intermediate fileThe content of text1, to generate new index list.
In a preferred embodiment of the invention, the first intermediate file text1 and the second intermediate file text2Initial state be space state.
In a preferred embodiment of the invention, generation module 630 is also suitable for:
After new index list generates, delete the content of the second intermediate file text2;
If there is the increment index list that another is newly-increased, continue the content of this increment index list to writeDelete the second intermediate file text2 of content.
In a preferred embodiment of the invention, referring to Fig. 7, the generating apparatus of increment type index list alsoComprise:
Rollback module 650, is coupled with generation module 630, if be suitable for new index list failed regeneration,By new index list rollback to not in conjunction with the former index list state of newly-increased increment index list.
Generation method and the device of the increment type index list that to sum up, the employing embodiment of the present invention provides can reachArrive following beneficial effect:
Adopt method and device in the embodiment of the present invention, after the data in database change, readThe time of the last index of recording in index list, taking time of last index as starting point finds out newly-increased ropeArgument certificate, and for newly-increased index data creates increment index list, then by former index list and increment index rowTable carries out combination, generates new index list. Compared with prior art, when occurring newly-increased index in databaseWhen data, being only for newly-increased index data creates index in the embodiment of the present invention, is no longer in databaseAll data creation indexes, due to the quantity of newly-increased index data to be far smaller than with database in all numbersAccording to quantity, therefore for newly-increased index data, to create the time that index expends short, improved efficiency, and beThe process of newly-increased data creation index is comparatively simple, is not easy to occur mistake, has ensured accuracy rate. In addition,In the time of the speed of the Data Update in database, in database, constantly there is newly-increased index data, thereforeNeed to be newly-increased index data establishment index over and over again, and the embodiment of the present invention be only newly-increased index dataCreate index, because the quantity of newly-increased index data is relatively less, avoided because repeatedly repeating to generate a large amount of numbersThe systemic breakdown causing according to corresponding index.
In the description that provided herein, a large amount of details are described. But, can understand, thisBright embodiment can put into practice in the situation that there is no these details. In some instances, not detailedKnown method, structure and technology are shown, so that not fuzzy understanding of this description.
Similarly, should be appreciated that for simplify the disclosure and help to understand in each inventive aspect one orMultiple, in the above in the description of exemplary embodiment of the present invention, each feature of the present invention is sometimes by oneRise and be grouped into single embodiment, figure or in its description. But, should be by the method for the disclosureBe construed to the following intention of reflection: the present invention for required protection requires clearer and more definite than institute in each claimThe more feature of feature of recording. Or rather, as reflected in claims below, send outBright aspect is to be less than all features of disclosed single embodiment above. Therefore, follow detailed description of the inventionClaims be incorporated to clearly thus this detailed description of the invention, wherein each claim conduct itselfIndependent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out adaptive to the module in the equipment in embodimentChange to answering property and they are arranged in one or more equipment different from this embodiment. Can be realityExecute module in example or unit or assembly and be combined into a module or unit or assembly, and in addition can be itBe divided into multiple submodules or subelement or sub-component. Except in such feature and/or process or unitAt least some are outside mutually repelling, and can adopt any combination (to comprise that the right of following will to this descriptionAsk, summary and accompanying drawing) in disclosed all features and disclosed any method or equipment all like thisProcess or unit combine. Unless clearly statement in addition, this description (comprise the claim followed,Summary and accompanying drawing) in disclosed each feature can be by providing identical, be equal to or the alternative features of similar objectReplace.
In addition, although those skilled in the art will appreciate that embodiment more described herein comprise otherIncluded some feature instead of further feature in embodiment, but the combination of the feature of different embodiment meaningTaste within scope of the present invention and is formed different embodiment. For example, in claims,The one of any of embodiment required for protection can be used with combination arbitrarily.
All parts embodiment of the present invention can realize with hardware, or with at one or more processorThe software module of upper operation realizes, or realizes with their combination. It will be understood by those of skill in the art thatCan use in practice microprocessor or digital signal processor (DSP) to realize real according to the present inventionExecute the some or all merits of the some or all parts in the generating apparatus of routine increment type index listEnergy. The present invention can also be embodied as part or all the equipment for carrying out method as described hereinOr device program (for example, computer program and computer program). Realizing is like this of the present inventionProgram can be stored on computer-readable medium, or can have the form of one or more signal.Such signal can be downloaded and obtain from internet website, or provides on carrier signal, or to appointWhat his form provides.
It should be noted above-described embodiment the present invention will be described instead of limit the invention, andAnd those skilled in the art can design to replace and implement in the case of not departing from the scope of claimsExample. In the claims, any reference symbol between bracket should be configured to claimRestriction. Word " comprises " not to be got rid of existence and is not listed as element or step in the claims. Be positioned at element itBefore word " " or " one " do not get rid of and have multiple such elements. The present invention can be by means of bagDraw together the hardware of some different elements and realize by means of the computer of suitably programming. Enumerated someIn the unit claim of device, several in these devices can be to come specifically by same hardware branchEmbody. The use of word first, second and C grade does not represent any order. Can be by these word solutionsBe interpreted as title.
So far, although those skilled in the art will appreciate that and detailedly herein illustrate and described of the present inventionMultiple exemplary embodiments, still, without departing from the spirit and scope of the present invention, still can be according to thisDisclosure of invention is directly determined or is derived many other modification or the amendment that meet the principle of the invention. CauseThis, scope of the present invention should be understood and regard as and cover all these other modification or amendments.
Based on one aspect of the present invention, also disclose: a kind of generation method of A1, increment type index list,Comprise:
Storing according to time sequencing in the former index list of each index entry information, read described index listThe time of the last index of middle record;
Create independently increment index list, adopt the identical storage format of described former index list, to instituteThe newly-increased index data that the time of stating last index is starting point carries out sequential storage;
In conjunction with described former index list and newly-increased increment index list, generate new index list.
A2, according to the method described in A1, wherein, after the new index list of described generation, also comprise:
Use described new index list to replace described former index list.
A3, according to the method described in A1 or A2, wherein,
Described method also comprises: the last index entry that reads described former index list;
In conjunction with described former index list and newly-increased increment index list, generate new index list, specifically bagDraw together: taking the last index entry in described former index list as binding site, in conjunction with described former index list and described inNewly-increased increment index list, generates new index list.
A4, according to the method described in A1 to A3 any one, wherein, independently increment index of described establishmentList, specifically comprises: adopt with the state table of the identical storage format of described former index list as described incrementIndex list.
A5, according to the method described in A4, wherein, in conjunction with described former index list and described newly-increased incrementIndex list, generates new index list, specifically comprises:
Set up the first intermediate file text1 and the second intermediate file text2;
In described the second intermediate file text2, write described newly-increased increment index list;
Give described the first intermediate file text1 by the content of described the second intermediate file text2;
In the index file text0 of the described former index list of carrying, continue in chronological order to write described firstThe content of intermediate file text1, to generate described new index list.
A6, according to the method described in A5, wherein, in described the first intermediate file text1 and described secondBetween the initial state of file text2 be space state.
A7, according to the method described in A5 or A6, wherein, also comprise:
Described new index list is deleted the content in described the second intermediate file text2 after generating;
If there is the increment index list that another is newly-increased, continue the content of this increment index list to writeDelete the described second intermediate file text2 of content.
A8, according to the method described in A1 to A7 any one, wherein, also comprise:
If described new index list failed regeneration, by described new index list rollback to not in conjunction with described inThe former index list state of newly-increased increment index list.
Based on another aspect of the present invention, also disclose: the generation dress of B9, a kind of increment type index listPut, comprising:
Read module, is suitable for, storing according to time sequencing in the former index list of each index entry information, readingGet the time of the last index of recording in described index list;
Creation module, is suitable for creating independently increment index list, adopts identical the depositing of described former index listStorage form, carries out sequential storage to the time taking described last index as the newly-increased index data of starting point;
Generation module, is suitable for, in conjunction with described former index list and newly-increased increment index list, generating new ropeDraw list.
B10, according to the device described in B9, wherein, described device also comprises:
Replacement module, is suitable for using described new index list to replace described former index list.
B11, according to the device described in B9 or B10, wherein, described read module is also suitable for: read instituteState the last index entry of former index list;
Described generation module is also suitable for: taking the last index entry in described former index list as binding site, in conjunction withDescribed former index list and described newly-increased increment index list, generate new index list.
B12, according to the device described in B9 to B11 any one, wherein, described creation module is also suitable for:Adopt with the state table of the identical storage format of described former index list as described increment index list.
B13, according to the device described in B12, wherein, described generation module is also suitable for:
Set up the first intermediate file text1 and the second intermediate file text2;
In described the second intermediate file text2, write described newly-increased increment index list;
Give described the first intermediate file text1 by the content of described the second intermediate file text2;
In the index file text0 of the described former index list of carrying, continue in chronological order to write described firstThe content of intermediate file text1, to generate described new index list.
B14, according to the device described in B13, wherein, described the first intermediate file text1 and described secondThe initial state of intermediate file text2 is space state.
B15, according to the device described in B13 or B14, wherein, described generation module is also suitable for:
Described new index list is deleted the content in described the second intermediate file text2 after generating;
If there is the increment index list that another is newly-increased, continue the content of this increment index list to writeDelete the described second intermediate file text2 of content.
B16, according to the device described in B9 to B15 any one, wherein, described device also comprises:
Rollback module, if be suitable for described new index list failed regeneration, returns described new index listRetreat to the not former index list state in conjunction with described newly-increased increment index list.

Claims (10)

1. a generation method for increment type index list, comprising:
Storing according to time sequencing in the former index list of each index entry information, read described index listThe time of the last index of middle record;
Create independently increment index list, adopt the identical storage format of described former index list, to instituteThe newly-increased index data that the time of stating last index is starting point carries out sequential storage;
In conjunction with described former index list and newly-increased increment index list, generate new index list.
2. method according to claim 1, wherein, after the new index list of described generation, alsoComprise:
Use described new index list to replace described former index list.
3. method according to claim 1 and 2, wherein,
Described method also comprises: the last index entry that reads described former index list;
In conjunction with described former index list and newly-increased increment index list, generate new index list, specifically bagDraw together: taking the last index entry in described former index list as binding site, in conjunction with described former index list and described inNewly-increased increment index list, generates new index list.
4. according to the method described in claims 1 to 3 any one, wherein, independently increment of described establishmentIndex list, specifically comprises: adopt with the state table of the identical storage format of described former index list as describedIncrement index list.
5. method according to claim 4, wherein, in conjunction with described former index list and described newly-increasedIncrement index list, generate new index list, specifically comprise:
Set up the first intermediate file text1 and the second intermediate file text2;
In described the second intermediate file text2, write described newly-increased increment index list;
Give described the first intermediate file text1 by the content of described the second intermediate file text2;
In the index file text0 of the described former index list of carrying, continue in chronological order to write described firstThe content of intermediate file text1, to generate described new index list.
6. method according to claim 5, wherein, described the first intermediate file text1 and describedThe initial state of two intermediate file text2 is space state.
7. according to the method described in claim 5 or 6, wherein, also comprise:
Described new index list is deleted the content in described the second intermediate file text2 after generating;
If there is the increment index list that another is newly-increased, continue the content of this increment index list to writeDelete the described second intermediate file text2 of content.
8. according to the method described in claim 1 to 7 any one, wherein, also comprise:
If described new index list failed regeneration, by described new index list rollback to not in conjunction with described inThe former index list state of newly-increased increment index list.
9. a generating apparatus for increment type index list, comprising:
Read module, is suitable for, storing according to time sequencing in the former index list of each index entry information, readingGet the time of the last index of recording in described index list;
Creation module, is suitable for creating independently increment index list, adopts identical the depositing of described former index listStorage form, carries out sequential storage to the time taking described last index as the newly-increased index data of starting point;
Generation module, is suitable for, in conjunction with described former index list and newly-increased increment index list, generating new ropeDraw list.
10. device according to claim 9, wherein, described device also comprises:
Replacement module, is suitable for using described new index list to replace described former index list.
CN201510997495.4A 2015-12-25 2015-12-25 Generation method and device for incremental index list Pending CN105608204A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510997495.4A CN105608204A (en) 2015-12-25 2015-12-25 Generation method and device for incremental index list

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510997495.4A CN105608204A (en) 2015-12-25 2015-12-25 Generation method and device for incremental index list

Publications (1)

Publication Number Publication Date
CN105608204A true CN105608204A (en) 2016-05-25

Family

ID=55988143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510997495.4A Pending CN105608204A (en) 2015-12-25 2015-12-25 Generation method and device for incremental index list

Country Status (1)

Country Link
CN (1) CN105608204A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145529A (en) * 2017-04-17 2017-09-08 东软集团股份有限公司 A kind of data processing method and device
CN111723246A (en) * 2019-03-20 2020-09-29 京东数字科技控股有限公司 Data processing method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1811759A (en) * 2005-01-26 2006-08-02 华为技术有限公司 Method for building information increment index
CN1877583A (en) * 2006-07-12 2006-12-13 百度在线网络技术(北京)有限公司 Accessing identification index system and accessing identification index library generation method
WO2010145575A1 (en) * 2009-09-21 2010-12-23 中兴通讯股份有限公司 Method and device for updating index in terminal and sequencing search results based on updated index
CN101930481A (en) * 2009-06-22 2010-12-29 华东电网有限公司 Method used for generating CIM model describing power grid change in designated time slot and system thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1811759A (en) * 2005-01-26 2006-08-02 华为技术有限公司 Method for building information increment index
CN1877583A (en) * 2006-07-12 2006-12-13 百度在线网络技术(北京)有限公司 Accessing identification index system and accessing identification index library generation method
CN101930481A (en) * 2009-06-22 2010-12-29 华东电网有限公司 Method used for generating CIM model describing power grid change in designated time slot and system thereof
WO2010145575A1 (en) * 2009-09-21 2010-12-23 中兴通讯股份有限公司 Method and device for updating index in terminal and sequencing search results based on updated index
EP2482199A4 (en) * 2009-09-21 2012-12-19 Zte Corp Method and device for updating index in terminal and sequencing search results based on updated index

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145529A (en) * 2017-04-17 2017-09-08 东软集团股份有限公司 A kind of data processing method and device
CN107145529B (en) * 2017-04-17 2020-04-07 东软集团股份有限公司 Data processing method and device
CN111723246A (en) * 2019-03-20 2020-09-29 京东数字科技控股有限公司 Data processing method, device and storage medium
CN111723246B (en) * 2019-03-20 2024-04-05 京东科技控股股份有限公司 Data processing method, device and storage medium

Similar Documents

Publication Publication Date Title
EP3355194A1 (en) File system directory tree repair method and device
CN103902698A (en) Data storage system and data storage method
US20100198881A1 (en) Method of data storage and management
CN102298607A (en) Schema contracts for data integration
CN103699624B (en) Browser data processing method and device
CN103902702A (en) Data storage system and data storage method
CN104951507A (en) Method and device for clearing up files in mobile terminal applications
CN102033885A (en) Method and system for XPath execution in XML (extensible markup language) data storage bank
CN110162525A (en) Read/write conflict solution, device and storage medium based on B+ tree
CN102654863A (en) Real-time database history data organizational management method
CN102004787A (en) Method for combining multiple application scene forms based on office software plugins
US9037611B2 (en) Generation of a user interface based on a relational data model
CN105677805B (en) A kind of data storage, read method and device using protobuf
CN108196792A (en) Remove the method and device of stale data
CN105608204A (en) Generation method and device for incremental index list
CN102609531B (en) Method for pegging files according to keywords
CN102169497B (en) Method and device for managing metadata through bitmaps
CN104253903A (en) Method and device for searching information
Skurczyński The Borel hierarchy is infinite in the class of regular sets of trees
CN110659295B (en) Method, apparatus and medium for recording valid data based on HAWQ
CN108038253A (en) A kind of processing method and processing device of log query
CN111190895B (en) Organization method, device and storage medium of column-type storage data
WO2014014876A1 (en) Multi-dimensional file system
CN108595450B (en) Buried point database construction method, buried point database and buried point query method
CN105426541A (en) General data storing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160525

RJ01 Rejection of invention patent application after publication