Search engine data processing method and apparatus

By storing fixed and non-fixed fields of search engine data separately and utilizing a custom tokenizer and inverted index mechanism, the limitations on the total number of fields and the problem of type consistency in Elasticsearch are solved, achieving efficient data writing and accurate searching.

CN115878879BActive Publication Date: 2026-04-21CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2022-12-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Elasticsearch has a limited number of fields, which makes it impossible to write new data when the data volume is large. It also requires that the fields stored be of the same type. It cannot write new data of different types, which affects the data writing efficiency and search accuracy of the search engine.

Method used

By acquiring fixed and non-fixed fields from search engine data, storing them in fields with the same attribute and text type fields respectively, and using a custom tokenizer and inverted index mechanism for precise matching, the accuracy of search results and data writing efficiency are improved.

Benefits of technology

It improves the data writing efficiency and search result accuracy of search engines, solves the problems of Elasticsearch in terms of the total number of fields and type consistency, and supports large-scale data storage and precise search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115878879B_ABST
    Figure CN115878879B_ABST
Patent Text Reader

Abstract

The application provides a search engine data processing method and device. After obtaining search engine data, fixed field data in the search engine data is stored in a field with the same attribute as the fixed field in a search engine database, and non-fixed field data in the search engine data is stored in a text type field in the search engine database after being serialized. Then, search engine data to be searched is obtained, and word segmentation processing is performed to obtain search keywords. The search keywords are matched with data in the search engine database field by using an inverted index mechanism of the search engine, and the search result of the search statement is obtained, which can effectively improve the search accuracy and solve the problems of low data writing efficiency and the incapability of supporting mass data storage in the existing search engine data processing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a search engine data processing method and apparatus. Background Technology

[0002] Elasticsearch is an open-source document search engine with distributed, multi-user capabilities. It can quickly store, search, and analyze massive amounts of data, making it a popular enterprise-level search engine. Elasticsearch achieves fast queries by dividing documents into words and recording the index relationship between each word and the document. When a user searches using keywords, Elasticsearch matches the query keywords with the indexed words and returns documents containing those keywords to the user. Therefore, the methods used to divide and store the word segmentation data are crucial to the success of Elasticsearch's search capabilities.

[0003] Currently, Elasticsearch primarily uses two methods for tokenization and storage. One method stores the data based on its original content, where each data field is mapped to a field in Elasticsearch. The other method maps fixed fields in the data to raw Elasticsearch fields, while non-fixed fields are combined into a JSON text format for data exchange. This JSON is then mapped as a field to Elasticsearch, with the field type set to flattened.

[0004] However, there is a limit to the total number of fields that Elasticsearch can support, and it will be unable to continue writing new data if the data volume is large enough. Elasticsearch also requires that the types of the stored fields be consistent. If the new data contains fields of different types from those in existing documents, it will also be unable to continue writing new data to Elasticsearch. Summary of the Invention

[0005] This application provides a search engine data processing method and apparatus to solve the problems of incomplete search engine data conversion rule files and excessive repetitive work in existing search engine development processes.

[0006] On the one hand, this application provides a search engine data processing method, including:

[0007] Obtain search engine data, and determine the fixed field data and non-fixed field data of the search engine data based on preset field information;

[0008] The fixed field data is stored in a field with the same attribute as the fixed field in the search engine database, and the non-fixed field data is serialized and then stored in a text type field in the search engine database.

[0009] Obtain search engine data to be searched and processed, and perform word segmentation on the search engine data to be searched and processed to obtain search keywords;

[0010] By utilizing the inverted index mechanism of the search engine, the search keywords are matched with the data in the fields of the search engine database to obtain search results. The fields of the search engine database include fields with the same attributes as the fixed fields and the text type fields.

[0011] On the other hand, this application provides a search engine data processing apparatus, including:

[0012] The acquisition module is used to acquire search engine data and determine the fixed field data and non-fixed field data of the search engine data based on preset field information.

