A search and retrieval method, apparatus, computer device, and storage medium

By building a search index based on a data warehouse and using a custom query mechanism to calculate popularity scores, the problem of poor recall effect in existing technologies is solved, thereby improving user experience and conversion rate.

CN115794993BActive Publication Date: 2026-03-06VIPSHOP (GUANGZHOU) SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211443015.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2026-03-06
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

Existing search recommendation systems cannot effectively combine the popularity of search terms, resulting in poor recall, low user click-through rates, and low conversion rates.

Method used

By building a search index based on a data warehouse mechanism, and utilizing word segmentation and custom query mechanisms, the popularity scores of the segmented words are calculated and accumulated, and then sorted to recall search results.

Benefits of technology

It improves search recall effectiveness, increases user click-through rate and conversion rate, and provides the ability to manually intervene in search index recall through a popularity score linkage mechanism to ensure that the results presented are more in line with users' expectations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115794993B_ABST
    Figure CN115794993B_ABST
Patent Text Reader

Abstract

This application relates to a search retrieval method, apparatus, computer device, and storage medium. The method includes: constructing a search index based on a data warehouse mechanism; segmenting the search term to be searched to obtain word combinations; finding the popularity scores corresponding to the words in the word combinations based on the search index and accumulating the popularity scores; sorting the accumulated popularity scores using a custom query mechanism; and retrieving the search results corresponding to the search term. This application, during search retrieval, links the results to popularity scores, provides the ability to manually intervene in search index retrieval, presents users with popular results that users are more likely to see, and presents users with just the right retrieval results, thereby increasing user click-through rates and conversion rates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of search technology, and in particular to a search retrieval method, apparatus, computer device, and storage medium. Background Technology

[0002] Most search recommendation systems on the market use Elasticsearch (a distributed search and analytics engine at the core of the Elastic Stack, hereinafter referred to as ES) as the data system for search retrieval. The search recommendation results often need to be correlated with the popularity of the search terms. For example, in the scenario of product search, we hope to present users with products that are more popular among similar products.

[0003] By default, Elasticsearch only provides a similarity algorithm for search terms, namely the Term Frequency & Inverse Document Frequency algorithm. This algorithm can obtain the document with the highest text matching degree, but it cannot be associated with the popularity value.

[0004] Therefore, there is an urgent need to propose a search recall method, device, computer equipment, and storage medium that can improve recall effectiveness and increase user click-through rate and conversion rate. Summary of the Invention

[0005] Therefore, it is necessary to provide a search retrieval method, apparatus, computer equipment, and storage medium that can improve retrieval effectiveness and increase user click-through rate and conversion rate in response to the above-mentioned technical problems.

[0006] On the one hand, a search recall method is provided, the method comprising:

[0007] Step A: Build a search index based on a data warehouse mechanism;

[0008] Step B: Perform word segmentation on the term to be searched to obtain word segmentation combinations. Based on the search index, find the popularity score corresponding to the word segmentation combination and accumulate the popularity scores.

[0009] Step C: Use a custom query mechanism to sort the accumulated popularity scores and retrieve the search results corresponding to the search term.

[0010] In one embodiment, the method of constructing a search index based on a data warehouse mechanism includes: obtaining a keyword data source; performing word segmentation on the keyword data source using a word segmenter to obtain multiple word segmentation results; calculating the popularity score of each word segmentation result using a popularity score calculation formula; concatenating each word segmentation text with its corresponding popularity score using a preset label, and splitting the multiple concatenated results using a space word segmenter to generate a first text result; performing deduplication on the first text result to generate a second text result; and inputting the second text result into a preset document to form the search index.

[0011] In one embodiment, the formula for calculating the heat score further includes:

[0012] D = S + 8 / (1 × x + 0.6)

[0013] Where D represents the popularity score, S represents the global popularity score, and x represents the location attribute of the keyword data source.

