Information search method, device and equipment

By using the Bloom filter to filter document collections and optimize the indexing method in Chinese search, the problem of long-term and low-efficiency search in the prior art is solved, and fast and effective document retrieval is achieved.

CN113918684BActive Publication Date: 2025-08-29MIGU CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111241094.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-25
Publication Date
2025-08-29
Estimated Expiration
2041-10-25

AI Technical Summary

Technical Problem

When faced with a large number of documents, the existing Chinese search technology takes time and is inefficient in searching through full-text scanning or forward indexing.

Method used

Bloom filter is used to filter document collections related to the target keywords, and match them with specific search index methods to optimize the Bloom filter to improve search speed.

Benefits of technology

It effectively improves search speed, shortens search time, reduces time overhead related to document size and length, and improves search efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918684B_ABST
    Figure CN113918684B_ABST
Patent Text Reader

Abstract

The present invention discloses an information search method, apparatus, and device. The method comprises: obtaining a target keyword for searching documents; inputting keywords contained in the target keyword into a Bloom filter to filter a first document set from a document set that corresponds to the Bloom index of the keyword; and searching the first document set based on the target keyword to obtain a second document set containing the target keyword. Through the above-described method, the solution of the present invention can effectively improve search speed and shorten search time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information search technology, and in particular to an information search method, device and equipment. Background Art

[0002] Existing Chinese search technologies, whether using forward indexing methods like inverted indexes or other search solutions, all rely on scanning documents in their entirety based on the index, or first scanning the index and then scanning the documents after the index is established, to obtain documents containing the search keyword. When searching a large number of documents, searching through full-text scanning or forward indexing is time-consuming and inefficient. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide an information search method, apparatus, and device that overcome the above problems or at least partially solve the above problems.

[0004] According to one aspect of an embodiment of the present invention, there is provided an information search method, the method comprising:

[0005] Obtain target keywords for searching documents;

[0006] Inputting keywords included in the target keyword into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from a document set;

[0007] Based on the target keyword, the first document set is searched to obtain a second document set containing the target keyword.

[0008] According to another aspect of an embodiment of the present invention, there is provided an information search device, the device comprising:

[0009] An acquisition module, used to obtain target keywords for searching documents;

[0010] A processing module is used to input the keywords contained in the target keyword into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from a document set; based on the target keyword, the first document set is searched to obtain a second document set containing the target keyword.

[0011] According to another aspect of an embodiment of the present invention, there is provided a computing device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0012] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned information search method.

[0013] According to another aspect of the embodiments of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to execute operations corresponding to the above-mentioned information search method.

[0014] According to the solution provided by the above-mentioned embodiment of the present invention, the information search method obtains a target keyword for searching documents; inputs the keywords contained in the target keyword into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from a document set; and searches the first document set based on the target keyword to obtain a second document set containing the target keyword, thereby effectively improving the search speed and greatly shortening the search time as a whole, thereby solving the problems of long search time and low efficiency in the prior art, and achieving the beneficial effect of effectively improving the search speed and greatly shortening the search time as a whole.

[0015] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to more clearly understand the technical means of the embodiments of the present invention, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the specific implementation methods of the embodiments of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the embodiments of the present invention. The same reference numerals are used throughout the accompanying drawings to denote the same components. In the accompanying drawings:

[0017] Figure 1 shows a flow chart of an information search method provided by an embodiment of the present invention;

[0018] Figure 2 A flowchart illustrating a process for optimizing a Bloom filter in an information search method provided by an embodiment of the present invention is shown;

[0019] Figure 3 A schematic diagram of a specific implementation flow of the information search method provided by an embodiment of the present invention is shown;

[0020] Figure 4 A schematic diagram showing the structure of an information search device provided by an embodiment of the present invention is shown;

[0021] Figure 5 A schematic structural diagram of a computing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0022] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0023] Figure 1 FIG. 1 is a flow chart showing an information search method according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0024] Step 11, obtaining target keywords for searching documents. In one implementation example, step 11 may include: obtaining a set of search keywords input by a user for searching documents; filtering the set of keywords to be searched to obtain target keywords;

