CN103559301A - Method of data update, database trigger and SE (search engine) - Google Patents

Method of data update, database trigger and SE (search engine) Download PDF

Info

Publication number
CN103559301A
CN103559301A CN201310567675.XA CN201310567675A CN103559301A CN 103559301 A CN103559301 A CN 103559301A CN 201310567675 A CN201310567675 A CN 201310567675A CN 103559301 A CN103559301 A CN 103559301A
Authority
CN
China
Prior art keywords
business datum
attribute
data
index data
renewal
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
CN201310567675.XA
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310567675.XA priority Critical patent/CN103559301A/en
Publication of CN103559301A publication Critical patent/CN103559301A/en
Pending legal-status Critical Current

Links

Images

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/23Updating
    • G06F16/2358Change logging, detection, and notification
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Abstract

The invention provides a method of data update, a database trigger and an SE (search engine). The method comprises the following steps: when the attribute of the business data in a business table is updated, establishing an updating log, and triggering the SE to update index data according to the updating log, wherein the business table comprises the unique identification of each business data and at least one attribute of each business data; the updating log comprises the unique identification of the updated business data and updating type; the index data and the updated business data have the same unique identification; the SE is used for searching the index data. According to the method of data update, the database trigger and the SE, disclosed by the invention, the attribute of the search data and the attribute of the business data in the business table can be consistent as much as possible through establishing the updating log and triggering the SE to timely update the index data according to the updating log.

Description