[0014] In one embodiment, the method further includes: before constructing the search index based on the data warehouse mechanism, the method further includes: configuring the index definition of the search index: defining the name of the field in the index, defining the data type of the field, setting the relevant configuration of the inverted index for the field; configuring the index settings of the search index.

[0015] In one embodiment, the method further includes: after constructing the search index based on the data warehouse mechanism, the method further includes: using a custom analyzer to test the word segmentation effect of the search index; when each text parsed by the custom analyzer and its corresponding position information are accurate, it is determined that the constructed search index meets the preset standard.

[0016] In one embodiment, the step of segmenting the search term to obtain a segmentation combination, finding the popularity score corresponding to the segmentation in the segmentation combination based on the search index, and accumulating the popularity score includes: segmenting the search term using a segmenter; retrieving documents that match the segmentation results through the search index; and accumulating the scores corresponding to the segmented text in the retrieved documents to obtain the accumulated text score.

[0017] In one embodiment, the method further includes: sorting the accumulated scores using a custom query mechanism and recalling the search results corresponding to the search term by using a custom query mechanism written using an index plugin mechanism to sort the accumulated scores; and recalling the search results corresponding to the search term in sequence according to the sorting results.

[0018] On the other hand, a search and retrieval device is provided, the device comprising:

[0019] The index building module is used to build search indexes based on data warehouse mechanisms;

[0020] The score calculation module is used to segment the search term into words to obtain word combinations, find the popularity scores corresponding to the words in the word combinations based on the search index, and accumulate the popularity scores.

[0021] The search recall module is used to sort the accumulated popularity scores using a custom query mechanism and recall the search results corresponding to the search term.

[0022] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0023] Step A: Build a search index based on a data warehouse mechanism;

[0024] Step B: Perform word segmentation on the term to be searched to obtain word segmentation combinations. Based on the search index, find the popularity score corresponding to the word segmentation combination and accumulate the popularity scores.

[0025] Step C: Use a custom query mechanism to sort the accumulated popularity scores and retrieve the search results corresponding to the search term.

[0026] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0027] Step A: Build a search index based on a data warehouse mechanism;

[0028] Step B: Perform word segmentation on the term to be searched to obtain word segmentation combinations. Based on the search index, find the popularity score corresponding to the word segmentation combination and accumulate the popularity scores.

[0029] Step C: Use a custom query mechanism to sort the accumulated popularity scores and retrieve the search results corresponding to the search term.

[0030] The aforementioned search retrieval method, apparatus, computer equipment, and storage medium include the following steps: constructing a search index based on a data warehouse mechanism; segmenting the search term to be searched to obtain a word combination; finding the popularity score corresponding to each word in the word combination based on the search index and accumulating the popularity scores; sorting the accumulated popularity scores using a custom query mechanism; and retrieving the search results corresponding to the search term to be searched. In this application, the search retrieval results are linked to the popularity score, thereby providing the ability to manually intervene in the search index retrieval, presenting users with popular results that they expect, and providing users with just the right retrieval results, thereby increasing the user's click-through rate and conversion rate. Attached Figure Description

[0031] Figure 1 This is a diagram illustrating the application environment of a search and recall method in one embodiment;

[0032] Figure 2 This is a flowchart illustrating a search and recall method in one embodiment;

[0033] Figure 3 This is another flowchart illustrating the search and recall method in one embodiment;

[0034] Figure 4 This is a structural block diagram of a search and recall device in one embodiment;

[0035] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0037] The search and recall method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with a data processing platform set on server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be implemented as a standalone server or a server cluster consisting of multiple servers.

[0038] Example 1

[0039] In one embodiment, such as Figure 2-3 As shown, a search recall method is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:

[0040] S1: Build a search index based on a data warehouse mechanism.

