Search method, device, equipment and storage medium

Through a search method based on semantic vector generation, combined with the BERT semantic similarity model and the Faiss framework, the search and recall effect in the automotive field is optimized, solving the problem of semantic similarity and contextual information between sentences not being considered, and achieving more efficient semantic matching. Effect.

CN113626713BActive Publication Date: 2024-09-10BEIJING QIERBULAITE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110956827.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-19
Publication Date
2024-09-10
Estimated Expiration
2041-08-19

AI Technical Summary

Technical Problem

Existing search methods in the automotive field fail to effectively consider the semantic similarity between sentences and the contextual information within the sentences, resulting in language synonyms and word order structure problems, and the semantic matching effect is not ideal, especially when recalling related documents.

Method used

A search method based on semantic vector generation is used to obtain the user search log list and positive and negative sample data sets, perform word segmentation processing and feature parameter calculation, and combine the BERT semantic similarity model and the Faiss framework to build a vector index library to optimize the recall results.

Benefits of technology

It significantly improves the recall effect, can better represent the semantic depth model, meets the search effect and performance requirements, and solves the problem of unsatisfactory semantic matching effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113626713B
    Figure CN113626713B
Patent Text Reader

Abstract

The present invention discloses a search method, device, computing equipment and storage medium, the method comprising the steps of: obtaining a user search log list, and a first positive sample data set and a first negative sample data set; performing word segmentation processing on search content sub-items and document title sub-items, adding the first positive sample data set and the first negative sample data set to user features, and obtaining a search click rate prediction model; obtaining a second positive sample data set of the user search log list, calculating Jaccard similarity parameters and Cosine similarity parameters, and obtaining a third positive sample data set and a second negative sample data set of the user search log list; loading Google general corpus, and obtaining a BERT semantic similarity model; using the Faiss framework to build a vector index library, and obtaining recalled search results. The present invention can better represent the semantic deep model, greatly improve the recall effect by tuning the semantic similarity model, and build a matching semantic vector recall service to meet the search effect and performance requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of search technology, and in particular to a search method, device, computing equipment and storage medium suitable for generating search results in the field of recalled automobiles based on semantic vectors. Background Art

[0002] With the increasing popularity of the Internet, document search in the automotive field has become a common technical means. Search mainly includes two important components: recalling relevant documents and sorting the recall results according to the user's search content. The most relevant documents are finally returned to the user. The recall effect determines the subsequent sorting effect. In the automotive vertical search field, there are a large number of customer groups at different levels. The search effect directly affects the user's search experience, visits, visitors, click-through rate and other related indicators. In order to improve the search experience and increase user stickiness, it is necessary to continuously optimize the recall and sorting strategies.

[0003] In the prior art, there are two main types of recall strategies. The first type is to recall documents with co-occurring words based on the word segmentation results of the search content through the inverted index; the second type is to recall semantically related documents using the overall semantic information of the search content. These two methods have the following disadvantages: first, they do not consider the semantic similarity between different sentences and the contextual information within the sentence, and cannot solve the problems of synonymy, polysemy and word order structure of the language; second, the effect of semantic matching is not ideal.

[0004] Therefore, a search method is needed that can meet the application requirements in the automotive field and significantly improve the satisfaction of recall results. Summary of the invention

[0005] To this end, the present invention provides a search method, apparatus, computing device and storage medium to try to solve or at least alleviate at least one of the above problems.

[0006] According to one aspect of the present invention, a search method is provided, which is suitable for recalling automobile search results based on semantic vector generation. The method comprises the steps of: obtaining a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list, wherein the user search log list comprises a user address sub-item, a search content sub-item and a document title sub-item; performing word segmentation processing on the search content sub-item and the document title sub-item according to the user search log list, the first positive sample data set and the first negative sample data set, obtaining a word frequency parameter, an inverse text frequency parameter, a word frequency and inverse text product parameter, a Jaccard similarity parameter, and a Cosine similarity parameter, and segmenting the first positive sample data set and the first negative sample data set. User features are added to the sample data set to obtain a search click rate prediction model; based on the search click rate prediction model, a second positive sample data set of the user search log list is obtained, and based on the first positive sample data set and the second positive sample data set, Jaccard similarity parameters and Cosine similarity parameters are calculated to obtain the third positive sample data set and the second negative sample data set of the user search log list; based on the first negative sample data set and the third positive sample data set, Google general corpus is loaded, the maximum text sequence length, learning rate and training round parameters are set, and the BERT semantic similarity model is obtained; based on the BERT semantic similarity model, a vector index library is built using the Faiss framework to obtain recalled search results.

[0007] Optionally, the steps of obtaining a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list include: obtaining a user search log list, the user search log list including a user address sub-item, a search content sub-item and a document title sub-item; based on the user search log list, dividing the user search log list into a first user search log list, a second user search log list and a third user search log list, the first user search log list being used to record the display results of the user address sub-item and the search content sub-item and the corresponding documents, the second user search log list being used to record the click results of the user address sub-item and the search content sub-item and the corresponding documents, and the third user search log list being used to record the display results of the user address sub-item and the search content sub-item and the corresponding documents. Record user information; aggregate the search content sub-items based on the first user search log list, the second user search log list, and the third user search log list to obtain the document click-through rate corresponding to a certain search content sub-item within a set time interval; set a document click-through rate threshold based on the document click-through rate; when the document click-through rate corresponding to a certain search content sub-item exceeds the document click-through rate threshold, obtain a first positive sample data set, the first positive sample data set includes the document title sub-item and the document corresponding to the search content sub-item; when the document click-through rate corresponding to a certain search content sub-item does not exceed the document click-through rate threshold, obtain a first negative sample data set, the first negative sample data set includes the document title sub-item and the document corresponding to the search content sub-item.

