Label marking method, device, computer equipment and storage medium
By obtaining search result data from an external search platform and using a classification model for annotation, the problem of low annotation efficiency in the cold-start search system is solved and the effect of rapid accumulation of training data is achieved.
Patent Information
- Application Number
- CN202010772268.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-04
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-08-04
AI Technical Summary
The search system in the cold start stage lacks historical search click data, which makes the traditional annotation method based on historical data inefficient and unable to effectively construct training data.
By obtaining the search records of the target search system and obtaining the corresponding search result data from the external search platform, the preset classification model is used for classification, and category labeling is performed based on the classification results to achieve semi-supervised labeling, which can be expanded with the help of the external search platform Search results, applicable to the cold start phase.
It improves the annotation efficiency of search records, quickly accumulates training data, and is not subject to the conditions of historical search click data. It is suitable for search systems in the cold start stage.
Smart Images

Figure CN112749313B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a labeling method, apparatus, computer equipment, and storage medium. Background Art
[0002] With the development of artificial intelligence technology, various AI data processing models have developed rapidly. Model training is an important part of the model building process, and model training relies on labeled training data.
[0003] Taking the intent analysis model in a search system as an example, traditional data labeling methods include manual annotation and building training data based on historical search click data. However, since search systems in the cold start phase lack historical exposure and click data, building training data based on historical search click data is not suitable for these systems. Furthermore, manual annotation suffers from low labeling efficiency. Summary of the Invention
[0004] Based on this, it is necessary to provide a label labeling method, device, computer equipment and storage medium that can improve the training label labeling efficiency of the search system in the cold start phase to address the above technical problems.
[0005] A label marking method, the method comprising:
[0006] Obtain search records to be annotated in the target search system;
[0007] Obtain search result data corresponding to the search record from an external search platform;
[0008] Input the search result data into a preset classification model to obtain a classification result corresponding to the search result data, wherein the classification category of the classification model is the same as the classification category of the index library of the target search system;
[0009] According to the classification results, the search records are labeled with category labels.
[0010] A label marking device, comprising:
[0011] A search record acquisition module is used to acquire the search records to be marked in the target search system;
[0012] An external data acquisition module is used to obtain search result data corresponding to the search record from an external search platform;
[0013] A data classification module is used to input the search result data into a preset classification model to obtain the classification results corresponding to the search result data. The classification category of the classification model is the same as the classification category of the index library of the target search system;
[0014] The label marking module is used to mark the search records with category labels based on the classification results.
[0015] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:
[0016] Obtain search records to be annotated in the target search system;
[0017] Obtain search result data corresponding to the search record from an external search platform;
[0018] Input the search result data into a preset classification model to obtain a classification result corresponding to the search result data, wherein the classification category of the classification model is the same as the classification category of the index library of the target search system;
[0019] According to the classification results, the search records are labeled with category labels.
[0020] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0021] Obtain search records to be annotated in the target search system;
[0022] Obtain search result data corresponding to the search record from an external search platform;
[0023] Input the search result data into a preset classification model to obtain a classification result corresponding to the search result data, wherein the classification category of the classification model is the same as the classification category of the index library of the target search system;
[0024] According to the classification results, the search records are labeled with category labels.
[0025] The above-mentioned labeling method, device, computer equipment and storage medium obtain the search result data corresponding to the search record with the help of an external search platform, thereby realizing the expansion of the search results of the search record, and based on inputting the search result data into the classification model, obtains the classification result with the same classification category as the index library classification category of the target search system, thereby realizing the association of the external search result data with the target search system, and then annotates the search record with category labels according to the classification results to realize semi-supervised labeling. By using the external search platform, it is not restricted by whether the search system has a large amount of historical search click data, and is suitable for the search system in the cold start stage, effectively improving the labeling efficiency of the search record and quickly accumulating training data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A diagram illustrating an application environment of a label marking method in one embodiment;
[0027] Figure 2 Schematic diagram of a flow chart of a label marking method in one embodiment;
[0028] Figure 3 A flowchart of a label marking method according to another embodiment;
[0029] Figure 4 A flowchart of a label marking method according to another embodiment;
[0030] Figure 5 Schematic diagram of a flow chart of a label marking method in another embodiment;
[0031] Figure 6 Schematic diagram of a processing flow of a label marking method in one embodiment;
[0032] Figure 7 A flowchart of a label marking method according to another embodiment;
[0033] Figure 8 Schematic diagram of a flow chart of a label marking method in another embodiment;
[0034] Figure 9 A UI interface diagram of an application scenario of a labeling method according to an embodiment;
[0035] Figure 10 A flowchart of a label marking method according to another embodiment;
[0036] Figure 11 Schematic diagram of a flow chart of a label marking method in another embodiment;
[0037] Figure 12 This is a structural block diagram of a label marking device in one embodiment;
[0038] Figure 13 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0040] The label marking method provided in this application can be applied to Figure 1In the application environment shown. Among them, the search system 102 in the cold start phase communicates with the server 104 through the network. The server 104 communicates with the external search platform through the network. The server 104 obtains the search records of the search system 102, and obtains the search result data corresponding to the search record from the external search platform 104 based on the search record, and inputs the search result data into a preset classification model to obtain the classification result corresponding to the search result data. The classification category of the classification model is the same as the classification category of the index library of the target search system. According to the classification result, the search record is labeled with a category label. Among them, the search system 102 and the external search platform 104 in the cold start phase can be installed on the terminal in the form of an application, specifically, they can be installed on the same terminal. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices with corresponding applications installed. The server 104 can be implemented as an independent server or a server cluster composed of multiple servers. It can be understood that in other embodiments, the search system 102 and the external search platform 104 in the cold start phase can be installed on different terminals in the form of applications.
[0041] In one embodiment, Figure 2 As shown, a label marking method is provided, which is applied to Figure 1 The server in is used as an example to illustrate, including the following steps 202 to 208.
[0042] Step 202: Obtain search records to be marked in the target search system.
[0043] A target search system refers to a search system in the cold start phase. The birth phase of a new search system is called the cold start phase. During the cold start phase, the search system faces the problem of a lack of users and relevant resources. For search data entered during the cold start phase, due to the lack of support from historical search click data, it is difficult to analyze the user's search intent and cannot return search results that highly match the search data. Query intent understanding is one of the core foundational technologies in search systems. It is key to understanding user search intent, matching and ranking, and providing the most relevant results. Query intent understanding can be performed using supervised training methods such as classification models, but often faces the problem of missing labeled data. Especially in the cold start phase, there is often a lack of sufficient historical click data to use. Therefore, how to obtain sufficient query annotation data becomes a key point and difficulty in intent model training.
[0044] Search records include search data entered into the target search system. In an embodiment, by traversing the search record log files for a preset time period in this system, the search records for that time period can be obtained. The preset time period can be a period such as the most recent week or the most recent month. The search record includes each search data entered, and the search data can specifically be text data entered. Based on the intent understanding and analysis of the text data, the most relevant search results for the text data can be obtained.
[0045] Step 204: Obtain search result data corresponding to the search record from the external search platform.
[0046] An external search platform refers to a widely used, mature search platform, such as Baidu Search or Tencent Video Search. Specifically, it can be a search platform of the same type as the target search system. For example, if the target search system is a document search system, the external search platform should be a mature document search platform. If the target search system is a video search system, the external search platform should be a mature video search platform, such as a video playback platform that provides search functionality.
[0047] In one embodiment, since the external search platform has a mature search system and a large amount of historical search click data, after the user enters the search data and obtains the search results, he will click and select according to the type of data he wants. For example, taking the external search platform as a video search system, a search box and video type selection buttons are provided on the search interface of the client. Specifically, the video type selection buttons may include "all", "games", "animation", "TV series", and "others". By entering the search content in the input box and confirming the search, the user can choose to click the corresponding video type selection button as needed. According to the user's actual video playback record, the user's search intention corresponding to the search data can be determined. Based on a large amount of historical data, the search results can be optimized to give priority to displaying videos that are most relevant to the input search data.
[0048] The search result data corresponding to a search record refers to the results obtained by searching the external search platform using the search record as the input search content. Each search record can correspond to multiple search result data.
[0049] In one embodiment, the search result data may be sorted in the order of the search result list of the external search platform, and a set number of search results may be taken as the search result data corresponding to the search record.
[0050] Step 206: Input the search result data into a preset classification model to obtain a classification result corresponding to the search result data.
[0051] In an embodiment, the search result data may be text data, such as the title of a document, an introduction or title of a video or picture, etc. Text data is generally used to briefly introduce documents, videos, pictures and other data to facilitate understanding of the data content.
[0052] The classification categories of the classification model are the same as the classification categories of the index library of the target search system. In one embodiment, BERT can be used as the preset classification model. In other embodiments, it can also be replaced by a multi-class text classification model such as CNN, LSTM, etc. Utilizing the classification model, the search result data obtained from the external search platform can be classified and processed according to the classification categories of the index library of the target search system, and classification results with a high degree of match with the target search system can be obtained. Specifically, the preset training model can be obtained by training sample data carrying classification labels corresponding to the classification categories of the index library of the target search system.
[0053] Each piece of data in the search results corresponds to a classification result. The text data is input into a preset classification model, which performs classification analysis on the text and outputs the probability that the data belongs to the corresponding category. It can be understood that the category output by the classification model for the data is the category with the highest probability during the classification analysis process.
[0054] Step 208: Label the search records with category tags based on the classification results.
[0055] In an embodiment, the search result data carries the classification results obtained through classification model analysis. Since the search result data is obtained based on the search records, it has a corresponding relationship with the search records. In an embodiment, the category corresponding to the search record can be determined based on the number of search result data. Specifically, when the search result data contains only one piece of data, the classification result corresponding to the search result data can be used as the classification category corresponding to the search record and labeled with a category label. When the search result data contains multiple pieces of data, each piece of data has a corresponding classification result, and an equal voting mechanism is used to determine the final classification category corresponding to the search record.
[0056] The above-mentioned labeling method obtains the search result data corresponding to the search record with the help of an external search platform, thereby realizing the expansion of the search results of the search record, and based on inputting the search result data into the classification model, obtains the classification result with the same classification category as the index library of the target search system, thereby realizing the association of the external search result data with the target search system, and then labels the search record with category labels according to the classification result, realizing semi-supervised labeling. By relying on the external search platform, it is not restricted by whether the search system has a large amount of historical search click data, and is suitable for the search system in the cold start stage, effectively improving the labeling efficiency of the search record and quickly accumulating training data.
[0057] In one embodiment, Figure 3 As shown, before obtaining the search result data corresponding to the search record from the external search platform, that is, before step 204 , steps 302 to 304 are also included.
[0058] Step 302: Identify the data type of the index library of the target search system.
[0059] Step 304: Determine an external search platform that matches the index database data type based on the index database data type.
[0060] The target search system's index library data type refers to the data type that the target search system's index library can provide when search data is entered into the target search system. The data type can be documents, images, videos, etc. In embodiments, the data type can include multiple data types simultaneously or only one data type.
[0061] Take the example of video data. When search data is entered into the target search system, the search results returned are videos related to the search data. Specifically, there are many videos related to the search data. For example, if a user enters "jump jump" and searches, the related videos obtained may be "jump jump" game videos, "jump jump" skill instruction videos, or even funny videos similar to "jump jump." When the target search system is a video search system, the data in the target search system's index library corresponds to videos, so that the search results are all videos related to the search data.
[0062] Based on the data type of the search record, determining the external search platform that matches the data type is essentially matching the external search platform corresponding to the target search system. By leveraging the external search platform, it is possible to utilize a large amount of historical search click data from platforms that provide similar or identical types of search services. This can not only make up for the lack of historical search click data in the target search system during the cold start phase, but also use the data from the external search platform as a reference to obtain the classification labels corresponding to the search records of the target search system. Compared with the manual labeling method in the existing technology, it can also greatly reduce manual participation and reduce the cost of labeling.
[0063] In one embodiment, Figure 4 As shown, the search result data corresponding to the search record is obtained from the external search platform, that is, step 204 includes steps 402 to 404.
[0064] Step 402: construct a crawling task based on the search records.
[0065] Step 404: execute the crawling task, perform data crawling processing on the external search platform, and obtain search result data corresponding to the search record.
[0066] A crawling task involves using a crawler to crawl data within a specified scope based on specified content. A crawler is a program or script that automatically captures data information according to certain rules. In this embodiment, the specified content is the search records in the target search system, the specified scope is the search click data from the external search platform, and the crawled data is the search result data obtained by inputting the search data from the search records in the external search platform. Crawling data using a crawler can improve data acquisition efficiency and obtain the search result data corresponding to the search records in a targeted manner.
[0067] In one embodiment, the number of search result data is multiple. Figure 5 As shown, according to the classification result, the search record is labeled with a category label, that is, step 208 includes steps 502 to 508.
[0068] Step 502: Obtain the classification result of each search result data.
[0069] Step 504: Perform classification statistics on the classification results of each search result data to obtain classification statistics results.
[0070] Step 506: Determine the target category based on the classification statistics results.
[0071] Step 508: Mark the target category as the category label of the search record, and annotate the search record with the category label.
[0072] By classifying the search result data and performing classification statistics, the number of search result data belonging to the same category is determined, and an equal voting mechanism is implemented through classification statistics to determine the target category. The target category is then marked as the category label of the search record, and the search record is annotated with the category label.
[0073] For example, if Figure 6 As shown, for the search record "Jump Jump", the top five corresponding search videos were obtained from an external search platform. Each video has corresponding text data (video title). Among them, the text data corresponding to the first video is "Jump Jump: Teach you a simple trick to easily get 500 points"; the text data corresponding to the second video is "Original animation: Jump Jump, it's fun to play animation like this"; the text data corresponding to the third video is "Have you seen the real version of Jump Jump?"; the text data corresponding to the fourth video is "Please tell me the psychological shadow area of playing Jump Jump"; and the text data corresponding to the fifth video is "Jump Jump humor video, we are different, so funny". The above five search results are input into the classification model respectively, and the classification model outputs the following processing results: the first video is classified as "game", the second video is classified as "game", the third video is classified as "funny", the fourth video is classified as "game", and the fifth video is classified as "funny".
[0074] Through classification statistics, we can find that the number of "game" videos is 3 and the number of "funny" videos is 2. Therefore, we determine that the "game" category is the target category corresponding to "Jump Jump", and then label "game" as the category label of "Jump Jump".
[0075] In one embodiment, Figure 7 As shown, the target category is determined according to the classification statistics results, that is, step 506 includes steps 702 to 706.
[0076] Step 702: Filter out the category containing the largest amount of search result data based on the classification statistics results.
[0077] Step 704: When the number of categories is one, determine that category as the target category.
[0078] Step 706 : When there are multiple categories, obtain the category probability data corresponding to the search result data contained in each category respectively, and select the target category from the filtered categories according to the category probability data corresponding to the search result data contained in each category.
[0079] By performing statistics by classification category, the search result data with the same classification results are grouped together to obtain the number of search result data with the same classification results in each category. The classification statistics results are sorted in order of quantity to determine the category with the largest number, that is, the category containing the largest number of search result data.
[0080] In the embodiment, the category with the largest number includes two situations. One is that there is only one category with the largest number, and the other is that the category with the largest number includes multiple categories at the same time (the number of categories ≥ 2), that is, there are multiple categories with the largest number in parallel. At this time, according to the category probability data corresponding to each search result data, the category with a larger probability can be selected from the multiple parallel categories as the target category.
[0081] In a specific embodiment, the category with the largest number of search result data is selected as the candidate category, the category probability data of each search result data contained in each candidate category is accumulated and calculated, and the candidate category with the largest calculation result is selected as the target category.
[0082] In other embodiments, classification statistics may also include: by performing statistics by classification category, grouping together the search result data with the same classification results, accumulating the category probability data of each search result data in the same category to obtain the total probability of each category, and then sorting them in order of the size of the total probability, and determining the category with the largest total probability as the target category.
[0083] In one embodiment, Figure 8 As shown, the target category is determined according to the classification statistics results, that is, step 506 includes steps 802 to 806.
[0084] Step 802: Obtain the ranking position of the search result data in the search result list of the external search platform.
[0085] Step 804: Determine the weight data corresponding to each search result data according to the preset association relationship between the ranking position and the weight data.
[0086] Step 806: Determine the target category based on the classification statistics and weight data.
[0087] The ranking position in the search results list of the external search platform can also represent the degree of relevance of each search result data item to the search record. In an embodiment, by pre-setting the association relationship between the weight data of the ranking position, different weight data are set for the search result data at different ranking positions. Specifically, the higher the ranking of the search result data, the larger the corresponding weight data value. Based on the weight data, the data in the classification statistical results are weighted and calculated, and the category with the largest calculated result is used as the target category.
[0088] Specifically, when the classification statistics are based on the number of search results of the same type, the cardinality of each search result is 1. Determining the target category based on the classification statistics and weight data includes: for each category, calculating the product of the cardinality of each search result by the weight data, and then accumulating the product of the cardinality and weight data of each search result in that category to obtain the calculation result for that category. Similarly, the classification statistics can also be based on the probability data of the search results of the same type. In this case, the cardinality of each search result is the probability data of the search result data.
[0089] In one embodiment, the method further includes: inputting the search data carrying the category label as training data into an initial search intent classification model, training the initial search intent classification model, and obtaining a search intent classification model for performing search intent classification processing on the input search data.
[0090] By constructing a search intent classification model, it is possible to facilitate the analysis of search intent during the data processing of the search system. In one embodiment, Figure 9 As shown, the user inputs search data, such as "Jump Jump", and the search intent classification model performs intent classification analysis on the input search data, and can determine that the corresponding search intent is "game", and then obtains the game video resource documents corresponding to "Jump Jump" from the index library corresponding to the game category, and then sorts the obtained video resource documents through coarse and fine sorting, and returns video resources related to the search intent to the user. For example, when the input search data is "How to open WeChat Jump Jump", the intent category obtained by the search intent classification model analysis is "skill teaching". For another example, when the input search data is "The Untamed", the intent category obtained by the search intent classification model analysis is "TV series".
[0091] This application also provides an application scenario, which applies the above-mentioned label marking method. Specifically, the application of the label marking method in this application scenario is as follows:
[0092] Taking the mini-program video sub-search system as an example, the basic process for constructing intent-annotated data based on an external, mature video search platform is as follows. First, query data for the target search system is given. For example, recent query data from this system is collected as basic query data for targeted crawling on the external platform. Then, based on the specific query, a crawler task is constructed to crawl the ranking results of a mature video search platform. For example, the top five documents (text data) in the ranking structure returned by the external video search platform are used as input to a pre-trained classification model. The crawled documents are classified using the pre-trained classification model, such as BERT. The classification model predicts a category label for each document. The category label with the most frequent occurrence among the five articles is then selected as the final label for the query, thereby implementing a semi-supervised annotation method for constructing query intent training data using an external search platform during the cold start phase. Through the above process, in the absence of historical query-doc exposure and click data and manually annotated training data, this method can quickly and effectively obtain high-quality annotated data for query intent model training. This method is suitable for obtaining query intent annotation data in most search systems and is an effective way to reduce annotation costs and quickly accumulate training data.
[0093] In one embodiment, a labeling method is provided, such as Figure 10 As shown, the label marking method includes the following steps 1002 to 1024.
[0094] Step 1002: Obtain search records to be marked in the target search system.
[0095] Step 1004: construct a crawling task based on the search records.
[0096] Step 1006: Identify the data type of the index library of the target search system and determine the external search platform that matches the data type of the index library.
[0097] Step 1008: execute the crawling task, perform data crawling processing on the external search platform, and obtain search result data corresponding to the search record.
[0098] Step 1010: Input the search result data into a preset classification model to obtain a classification result for each search result data item.
[0099] Step 1012: Perform classification statistics on the classification results of each search result data to obtain classification statistics results.
[0100] Step 1014: Filter out the category containing the largest amount of search result data based on the classification statistics results.
[0101] Step 1016: When the number of categories is one, determine that category as the target category.
[0102] Step 1018: When there are multiple categories, obtain the category probability data corresponding to the search result data contained in each category, and select the target category from the filtered categories based on the category probability data corresponding to the search result data contained in each category.
[0103] Step 1020: Mark the target category as the category label of the search record, and annotate the search record with the category label.
[0104] Step 1022: Input the search data with category labels as training data into the initial search intent classification model.
[0105] Step 1024 , perform model training on the initial search intent classification model to obtain a search intent classification model for performing search intent classification processing on the input search data.
[0106] In another embodiment, a label marking method is also provided, such as Figure 11 As shown, the label marking method includes the following steps 1102 to 1128.
[0107] Step 1102: Obtain search records to be marked in the target search system.
[0108] Step 1104: construct a crawling task based on the search records.
[0109] Step 1106: Identify the data type of the index library of the target search system and determine the external search platform that matches the data type of the index library.
[0110] Step 1108: execute the crawling task, perform data crawling processing on the external search platform, and obtain search result data corresponding to the search record.
[0111] Step 1110: input the search result data into a preset classification model to obtain a classification result for each search result data item.
[0112] Step 1112: Perform classification statistics on the classification results of each search result data to obtain classification statistics results.
[0113] Step 1114: Obtain the ranking position of the search result data in the search result list of the external search platform.
[0114] Step 1116: Determine the weight data corresponding to each search result data according to the preset association relationship between the sort position and the weight data.
[0115] Step 1118: Determine the target category based on the classification statistics and weight data.
[0116] Step 1120: Mark the target category as the category label of the search record, and annotate the search record with the category label.
[0117] Step 1122: Input the search data with category labels as training data into the initial search intent classification model.
[0118] Step 1124 , perform model training on the initial search intent classification model to obtain a search intent classification model for performing search intent classification processing on the input search data.
[0119] It should be understood that although Figure 2-5 、 Figure 7-8 、 Figure 10-11 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. In addition, Figure 2-5 、 Figure 7-8 、 Figure 10-11 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The order of execution of these steps or stages is not necessarily one by one, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0120] In one embodiment, Figure 12 As shown, a labeling device 1200 is provided. The device can be a software module or a hardware module, or a combination of the two to form a part of a computer device. The device specifically includes: a search record acquisition module 1202, an external data acquisition module 1204, a data classification module 1206 and a labeling module 1208, wherein:
[0121] The search record acquisition module 1202 is used to acquire the search records to be marked in the target search system.
[0122] The external data acquisition module 1204 is used to acquire search result data corresponding to the search record from an external search platform.
[0123] The data classification module 1206 is used to input the search result data into a preset classification model to obtain a classification result corresponding to the search result data. The classification category of the classification model is the same as the classification category of the index library of the target search system.
[0124] The labeling module 1208 is used to label the search records with category labels according to the classification results.
[0125] In one embodiment, the label marking device also includes an external search platform determination module for identifying the index library data type of the target search system; and determining the external search platform that matches the index library data type based on the index library data type.
[0126] In one embodiment, the external data acquisition module is further used to construct a crawling task based on the search record; execute the crawling task, perform data crawling processing on the external search platform, and obtain search result data corresponding to the search record.
[0127] In one embodiment, there are multiple search result data; the label marking module is also used to obtain the classification results of each search result data; classify and count the classification results of each search result data to obtain classification statistical results; determine the target category based on the classification statistical results; mark the target category as the category label of the search record; and mark the search record with the category label.
[0128] In one embodiment, the label marking module is also used to obtain the ranking position of the search result data in the search result list of the external search platform; determine the weight data corresponding to each search result data based on the preset correlation relationship between the ranking position and the weight data; and determine the target category based on the classification statistical results and the weight data.
[0129] In one embodiment, the labeling module is further configured to select the category containing the largest number of search result data based on the classification statistics; if there is only one category, the category is determined to be the target category. If there are multiple categories, category probability data corresponding to the search result data contained in each category is obtained, and the target category is selected from the selected categories based on the category probability data corresponding to the search result data contained in each category.
[0130] In one embodiment, the labeling device also includes a search intent classification model training module, which is used to input the search data carrying category labels as training data into the initial search intent classification model; perform model training on the initial search intent classification model to obtain a search intent classification model for performing search intent classification processing on the input search data.
[0131] The above-mentioned labeling device obtains the search result data corresponding to the search record with the help of an external search platform, thereby realizing the expansion of the search results of the search record, and based on inputting the search result data into the classification model, obtains the classification result with the same classification category as the index library classification category of the target search system, thereby realizing the association of the external search result data with the target search system, and then labels the search record with category labels according to the classification result, realizing semi-supervised labeling. By relying on the external search platform, it is not restricted by whether the search system has a large amount of historical search click data. It is suitable for the search system in the cold start stage, effectively improves the labeling efficiency of the search record, and quickly accumulates training data.
[0132] The specific definition of the labeling device can be found in the definition of the labeling method above and will not be repeated here. The various modules in the above-mentioned labeling device can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above modules.
[0133] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 13 As shown. The computer device includes a processor, a memory and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store search result data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a labeling method is implemented.
[0134] Those skilled in the art will understand that Figure 13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0135] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0136] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0137] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of each of the above-described method embodiments.
[0138] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0139] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0140] The above embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A label marking method, characterized in that: The method comprises: Acquire a search record to be marked in a target search system; the target search system is a search system in a cold start phase; the search record includes search data input in the target search system; Acquire search result data corresponding to the search record from an external search platform; the search result type of the external search platform is the same as the index library data type of the target search system; the search result data is a set number of search results according to the order of sorting in the search result list of the external search platform; the order of sorting in the search result list is optimized based on the click selection of the user after the search; Input the search result data into a preset classification model to obtain a classification result corresponding to the search result data, wherein the classification category of the classification model is the same as the classification category of the index library of the target search system; each piece of data in the search result data corresponds to a classification result; Based on the classification result of each search result data, the classification results of each search result data are classified and counted to obtain the classification statistical results; Obtaining the ranking position of the search result data in the search result list of the external search platform; Determine the weight data corresponding to each search result data according to the preset association relationship between the sorting position and the weight data; Determine the target category, the target category is determined in the following manner: for each category in the classification statistics, calculate the product of the cardinality of each search result data and the weight data, accumulate the product of the cardinality of each search result data in the category and the weight data, obtain the calculation result of the category, and take the category with the largest calculation result as the target category; when the classification statistics are based on the number of search result data of the same type as the standard, the cardinality of each search result data is 1, and when the classification statistics are based on the probability data of the same type of search result data as the standard, the cardinality of each search result data is the probability data of the search result data; The target category is marked as a category label of the search record, and the search record is annotated with a category label.
2. The method according to claim 1, characterized in that Before obtaining search result data corresponding to the search record from the external search platform, the method further includes: Identify the data type of the index library of the target search system; According to the index library data type, an external search platform matching the index library data type is determined.
3. The method according to claim 1, characterized in that The acquiring search result data corresponding to the search record from the external search platform includes: According to the search records, a crawling task is constructed; Execute the crawling task, perform data crawling processing on the external search platform, and obtain search result data corresponding to the search record.
4. The method according to claim 1, characterized in that: The method of determining the target category further includes: According to the classification statistics, the category containing the largest number of search result data is screened out; When there are multiple categories, respectively obtain category probability data corresponding to the search result data contained in each category; According to the category probability data corresponding to the search result data contained in each category, a target category is selected from the filtered categories.
5. A label marking device, characterized in that: The device comprises: A search record acquisition module, used to acquire search records to be marked in a target search system; the target search system refers to a search system in a cold start phase; the search records include search data input in the target search system; An external data acquisition module is used to acquire search result data corresponding to the search record from an external search platform; the search result type of the external search platform is the same as the index library data type of the target search system; the search result data is a set number of search results taken according to the order of sorting in the search result list of the external search platform; the order of sorting in the search result list is optimized based on the click selection of the user after the search; A data classification module, used to input the search result data into a preset classification model to obtain a classification result corresponding to the search result data, wherein the classification category of the classification model is the same as the classification category of the index library of the target search system; each piece of data in the search result data corresponds to a classification result; A label marking module is used to classify and count the classification results of each search result data based on the classification result of each search result data to obtain the classification statistical result; obtain the sorting position of the search result data in the search result list of the external search platform; determine the weight data corresponding to each search result data according to the preset association relationship between the sorting position and the weight data; determine the target category; mark the target category as the category label of the search record, and mark the search record with the category label; the method for determining the target category includes: for each category in the classification statistical result, calculate the product of the cardinality of each search result data and the weight data, accumulate the product of the cardinality of each search result data in the category and the weight data to obtain the calculation result of the category, and take the category with the largest calculation result as the target category; when the classification statistics are based on the number of similar search result data, the cardinality of each search result data is 1, and when the classification statistics are based on the probability data of similar search result data, the cardinality of each search result data is the probability data of the search result data.
6. The device according to claim 5, characterized in that The label marking device also includes an external search platform determination module, which is used to identify the index library data type of the target search system; based on the index library data type, determine the external search platform that matches the index library data type.
7. The device according to claim 5, characterized in that The external data acquisition module is also used to construct a crawling task based on the search record; execute the crawling task, perform data crawling processing on the external search platform, and obtain search result data corresponding to the search record.
8. The device according to claim 5, characterized in that The label marking module is also used to filter out the category containing the largest number of search result data according to the classification statistical results; when there are multiple categories, obtain the category probability data corresponding to the search result data contained in each category respectively; According to the category probability data corresponding to the search result data contained in each category, a target category is selected from the filtered categories.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method and system for batch online recovery and software online upgrading
CN104899065A
Search method and device, computer equipment and storage medium
CN110765275A
Label classification method, related device, equipment and storage medium
CN111078885A
Systems, method, and non-transitory computer-readable storage media for multi-modal product classification
US20180121533A1
Method and apparatus for determining categorical attribute of queried word in search
WO2015180622A1
