CN107291768A - It is a kind of to index the method and device set up - Google Patents

It is a kind of to index the method and device set up Download PDF

Info

Publication number
CN107291768A
CN107291768A CN201610220796.0A CN201610220796A CN107291768A CN 107291768 A CN107291768 A CN 107291768A CN 201610220796 A CN201610220796 A CN 201610220796A CN 107291768 A CN107291768 A CN 107291768A
Authority
CN
China
Prior art keywords
data
index
information table
status
time
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.)
Granted
Application number
CN201610220796.0A
Other languages
Chinese (zh)
Other versions
CN107291768B (en
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610220796.0A priority Critical patent/CN107291768B/en
Publication of CN107291768A publication Critical patent/CN107291768A/en
Application granted granted Critical
Publication of CN107291768B publication Critical patent/CN107291768B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • 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

This application discloses a kind of method and device for indexing and setting up, this method is when setting up index, each data that lithol yet to be built draws are determined first, the data type of each data is determined again, determine therefrom that the priority of each data, and according to the priority of each data, it is defined as the time that each data set up index, wherein, for any two data, if the priority of two data is different, the time indexed is then set up for two data also different, for each data, it is determined that the time for setting up index for the data reach when, set up and index for the data.By the above method, there are substantial amounts of data in database while when updating, setting up and indexing in index database respectively according to the different time by each data by way of priority, effectively reduce the operating pressure of index database.

Description

It is a kind of to index the method and device set up
Technical field
The application is related to field of computer technology, more particularly to a kind of method and device for indexing foundation.
Background technology
With the continuous development of network technology, people have been become increasingly prevalent by Network Capture data.
At present, required data are found in order to allow user's more convenient and quicker, it usually needs according to number According to the data stored in storehouse, the corresponding index of data is set up in index database, and index database is externally supplied to User, subsequently, user can be by using the index databases, the data searched for needed for oneself.
During the entire process of index database is set up, index manager sends to carry and waits to set up to index database first The foundation index request of the data of index, and index database is after receiving and setting up index request, directly according to building Lithol draws the data carried in request, sets up index.
Subsequently, the data in database are possible to can have more news, e.g., have increased data newly, in order to The efficiency that index database sets up index is improved, therefore, after the data in database update, directly using increment The mode of index, the data to the renewal in database set up index, and increment index is referred to only to database In have increase, change, delete data, set up index.
The final updating that index manager can carry each data per being sent at regular intervals to index database The increment index request of time, index database is after the increment index request of index manager transmission is received, directly The final updating time of each data carried during increment index is asked is connect, with each data in index database Finally setting up the index time is contrasted, if the final updating of each data carried in increment index request Time is no more than the last foundation index time of each data in index database, then the data in database of descriptions are all Index is established in index database, that is to say, that the data in database do not occur more news, Index database begs off from doing any processing according to the increment index, if the every line number carried in increment index request According to the final updating time exceed the last foundation of each data in index database and index the time, then database of descriptions The middle data existed in index database foundation index, that is to say, that the data in database occur in that renewal Situation, index database directly obtains the data of renewal from database, and sets up index according to the data of renewal.
But, in the prior art, if there is more news, index manager in the data in database The data all updated can be added in index database simultaneously, index database is set up according to the data all updated Index, so has substantial amounts of data while when there is more news, will certainly give index database in database Bring very big operating pressure.
The content of the invention
The embodiment of the present application provides a kind of method and device for indexing and setting up, to solve in the prior art in number During according to there are substantial amounts of data more news occur in storehouse, very big operating pressure will certainly be brought to index database The problem of.
The method that a kind of index that the embodiment of the present application is provided is set up, methods described includes:
Determine each data that lithol yet to be built draws;
Determine the data type of each data;
According to the data type of each data, the priority of each data is determined;
According to the priority of each data, it is defined as the time that each data set up index, wherein, pin To any two data, if the priority of two data is different, the time of index is set up for two data It is different;
For each data, it is determined that the time for setting up index for the data reach when, built for the data Lithol draws.
The device that a kind of index that the embodiment of the present application is provided is set up, described device includes:
Data determining module, for determining each data that lithol yet to be built draws;
Data type determining module, the data type for determining each data;
Priority Determination module, for the data type according to each data, determines the priority of each data;
Index time determining module, for the priority according to each data, is defined as each data and builds The time that lithol draws, wherein, for any two data, if the priority of two data is different, for two The time that individual data set up index is also different;
Index sets up module, for for each data, it is determined that the time that index is set up for the data During arrival, set up and index for the data.
The embodiment of the present application provides a kind of method and device for indexing and setting up, and this method is first when setting up index Each data that lithol yet to be built draws first are determined, then determine the data type of each data, the excellent of each data is determined therefrom that First level, and according to the priority of each data, it is defined as the time that each data set up index, wherein, for appointing Two data of meaning, if the priority of two data is different, the time for setting up index for two data is also different, For each data, it is determined that the time for setting up index for the data reach when, set up and index for the data. By the above method, there are substantial amounts of data in database while when updating, passing through priority Each data are set up and indexed by mode in index database respectively according to the different time, effectively reduce index database Operating pressure.
Brief description of the drawings
Accompanying drawing described herein is used for providing further understanding of the present application, constitutes the part of the application, The schematic description and description of the application is used to explain the application, does not constitute the improper limit to the application It is fixed.In the accompanying drawings:
The process that Fig. 1 sets up for the index that the embodiment of the present application is provided;
The schematic diagram for the index establishing system that Fig. 2 provides for the embodiment of the present application;
The apparatus structure schematic diagram that Fig. 3 sets up for the index that the embodiment of the present application is provided.
Embodiment
It is specifically real below in conjunction with the application to make the purpose, technical scheme and advantage of the application clearer Apply example and technical scheme is clearly and completely described corresponding accompanying drawing.Obviously, it is described Embodiment is only some embodiments of the present application, rather than whole embodiments.Based on the implementation in the application Example, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of the application protection.
The process that Fig. 1 sets up for the index that the embodiment of the present application is provided, specifically includes following steps:
S101:Determine each data that lithol yet to be built draws.
In actual applications, in order to allowing user more efficiently to find required data, it usually needs According to the data stored in database, the corresponding index of data is set up in index database, and index database is externally carried Supply user.
In the embodiment of the present application, the system that whole index is set up, as shown in Figure 2.
Further, set up for data during the entire process of index, the application determines that lithol yet to be built draws first Each data, and determine that each data that lithol yet to be built draws are completed by the index manager shown in Fig. 2.
Which data index is set up on earth because index manager needs to know, therefore, in this application, The corresponding index information table of all data can be extracted by index manager, it is determined that each index information extracted The Index Status included in table, by the data that Index Status is state to be indexed or status of fail, as yet to be built The data that lithol draws.
At this it should be noted that index information table is stored in the index information Table storehouse in Fig. 2, each data To one index information table of reply, the Index Status of data, different ropes are have recorded in the index information table Draw state and reflect the situation that index is set up for data, three kinds of Index Status can be divided into, i.e. shape to be indexed State, success status, status of fail, that is to say, that the index information table pair is able to know that by Index Status Whether the data answered establish index in index database, also, in order to reduce depositing for index information Table storehouse Store up pressure, therefore, the mark of data is have recorded in index information table, subsequently, index manager can for this When corresponding data are indexed in index information table, directly found according to the mark of data in database Data.
For example, it is assumed that the internal staff for convenience of certain enterprise conveniently obtains the industry of enterprises Business data, then establish index database and be supplied to internal staff, in order to the simple clearly explanation present invention's Implementation steps, it is assumed that only include index information table as shown in table 1 in index information Table storehouse:
Table 1
Index information table as shown in table 1, is extracted in table 1 in index manager scanning index information Table storehouse Comprising state to be indexed (that is, Index Status), and using the business datum A of state to be indexed as yet to be built The data that lithol draws, and perform step S102.
S102:Determine the data type of each data.
S103:According to the data type of each data, the priority of each data is determined.
Because in actual applications, data are typically to have type, e.g., and each data correspond to different industry Service type, and different types of data are made a difference point, also have real-time point, therefore, , can be real by data according to importance in order to reduce the pressure that index database sets up index for data in the application When property distinguishes priority, that is to say, that the data priority that importance is higher, real-time is higher is just high, The data priority that importance is relatively low, real-time is relatively low is just relatively low, and in this application, can using P0, P1, P2 ... Pn mode represent priority, wherein, n is bigger, illustrate that priority is lower.
In addition, it is determined that each data priority when, each data can not also be determined according to the type of data Priority, e.g., can manually set the priority of each data, subsequently, Sync Manager previously according to experience The priority of default each data can directly be determined.
Therefore, Sync Manager is after each data that lithol yet to be built draws are determined, it may be determined that the data of each data Type, and according to the data type of each data, determine the priority of each data.
Continuation of the previous cases, it is assumed that Sync Manager determines business datum A data type, and according to the data Type, determines business datum A priority for P1, that is, priority as shown in table 1.
S104:According to the priority of each data, it is defined as the time that each data set up index.
In this application, the priority of each data is different, then the time that index is set up for the data is just different, That is, for any two data, if the priority of two data is different, being set up for two data The time of index is also different.
Therefore, in this application, Sync Manager is after the priority of each data is determined, index manager Need the priority according to each data different, be defined as the time that each data set up index, and the application exists This provides a kind of mode for the time for determining each data foundation index:It is corresponding according to default each priority In the cycle, it is defined as each data and sets up the index corresponding cycle, the corresponding cycle is indexed according to being set up for each data And current time, it is defined as the time that each data set up index, that is to say, that each data are corresponding is The time that the data set up index is on the basis of current time, to add the priority corresponding cycle, wherein, For any two data, if the priority of two data is different, index is set up for two data corresponding Cycle is also different.
Continuation of the previous cases, it is assumed that P0 cycle is 0 minute, P1 cycle is 1 minute, and P2 cycle is 2 Minute ... Pn cycle is n minutes, poor 1 minute between two neighboring priority, therefore, management by synchronization Device is after business datum A priority P 1 is determined, it is assumed that current time is 12:10, then index manager According to business datum A priority P 1, the time for being defined as business datum A foundation indexes is 12:11.
S105:For each data, it is determined that the time for setting up index for the data reach when, for this Data set up index.
In this application, for having confirmed each data of priority, when set up for the data index when Between when reaching, index manager can be according to the Data Identification in the corresponding index information table of the data, from data The corresponding data of the Data Identification are inquired in storehouse, and are sent the data in index database, index database is should Data set up index.
Further, since in actual applications, different types of data are when setting up index, and the mode of foundation is led to It is often different, the code difference of the index process instrument for setting up index is being write so as to result in, If that is, increasing the data of a data type newly, needing to write the generation of index process instrument again Code, therefore, when setting up index for data, can be directed to different types of data, using different indexes Processor sets up index, so, even if subsequently newly increasing a type of data, it is only necessary to for the type Data, increase newly an index processor, the code of original index processor without changing.
Herein it should be noted that index processor can be IndexHandler as shown in Figure 2, for Different types of data, can create different IndexHandler, subsequently, can will be variant IndexHandler is commonly connected in task distributor as shown in Figure 2, and work as needs to set up for data every time During index, bottom can be determined to by the task distributor needs come for the number by which IndexHandler Indexed according to setting up.
Continuation of the previous cases, index manager is determining that for the time of business datum A foundation indexes be 12:After 11, It is 12 until index manager current queries go out current time:11, i.e. it is determined that for business datum A When the time for setting up index reaches, index manager uses the corresponding index process instruments of business datum A, root According to the business datum A and user A in index information table, inquire business datum A's in database Total data, index database is sent to by business datum A total data, and index database is business datum A's Total data sets up index.
By the above method, there are substantial amounts of data in database while when updating, by preferential Each data are set up and indexed by the mode of level in index database respectively according to the different time, effectively reduce rope Draw the operating pressure in storehouse.
Because in actual applications, more news occurs in the data in database, i.e. occur it is newly-increased, Change, situation about deleting, therefore, in this application, are regularly supervised by the Sync Manager shown in Fig. 2 The change of data in database is surveyed, specifically, for any data in database, passing through Sync Manager Whether the data corresponding final updating time in monitor database exceedes the corresponding index information of the data The final updating time included in table, when monitor the corresponding final updating time of the data in database surpass When spending the final updating time included in the corresponding index information table of the data, if the data are in corresponding rope Draw in information table and be not present, then increase the data newly in index information table and the Index Status of the data is set It is directly that the data are corresponding if the data are already present in index information table for state to be indexed Index Status in index information table is changed to state to be indexed.
For example, in Sync Manager monitor database data change, it is assumed that the data B in database is Exist in index information table, and 120:00 is updated, and now Sync Manager monitors B pairs of data The final updating time 12 answered:00 has exceeded the final updating included in the corresponding index information tables of data B Time 11:50, therefore, the Index Status in the corresponding index information tables of data B is changed to be indexed State.
In view of in practical application, in order to be easy to follow-up management and inquiry to set up the situation of index for data, Therefore, in this application, the data drawn for any lithol yet to be built, when setting up index failure for the data, Index Status in the corresponding index information table of the data is changed to by status of fail by Sync Manager, and And the frequency of failure included in the corresponding index information table of the data plus 1, indexed into when being set up for the data During work(, the Index Status in the corresponding index information table of the data is changed to successfully by shape by Sync Manager State, and the frequency of failure included in the corresponding index information table of the data is set to 0, when data correspondence Index information table in Index Status be status of fail, and the frequency of failure exceed default threshold value when, not for The data set up index.
Herein it should be noted that the data drawn for any lithol yet to be built, lose when setting up index for the data Lose, but the frequency of failure is when being not above default threshold value, can be by index manager according to the excellent of the data The first level corresponding cycle, it is determined that the time for setting up index again for the data (e.g., can directly be before When the data set up index failure on the basis of the corresponding moment, the priority directly plus the data is corresponding A cycle), and when being that the data set up the time arrival of index again, set up and index for the data.
Continue the example in step S105, index manager sets up rope in the total data for business datum A During drawing, it may cause to set up index failure because system is unstable, then by business datum A correspondences Index information table in Index Status be changed to status of fail, and the corresponding indexes of business datum A are believed The frequency of failure included in breath table plus 1, as shown in table 2:
Table 2
Subsequently, index manager is determined is not above for the business datum A frequency of failures for setting up index failure 3 times (assuming that default threshold value is 3 times), according to the business datum A priority corresponding cycle, i.e. 1 Minute, it is determined that the time for being again business datum A foundation indexes is 12:12 (assuming that using mentioned above It is determined that the mode of the time of index is set up for the data again), the time of index is being set up for business datum A During arrival, i.e. 12:12, index is set up for business datum A total data again, and successfully set up Index, then be changed to success status by the Index Status in the corresponding index information tables of business datum A, And the frequency of failure included in the corresponding index information tables of business datum A is set to 0, as shown in table 3:
Table 3
In addition, the data drawn for any lithol yet to be built, when setting up index failure for the data, Ke Yi The reason for index failure is set up in addition in the corresponding index information table of the data, subsequently, can believe according to the index The reason for ceasing the foundation index failure in table, takes appropriate measures and is lost to prevent from occurring again such index Lose.
In actual applications, it is possible to which certain data existed in database are deleted, and are also existed in index database The situation of the data, therefore, in this application, can be determined to be deleted in database by Sync Manager Each data, according to each data to be deleted determined, by Sync Manager by each data to be deleted Corresponding index information table is marked, subsequently, and the index information table pair of mark is determined by index manager The index for the data answered, the index determined is marked, and index database can be swept at set time intervals The markd index of tool is retouched, and the markd index of the tool scanned is deleted, rope is reduced so as to effective Draw the peak pressure in storehouse.
For example, it is assumed that database deletes data A, now Sync Manager starts scan database, Business datum A to be deleted is determined, and according to business datum A to be deleted is determined, directly treats and deletes The corresponding index information tables of business datum A removed are marked, as shown in table 4:
Table 4
Index manager determines the corresponding business datum A's of index information table (that is, table 4) in index database Index, the index determined is marked, subsequently, index database can scan tool at set time intervals Markd index, and the markd index of the tool scanned is deleted.
Herein it should be noted that why using above by the corresponding index information table of each data to be deleted The mode being marked, is primarily due in order to which the system do not set up to whole index increases extra operation pressure Power, is simply marked to the index determined in index database, represents that the data have been deleted in index database Remove, but be not really to delete, simply user is when searching for the data related to the data, Bu Huixiang User provides the data.
The method set up above for a kind of index that the embodiment of the present application is provided, based on same thinking, this Shen Please embodiment additionally provide it is a kind of index set up device, as shown in Figure 3.
The apparatus structure schematic diagram that Fig. 3 sets up for the index that the embodiment of the present application is provided, described device includes:
Data determining module 301, for determining each data that lithol yet to be built draws;
Data type determining module 302, the data type for determining each data;
Priority Determination module 303, for the data type according to each data, determines the excellent of each data First level;
Index time determining module 304, for the priority according to each data, is defined as each number According to the time for setting up index, wherein, for any two data, if the priority of two data is different, The time for setting up index for two data is also different;
Index sets up module 305, for for each data, it is determined that set up index for the data When time reaches, set up and index for the data.
The data determining module 301 by index manager specifically for extracting the corresponding rope of all data Draw information table, it is determined that the Index Status included in each index information table extracted, is to be indexed by Index Status The data of state or status of fail, the data drawn as lithol yet to be built.
Described device also includes:
Monitoring modular 306, for for any data in database, passing through Sync Manager Monitoring Data Whether the data corresponding final updating time in storehouse exceedes includes in the corresponding index information table of the data The final updating time, when monitor the corresponding final updating time of the data in database exceed the data During the final updating time included in corresponding index information table, if the data are in corresponding index information table In be not present, then increase newly and the data and be set to the Index Status of the data to be indexed in index information table State, if the data are already present in index information table, directly by the corresponding index information of the data Index Status in table is changed to state to be indexed.
The index time determining module 304 specifically for, according to the default each priority corresponding cycle, It is defined as each data and sets up the index corresponding cycle, wherein, for any two data, if two numbers According to priority it is different, then the index corresponding cycle is set up for two data also different, according to for each number Corresponding cycle and current time are indexed according to setting up, is defined as the time that each data set up index.
Described device also includes:
Index Status changes module 307, for the data drawn for any lithol yet to be built, is built when for the data When lithol draws unsuccessfully, the Index Status in the corresponding index information table of the data is changed by Sync Manager For status of fail, and the frequency of failure included in the corresponding index information table of the data plus 1, when for this Data are set up when indexing successfully, by Sync Manager by the index shape in the corresponding index information table of the data State is changed to success status, and the frequency of failure included in the corresponding index information table of the data is set into 0, When the Index Status in the corresponding index information table of the data be status of fail, and the frequency of failure exceed it is default During threshold value, do not set up and index for the data.
Described device also includes:
Reason add module 308, when setting up module 305 for the index for data foundation index failure, The reason for index failure is set up in addition in the corresponding index information table of the data.
Described device also includes:
Removing module 309, for determining each data to be deleted in database by Sync Manager, according to Each data to be deleted determined, by Sync Manager by the corresponding index information of each data to be deleted Table is marked, and the index of the corresponding data of index information table of mark is determined by index manager, to true The index made is marked, the markd index of scanning tool, and scanning at set time intervals Tool it is markd index delete.
The index sets up module 305 specifically for for different types of data, using different indexes Handling implement sets up index.
In a typical configuration, computing device includes one or more processors (CPU), input/defeated Outgoing interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory And/or the form, such as read-only storage (ROM) or flash memory (flash RAM) such as Nonvolatile memory (RAM). Internal memory is the example of computer-readable medium.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by appointing What method or technique realizes that information is stored.Information can be computer-readable instruction, data structure, program Module or other data.The example of the storage medium of computer include, but are not limited to phase transition internal memory (PRAM), Static RAM (SRAM), dynamic random access memory (DRAM), it is other kinds of with Machine access memory (RAM), read-only storage (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic rigid disk are stored or it His magnetic storage apparatus or any other non-transmission medium, the letter that can be accessed by a computing device available for storage Breath.Defined according to herein, computer-readable medium does not include temporary computer readable media (transitory Media), such as the data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to non-row His property is included, so that process, method, commodity or equipment including a series of key elements not only include Those key elements, but also other key elements including being not expressly set out, or also include for this process, Method, commodity or the intrinsic key element of equipment.In the absence of more restrictions, by sentence " including One ... " key element that limits, it is not excluded that in the process including the key element, method, commodity or set Also there is other identical element in standby.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer journey Sequence product.Therefore, the application can using complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the application can be used wherein includes calculating one or more Machine usable program code computer-usable storage medium (include but is not limited to magnetic disk storage, CD-ROM, Optical memory etc.) on the form of computer program product implemented.
Embodiments herein is the foregoing is only, the application is not limited to.For this area skill For art personnel, the application can have various modifications and variations.All institutes within spirit herein and principle Any modification, equivalent substitution and improvements of work etc., should be included within the scope of claims hereof.

Claims (16)

1. a kind of index the method set up, it is characterised in that methods described includes:
Determine each data that lithol yet to be built draws;
Determine the data type of each data;
According to the data type of each data, the priority of each data is determined;
According to the priority of each data, it is defined as the time that each data set up index, wherein, pin To any two data, if the priority of two data is different, the time of index is set up for two data It is different;
For each data, it is determined that the time for setting up index for the data reach when, built for the data Lithol draws.
2. the method as described in claim 1, it is characterised in that determine each data that lithol yet to be built draws, Specifically include:
The corresponding index information table of all data is extracted by index manager;
It is determined that the Index Status included in each index information table extracted;
By the data that Index Status is state to be indexed or status of fail, the data drawn as lithol yet to be built.
3. method as claimed in claim 2, it is characterised in that methods described also includes:
It is corresponding by the data in Sync Manager monitor database for any data in database Whether the final updating time exceedes the final updating time included in the corresponding index information table of the data;
When monitor the corresponding final updating time of the data in database exceed the corresponding index of the data During the final updating time included in information table, if the data are not present in corresponding index information table, Then increase the data newly in index information table and the Index Status of the data is set to state to be indexed, if The data are already present in index information table, then directly by the index in the corresponding index information table of the data State is changed to state to be indexed.
4. the method as described in claim 1, it is characterised in that according to the priority of each data, It is defined as the time that each data set up index, specifically including:
According to the default each priority corresponding cycle, it is defined as each data and sets up the index corresponding cycle, Wherein, for any two data, if the priority of two data is different, index is set up for two data The corresponding cycle is also different;
Corresponding cycle and current time are indexed according to being set up for each data, is defined as each data Set up the time of index.
5. method as claimed in claim 2, it is characterised in that methods described also includes:
The data drawn for any lithol yet to be built, when setting up index failure for the data, pass through management by synchronization Index Status in the corresponding index information table of the data is changed to status of fail by device, and by the data pair The frequency of failure included in the index information table answered plus 1;
When set up for the data index successfully when, by Sync Manager by the corresponding index information table of the data In Index Status be changed to success status, and the failure that will be included in the corresponding index information table of the data Number of times is set to 0;
When the Index Status in the corresponding index information table of the data is status of fail, and the frequency of failure exceed it is pre- If threshold value when, be the data set up index.
6. method as claimed in claim 5, it is characterised in that when setting up index failure for the data, Methods described also includes:
The reason for index failure is set up in addition in the corresponding index information table of the data.
7. the method as described in claim 1, it is characterised in that methods described also includes:
Each data to be deleted in database are determined by Sync Manager;
It is by Sync Manager that each data to be deleted are corresponding according to each data to be deleted determined Index information table is marked;
The index of the corresponding data of index information table of mark is determined by index manager;
The index determined is marked;
The markd index of scanning tool at set time intervals, and by the markd index of the tool scanned Delete.
8. the method as described in claim 1, it is characterised in that set up index, specific bag for the data Include:
For different types of data, set up and indexed using different index processors.
9. a kind of index the device set up, it is characterised in that described device includes:
Data determining module, for determining each data that lithol yet to be built draws;
Data type determining module, the data type for determining each data;
Priority Determination module, for the data type according to each data, determines the priority of each data;
Index time determining module, for the priority according to each data, is defined as each data and builds The time that lithol draws, wherein, for any two data, if the priority of two data is different, for two The time that individual data set up index is also different;
Index sets up module, for for each data, it is determined that the time that index is set up for the data During arrival, set up and index for the data.
10. device as claimed in claim 9, it is characterised in that the data determining module specifically for, The corresponding index information table of all data is extracted by index manager, it is determined that in each index information table extracted Comprising Index Status, by the data that Index Status is state to be indexed or status of fail, be used as lithol yet to be built The data drawn.
11. device as claimed in claim 10, it is characterised in that described device also includes:
Monitoring modular, for for any data in database, by Sync Manager monitor database The data corresponding final updating time whether exceed the corresponding index information table of the data in include most Renewal time afterwards, when monitoring the corresponding final updating time of the data in database more than data correspondence Index information table in include the final updating time when, if the data in corresponding index information table not In the presence of, then increase the data newly in index information table and the Index Status of the data be set to state to be indexed, If the data are already present in index information table, directly by the corresponding index information table of the data Index Status is changed to state to be indexed.
12. device as claimed in claim 9, it is characterised in that index time determining module specifically for, According to the default each priority corresponding cycle, it is defined as each data and sets up the index corresponding cycle, its In, for any two data, if the priority of two data is different, index pair is set up for two data The cycle answered is also different, and corresponding cycle and current time are indexed according to being set up for each data, it is determined that The time of index is set up for each data.
13. device as claimed in claim 10, it is characterised in that described device also includes:
Index Status changes module, for the data drawn for any lithol yet to be built, when setting up rope for the data When drawing unsuccessfully, the Index Status in the corresponding index information table of the data is changed to by Sync Manager to lose State is lost, and the frequency of failure included in the corresponding index information table of the data plus 1, when for the data Foundation is when indexing successfully, by Sync Manager by the Index Status in the corresponding index information table of the data more Success status is changed to, and the frequency of failure included in the corresponding index information table of the data is set to 0, when Index Status in the corresponding index information table of the data is status of fail, and the frequency of failure exceedes default threshold During value, do not set up and index for the data.
14. device as claimed in claim 13, it is characterised in that described device also includes:
Reason add module, when setting up module for the index for data foundation index failure, in the number The reason for index failure being set up according to addition in corresponding index information table.
15. device as claimed in claim 9, it is characterised in that described device also includes:
Removing module, for determining each data to be deleted in database by Sync Manager, according to determination Each data to be deleted gone out, are entered the corresponding index information table of each data to be deleted by Sync Manager Line flag, the index of the corresponding data of index information table of mark is determined by index manager, to determining Index be marked, the markd index of scanning tool at set time intervals, and by the tool scanned Markd index is deleted.
16. device as claimed in claim 9, it is characterised in that the index sets up module, for pin To different types of data, set up and indexed using different index processors.
CN201610220796.0A 2016-04-11 2016-04-11 Index establishing method and device Active CN107291768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610220796.0A CN107291768B (en) 2016-04-11 2016-04-11 Index establishing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610220796.0A CN107291768B (en) 2016-04-11 2016-04-11 Index establishing method and device

Publications (2)

Publication Number Publication Date
CN107291768A true CN107291768A (en) 2017-10-24
CN107291768B CN107291768B (en) 2021-03-05

Family

ID=60093161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610220796.0A Active CN107291768B (en) 2016-04-11 2016-04-11 Index establishing method and device

Country Status (1)

Country Link
CN (1) CN107291768B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109614685A (en) * 2018-12-04 2019-04-12 上海宝冶集团有限公司 Construction based on BIM model is told somebody what one's real intentions are method, apparatus, equipment and mobile terminal
CN109815240A (en) * 2019-01-29 2019-05-28 北京百度网讯科技有限公司 For managing method, apparatus, equipment and the storage medium of index
CN111061744A (en) * 2018-10-17 2020-04-24 百度在线网络技术(北京)有限公司 Graph data updating method and device, computer equipment and storage medium
CN111445157A (en) * 2020-03-31 2020-07-24 深圳前海微众银行股份有限公司 Service data management method, device, equipment and storage medium
CN112507200A (en) * 2020-12-28 2021-03-16 浪潮云信息技术股份公司 Method and apparatus for synchronizing data into search engine
CN113377786A (en) * 2021-08-16 2021-09-10 北京易鲸捷信息技术有限公司 Method for realizing on-line index creation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631792A (en) * 2012-08-22 2014-03-12 鸿富锦精密工业(深圳)有限公司 Massive source index building system and method
US20140089318A1 (en) * 2012-04-10 2014-03-27 Huawei Technologies Co., Ltd. Metadata querying method and apparatus
CN104077379A (en) * 2014-06-25 2014-10-01 北京海泰方圆科技有限公司 Method for index updating
CN104834688A (en) * 2015-04-20 2015-08-12 北京奇艺世纪科技有限公司 Secondary index establishment method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140089318A1 (en) * 2012-04-10 2014-03-27 Huawei Technologies Co., Ltd. Metadata querying method and apparatus
CN103631792A (en) * 2012-08-22 2014-03-12 鸿富锦精密工业(深圳)有限公司 Massive source index building system and method
CN104077379A (en) * 2014-06-25 2014-10-01 北京海泰方圆科技有限公司 Method for index updating
CN104834688A (en) * 2015-04-20 2015-08-12 北京奇艺世纪科技有限公司 Secondary index establishment method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061744A (en) * 2018-10-17 2020-04-24 百度在线网络技术(北京)有限公司 Graph data updating method and device, computer equipment and storage medium
CN111061744B (en) * 2018-10-17 2023-08-01 百度在线网络技术(北京)有限公司 Graph data updating method and device, computer equipment and storage medium
CN109614685A (en) * 2018-12-04 2019-04-12 上海宝冶集团有限公司 Construction based on BIM model is told somebody what one's real intentions are method, apparatus, equipment and mobile terminal
CN109815240A (en) * 2019-01-29 2019-05-28 北京百度网讯科技有限公司 For managing method, apparatus, equipment and the storage medium of index
CN109815240B (en) * 2019-01-29 2022-02-25 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for managing index
US11308060B2 (en) 2019-01-29 2022-04-19 Beijing Baidu Netcom Science And Technology Co., Ltd. Method, apparatus, device and storage medium for managing index
CN111445157A (en) * 2020-03-31 2020-07-24 深圳前海微众银行股份有限公司 Service data management method, device, equipment and storage medium
CN112507200A (en) * 2020-12-28 2021-03-16 浪潮云信息技术股份公司 Method and apparatus for synchronizing data into search engine
CN113377786A (en) * 2021-08-16 2021-09-10 北京易鲸捷信息技术有限公司 Method for realizing on-line index creation

Also Published As

Publication number Publication date
CN107291768B (en) 2021-03-05

Similar Documents

Publication Publication Date Title
CN107291768A (en) It is a kind of to index the method and device set up
CN108376171B (en) Method and device for quickly importing big data, terminal equipment and storage medium
CN109299157B (en) Data export method and device for distributed big single table
CN107315814B (en) Method and system for verifying data consistency after data migration of KDB (KDB) database
US10783163B2 (en) Instance-based distributed data recovery method and apparatus
CN107704202B (en) Method and device for quickly reading and writing data
CN107944036B (en) Method for acquiring map change difference
CN101158954A (en) Method for recognizing repeat data in computer storage
CN110471900A (en) Data processing method and terminal device
CN103077208B (en) URL(uniform resource locator) matched processing method and device
CN105530269B (en) Data interactive method and system and server
CN107153644A (en) A kind of method of data synchronization and device
CN103607418B (en) Large-scale data segmenting system based on cloud service data characteristics and dividing method
CN105260639A (en) Face recognition system data update method and device
US20220197932A1 (en) Method and apparatus for processing map point location information, and server
CN103716384A (en) Method and device for realizing cloud storage data synchronization in cross-data-center manner
CN105872127A (en) IP (Internet protocol) address management system
CN105426544A (en) Method and device for monitoring state of database
CN110263060B (en) ERP electronic accessory management method and computer equipment
CN107239568A (en) Distributed index implementation method and device
CN107357557A (en) A kind of information updating method and device
CN108268509B (en) Configuration data management method and device
CN114860806A (en) Data query method and device of block chain, computer equipment and storage medium
CN108829709A (en) Distributed database management method, apparatus, storage medium and processor
CN114048219A (en) Graph database updating method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20201014

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201014

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant