Search processing method, search method and search system
By adopting a context dynamic word weight calculation method based on QPP in the medical vertical search field, and using deep learning models to design word weights, the problem that search terms provided by users cannot recall the expected results, and more efficient search result recall and keyword matching are achieved.
Patent Information
- Application Number
- CN202210329150.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In the field of medical vertical search, due to the professionalism of the field, search terms provided by the user themselves often cannot recall the search results expected by the user. How to use the information description provided by the user to provide users with more accurate search terms has become a technical challenge.
A context dynamic word weight calculation method based on QPP is adopted to design word weights from the search results themselves through a deep learning model, so that the weight target is consistent with the search effect, thereby improving the efficiency of tag screening based on word weights and improving the keyword matching ability in medical search scenarios.
It greatly improves the recall quality of medical search, improves the accuracy and relevance of search results by optimizing search terms, and meets users' more specific and professional search needs.
Smart Images

Figure CN114936262B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of search, and in particular to a search processing method, a search method and a search system. Background Art
[0002] The search field has been committed to providing users with more accurate search results that are more in line with their search intent. In some vertical search fields such as medical, due to the professionalism of the field, the search terms provided by the user alone often cannot recall the search terms that the user expects. For this reason, users can be asked to provide more information descriptions through multiple rounds of questions and answers to supplement or correct the search terms initially entered.
[0003] How to use these information descriptions to provide users with more accurate search terms has become an issue that technicians in this field need to consider. Summary of the invention
[0004] A technical problem to be solved by the present disclosure is to provide a search processing method, a search method and a search. This solution adopts a contextual dynamic word weight calculation method based on QPP, innovatively integrates the QPP index, designs word weights from the search results themselves, and makes the weight target consistent with the search effect, thereby greatly improving the efficiency of tag screening based on word weights, improving the keyword matching ability in medical search scenarios, and thereby improving the recall quality of medical searches.
[0005] According to the first aspect of the present disclosure, a search processing method is provided, including: obtaining a current search term and a current filtering item; sending the obtained current search term and the current filtering item to a deep learning model; and based on the result output by the deep learning model, obtaining a word weight score for characterizing the relevance between the current filtering item and the current search term, wherein the deep learning model is trained using a word weight label that characterizes the relevance between the search term and the search result of the filtering item.
[0006] Optionally, before training, first term weight labels for the first search term and the first filter item are constructed and trained offline based on search result performance of the first search term and the first filter item.
[0007] Optionally, in a single prediction, the deep learning model uses a current search term and multiple current filtering items as input samples, and uses the weight scores of the multiple current filtering items as outputs. During the training phase, when the input samples of the deep learning model include the first search term, the first filtering item, and the second filtering item, the first term weight label and the second term weight label for the first search term and the second filtering item are used to obtain the loss value.
[0008] Optionally, before training, offline construction training for a first term weight label for a first search term and a first filter item based on the search result performance of the first search term and the first filter item includes: initiating a search using the first search term and the first filter item and obtaining the first top N returned results, where N is an integer greater than 1; calculating the search term hit score of the first search term in the first top N returned results; calculating the filter item hit score of the first filter item in the first top N returned results; calculating the correlation score of the first search term and the first top N returned results; and constructing the first term weight label based on the first search term hit score, the first filter item hit score and the first correlation score.
[0009] Optionally, training the deep learning model includes: sending a training sample in which the filter items are masked, including a search term and multiple filter items, into the deep learning model; performing feature extraction on the input training sample and obtaining a filter item embedding vector of the masked filter item; converting the filter item embedding vector of the masked filter item into a predicted word weight value via a conversion layer; and obtaining a loss function based on the word weight labels corresponding to the search term and the masked filter item included in the training sample.
[0010] Optionally, the deep learning model is a context-aware dynamic word weight model and includes multiple Transformer model layers for feature extraction of input.
[0011] Optionally, the method also includes: restating the weight-filtered filter items and the current search term to generate optimized search terms; and sending the optimized search terms to a search engine to provide search results for the current search term to the user, wherein the search results of the search engine are used to obtain the term weight label.
[0012] Optionally, the search processing method is used for medical vertical search, the current search term input by the user includes symptoms and / or disease name content, and the current filter item includes a supplementary description of the symptoms.
[0013] According to a second aspect of the present disclosure, a search method is provided, comprising: obtaining a search term and a filter item input by a user; performing synonym processing on the filter item; sending the search term and the filter item processed with synonyms to a deep learning model to obtain a weight score of each filter item; and
[0014] The weighted filtered filter items and the search terms are restated to generate optimized search terms, wherein the deep learning model is trained using word weight labels that characterize the relevance of the search terms to the search results of the filter items.
[0015] According to a third aspect of the present disclosure, a search system is provided, comprising: a medical vertical search determination unit, used to acquire and identify symptoms and / or disease name content in a search term input by a user as a key phrase; a filter item acquisition unit, used to provide multiple supplementary descriptions of symptoms based on the key phrase and acquire the supplementary descriptions selected by the user as filter items; an optimized search term generation unit, used to execute the method described in the first aspect to generate the optimized search term, and a search engine, used to return search results based on the optimized search term.
[0016] According to a fourth aspect of the present disclosure, a computing device is provided, comprising: a processor; and a memory on which executable codes are stored, and when the executable codes are executed by the processor, the processor executes the method described in the first aspect above.
[0017] According to a third aspect of the present disclosure, a non-transitory machine-readable storage medium is provided, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes the method described in the first aspect above.
[0018] Thus, the word weight model can learn from the search results the relevance of the filter items and search terms in the existing search recall rules and search data. Therefore, when the user selects multiple filter items or a selected filter item and search term have few search results, the search terms sent to the search engine can be optimized by filtering the filter items based on word weights, thereby improving the data recall quality of the search engine. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.
[0020] Figure 1 A schematic flow chart of a search processing method according to an embodiment of the present invention is shown.
[0021] Figure 2A -B shows an example of a page display that provides subsequent filter items based on user input and performs a search accordingly.
[0022] Figure 3 A training schematic diagram of a context-aware dynamic word weight model according to the present invention is shown.
[0023] Figure 4 A schematic flow chart of a search method according to an embodiment of the present invention is shown.
[0024] Figure 5An example of the overall process of optimizing search according to the present invention is shown.
[0025] Figure 6 A flowchart of synonym mining is shown.
[0026] Figure 7 A flowchart of Query restatement according to an embodiment of the present invention is shown.
[0027] Figure 8 A schematic diagram showing the composition of a search system according to an embodiment of the present invention is shown.
[0028] Fig. 9 A schematic diagram of the structure of a computing device that can be used to implement the above-mentioned search method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0029] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred 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 described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0030] The search industry has been committed to providing users with more accurate search results that are more in line with their search intent. In some vertical search areas, due to the professionalism of the field, the search terms provided by the user alone often cannot recall the search results that the user expects. Vertical search engines are different from general web search engines in that they focus on a specific part of online content. They are also called professional or subject search engines. Vertical content areas can be based on topicality, media type, or content type. Common industries include shopping, automotive industry, legal information, medical information, academic literature, job hunting, and travel.
[0031] Taking the medical vertical search field as an example, it is often difficult to find the user's true cause of illness or reasonable coping methods based solely on the search terms (search terms are also called "Query") entered by the user. For example, if a user searches for the symptom "stomachache", the returned results may involve a wide variety of conditions that can cause stomachache, which is not conducive to the user finding the true cause. For another example, if a user searches for the disease name "paronychia", the returned results involve paronychia of various degrees of severity. Since different degrees of paronychia require different coping methods, it is not conducive for users to find the most reasonable coping method.
[0032] To this end, it is necessary to use interactive methods such as multiple rounds of questions and answers to allow users to provide more information descriptions to supplement or modify the search terms initially entered. However, when the user provides too much supplementary information, for example, when the user selects too many filter items (filter items are also called "tags", see Figure 2A -B), because the hit rate of some tags is too low, fewer results will be returned, or the returned search results will be irrelevant to the initial search terms. Therefore, it is necessary to calculate the word weights of multiple tags and screen some tags to recall and sort the search results. Therefore, the present invention proposes a dynamic word weight calculation method that includes context, innovatively integrates the posterior indicator of search effect (QPP), and measures the word weight of each tag relative to the search term initially input by the user (that is, the initial Query input by the user) from the perspective of search results, and directly optimizes the search results. Thereby, the search experience is improved.
[0033] Figure 1 A schematic flow chart of a search processing method according to an embodiment of the present invention is shown. The method can be implemented by a platform or system providing search services as an optimization solution for existing searches. Figure 1 The method shown is a method of obtaining word weight scores using a deep learning model. According to the basic knowledge of deep learning models, the model needs to be trained when it is used to make inferences and predictions on input data. In both the training and reasoning stages, the model outputs based on the input data. The difference is that in the training stage, the model output needs to be compared with the target output (i.e., label) (i.e., calculate the loss function) to adjust the model parameters through reverse gradient propagation, so that the model can output results that are closer and closer to the target output through iterative optimization of the parameters. In the reasoning stage, since the parameters of the model have been trained (i.e., the information contained in the training data learned in some way), they can be used directly to output prediction results. Thus, in one embodiment, Figure 1 The method shown can be regarded as a training method of a deep learning model. In another embodiment, Figure 1 The method shown can be viewed as an inference method for a trained deep learning model.
[0034] In step S110, the current search term and the current filter item may be obtained. In an embodiment of using a deep learning model for reasoning, the search processing method involves interaction with a user. To this end, obtaining the search term and filter item may be obtaining the search term and filter item currently input by the user (especially the search term and filter item input by the user in real time). Here, the search term input by the user may be the initial content (e.g., initial Query) that the user searches for in a search box, for example, and the filter item may be a supplementary description of the search term obtained by the search platform through interaction with the user based on the initial search term input by the user. Here, "current" is used as a limitation of the search term and filter item obtained to distinguish it from the search term and filter item mentioned when using big data to construct word weight labels for model training.
[0035] Obtaining the current search term and current filter item input by the user may include: obtaining the search term currently input by the user; based on the search term, displaying a supplementary description option for the search term; and obtaining the filter item determined by the user from the supplementary description option. The supplementary description of the user input content as above is particularly suitable for the field of vertical search. Therefore, the search method of the present invention is particularly suitable for vertical search, such as medical vertical search. When the search method of the present invention is used to perform a medical vertical search, the search term input by the user generally includes symptoms and / or disease name content, and the filter item includes a supplementary description of the symptoms. In this application scenario, the user can search in a special medical vertical search box; or in a general search box, and the search system defines the search as a vertical search based on the key phrases contained in the user's search term, and in turn executes it within the scope of the medical vertical search engine and database.
[0036] The key phrases extracted by the search system from the input search terms need to contain valid information, including symptoms, disease names and supplementary descriptions, and the mention of the user's main complaint can be replaced with corresponding words. Here, the content entered by the user in the search box is the "search term", and the "key phrase" refers to the key words in the user's search term used to define the user's intention; "mention" refers to the expression corresponding to the key phrase in the user input. For example, the user enters "I had diarrhea last night", the key phrase can be "diarrhea", but the main complaint mention is "diarrhea". Specifically, in the three examples where the user inputs the search terms "stomachache for a month", "paronychia", and "what to do if you vomit", "stomachache for a month" includes the symptom "stomachache" and the supplementary symptom duration "one month", so the user's entire input "stomachache for a month" can be regarded as a key phrase; "paronychia" corresponds to the name of the disease, so the user's entire input "paronychia" is a key phrase; and "what to do if you vomit" includes the symptom "vomiting", that is, the main complaint mention is "vomiting", which corresponds to the key phrase "vomiting", so the key phrase corresponding to "what to do if you vomit" can be "vomiting".
[0037] The following description will be specifically combined with examples in the field of medical vertical search, but it should be understood that the inventive principles of the present invention are also applicable to other search fields that require additional description, especially other vertical search fields with higher professionalism.
[0038] For example, the user's intention to conduct a medical vertical search can be determined based on the key phrases included in the search terms entered by the user. Specifically, the search terms entered by the user may include symptoms and / or disease names. For example, when the user enters the search term "stomachache", the search platform can infer the user's intention to search for medical advice based on the search term "stomachache". At this time, it is possible to obtain information that more accurately determines what kind of stomachache the user's "stomachache" is and how to deal with it, for example, based on multiple rounds of questions and answers or by providing the user with multiple candidate filter items. For example, questions such as "How long have you had stomachache?" and "Do you often have stomachache?" can be displayed in a dialog box to obtain information that the user continues to provide in the form of questions and answers. In an implementation that is more efficient than multiple rounds of questions and answers, candidate filter items that supplement the description of symptoms at all levels can be directly provided to the user, so that the user can determine the content of the filter item by simply selecting it.
[0039] Figure 2A -B shows an example of a page display that provides subsequent filter items based on user input and performs a search accordingly. Figure 2AAs shown, after obtaining the search term "stomachache" input by the user, the search system provides the user with multiple subsequent filter items for each of the three aspects of "pain type", "onset state" and "occurrence time". The user can make selections based on their actual symptoms, for example, "bloating", "paroxysmal" and "postprandial". These selected filter items can be called tags, and are processed in subsequent operations of the present invention to generate optimized search terms.
[0040] Although the search terms and filter items (i.e., the initial query and usually multiple tags) are obtained in step S110, if these contents are directly sent to the search engine for search (for example, directly sending "stomach pain and bloating paroxysmal post-meal pain" as the search term to the search engine), ideal search results are often not obtained, so the search terms need to be optimized.
[0041] Therefore, in step S120, the current search term and the current filter item obtained can be sent to the deep learning model, and in step S130, based on the result output by the deep learning model, the word weight score used to characterize the relevance between the current filter item and the current search term is obtained. Here, the deep learning model is a model that uses QPP as a label for training. In other words, the deep learning model is trained using word weight labels that characterize the relevance between the search results of the search term and the filter item. It should be clear that in order to train the deep learning model to acquire enough relevance knowledge, a large number of word weight label trainings need to be constructed for the model, and therefore a large number of search terms and corresponding filter item search results need to be obtained to construct a large number of word weight labels for training.
[0042] In the present invention, the correlation between the filter item and the search term can be learned by a deep learning model from the search results of the joint search of each filter item and the search term. The deep learning model can be, for example, the following combination Figure 3 The context-aware dynamic word weight model described in the above description can be directly deployed online in practical applications to obtain the weight of each filter item in real time and use it to optimize the generation of subsequent queries. Figure 2B An example of a page display for optimizing a query according to the present invention is shown. Figure 2A After selecting "swelling pain", "paroxysmal" and "after meals" from the candidate screening items given in the example, the search platform can perform synonym replacement, tag screening based on weights and query restatement according to the search method of the present invention, and finally obtain an optimized query of "stomach pain after meals", and input the optimized query into the search engine to obtain the following query: Figure 2B This will provide users with more accurate answers to their symptoms. Figure 2A and Figure 2BIn the figure, the underline means "floating in red", that is, it matches the input search term.
[0043] Before training, the word weight label can be constructed offline. For example, the first word weight label for the first search word and the first filter item can be constructed offline based on the search result performance of the first search word and the first filter item.
[0044] Accordingly, in a single prediction, the deep learning model uses a search term and multiple filter items as input samples, and takes the weight scores of the multiple filter items as outputs. In the training phase, when the input sample of the deep learning model includes the first search term, the first filter item, and (one or more) second filter items, the first term weight label and (one or more) second term weight labels for the first search term and the second filter item are used to obtain the loss value.
[0045] Here, "first" and "second" are used to refer to different objects in the same category. In order to predict a variety of search terms and filter inputs, when training a deep model, it is necessary to use search terms covering various disease names or symptoms (usually with various different expressions) and various filter items for different diseases or symptoms as inputs, and prepare corresponding labels so that the model can learn the implicit correlation content in the input data.
[0046] The model input usually includes a search term and multiple filter items (for example, the default is three filter items). During the model training stage, separate labels can be prepared for the search term and each filter item. For example, the query input for a certain model training is "chest tightness", and the tags are "paroxysmal", "back pain", and "right chest". Here, it is necessary to obtain the label with the tag "paroxysmal" when the query is "chest tightness"; the label with the tag "back pain" when the query is "chest tightness"; and the label with the tag "right chest" when the query is "chest tightness". "Chest tightness" can be regarded as the first search term as mentioned above, "paroxysmal" as the first filter item; and "back pain" and "right chest" as the second filter items. Similarly, "back pain" or "right chest" can be regarded as the first filter item, and the other two items can be regarded as the second filter items.
[0047] Further, before training, offline construction training of first word weight labels for the first search word and the first filter item based on the search result performance of the first search word and the first filter item includes: initiating a search using the first search word and the first filter item and obtaining the first first N returned results, where N is an integer greater than 1, such as the first 50 returned results;
[0048] Calculate the search term hit score of the first search term in the first first N returned results (combined as follows Figure 3 The query_score); obtain the filter item hit score of the first filter item in the first first N returned results (as follows Figure 3 The tag_score); obtain the correlation score between the first search term and the first top N returned results (as follows Figure 3 The relevance_score); and constructing the first word weight label according to the first search term hit score, the first filter item hit score and the first relevance score.
[0049] Training the deep learning model may include: sending a training sample in which the filter items are masked and including a search term and multiple filter items into the deep learning model; performing feature extraction on the input training sample and obtaining a filter item embedding vector of the masked filter item; converting the filter item embedding vector of the masked filter item into a predicted word weight value via a conversion layer; and obtaining a loss function based on the word weight labels relative to the search term and the masked filter item included in the training sample.
[0050] In one embodiment, the deep learning model is a context-aware dynamic word weight model and includes multiple Transformer model layers for feature extraction of input.
[0051] After obtaining the weight score of each filter item, the filter items filtered by the weight score and the search terms can be restated to generate optimized search terms (i.e., optimized Query). Here, filtering by weight score can be filtering based on weight score ranking, or filtering based on whether the weight score is higher than a certain threshold. To this end, the filter items filtered by weight score can be filter items that rank high among multiple filter items, or preferably filter items with weight scores higher than a certain threshold. In this way, the filter items that are determined by the deep learning model as not highly relevant can be filtered out to ensure the recall rate of the optimized Query. Further, the filtered filter items and the search terms can be restated (i.e., determine the order of these contents), and thus form optimized search terms with a more easily recalled word order. The above-mentioned optimized search terms can then be sent to the search engine for an optimized search for the current search terms initially input by the user.
[0052] Therefore, the present invention provides a reasonable supplement to the tag (for example, based on Figure 2A The display and selection of candidate filter items (based on weight points) and the reasonable sorting of the initial query and filtered tags can optimize the user's initial search terms and return more accurate search results to the user.
[0053] As mentioned above, the deep learning model can learn the relevance of the filter item to the search term from the combined search results of the search term and the filter item, and use it to obtain the weight score of the filter item.
[0054] In the present invention, a trained (or pre-trained) deep learning model can be used to obtain the weight score of the filter item. The user's current query and the tag processed with the above synonyms can be used as input to the deep learning model, and the weight score of each tag can be obtained according to the output of the deep learning model. Here, the deep learning model itself can be trained according to the correlation between the search term and the filter item.
[0055] The deep learning model can learn the correlation between the filter items and the search terms in advance from the search results of a large number of search terms and filter items, and is used to obtain the weight score of each filter item in the current search term. Specifically, since the symptoms or disease names (i.e., key phrases) of the medical category are relatively fixed, the supplementary descriptions of the symptoms or diseases (i.e., filter items) are also relatively fixed, so it is possible to learn the correlation between the search terms and filter items from the search results in advance. Specifically, when the deep learning model is trained, the most common search terms (e.g., the 500 most common search terms for disease names or symptoms) can be listed, and multiple filter items can be prepared for each search term (the key phrases included). Thus, with a search term and a filter item as a pair, each pair is searched one by one, and the respective search results are obtained, and the correlation of each pair is obtained based on the search results. Therefore, in the subsequent actual online use, since the deep learning model has learned the correlation between each search term and the filter item during the training phase, a reliable weight score can be output.
[0056] In one embodiment, the deep learning model is a context-aware dynamic word weight model, and based on the relevance of each filter item to the search term, obtaining the weight score of each filter item includes: inputting the search term and each filter item into the context-aware dynamic word weight model; and obtaining the weight score of each filter item based on the prediction result of the context-aware dynamic word weight model, wherein a word weight label for training the context-aware dynamic word weight model is constructed based on the relevance of the search term and the filter item in the search results.
[0057] In addition, it should be understood that the generated optimized Query is used to optimize the search results, so the search method of the present invention may also include: sending the generated optimized search terms to the search engine to provide the user with search results for the current search terms, wherein the search engine also participates in the pre-preparation of the deep learning model training, and can be used to provide search results for the search terms and filter items required for the deep learning model training. In other words, the search database and search engine search rules for the deep learning model to perform relevance learning need to be the same as the search database and search engine search rules for subsequent searches with the optimized Query (or at least have a certain similarity), so that the knowledge learned by the deep learning model can be used for subsequent online searches.
[0058] The following will be combined Figure 3 Describe a specific implementation of the word weight calculation of the present invention. Figure 3 The model obtained by training as shown above calculates the word weights of tags and selects suitable tags for recalling and sorting search results. It must satisfy both the search results of the original query and the matching of the selected tags. In this way, when the user selects many tags, it can avoid no search results or poor search results due to including some tags in the combined query, and it can also avoid the situation where the search results are irrelevant to the initial query.
[0059] Figure 3 A training schematic diagram of a context-aware dynamic word weight model according to the present invention is shown. Figure 3 The model training shown here innovatively integrates the posterior indicator of search effect (QPP) through a dynamic word weight calculation method that includes context, avoiding the labeling of a large number of manual samples. At the same time, it measures the word weight of each filter item under the current query from the perspective of search results, directly optimizes the search results, and achieves the optimization of search results efficiently and at a low cost.
[0060] As shown in the figure, the training of the term weight model (TermWeightModel) consists of two parts. The first part is the offline term weight sample design based on QPP, which aims to fuse the search results to calculate the term weight. The calculated term weight can be used as a label for model training. The second part is the dynamic term weight model based on DeepCT, which aims to calculate the term weight of each tag while considering the overall query information, thereby preventing the occurrence of semantic drift irrelevant to the query.
[0061] First, the calculation of word weight model labels based on QPP is introduced.
[0062] Here, QPP refers to Query Performance Predict, which is a method that attempts to evaluate the quality of the results returned by a retrieval system for a certain query without relevant information, that is, without knowing the relevance of the retrieval results to the query.
[0063] When training the word weight model, a query and multiple tags are used as input, and labels are provided for the tags so that the word weight model can learn the relevance between the multiple tags and the query. In the present invention, a QPP index is obtained based on the search results as a label for the word weight model.
[0064] In order to ensure that the tag matches the original query, it is usually necessary to use multiple dimensions to generate QPP tags. In one embodiment, the search term hit score (query_score), filter item hit score (tag_score) and relevance score (relevance_score) can be used to obtain QPP tags. Therefore, the dimensions of tag generation include:
[0065] query_score,tag_score,relevance_score;
[0066] And QPP_label=function(query_score, tag_score, relevance_score).
[0067] In one embodiment, a linear model may be used to fuse the three indicators. The parameter weights of the linear model may be a simple average (for example, the weights w1, w2, and w3 of the three indicators may be the same, such as 1 / 3), or may be obtained based on experience, or may be obtained through training based on manually annotated samples (for example, 1,000 samples).
[0068] In a specific implementation scheme, obtaining the label includes the following steps:
[0069] 1. Use query and a single tag to form a new query to initiate a search, and obtain the top search results, such as the top 50 Docs (result documents), which are used to calculate three indicators: query_score, tag_score, and relevance_score;
[0070] 2. Calculate query_score to measure the degree of hit of search results on the original query. The calculation method may be, for example: (a) using the NER (Named Entity Recognition) entity of the query to match the NER entity on the doc side, and if there is a match, deleting it from query_remain, where query_remain represents the missed mention in the query (as mentioned above, mention refers to the expression corresponding to the key phrase in the user input, for example, the user inputs "I had diarrhea last night", the key phrase may be "diarrhea", but the main complaint mention is "diarrhea"); (b) among the remaining mentions in the previous step, if the part with red on the doc side is included, it is deleted from query_remain; and (c) using the formula query_score = (len(query_ner) - len(query_remain)) / len(query_ner) to calculate the search term hit score. It can be seen from the formula that if there is no missed mention remaining after removing the NER entity and removing the red, the search term hit score is 1, otherwise the hit score will be reduced;
[0071] 3. Calculate tag_score, which is used to measure the matching of tags in search results. The calculation method is similar to query_score, and tag_remain represents the missing mentions of tags: (a) Use the ner entity of the tag to match the ner entity on the doc side. If it matches, delete it from tag_remain; (b) Use the tag itself to match the ner entity on the doc side. If it matches, delete it from tag_remain; (c) The remaining mentions in the previous step are marked as red on the doc side. If they are red, delete them from tag_remain; (d) Use the formula tag_score = (len(tag_ner)-len(tag_remain)) / len(tag_ner) to calculate the hit score of the filter item. From this formula, we can see that if there are no missing mentions left after removing the ner entity and removing the red mentions, the hit score of the filter item is 1, otherwise the hit score will be reduced;
[0072] 4. Calculate relevance_score to avoid search results being irrelevant to the query. In one embodiment, the Bert text score of the query and the Doc title can be used as the relevance_score.
[0073] 5. Calculate the model label using the following formula: termweight_label=function(query_score, tag_score, bert_score). In one embodiment, linear weighting can be used. The weight can be learned, for example, from manually annotated TermWeight data (e.g., 1000 pieces of data).
[0074] After calculating the labels of the filter items, Figure 6 As shown in the lower part of the figure, a context-aware dynamic word weight model based on DeepCT (Deep Contextualized Termweight) is trained.
[0075] The word weight model can be implemented by a multi-layer transformer model. In one embodiment, a 4-layer transformer model pre-trained with medical corpus can be used, which can be distilled from a 12-layer large model. The attention mechanism of the transformer model enables each word to dynamically calculate the self-attention weight with all the words in the context, ensuring that the top-level word vector can perceive the overall context. At the same time, the pre-trained model provides powerful prior knowledge, reducing the workload of feature design; the powerful representation ability of the pre-trained model can also achieve better results with a small number of samples, reducing the cost of sample annotation.
[0076] In a specific embodiment, the word weight model based on DeepCT-QPP may include the following steps:
[0077] 1. Input the query constructed offline (which can be a query constructed based on big data user search records) and the selected tags (for example, three by default, or more, corresponding to tag1...tag n in the figure) into the DeepCT model at word granularity, distinguish the query and tag types, and add a tag word granularity mask. The mask can be randomly applied to the selected tags;
[0078] 2. Get the embedding (embedding vector) of each word of query and tag at the top layer of DeepCT model (i.e., after feature extraction by 4 layers of transformer), and only take the embedding of each tag according to the tag mask;
[0079] 3. Connect the embedding of the above tags to a conversion layer, such as an MLP (multi-layer perceptron) neural network, and obtain the predicted termweight through the activation function;
[0080] 4. In the training phase, the termweight of each tag is compared with the corresponding QPPtermweight_label calculated offline to calculate the loss function, such as the MSE loss function, and the parameters of the model are adjusted accordingly; in the prediction phase, the above termweight is directly output as the weight score.
[0081] Since the search engine that provides search results when constructing QPP tags is also the search engine used to search for optimization results online (or at least partially similar), the relevance knowledge learned by the word weight model can be used in the same search engine and implicit search content library. Therefore, when used online, the tags sent to the trained word weight model can be sorted from high to low according to the weights predicted by the model, and only tags that exceed the threshold are searched, recalled, and sorted. In this way, the tags that are clicked by the user and have good results after initiating the search are retained for subsequent searches.
[0082] The above QPP-based word weight processing method of the present invention can be used as a step of a search method for generating an optimized query for a query and a tag. The present invention can also be implemented as a search method. Figure 4 A schematic flow chart of a search method according to an embodiment of the present invention is shown.
[0083] In step S410, the search terms and filter items input by the user are obtained. In step S420, the filter items are processed with synonyms. In step S430, the search terms and the filter items processed with synonyms are sent to the deep learning model to obtain the weight score of each filter item. This step S430 may correspond to the weight score obtaining scheme based on the deep learning model described above. Similarly, the deep learning model is trained using word weight labels that characterize the relevance of each of the multiple search terms to the search results of the filter items. In step S430, the filter items and the search terms filtered by the weight scores are restated to generate optimized search terms.
[0084] When a user enters a query of the medical type in a general browser, for example, the search platform will provide some filter items (tags) for the user to supplement in order to refine the user's expression under specific symptoms, so as to obtain search results that are more relevant to the user himself. The difficulty in implementing this scenario lies in how to use the initial query and the tag selected by the user to generate a new query for searching, so that the new query (a) contains both the information of the initial query and the information of the selected tag as much as possible; (b) the expression is smooth and fluent; (c) the search results are excellent; and (d) the platform has low computational complexity and can meet online requirements. To this end, the query optimization method in the medical interactive search scenario of the present invention automatically generates a smooth new optimized query from the user's initial query and the selected tag through steps such as synonym replacement, word weight calculation, and query restatement, thereby ensuring the matching of the initial query information and the tag information in the search results, and realizing user-perceivable intelligent search.
[0085] As can be seen from the above, generating the optimized Query of the present invention may include three steps: synonym replacement, word weight calculation, and Query restatement. Figure 5 FIG. 2 shows an example of the overall process of optimizing search according to the present invention. Figure 5 As shown in the figure, taking the user's initial query as "left lower abdominal pain", and the filter items (Tags) obtained after supplementation and user selection as "1 week to 1 month", "left lower abdomen", "paroxysmal", and "history of gastritis" as an example, after the three sub-modules of synonym replacement, term weight calculation (TermWeight), and query restatement, the final output optimized query is "intermittent left lower abdominal pain for several weeks".
[0086] Synonym replacement
[0087] Here, synonym processing refers to providing synonym candidates for the filter items and considering the above synonym candidates in the subsequent weight score calculation and query restatement operation. By introducing synonyms for the filter items, the optimized query can be queried with more common expressions in the search material library, thereby further improving the search engine's search effect.
[0088] like Figure 5As shown, performing synonym processing on the filter items may first include: providing filter item synonyms for the filter items. For example, the filter item synonym for the filter item "1 week to 1 month" is "several weeks", and the filter item synonym for the filter item "paroxysmal" is "in bursts". In an optional implementation, weights may be manually configured for certain low-frequency tags to improve search flexibility. In addition, when the user input content is repeated with the tag, the Query may be pre-filled and deduplicated. That is, since the tag is repeated with the user input content, the tag is selected by default, and no subsequent process is required.
[0089] In one embodiment, the more common word among the filter item and the synonyms of the filter item may be directly selected as the filter item processed with synonyms, and used for subsequent weighting and query restatement processing.
[0090] In a more preferred embodiment, the weight score of the filter item can be obtained by using both the filter item and the filter item synonym at the same time, and / or the filter item and the filter item synonym can be used at the same time to restate, and the word judged to be better is selected from the two to generate the optimized search term. To this end, in the weight score obtaining step, the weight score of the filter item processed with the synonym can be obtained based on the correlation between the filter item and the filter item synonym and the search term. In the restatement step, the filter item and the search term filtered by the weight score can be restated, and the filter item synonym and the search term of the filter item filtered by the weight score can be restated, and the result judged to be better by the language model is selected to generate the optimized search term.
[0091] Furthermore, a hit filter item synonym pair may be found from a filter item synonym library, and a filter item synonym of the filter item may be given, wherein the filter item synonym library is constructed based on previous user queries and click histories.
[0092] Figure 6A flow chart of synonym mining is shown. Specifically, the synonyms of the first 500 tags, for example, sorted by user clicks, can be mined from the QT log (Query / title, i.e., the historical records of the previous user inputting Query and the user clicking on the article title). Specifically, the part that hits the Query can be taken out from the title (title) (i.e., the red ones), and word segmentation and part-of-speech filtering (e.g., removing non-entity words such as prepositions) can be performed. After preprocessing, the translation model can be used to align one to another in the synonym pair (forward probability) and another to one (reverse probability), perform synonym pair statistics, and store them as candidate synonym pairs. In one embodiment, the translation model can be implemented as a statistical model, and in other embodiments, the translation model can also be implemented as a deep learning model.
[0093] These candidate synonym pairs can be manually reviewed before going online, and the filter item synonyms found based on the synonym pairs can be used to try to replace the initial tag when the language model calculates the tag combination in the subsequent process. If the language model score is higher, the filter item synonyms are used to replace the synonyms.
[0094] Through a large amount of mining and alignment, a large number of candidate synonym pairs can be obtained, such as paroxysmal -> bursts, etc. After subsequent replacement, uncommon expressions in the search library are replaced with more common expressions (for example, written expressions are replaced with spoken expressions), thereby improving the matching degree of user input information.
[0095] Term Weight Calculation (TermWeight)
[0096] As above combined Figure 3 The offline label preparation, model training and actual reasoning of the DeepCT word weight model based on QPP construction labels of the present invention are described in detail. Using the trained model, Figure 5 As shown, the priorities of these tags (and their synonyms) are obtained, and tags with scores less than the threshold are filtered out based on a predetermined threshold, thereby entering the next step.
[0097] Query Restatement
[0098] The goal of query restatement is to generate a more fluent form and expression for query and tag, which is helpful for recalling search results. Common models include translation models and generative models, but these models require a large amount of data, and the model complexity is high and time-consuming, making it difficult to use online. To this end, in one embodiment of the present invention, a statistically based language model is used to restate the query. A language model (LM) is a probabilistic model in the field of natural language processing. The language model used in the present invention can be regarded as a lightweight version of a query restatement model, and can be trained on 10 million medical question and answer data, thereby realizing a language model in a medical scenario.
[0099] In one embodiment, restating the filter items filtered by weight scores and the search terms to generate optimized search terms may include: combining and sorting the filter items filtered by weight scores and the search terms; filtering out sortings that do not comply with predetermined rules; sending the filtered combined sortings to a sorting language model; and selecting the sorting with the highest sorting language model score as the optimized search term.
[0100] Specifically, Figure 7 A flowchart of Query restatement according to an embodiment of the present invention is shown. As shown in the figure, the Query (i.e., the user input content) can be cut into q_tags according to the mention of the user's main complaint, and then the q_tags and the filtered items (i.e., tags) after word weighting are respectively cut, thereby generating a candidate restatement word order (i.e., candiList) of the full arrangement of q_tags and tags. For example, when the Query is "left lower abdominal pain" and the filtered tags are "several weeks" and "a burst", since there is one Query and two tags, there are a total of 6 (i.e., 6=3!) ways of arrangement for the three items involved in the arrangement. Subsequently, the combination is screened to slow down the semantic drift (i.e., remove the order that does not conform to the predetermined rules in the full arrangement candidate restatement word order, for example, the candidate word order with the super long tag at the front), and then the tag synonyms in the synonym processing step can be used to append to the candiList, and the combined score is calculated by the LM trained as described above, and the word order with the highest score is used as the preferred Query.
[0101] like Figure 5As shown, if the content searched by the search engine is based on medical question and answer data expressed in colloquial language, then when the query is restated, the tag can be expressed in colloquial language, that is, a more colloquial synonym for the filter item "a burst" is used to replace the original filter item "1 week to 1 month", and various splicing orders of tag and query are obtained. After calculating the combined score through the language model, the restated query is obtained, that is, the optimized query "pain in the lower left abdomen for several weeks". It should be understood that if the data in the database searched by the search engine is more professional content, such as scientific literature, the spoken tag selected by the user can be replaced by a written synonym tag.
[0102] Therefore, this solution proposes a process-based method for generating an optimized query by fusing the initial query with the supplementary selected tags in an interactive search scenario. This solution can be applied not only to interactive search scenarios, but also to similar search scenarios that require supplementing the initial query input by the user.
[0103] In one embodiment, the present invention may also be implemented as a search system. Figure 8 The schematic diagram of the composition of a search system according to an embodiment of the present invention is shown. As shown in the figure, the search system 800 may include a medical vertical search determination unit 810, a filter item acquisition unit 820, an optimized search word generation unit 830 and a search engine 840.
[0104] Specifically, the medical vertical search determination unit 810 is used to obtain and identify the symptoms and / or disease name content in the search term input by the user as a key phrase; the filter item acquisition unit 820 is used to provide multiple supplementary descriptions of the symptoms based on the key phrase and obtain the supplementary descriptions selected by the user as filter items; the optimized search term generation unit 830 is used to execute the method described above to generate the optimized search term. Thus, the search engine 840 can return search results based on the optimized search term. In other words, the medical vertical search determination unit 810, the filter item acquisition unit 820, and the optimized search term generation unit 830 described above can be additional functional modules configured by the search platform including the search engine 840, and through the cooperation of units 810, 820 and 830, the recall quality of medical search is improved.
[0105] Fig. 9 A schematic diagram of the structure of a computing device that can be used to implement the above-mentioned search processing method according to an embodiment of the present invention is shown.
[0106] See also Fig. 9 , the computing device 900 includes a memory 910 and a processor 920 .
[0107] The processor 920 may be a multi-core processor or may include multiple processors. In some embodiments, the processor 920 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor 920 may be implemented using a customized circuit, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0108] The memory 910 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 920 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 910 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 910 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0109] The memory 910 stores executable codes, and when the executable codes are processed by the processor 920 , the processor 920 can execute the search method mentioned above.
[0110] The search processing method and system according to the present invention have been described in detail above with reference to the accompanying drawings.
[0111] The search processing method of the present invention innovatively integrates the posterior index of search effect (QPP) as a word weight label. The word weight of the query is measured from the perspective of search results, ensuring the consistency of word weight optimization and search effect on the search service; at the same time, a large number of labeled samples can be automatically generated, greatly reducing the labeling cost. The present invention proposes a dynamic word weight calculation method that includes context, and dynamically calculates word weights online, avoiding the problem of high weight but irrelevant semantics; at the same time, it reduces the cost of feature construction.
[0112] Furthermore, the query optimization scheme of the present invention uses offline aligned corpus to mine a large number of candidate synonyms for replacement in subsequent processes, greatly improving the matching ability of some professional / unpopular terms to common spoken expressions in medical searches.
[0113] This solution adopts a contextual dynamic word weight calculation method based on QPP, innovatively integrates the QPP indicator, and designs word weights from the search results themselves, so that the weight target is consistent with the search effect, thereby greatly improving the efficiency of tag screening based on word weights and improving the keyword matching ability in medical search scenarios.
[0114] In the query restatement stage, this solution uses a statistical-based language model trained with medical scenario data. Compared with translation or generative models, it does not require a large amount of labeled data, and has faster performance and controllable results.
[0115] Therefore, this solution proposes a process-based method for generating an optimized query by fusing the initial query with the supplementary selected tags in an interactive search scenario. This solution can be applied not only to interactive search scenarios, but also to similar search scenarios that require supplementing the initial query input by the user.
[0116] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing the above steps defined in the above method of the present invention.
[0117] Alternatively, the present invention may also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or computing device, server, etc.), the processor executes the various steps of the above-mentioned method according to the present invention.
[0118] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or a combination of both.
[0119] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0120] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A search processing method, comprising: Get the current search term and current filter item; Sending the obtained current search term and the current filter item to a deep learning model; Based on the result output by the deep learning model, obtaining a word weight score for characterizing the relevance between the current screening item and the current search term; as well as restating the weighted filtered filter items and the current search term to generate an optimized search term, The deep learning model is trained using word weight labels that characterize the relevance of search terms to search results of filter items.
2. The method of claim 1, wherein: Before training, first term weight labels for the first search term and the first filter item are trained by offline construction based on search result performance of the first search term and the first filter item.
3. The method of claim 2, wherein: In a single prediction, the deep learning model uses a current search term and multiple current filter items as input samples, and uses the weighted scores of the input multiple current filter items as output, and During the training phase, when the input sample of the deep learning model includes the first search term, the first filter item, and the second filter item, the first term weight label and the second term weight label for the first search term and the second filter item are used to obtain the loss value.
4. The method of claim 2, wherein: Before training, offline construction training of first word weight labels for the first search word and the first filter item based on the search result performance of the first search word and the first filter item includes: Initiate a search using the first search term and the first filter item and obtain the first N returned results, where N is an integer greater than 1; Calculate the search term hit score of the first search term in the first first N returned results; Calculate the filter item hit score of the first filter item in the first first N returned results; Calculating the correlation scores between the first search term and the first top N returned results; and The first term weight label is constructed according to the first search term hit score, the first filter item hit score and the relevance score.
5. The method of claim 1, wherein: Training the deep learning model includes: Sending a training sample including a search term and a plurality of filter items with masked filter items to the deep learning model; Performing feature extraction on the input training sample and obtaining a filter item embedding vector of the masked filter item; Converting the filter item embedding vector of the masked filter item into a predicted word weight value via a conversion layer; and A loss function is obtained based on the word weight labels corresponding to the search words and masked filter items included in the training sample.
6. The method of claim 1, wherein: The deep learning model is a context-aware dynamic word weight model and includes multiple Transformer model layers for feature extraction of input.
7. The method of claim 1, further comprising: Sending the optimized search term to a search engine to provide search results for the current search term to the user, The search engine is used to provide the required search results for obtaining the word weight tags.
8. The method of claim 1, wherein: The search processing method is used for medical vertical search, the current search term input by the user includes symptoms and / or disease name content, and the current filter item includes a supplementary description of the symptoms.
9. A search method, comprising: Get the search terms and filter items entered by the user; Performing synonym processing on the screening items; The search terms and the synonym-processed filter items are fed into a deep learning model to obtain a weight score for each filter item; as well as The filter items filtered by the weighted scores and the search terms are restated to generate optimized search terms, The deep learning model is trained using word weight labels that characterize the relevance of search terms to search results of filter items.
10. A search system comprising: A medical vertical search determination unit, used to obtain and identify the symptoms and / or disease name included in the search term currently input by the user as a key phrase; a filter item acquisition unit, configured to provide a plurality of supplementary descriptions of the symptom based on the key phrase and acquire the supplementary description selected by the user as a filter item; an optimized search term generating unit, configured to execute the method according to any one of claims 1 to 8 to generate optimized search terms based on the term weight scores, and The search engine is used to return search results according to the optimized search terms.
11. A computing device comprising: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 9.
12. A non-transitory machine-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Search method and device and storage medium
CN111339252A