[0008] Optionally, based on the user search log list, the first positive sample data set and the first negative sample data set, the search content sub-items and the document title sub-items are segmented to obtain word frequency parameters, inverse text frequency parameters, word frequency and inverse text product parameters, Jaccard similarity parameters, and Cosine similarity parameters. The steps include: performing word segmentation on the search content sub-items and the document title sub-items to obtain the segmentation words of the search content sub-items, the document title sub-items, and the sum of the search content sub-items segmentation words and the document title sub-items segmentation words; calculating the number of segmentation words in the first positive sample data set and the first negative sample data set, and dividing the number of segmentation words in the first positive sample data set and the first negative sample data set by the segmentation words in the first positive sample data set and the first negative sample data set. Total number, obtain the word frequency parameter; calculate the total number of documents in the user search log list, divide it by the number of documents where the segmentation words appear, and obtain the inverse text frequency parameter; calculate the product of the word frequency parameter and the inverse text frequency parameter, and obtain the word frequency and inverse text product parameter; calculate the intersection of the search content sub-item segmentation and the document title sub-item segmentation, divide it by the union of the search content sub-item segmentation and the document title sub-item segmentation, and obtain the Jaccard similarity parameter; vectorize the search content sub-item segmentation and the document title sub-item segmentation through the word frequency and inverse text product parameter, calculate the Cosine distance of the text vectors of the search content sub-item segmentation and the document title sub-item segmentation, and obtain the Cosine similarity parameter.

[0009] Optionally, the step of adding the first positive sample data set and the first negative sample data set to user features to obtain a search click rate prediction model includes: adding the first positive sample data set and the first negative sample data set to user features to obtain deep model training data; performing deep model training based on the deep model data to obtain a search click rate prediction model.

[0010] Optionally, the step of obtaining a second positive sample data set of the user search log list based on the search click rate prediction model includes: predicting the click rate of documents in the user search log list based on the search click rate prediction model, and obtaining the click rate of each document; setting a document click rate threshold, and when the click rate of a document in the user search log list is greater than the set document click rate threshold, obtaining the second positive sample data set of the user search log list.

[0011] Optionally, the steps of calculating Jaccard similarity parameters and Cosine similarity parameters based on the first positive sample data set and the second positive sample data set, and obtaining a third positive sample data set and a second negative sample data set of the user search log list include: obtaining deduplicated data of the first positive sample data set and the second positive sample data set; calculating Jaccard similarity parameters and Cosine similarity parameters of the search content sub-items and document title sub-items in the deduplicated data; setting a similarity threshold, and when the Jaccard similarity parameters and Cosine similarity parameters of the search content sub-items and the document title sub-items are both greater than the similarity threshold, obtaining the third positive sample data set of the user search log list; and when the Jaccard similarity parameters and Cosine similarity parameters of the search content sub-items and the document title sub-items are not greater than the similarity threshold, obtaining the second negative sample data set of the user search log list.

[0012] Optionally, the step of using the Faiss framework to build a vector index library includes: using the Faiss framework to build a keyword-based inverted index of all resources and a vector index based on semantic vectors.

[0013] According to another aspect of the present invention, a search device is disclosed, which is suitable for recalling automobile field search results based on semantic vector generation, and the device includes:

[0014] A data acquisition module, used to acquire a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list, wherein the user search log list includes a user address sub-item, a search content sub-item, and a document title sub-item;

[0015] The model generation module is used to perform word segmentation processing on the search content sub-items and the document title sub-items according to the user search log list, the first positive sample data set and the first negative sample data set, obtain the word frequency parameter, the inverse text frequency parameter, the word frequency and inverse text product parameter, the Jaccard similarity parameter, and the Cosine similarity parameter, add the first positive sample data set and the first negative sample data set to the user features, and obtain the search click rate prediction model; according to the search click rate prediction model, obtain the second positive sample data set of the user search log list, calculate the Jaccard similarity parameter and the Cosine similarity parameter according to the first positive sample data set and the second positive sample data set, and obtain the third positive sample data set and the second negative sample data set of the user search log list; according to the first negative sample data set and the third positive sample data set, load the Google general corpus, set the maximum text sequence length, learning rate and training round parameters, and obtain the BERT semantic similarity model;

[0016] The recall result module is used to build a vector index library based on the BERT semantic similarity model using the Faiss framework to obtain the recalled search results.

[0017] According to another aspect of the present invention, a computing device is provided, comprising: one or more processors; and a memory; one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the search methods described above.

[0018] According to another aspect of the present invention, a computer-readable storage medium storing one or more programs is provided. The one or more programs include instructions, which, when executed by a computing device, enable the computing device to perform any of the above-mentioned search methods.