[0041] It should be noted that this step is in the indexing stage. The indexing stage is responsible for storing the word segmentation results and corresponding scores of each document into the database when creating the ES index (the distributed search and analysis engine located in the core of the Elastic Stack, hereinafter referred to as ES, the search index described in this application). When creating a document, the document is segmented and the popularity score corresponding to the segmentation is calculated. Then, the segmentation result text and the corresponding score are concatenated into a string and put into a field of the document, in the format of "keyword:score keyword:score", such as: "nike|50.0029426Nike|40.0029426Shoes|5.0029426Vipshop|3.9426".

[0042] Specifically, to construct the search index, this application introduces the concept of ETL (Data Warehouse Technology). ETL is mainly used for index creation. When creating the index, ETL is responsible for word segmentation of the keyword data source, calculation of popularity scores, integration of document information, and construction of the Elasticsearch index. The specific steps are as follows:

[0043] Obtain keyword data sources, including keywords from brand, product category, product title, place of origin, core words, color words, attribute words, gender, style number, size, and other data sources;

[0044] The keyword data source is segmented using a word segmenter to obtain multiple segmentation results. Specifically, this step involves integrating an ik / hanlp word segmenter within the ETL process to segment each keyword of a record that needs to be imported into the database, resulting in multiple segmentation results.

[0045] The popularity score for each word segmentation result is calculated using the following formula:

[0046] D = S + 8 / (1 × x + 0.6)

[0047] Where D represents the popularity score, S represents the global popularity score, and x represents the location attribute of the keyword data source. The Java code for its calculation is as follows:

[0048] public float generateScore(float index, float staticScore){

[0049] return 8F / (1F*index+0.6F)+staticScore;

[0050] }

[0051] Where index is the position of the keyword, staticScore is the global popularity score of the record, the position attribute is the order of the keyword source above, for example, brand is 1, the central word is 5, and the global popularity score is the global weight manually configured for the record to be entered into the database. For example, if you want a record to be ranked higher, you set the global popularity score of the record to be higher. In this way, when the matched word segmentation results are the same, the document with the higher global popularity score will be ranked higher.

[0052] Each segmented text and its corresponding popularity score are concatenated using preset labels. A space segmenter is then used to split the multiple concatenated results to generate the first text result. Specifically, the text and the corresponding popularity score are concatenated using "|", and the concatenated results are separated by spaces. For example, "nike|50.0029426Nike|40.0029426Shoes|5.0029426Vipshop|3.9426", where the text result with the higher score appears first.

[0053] Because words from different sources may produce identical segmented texts, the first text result is deduplicated, retaining only the pair of concatenated results with the highest scores to generate the second text result.

[0054] The second text result is input into a preset document to form the search index.

[0055] Furthermore, before constructing the search index based on the data warehouse mechanism, the method further includes:

[0056] Configure the index definition of the search index: define the names of the fields in the index, define the data types of the fields, and set the relevant configurations for the inverted indexes of the fields;

[0057] Configure the index settings for the search index.

[0058] Specifically, before creating an index, you need to configure the Elasticsearch index's mappings and settings. The mappings are similar to the table concept in a relational database and mainly include the following: defining the names of the fields in the index; defining the data types of the fields, such as string, integer, boolean, etc.; and setting the relevant configurations for the inverted index of the fields, such as whether tokenization is needed and which tokenizer to use.