[0025] Step 12: Input the keywords included in the target keyword into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from the document set;

[0026] Step 13: Search the first document set based on the target keyword to obtain a second document set containing the target keyword.

[0027] This embodiment of the present invention obtains a target keyword for searching documents; inputs the keywords contained in the target keyword into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from a document set; searches the first document set based on the target keyword to obtain a second document set containing the target keyword, thereby constructing a Bloom index based on search term relevance for a large number of documents. During the search, the optimized Bloom filter is used to quickly identify documents that do not contain the search keyword. After excluding these documents, the first document set is obtained. The first document set is then retrieved based on the current search technology to search for the second document set containing the Chinese search term, effectively improving the search speed and greatly shortening the search time overall. The time overhead is no longer related to the size and length of the original text, but is a constant overhead, and the overhead time is extremely small.

[0028] In an optional embodiment of the present invention, further, the above-mentioned step 12 may include: inputting the keywords contained in the target keyword into the Bloom filter, and if the Bloom index of the keywords contained in the target keyword is in the Bloom index in the Bloom filter, then taking the document set formed by the documents corresponding to the Bloom index of the keywords contained in the target keyword as the first document set.

[0029] In an optional embodiment of the present invention, the above step 13 may further include: searching the above first document set in combination with a specific search index method, such as searching the first document set by a full match method to obtain a second document set containing the target keyword.

[0030] In an optional embodiment of the present invention, the Bloom filter is optimized by the following process:

[0031] Step 21, obtaining historical search keywords;

[0032] Step 22, determining relevant keywords from the historical search keywords;

[0033] Step 23: Optimize the Bloom filter according to the keyword to obtain an optimized Bloom filter.

[0034] In this embodiment, step 22 may include: determining relevant keywords from the historical search keywords based on the number of times different keywords appear simultaneously in the same historical search keyword and a preset threshold. Specifically, this step may include:

[0035] Step 221, obtaining at least one keyword in the search term record and the number of searches for each keyword;

[0036] Step 222: Obtain keyword correlation data records of the keywords based on the number of times the first keyword and the second keyword in the at least one keyword appear simultaneously in the same historical search keyword and a preset threshold;

[0037] Step 223 , according to the search times of the search keywords in the keyword correlation data record, select N keyword correlation data records of search keywords with search times greater than a preset value to form a keyword correlation list, where N is a positive integer.

[0038] In the specific implementation, the existing search term records in the historical record library of the current search system are obtained, including the search keywords and the search times of the search keywords, and duplicates are removed according to the single Chinese character dimension and filtered through the filter dictionary.

[0039] Loop through the search keyword list, count the keywords in a single search keyword, set the relevance threshold Q (i.e. the preset threshold mentioned above), Q can be set according to the system's daily search volume. If the number of times keyword A and keyword B appear in the same search keyword is greater than Q, then the two keywords are considered highly correlated; if the number is less than Q, then the two keywords are considered to have a low relevance. At the same time, the relevance keywords are sorted from high to low according to the number of search terms, and each word retains a maximum of m-1 related words of the Bloom index bit. Based on this, the following data structure list can be obtained:

[0040] (Keyword A, number of searches, related words B, C, D)

[0041] (Keyword B, number of searches, related words A, G)

[0042]

[0043] Based on this data structure list, obtain the correlation keyword list T;

[0044] In this embodiment, step 23 may include:

[0045] Step 231: traverse a keyword relevance list formed by related keywords. If a related keyword of the traversed current keyword is not in the record dictionary, add a record to the record dictionary. The record includes the current keyword and the position of the current keyword in the Bloom index.

[0046] Step 232: If the related keywords of the traversed current keyword are in the record dictionary, determine the position of the current keyword in the keyword relevance list;

[0047] Step 233, adding a record to the record dictionary based on the position of the current keyword in the keyword correlation list and whether the position of the current keyword does not overlap with the position of the existing related keywords in the record dictionary;

[0048] Step 234: If the position of the current keyword in the keyword relevance list overlaps with the position of an existing related keyword in the record dictionary, calculation is performed based on the last determined position of the current keyword in the keyword relevance list until the determined position of the current keyword in the keyword relevance list does not overlap with the position of an existing related keyword in the record dictionary;