[0019] According to the search scheme of the present invention, a user search log list and a first positive sample data set and a first negative sample data set in the user search log list are obtained; search content sub-items and document title sub-items are segmented to obtain word frequency parameters, inverse text frequency parameters, word frequency and inverse text product parameters, Jaccard similarity parameters, and Cosine similarity parameters; the first positive sample data set and the first negative sample data set are added to user features to obtain a search click-through rate prediction model; based on the search click-through rate prediction model, a second positive sample data set in the user search log list is obtained; based on the first positive sample data set and the second positive sample data set, Jaccard similarity parameters and Cosine similarity parameters are calculated to obtain a third positive sample data set and a second negative sample data set in the user search log list; based on the first negative sample data set and the third positive sample data set, Google general corpus is loaded, the longest text sequence length, learning rate and training round parameters are set, and a BERT semantic similarity model is obtained; based on the BERT semantic similarity model, a vector index library is constructed using a Faiss framework to obtain recalled search results. The present invention can better represent the semantic deep model, greatly improve the recall effect by tuning the semantic similarity model, and build a suitable semantic vector recall service to meet the search effect and performance requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.

[0021] Figure 1 A schematic diagram showing the structure of a computing device 100 according to an embodiment of the present invention is shown;

[0022] Figure 2 A flowchart of a search method 200 according to an embodiment of the present invention is shown; and

[0023] Figure 3 A schematic structural diagram of a search device 300 according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

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

[0025] Figure 1 1 is a block diagram of an example computing device 100. In a basic configuration 102, computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between processor 104 and system memory 106.

[0026] Depending on the desired configuration, the processor 104 can be any type of processor, including but not limited to: a microprocessor (μP), a microcontroller (μC), a digital information processor (DSP), or any combination thereof. The processor 104 can include one or more levels of cache such as a first-level cache 110 and a second-level cache 112, a processor core 114, and registers 116. An example processor core 114 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 118 can be used with the processor 104, or in some implementations, the memory controller 118 can be an internal part of the processor 104.

[0027] Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, application 122 may be arranged to operate on the operating system using program data 124. In some embodiments, the computing device 100 is configured to execute a search method 200, which can ensure that the automobile information knowledge graph can be integrated into the subsequent text generation process as effective external knowledge according to the automobile information knowledge graph, perform graph convolution operations on the constructed knowledge graph, extract the global knowledge representation of the knowledge graph, participate in the decoding operation of the subsequent decoder, and serve as a hidden variable to guide the decoding calculation process, so as to achieve the purpose of controlling the logical relationship between sentences. At the same time, the reasoning ability of the graph neural network is brought into play to ensure the factual correctness of the generated article. The calculation results of the graph neural network are integrated during decoding to complete sentence-level decoding and word-level decoding, so that the generated automobile information content has clear logic in the chapter structure, the words used in the sentences are appropriate, and the expression content is rich in details. The program data 124 includes instructions for executing the method 200.

[0028] The computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. Example communication devices 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via a network communication link via one or more communication ports 164.

[0029] A network communication link can be an example of a communication medium. The communication medium can generally be embodied as a computer-readable instruction, data structure, program module in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be such a signal, one or more of which or its changes in a data set can be carried out in a manner that encodes information in the signal. As a non-limiting example, the communication medium can include a wired medium such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium used here can include both storage media and communication media. In some embodiments, one or more programs are stored in a computer-readable medium, and the one or more programs include instructions for executing certain methods, such as according to an embodiment of the present invention, the computing device 100 executes the search method 200 through the instructions.

[0030] The computing device 100 may be implemented as part of a small-sized portable (or mobile) computing device, such as a cellular phone, a personal digital assistant (PDA), a personal media player device, a wireless network browsing device, a personal head-mounted device, an application-specific device, or a hybrid device that may include any of the above functions. The computing device 100 may also be implemented as a personal computer including desktop and notebook computer configurations.