[0013] The storage module is used to store the fixed field data in a field with the same attribute as the fixed field in the search engine database, and to serialize the non-fixed field data and store it in a text type field in the search engine database.

[0014] The processing module is used to acquire search engine data to be searched and processed, and to perform word segmentation on the search engine data to be searched and processed to obtain search keywords;

[0015] The search module is used to match the search keywords with the data in the search engine database fields using the inverted index mechanism of the search engine to obtain search results. The search engine database fields include fields with the same attributes as the fixed fields and the text type fields.

[0016] The search engine data processing method and apparatus provided in this application, after acquiring search engine data, stores fixed field data from the search engine data in fields with the same attributes as the fixed fields in the search engine database, and serializes non-fixed field data from the search engine data before storing it in text type fields in the search engine database; then, it acquires the search engine data to be searched and processes it into words to obtain search keywords; and uses the inverted index mechanism of the search engine to match the search keywords with the data in the fields of the search engine database to obtain the search results of the search statement. This can effectively improve search accuracy and solve the problems of low data writing efficiency and lack of support for large-scale data storage in the existing search engine data processing process. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] Figure 1 This is a schematic diagram of a search engine data processing architecture on which the embodiments of this application are based;

[0019] Figure 2 A flowchart illustrating the search engine data processing method provided in an embodiment of this application;

[0020] Figure 3 A schematic diagram of signaling interaction for a search engine data processing method provided in an embodiment of this application;

[0021] Figure 4 A flowchart illustrating the word segmentation processing method provided in the embodiments of this application;

[0022] Figure 5 A flowchart illustrating the word segmentation processing method provided in the embodiments of this application. Figure 2 ;

[0023] Figure 6 A structural block diagram of the search engine data processing apparatus provided in the embodiments of this application;

[0024] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0025] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0027] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0028] Elasticsearch is an open-source document search engine with distributed, multi-user capabilities. It can quickly store, search, and analyze massive amounts of data, making it a popular enterprise-level search engine. Elasticsearch achieves fast querying by dividing documents into words and recording the index relationship between each word and the document. When a user queries using keywords, Elasticsearch matches the query keywords with the indexed words and returns documents containing the keywords to the user. Therefore, the method of segmenting and storing the word data plays a crucial role in the success of Elasticsearch's search. Currently, Elasticsearch mainly uses two methods for storing word segmentation data. One method stores the data according to its original content, where each data field is mapped to a field in Elasticsearch. The other method maps fixed fields in the data to raw Elasticsearch fields, while non-fixed fields are combined into a JSON text format for data exchange. This JSON is then mapped as a field to Elasticsearch, and the field type in Elasticsearch is set to flattened. However, there is a limit to the total number of fields that Elasticsearch can support, and it will be unable to continue writing new data if the data volume is large enough. Elasticsearch also requires that the types of the stored fields be consistent. If the new data contains fields of different types from those in existing documents, it will also be unable to continue writing new data to Elasticsearch.

[0029] Figure 1 This is a schematic diagram of a search engine data processing architecture based on the embodiments of this application. See also: Figure 1 As shown, it mainly includes: a search engine database 101 and a search engine server 103. The search engine database 101 and the search engine server 103 can transmit search engine data 102 to each other, and the operator's staff 104 can send search engine data 102 to the search engine database 101.

[0030] Search engine database 101 is a type of non-relational database specifically designed for data content retrieval. Search engine database 101 uses indexes to categorize similar features in the data and improves search capabilities. Search engine database 101 is optimized to handle potentially long, semi-structured, or unstructured data, and typically offers specialized methods such as full-text search, complex search expressions, and search result ranking. Search engine database 101 stores search engine data 102 and its corresponding search results. After operator staff 104 uploads search engine data 102 to search engine database 101, search engine server 103 completes the search processing of search engine data 102.

[0031] Search engine data 102 can be understood as a text document, which can be compiled using various programming languages ​​according to the needs of a specific search engine server 103.