The more method of new data, database trigger and search engine
Technical field
The present invention relates to search technique, relate in particular to a kind of method, database trigger and search engine of more new data.
Background technology
Search is IT(Information Technology, infotech) indispensable function in system, it can promote the data search speed of application system widely.What generally adopt now is the global search function in IT system, and it can search the data of subsystems in global scope.At present, conventionally adopt search engine as the carrier of function of search.Particularly, search engine first crawls the data of service sub-system, then data are carried out participle, created inverted index, finds corresponding data entry, thereby locating function is fast provided in the search phase by inquiry inverted index.
In practice, the data in service sub-system can be upgraded at any time, lag behind, by user's experience of impact use search engine greatly if the index data in search engine upgrades.Therefore, how to keep index data in search engine and the data consistent of service sub-system to become the problem of needing solution badly.
Summary of the invention
The invention provides a kind of method, database trigger and search engine of more new data, the problem that can not be consistent in time to solve the data of index data in search engine and service sub-system.
First aspect present invention provides a kind of method of more new data, comprising:
When the attribute of the business datum in traffic table upgrades, create Update log, described traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and described Update log comprises unique identification and the updating type of the business datum of renewal;
Trigger search engine and upgrade index data according to described Update log, described index data has identical unique identification with the business datum of described renewal, and described search engine is used for searching for described index data.
According to first aspect, in the possible implementation of the first, the described search engine of described triggering upgrades index data according to described Update log and comprises:
If being data, described updating type increases type, trigger described search engine and according to the unique identification of the business datum of described renewal, from described traffic table, obtain the business datum of increase, and according to the attribute of the business datum generating indexes of described increase, described index data and described index data, so that described search engine arrives described index data according to described indexed search, the attribute of described index data is identical with the attribute of the business datum of described renewal;
If described updating type is data, delete type, trigger described search engine and delete described index data according to the unique identification of the business datum of described renewal;
If described updating type is data modification type, trigger described search engine and according to the unique identification of the business datum of described renewal, obtain each attribute of the business datum after renewal, and according to each attribute of accessed business datum, upgrade each attribute of described index data, so that each attribute of described index data is identical with each attribute of accessed business datum.
In conjunction with the possible implementation of the first or the possible implementation of the second, after the described search engine of triggering upgrades index data according to described Update log, also comprise:
Delete the Update log corresponding to business datum of described renewal.
Second aspect present invention provides a kind of method of more new data, comprising:
When the attribute of the business datum in traffic table upgrades, obtain Update log, described Update log generates while being the service data updating in traffic table, described traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and described Update log comprises unique identification and the updating type of the business datum of renewal;
According to described Update log, upgrade index data, described index data be search engine according to indexed search to data and described index data there is identical unique identification with the business datum of described renewal.
According to second aspect, in the possible implementation of the first, the described described business datum of upgrading in index data according to described Update log comprises:
If being data, described updating type increases type, according to the unique identification of the business datum of described renewal, from described traffic table, obtain the business datum of increase, and according to the attribute of the described establishment of increase business datum index, described index data and index data, so that described search engine arrives described index data according to described indexed search, the attribute of described index data is identical with the attribute of the business datum of described renewal;
If described updating type is data, delete type, according to the unique identification of the business datum of described renewal, delete described index data;
If described updating type is data modification type, according to the unique identification of the business datum of described renewal, obtain each attribute of the business datum after renewal, and according to each attribute of the described index data of renewal of accessed business datum, so that each attribute of described index data is identical with each attribute of accessed business datum.
In conjunction with the possible implementation of the first or the possible implementation of the second, after according to each attribute of the described index data of renewal of accessed business datum, also comprise:
Delete the Update log corresponding to business datum of described renewal.
Third aspect present invention provides a kind of database trigger, comprising:
Creating unit, during for attribute renewal when the business datum of traffic table, create Update log, described traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and described Update log comprises unique identification and the updating type of the business datum of renewal;
Trigger element, upgrades index data for triggering search engine according to described Update log, and described index data has identical unique identification with the business datum of described renewal, and described search engine is used for searching for described index data.
According to the third aspect, in the possible implementation of the first, described trigger element specifically for:
If being data, described updating type increases type, trigger described search engine and according to the unique identification of the business datum of described renewal, from described traffic table, obtain the business datum of increase, and according to the attribute of the business datum generating indexes of described increase, described index data and described index data, so that described search engine arrives described index data according to described indexed search, the attribute of described index data is identical with the attribute of the business datum of described renewal;
If described updating type is data, delete type, trigger described search engine and delete described index data according to the unique identification of the business datum of described renewal;
If described updating type is data modification type, trigger described search engine and according to the unique identification of the business datum of described renewal, obtain each attribute of the business datum after renewal, and according to each attribute of accessed business datum, upgrade each attribute of described index data, so that each attribute of described index data is identical with each attribute of accessed business datum.
In conjunction with the possible implementation of the first or the possible implementation of the second, also comprise:
The first delete cells, for deleting the Update log corresponding to business datum of described renewal.
Fourth aspect present invention provides a kind of search engine, comprising:
Acquiring unit, be used for obtaining Update log, described Update log generates while being the service data updating in traffic table, described traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and described Update log comprises unique identification and the updating type of the business datum of renewal;
Updating block, for upgrading index data according to described Update log, described index data be search engine according to indexed search to data and described index data there is identical unique identification with the business datum of described renewal.
According to fourth aspect, in the possible implementation of the first, described updating block specifically for:
If being data, described updating type increases type, according to the unique identification of the business datum of described renewal, from described traffic table, obtain the business datum of increase, and according to the attribute of the described establishment of increase business datum index, described index data and index data, so that described search engine arrives described index data according to described indexed search, the attribute of described index data is identical with the attribute of the business datum of described renewal;
If described updating type is data, delete type, according to the unique identification of the business datum of described renewal, delete described index data;
If described updating type is data modification type, according to the unique identification of the business datum of described renewal, obtain each attribute of the business datum after renewal, and according to each attribute of the described index data of renewal of accessed business datum, so that each attribute of described index data is identical with each attribute of accessed business datum.
In conjunction with the possible implementation of the first or the possible implementation of the second, also comprise:
The second delete cells, for deleting the Update log corresponding to business datum of described renewal.
As shown from the above technical solution, the method of more new data provided by the invention, database trigger and search engine, by setting up Update log, and trigger search engine according to the Update log index data that upgrades in time, can make the attribute of search data and the attribute of the business datum in traffic table be consistent as far as possible.In addition, search engine only carries out the renewal of search data for Update log, without the total data crawling in whole traffic table, has greatly saved the more time of new data, has improved the more efficiency of new data.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet of the method for new data more according to an embodiment of the invention;
Fig. 2 is the schematic flow sheet of the method for new data more according to another embodiment of the present invention;
Fig. 3 is according to the schematic flow sheet of the method for the more new data of further embodiment of this invention;
Fig. 4 A is the structural representation of database trigger according to yet another embodiment of the invention;
Fig. 4 B is the structural representation of database trigger according to another embodiment of the present invention;
Fig. 5 A is according to the structural representation of the search engine of further embodiment of this invention;
Fig. 5 B is the structural representation of search engine according to yet another embodiment of the invention;
Fig. 6 is the structural representation of database trigger according to another embodiment of the present invention;
Fig. 7 is according to the structural representation of the search engine of further embodiment of this invention.
Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment mono-
The present embodiment provides a kind of method of more new data, this more the method for new data be applicable to search system, the search engine in this search system can be according to search index to index data.The executive agent of the method for the more new data of the present embodiment is database trigger.
As shown in Figure 1, for according to the schematic flow sheet of the method for the more new data of the present embodiment.
Step 101, during service data updating in traffic table, creates Update log.
Wherein, traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and Update log comprises unique identification and the updating type of the business datum of renewal.Wherein updating type can be that data increase type, data are deleted type or data modification type.Particularly, data increase type and represent that the business datum in traffic table increases, and the increase of this business datum refers to behavior unit increases business datum, a newly-increased business datum with and association attributes.Data are deleted type and are represented that the business datum in traffic table is deleted, and the deletion of this business datum refers to behavior unit and deletes business datum, deletes full line attribute corresponding to a certain business datum.Data modification type represents that some or a plurality of attributes of the data in traffic table are modified, and need point out to be, when change, increase or the deletion etc. some or a plurality of attributes generations of business datum operate, all belongs to the data modification type of the present embodiment.
Update log can be recorded in default change log sheet, and during Data Update in traffic table, database trigger just creates a Update log in change log sheet.
Step 102, triggers search engine and upgrades index data according to Update log.
Wherein, index data has identical unique identification with the business datum of renewal, and search engine is for search index data.Particularly, can trigger search engine by database update device and upgrade index data according to Update log.Database trigger can be in traffic table business datum while occurring to upgrade, when creating Update log, just trigger search engine and upgrade index data.Certainly, can also be every Preset Time, search engine obtains voluntarily and crawls Update log new search data more, specifically can set according to actual needs, does not repeat them here.
Alternatively, after step 102, can also comprise: delete Update log corresponding to business datum upgrading.After search engine upgrades index data according to Update log, can delete this Update log, to reduce the shared storage space of Update log.The operation of this deletion Update log can be carried out immediately after index data is upgraded, and also can carry out every Preset Time, specifically can operate according to actual needs.
According to the method for the more new data of the present embodiment, by setting up Update log, and trigger search engine according to the Update log index data that upgrades in time, can make the attribute of search data and the attribute of the business datum in traffic table be consistent as far as possible.In addition, search engine only carries out the renewal of search data for Update log, without the total data crawling in whole traffic table, has greatly saved the more time of new data, has improved the more efficiency of new data.
Embodiment bis-
The step that the present embodiment upgrades the business datum in index data to the triggering search engine in embodiment mono-according to Update log is described further.
Particularly, in the present embodiment, the operation that this triggering search engine upgrades index data according to Update log comprises:
If being data, updating type increases type, trigger search engine according to obtaining the business datum of increase in the unique identification traffic table of the business datum of upgrading, and according to the attribute of the business datum generating indexes, index data and the index data that increase, so that search engine arrives index data according to indexed search, the attribute of index data is identical with the attribute of the business datum of renewal;
If updating type is data, delete type, trigger search engine and delete index data according to the unique identification of the business datum of upgrading;
If updating type is data modification type, trigger search engine and according to the unique identification of the business datum of upgrading, obtain each attribute of the business datum after renewal, and according to each attribute of accessed business datum, upgrade each attribute of index data, so that each attribute of index data is identical with each attribute of accessed business datum.
In the present embodiment, specifically can adopt different symbols to identify each updating type, for example A represents that data increase type, and B represents data deletion type, and C represents data modification type, and Key represents unique identification.Particularly, the reptile of search engine crawls the business datum in traffic table according to business datum Key, and by the service data updating being crawled in index data.
Enumerate concrete example below the more method of new data is described.In the present embodiment, traffic table is as shown in table 1, and default change log sheet is as shown in table 2, changes and in log sheet, had Update log in the present embodiment.In Update log, can also comprise serial number, this serial number is specifically for making the reptile of search engine know the record that the last time crawls, to avoid repeating to crawl when crawling next time, and then avoids the reptile of search engine to produce added burden.
Table 1
Key Attribute 1 Attribute 2 Attribute 3
Key1 P1_1 P1_2 P1_3
Key2 P2_1 P2_2 P2_3
Keyn Pn_1 Pn_2 Pn_3
Table 2
Serial number Key Updating type
1 Key1 A
In the present embodiment, Update log is Yi Yi behavior unit, that is, in table 1, variation has occurred for some attributes or value corresponding to a plurality of attribute, what in the Update log creating in table 2, record is Key corresponding to this business datum and updating type, only creates a Update log.In the present embodiment, the Key of the business datum that search engine gets from change log sheet is Key1, and updating type is A, and data increase type.Now, the reptile of search engine need crawl each attribute that Key1 is corresponding, and upgrades successively each attribute of the index data corresponding with Key1, and each attribute that is about to index data is updated to consistent with each attribute of business datum.
It is pointed out that the reptile of subsequent searches engine will crawl all properties corresponding to this business datum so if variation has occurred some attributes of business datum, and upgrade accordingly all properties of index data.
Embodiment tri-
The present embodiment provides a kind of method of more new data, this more the method for new data be applicable to search system, the search engine in this search system can be according to search index to index data.The executive agent of the method for the more new data of the present embodiment is in search engine, can be specifically the reptile in search engine.
As shown in Figure 2, for according to the schematic flow sheet of the method for the more new data of the present embodiment.
Step 201, obtains Update log.
Wherein, Update log generates while being the service data updating in traffic table, and traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and Update log comprises unique identification and the updating type of business datum.Wherein updating type can be that data increase type, data are deleted type or data modification type.Particularly, data increase type and represent that the data in traffic table increase, data are deleted type and are represented that the data in traffic table are deleted, data modification type represents that the data in traffic table are modified, need point out to be, when operations such as change, increase or deletion that the attribute of data occurs, all belong to data modification type.
Update log can be to be recorded in default log sheet, and during Data Update in traffic table, more the device of new data just creates a Update log in log sheet.
In the present embodiment, the operation that more device of new data obtains Update log specifically can be triggered by database trigger, and database trigger, after creating Update log, can trigger the operation that more device of new data obtains Update log.
It is to be noted, this operation that more device of new data obtains Update log can be that the database trigger by above-described embodiment triggers, also can be every Preset Time, by the device Self-operating of new data more, this Preset Time can be 1 second, 3 seconds, 5 seconds or 1 minute, specifically can set according to actual needs.
Step 202, upgrades index data according to Update log.
Wherein, index data is the data that search engine arrives according to indexed search.
This step 202 specifically can comprise:
If being data, updating type increases type, according to the unique identification of the business datum of upgrading, from traffic table, obtain the business datum of increase, and according to the attribute that increases business datum establishment index, index data and index data, so that search engine arrives index data according to indexed search, the attribute of index data is identical with the attribute of the business datum of renewal;
If updating type is data, delete type, according to the unique identification of the business datum of upgrading, delete index data;
If updating type is data modification type, according to the unique identification of the business datum of upgrading, obtain each attribute of the business datum after renewal, and according to each attribute of the renewal index data of accessed business datum, so that each attribute of index data is identical with each attribute of accessed business datum.
Alternatively, after step 202, also comprise and delete Update log corresponding to business datum upgrading.
According to the method for the more new data of the present embodiment, by Update log, upgrade index data, not only upgrade in time, and can make the data in index data and traffic table be consistent as far as possible.In addition, search engine only carries out the renewal of index data for Update log, without the total data crawling in whole traffic table, has greatly saved the more time of new data, improves the more efficiency of new data.
Embodiment tetra-
The present embodiment, based on above-described embodiment, provides a kind of method of concrete more new data.
As shown in Figure 3, for according to the schematic flow sheet of the method for the more new data of the present embodiment.
Step 301, when the business datum of service sub-system generation changes, database trigger upgrades the business datum in traffic table.
Step 302, database trigger creates a Update log in default daily record.
Step 303, search engine obtains Update log, and according to Update log, crawls the business datum of renewal.
Particularly, can trigger the operation that search engine obtains Update log by database trigger, can be also that search engine carries out every Preset Time the operation that search engine obtains Update log voluntarily, specifically can set according to actual needs.
Step 304, search engine according to the updating type in Update log to index data increase, deletion or retouching operation.
Step 305, deletes Update log.
This deletion action specifically can be operated by database trigger, also can be operated by search engine, specifically can set according to actual needs, does not repeat them here.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can complete by the relevant hardware of programmed instruction, aforesaid program can be stored in a computer read/write memory medium, this program, when carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
Embodiment five
The present embodiment provides a kind of database trigger, for carrying out the more method of new data of above-mentioned renewal.
As shown in Figure 4 A, for according to the structural representation of the database trigger of the present embodiment.This database trigger 400 comprises creating unit 401 and trigger element 402.
Wherein, creating unit 401 is during for service data updating when traffic table, create Update log, traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and Update log comprises unique identification and the updating type of the business datum of renewal; Trigger element 402 upgrades index data for triggering search engine 500 according to Update log, and index data has identical unique identification with the business datum of renewal, and search engine 500 is for search index data.
Alternatively, trigger element 402 specifically for:
If being data, updating type increases type, trigger search engine 500 and from traffic table, obtain the business datum of increase according to the unique identification of the business datum of upgrading, and according to the attribute of the business datum generating indexes, index data and the index data that increase, so that search engine 500 arrives index data according to indexed search, the attribute of index data is identical with the attribute of the business datum of renewal;
If updating type is data, delete type, trigger search engine 500 and delete index data according to the unique identification of the business datum of upgrading;
If updating type is data modification type, trigger search engine 500 and according to the unique identification of the business datum of upgrading, obtain each attribute of the business datum after renewal, and according to each attribute of accessed business datum, upgrade each attribute of index data, so that each attribute of index data is identical with each attribute of accessed business datum.
Alternatively, as shown in Figure 4 B, this database trigger also comprises the first delete cells 403, and this first delete cells 403 is for deleting the Update log corresponding to business datum of renewal.
The concrete operations mode of this database trigger 400 is consistent with embodiment mono-or embodiment bis-, does not repeat them here.
According to the database trigger 400 of the present embodiment, by setting up Update log, and trigger search engine 500 according to the Update log index data that upgrades in time, can make the attribute of search data and the attribute of the business datum in traffic table be consistent as far as possible.In addition, search engine 500 only carries out the renewal of search data for Update log, without the total data crawling in whole traffic table, has greatly saved the more time of new data, has improved the more efficiency of new data.
Embodiment six
The present embodiment provides a kind of search engine, for carrying out the method for the more new data of above-described embodiment.
As shown in Figure 5A, for according to the structural representation of the search engine of the present embodiment.This search engine 500 comprises acquiring unit 501 and updating block 502.
Wherein, acquiring unit 501 is for obtaining Update log, Update log generates while being the service data updating in traffic table, traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and Update log comprises unique identification and the updating type of the business datum of renewal; Updating block 502 is for upgrade index data according to Update log, index data be search engine 500 according to indexed search to data and index data there is identical unique identification with the business datum of renewal.
Alternatively, updating block 502 for:
If being data, updating type increases type, according to the unique identification of the business datum of upgrading, from traffic table, obtain the business datum of increase, and according to the attribute that increases business datum establishment index, index data and index data, so that search engine 500 arrives index data according to indexed search, the attribute of index data is identical with the attribute of the business datum of renewal;
If updating type is data, delete type, according to the unique identification of the business datum of upgrading, delete index data;
If updating type is data modification type, according to the unique identification of the business datum of upgrading, obtain each attribute of the business datum after renewal, and according to each attribute of the renewal index data of accessed business datum, so that each attribute of index data is identical with each attribute of accessed business datum.
Alternatively, as shown in Figure 5 B, the search engine 500 of the present embodiment also comprises the second delete cells 503, and this second delete cells 503 is for deleting the Update log corresponding to business datum of renewal.
The concrete operation method of the search engine 500 of the present embodiment is consistent with embodiment tri-, does not repeat them here.
Search engine 500 according to the present embodiment, upgrades index data by Update log, not only upgrades in time, and can make the data in index data and traffic table be consistent as far as possible.In addition, search engine 500 only carries out the renewal of index data for Update log, without the total data crawling in whole traffic table, has greatly saved the more time of new data, improves the more efficiency of new data.
Embodiment seven
The present embodiment provides another kind of database trigger, for carrying out the method for the more new data of above-described embodiment.
Shown in Fig. 6, for according to the structural representation of the database trigger of the present embodiment.This database trigger 600 comprises at least one first processor 601, the first communication bus 602, first memory 603 and at least one the first communication interface 604.
Wherein, the first communication bus 602 is for realizing connection the communication between said modules, and communication interface 504 is for being connected with the network equipment and communicating by letter.This bus can be ISA(Industry Standard Architecture, industry standard architecture) bus, PCI(Peripheral Component, peripheral component interconnect) bus or EISA(Extended Industry Standard Architecture, extended industry-standard architecture) bus etc.Bus can be one or more physical circuit, when being many physical circuits, can be divided into address bus, data bus, control bus etc.
Wherein, first memory 603 is for stores executable programs code, and wherein, first processor 601 moves the program corresponding with executable program code by reading the executable program code of storage in first memory 603, for:
During service data updating in traffic table, create Update log, traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and Update log comprises unique identification and the updating type of the business datum of renewal;
Trigger search engine and upgrade index data according to Update log, index data has identical unique identification with the business datum of renewal, and search engine is for search index data.
Alternatively, first processor 601 moves the program corresponding with executable program code at the executable program code by storage in reading first memory 603, while upgrading index data for triggering search engine according to Update log, can be specifically:
If being data, updating type increases type, trigger search engine and from traffic table, obtain the business datum of increase according to the unique identification of the business datum of upgrading, and according to the attribute of the business datum generating indexes, index data and the index data that increase, so that search engine arrives index data according to indexed search, the attribute of index data is identical with the attribute of the business datum of renewal;
If updating type is data, delete type, trigger search engine and delete index data according to the unique identification of the business datum of upgrading;
If updating type is data modification type, trigger search engine and according to the unique identification of the business datum of upgrading, obtain each attribute of the business datum after renewal, and according to each attribute of accessed business datum, upgrade each attribute of index data, so that each attribute of index data is identical with each attribute of accessed business datum.
Alternatively, first processor 601 also moves the program corresponding with executable program code by reading the executable program code of storage in first memory 603, for:
Delete Update log corresponding to business datum upgrading.
According to the database trigger 600 of the present embodiment, by setting up Update log, and trigger search engine according to the Update log index data that upgrades in time, can make the attribute of search data and the attribute of the business datum in traffic table be consistent as far as possible.In addition, search engine only carries out the renewal of search data for Update log, without the total data crawling in whole traffic table, has greatly saved the more time of new data, has improved the more efficiency of new data.
Embodiment eight
The present embodiment provides another kind of search engine, for carrying out the method for the more new data of above-described embodiment.
As shown in Figure 7, for according to the structural representation of the search engine of the present embodiment.This search engine 700 comprises at least one second processor 701, second communication bus 702, second memory 703 and at least one second communication interface 704.
Wherein, second communication bus 702 is for realizing connection the communication between said modules, and communication interface 504 is for being connected with the network equipment and communicating by letter.This bus can be ISA(Industry Standard Architecture, industry standard architecture) bus, PCI(Peripheral Component, peripheral component interconnect) bus or EISA(Extended Industry Standard Architecture, extended industry-standard architecture) bus etc.Bus can be one or more physical circuit, when being many physical circuits, can be divided into address bus, data bus, control bus etc.
Wherein, second memory 703 is for stores executable programs code, and wherein, the second processor 701 moves the program corresponding with executable program code by reading the executable program code of storage in second memory 703, for:
Obtain Update log, Update log generates while being the service data updating in traffic table, traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and Update log comprises unique identification and the updating type of the business datum of renewal;
According to Update log, upgrade index data, index data be search engine 700 according to indexed search to data and index data there is identical unique identification with the business datum of renewal.
Alternatively, the second processor 701 moves the program corresponding with executable program code at the executable program code by storage in reading second memory 703, when upgrading index data according to Update log, can be specifically:
If being data, updating type increases type, according to the unique identification of the business datum of upgrading, from traffic table, obtain the business datum of increase, and according to the attribute that increases business datum establishment index, index data and index data, so that search engine 700 arrives index data according to indexed search, the attribute of index data is identical with the attribute of the business datum of renewal;
If updating type is data, delete type, according to the unique identification of the business datum of upgrading, delete index data;
If updating type is data modification type, according to the unique identification of the business datum of upgrading, obtain each attribute of the business datum after renewal, and according to each attribute of the renewal index data of accessed business datum, so that each attribute of index data is identical with each attribute of accessed business datum.
Alternatively, the second processor 701 also moves the program corresponding with executable program code by reading the executable program code of storage in second memory 703, for:
Delete Update log corresponding to business datum upgrading.
Search engine 700 according to the present embodiment, upgrades index data by Update log, not only upgrades in time, and can make the data in index data and traffic table be consistent as far as possible.In addition, search engine 700 only carries out the renewal of index data for Update log, without the total data crawling in whole traffic table, has greatly saved the more time of new data, improves the more efficiency of new data.
Finally it should be noted that: above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (12)