[0049] Step 235 , forming a first version record dictionary based on the positions of all keywords in the keyword correlation list;

[0050] Step 236: If the current word in the traversal search document is a word in the keyword relevance list, the Bloom index of the current word is marked according to the correspondence between the current word and the Bloom index position in the record dictionary table; otherwise, the current word is directly encoded and modulo-modified to obtain a modulo result, and the Bloom index of the current word is set according to the modulo result;

[0051] Step 237: Obtain an optimized Bloom filter based on the Bloom index of each word in the search document.

[0052] In practice, each document to be searched has a Bloom index position of m, and the position of the Chinese characters in the relevance keyword list T in the Bloom index is prioritized. The position of a Chinese character in the relevance keyword list T is determined by two factors: the modulo m of its Unicode encoding (assuming m = 127) and its relevance to other characters.

[0053] 1) Traverse the relevance keyword list T and take the remainder of the current word. If the related word of the current word is not in the dictionary table, the current word position is Loc=Unicode(current word)%m, and a row of current word record (current word, index position) is added to the dictionary table;

[0054] 2) If the related word of the current word is in the dictionary table, Loc = Unicode (current word) % m + k; (k is 0 for the first time), determine whether the current position is repeated with the related word position in the dictionary. If not, add a row of current word record to the dictionary table and process the next word;

[0055] 3) If it is a duplicate, k=k+1; Loc=(Unicode(current word)%m+k)%m, to determine whether the current position is a duplicate of an existing keyword position in the dictionary. If not, add a row of current word records to the dictionary table and process the next word;

[0056] 4) If it is repeated, continue k=k+1, update Loc, and continue to judge until a position is obtained where neither the current position nor the related word is repeated.

[0057] After all the contents in the relevance keyword list T are positioned, the positions of other commonly used Chinese characters are determined.

[0058] 5) Other commonly used Chinese character positions are Loc(Q) = Unicode(current character) % m. Other commonly used Chinese character positions are not included in the dictionary table. The dictionary table contains the correspondence between all relevant keywords and their Bloom index positions; this initial dictionary table is also marked as version 0.

[0059] 6) Traverse each document to be searched. If the current character is a Chinese character in the relevance keyword list, mark the Bloom index based on the correspondence between the character and the index position in the dictionary table. If the current character is another commonly used Chinese character, directly set the Bloom index position by taking the modulus of the Unicode. At this point, the Bloom index for all documents has been established. To distinguish it from the dictionary for subsequently added documents, the Bloom index pre-stores two special bits to record the dictionary version. The resulting Bloom filter is an optimized Bloom filter.

[0060] In an optional embodiment of the present invention, after obtaining the optimized Bloom filter, the following steps may be further included:

[0061] Step 24, obtaining a keyword relevance list of the newly added search document;

[0062] Step 25: updating the first version record dictionary according to the newly added keyword relevance list of the search document to obtain an updated second version record dictionary;

[0063] Step 26: Obtain a Bloom index of the newly added search document based on the newly added search document and the updated second record dictionary;

[0064] Step 27: Update the optimized Bloom filter according to the Bloom index of the newly added search document to obtain an updated Bloom filter.

[0065] In specific implementations, the popularity of system search terms is effective and positively correlated with the content of new documents in this time period. Search keywords with the highest number of searches are often the most popular documents in the current time period. For example, a current trending search is "The Evolution of Video Ringtones under 5G." Most of these documents in the system library were generated and entered recently. Therefore, for newly added documents to be searched in the system, the Bloom index is established based on the same method as above: a new keyword list is compiled, and then the Bloom index for the new document is established according to steps 1) to 5) above. At this time, the dictionary generated by the new keyword list is version 1. The dictionary in the Bloom index of the new document is marked as 1, thereby achieving elastic expansion of the Bloom filter when new documents are added, that is, obtaining an updated Bloom filter.

[0066] The following combination Figure 2 Explain the optimization process of the above Bloom filter:

[0067] Search the historical search records library of the current search system;

[0068] Traverse the content of each document to be indexed in the historical search record library and filter it;

[0069] According to the standard Bloom index template, the corresponding bits are compared and identified to obtain the Bloom index corresponding to each document to be indexed, and the optimized Bloom filter is obtained.

[0070] The following combination Figure 3 The overall process of the above search method is described as follows:

[0071] Step 1: Words such as "de", "di", "de", "zhi", "le", "shi", "zai" in Chinese characters are the most frequently used in Chinese characters, but they are meaningless for searching. For such Chinese characters, the system sets up a filtering dictionary to identify them. By removing the above meaningless content in the filtering dictionary through the dictionary filtering module for the Chinese search keywords to be searched, the search efficiency can be improved and the search results can be more accurately hit. The content in the filtering dictionary is obtained in the following three ways: 1) Manually edit and add through the management page; 2) Search for the Chinese characters with the highest usage frequency in Chinese characters, and screen out the Chinese characters that are meaningless for searching and put them into the shielding dictionary; 3) Set according to the Chinese词性, and initially put the Chinese characters of auxiliary verb and preposition词性 into the filtering dictionary;

[0072] The user inputs Chinese search keywords, and after removing the filtering words, the filtered search keywords are obtained.

[0073] Step 2: Pass the filtered search keywords into the optimized Bloom filter, and filter through the Bloom filter module. Traverse each index in the Bloom filter to determine whether the search term is not in the Bloom index. If not, ignore the index. If it exists, record the document corresponding to the index in the first document set.

[0074] Step 3: In the first document set, perform a search match for the target keyword in combination with the preset search index method to obtain a second document set containing the target keyword.

[0075] In the above embodiments of the present invention, by using the existing search term records, analyzing the relevance of the search keywords, and setting the words with high relevance to different flag bits, the length of the Bloom index flag bits of the Bloom filter can be compressed, which can effectively save storage space, at the same time make the Bloom filtering effect reach the best, and speed up the search speed, and the retrieval time is short.

[0076] Figure 4 The structural schematic diagram of the information search device provided by the embodiment of the present invention is shown. As Figure 4 shown, the device 40 includes:

[0077] An acquisition module 41, configured to acquire a target keyword for searching a document;

[0078] A processing module 42, configured to input the keywords included in the target keyword into a Bloom filter to screen a first document set corresponding to the Bloom index of the keywords from a document set; based on the target keyword, perform a search on the first document set to obtain a second document set containing the target keyword.

[0079] Optionally, the Bloom filter is optimized through the following process:

[0080] Obtain historical search keywords;

[0081] Determining relevant keywords from the historical search keywords;

[0082] The Bloom filter is optimized according to the keyword to obtain an optimized Bloom filter.

[0083] Optionally, determining relevant keywords from the historical search keywords includes:

[0084] According to the number of times different keywords appear simultaneously in the same historical search keyword and a preset threshold, keywords with correlation are determined from the historical search keywords.

[0085] Optionally, optimizing the Bloom filter according to the keyword to obtain an optimized Bloom filter includes:

[0086] Traversing a keyword relevance list formed by related keywords, if a related keyword of the traversed current keyword is not in the record dictionary, adding a record to the record dictionary, the record including the current keyword and the position of the current keyword in the Bloom index;

[0087] If the related keywords of the current keyword traversed are in the record dictionary, determine the position of the current keyword in the keyword relevance list;

[0088] Add a record to the record dictionary according to the position of the current keyword in the keyword correlation list, which does not overlap with the position of the existing related keywords in the record dictionary;

[0089] If the position of the current keyword in the keyword relevance list overlaps with the position of an existing related keyword in the record dictionary, calculation is performed based on the last determined position of the current keyword in the keyword relevance list until the determined position of the current keyword in the keyword relevance list does not overlap with the position of an existing related keyword in the record dictionary;

[0090] forming a first version record dictionary according to positions of all keywords in the keyword correlation list;