[0032] The search engine server 103 receives the search engine data 102, performs word segmentation on it, and records the index relationship between each word and the text document (i.e., the search engine data 102), thereby enabling fast querying. Various word segmenters are configured on the search engine server 103 to perform segmentation of the search engine data 102 according to certain rules.

[0033] Understandable Figure 1 The document only provides three search engine servers 103, but in actual applications, the number of search engine servers 103 can be one, five, or even more. The specific number of search engine servers 103 is not limited here.

[0034] For Elasticsearch, there are four common Chinese word segmenters configured: The Standard segmenter, the default in Elasticsearch, converts word units to lowercase and removes stop words. In information retrieval, to save storage space and improve search efficiency, it automatically filters out certain characters, words, and punctuation marks before or after processing natural language data or text, and supports single-character segmentation of Chinese. The Simple segmenter segments text information using non-alphabetic characters and then converts word units to lowercase, removing numeric characters. The Whitespace segmenter only removes spaces, does not support Chinese, does not standardize the segmented word units, and does not convert characters to lowercase. The Language segmenter is a language-specific segmenter but does not support Chinese. In addition, Elasticsearch also supports custom segmenters, which can be customized by operators.

[0035] Considering that the existing word segmenter on search engine server 103 results in inaccurate word segmentation and inaccurate search results when performing word segmentation on search engine data 102 on search engine server 102, a novel word segmentation method is implemented using a custom word segmenter, which can effectively improve the accuracy of search results. Furthermore, when storing search engine data 102 in search engine database 101, Elasticsearch has a limited number of fields it can support. When the data volume is large, it may be unable to continue writing new data because the maximum number of fields has been reached. Secondly, Elasticsearch requires that the types of fields stored be consistent; if new data contains fields of different types from existing documents, it cannot be written. Moreover, compared to other field types, flattened fields support matching queries but not range queries or clustering. Therefore, this application provides a search engine data processing method and apparatus that can effectively improve search accuracy and solve the problems of low data writing efficiency and lack of support for large-scale data storage in existing search engine data processing.

[0036] Figure 2 A flowchart illustrating the search engine data processing method provided in this application embodiment is shown below. Figure 2 As shown in the embodiments of this application, the search engine data processing method includes:

[0037] S201. Obtain search engine data and determine the fixed and non-fixed field data of the search engine data based on preset field information.

[0038] Operator staff 104 can pre-set field information in the search engine database 101. After the search engine server 103 receives the search engine data 102, it determines the fixed field data and non-fixed field data of the search engine data 102 according to the pre-set field information.

[0039] It is understandable that search engine data 102 can be regarded as a text document, but in actual application, the format of search engine data 102 can be a text format in character form, a compressed format in binary data form, or other types, which are not limited here.

[0040] In one implementation, operator staff 104 can pre-set field information in the search engine database 101 as follows: there are two fixed fields, namely name and age. The search engine server 103 receives search engine data 102 as a list, one of which is: {"Name": "Zhang San", "Age": "12", "Home Address": "China"}. In this scenario, the fixed field data of search engine data 102 are: {"Name": "Zhang San"}, {"Age": "12"}, and the non-fixed field data is: {"Home Address": "China"}.

[0041] This method effectively divides search engine data 102 into fixed-field data and non-fixed-field data by pre-setting different field information.

[0042] S202. Store fixed field data in a field with the same attribute as the fixed field in the search engine database, and serialize non-fixed field data before storing it in a text type field in the search engine database.

[0043] The search engine server 103 directly stores the fixed field data of the search engine data 102 into the field with the same attribute as the fixed field in the search engine database 101.

[0044] The search engine server 103 uses data exchange to serialize the non-fixed field data of the search engine data 102 to obtain serialized data, and stores the serialized data in the text type field of the search engine database 101.