[0031] In the prior art, the search methods mainly include: First, based on the matching of co-occurring words, first, according to the large-scale corpus, sort out the relevant stop word list, use the word segmentation tool to segment the text title and content in the corpus to obtain the word segmentation, filter out the stop words, and build an inverted index with the word segmentation as the key and the document id as the value. When recalling from the user side, use the same word segmentation tool to segment the user's search content, recall relevant results from the inverted index according to each word segmentation, and obtain the final result by finding the intersection of the recall results of each word segmentation. Word segmentation can be done by using the jieba tool loaded with vertical domain dictionaries, a general bigram model, a maximum word matching algorithm, and other methods. The disadvantage of this method is that it does not consider the semantic similarity between different sentences and the contextual information within the sentence, and cannot solve the problems of synonymy, polysemy, and word order structure of the language. In practical applications, the matching method based on the vocabulary level still has great limitations, which are mainly reflected in three aspects. On the one hand, there is the problem of synonymy and polysemy of the language. Multiple different words represent the same semantics. For example, "how much", "selling price" and "guide price" all mean "price". The same word has different meanings in different contexts. For example, "discover" means both a verb and a luxury large SUV under Land Rover. On the other hand, there is the problem of word order structure. Using the same vocabulary to construct sentences with different word orders can express different semantics, or even completely opposite ones. For example, "BMW X3 is more cost-effective than Audi A4L" and "Audi A4L is more cost-effective than BMW X3" express completely opposite semantics. Finally, the word segments of the two texts cannot meet the condition of co-occurrence, resulting in failure to recall, but the semantic similarity is very high, for example, "What are the various instrument symbols of a car?" and "A complete list of car instrument symbols", "Solve the problem of loud closing noises of car doors" and "The closing noises of car doors are loud, is there any way to solve it?". The second is matching based on the semantic level, such as word2vec, SimNet, DSSM and other methods. This matching method mainly includes two steps: semantic representation and similarity calculation: word2vec is a method of word embedding, which converts vocabulary into numerical vectors. First, the sentences in the corpus are segmented to obtain the word vectors, and the word vectors of each word segmentation are obtained. In the word vector dimension direction, the word vectors of all word segments are maximized to finally obtain the semantic vector of the entire sentence; SimNet and DSSM are both supervised end-to-end deep semantic matching models, that is, the search content and documents learn semantic representations and finally merge and match them. Both use implicit continuous vectors to represent semantics, and both can abstract the three-layer structure of input layer, representation layer and matching layer. The SimNet representation layer mainly includes network structures such as BOW, CNN, and RNN. DSSM extends CNN-DSSM and LSTM-DSSM according to the representation layer structure, such as Figure 1. By analyzing the search log to obtain exposure and click data, a weakly labeled data set is made, and the search content and article title are converted into vector form through the representation layer, and the cosine distance of the semantic vector is used to train the model; the disadvantage of this method is that the effect of semantic matching is not ideal, especially the semantic recall of long-tail search content and short search content. Word2Vec, as an unsupervised word vector generation method, mainly includes CBOW and Skip-Gram methods. In the automotive vertical field, sentences appearing in the same level of car series have similar patterns and are semantically close, such as BMW 5 Series and Mercedes-Benz E-Class; deep semantic matching models, from BOW to CNN and then to RNN, are gradually improved to consider context information. The BOW model does not consider word order and context-related information, and the effect is poor; CNN uses convolutional layers to obtain local context information and pooling layers to obtain global context information, but it cannot consider the relationship between words with long position intervals, and the effect is limited; RNN is mainly based on the LSTM network structure to solve the problem of long text dependency, but often requires a large number of manually labeled samples for training to achieve better results in applications, which is currently difficult to meet.

[0032] Figure 2 FIG. 2 is a flow chart of a search method 200 according to an embodiment of the present invention. Figure 2 As shown, the method 200 is suitable for recalling automobile field search results based on semantic vector generation. The method 200 starts at step S210, obtaining a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list. The user search log list includes a user address sub-item, a search content sub-item, and a document title sub-item.

[0033] Specifically, since the search log list includes all documents searched by the user, the user address sub-item included in the user search log list includes the user's address information; the user search content sub-item includes all words or sentences used for search; the document title sub-item includes the title content of all articles displayed after the search, the first positive sample data set includes all documents in the user search log list whose click-through rate exceeds a certain threshold, and the first negative sample data set is the documents whose click-through rate is lower than this threshold. The first positive sample data set and the first negative sample data set can be used to filter out which documents have been clicked and which have not been clicked. A high click-through rate means that the document has more useful information and is browsed by more users, and a low click-through rate means that the document has less useful information or is browsed by fewer users.

[0034] Specifically, according to an embodiment of the present invention, the step of obtaining a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list includes:

[0035] Acquire a user search log list, wherein the user search log list includes a user address sub-item, a search content sub-item, and a document title sub-item;

[0036] According to the user search log list, the user search log list is divided into a first user search log list, a second user search log list, and a third user search log list, wherein the first user search log list is used to record the display results of the user address sub-item and the search content sub-item and the corresponding documents, the second user search log list is used to record the click results of the user address sub-item and the search content sub-item and the corresponding documents, and the third user search log list is used to record user information, including gender, age, preferred brand, manufacturer, car series, car model, etc.;

[0037] According to the first user search log list, the second user search log list, and the third user search log list, the search content sub-items are aggregated to obtain the document click rate corresponding to a certain search content sub-item within a set time interval; specifically, by associating the first user search log list and the second user search log list, it is possible to obtain which documents are displayed and clicked under a certain search content sub-item, and which documents are displayed but not clicked, and then by associating the third user search log list, the relevant information of the search user can be obtained. By aggregating the first user search log list, the second user search log list, and the third user search log list with the search content sub-items as units, the document click rate can be mined when a certain search content sub-item is used for retrieval within a set time period. The document click rate is the number of clicks on the document divided by the number of times it is retrieved.

[0038] According to the document click rate, a document click rate threshold is set; specifically, the document click rate threshold is a reference value for judging the probability of a document being clicked, that is, if the document click rate is greater than the document click rate threshold, it means that the probability of the document being clicked is relatively high, otherwise, the probability of being clicked is relatively low;

[0039] When the click-through rate of a document corresponding to a certain search content sub-item exceeds the document click-through rate threshold, obtaining a first positive sample data set, wherein the first positive sample data set includes a document title sub-item and a document corresponding to the search content sub-item;

[0040] When the click-through rate of a document corresponding to a certain search content sub-item does not exceed the document click-through rate threshold, a first negative sample data set is obtained, where the first negative sample data set includes a document title sub-item and a document corresponding to the search content sub-item.

[0041] Through step S220, according to the user search log list, the first positive sample data set and the first negative sample data set, the search content sub-items and the document title sub-items are tokenized to obtain word frequency parameters, inverse document frequency parameters, word frequency-inverse document frequency product parameters, Jaccard similarity parameters, and Cosine similarity parameters. The first positive sample data set and the first negative sample data set are added to the user features to obtain a search click-through rate prediction model.