1. a method for new data more, is characterized in that, comprising:
During service data updating in traffic table, create Update log, described traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and described Update log comprises unique identification and the updating type of the business datum of renewal;
Trigger search engine and upgrade index data according to described Update log, described index data has identical unique identification with the business datum of described renewal, and described search engine is used for searching for described index data.
2. the method for more new data according to claim 1, is characterized in that, the described search engine of described triggering upgrades index data according to described Update log and comprises:
If being data, described updating type increases type, trigger described search engine and according to the unique identification of the business datum of described renewal, from described traffic table, obtain the business datum of increase, and according to the attribute of the business datum generating indexes of described increase, described index data and described index data, so that described search engine arrives described index data according to described indexed search, the attribute of described index data is identical with the attribute of the business datum of described renewal;
If described updating type is data, delete type, trigger described search engine and delete described index data according to the unique identification of the business datum of described renewal;
If described updating type is data modification type, trigger described search engine and according to the unique identification of the business datum of described renewal, obtain each attribute of the business datum after renewal, and according to each attribute of accessed business datum, upgrade each attribute of described index data, so that each attribute of described index data is identical with each attribute of accessed business datum.
3. the method for more new data according to claim 1 and 2, is characterized in that, after the described search engine of triggering upgrades index data according to described Update log, also comprises:
Delete the Update log corresponding to business datum of described renewal.
4. a method for new data more, is characterized in that, comprising:
Obtain Update log, described Update log generates while being the service data updating in traffic table, described traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and described Update log comprises unique identification and the updating type of the business datum of renewal;
According to described Update log, upgrade index data, described index data be search engine according to indexed search to data and described index data there is identical unique identification with the business datum of described renewal.
5. the method for more new data according to claim 4, is characterized in that, the described described business datum of upgrading in index data according to described Update log comprises:
If being data, described updating type increases type, according to the unique identification of the business datum of described renewal, from described traffic table, obtain the business datum of increase, and according to the attribute of the described establishment of increase business datum index, described index data and index data, so that described search engine arrives described index data according to described indexed search, the attribute of described index data is identical with the attribute of the business datum of described renewal;
If described updating type is data, delete type, according to the unique identification of the business datum of described renewal, delete described index data;
If described updating type is data modification type, according to the unique identification of the business datum of described renewal, obtain each attribute of the business datum after renewal, and according to each attribute of the described index data of renewal of accessed business datum, so that each attribute of described index data is identical with each attribute of accessed business datum.
6. according to the method for the more new data described in claim 4 or 5, it is characterized in that, after according to each attribute of the described index data of renewal of accessed business datum, also comprise:
Delete the Update log corresponding to business datum of described renewal.
7. a database trigger, is characterized in that, comprising:
Creating unit, for when the service data updating of traffic table, create Update log, described traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and described Update log comprises unique identification and the updating type of the business datum of renewal;
Trigger element, upgrades index data for triggering search engine according to described Update log, and described index data has identical unique identification with the business datum of described renewal, and described search engine is used for searching for described index data.
8. database trigger according to claim 7, is characterized in that, described trigger element specifically for:
If being data, described updating type increases type, trigger described search engine and according to the unique identification of the business datum of described renewal, from described traffic table, obtain the business datum of increase, and according to the attribute of the business datum generating indexes of described increase, described index data and described index data, so that described search engine arrives described index data according to described indexed search, the attribute of described index data is identical with the attribute of the business datum of described renewal;
If described updating type is data, delete type, trigger described search engine and delete described index data according to the unique identification of the business datum of described renewal;
If described updating type is data modification type, trigger described search engine and according to the unique identification of the business datum of described renewal, obtain each attribute of the business datum after renewal, and according to each attribute of accessed business datum, upgrade each attribute of described index data, so that each attribute of described index data is identical with each attribute of accessed business datum.
9. according to the database trigger described in claim 7 or 8, it is characterized in that, also comprise:
The first delete cells, for deleting the Update log corresponding to business datum of described renewal.
10. a search engine, is characterized in that, comprising:
Acquiring unit, be used for obtaining Update log, described Update log generates while being the service data updating in traffic table, described traffic table comprises the unique identification of each business datum and at least one attribute of each business datum, and described Update log comprises unique identification and the updating type of the business datum of renewal;
Updating block, for upgrading index data according to described Update log, described index data be search engine according to indexed search to data and described index data there is identical unique identification with the business datum of described renewal.
11. search engines according to claim 10, is characterized in that, described updating block specifically for:
If being data, described updating type increases type, according to the unique identification of the business datum of described renewal, from described traffic table, obtain the business datum of increase, and according to the attribute of the described establishment of increase business datum index, described index data and index data, so that described search engine arrives described index data according to described indexed search, the attribute of described index data is identical with the attribute of the business datum of described renewal;
If described updating type is data, delete type, according to the unique identification of the business datum of described renewal, delete described index data;
If described updating type is data modification type, according to the unique identification of the business datum of described renewal, obtain each attribute of the business datum after renewal, and according to each attribute of the described index data of renewal of accessed business datum, so that each attribute of described index data is identical with each attribute of accessed business datum.
12. according to the search engine described in claim 10 or 11, it is characterized in that, also comprises:
The second delete cells, for deleting the Update log corresponding to business datum of described renewal.
CN201310567675.XA 2013-11-14 2013-11-14 Method of data update, database trigger and SE (search engine) Pending CN103559301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310567675.XA CN103559301A (en) 2013-11-14 2013-11-14 Method of data update, database trigger and SE (search engine)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310567675.XA CN103559301A (en) 2013-11-14 2013-11-14 Method of data update, database trigger and SE (search engine)