[0045] In one implementation, the fixed fields of search engine data 102 are: {"Name": "Zhang San"}, {"Age": "12"}, and the non-fixed fields of search engine data 102 are: {"Home Address": "China"}. The fields in search engine database 101 with the same attributes as the fixed fields are name and age, respectively. Therefore, the fixed fields stored in search engine database 101 are: {"Name": "Zhang San"}, {"Age": "12"}, and the text-type field stored in search engine database 101 is: {"Home Address": "China"}.

[0046] In another implementation, the fixed fields of search engine data 102 are: {"Name": "Zhang San"}, {"Age": "12"}, and the non-fixed fields are: {"Home Address": "China"}, {"Hobbies": "Playing Basketball"}. The fields in search engine database 101 with the same attributes as the fixed fields are name and age, respectively. Therefore, the fixed fields stored in search engine database 101 are: {"Name": "Zhang San"}, {"Age": "12"}, and the text-type fields stored in search engine database 101 are: {"Home Address": "China", "Hobbies": "Playing Basketball"}.

[0047] This method serializes non-fixed field data through data exchange and converts it into text type fields, enabling it to support operations on various search engine servers and increasing the availability of search engine data.

[0048] S203. Obtain the search engine data to be searched and process it, and perform word segmentation on the search engine data to obtain the search keywords.

[0049] When the search engine server 103 obtains the search engine data to be searched and processed, it uses a parsing function to parse the search engine data to be searched and processed to obtain word segments, and determines whether all the characters in the search engine data to be searched and processed have been parsed; if all have been parsed, it determines whether the word segmentation index value is less than the length of the word segmentation list; if it is not less than the length, the word segmentation is used as the search keyword.

[0050] For specific word segmentation methods, please refer to... Figure 4 As shown, Figure 4 This is a flowchart illustrating the word segmentation processing method provided in the embodiments of this application. Figure 4 As can be seen, if the word segmentation index value is less than the length of the word segmentation list, the word segmentation corresponding to the word segmentation index value is used as the search keyword, the word segmentation index value is incremented by 1, and the parsing function is reused to parse the search engine data to be searched.

[0051] If not all characters in the search engine data to be processed have been parsed, the characters in the search engine data to be processed are scanned to obtain a list of characters to be parsed, and it is determined whether the list of characters to be parsed is empty. If it is an empty list, the search engine data to be processed is parsed to obtain word segments as search keywords. If the list of characters to be parsed is not an empty list, the first word segment in the word segment list is used as the search keyword, the word segment index value is set to 1, and the parsing function is reused to parse the search engine data to be processed.

[0052] The process of scanning characters in the search engine data to be searched is described in reference [reference]. Figure 5 As shown, Figure 5 A flowchart illustrating the word segmentation processing method provided in the embodiments of this application. Figure 2 ,from Figure 5 As can be seen, character identifiers are set for the characters in the search engine data to be searched, and it is determined whether the character identifiers are the same as the preset character identifiers; if they are the same, it is determined whether the judgment value of the character identifiers is correct; if so, the characters in the search engine data to be searched are traversed to obtain a list of characters to be parsed.

[0053] If the character identifier is different from the preset character identifier, the characters in the search engine data to be searched are converted to lowercase characters; a character identifier is set for the lowercase characters, and it is determined whether the character identifier is the same as the preset character identifier.

[0054] If the character identifier's judgment value is incorrect, set the character identifier's judgment value to correct, re-set the character identifier for the characters in the search engine data to be searched, and determine whether the character identifier is the same as the preset character identifier.

[0055] In one implementation, the search engine server 103 performs word segmentation on the search engine data to be searched, {"home address": "China", "hobby": "playing basketball"}, to obtain the search keywords as follows: {"home address": "China"}, {"hobby": "playing basketball"}.

[0056] This method uses a custom word segmenter to segment the search engine data 102, making the obtained search keywords more accurate and effectively improving search accuracy.

[0057] S204. Utilize the inverted index mechanism of the search engine to match the search keywords with the data in the search engine's database fields to obtain search results.

[0058] Search engine database fields include fields with the same attributes as fixed fields and text-type fields.