[0042] Specifically, through the above steps, sample filtering is achieved. For example, due to misclicks and the semantic similarity between the clicked search content sub-items and the document title sub-items being low because some of the retrieved document resources do not match the title, literal matching similarities are calculated using Jaccard similarity parameters, Cosine similarity parameters, etc., and thresholds are set to filter the data in the user search log list of the clicked search content sub-items. Then, through sample augmentation, the click-through rates in the user search log list are sorted out as samples. By training a deep model to predict the document click-through rate for the search content sub-items and the document title sub-items, the sample size of the deep model is further augmented, thereby minimizing the impact of the click sparsity problem.

[0043] Specifically, according to the embodiment of the present invention, the steps of tokenizing the search content sub-items and the document title sub-items according to the user search log list, the first positive sample data set, and the first negative sample data set to obtain word frequency parameters, inverse document frequency parameters, word frequency-inverse document frequency product parameters, Jaccard similarity parameters, and Cosine similarity parameters include:

[0044] Tokenize the search content sub-items and the document title sub-items to obtain the search content sub-item tokens, the document title sub-item tokens, and the combined tokens of the search content sub-item tokens and the document title sub-item tokens; specifically, tokenization is to divide a sentence into multiple independent words. For example, for the sentence "Solve the problem of loud door closing sound", after removing the stop word "of", the tokens are "Solve, door, closing, sound, loud, problem".

[0045] Calculate the number of times the tokens appear in the first positive sample data set and the first negative sample data set, and divide it by the total number of tokens in the first positive sample data set and the first negative sample data set to obtain the word frequency parameters;

[0046] Calculate the total number of documents in the user search log list and divide it by the number of documents in which the tokens appear to obtain the inverse document frequency parameters;

[0047] Calculate the product of the word frequency parameters and the inverse document frequency parameters to obtain the word frequency-inverse document frequency product parameters;

[0048] Calculate the intersection of the sub-tokenized search content and the sub-tokenized document title, divide it by the union of the sub-tokenized search content and the sub-tokenized document title, and obtain the Jaccard similarity parameter. Specifically, the calculation formula for the Jaccard similarity parameter is:

[0049]

[0050] In the formula, A represents the sub-tokenized search content, B represents the sub-tokenized document title, J(A, B) represents the Jaccard similarity parameter, A ∩ B represents the intersection of the sub-tokenized search content and the sub-tokenized document title, and A ∪ B represents the union of the sub-tokenized search content and the sub-tokenized document title.

[0051] Vectorize the sub-tokenized search content and the sub-tokenized document title through the term frequency and inverse text product parameter, calculate the Cosine distance between the text vectors of the sub-tokenized search content and the sub-tokenized document title, and obtain the Cosine similarity parameter. Specifically, in a specific embodiment, for example: the sub-item of the search content is "Solve the problem of loud door closing sound", and after removing the stop word "of", it is tokenized as [Solve, door, close, sound, loud, problem]; the sub-item of the document title is "The door closing sound is loud, is there a way?", and after removing the stop word "right", it is tokenized as [door, close, sound, loud, have, way]; calculate the term frequency and inverse text product parameter value corresponding to each token through the term frequency and inverse text product parameter, and obtain the sub-item of the search content = [0.1, 0.3, 0.1, 0.4, 0.2, 0.3], and the sub-item of the document title = [0.3, 0.1, 0.1, 0.2, 0.3, 0.1], which are the text vectors of the sub-tokenized search content and the sub-tokenized document title. The formula for calculating the Cosine distance between the text vectors of the sub-tokenized search content and the sub-tokenized document title is:

[0052]

[0053] In the formula, x represents the text vector of the sub-tokenized search content, y represents the text vector of the sub-tokenized document title, and i represents the i-th value in the text vector.

[0054] Specifically, according to the implementation manner of the present invention, the step of adding the first positive sample data set and the first negative sample data set to the user features to obtain the search click-through rate prediction model includes:

[0055] The first positive sample data set and the first negative sample data set are added to user features to obtain deep model training data; specifically, the user features include: word frequency parameter, inverse text frequency parameter, word frequency and inverse text product parameter, Jaccard similarity parameter, Cosine similarity parameter, user gender, user age, whether the preferred manufacturer is in the search content sub-item, whether the preferred brand is in the search content sub-item, whether the preferred car series is in the search content sub-item, whether the preferred car model is in the search content sub-item, whether the preferred manufacturer is in the document title sub-item, whether the preferred brand is in the document title sub-item, whether the preferred car series is in the document title sub-item, and whether the preferred car model is in the document title sub-item.

[0056] According to the deep model data, deep model training is performed to obtain a search click rate prediction model. Specifically, in an embodiment of the present application, the deep model is a deep model DeepFM, and the search click rate prediction model is obtained by training the deep model DeepFM.

[0057] Through step S230, based on the search click rate prediction model, a second positive sample data set of the user search log list is obtained, and based on the first positive sample data set and the second positive sample data set, the Jaccard similarity parameter and the Cosine similarity parameter are calculated to obtain a third positive sample data set and a second negative sample data set of the user search log list.

