Short message search method and system based on suffix arrays
A suffix array and short message technology, applied in the field of data search, can solve the problem of long time consumption of short message search method, and achieve the effect of fast query speed, high query efficiency and improved search speed.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0027] like figure 1 Shown, the method provided by the invention comprises the following steps:
[0028] S1. Construct a suffix array for each short message in the short message list according to its short message string content, and then sort each suffix array item in all the suffix arrays constructed according to the preset rules;
[0029] S2. When receiving a keyword for searching short messages, according to the order of the received characters, each character in the received keyword is used as an index for binary search in turn;
[0030] S3. Use the i-th character in the keyword as an index to perform a binary search in all sorted suffix array items, and use the suffix array whose first character is the index corresponding to the i-th search result; i's The initial value is 1;
[0031] S4. Set i=i+1 and then use the i-th character in the keyword as an index to perform a binary search in the suffix array item contained in the i-1 search result, and then match the first c...
Embodiment 2
[0036] This embodiment provides a system applying the scheme of Embodiment 1, such as figure 2 As shown, the specific scheme is as follows:
[0037] Including string reading module, construction module, sorting module and search module;
[0038] Wherein the string reading module is used to read the string content of each short message in the short message list;
[0039] The construction module is used to construct a suffix array for each text message in the text message list;
[0040] The sorting module is used to sort each suffix array item in all constructed suffix arrays;
[0041] The search module is used to perform a binary search in all sorted suffix array items according to keywords, and then use the suffix array corresponding to the searched suffix array items as the search result.
Embodiment 3
[0043] This embodiment is an illustration of the scheme of embodiment 1, as figure 2 As shown, the specific process is as follows:
[0044] Step 1. First, construct suffix arrays for the character string contents of the two short messages, as shown in Table 1 and Table 2 respectively.
[0045]
[0046] Step 2. After constructing a suffix array for each short message in the short message list, sort each suffix array item in all the constructed suffix arrays according to a preset rule.
[0047] The rule described here is to sort by the first letter of the phonetic alphabet of the first Chinese character; obtain the list of the suffix array of Table 3;
[0048] table 3
[0049]
[0050] Step 3. When receiving the keyword "eat*fan" (*represents any character) for searching text messages, first, according to the first character "eat" input by the user, the pinyin initial letter "C" of the character "eat" is " is compared with the pinyin initial letter "M" of the first cha...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com