[0059] The settings can be considered the index-related configurations in this application. Specific word segmentation configurations are also required when inserting documents into the index to correctly parse the document's keywords and scores during retrieval. This application defines the `good_name_rank` field in `mappings` to store keyword and popularity score information, specifically storing text in the format "nike|50.0029426Nike|40.0029426Shoes|5.0029426Vipshop|3.9426". The `type` of the `good_name_rank` field is defined as `text`, its `TermVector` is defined as `with_positions_payloads` (a term vector analyzer containing position information and payload), its analyzer is defined as a custom analyzer `termWithPayloadAnalyzer`, and its query analyzer is defined as a whitespace analyzer. In this application, the keywords have already been segmented by the ik / hanlp tokenizer in the ETL process, so further segmentation is not required. To parse the text "good_name_rank", a custom analyzer needs to be created in the settings, named termWithPayloadAnalyzer. The custom analyzer includes a tokenizer and token filters. This application uses a simple whitespace tokenizer to segment "good_name_rank" by spaces, and then uses multiple token filters to parse the segmented text. The token filters used include LowercaseTokenFilter (which converts all uppercase English characters to lowercase), ASCIIFoldingTokenFilter (which converts diacritics not in the ASCII table to their corresponding English characters in the ASCII table), and the custom token filter termWithPayloadFilter. The custom term filter `termWithPayloadFilter` in this application uses the `DelimitedPayloadToken Filter` provided by Elasticsearch. This tokenizer accepts a delimiter to separate the term (tag) from the payload, i.e., separating the keyword and score in this embodiment. The custom `termWithPayloadFilter` uses "|" as the delimiter to separate the token and payload, and encodes the payload as a float (floating-point number) type. Detailed configuration code is as follows:

[0060]

[0061]

[0062] Furthermore, after constructing the search index based on the data warehouse mechanism, the method further includes:

[0063] The word segmentation effect of the search index was tested using a custom analyzer;

[0064] If each text and its corresponding location information parsed by the custom analyzer are accurate, the constructed search index is determined to meet the preset standard.

[0065] Specifically, after configuration, for example, this embodiment can use the `_analyze` command to test the word segmentation effect, and use the custom analyzer `termWithPayloadAnalyzer` to analyze "nike|50.0029426Nike|40.0029426Shoes|5.0029426Vipshop|3.9426", the code is as follows:

[0066]

[0067] The execution result is as follows:

[0068]

[0069] The execution results show that the custom parser termWithPayloadAnalyzer successfully parsed each piece of text (e.g., token: "nike") and its corresponding position information (e.g., position: 1). After creating the document, you can also view the TermVector information of this document.

[0070] GET poc / _termvectors / 1

[0071] The execution result is as follows:

[0072]

[0073] The returned results show that each keyword has been segmented into corresponding terms. Each term contains the keyword's position information and a Base64-encoded popularity score payload. For example, the parsed term "nike" has a position of 0 (starting from 0) and a payload of "QkgDAw==" (where "QkgDAw==" is the Base64-encoded value of the score 50.0029426 within Elasticsearch). This completes the indexing phase of this embodiment. It segments the text data from each keyword data source for a record, calculates the popularity score for each text, concatenates all the segmented text and scores into a single field value, and places this value in the "goods_name_rank" field of the Elasticsearch index document for use in subsequent query phases.

[0074] S2: Perform word segmentation on the term to be searched to obtain word segmentation combinations. Based on the search index, find the popularity scores corresponding to the words in the word segmentation combinations and accumulate the popularity scores.

[0075] S3: Use a custom query mechanism to sort the accumulated popularity scores and retrieve the search results corresponding to the search term.

[0076] It should be noted that steps S2 to S3 specifically include:

[0077] This stage is the query stage, which is responsible for segmenting the search terms into words, feeding the segmented results into Elasticsearch for retrieval, accumulating the scores for the corresponding words matched in each document, and finally sorting the product documents according to the accumulated scores for recall. For example, if the search term is "Nike shoes" and matches "nike" and "shoes", the total score is 50.0029426 + 5.0029426. The specific steps are as follows:

[0078] (1) Use the ik / hanlp word segmenter to segment the search term. For example, "Nike shoes" will be segmented into two words: "nike" and "shoes".

[0079] (2) When ES performs a search, it retrieves the matching documents by the word segmentation results of the search terms, and then adds up the scores corresponding to the word segmentation text in the retrieved documents. For example, when searching for Nike shoes, the total score of the matching documents is: 50.0029426+5.0029426.

