CN108763578A - A kind of newer method of index file and server - Google Patents

A kind of newer method of index file and server Download PDF

Info

Publication number
CN108763578A
CN108763578A CN201810582788.XA CN201810582788A CN108763578A CN 108763578 A CN108763578 A CN 108763578A CN 201810582788 A CN201810582788 A CN 201810582788A CN 108763578 A CN108763578 A CN 108763578A
Authority
CN
China
Prior art keywords
server
text message
index
transaction journal
target
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
CN201810582788.XA
Other languages
Chinese (zh)
Other versions
CN108763578B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810582788.XA priority Critical patent/CN108763578B/en
Publication of CN108763578A publication Critical patent/CN108763578A/en
Application granted granted Critical
Publication of CN108763578B publication Critical patent/CN108763578B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of newer methods of index file, including:When first server detects the update of target index information, the first server obtains the first transaction journal, wherein first transaction journal is for recording the target index information;The first server updates index file according to first transaction journal;The first server sends first transaction journal to second server, so that the second server updates the index file according to first transaction journal.A kind of server is also disclosed in the embodiment of the present invention.On the one hand the embodiment of the present invention can update index file in time, promote the reliability of retrieval result, on the other hand can also reduce computing resource, the index information for computing repeatedly repetition be prevented, to promote resource utilization.

Description