[0058] Specifically, according to an embodiment of the present invention, the step of obtaining a second positive sample data set of a user search log list according to the search click rate prediction model includes:

[0059] According to the search click rate prediction model, the click rate of the documents in the user search log list is predicted to obtain the click rate of each document;

[0060] A document click rate threshold is set, and when the click rate of a document in the user search log list is greater than the set document click rate threshold, a second positive sample data set of the user search log list is obtained. Through the second positive sample data set, documents with fewer clicks can be removed to obtain documents with more clicks.

[0061] Specifically, according to an embodiment of the present invention, the step of calculating the Jaccard similarity parameter and the Cosine similarity parameter based on the first positive sample data set and the second positive sample data set to obtain a third positive sample data set and a second negative sample data set of the user search log list includes:

[0062] Obtain deduplicated data of the first positive sample data set and the second positive sample data set; specifically, since the first positive sample data set is obtained by performing click-through rate statistics on the documents in the user search log list, and the second positive sample data set is obtained by predicting the documents in the user search log list using the search click-through rate prediction model, some data is repeated in the first positive sample data set and the second positive sample data set. Therefore, it is necessary to deduplicate the repeated data in the first positive sample data set and the second positive sample data set based on {search content sub-item, document title sub-item}, and retain the sample data with the highest estimated search click-through rate.

[0063] Calculating Jaccard similarity parameters and Cosine similarity parameters of the search content sub-item and the document title sub-item in the deduplicated data;

[0064] A similarity threshold is set. When the Jaccard similarity parameter and the Cosine similarity parameter of the search content sub-item and the document title sub-item are both greater than the similarity threshold, a third positive sample data set of the user search log list is obtained. When the Jaccard similarity parameter and the Cosine similarity parameter of the search content sub-item and the document title sub-item are not greater than the similarity threshold, a second negative sample data set of the user search log list is obtained.

[0065] Through step S240, based on the first negative sample data set and the third positive sample data set, the Google general corpus is loaded, the maximum text sequence length, the learning rate and the training round parameters are set, and the BERT semantic similarity model is obtained. Using the context information of the document and the BERT network structure to train the semantic similarity model, it can effectively distinguish whether two sentences are semantically similar.

[0066] Specifically, each input of the BERT semantic similarity model is obtained by adding its corresponding word features, fragment features, and position features. The BERT semantic similarity model is a deep bidirectional semantic representation model based on the Transformer network structure. Transformer is a bidirectional deep model based on the self-attention mechanism, which can make full use of the contextual information in the text. The left half is the encoding part and the right half is the decoding part. The network structure of each basic unit includes: multi-head attention mechanism, sum normalization, feedforward neural network, sum normalization, a total of 4 steps. The Token encoding dimension of the BERT semantic similarity model is 384, the total number of layers of Transformer is 12, the number of heads of the self-attention mechanism is 12, and the hidden layer dimension of FeedForward is 1536.

[0067] Specifically, in the embodiments of the present application, the longest text sequence length is 100, the learning rate is 0.000002, and the learning rate parameters can be adjusted according to the convergence speed and effect. The training round parameter is 50, and each round means that all the data in the training set are trained once through the network structure and participate in the gradient update of the model.

[0068] Through step S250, based on the BERT semantic similarity model, a vector index library is constructed using the Faiss framework to obtain the recalled search results.

[0069] Specifically, according to an embodiment of the present invention, the step of using the Faiss framework to construct a vector index library includes: using the Faiss framework to construct a keyword-based inverted index of all resources and a vector index based on semantic vectors.

[0070] Specifically, Faiss is an open source framework developed by Facebook AI that provides efficient similarity search and clustering for vectors. It has multiple retrieval methods: indexFlat, which is a brute force search. The most accurate query retrieval speed is very slow and is generally used as a baseline; indexLVFFlat, which uses K-Means clustering and then combines inverted indexes in certain cluster centers to perform retrieval, taking into account both performance and results; indexIVFPQ, which compresses vectors when storing them for approximate retrieval.

[0071] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed 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 part of the sub-steps or stages of other steps.

[0072] In one embodiment, Figure 3 As shown, a search device 300 is provided, and the device 300 includes: a data acquisition module, a model generation module, and a recall result module.

[0073] A data acquisition module, used to acquire a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list, wherein the user search log list includes a user address sub-item, a search content sub-item, and a document title sub-item;

[0074] A model generation module is used to perform word segmentation processing on the search content sub-items and document title sub-items according to the user search log list, the first positive sample data set and the first negative sample data set, obtain word frequency parameters, inverse text frequency parameters, word frequency and inverse text product parameters, Jaccard similarity parameters, and Cosine similarity parameters, add the first positive sample data set and the first negative sample data set to user features, and obtain a search click-through rate prediction model; obtain a second positive sample data set of the user search log list according to the search click-through rate prediction model, calculate Jaccard similarity parameters and Cosine similarity parameters according to the first positive sample data set and the second positive sample data set, and obtain a third positive sample data set and a second negative sample data set of the user search log list; load Google general corpus according to the first negative sample data set and the third positive sample data set, set the longest text sequence length, learning rate and training round parameters, and obtain a BERT semantic similarity model;

[0075] The recall result module is used to build a vector index library based on the BERT semantic similarity model using the Faiss framework to obtain the recalled search results.