[0080] (3) Finally, ES sorts all the matching documents by the accumulated scores and outputs them.

[0081] To enable Elasticsearch (ES) to accumulate the scores of matched text words, this embodiment introduces an ES plugin mechanism. ES plugins are written to perform the custom ES queries required in this application. The core code is as follows:

[0082]

[0083] The ES plugin TermWithPayloadMatchScorer developed in this embodiment accumulates the scores of keywords matched in each document to obtain a total score; then, a custom query is used in ES for sorting and recall. The specific ES query statement is as follows, where term_with_payload_match is the ES plugin developed in this embodiment, the query term is "nikeAND shoes", and it is indicated that the query term is split using "AND":

[0084]

[0085]

[0086] The execution result is as follows:

[0087]

[0088] The execution results show that this example matched a document from Elasticsearch using the search term "nike AND shoes". The document's goods_name_rank field value is "nike|50.0029426Nike|40.0029426Shoes|5.0029426Vipshop|3.9426", and the corresponding score for this document is 55.005882. Calculation and verification show that 50.0029426 + 5.0029426 = 55.005882, indicating that the query result matches the expected result.

[0089] The accumulated scores are sorted, and the search results corresponding to the search term are recalled sequentially according to the sorting results to obtain the ability to recall ES search results by combining popularity score and text score.

[0090] The aforementioned search retrieval method includes: constructing a search index based on a data warehouse mechanism; segmenting the search term to obtain a word combination; finding the popularity score corresponding to each word in the word combination based on the search index and accumulating the popularity score; sorting the accumulated popularity score using a custom query mechanism; and retrieving the search results corresponding to the search term. This application uses the DelimitedPayloadTokenFilter word segmenter of Elasticsearch and uses an Elasticsearch plugin to implement custom queries. The search retrieval gains the ability to re-score and sort based on the popularity score, which allows the retrieval results of search recommendations to be linked to the popularity score. At the same time, the manually configured global popularity score mentioned in this application can be continuously adjusted manually, thereby continuously improving the retrieval effect and maximizing the empowerment of manual intervention in the retrieval results. This presents users with popular results that users want to see, thereby increasing the click-through rate and conversion rate.

[0091] It should be understood that, although Figure 2-3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2-3 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0092] Example 2

[0093] In one embodiment, such as Figure 4 As shown, a search retrieval device is provided, including: an index building module, a score calculation module, and a search retrieval module, wherein:

[0094] The index building module is used to build search indexes based on data warehouse mechanisms;

[0095] The score calculation module is used to segment the search term into words to obtain word combinations, find the popularity scores corresponding to the words in the word combinations based on the search index, and accumulate the popularity scores.

[0096] The search recall module is used to sort the accumulated popularity scores using a custom query mechanism and recall the search results corresponding to the search term.

[0097] In a preferred embodiment of the present invention, the index construction module is specifically used for:

[0098] Obtain keyword data source;

[0099] The keyword data source is segmented using a word segmenter to obtain multiple segmentation results.

[0100] The popularity score of each word segmentation result is calculated using a popularity score calculation formula, wherein the popularity score calculation formula includes:

[0101] D = S + 8 / (1 × x + 0.6)

[0102] Where D represents the popularity score, S represents the global popularity score, and x represents the location attribute of the keyword data source;

[0103] Each segmented text and its corresponding popularity score are concatenated using preset labels, and multiple concatenated results are split using a space segmenter to generate the first text result;

[0104] The first text result is deduplicated to generate the second text result;

[0105] The second text result is input into a preset document to form the search index.

[0106] In this embodiment of the invention, the index retrieval device further includes an index configuration module, which is specifically used for:

[0107] Configure the index definition of the search index: define the names of the fields in the index, define the data types of the fields, and set the relevant configurations for the inverted indexes of the fields;

[0108] Configure the index settings for the search index.

[0109] In this embodiment of the invention, the index recall device further includes a detection module, which is specifically used for:

[0110] The word segmentation effect of the search index was tested using a custom analyzer;

[0111] If each text and its corresponding location information parsed by the custom analyzer are accurate, the constructed search index is determined to meet the preset standard.

[0112] In a preferred embodiment of the present invention, the fraction calculation module is specifically used for:

[0113] The word to be searched is segmented using a word segmenter;

[0114] Documents matching the word segmentation results are retrieved using the search index;

[0115] The scores of the segmented text in the retrieved documents are summed to obtain the total text score.

[0116] In a preferred embodiment of the present invention, the search and recall module is specifically used for:

[0117] A custom query mechanism written using an index plugin is used to sort the accumulated scores;

[0118] Search results corresponding to the search term will be retrieved sequentially according to the sorting results.

[0119] For specific limitations regarding the search and retrieval device, please refer to the limitations on the search and retrieval method above, which will not be repeated here. Each module in the aforementioned search and retrieval device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0120] Example 3

[0121] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a search and retrieval method. The display screen can be an LCD screen or an e-ink display screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0122] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0123] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0124] Step A: Build a search index based on a data warehouse mechanism;

[0125] Step B: Perform word segmentation on the term to be searched to obtain word segmentation combinations. Based on the search index, find the popularity score corresponding to the word segmentation combination and accumulate the popularity scores.

[0126] Step C: Use a custom query mechanism to sort the accumulated popularity scores and retrieve the search results corresponding to the search term.

[0127] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0128] Obtain keyword data source;

[0129] The keyword data source is segmented using a word segmenter to obtain multiple segmentation results.

[0130] The popularity score of each word segmentation result is calculated using a popularity score calculation formula, wherein the popularity score calculation formula includes:

[0131] D = S + 8 / (1 × x + 0.6)

[0132] Where D represents the popularity score, S represents the global popularity score, and x represents the location attribute of the keyword data source;

[0133] Each segmented text and its corresponding popularity score are concatenated using preset labels, and multiple concatenated results are split using a space segmenter to generate the first text result;

[0134] The first text result is deduplicated to generate the second text result;

[0135] The second text result is input into a preset document to form the search index.

[0136] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0137] Configure the index definition of the search index: define the names of the fields in the index, define the data types of the fields, and set the relevant configurations for the inverted indexes of the fields;

[0138] Configure the index settings for the search index.

[0139] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0140] The word segmentation effect of the search index was tested using a custom analyzer;

[0141] If each text and its corresponding location information parsed by the custom analyzer are accurate, the constructed search index is determined to meet the preset standard.

[0142] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0143] The word to be searched is segmented using a word segmenter;

[0144] Documents matching the word segmentation results are retrieved using the search index;

[0145] The scores of the segmented text in the retrieved documents are summed to obtain the total text score.

[0146] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0147] A custom query mechanism written using an index plugin is used to sort the accumulated scores;

[0148] Search results corresponding to the search term will be retrieved sequentially according to the sorting results.

[0149] Example 4

[0150] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0151] Step A: Build a search index based on a data warehouse mechanism;

[0152] Step B: Perform word segmentation on the term to be searched to obtain word segmentation combinations. Based on the search index, find the popularity score corresponding to the word segmentation combination and accumulate the popularity scores.

[0153] Step C: Use a custom query mechanism to sort the accumulated popularity scores and retrieve the search results corresponding to the search term.

[0154] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0155] Obtain keyword data source;

[0156] The keyword data source is segmented using a word segmenter to obtain multiple segmentation results.

[0157] The popularity score of each word segmentation result is calculated using a popularity score calculation formula, wherein the popularity score calculation formula includes:

[0158] D = S + 8 / (1 × x + 0.6)

[0159] Where D represents the popularity score, S represents the global popularity score, and x represents the location attribute of the keyword data source;

[0160] Each segmented text and its corresponding popularity score are concatenated using preset labels, and multiple concatenated results are split using a space segmenter to generate the first text result;