Publications (1)

Publication Number Publication Date
CN103559301A true CN103559301A (en) 2014-02-05

Family

ID=50013547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310567675.XA Pending CN103559301A (en) 2013-11-14 2013-11-14 Method of data update, database trigger and SE (search engine)

Country Status (1)

Country Link
CN (1) CN103559301A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302576A (en) * 2015-11-26 2016-02-03 中山大学 Method and system for generating user guide based on APP updating
CN105677865A (en) * 2016-01-08 2016-06-15 天津车之家科技有限公司 Method and system for updating index data and search engine
CN106021527A (en) * 2016-05-24 2016-10-12 努比亚技术有限公司 Data processing method and search server and synchronization server
CN106156088A (en) * 2015-04-01 2016-11-23 阿里巴巴集团控股有限公司 A kind of index data processing method, data query method and device
CN106776824A (en) * 2016-11-21 2017-05-31 武汉斗鱼网络科技有限公司 The level method and system of Android databases
CN106960007A (en) * 2017-02-28 2017-07-18 北京京东尚科信息技术有限公司 A kind of data-updating method, device and electronic equipment
CN107016027A (en) * 2016-12-08 2017-08-04 阿里巴巴集团控股有限公司 The method and apparatus for realizing business information fast search
CN107133350A (en) * 2017-05-25 2017-09-05 努比亚技术有限公司 Data-updating method, mobile terminal and storage medium based on search engine
CN107368502A (en) * 2016-05-13 2017-11-21 北京京东尚科信息技术有限公司 Information synchronization method and device
CN109800234A (en) * 2019-01-25 2019-05-24 苏州科达科技股份有限公司 Service platform database system, upgrade method, equipment and storage medium
CN109933573A (en) * 2019-01-30 2019-06-25 北京融链科技有限公司 Data bank service update method, apparatus and system
CN110019179A (en) * 2017-07-31 2019-07-16 北京嘀嘀无限科技发展有限公司 Update method and device, the electronic equipment, storage medium of index database
CN111061745A (en) * 2019-10-10 2020-04-24 望海康信(北京)科技股份公司 Data synchronization system and method
CN112380416A (en) * 2020-11-25 2021-02-19 北京慕华信息科技有限公司 Method for updating course index, course searching method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999048028A2 (en) * 1998-03-16 1999-09-23 Globalbrain.Net Inc. Improved search engine
CN101216832A (en) * 2007-12-28 2008-07-09 腾讯科技(深圳)有限公司 Data synchronization process and device
CN101576920A (en) * 2009-06-19 2009-11-11 用友软件股份有限公司 Search engine system
CN101650741A (en) * 2009-08-27 2010-02-17 中国电信股份有限公司 Method and system for updating index of distributed full-text search in real time
CN102325367A (en) * 2011-09-29 2012-01-18 用友软件股份有限公司 Data packet synchronizing device and method for client application
CN103138912A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 Data synchronizing method and data synchronizing system
CN103365873A (en) * 2012-03-28 2013-10-23 阿里巴巴集团控股有限公司 Push method and device for business data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999048028A2 (en) * 1998-03-16 1999-09-23 Globalbrain.Net Inc. Improved search engine
CN101216832A (en) * 2007-12-28 2008-07-09 腾讯科技(深圳)有限公司 Data synchronization process and device
CN101576920A (en) * 2009-06-19 2009-11-11 用友软件股份有限公司 Search engine system
CN101650741A (en) * 2009-08-27 2010-02-17 中国电信股份有限公司 Method and system for updating index of distributed full-text search in real time
CN102325367A (en) * 2011-09-29 2012-01-18 用友软件股份有限公司 Data packet synchronizing device and method for client application
CN103138912A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 Data synchronizing method and data synchronizing system
CN103365873A (en) * 2012-03-28 2013-10-23 阿里巴巴集团控股有限公司 Push method and device for business data

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156088B (en) * 2015-04-01 2020-02-04 阿里巴巴集团控股有限公司 Index data processing method, data query method and device
CN106156088A (en) * 2015-04-01 2016-11-23 阿里巴巴集团控股有限公司 A kind of index data processing method, data query method and device
CN105302576A (en) * 2015-11-26 2016-02-03 中山大学 Method and system for generating user guide based on APP updating
CN105302576B (en) * 2015-11-26 2018-12-21 中山大学 A kind of users' guidebook generation method and system updated based on APP
CN105677865A (en) * 2016-01-08 2016-06-15 天津车之家科技有限公司 Method and system for updating index data and search engine
CN107368502A (en) * 2016-05-13 2017-11-21 北京京东尚科信息技术有限公司 Information synchronization method and device
CN106021527B (en) * 2016-05-24 2019-06-28 努比亚技术有限公司 A kind of data processing method and search server, sync server
CN106021527A (en) * 2016-05-24 2016-10-12 努比亚技术有限公司 Data processing method and search server and synchronization server
CN106776824A (en) * 2016-11-21 2017-05-31 武汉斗鱼网络科技有限公司 The level method and system of Android databases
CN106776824B (en) * 2016-11-21 2020-10-16 武汉斗鱼网络科技有限公司 Android database upgrading method and system
CN107016027A (en) * 2016-12-08 2017-08-04 阿里巴巴集团控股有限公司 The method and apparatus for realizing business information fast search
CN106960007A (en) * 2017-02-28 2017-07-18 北京京东尚科信息技术有限公司 A kind of data-updating method, device and electronic equipment
CN107133350A (en) * 2017-05-25 2017-09-05 努比亚技术有限公司 Data-updating method, mobile terminal and storage medium based on search engine
CN110019179A (en) * 2017-07-31 2019-07-16 北京嘀嘀无限科技发展有限公司 Update method and device, the electronic equipment, storage medium of index database
CN109800234A (en) * 2019-01-25 2019-05-24 苏州科达科技股份有限公司 Service platform database system, upgrade method, equipment and storage medium
CN109933573A (en) * 2019-01-30 2019-06-25 北京融链科技有限公司 Data bank service update method, apparatus and system
CN109933573B (en) * 2019-01-30 2021-06-01 北京融链科技有限公司 Database service updating method, device and system
CN111061745A (en) * 2019-10-10 2020-04-24 望海康信(北京)科技股份公司 Data synchronization system and method
CN112380416A (en) * 2020-11-25 2021-02-19 北京慕华信息科技有限公司 Method for updating course index, course searching method and device