[0076] Specifically, in another embodiment of the present application, the data acquisition module is used to obtain a user search log list, the user search log list includes a user address sub-item, a search content sub-item and a document title sub-item; based on the user search log list, the user search log list is divided into a first user search log list, a second user search log list and a third user search log list, the first user search log list is used to record the display results of the user address sub-item and the search content sub-item and the corresponding documents, the second user search log list is used to record the click results of the user address sub-item and the search content sub-item and the corresponding documents, and the third user search log list is used to record user information; based on the The first user search log list, the second user search log list, and the third user search log list are aggregated with the search content sub-items to obtain a document click-through rate corresponding to a certain search content sub-item within a set time interval; a document click-through rate threshold is set according to the document click-through rate; when the document click-through rate corresponding to a certain search content sub-item exceeds the document click-through rate threshold, a first positive sample data set is obtained, and the first positive sample data set includes the document title sub-item and the document corresponding to the search content sub-item; when the document click-through rate corresponding to a certain search content sub-item does not exceed the document click-through rate threshold, a first negative sample data set is obtained, and the first negative sample data set includes the document title sub-item and the document corresponding to the search content sub-item.

[0077] Specifically, in another embodiment of the present application, the model generation module is used to perform word segmentation processing on the search content sub-items and the document title sub-items, and obtain the word segmentation terms of the search content sub-item segmentation, the document title sub-item segmentation, and the sum of the search content sub-item segmentation and the document title sub-item segmentation; calculate the number of times the word segmentation term appears in the first positive sample data set and the first negative sample data set, and divide it by the total number of word segments in the first positive sample data set and the first negative sample data set to obtain a word frequency parameter; calculate the total number of documents in the user search log list, and divide it by the number of documents in which the word segmentation term appears. Obtain an inverse text frequency parameter; calculate the product of the word frequency parameter and the inverse text frequency parameter to obtain a word frequency and inverse text product parameter; calculate the intersection of the search content sub-item segmentation and the document title sub-item segmentation, and divide it by the union of the search content sub-item segmentation and the document title sub-item segmentation to obtain a Jaccard similarity parameter; vectorize the search content sub-item segmentation and the document title sub-item segmentation through the word frequency and inverse text product parameter, calculate the Cosine distance of the text vectors of the search content sub-item segmentation and the document title sub-item segmentation, and obtain a Cosine similarity parameter.

[0078] Specifically, in another embodiment of the present application, the model generation module is used to add the first positive sample data set and the first negative sample data set to user features to obtain deep model training data; based on the deep model data, perform deep model training to obtain a search click-through rate prediction model.

[0079] Specifically, in another embodiment of the present application, the model generation module is used to predict the click rate of the documents in the user search log list based on the search click rate prediction model, and obtain the click rate of each document; set a document click rate threshold, and when the click rate of the documents in the user search log list is greater than the set document click rate threshold, obtain a second positive sample data set of the user search log list.

[0080] Specifically, in another embodiment of the present application, the model generation module is used to obtain deduplicated data of the first positive sample data set and the second positive sample data set; calculate the Jaccard similarity parameters and Cosine similarity parameters of the search content sub-items and document title sub-items in the deduplicated data; set a similarity threshold, and when the Jaccard similarity parameters and Cosine similarity parameters of the search content sub-items and the document title sub-items are both greater than the similarity threshold, obtain a third positive sample data set of the user search log list; when the Jaccard similarity parameters and Cosine similarity parameters of the search content sub-items and the document title sub-items are not greater than the similarity threshold, obtain a second negative sample data set of the user search log list.

[0081] Specifically, in another embodiment of the present application, the recall result module is used to construct a keyword-based inverted index of all resources and a vector index based on semantic vectors using the Faiss framework.

[0082] It should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0083] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.

[0084] 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 they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, 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.

[0085] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0086] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.

[0087] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.

[0088] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and didactic purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.

Claims

1. A search method, which is suitable for recalling automobile field search results based on semantic vector generation, and the method comprises the steps of: Acquire a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list, wherein the user search log list includes a user address sub-item, a search content sub-item, and a document title sub-item; According to the user search log list, the first positive sample data set and the first negative sample data set, the search content sub-item and the document title sub-item are segmented to obtain a word frequency parameter, an inverse text frequency parameter, a word frequency and inverse text product parameter, a Jaccard similarity parameter, and a Cosine similarity parameter, and the first positive sample data set and the first negative sample data set are added to user features to obtain a search click rate prediction model; According to the search click rate prediction model, a second positive sample data set of the user search log list is obtained, and according to the first positive sample data set and the second positive sample data set, a Jaccard similarity parameter and a Cosine similarity parameter are calculated to obtain a third positive sample data set and a second negative sample data set of the user search log list; Based on the first negative sample data set and the third positive sample data set, load the Google general corpus, set the maximum text sequence length, learning rate and training round parameters, and obtain the BERT semantic similarity model; Based on the BERT semantic similarity model, the Faiss framework is used to build a vector index library to obtain the recalled search results.