[0091] Traversing the search document to determine if the current word is in the keyword relevance list, marking the Bloom index of the current word based on the correspondence between the current word and the Bloom index position in the record dictionary table; otherwise, directly performing encoding conversion on the current word to obtain a remainder result, and setting the Bloom index of the current word based on the remainder result;

[0092] An optimized Bloom filter is obtained according to the Bloom index of each word in the search document.

[0093] Optionally, after obtaining the optimized Bloom filter, the following is also included:

[0094] Obtain a keyword relevance list of the newly added search document;

[0095] updating the first version record dictionary according to the newly added keyword relevance list of the search document to obtain an updated second version record dictionary;

[0096] Obtaining a Bloom index of the newly added search document according to the newly added search document and the updated second record dictionary;

[0097] The optimized Bloom filter is updated according to the Bloom index of the newly added search document to obtain an updated Bloom filter.

[0098] Optionally, obtain target keywords for searching documents, including:

[0099] Obtain the search keyword set entered by the user for searching documents;

[0100] The set of keywords to be searched is filtered to obtain target keywords.

[0101] Optionally, the keywords included in the target keyword are input into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from the document set, including:

[0102] The keywords contained in the target keyword are input into the Bloom filter. If the Bloom index of the keyword contained in the target keyword is in the Bloom index in the Bloom filter, the document set formed by the documents corresponding to the Bloom index of the keyword contained in the target keyword is used as the first document set.

[0103] It should be noted that the device is a device corresponding to the above method, and all implementation methods of the above method are applicable to the embodiments of the device and can achieve the same technical effects.

[0104] An embodiment of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the information search method in any of the above method embodiments.

[0105] Figure 5 The schematic diagram of the structure of the computing device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computing device.

[0106] like Figure 5As shown, the computing device may include: a processor, a communication interface, a memory, and a communication bus.

[0107] The processor, communication interface, and memory communicate with each other via a communication bus. The communication interface is used to communicate with other devices, such as clients or other server network elements. The processor is used to execute programs, specifically, the steps described in the aforementioned embodiment of the information search method for a computing device.

[0108] Specifically, the program may include program codes including computer operation instructions.

[0109] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.

[0110] Memory is used to store programs. The memory may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk storage.

[0111] The program can be specifically configured to cause a processor to execute the information search method of any of the above-described method embodiments. The specific implementation of each step in the program can be found in the corresponding descriptions of the corresponding steps and units in the above-described information search method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for ease and brevity of description, the specific operating processes of the devices and modules described above can refer to the corresponding process descriptions in the above-described method embodiments, and will not be repeated here.

[0112] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other device. Various general-purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the embodiment of the present invention is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to implement the content of the embodiment of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the embodiment of the present invention.

[0113] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0114] Similarly, it should be understood that in order to streamline the embodiments of the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed approach should not be interpreted as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all of the features of the individual embodiments disclosed above. Accordingly, the claims that follow the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.

[0115] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0116] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.

[0117] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The embodiments of the present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing an embodiment of the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0118] It should be noted that the above embodiments illustrate rather than limit the embodiments of the invention, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The embodiments of the invention may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.

Claims

1. An information search method, characterized in that: The method comprises: Obtain target keywords for searching documents; Inputting keywords included in the target keyword into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from a document set; Based on the target keyword, searching the first document set to obtain a second document set containing the target keyword; The Bloom filter is optimized through the following process: Get historical search keywords; Determining relevant keywords from the historical search keywords and obtaining a list of relevant keywords; According to the keyword, the Bloom filter is optimized to obtain an optimized Bloom filter, wherein the position of a Chinese character in the relevance keyword list is determined by two factors: the modulo m of its own encoding and its relevance to other characters, and the Bloom index position of the document to be searched is m bits; specifically, the following steps are performed: Traversing a keyword relevance list formed by related keywords, if a related keyword of the traversed current keyword is not in the record dictionary, adding a record to the record dictionary, the record including the current keyword and the position of the current keyword in the Bloom index; If the related keywords of the current keyword traversed are in the record dictionary, determine the position of the current keyword in the keyword relevance list; Add a record to the record dictionary according to the position of the current keyword in the keyword correlation list, which does not overlap with the position of the existing related keywords in the record dictionary; If the position of the current keyword in the keyword relevance list overlaps with the position of an existing related keyword in the record dictionary, calculation is performed based on the last determined position of the current keyword in the keyword relevance list until the determined position of the current keyword in the keyword relevance list does not overlap with the position of an existing related keyword in the record dictionary; forming a first version record dictionary according to positions of all keywords in the keyword correlation list; Traversing the search document to determine if the current word is in the keyword relevance list, marking the Bloom index of the current word based on the correspondence between the current word and the Bloom index position in the record dictionary table; otherwise, directly performing encoding conversion on the current word to obtain a remainder result, and setting the Bloom index of the current word based on the remainder result; An optimized Bloom filter is obtained according to the Bloom index of each word in the search document.