[0161] The first text result is deduplicated to generate the second text result;

[0162] The second text result is input into a preset document to form the search index.

[0163] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0164] Configure the index definition of the search index: define the names of the fields in the index, define the data types of the fields, and set the relevant configurations for the inverted indexes of the fields;

[0165] Configure the index settings for the search index.

[0166] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0167] The word segmentation effect of the search index was tested using a custom analyzer;

[0168] If each text and its corresponding location information parsed by the custom analyzer are accurate, the constructed search index is determined to meet the preset standard.

[0169] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0170] The word to be searched is segmented using a word segmenter;

[0171] Documents matching the word segmentation results are retrieved using the search index;

[0172] The scores of the segmented text in the retrieved documents are summed to obtain the total text score.

[0173] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0174] A custom query mechanism written using an index plugin is used to sort the accumulated scores;

[0175] Search results corresponding to the search term will be retrieved sequentially according to the sorting results.

[0176] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0177] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0178] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A search recall method, characterized by, The method comprises: building a search index based on a data warehouse mechanism; performing word segmentation on a search word to obtain a word segmentation combination, finding a hotness score corresponding to the word segmentation in the word segmentation combination based on the search index, and accumulating the hotness score; sorting the accumulated hotness score using a custom query mechanism, and recalling a search result corresponding to the search word; the building of the search index based on the data warehouse mechanism comprises: obtaining a keyword data source; performing word segmentation on the keyword data source using a word segmenter to obtain a plurality of word segmentation results; calculating a hotness score of each word segmentation result using a hotness score calculation formula; the hotness score calculation formula comprises: D = S + 8 / (1x+0.6) wherein D represents the hotness score, S represents a global hotness score, and x represents a position attribute of the keyword data source; the position attribute is a keyword source order, and the size of the global hotness score is determined by a record order; splicing each word segmentation text and the corresponding hotness score using a preset label, and segmenting a plurality of splicing results using a space word segmenter to generate a first text result; performing deduplication processing on the first text result to generate a second text result; inputting the second text result into a preset document to form the search index.

2. The search recall method of claim 1, wherein, Before the building of the search index based on the data warehouse mechanism, the method further comprises: configuring index definitions of the search index, defining names of fields in the index, defining data types of the fields, and setting related configurations of the fields for an inverted index; configuring index settings of the search index.

3. The search recall method of claim 1, wherein, After the building of the search index based on the data warehouse mechanism, the method further comprises: testing a word segmentation effect of the search index using a custom analyzer; when each text and the corresponding position information parsed by the custom analyzer are accurate, determining that the built search index meets a preset standard.

4. The search recall method of claim 1, wherein, The performing of the word segmentation on the search word to obtain the word segmentation combination, the finding of the hotness score corresponding to the word segmentation in the word segmentation combination based on the search index, and the accumulation of the hotness score comprise: performing word segmentation on the search word using a word segmenter; retrieving documents matching the word segmentation result through the search index; accumulating scores corresponding to the word segmentation texts in the retrieved documents to obtain accumulated text scores.

5. The search recall method of claim 4, wherein, The sorting of the accumulated scores using the custom query mechanism, and the recalling of the search result corresponding to the search word comprise: sorting the accumulated scores using a custom query mechanism written using an index plug-in mechanism; recalling the search result corresponding to the search word in sequence according to the sorting result.

6. A search recall device for implementing the search recall method according to claim 1, characterized by The apparatus comprises: an index building module configured to build a search index based on a data warehouse mechanism; a score calculation module configured to perform word segmentation on a search word to obtain a word segmentation combination, find a hotness score corresponding to the word segmentation in the word segmentation combination based on the search index, and accumulate the hotness score; a search recalling module configured to sort the accumulated hotness score using a custom query mechanism, and recall a search result corresponding to the search word.

7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Search sorting method and device

    CN111444304A