[0059] Using the inverted index mechanism of search engine server 103, the search keywords are searched in search engine database 101 to obtain search results.

[0060] The inverted index mechanism is a specific storage form for implementing the word-document matrix. Through the inverted index, a list of documents containing a given word can be quickly retrieved. The inverted index mainly consists of two parts: a word dictionary and an inverted file.

[0061] The indexing unit of a search engine is usually a word. A word dictionary is a string collection of all the words that have appeared in the document collection. Each index entry in the word dictionary records some information about the word itself and a pointer to the "inverted list".

[0062] An inverted list contains a list of all documents that contain a given word, along with the word's position within each document. Each record is called an inverted item. By using the inverted list, you can determine which documents contain a particular word.

[0063] The inverted list of all words is usually stored sequentially in a file on the disk, which is called the inverted file. The inverted file is the physical file that stores the inverted index.

[0064] In one implementation, if the search engine database 101 searches for documents a, b, and c corresponding to keyword A, then the search engine server 103 will obtain the search results for documents a, b, and c.

[0065] In another implementation, the document collection contains five documents: Document 1: The father of Google Maps joins Baidu Maps; Document 2: The father of Google Maps jumps ship to Baidu Maps; Document 3: Google Maps founder Lars left Google to join Baidu Maps; Document 4: The father of Google Maps' move to Baidu Maps is related to the cancellation of surveying data collection work; Document 5: The father of Google Maps joins the search website Baidu Maps. After word segmentation, the words and their numbers are: 1 Google, 2 Maps, 3 Father, 4 Jump ship, 5 Baidu, etc. The word number for Google is 1, and since it exists in every document, Google's inverted list is {1, 2, 3, 4, 5}. Similarly, the word number for "jump ship" is 4, and its inverted list is {2, 4}.

[0066] This method uses the inverted index mechanism of search engine server 103 to accurately find documents corresponding to different keywords, making the search results of search engine data 102 more targeted and accurate.

[0067] Figure 3 A schematic diagram of the signaling interaction of the search engine data processing method provided in the embodiments of this application is shown below. Figure 3 As shown, combined with Figure 2 The search engine data processing method provided in this application includes the following steps:

[0068] S301, Operator staff 104 uploads search engine data 102 to search engine database 101 for storage.

[0069] S302, the search engine server 103 sends a request to the search engine database 101 to collect search engine data 102.

[0070] S303, the search engine database 101 sends search engine data 102 to the search engine server 103.

[0071] S304. The search engine server 103 determines the fixed field data and non-fixed field data of the search engine data 102 according to the preset field information.

[0072] S305, the search engine server 103 sends the fixed field data to the search engine database 101 for storage.

[0073] S306, Search engine server 103 performs serialization processing on non-fixed field data to obtain text-type non-fixed field data.

[0074] By using data exchange, non-fixed field data is serialized to obtain serialized data, which is then stored in the text type field of the search engine database.

[0075] S307, Search engine server 103 sends text-type non-fixed field data to search engine database 101 for storage.

[0076] S308, Search engine server 103 sends a search engine data collection request to search engine database 101.

[0077] S309, the search engine database 101 sends the search engine data to be searched and processed to the search engine server 103.

[0078] S310, the search engine server 103 performs word segmentation on the search engine data to be searched, and obtains the search keywords.

[0079] Using a parsing function, the search engine data to be searched is parsed to obtain word segments, and it is determined whether all characters in the search engine data to be searched have been parsed. If all characters have been parsed, it is determined whether the word segmentation index value is less than the length of the word segmentation list. If it is not less than the length, the word segmentation is used as the search keyword.

[0080] If not fully completed, the characters in the search engine data to be processed are scanned to obtain a list of characters to be parsed, and it is determined whether the list of characters to be parsed is empty. If it is empty, the search engine data to be processed is parsed to obtain word segments as search keywords. If it is not empty, the first word segment in the word segment list is used as the search keyword, the word segmentation index value is set to 1, and the parsing function is reused to parse the search engine data to be processed.