2. The information search method according to claim 1, characterized in that: Determine relevant keywords from the historical search keywords, including: According to the number of times different keywords appear simultaneously in the same historical search keyword and a preset threshold, keywords with correlation are determined from the historical search keywords.

3. The information search method according to claim 1, characterized in that: After obtaining the optimized Bloom filter, it also includes: Obtain a keyword relevance list of the newly added search document; updating the first version record dictionary according to the newly added keyword relevance list of the search document to obtain an updated second version record dictionary; Obtaining a Bloom index of the newly added search document according to the newly added search document and the updated second record dictionary; The optimized Bloom filter is updated according to the Bloom index of the newly added search document to obtain an updated Bloom filter.

4. The information search method according to claim 1, wherein: Get the target keywords used to search documents, including: Obtain the search keyword set entered by the user for searching documents; The set of keywords to be searched is filtered to obtain target keywords.

5. The information search method according to claim 4, characterized in that: Inputting keywords included in the target keyword into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from a document set, including: The keywords contained in the target keyword are input into the Bloom filter. If the Bloom index of the keyword contained in the target keyword is in the Bloom index in the Bloom filter, the document set formed by the documents corresponding to the Bloom index of the keyword contained in the target keyword is used as the first document set.

6. An information search device, characterized in that: The device comprises: An acquisition module, used to obtain target keywords for searching documents; a processing module configured to input keywords included in the target keyword into a Bloom filter to filter a first document set corresponding to the Bloom index of the keyword from a document set; and search the first document set based on the target keyword to obtain a second document set including the target keyword; The device is further configured to optimize a Bloom filter through the following process: Get historical search keywords; Determining relevant keywords from the historical search keywords and obtaining a list of relevant keywords; According to the keyword, the Bloom filter is optimized to obtain an optimized Bloom filter, wherein the position of a Chinese character in the relevance keyword list is determined by two factors: the modulo m of its own encoding and its relevance to other characters, and the Bloom index position of the document to be searched is m bits; specifically, the following steps are performed: Traversing a keyword relevance list formed by related keywords, if a related keyword of the traversed current keyword is not in the record dictionary, adding a record to the record dictionary, the record including the current keyword and the position of the current keyword in the Bloom index; If the related keywords of the current keyword traversed are in the record dictionary, determine the position of the current keyword in the keyword relevance list; Add a record to the record dictionary according to the position of the current keyword in the keyword correlation list, which does not overlap with the position of the existing related keywords in the record dictionary; If the position of the current keyword in the keyword relevance list overlaps with the position of an existing related keyword in the record dictionary, calculation is performed based on the last determined position of the current keyword in the keyword relevance list until the determined position of the current keyword in the keyword relevance list does not overlap with the position of an existing related keyword in the record dictionary; forming a first version record dictionary according to positions of all keywords in the keyword correlation list; Traversing the search document to determine if the current word is in the keyword relevance list, marking the Bloom index of the current word based on the correspondence between the current word and the Bloom index position in the record dictionary table; otherwise, directly performing encoding conversion on the current word to obtain a remainder result, and setting the Bloom index of the current word based on the remainder result; An optimized Bloom filter is obtained according to the Bloom index of each word in the search document.

7. A computing device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the information search method according to any one of claims 1 to 5.

8. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to execute an operation corresponding to the information search method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Index search method and system of data file

    CN104850564A