A kind of newer method of index file and server
Technical field
The present invention relates to data processing field more particularly to a kind of newer method of index file and servers.
Background technology
With the development of science and technology, especially the increase of information content, information retrieval technique are increasingly valued by the people.Well Information retrieval technique, can be convenient for determining information retrieval in slave bulk information fast and accurately as a result, in order to which user applies.
Currently, indexing task by timing acquisition to build index file, then index file is synchronized in system Each server, each server are loaded after getting index file locally, and final provide retrieves clothes on line Business.
However, if obtain index task interval time it is long, can index file can not timely update, may lead The information that family retrieves of applying is not comprehensive, reduces the reliability of retrieval result.If obtaining the time interval mistake of index task Short, then it is to repeat that may lead to the index of most information in the short time, to cause the waste of a large amount of computing resources.
Invention content
An embodiment of the present invention provides a kind of newer method of index file, server and systems, on the one hand can and When update index file, promote the reliability of retrieval result, on the other hand can also reduce computing resource, prevent from computing repeatedly weight Multiple index information, to promote resource utilization.
In view of this, the first aspect of the present invention provides a kind of newer method of index file, including:
When first server detects the update of target index information, the first server obtains the first transaction journal, Wherein, first transaction journal is for recording the target index information;
The first server updates index file according to first transaction journal;
The first server sends first transaction journal to second server so that the second server according to First transaction journal updates the index file.
The second aspect of the present invention provides a kind of newer method of index file, including:
When first server detects the update of target index information, the second server receives the first server The first transaction journal sent, wherein first transaction journal is for recording the target index information, and first thing Business daily record is for triggering the first server update index file;
The second server updates the index file according to first transaction journal.
The third aspect of the present invention provides a kind of server, including:
Acquisition module, for when first server detects the update of target index information, obtaining the first transaction journal, In, first transaction journal is for recording the target index information;
Update module, first transaction journal for being obtained according to the acquisition module update index file;
Sending module, for sending first transaction journal that the acquisition module obtains to second server, so that The second server updates the index file according to first transaction journal.
The fourth aspect of the present invention provides a kind of server, including:
Receiving module, for when first server detects the update of target index information, receiving the first server The first transaction journal sent, wherein first transaction journal is for recording the target index information, and first thing Business daily record is for triggering the first server update index file;
Update module, first transaction journal for being received according to the receiving module update the index file.
The fifth aspect of the present invention provides a kind of server, including:Memory, transceiver, processor and total linear system System;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
When detecting the update of target index information, the first transaction journal is obtained, wherein first transaction journal is used for Record the target index information;
Index file is updated according to first transaction journal;
First transaction journal is sent to second server, so that the second server is according to the first affairs day Will updates the index file;
The bus system is for connecting the memory and the processor, so that the memory and the place Reason device is communicated.
The sixth aspect of the present invention provides a kind of server, including:Memory, transceiver, processor and total linear system System;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
When detecting the update of target index information, the first transaction journal that first server is sent is received, wherein described First transaction journal is for recording the target index information, and first transaction journal is for triggering the first server Update index file;
The index file is updated according to first transaction journal;
The bus system is for connecting the memory and the processor, so that the memory and the place Reason device is communicated.
The seventh aspect of the present invention provides a kind of index file more new system, and the index file more new system includes: First server, second server and client;
When first server detects the update of target index information, the first server obtains the first transaction journal, Wherein, first transaction journal is for recording the target index information;
The first server updates index file according to first transaction journal;
The first server sends first transaction journal to second server;
The second server updates the index file according to first transaction journal;
The client sends search instruction to the second server;
The second server obtains retrieval result according to the search instruction from the index file;
The second server sends the retrieval result to the client.
The eighth aspect of the present invention provides a kind of computer readable storage medium, in the computer readable storage medium It is stored with instruction, when run on a computer so that computer executes the method described in above-mentioned various aspects.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, a kind of newer method of index file is provided, when first server detects target rope When drawing information update, first server obtains the first transaction journal, and the first transaction journal is for recording target index information, then First server updates index file according to the first transaction journal, in addition, first server also needs to send to second server First transaction journal, second server update index file according to the first transaction journal.By the above-mentioned means, when having detected rope Just trigger index file newer flow when drawing task, the master server as first server can generate only and fresh information Then the daily record is handed down to other from server by relevant daily record, either master server all only updates still from server Increment content is added into original index file changed index information, on the one hand can update index in time File promotes the reliability of retrieval result, on the other hand can also reduce computing resource, prevents the index letter for computing repeatedly repetition Breath, to promote resource utilization.
Description of the drawings
Fig. 1 is a configuration diagram of index file more new system in the embodiment of the present invention;
Fig. 2 is index file one interaction flow schematic diagram of newer method in the embodiment of the present invention;
Fig. 3 is the newer method one embodiment schematic diagram of index file in the embodiment of the present invention;
Fig. 4 is one embodiment schematic diagram that master server is interacted with from server in the embodiment of the present invention;
Fig. 5 is a schematic diagram of hashed table index structure in the embodiment of the present invention;
Fig. 6 is the schematic diagram that layer architecture is indexed in the embodiment of the present invention;
Fig. 7 is master server and a schematic diagram from server sync index file in the embodiment of the present invention;
Fig. 8 is another embodiment schematic diagram of the newer method of index file in the embodiment of the present invention;
Fig. 9 is master server and the schematic diagram switched from server in the embodiment of the present invention;
Figure 10 is one embodiment schematic diagram of server in the embodiment of the present invention;
Figure 11 is another embodiment schematic diagram of server in the embodiment of the present invention;
Figure 12 is another embodiment schematic diagram of server in the embodiment of the present invention;
Figure 13 is another embodiment schematic diagram of server in the embodiment of the present invention;
Figure 14 is another embodiment schematic diagram of server in the embodiment of the present invention;
Figure 15 is one embodiment schematic diagram of server in the embodiment of the present invention;
Figure 16 is another embodiment schematic diagram of server in the embodiment of the present invention;
Figure 17 is another embodiment schematic diagram of server in the embodiment of the present invention;
Figure 18 is a structural schematic diagram of server in the embodiment of the present invention;
Figure 19 is index file more new system one embodiment schematic diagram in the embodiment of the present invention.
Specific implementation mode
An embodiment of the present invention provides a kind of newer method of index file, server and systems, on the one hand can and When update index file, promote the reliability of retrieval result, on the other hand can also reduce computing resource, prevent from computing repeatedly weight Multiple index information, to promote resource utilization.
Term " first ", " second ", " third " in description and claims of this specification and above-mentioned attached drawing, " The (if present)s such as four " are for distinguishing similar object, without being used to describe specific sequence or precedence.It should manage The data that solution uses in this way can be interchanged in the appropriate case, so that the embodiment of the present invention described herein for example can be to remove Sequence other than those of illustrating or describe herein is implemented.In addition, term " comprising " and " having " and theirs is any Deformation, it is intended that cover it is non-exclusive include, for example, containing the process of series of steps or unit, method, system, production Product or equipment those of are not necessarily limited to clearly to list step or unit, but may include not listing clearly or for this The intrinsic other steps of processes, method, product or equipment or unit a bit.
It should be understood that the embodiment of the present invention can be applied to the commending system based on index service, the recommendation based on index service System, it is particularly applicable to browsers by the present invention, recommend corresponding content of text to user by browser, in addition, also specific suitable For public platform or small routine.Wherein, browser refers to that can show web page server or the supertext of file system Markup language (Hyper Text Markup Language, HTML) file content, and allow the one of user and these file interactions Kind software.It is used for showing word, image and the other information in network.
For index service as the bottom service for providing data in commending system, what is faced is that daily 10,000,000,000 grades of reading is asked It asks and million grades of write request, therefore the high performance index service and ability of automatic dilatation is to ensure whenever and wherever possible The key of commending system stability.In relational database, index be it is a kind of individually, physics in database table one row or A kind of storage organization that the value of multiple row is ranked up, it is set and the corresponding Compass of a row or several train values in some table The logical pointer inventory of the data page of middle these values of physical label.The catalogue for functioning as books of index, can be according to mesh The page number in record is quickly found out required content.
Index can be constituted a file by establishing index service, i.e. index file, then index file is synchronized to whole The system is referred to as index file more new system by a system, the present invention.Index file carries the sequential file of index.Index is originally Body is very small, only accounts for two fields.The record accessed in index file needs according to the following steps:
First, entire index file is loaded into the memory of server to (file very little, the memory for only taking up very little are empty Between), project is then searched for, object key is searched (such as the query method that reduces by half) using efficient algorithm, retrieves and records further according to object key Address, finally according to address will retrieval record feed back to client.
For the ease of introducing, referring to Fig. 1, Fig. 1 is a framework of index file more new system in the embodiment of the present invention Schematic diagram, as shown, the first server in figure is master server, second server is from server, it is possible to understand that , first server shown in figure and second server quantity are only a signal, should not constitute the limit to the present invention It is fixed.First server can be deployed in some area, for example be deployed in Beijing, and second server can also dispose other areas, than If being deployed in Shanghai, Shenzhen, Tianjin and Shenyang respectively, when user asks retrieval data by client to second server, Second server can issue relevant retrieval data to client.Wherein, client can dispose and terminal device, including but not only It is limited to PC, mobile phone, tablet computer and palm PC.
It needs that data is kept to synchronize between first server and second server, when first server updates, second service Device is also required to be updated, and is synchronized to reach data.In addition, principal and subordinate can also be carried out between first server and second server Switching, when first server breaks down, can select a suitable server to take over first service from second server The work of device, to realize master-slave swap.
Referring to Fig. 2, Fig. 2 is index file one interaction flow schematic diagram of newer method in the embodiment of the present invention, such as Shown in figure, specifically:
In step S1, first, updated when first server detects index information (for example increase five new texts Chapter) when, first server can obtain transaction journal, wherein transaction journal is for recording newer index information (this five texts The contents such as the title of chapter and field);
In step S2, first server is updated storage according to transaction journal in local index file;
In step S3, while step S2 is carried out, or after step S2 is completed, first server is to second service Device sends transaction journal;
In step S4, second server is updated storage also according to transaction journal in local index file;
In step S5, when user retrieves, user sends search instruction by client to second server, User can be carried in search instruction needs the message identification retrieved, message identification to be used to indicate the content that user wants retrieval, Such as " king's honor ";
In step S6, second server finds corresponding article list according to search instruction from database, in order to make New article also has the chance of exposure, and newest file can be come to article list head position, and sequence can also be right after finishing Expired superseded, the duplicate removal logic of article list execution and low-quality are superseded etc.;
In step S7, article list is sent to client, client shows corresponding article list to user.
Below by from the angle of first server, the newer method of index file in the present invention is introduced, is please referred to Fig. 3, the newer method one embodiment of index file includes in the embodiment of the present invention:
101, when first server detects the update of target index information, first server obtains the first transaction journal, Wherein, the first transaction journal is for recording target index information;
In the present embodiment, newer target index information is being detected the presence of as the first server for master server When, first server can obtain the first transaction journal, which is the file for recording target index information.
Specifically, the first transaction journal is binlog, and binlog is the file of a binary format, is used for recording Family is to the newer structured query language of database (Structured Query Language, SQL), for example, change database Table and the SQL statement for changing content can all be recorded in binlog, but will not be recorded to the inquiry of the contents such as library table.When there is number When according to being written to database, also newer SQL statement can be written in corresponding binlog files simultaneously.Work as use It is only complete to the progress of the data of a period of time standby when mysqldump tools back up, but if catch sight of database after backup Server failure, this when will use binlog, therefore, the main function of binlog be for database principal and subordinate it is multiple The increment recovery of system and data.
102, first server updates index file according to the first transaction journal;
In the present embodiment, first server can be according to the SQL statement in the first transaction journal, to being stored in data originally Index file in library is updated.
103, first server sends the first transaction journal to second server, so that second server is according to the first affairs Daily record updates index file.
In the present embodiment, while executing step 102 or after executing step 102, first server can be with Send the first transaction journal to second server, similarly, second server also according to the SQL statement in the first transaction journal, The index file of script storage in the database is updated, to achieve the purpose that principal and subordinate's server data synchronizes.
Specifically, referring to Fig. 4, Fig. 4 is the implementation that master server is interacted with from server in the embodiment of the present invention It illustrates and is intended to, " master server (master) " in figure is first server, and " from server (slave) " is second service Device, when article enters index database in real time, the data with all index services under business are the same.Master can be written in newer operation The master server of computer room (main equipment room can be deployed in Shanghai), backup computer room is from server X (X>It 0) can be from the slave server of this computer room 0 synchronizes binlog.And back up computer room (backup computer room can be deployed in multiple and different regions, such as Shenzhen, Shanghai and Beijing) Slave server 0 then from the master server of main equipment room synchronize binlog.Master server is responsible for being written data, master server and from clothes Business device can provide on-line checking service.
Based on classical command mode, master server and from real by mutually sending order (command) between server It now interacts, order is an abstract concept, and command can be used for distributed tasks, can also be used to transmission data, this is completely Determine how to handle by business, frame defines only an actual command --- heartbeat detection order (heartbeat command).It can be by defining the order of oneself, and the command processor of response is provided to realize any type of business.Frame The Core Feature that frame provides has the network communication of bottom, master server/maintaining from relationship server, the distribution work(of command Energy is equal.
Master server and be that binlog is written in fresh information by master server, and is tieed up from the master-slave principle between server One index of shield file is recycled with trace log.When connecting master server from server for one, it notifies master server to close In the position that the last time read in binlog from server is successfully updated.Times occurred from that time is received from server What is updated, and then blocks and master server is waited for notify new update.Relational DBMS (MySQL) duplication is based on Master server tracks all changes (update and deletion etc.) to database in binlog.Therefore, to carry out replicating must be Binlog is enabled on master server.
Each from server from master server receive master server be recorded its binlog preservation update, so as to from Server can execute identical update to its data copy.From server could be provided as replicate master server data it Afterwards, it connects master server and waits to be updated.If failed from server and master server, or lost and main service from server Connection between device can then keep periodically attempting connection from server, listen update until it can continue to frame.
In the embodiment of the present invention, a kind of newer method of index file is provided, when first server detects target rope When drawing information update, first server obtains the first transaction journal, and the first transaction journal is for recording target index information, then First server updates index file according to the first transaction journal, in addition, first server also needs to send to second server First transaction journal, second server update index file according to the first transaction journal.By the above-mentioned means, when having detected rope Just trigger index file newer flow when drawing task, the master server as first server can generate only and fresh information Then the daily record is handed down to other from server by relevant daily record, either master server all only updates still from server Increment content is added into original index file changed index information, on the one hand can update index in time File promotes the reliability of retrieval result, on the other hand can also reduce computing resource, prevents the index letter for computing repeatedly repetition Breath, to promote resource utilization.
Optionally, on the basis of above-mentioned Fig. 3 corresponding embodiments, index file provided in an embodiment of the present invention is newer In first alternative embodiment of method, after first server obtains the first transaction journal, can also include:
First server obtains the First ray number corresponding to the first transaction journal;
If First ray number and the second sequence number are inconsistent, first server generates memory text according to the first transaction journal Part, wherein the sequence number corresponding to second the second transaction journal of Serial No., the second transaction journal is for recording a cycle Interior newer index information;
First server stored memory file.
In the present embodiment, since each update operation can be all recorded in binlog, in the disk of server There can be multiple binlog, and the numeric suffix of binlog filenames is exactly its sequence number.Internal storage state in server is every Data in memory will be converted into memory file by certain interval of time (such as 15 minutes) by backup file system (dump) Form is preserved, and can save in disk.
Specifically, it in first server after getting the first transaction journal, can be determined from the first transaction journal First ray number corresponding to first transaction journal.Assuming that the First ray number be 0005, then judge First ray number and Whether the second sequence number is consistent, and the second sequence number is the sequence number corresponding to the second transaction journal, the second transaction journal here It is the transaction journal that first server is recorded in upper a cycle.If First ray number is consistent with the second sequence number, illustrate Internal storage data (index information) does not update, therefore also there is no need to carry out repeating backup.If First ray number and the second sequence Row number is inconsistent, then illustrates that internal storage data (index information) has updated, and then, first server is needed according to the first transaction journal Memory file is generated, then the memory file is stored on the disk of first server.
Wherein, internal storage data can be recorded in into a storage device by dump in particular moment.The purpose of storage is logical It is often mistake to occur in order to prevent, and the data that will be provided with readable format are copied to foreign medium from main or additional storage body, Such as tape, disk or printer media can replicate entire virtual storage body to collect error message or virtually store body Some portion of content.
Secondly, in the embodiment of the present invention, after first server obtains the First ray number corresponding to the first transaction journal, If First ray number and the second sequence number are inconsistent, memory file is generated according to the first transaction journal, finally by memory text Part is stored in server local.By the above-mentioned means, a new transaction journal can be all rolled when each Backup Data, to anti- It only repeats to back up identical transaction journal, promotes the utilization rate of storage resource.In addition, after being backed up to transaction journal, When process is restarted, the transaction journal in disk can be loaded, the state before operation recovery to delay machine in applied transaction daily record, from And the significantly reliability of lifting scheme.
Optionally, on the basis of above-mentioned Fig. 3 corresponding embodiments, index file provided in an embodiment of the present invention is newer In second alternative embodiment of method, first server updates index file according to the first transaction journal, may include:
First server generates N bar rope lead journeys according to the first transaction journal, wherein N is the integer more than 0, per bar rope Lead journey corresponds to an index type;
First server carries out more the indexing parameter in Hash table according to target index information, according to N bar rope lead journeys Newly, to obtain index file, wherein indexing parameter includes text message mark, text message timestamp and text message score At least one of in.
In the present embodiment, provide a kind of high-performance Hash search method, server (including first server and second clothes It is engaged in device) index structure in memory using Hash table storage, will be introduced, however this is not by taking first server as an example here Limitation of the invention should be constituted.
In order to make it easy to understand, referring to Fig. 5, Fig. 5 be the embodiment of the present invention in hashed table index structure a schematic diagram, As shown, Hash table includes X bucket (bucket), bucket number can be estimate index number 1.5 times to 2 times, bucket table A storage cell of one or more record can be stored by showing, a usual bucket can be a disk block.When insertion one When record, bucket spilling will occur for the not enough spaces of bucket, then system will provide an overflow bucket, if overflow It is also full to go out bucket, system will continue to provide next overflow bucket.So go down, one chain of all overflow buckets of a given bucket Table links together.
Assuming that having recorded a plurality of newer index information in the first transaction journal, at least one can be generated according to index information Bar rope lead journey, please refers to table 1, and table 1 is index information and corresponding index thread in the first transaction journal, rope here Fuse is ceased by taking the title of article as an example, and in practical applications, index information can also include abstract, author and the key of article The data such as word.
Table 1
Index information Index type Index thread
" Liu is standby to coordinate the hidden quickly upper king of bright generation " Subject index Thread 1
"《Create 101》Which type of girl just has the ability C upper " Subject index Thread 1
" happy base camp meets Meteor Garden special show " Account indexes Thread 2
" vegetable oil is cooked can be carcinogenic, and coconut oil is most healthy " Account indexes Thread 2
" when logistics meets artificial intelligence " Account indexes Thread 2
Here " thread 1 " can classify to article according to different themes, and " thread 2 " can be according to different accounts Number classify to article.Server indexes target according to target index information (i.e. this needs the index information recorded) The first transaction journal corresponding to information is added into N number of index thread, and the same index thread is put into the same bucket, and one Bucket may hang at least one index tab, this is because when carrying out Hash calculation to different index tabs, may exist The case where different index label corresponds to like-identified, for example, " sport " label be 1, " amusement " label also be 1, then " sport " and " amusement " two index tabs all correspond to the same bucket.And each index tab also corresponds to specific vector, is stored in vector Indexing parameter, indexing parameter include at least one in text message mark, text message timestamp and text message score, tool Body, indexing parameter may include following content:
The indexing parameter of each article is updated in vector, to obtain updated index file.
Secondly, in the embodiment of the present invention, server can take first according to the process that transaction journal updates index file Device be engaged according to transaction journal generation N bar rope lead journeys, then according to target index information, according to N bar rope lead journeys to Hash table In indexing parameter be updated, to obtain index file.By the above-mentioned means, the index structure in entire server memory is adopted It is stored with Hash table, the article list under indexing uses the storage of array of contiguous memory, can preferably utilize server in this way The computing resource of processor, to improve query performance.
Optionally, on the basis of above-mentioned Fig. 3 corresponding second embodiment, index file provided in an embodiment of the present invention In newer method third alternative embodiment, N bar rope lead journeys include the thread of tab indexes, wherein tab indexes indicate With the relevant index of keyword;
Before first server updates index file according to the first transaction journal, can also include:
First server is handled M text message by label scoring model, and it is right to obtain each text message institute The text message score answered, wherein M is the integer more than 0, and label scoring model is for indicating text message and text message point Functional relation between number, M text message belong to target index information;
If M is more than 1, first server is according to the text message score corresponding to each text message from high to Low suitable Sequence is ranked up M text message, to obtain tab indexes sequence, wherein tab indexes sequence is used to indicate client exhibition Show M text message;
First server carries out more the indexing parameter in Hash table according to target index information, according to N bar rope lead journeys Newly, may include:
First server obtains the text message mark of M text message, text message time according to target index information Stamp and text message score;
First server is divided according to text message mark, text message timestamp and the text message of M text message Number.The indexing parameter in Hash table is updated in the thread of tab indexes.
In the present embodiment, different index threads corresponds to different index contents, referring to Fig. 6, Fig. 6 is that the present invention is real The schematic diagram that layer architecture is indexed in example is applied, as shown, index thread can correspond respectively to four kinds of index types, specifically For tab indexes, subject index, account index and Similar Text index.As shown, different regions (such as Shenzhen, Shanghai with And Beijing) second server on be all stored with the corresponding index data of every a kind of index, thereby guarantee that the same of index data Stepization.And index agency and be deployed in first server, index agency will be indexed by indexing write device according to by index type Data are written to second server.
To be introduced by taking tab indexes as an example below, tab indexes indicate with the relevant index of keyword, label can be with For " king's honor ", " poplar power " or " artificial inetlligent " etc., multiple text messages are usually had under the same tab indexes, i.e., it is literary Chapter.Server is handled M text message using label scoring model, obtains the text envelope corresponding to each text message Cease score, then according to the text message score corresponding to each text message from high to Low sequence, to M text message into Row sequence please refers to table 2 to obtain tab indexes sequence, and table 2 is a signal of tab indexes sequence.
Table 2
Client can show M text message successively according to the tab indexes sequence indicated by table 2.And in server When being updated to the indexing parameter in Hash table, text message mark (such as the article of each text message can be updated respectively Number), text message timestamp (such as article deliver the time) and text message score be (using label scoring model to text Result after the marking of this information).
Again, in the embodiment of the present invention, first server may be used label scoring model to M text message at Reason, obtains the text message score corresponding to each text message, right then according to text message score from high to Low sequence M text message is ranked up, to obtain tab indexes sequence.By the above-mentioned means, can according to score to text message into Row sequence, exposes the text message closer to respective labels in the index, to the dependable with function of lifting scheme.Label It tends to concentrate displaying and the relevant content of certain keywords, text related with keyword is quickly browsed to convenient for user Information.
Optionally, on the basis of above-mentioned Fig. 3 corresponding second embodiment, index file provided in an embodiment of the present invention In the 4th alternative embodiment of newer method, N bar rope lead journeys include the thread of subject index, wherein subject index indicates With the relevant index in field;
Before first server updates index file according to the first transaction journal, can also include:
First server is handled M text message by theme scoring model, and it is right to obtain each text message institute The text message score answered, wherein M is the integer more than 0, and theme scoring model is for indicating text message and text message point Functional relation between number, M text message belong to target index information;
If M is more than 1, first server is according to the text message score corresponding to each text message from high to Low suitable Sequence is ranked up M text message, to obtain subject index sequence, wherein tab indexes sequence is used to indicate client exhibition Show M text message;
First server carries out more the indexing parameter in Hash table according to target index information, according to N bar rope lead journeys Newly, may include:
First server obtains the text message mark of M text message, text message time according to target index information Stamp and text message score;
First server is divided according to text message mark, text message timestamp and the text message of M text message Number.The indexing parameter in Hash table is updated in the thread of subject index.
It in the present embodiment, will be introduced by taking subject index as an example, subject index indicates and the relevant index in field, theme It can be " sport ", " amusement " or " science and technology " etc., multiple text messages, i.e. article are usually had under the same subject index. Server is handled M text message using theme scoring model, obtains the text message corresponding to each text message Then score carries out M text message from high to Low sequence according to the text message score corresponding to each text message Sequence please refers to table 3 to obtain subject index sequence, and table 3 is the theme a signal of index sequence.
Table 3
Client can show M text message successively according to the subject index sequence indicated by table 3.And in server When being updated to the indexing parameter in Hash table, text message mark (such as the article of each text message can be updated respectively Number), text message timestamp (such as article deliver the time) and text message score be (using theme scoring model to text Result after the marking of this information).
Again, in the embodiment of the present invention, first server may be used theme scoring model to M text message at Reason, obtains the text message score corresponding to each text message, right then according to text message score from high to Low sequence M text message is ranked up, to obtain subject index sequence.By the above-mentioned means, can according to score to text message into Row sequence, exposes the text message closer to related subject in the index, to the dependable with function of lifting scheme.User The text message under some theme is may browse through, different themes corresponds to different fields.
Optionally, on the basis of above-mentioned Fig. 3 corresponding second embodiment, index file provided in an embodiment of the present invention In the 5th alternative embodiment of newer method, N bar rope lead journeys include the thread of account index, wherein account index indicates With the relevant index of text creation person;
Before first server updates index file according to the first transaction journal, can also include:
First server is handled M text message by account scoring model, and it is right to obtain each text message institute The text message score answered, wherein M is the integer more than 0, and account scoring model is for indicating text message and text message point Functional relation between number, M text message belong to target index information;
If M is more than 1, first server is according to the text message score corresponding to each text message from high to Low suitable Sequence is ranked up M text message, to obtain account index sequence, wherein account index sequence is used to indicate client exhibition Show M text message;
First server carries out more the indexing parameter in Hash table according to target index information, according to N bar rope lead journeys Newly, including:
First server obtains the text message mark of M text message, text message time according to target index information Stamp and text message score;
First server is divided according to text message mark, text message timestamp and the text message of M text message Number.The indexing parameter in Hash table is updated in the thread of account index.
It in the present embodiment, will be introduced so that account indexes as an example, account index indicates and the relevant index in field, account Can be " microblogging make laughs ranking list ", " Tencent's amusement " or " People's Net " etc. that the same account usually has multiple under indexing Text message, i.e. article.Server is handled M text message using account scoring model, obtains each text message Corresponding text message score, then according to the text message score corresponding to each text message from high to Low sequence, M text message is ranked up, to obtain account index sequence, please refers to table 4, table 4 is that one of account index sequence shows Meaning.
Table 4
Client can show M text message successively according to the account index sequence indicated by table 3.And in server When being updated to the indexing parameter in Hash table, text message mark (such as the article of each text message can be updated respectively Number), text message timestamp (such as article deliver the time) and text message score be (using account scoring model to text Result after the marking of this information).
Again, in the embodiment of the present invention, first server may be used account scoring model to M text message at Reason, obtains the text message score corresponding to each text message, right then according to text message score from high to Low sequence M text message is ranked up, to obtain account index sequence.By the above-mentioned means, can according to score to text message into Row sequence, exposes the text message closer to concerned account numbers in the index, to the dependable with function of lifting scheme.If The article that user writes some author is especially interested, correlation can be selected strongest from the article under author's account Article.
Optionally, on the basis of above-mentioned Fig. 3 corresponding second embodiment, index file provided in an embodiment of the present invention In the 6th alternative embodiment of newer method, N bar rope lead journeys include the thread of Similar Text index, wherein Similar Text Index indicates the index with relevance between text;
Before first server updates index file according to the first transaction journal, can also include:
First server is handled M text message by similarity scoring model, obtains each text message institute Corresponding text message score, wherein M is the integer more than 0, and similarity scoring model is for indicating text message and text envelope The functional relation between score is ceased, M text message belongs to target index information;
If M is more than 1, first server is according to the text message score corresponding to each text message from high to Low suitable Sequence is ranked up M text message, to obtain similarity indexing sequence, wherein similarity indexing sequence is used to indicate client M text message of end displaying;
First server carries out more the indexing parameter in Hash table according to target index information, according to N bar rope lead journeys Newly, may include:
First server obtains the text message mark of M text message, text message time according to target index information Stamp and text message score;
First server is divided according to text message mark, text message timestamp and the text message of M text message Number.The indexing parameter in Hash table is updated in the thread of Similar Text index.
It in the present embodiment, will be introduced so that Similar Text indexes as an example, Similar Text index indicates have between text The index of relevance, the similar text that different text messages are calculated by collaborative filtering (Collaborative Filtering, cf) Then this information list is given a mark to M text message in Similar Text information list by similarity scoring model, is obtained To the text message score corresponding to each text message.Client can show M text successively according to similarity indexing sequence This information.And when server is updated the indexing parameter in Hash table, the text of each text message can be updated respectively Message identification (such as article number), text message timestamp (such as article deliver the time) and text message score (profit Result after being given a mark to text message with account scoring model).
Cf is that the hobby for the group for having similar tastes and interests and possessing common experience using certain feels emerging come recommended user in simple terms The information of interest, the personal mechanism by cooperation are given the considerable degree of response of information (as scored) and are recorded to reach filtering Purpose so that help others' filter information, response may be not necessarily limited to of special interest, the discipline for information of especially loseing interest in Record is also quite important.
Cf can percolator machine be difficult to automated content analysis information, share other people experience, avoid content analysis It is incomplete or inaccurate, and can be complicated based on some, it is difficult to the concept of statement (such as information quality and personal sample) It is filtered.Cf has the ability for recommending new information.It can be found that information completely dissimilar in content, user is to recommendation information Content is unexpected in advance.It can be found that user is potential but oneself still not found interest preference.The automation journey of cf Degree is high, can effectively utilize the feedback information of other similar users, accelerate the speed of individualized learning.
Again, in the embodiment of the present invention, first server may be used similarity scoring model and be carried out to M text message Processing, obtains the text message score corresponding to each text message, then according to text message score from high to Low sequence, M text message is ranked up, to obtain similarity indexing sequence.By the above-mentioned means, can be according to score to text envelope Breath is ranked up, and exposes the higher text message of similarity in the index, to the dependable with function of lifting scheme.User It may browse through the stronger text message of relevance.
Optionally, on the basis of above-mentioned Fig. 3 corresponding second embodiment, index file provided in an embodiment of the present invention In the 7th alternative embodiment of newer method, first server is according to target index information, according to N bar rope lead journeys to Hash When indexing parameter in table is updated, can also include:
First server receives search index instruction;
First server instructs the indexing parameter for obtaining from Hash table index information to be checked according to search index, and/ Or index information to be checked.
In the present embodiment, the indexing parameter in Hash table is updated according to target index information in first server At the same time it can also receive the search index instruction of user's triggering, is then instructed according to the search index, read and wait for from Hash table The indexing parameter of search index information or index information to be checked, or be index information to be checked indexing parameter and Index information to be checked.The bucket of Hash table is divided into several parts, and update operation is responsible in each part by an index thread. It is realized without lock resource management by HazardPointer tools in being operated without lock.
Again, in the embodiment of the present invention, first server carries out the indexing parameter in Hash table according to N bar rope lead journeys While update, search index instruction can be received, index to be checked is then obtained from Hash table according to search index instruction The indexing parameter of information and/or index information to be checked.It is programmed without lock by the above-mentioned means, being all made of to Hash table and vector Technology, therefore, search index be never written into operation obstruction, can guarantee the stability of performance on line in this way.
Optionally, above-mentioned Fig. 3, Fig. 3 it is corresponding first to any one of the 7th embodiment on the basis of, the present invention In the 8th alternative embodiment of the newer method of index file that embodiment provides, first server sends the to second server After one transaction journal, can also include:
If First ray number is not detected in first server, first server sends index upgrade to second server and refers to It enables, so that second server instructs the third affairs obtained from first server corresponding to third sequence number according to index upgrade Daily record updates index file, wherein an adjacent sequence after third Serial No. First ray number according to third transaction journal Row number.
In the present embodiment, second server can send oneself current First ray number to first server, allow the first clothes Business device understands the state of second server synchronized update, that is, knows which transaction journal second server is synchronized to.If First transaction journal of First ray number instruction is not present, then second server will synchronize the dump shapes of first server State.At this moment in order to control outlet bandwidth, the second server that dump states are synchronized from the same first server does not exceed 3 It is a, and flow control can be made using TokenBucket algorithms, it avoids outlet bandwidth from being synchronized by unexpected a large amount of transaction journals and accounts for It is full.
For the ease of introducing, referring to Fig. 7, Fig. 7 is that master server is indexed with from server sync in the embodiment of the present invention One schematic diagram of file, as shown, under normal circumstances from server store transaction daily record synchronous with master server, main service Device with from synchronous No. 0 transaction journal of server, No. 1 transaction journal and No. 2 transaction journals, but complete from server sync After No. 2 transaction journals, start synchronous No. 56 transaction journals, but do not occur No. 56 transaction journals in master server, therefore, from Server is needed in synchronized transaction daily record next time, finds an affairs adjacent after No. 2 transaction journals in master server Daily record, i.e. No. 3 transaction journals then continue synchronous No. 3 transaction journals, until synchronously completing from server.
Under normal conditions, transaction journal uses the filename of " host_name-relay-bin.nnnnnn " form, wherein " host_name " is the host name from server, and " nnnnnn " is sequence number.Continuous affairs day is created with continuous sequence number Will, since 000001, the current transaction journal just used from server tracks index file.Dump files are stored in hard disk On, it will not be lost when from server closing.Next time from startup of server when, read these dump files with determine it from Master server has read how many transaction journal, and the daily record that copes with one's problems degree.
Further, in the embodiment of the present invention, after first server sends the first transaction journal to second server, root The more new state that second server is determined according to the First ray number of the first transaction journal, if First ray number is not present, Second server can synchronize the memory file of first server, then proceed to next affairs day of synchronous first transaction journal Will.By the above-mentioned means, master server can reach the synchronous of retrieval data with from server, ensure the coherent of index data Property.
Below by from the angle of second server, the newer method of index file in the present invention is introduced, is please referred to Fig. 8, the newer method one embodiment of index file includes in the embodiment of the present invention:
201, when first server detects the update of target index information, second server receives first server and sends The first transaction journal, wherein the first transaction journal is for recording target index information, and the first transaction journal is for triggering the One server update index file;
In the present embodiment, newer target index information is being detected the presence of as the first server for master server When, first server can obtain the first transaction journal, which is the file for recording target index information.Tool Body, the first transaction journal is binlog, and binlog is the file of a binary format, for recording user to database The main function of newer SQL, binlog are the increment recoveries of the leader follower replication and data for database.
202, second server updates index file according to the first transaction journal.
In the present embodiment, first server can be according to the SQL statement in the first transaction journal, to being stored in data originally Index file in library is updated, and first server also sends the first transaction journal, second server to second server Also according to the SQL statement in the first transaction journal, the index file of script storage in the database is updated, to reach The purpose that principal and subordinate's server data synchronizes.
In the embodiment of the present invention, when first server detects the update of target index information, second server receives the The first transaction journal that one server is sent, then second server is according to the first transaction journal update index file.By upper Mode is stated, the newer flow of index file, the master server as first server are just triggered when having detected index task It can generate only with the relevant daily record of fresh information, the daily record is then handed down to other from server, either master server Or from server, changed index information is all only updated, increment content is added into original index file, a side Face can update index file in time, promote the reliability of retrieval result, on the other hand can also reduce computing resource, prevent weight It is multiple to calculate the index information repeated, to promote resource utilization.
Optionally, on the basis of above-mentioned Fig. 8 corresponding embodiments, index file provided in an embodiment of the present invention is newer It, can be with after second server receives the first transaction journal that first server is sent in first alternative embodiment of method Including:
If First ray number is not detected in first server, second server receives index upgrade instruction, according to index More new command obtains the third transaction journal corresponding to third sequence number from first server, wherein third Serial No. A flanking sequence number after one sequence number;
Second server updates index file according to third transaction journal.
In the present embodiment, second server can send oneself current First ray number to first server, allow the first clothes Business device understands the state of second server synchronized update, that is, knows which transaction journal second server is synchronized to.If First transaction journal of First ray number instruction is not present, then second server will synchronize the dump shapes of first server State.At this moment in order to control outlet bandwidth, the second server that dump states are synchronized from the same first server does not exceed 3 It is a, and flow control can be made using TokenBucket algorithms, it avoids outlet bandwidth from being synchronized by unexpected a large amount of binlog and accounts for It is full.
Secondly, in the embodiment of the present invention, after first server sends the first transaction journal to second server, according to the The First ray number of one transaction journal determines the more new state of second server, if First ray number is not present, second Server can synchronize the memory file of first server, then proceed to next transaction journal of synchronous first transaction journal.It is logical Aforesaid way is crossed, master server can reach the synchronous of retrieval data with from server, ensure the continuity of index data.
Optionally, on the basis of above-mentioned Fig. 8 or Fig. 8 corresponding one embodiment, rope provided in an embodiment of the present invention In quotation part second alternative embodiment of newer method, can also include:
If first server breaks down, second server selection target server, wherein destination server belongs to Two servers include the server of maximum sequence number;
When destination server detects index information update, destination server in second server is to second server In other servers send target transaction daily record so that other servers according to target transaction daily record update index file, In, target transaction daily record is used for recording indexes information;
Destination server in second server updates index file according to target transaction daily record.
In the present embodiment, first server can be with monitoring state, however, it is determined that first server breaks down can not be just Often work, then a suitable destination server can be selected to carry out and take over the work of first server from second server Make, goal server should be the server that second server includes maximum sequence number, this is because in practical application In, first server and second server be indexed data it is synchronous when may have certain time delay, such as the first clothes Business device is updated to when the transaction journal of serial number 0010, has server also to update the transaction journal to 0010 in second server, Also server only updates the transaction journal to 0009, in order to obtain more real-time index data, therefore preferential selection is more The new server for arriving latest transaction daily record.Finally, target transaction daily record is obtained by the destination server chosen, and certainly When oneself is indexed file update, target transaction daily record is distributed to other second servers so that others second Server is also indexed file update as destination server.
In order to make it easy to understand, referring to Fig. 9, Fig. 9 be the embodiment of the present invention in master server with from server switch one A schematic diagram, as shown, the master server positioned at Shanghai can obtain the institute of index service by IndexChecker tools There is the agreement address (Internet Protocol, IP) and port interconnected between network, every the heart that 3 seconds detect all services It jumps, if in the 9: 26 05: morning of on May 29th, 2018, can not all receive heartbeat continuous 20 times, then it is assumed that main clothes Business device delay machine.Then, it needs to select a server as master server from the slave server of normal work.For example, can be with Selected from the computer room in Shenzhen " from server 0 " as new master server, then with Shanghai and other servers of Pekinese into Row communication.
It should be noted that master server with include the case where switching from server but be not limited only to, master server delay machine, Either from server sync failure or offline situations such as index failure is added.It can be to IndexChecker works from server Tool obtains new master server.Wherein, IndexChecker tools are for identifying potential redundancy table index.Read one Or the index of multiple tables, identify repetition and potential redundancy index.
Again, in the embodiment of the present invention, when first server breaks down, second server selection target server, Wherein, destination server belongs to the server that second server includes maximum sequence number, which can take over Data are synchronized with other second servers by the work of one server.By the above-mentioned means, on the one hand can ensure system Stability selects to work on from server in master server failure, to the feasibility and operability of lifting scheme.Separately On the one hand, it preferentially selects the maximum server of sequence number as master server, more real-time index data can be obtained, to carry Rise the newer real-time of index data.
The first server in the present invention is described in detail below, referring to Fig. 10, Figure 10 is the embodiment of the present invention Middle server one embodiment schematic diagram, server 30 include:
Acquisition module 301, for when first server detects the update of target index information, obtaining for the first affairs day Will, wherein first transaction journal is for recording the target index information;
Update module 302, first transaction journal update index text for being obtained according to the acquisition module 301 Part;
Sending module 303, for sending the first affairs day that the acquisition module 301 obtains to second server Will, so that the second server updates the index file according to first transaction journal.
In the present embodiment, when first server detects the update of target index information, acquisition module 301 obtains the first thing Business daily record, wherein first transaction journal is for recording the target index information, and update module 302 is according to the acquisition First transaction journal that module 301 obtains updates index file, and sending module 303 sends the acquisition to second server First transaction journal that module 301 obtains, so that the second server is according to described in first transaction journal update Index file.
In the embodiment of the present invention, a kind of server is provided, when first server detects the update of target index information, First server obtains the first transaction journal, and the first transaction journal is used to record target index information, then first server root Index file is updated according to the first transaction journal, in addition, first server also needs to send the first transaction journal to second server, Second server updates index file according to the first transaction journal.By the above-mentioned means, just being touched when having detected index task Send out the newer flow of index file, the master server as first server can generate only with the relevant daily record of fresh information, Then the daily record is handed down to other from server, either master server all only updates changed still from server Increment content is added into original index file index information, on the one hand can update index file in time, promotes inspection On the other hand the reliability of hitch fruit can also reduce computing resource, prevent the index information for computing repeatedly repetition, to promote money Source utilization rate.
Optionally, on the basis of embodiment corresponding to above-mentioned Figure 10,1 is please referred to Fig.1, it is provided in an embodiment of the present invention In another embodiment of server 30, the server 30 further includes generation module 304 and memory module 305;
The acquisition module 301 is additionally operable to after obtaining transaction journal, obtains the corresponding to first transaction journal One sequence number;
The generation module 304, if inconsistent for the First ray number and the second sequence number, according to described first Transaction journal generates memory file, wherein the sequence number corresponding to second transaction journal of the second Serial No., described second Transaction journal is for recording newer index information in a cycle;
The memory module 305, the memory file for storing the generation of the generation module 304.
Secondly, in the embodiment of the present invention, after first server obtains the First ray number corresponding to the first transaction journal, If First ray number and the second sequence number are inconsistent, memory file is generated according to the first transaction journal, finally by memory text Part is stored in server local.By the above-mentioned means, a new transaction journal can be all rolled when each Backup Data, to anti- It only repeats to back up identical transaction journal, promotes the utilization rate of storage resource.In addition, after being backed up to transaction journal, When process is restarted, the transaction journal in disk can be loaded, the state before operation recovery to delay machine in applied transaction daily record, from And the significantly reliability of lifting scheme.
Optionally, on the basis of embodiment corresponding to above-mentioned Figure 10, server 30 provided in an embodiment of the present invention In another embodiment,
The update module 302 is specifically used for generating N bar rope lead journeys according to first transaction journal, wherein described N is the integer more than 0, and an index type is corresponded to per bar rope lead journey;
The first server is according to the target index information, according to the N bar ropes lead journey to the rope in Hash table Draw parameter to be updated, to obtain the index file, wherein the indexing parameter includes text message mark, text message At least one of in timestamp and text message score.
Secondly, in the embodiment of the present invention, server can take first according to the process that transaction journal updates index file Device be engaged according to transaction journal generation N bar rope lead journeys, then according to target index information, according to N bar rope lead journeys to Hash table In indexing parameter be updated, to obtain index file.By the above-mentioned means, the index structure in entire server memory is adopted It is stored with Hash table, the article list under indexing uses the storage of array of contiguous memory, can preferably utilize server in this way The computing resource of processor, to improve query performance.
Optionally, 2 are please referred to Fig.1 on the basis of embodiment corresponding to above-mentioned Figure 10, it is provided in an embodiment of the present invention In another embodiment of server 30, the N bar ropes lead journey includes the thread of tab indexes, wherein the tab indexes table Show and the relevant index of keyword;
The server 30 further includes processing module 306 and sorting module 307;
The processing module 306, for the update module 302 according to first transaction journal update index file it Before, M text message is handled by label scoring model, obtains the text message point corresponding to each text message Number, wherein M is the integer more than 0, and the label scoring model is used to indicate the letter between text message and text message score Number relationship, the M text message belong to the target index information;
The sorting module 307, if being more than 1 for the M, according to the text envelope corresponding to each text message Score is ceased from high to Low sequence, the M text message is ranked up, to obtain tab indexes sequence, wherein the mark Label index sequence is used to indicate client and shows the M text message;
The update module 302, specifically for obtaining the text message of the M text message according to target index information Mark, text message timestamp and text message score;
According to the text message of M text message mark, text message timestamp and text message score.Institute The thread for stating tab indexes is updated the indexing parameter in the Hash table.
Again, in the embodiment of the present invention, first server may be used label scoring model to M text message at Reason, obtains the text message score corresponding to each text message, right then according to text message score from high to Low sequence M text message is ranked up, to obtain tab indexes sequence.By the above-mentioned means, can according to score to text message into Row sequence, exposes the text message closer to respective labels in the index, to the dependable with function of lifting scheme.Label It tends to concentrate displaying and the relevant content of certain keywords, text related with keyword is quickly browsed to convenient for user Information.
Optionally, on the basis of embodiment corresponding to above-mentioned Figure 12, server 30 provided in an embodiment of the present invention In another embodiment, the N bar ropes lead journey includes the thread of subject index, wherein the subject index indicates and field phase The index of pass;
The processing module 306 is additionally operable to the update module 302 and updates index file according to first transaction journal Before, M text message is handled by theme scoring model, obtains the text message point corresponding to each text message Number, wherein M is the integer more than 0, and the theme scoring model is used to indicate the letter between text message and text message score Number relationship, the M text message belong to the target index information;
The sorting module 307, if being additionally operable to the M is more than 1, according to the text corresponding to each text message Information score is ranked up the M text message from high to Low sequence, to obtain subject index sequence, wherein described Tab indexes sequence is used to indicate client and shows the M text message;
The update module 302, specifically for obtaining the text message of the M text message according to target index information Mark, text message timestamp and text message score;
According to the text message of M text message mark, text message timestamp and text message score.Institute The thread for stating subject index is updated the indexing parameter in the Hash table.
Again, in the embodiment of the present invention, first server may be used theme scoring model to M text message at Reason, obtains the text message score corresponding to each text message, right then according to text message score from high to Low sequence M text message is ranked up, to obtain subject index sequence.By the above-mentioned means, can according to score to text message into Row sequence, exposes the text message closer to related subject in the index, to the dependable with function of lifting scheme.
Optionally, on the basis of embodiment corresponding to above-mentioned Figure 12, server 30 provided in an embodiment of the present invention In another embodiment, the N bar ropes lead journey includes the thread of account index, wherein the account index indicates to create with text The relevant index of the person of building;
The processing module 306 is additionally operable to the update module 302 and updates index file according to first transaction journal Before, M text message is handled by account scoring model, obtains the text message point corresponding to each text message Number, wherein M is the integer more than 0, and the account scoring model is used to indicate the letter between text message and text message score Number relationship, the M text message belong to the target index information;
The sorting module 307, if being additionally operable to the M is more than 1, the first server is according to each text envelope The corresponding text message score of breath is ranked up the M text message from high to Low sequence, to obtain account index Sequence, wherein the account index sequence is used to indicate client and shows the M text message;
The update module 302, specifically for obtaining the text message of the M text message according to target index information Mark, text message timestamp and text message score;
According to the text message of M text message mark, text message timestamp and text message score.Institute The thread for stating account index is updated the indexing parameter in the Hash table.
Again, in the embodiment of the present invention, first server may be used similarity scoring model and be carried out to M text message Processing, obtains the text message score corresponding to each text message, then according to text message score from high to Low sequence, M text message is ranked up, to obtain similarity indexing sequence.By the above-mentioned means, can be according to score to text envelope Breath is ranked up, and exposes the higher text message of similarity in the index, to the dependable with function of lifting scheme.User It may browse through the stronger text message of relevance.
Optionally, on the basis of embodiment corresponding to above-mentioned Figure 12, server 30 provided in an embodiment of the present invention In another embodiment, the N bar ropes lead journey includes the thread of Similar Text index, wherein the Similar Text index indicates Index with relevance between text;
The processing module 306 is additionally operable to the update module 302 and updates index file according to first transaction journal Before, M text message is handled by similarity scoring model, obtains the text message corresponding to each text message Score, wherein M is the integer more than 0, and the similarity scoring model is for indicating between text message and text message score Functional relation, the M text message belong to the target index information;
The sorting module 307, if being additionally operable to the M is more than 1, the first server is according to each text envelope The corresponding text message score of breath is ranked up the M text message, from high to Low sequence to obtain similarity rope Draw sequence, wherein the similarity indexing sequence is used to indicate client and shows the M text message;
The update module 302, specifically for obtaining the text message of the M text message according to target index information Mark, text message timestamp and text message score;
According to the text message of M text message mark, text message timestamp and text message score.Institute The thread for stating Similar Text index is updated the indexing parameter in the Hash table.
Again, in the embodiment of the present invention, first server carries out the indexing parameter in Hash table according to N bar rope lead journeys While update, search index instruction can be received, index to be checked is then obtained from Hash table according to search index instruction The indexing parameter of information and/or index information to be checked.It is programmed without lock by the above-mentioned means, being all made of to Hash table and vector Technology, therefore, search index be never written into operation obstruction, can guarantee the stability of performance on line in this way.
Optionally, 3 are please referred to Fig.1 on the basis of embodiment corresponding to above-mentioned Figure 10, it is provided in an embodiment of the present invention In another embodiment of server 30, the server 30 further includes receiving module 308;
The receiving module 308, for the update module 302 according to the target index information, according to the N bar ropes When lead journey is updated the indexing parameter in Hash table, search index instruction is received;
The acquisition module 301 is additionally operable to be instructed from described according to the search index that the receiving module 308 receives The indexing parameter of index information to be checked and/or the index information to be checked are obtained in Hash table.
Again, in the embodiment of the present invention, first server carries out the indexing parameter in Hash table according to N bar rope lead journeys While update, search index instruction can be received, index to be checked is then obtained from Hash table according to search index instruction The indexing parameter of information and/or index information to be checked.It is programmed without lock by the above-mentioned means, being all made of to Hash table and vector Technology, therefore, search index be never written into operation obstruction, can guarantee the stability of performance on line in this way.
Optionally, on the basis of embodiment corresponding to any one of above-mentioned Figure 10 to Figure 13,4 are please referred to Fig.1, this hair In another embodiment for the server 30 that bright embodiment provides, server 30 further includes determining module 309;
The receiving module 308 is additionally operable to the sending module 303 and sends first transaction journal to second server Later, the First ray number corresponding to first transaction journal that the second server is sent is received;
The determining module 309, the First ray number determination for being received according to the receiving module 308 described the The more new state of two servers;
The sending module 303, if being additionally operable to the first server is not detected the First ray number, to described Second server sends index upgrade instruction, so that the second server is instructed according to the index upgrade from first clothes It is engaged in obtaining the third transaction journal corresponding to third sequence number in device, the index text is updated according to the third transaction journal Part a, wherein flanking sequence number after First ray number described in the third Serial No..
Further, in the embodiment of the present invention, after first server sends the first transaction journal to second server, root The more new state that second server is determined according to the First ray number of the first transaction journal, if First ray number is not present, Second server can synchronize the memory file of first server, then proceed to next affairs day of synchronous first transaction journal Will.By the above-mentioned means, master server can reach the synchronous of retrieval data with from server, ensure the coherent of index data Property.
The second server in the present invention is described in detail below, it is the embodiment of the present invention to please refer to Fig.1 5, Figure 15 Middle server one embodiment schematic diagram, server 40 include:
Receiving module 401, for when first server detects the update of target index information, receiving the first service The first transaction journal that device is sent, wherein first transaction journal is for recording the target index information, and described first Transaction journal is for triggering the first server update index file;
Update module 402, first transaction journal for being received according to the receiving module 401 update the index File.
In the present embodiment, when first server detects the update of target index information, receiving module 401 receives described the The first transaction journal that one server is sent, wherein first transaction journal is for recording the target index information, and institute It states the first transaction journal and updates index file for triggering the first server, update module 402 is according to the receiving module 401 first transaction journals received update the index file.
In the embodiment of the present invention, when first server detects the update of target index information, second server receives the The first transaction journal that one server is sent, then second server is according to the first transaction journal update index file.By upper Mode is stated, the newer flow of index file, the master server as first server are just triggered when having detected index task It can generate only with the relevant daily record of fresh information, the daily record is then handed down to other from server, either master server Or from server, changed index information is all only updated, increment content is added into original index file, a side Face can update index file in time, promote the reliability of retrieval result, on the other hand can also reduce computing resource, prevent weight It is multiple to calculate the index information repeated, to promote resource utilization.
Optionally, 6 are please referred to Fig.1 on the basis of embodiment corresponding to above-mentioned Figure 15, it is provided in an embodiment of the present invention In another embodiment of server 40, server 40 further includes sending module 403;
The sending module 403 receives the first affairs day that the first server is sent for the receiving module 401 After will, the First ray number corresponding to first transaction journal is sent to the first server, so that first clothes Business device determines the more new state of the second server;
The receiving module 401 receives rope if being additionally operable to the first server is not detected the First ray number Draw more new command, the third thing corresponding to third sequence number is obtained from the first server according to index upgrade instruction Business daily record a, wherein flanking sequence number after First ray number described in the third Serial No.;
The update module 402 is additionally operable to update institute according to the third transaction journal that the receiving module 401 receives State index file.
Secondly, in the embodiment of the present invention, after first server sends the first transaction journal to second server, according to the The First ray number of one transaction journal determines the more new state of second server, if First ray number is not present, second Server can synchronize the memory file of first server, then proceed to next transaction journal of synchronous first transaction journal.It is logical Aforesaid way is crossed, master server can reach the synchronous of retrieval data with from server, ensure the continuity of index data.
Optionally, on the basis of embodiment corresponding to above-mentioned Figure 15 or Figure 16,7 are please referred to Fig.1, the embodiment of the present invention In another embodiment of the server 40 of offer, the server further includes selecting module 404;
The selecting module 404, if breaking down for the first server, selection target server, wherein institute It states destination server and belongs to the server that the second server includes maximum sequence number;
The sending module 403 is additionally operable to detect index when the destination server that the selecting module 404 selects When information update, other servers into the second server send target transaction daily record, so that other described servers The index file is updated according to the target transaction daily record, wherein the target transaction daily record is for recording the index letter Breath;
The update module 402 is additionally operable to update the index file according to the target transaction daily record.
Again, in the embodiment of the present invention, when first server breaks down, second server selection target server, Wherein, destination server belongs to the server that second server includes maximum sequence number, which can take over Data are synchronized with other second servers by the work of one server.By the above-mentioned means, on the one hand can ensure system Stability selects to work on from server in master server failure, to the feasibility and operability of lifting scheme.Separately On the one hand, it preferentially selects the maximum server of sequence number as master server, more real-time index data can be obtained, to carry Rise the newer real-time of index data.
Figure 18 is a kind of server architecture schematic diagram provided in an embodiment of the present invention, which can be because of configuration or property Energy is different and generates bigger difference, may include one or more central processing units (central processing Units, CPU) 522 (for example, one or more processors) and memory 532, one or more storages apply journey The storage medium 530 (such as one or more mass memory units) of sequence 542 or data 544.Wherein, 532 He of memory Storage medium 530 can be of short duration storage or persistent storage.The program for being stored in storage medium 530 may include one or one With upper module (diagram does not mark), each module may include to the series of instructions operation in server.Further, in Central processor 522 could be provided as communicating with storage medium 530, be executed on server 500 a series of in storage medium 530 Instruction operation.
Server 500 can also include one or more power supplys 526, one or more wired or wireless networks Interface 550, one or more input/output interfaces 558, and/or, one or more operating systems 541, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Server architecture shown in the Figure 18 can be based on by the step performed by server in above-described embodiment.
CPU 522 in the embodiment of the present invention is for executing following steps:
When detecting the update of target index information, the first transaction journal is obtained, wherein first transaction journal is used for Record the target index information;
Index file is updated according to first transaction journal;
First transaction journal is sent to second server, so that the second server is according to the first affairs day Will updates the index file.
Optionally, CPU 522 is additionally operable to execute following steps:
Obtain the First ray number corresponding to first transaction journal;
If the First ray number and the second sequence number are inconsistent, memory text is generated according to first transaction journal Part, wherein the sequence number corresponding to second transaction journal of the second Serial No., second transaction journal is for recording Newer index information in a cycle;
Store the memory file.
Optionally, CPU 522 is specifically used for executing following steps:
N bar rope lead journeys are generated according to first transaction journal, wherein the N is the integer more than 0, every index Thread corresponds to an index type;
According to the target index information, the indexing parameter in Hash table is updated according to the N bar ropes lead journey, To obtain the index file, wherein the indexing parameter includes text message mark, text message timestamp and text message At least one of in score.
Optionally, CPU 522 is additionally operable to execute following steps:
M text message is handled by label scoring model, obtains the text envelope corresponding to each text message Cease score, wherein M is the integer more than 0, and the label scoring model is for indicating between text message and text message score Functional relation, the M text message belong to the target index information;
If the M is more than 1, according to the text message score corresponding to each text message from high to Low suitable Sequence is ranked up the M text message, to obtain tab indexes sequence, wherein the tab indexes sequence is used to indicate Client shows the M text message;
CPU 522 is specifically used for executing following steps:
According to target index information obtain the M text message text message mark, text message timestamp and Text message score;
According to the text message of M text message mark, text message timestamp and text message score.Institute The thread for stating tab indexes is updated the indexing parameter in the Hash table.
Optionally, CPU 522 is specifically used for executing following steps:
M text message is handled by theme scoring model, obtains the text envelope corresponding to each text message Cease score, wherein M is the integer more than 0, and the theme scoring model is for indicating between text message and text message score Functional relation, the M text message belong to the target index information;
If the M is more than 1, according to the text message score corresponding to each text message from high to Low suitable Sequence is ranked up the M text message, to obtain subject index sequence, wherein the tab indexes sequence is used to indicate Client shows the M text message;
CPU 522 is specifically used for executing following steps:
According to target index information obtain the M text message text message mark, text message timestamp and Text message score;
According to the text message of M text message mark, text message timestamp and text message score.Institute The thread for stating subject index is updated the indexing parameter in the Hash table.
Optionally, CPU 522 is additionally operable to execute following steps:
M text message is handled by account scoring model, obtains the text envelope corresponding to each text message Cease score, wherein M is the integer more than 0, and the account scoring model is for indicating between text message and text message score Functional relation, the M text message belong to the target index information;
If the M is more than 1, according to the text message score corresponding to each text message from high to Low suitable Sequence is ranked up the M text message, to obtain account index sequence, wherein the account index sequence is used to indicate Client shows the M text message;
CPU 522 is specifically used for executing following steps:
According to target index information obtain the M text message text message mark, text message timestamp and Text message score;
According to the text message of M text message mark, text message timestamp and text message score.Institute The thread for stating account index is updated the indexing parameter in the Hash table.
Optionally, CPU 522 is additionally operable to execute following steps:
M text message is handled by similarity scoring model, obtains the text corresponding to each text message Information score, wherein M is the integer more than 0, and the similarity scoring model is for indicating text message and text message score Between functional relation, the M text message belong to the target index information;
If the M is more than 1, according to the text message score corresponding to each text message from high to Low suitable Sequence is ranked up the M text message, to obtain similarity indexing sequence, wherein the similarity indexing sequence is used for Indicate that client shows the M text message;
CPU 522 is specifically used for executing following steps:
According to target index information obtain the M text message text message mark, text message timestamp and Text message score;
According to the text message of M text message mark, text message timestamp and text message score.Institute The thread for stating Similar Text index is updated the indexing parameter in the Hash table.
Optionally, CPU 522 is additionally operable to execute following steps:
According to the target index information, the indexing parameter in Hash table is updated according to the N bar ropes lead journey When, receive search index instruction;
The indexing parameter of index information to be checked is obtained from the Hash table according to search index instruction, and/or The index information to be checked.
Optionally, CPU 522 is additionally operable to execute following steps:
Receive the First ray number corresponding to first transaction journal that the second server is sent;
The more new state of the second server is determined according to the First ray number;
If the First ray number is not detected, index upgrade instruction is sent to the second server, so that described Second server instructs the third thing obtained from the first server corresponding to third sequence number according to the index upgrade Business daily record updates the index file, wherein First ray described in the third Serial No. according to the third transaction journal A flanking sequence number after number.
In addition, the CPU 522 in the embodiment of the present invention is for executing following steps:
When detecting the update of target index information, the first transaction journal that the first server is sent is received, wherein First transaction journal is for recording the target index information, and first transaction journal is for triggering first clothes Business device updates index file;
The index file is updated according to first transaction journal.
Optionally, CPU 522 is additionally operable to execute following steps:
The First ray number corresponding to first transaction journal is sent to the first server, so that first clothes Business device determines the more new state of the second server;
If the First ray number is not detected, index upgrade instruction is received, is instructed from institute according to the index upgrade State the third transaction journal obtained in first server corresponding to third sequence number, wherein the described in the third Serial No. A flanking sequence number after one sequence number;
The index file is updated according to the third transaction journal.
Optionally, CPU 522 is additionally operable to execute following steps:
If first server breaks down, selection target server, wherein the destination server belongs to described second Server includes the server of maximum sequence number;
When the destination server detects index information update, other servers hair into the second server Target transaction daily record is sent, so that other described servers update the index file according to the target transaction daily record, wherein institute Target transaction daily record is stated for recording the index information;
The index file is updated according to the target transaction daily record.
The index file more new system in the embodiment of the present invention is explained below, it is that the present invention is real to please refer to Fig.1 9, Figure 19 Index file more new system one embodiment schematic diagram in example is applied, as shown, the index file more new system includes first Server 601, second server 602 and client 603;
In the present embodiment, when first server 601 detects the update of target index information, the first server 601 Obtain the first transaction journal, wherein first transaction journal is for recording the target index information, the first server 601 update index file according to first transaction journal, and the first server 601 sends described to second server 602 First transaction journal, the second server 602 update the index file, the client according to first transaction journal 603 send search instruction to the second server 602, and the second server 602 is according to the search instruction from the rope Retrieval result is obtained in quotation part, the second server 602 sends the retrieval result to the client 603.
In the embodiment of the present invention, a kind of index file more new system is provided, is just triggered when having detected index task The newer flow of index file, the master server as first server can generate only with the relevant daily record of fresh information, so The daily record is handed down to other from server afterwards, either master server all only updates changed rope still from server Fuse ceases, and increment content is added into original index file, on the one hand can update index file in time, promotes retrieval As a result on the other hand reliability can also reduce computing resource, the index information for computing repeatedly repetition be prevented, to promote resource Utilization rate.Therefore, by client to second server initiate search instruction when, due to the newer frequency of index file compared with Height can promote the reliability and real-time of retrieval.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disc or CD etc. are various can store program The medium of code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Stating embodiment, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these Modification or replacement, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (15)

1. a kind of newer method of index file, which is characterized in that including:
When first server detects the update of target index information, the first server obtains the first transaction journal, wherein First transaction journal is for recording the target index information;
The first server updates index file according to first transaction journal;
The first server sends first transaction journal to second server, so that the second server is according to First transaction journal updates the index file.
2. according to the method described in claim 1, it is characterized in that, the first server obtain the first transaction journal after, The method further includes:
The first server obtains the First ray number corresponding to first transaction journal;
If the First ray number and the second sequence number are inconsistent, the first server is given birth to according to first transaction journal At memory file, wherein the sequence number corresponding to second transaction journal of the second Serial No., second transaction journal are used In newer index information in the upper a cycle of record;
The first server stores the memory file.
3. according to the method described in claim 1, it is characterized in that, the first server according to first transaction journal more New index file, including:
The first server generates N bar rope lead journeys according to first transaction journal, wherein the N is whole more than 0 Number corresponds to an index type per bar rope lead journey;
The first server joins the index in Hash table according to the target index information, according to the N bar ropes lead journey Number is updated, to obtain the index file, wherein the indexing parameter includes text message mark, text message time At least one of in stamp and text message score.
4. according to the method described in claim 3, it is characterized in that, the N bar ropes lead journey includes the thread of tab indexes, In, the tab indexes indicate and the relevant index of keyword;
Before the first server updates index file according to first transaction journal, the method further includes:
The first server is handled M text message by label scoring model, and it is right to obtain each text message institute The text message score answered, wherein M is the integer more than 0, and the label scoring model is for indicating text message and text envelope The functional relation between score is ceased, the M text message belongs to the target index information;
If the M is more than 1, the first server is certainly high according to the text message score corresponding to each text message To low sequence, the M text message is ranked up, to obtain tab indexes sequence, wherein the tab indexes sequence It is used to indicate client and shows the M text message;
The first server joins the index in Hash table according to the target index information, according to the N bar ropes lead journey Number is updated, including:
The first server obtains the text message mark of the M text message, text message according to target index information Timestamp and text message score;
The first server is according to the text message of M text message mark, text message timestamp and text envelope Cease score.The indexing parameter in the Hash table is updated in the thread of the tab indexes.
5. according to the method described in claim 3, it is characterized in that, the N bar ropes lead journey includes the thread of subject index, In, the subject index indicates and the relevant index in field;
Before the first server updates index file according to first transaction journal, the method further includes:
The first server is handled M text message by theme scoring model, and it is right to obtain each text message institute The text message score answered, wherein M is the integer more than 0, and the theme scoring model is for indicating text message and text envelope The functional relation between score is ceased, the M text message belongs to the target index information;
If the M is more than 1, the first server is certainly high according to the text message score corresponding to each text message To low sequence, the M text message is ranked up, to obtain subject index sequence, wherein the tab indexes sequence It is used to indicate client and shows the M text message;
The first server joins the index in Hash table according to the target index information, according to the N bar ropes lead journey Number is updated, including:
The first server obtains the text message mark of the M text message, text message according to target index information Timestamp and text message score;
The first server is according to the text message of M text message mark, text message timestamp and text envelope Cease score.The indexing parameter in the Hash table is updated in the thread of the subject index.
6. according to the method described in claim 3, it is characterized in that, the N bar ropes lead journey include account index thread, In, the account index indicates and the relevant index of text creation person;
Before the first server updates index file according to first transaction journal, the method further includes:
The first server is handled M text message by account scoring model, and it is right to obtain each text message institute The text message score answered, wherein M is the integer more than 0, and the account scoring model is for indicating text message and text envelope The functional relation between score is ceased, the M text message belongs to the target index information;
If the M is more than 1, the first server is certainly high according to the text message score corresponding to each text message To low sequence, the M text message is ranked up, to obtain account index sequence, wherein the account index sequence It is used to indicate client and shows the M text message;
The first server joins the index in Hash table according to the target index information, according to the N bar ropes lead journey Number is updated, including:
The first server obtains the text message mark of the M text message, text message according to target index information Timestamp and text message score;
The first server is according to the text message of M text message mark, text message timestamp and text envelope Cease score.The indexing parameter in the Hash table is updated in the thread of account index.
7. according to the method described in claim 3, it is characterized in that, the N bar ropes lead journey includes the line of Similar Text index Journey, wherein the Similar Text index indicates the index with relevance between text;
Before the first server updates index file according to first transaction journal, the method further includes:
The first server is handled M text message by similarity scoring model, obtains each text message institute Corresponding text message score, wherein M is the integer more than 0, and the similarity scoring model is for indicating text message and text Functional relation between this information score, the M text message belong to the target index information;
If the M is more than 1, the first server is certainly high according to the text message score corresponding to each text message To low sequence, the M text message is ranked up, to obtain similarity indexing sequence, wherein the similarity indexing Sequence is used to indicate client and shows the M text message;
The first server joins the index in Hash table according to the target index information, according to the N bar ropes lead journey Number is updated, including:
The first server obtains the text message mark of the M text message, text message according to target index information Timestamp and text message score;
The first server is according to the text message of M text message mark, text message timestamp and text envelope Cease score.The indexing parameter in the Hash table is updated in the thread of Similar Text index.
8. according to the method described in claim 3, it is characterized in that, the first server according to the target index information, When being updated to the indexing parameter in Hash table according to the N bar ropes lead journey, the method further includes:
The first server receives search index instruction;
The first server instructs the index that index information to be checked is obtained from the Hash table according to the search index Parameter and/or the index information to be checked.
9. a kind of newer method of index file, which is characterized in that including:
When first server detects the update of target index information, the second server receives the first server and sends The first transaction journal, wherein first transaction journal is for recording the target index information, and the first affairs day Will is for triggering the first server update index file;
The second server updates the index file according to first transaction journal.
10. according to the method described in claim 9, it is characterized in that, the second server receives the first server hair After the first transaction journal sent, the method further includes:
If the First ray number is not detected in the first server, the second server receives index upgrade instruction, The third transaction journal corresponding to third sequence number is obtained from the first server according to index upgrade instruction, In, a flanking sequence number after First ray number described in the third Serial No.;
The second server updates the index file according to the third transaction journal.
11. method according to claim 9 or 10, which is characterized in that the method further includes:
If the first server breaks down, the second server selection target server, wherein the destination service Device belongs to the server that the second server includes maximum sequence number;
When the destination server detects index information update, the destination server in the second server is to institute Other servers stated in second server send target transaction daily record, so that other described servers are according to the target transaction Daily record updates the index file, wherein the target transaction daily record is for recording the index information;
The destination server in the second server updates the index file according to the target transaction daily record.
12. a kind of newer method of index file, which is characterized in that the method is applied to index file more new system in institute Stating index file more new system includes:First server, second server and client, the method includes:
When the first server detects the update of target index information, the first server obtains the first transaction journal, Wherein, first transaction journal is for recording the target index information;
The first server updates index file according to first transaction journal;
The first server sends first transaction journal to the second server;
The second server updates the index file according to first transaction journal;
The client sends search instruction to the second server;
The second server obtains retrieval result according to the search instruction from the index file;
The second server sends the retrieval result to the client.
13. a kind of server, which is characterized in that the server includes:Memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
When detecting the update of target index information, the first transaction journal is obtained, wherein first transaction journal is for recording The target index information;
Index file is updated according to first transaction journal;
Send first transaction journal to second server so that the second server according to first transaction journal more The new index file;
The bus system is for connecting the memory and the processor, so that the memory and the processor It is communicated.
14. a kind of server, which is characterized in that the server includes:Memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
When detecting the update of target index information, the first transaction journal that first server is sent is received, wherein described first Transaction journal is for recording the target index information, and first transaction journal is for triggering the first server update Index file;
The index file is updated according to first transaction journal;
The bus system is for connecting the memory and the processor, so that the memory and the processor It is communicated.
15. a kind of computer readable storage medium, including instruction, when run on a computer so that computer executes such as Method described in any item of the claim 1 to 8, or execute the method as described in any one of claim 9 to 11.
CN201810582788.XA 2018-06-07 2018-06-07 Index file updating method and server Active CN108763578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810582788.XA CN108763578B (en) 2018-06-07 2018-06-07 Index file updating method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810582788.XA CN108763578B (en) 2018-06-07 2018-06-07 Index file updating method and server

Publications (2)

Publication Number Publication Date
CN108763578A true CN108763578A (en) 2018-11-06
CN108763578B CN108763578B (en) 2023-03-10

Family

ID=63999506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810582788.XA Active CN108763578B (en) 2018-06-07 2018-06-07 Index file updating method and server

Country Status (1)

Country Link
CN (1) CN108763578B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110175116A (en) * 2019-05-05 2019-08-27 中国银行股份有限公司 A kind of testDate switching method, apparatus and system
CN111046129A (en) * 2019-05-13 2020-04-21 国家计算机网络与信息安全管理中心 Public number information storage method and retrieval system based on text content characteristics
CN111427989A (en) * 2019-01-10 2020-07-17 北大方正集团有限公司 Index processing method, index processing system and storage medium for full-text retrieval
CN112822227A (en) * 2019-11-15 2021-05-18 北京金山云网络技术有限公司 Data synchronization method, device, equipment and storage medium of distributed storage system
CN113032408A (en) * 2019-12-24 2021-06-25 阿里巴巴集团控股有限公司 Data processing method, system and equipment
CN113821704A (en) * 2020-06-18 2021-12-21 华为技术有限公司 Method and device for constructing index, electronic equipment and storage medium
CN113971182A (en) * 2021-12-23 2022-01-25 北京蓝莓时节科技有限公司 LBS distributed service system, method and storage medium
CN113986824B (en) * 2021-10-27 2024-02-23 西安热工研究院有限公司 Method for efficiently storing and retrieving time sequence data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060020616A1 (en) * 2004-07-22 2006-01-26 Geoffrey Hardy Indexing operational logs in a distributed processing system
US7581227B1 (en) * 2004-03-31 2009-08-25 Google Inc. Systems and methods of synchronizing indexes
CN103177082A (en) * 2013-02-21 2013-06-26 用友软件股份有限公司 Main server, slave server, index synchronizing system and index synchronizing method
CN104657382A (en) * 2013-11-21 2015-05-27 阿里巴巴集团控股有限公司 Method and device for detecting consistency of data of MySQL master and slave servers
CN105955989A (en) * 2015-12-31 2016-09-21 无锡华云数据技术服务有限公司 Method for establishing master and slave servers of cloud platform database
CN106055622A (en) * 2016-05-26 2016-10-26 浪潮软件集团有限公司 Data searching method and system
CN107038162A (en) * 2016-02-03 2017-08-11 滴滴(中国)科技有限公司 Real time data querying method and system based on database journal
CN107783975A (en) * 2016-08-24 2018-03-09 北京京东尚科信息技术有限公司 The method and apparatus of distributed data base synchronization process

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7581227B1 (en) * 2004-03-31 2009-08-25 Google Inc. Systems and methods of synchronizing indexes
US20060020616A1 (en) * 2004-07-22 2006-01-26 Geoffrey Hardy Indexing operational logs in a distributed processing system
CN103177082A (en) * 2013-02-21 2013-06-26 用友软件股份有限公司 Main server, slave server, index synchronizing system and index synchronizing method
CN104657382A (en) * 2013-11-21 2015-05-27 阿里巴巴集团控股有限公司 Method and device for detecting consistency of data of MySQL master and slave servers
CN105955989A (en) * 2015-12-31 2016-09-21 无锡华云数据技术服务有限公司 Method for establishing master and slave servers of cloud platform database
CN107038162A (en) * 2016-02-03 2017-08-11 滴滴(中国)科技有限公司 Real time data querying method and system based on database journal
CN106055622A (en) * 2016-05-26 2016-10-26 浪潮软件集团有限公司 Data searching method and system
CN107783975A (en) * 2016-08-24 2018-03-09 北京京东尚科信息技术有限公司 The method and apparatus of distributed data base synchronization process

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427989A (en) * 2019-01-10 2020-07-17 北大方正集团有限公司 Index processing method, index processing system and storage medium for full-text retrieval
CN110175116B (en) * 2019-05-05 2023-07-25 中国银行股份有限公司 Test date switching method, device and system
CN110175116A (en) * 2019-05-05 2019-08-27 中国银行股份有限公司 A kind of testDate switching method, apparatus and system
CN111046129A (en) * 2019-05-13 2020-04-21 国家计算机网络与信息安全管理中心 Public number information storage method and retrieval system based on text content characteristics
CN112822227A (en) * 2019-11-15 2021-05-18 北京金山云网络技术有限公司 Data synchronization method, device, equipment and storage medium of distributed storage system
CN112822227B (en) * 2019-11-15 2022-02-25 北京金山云网络技术有限公司 Data synchronization method, device, equipment and storage medium of distributed storage system
CN113032408A (en) * 2019-12-24 2021-06-25 阿里巴巴集团控股有限公司 Data processing method, system and equipment
CN113032408B (en) * 2019-12-24 2024-05-07 阿里巴巴集团控股有限公司 Data processing method, system and equipment
CN113821704A (en) * 2020-06-18 2021-12-21 华为技术有限公司 Method and device for constructing index, electronic equipment and storage medium
CN113821704B (en) * 2020-06-18 2024-01-16 华为云计算技术有限公司 Method, device, electronic equipment and storage medium for constructing index
CN113986824B (en) * 2021-10-27 2024-02-23 西安热工研究院有限公司 Method for efficiently storing and retrieving time sequence data
CN113971182A (en) * 2021-12-23 2022-01-25 北京蓝莓时节科技有限公司 LBS distributed service system, method and storage medium
CN113971182B (en) * 2021-12-23 2022-03-15 北京蓝莓时节科技有限公司 LBS distributed service system, method and storage medium

Also Published As

Publication number Publication date
CN108763578B (en) 2023-03-10

Similar Documents

Publication Publication Date Title
CN108763578A (en) A kind of newer method of index file and server
US9626623B2 (en) Method of automated discovery of new topics
Hu et al. Toward scalable systems for big data analytics: A technology tutorial
Sumbaly et al. The big data ecosystem at linkedin
CN104657459B (en) A kind of mass data storage means based on file granularity
US9495457B2 (en) Batch crawl and fast crawl clusters for question and answer search engine
CN102968374B (en) A kind of data warehouse method of testing
CN106716402A (en) Entity-centric knowledge discovery
US9361384B2 (en) Image extraction service for question and answer search engine
US20150186528A1 (en) Request type detection for answer mode selection in an online system of a question and answer search engine
CN109831486A (en) The background data server system and data processing method of multi-client
Khasawneh et al. Active user-based and ontology-based web log data preprocessing for web usage mining
CN108369599A (en) Duplication control between redundant data center
CN111159133B (en) Distributed forum system based on micro-service
CN108431807A (en) The duplication of structured data in partition data memory space
US20150186514A1 (en) Central aggregator architechture for question and answer search engine
CN115858513A (en) Data governance method, data governance device, computer equipment and storage medium
KR20110122719A (en) Systems and methods for a search engine results page research assistant
Chodorow 50 Tips and Tricks for MongoDB Developers: Get the Most Out of Your Database
Li et al. Hadoop-Based University Ideological and Political Big Data Platform Design and Behavior Pattern Mining
US20230138151A1 (en) Knowledge Graph for Information Retrieval and Exploration
Glaser et al. CS AKTiveSpace: Building a semantic web application
White Making Search Work: Implementing Web, Intranet, and Enterprise Search
Samoilenko et al. IT tools for knowledge storage and retrieval in globally distributed complex software and systems development of high-tech organizations
Rothsberg Evaluation of using NoSQL databases in an event sourcing system

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
GR01 Patent grant
GR01 Patent grant