Similar Documents

Publication Publication Date Title
CN103559301A (en) Method of data update, database trigger and SE (search engine)
CN103136243B (en) File system duplicate removal method based on cloud storage and device
CN102741843B (en) Method and apparatus for reading data from database
CN104573093B (en) A kind of method and apparatus for managing file directory
CN105224237A (en) A kind of date storage method and device
CN107807932B (en) Hierarchical data management method and system based on path enumeration
CN104199750A (en) File recovery method and device of linux system
CN103020255A (en) Hierarchical storage method and hierarchical storage device
CN103279532A (en) Filtering system and filtering method for removing duplication of elements of multiple sets and identifying belonged sets
KR20190050993A (en) Update escalation system and method
CN105900093A (en) Keyvalue database data table updating method and data table updating device
CN107103035B (en) Local table data updating method and device
CN102497286A (en) Method and device for matching management information base (MIB)
CN103714086A (en) Method and device used for generating non-relational data base module
CN103902562A (en) Method and device for upgrading terminal databases
CN104516796A (en) Command set based network element backup and recovery method and device
CN107402753B (en) Method and device for refreshing hard disk firmware
CN104537012B (en) Data processing method and device
CN103593447A (en) Data processing method and device applied to database table
CN103713926A (en) Method and system for updating software of client in advance
CN115421968A (en) Data recovery method and electronic equipment
US9747295B1 (en) Updating a large dataset in an enterprise computer system
WO2016192057A1 (en) Updating method and device for index table
CN102725754B (en) Method and device for processing index data
CN105260266A (en) Snapshot volume writing method and dependent snapshot system

Legal Events

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

Application publication date: 20140205

RJ01 Rejection of invention patent application after publication