2. The method of claim 1, wherein: The step of obtaining a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list comprises: Acquire a user search log list, wherein the user search log list includes a user address sub-item, a search content sub-item, and a document title sub-item; According to the user search log list, the user search log list is divided into a first user search log list, a second user search log list, and a third user search log list, wherein the first user search log list is used to record the display results of the user address sub-item and the search content sub-item and the corresponding documents, the second user search log list is used to record the click results of the user address sub-item and the search content sub-item and the corresponding documents, and the third user search log list is used to record user information; According to the first user search log list, the second user search log list, and the third user search log list, the search content sub-items are aggregated to obtain a document click rate corresponding to a certain search content sub-item within a set time interval; According to the document click rate, setting a document click rate threshold; When the click-through rate of a document corresponding to a certain search content sub-item exceeds the document click-through rate threshold, obtaining a first positive sample data set, wherein the first positive sample data set includes a document title sub-item and a document corresponding to the search content sub-item; When the click-through rate of a document corresponding to a certain search content sub-item does not exceed the document click-through rate threshold, a first negative sample data set is obtained, where the first negative sample data set includes a document title sub-item and a document corresponding to the search content sub-item.

3. The method of claim 1, wherein: The step of performing word segmentation processing on the search content sub-item and the document title sub-item based on the user search log list, the first positive sample data set and the first negative sample data set, and obtaining a word frequency parameter, an inverse text frequency parameter, a word frequency and inverse text product parameter, a Jaccard similarity parameter, and a Cosine similarity parameter comprises: Performing word segmentation processing on the search content sub-item and the document title sub-item to obtain the word segmentation terms of the search content sub-item, the document title sub-item, and the sum of the search content sub-item word segmentation and the document title sub-item word segmentation; Calculate the number of times the segmented word appears in the first positive sample data set and the first negative sample data set, and divide the result by the total number of segmented words in the first positive sample data set and the first negative sample data set to obtain a word frequency parameter; Calculate the total number of documents in the user search log list, divide it by the number of documents in which the segmented words appear, and obtain an inverse text frequency parameter; Calculate the product of the word frequency parameter and the inverse text frequency parameter to obtain a word frequency and inverse text product parameter; Calculate the intersection of the search content sub-item segmentation and the document title sub-item segmentation, and divide the result by the union of the search content sub-item segmentation and the document title sub-item segmentation to obtain a Jaccard similarity parameter; The search content sub-item segmentation and the document title sub-item segmentation are vectorized by using the word frequency and inverse text product parameter, and the Cosine distance between the text vectors of the search content sub-item segmentation and the document title sub-item segmentation is calculated to obtain the Cosine similarity parameter.

4. The method of claim 1, wherein: The step of adding the first positive sample data set and the first negative sample data set to user features to obtain a search click rate prediction model includes: Adding the first positive sample data set and the first negative sample data set to user features to obtain deep model training data; Based on the deep model training data, deep model training is performed to obtain a search click rate prediction model.

5. The method of claim 1, wherein: The step of obtaining a second positive sample data set of the user search log list according to the search click rate prediction model comprises: According to the search click rate prediction model, the click rate of the documents in the user search log list is predicted to obtain the click rate of each document; A document click rate threshold is set, and when the click rate of a document in the user search log list is greater than the set document click rate threshold, a second positive sample data set of the user search log list is obtained.

6. The method of claim 1, wherein: The step of calculating the Jaccard similarity parameter and the Cosine similarity parameter based on the first positive sample data set and the second positive sample data set to obtain the third positive sample data set and the second negative sample data set of the user search log list includes: Obtaining deduplicated data of the first positive sample data set and the second positive sample data set; Calculating Jaccard similarity parameters and Cosine similarity parameters of the search content sub-item and the document title sub-item in the deduplicated data; A similarity threshold is set. When the Jaccard similarity parameter and the Cosine similarity parameter of the search content sub-item and the document title sub-item are both greater than the similarity threshold, a third positive sample data set of the user search log list is obtained. When the Jaccard similarity parameter and the Cosine similarity parameter of the search content sub-item and the document title sub-item are not greater than the similarity threshold, a second negative sample data set of the user search log list is obtained.

7. The method of claim 1, wherein: The steps of using the Faiss framework to build a vector index library include: Use the Faiss framework to build a keyword-based inverted index for all resources and a vector index based on semantic vectors.

8. A search device, the device being suitable for recalling automobile field search results based on semantic vector generation, the device comprising: A data acquisition module, used to acquire a user search log list, and a first positive sample data set and a first negative sample data set in the user search log list, wherein the user search log list includes a user address sub-item, a search content sub-item, and a document title sub-item; A model generation module is used to perform word segmentation processing on the search content sub-items and document title sub-items according to the user search log list, the first positive sample data set and the first negative sample data set, obtain word frequency parameters, inverse text frequency parameters, word frequency and inverse text product parameters, Jaccard similarity parameters, and Cosine similarity parameters, add the first positive sample data set and the first negative sample data set to user features, and obtain a search click-through rate prediction model; obtain a second positive sample data set of the user search log list according to the search click-through rate prediction model, calculate Jaccard similarity parameters and Cosine similarity parameters according to the first positive sample data set and the second positive sample data set, and obtain a third positive sample data set and a second negative sample data set of the user search log list; load Google general corpus according to the first negative sample data set and the third positive sample data set, set the longest text sequence length, learning rate and training round parameters, and obtain a BERT semantic similarity model; The recall result module is used to build a vector index library based on the BERT semantic similarity model using the Faiss framework to obtain the recalled search results.

9. A computing device comprising: one or more processors; and Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any of the methods according to claims 1-7.

10. A computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform any one of the methods according to claims 1-7.