[0081] If the value is less than the target value, the word segment corresponding to the word segmentation index value is used as the search keyword. The word segmentation index value is then incremented by 1, and the parsing function is reused to parse the search engine data to be processed.

[0082] S311, Search engine server 103 sends search keywords to search engine database 101.

[0083] S312. The search engine database 101 searches for search keywords in the search engine database 101 and obtains search results.

[0084] By utilizing the inverted index mechanism of search engines, search keywords are matched with data in the search engine's database fields to obtain search results.

[0085] Search engine database fields include fields with the same attributes as fixed fields and text-type fields.

[0086] S313, the search engine database 101 sends the search results back to the search engine server 103.

[0087] Figure 6 This is a structural block diagram of a search engine data processing apparatus provided in an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. See also... Figure 6 As shown, the search engine data processing device provided in this application embodiment includes: an acquisition module 601, a storage module 602, a processing module 603, and a search module 604.

[0088] The acquisition module 601 is used to acquire search engine data and determine the fixed field data and non-fixed field data of the search engine data based on preset field information.

[0089] Storage module 602 is used to store fixed field data in a field with the same attribute as the fixed field in the search engine database, and to serialize non-fixed field data and store it in a text type field in the search engine database.

[0090] The processing module 603 is used to acquire search engine data to be searched and to perform word segmentation on the search engine data to be searched and to obtain search keywords;

[0091] Search module 604 is used to match search keywords with data in the search engine's database fields using the search engine's inverted index mechanism to obtain search results.

[0092] The search engine data processing device provided in this application, after acquiring search engine data, stores fixed field data from the search engine data into fields with the same attributes as the fixed fields in the search engine database, and serializes non-fixed field data from the search engine data into text type fields in the search engine database; then, it acquires the search engine data to be searched and processes it into words to obtain search keywords; using the inverted index mechanism of the search engine, it matches the search keywords with the data in the fields of the search engine database to obtain the search results of the search statement, which can effectively improve the search accuracy and solve the problems of low data writing efficiency and lack of support for large-scale data storage in the existing search engine data processing process.

[0093] Figure 7 See the schematic diagram of the electronic device provided in the embodiments of this application. Figure 7 As shown, the electronic device includes: a memory 701, a processor 702, and a computer program; wherein the computer program is stored in the memory 701 and configured to be executed by the processor 702. Figure 2 , Figure 3 , Figure 4 and Figure 5 The processor 702 is used to implement each step. Figure 6 Each module.

[0094] The memory 701 and the processor 702 are connected via a bus 703.

[0095] For relevant instructions, please refer to the corresponding text. Figures 2 to 6 The relevant descriptions and effects of the steps in the corresponding embodiments are understood, and will not be elaborated on here.

[0096] This application also provides a computer-readable storage medium including computer code that, when run on a computer, causes the computer to perform actions such as... Figures 2 to 7 The method provided by any of the corresponding implementation methods.

[0097] This application also provides a computer program product, including program code, which, when a computer runs the computer program product, executes as follows: Figures 2 to 7 The method provided by any of the corresponding implementation methods.

[0098] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0099] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A search engine data processing method, characterized in that, include: Obtain search engine data, and determine the fixed field data and non-fixed field data of the search engine data based on preset field information; The fixed field data is stored in a field with the same attribute as the fixed field in the search engine database, and the non-fixed field data is serialized and then stored in a text type field in the search engine database. Obtain search engine data to be searched and processed, and perform word segmentation on the search engine data to be searched and processed to obtain search keywords; By utilizing the inverted indexing mechanism of the search engine, the search keywords are matched with the data in the fields of the search engine database to obtain search results. The fields of the search engine database include fields with the same attributes as the fixed fields and the text type fields. The step of segmenting the search engine data to be searched to obtain search keywords includes: The search engine data to be searched is parsed to obtain word segments, and it is determined whether all characters in the search engine data to be searched have been parsed. If not all characters in the search engine data to be searched have been parsed, the characters in the search engine data to be searched are scanned to obtain a list of characters to be parsed, and it is determined whether the list of characters to be parsed is empty. If it is empty, the search engine data to be searched is parsed to obtain word segments as search keywords. If the list of characters to be parsed is not empty, the first word segment in the word segmentation list is used as the search keyword, the word segmentation index value is set to 1, and the parsing function is reused to parse the search engine data to be searched. If all steps are completed, determine if the word segmentation index value is less than the length of the word segmentation list. If the word segmentation index value is not less than the length of the word segmentation list, use the word segmentation as the search keyword. If the word segmentation index value is less than the length of the word segmentation list, use the word segmentation corresponding to the word segmentation index value as the search keyword, increment the word segmentation index value by 1, and then reuse the parsing function to parse the search engine data to be searched.

2. The method according to claim 1, characterized in that, The text type fields stored in the search engine database after serialization of the non-fixed field data include: The non-fixed field data is serialized using data exchange to obtain serialized data; The serialized data is stored in a text type field in the search engine database.

3. The method according to claim 1, characterized in that, The process of parsing the search engine data to be searched to obtain word segmentation includes: The search engine data to be searched is parsed using a parsing function to obtain word segments.

4. The method according to claim 1, characterized in that, The process of scanning the characters in the search engine data to be searched and processed to obtain a list of characters to be parsed includes: Set character identifiers for the characters in the search engine data to be searched and determine whether the character identifiers are the same as preset character identifiers; If they are the same, determine whether the judgment value of the character identifier is correct; If so, the characters in the search engine data to be searched are traversed to obtain a list of characters to be parsed.

5. The method according to claim 4, characterized in that, After determining whether the character identifier is the same as the preset character identifier, the method further includes: If they are not the same, convert the characters in the search engine data to be searched to lowercase. Set a character identifier for the lowercase character and determine whether the character identifier is the same as a preset character identifier.

6. The method according to claim 4 or 5, characterized in that, After determining whether the judgment value of the character identifier is correct, the method further includes: If not, the judgment value of the character identifier is set to be correct, the character identifier is reset for the characters in the search engine data to be searched, and it is determined whether the character identifier is the same as the preset character identifier.

7. A search engine data processing device, comprising: The acquisition module is used to acquire search engine data and determine the fixed field data and non-fixed field data of the search engine data based on preset field information. The storage module is used to store the fixed field data in a field with the same attribute as the fixed field in the search engine database, and to serialize the non-fixed field data and store it in a text type field in the search engine database. The processing module is used to acquire search engine data to be searched and processed, and to perform word segmentation on the search engine data to be searched and processed to obtain search keywords; The search module is used to match the search keywords with the data in the search engine database fields using the inverted index mechanism of the search engine to obtain search results. The search engine database fields include fields with the same attributes as the fixed fields and the text type fields. The processing module is specifically used for: The search engine data to be searched is parsed to obtain word segments, and it is determined whether all characters in the search engine data to be searched have been parsed. If not all characters in the search engine data to be searched have been parsed, the characters in the search engine data to be searched are scanned to obtain a list of characters to be parsed, and it is determined whether the list of characters to be parsed is an empty list. If the list is empty, the search engine data to be searched will be parsed to obtain word segments as search keywords; If the list of characters to be parsed is not empty, the first word in the word segmentation list is used as the search keyword, the word segmentation index value is set to 1, and the parsing function is reused to parse the search engine data to be searched. If all steps are completed, check if the word segmentation index value is less than the length of the word segmentation list; If the word segmentation index value is not less than the length of the word segmentation list, the word segment will be used as the search keyword; if the word segmentation index value is less than the length of the word segmentation list, the word segmentation corresponding to the word segmentation index value will be used as the search keyword, the word segmentation index value will be incremented by 1, and the parsing function will be reused to parse the search engine data to be searched.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the search engine data processing method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Data retrieval method, system and device and storage medium

    CN111309760A