Search

CN-121996810-A - Searching method, searching device, electronic equipment and storage medium

CN121996810ACN 121996810 ACN121996810 ACN 121996810ACN-121996810-A

Abstract

The invention provides a searching method, a device, electronic equipment and a storage medium, wherein the method comprises the steps of generating a model through a pre-trained searching text, generating searching texts for a plurality of preset types of tag words to obtain a searching text sample with at least one tag word label, training a single tag classification model corresponding to the preset types of tag words based on the searching text sample, wherein the single tag classification model is at least used for determining whether an input searching text belongs to the corresponding preset types of tag words, carrying out combined training on the single tag classification model corresponding to the preset types to obtain a multi-tag classification model, responding to a searching instruction aiming at a target searching text, carrying out tag classification on the target searching text through the multi-tag classification model to obtain a tag classification result, and taking an object corresponding to at least one matched target tag word in the tag classification result as a target searching result. The method and the device can improve the accuracy of searching.

Inventors

  • HUANG QIANG
  • SUN CUIRONG
  • XIE ZHONGQIAN
  • LUO CHUANJIANG

Assignees

  • 杭州网易云音乐科技有限公司

Dates

Publication Date
20260508
Application Date
20251229

Claims (10)

  1. 1. A method of searching, the method comprising: generating search texts for a plurality of preset types of tag words through a pre-trained search text generation model, and obtaining a search text sample with at least one tag word label; Training a single-tag classification model corresponding to the preset type of tag words based on the search text sample, wherein the single-tag classification model is at least used for determining whether the input search text belongs to the corresponding preset type of tag words or not; Performing combined training on the single-label classification model corresponding to the preset type to obtain a multi-label classification model; And responding to a search instruction aiming at a target search text, carrying out tag classification on the target search text through the multi-tag classification model to obtain tag classification results, and taking an object corresponding to at least one matched target tag word in the tag classification results as a target search result.
  2. 2. The method of claim 1, wherein the training process of searching the text generation model comprises: Acquiring a first search text with at least one label word mark of the preset type in a designated field; and carrying out model parameter adjustment on a preset basic model or a pre-trained search text generation model through the first search text to obtain a trained search text generation model.
  3. 3. The method according to claim 1, wherein each of the preset types of tag words includes at least one layer of sub-type tag words, and the search text sample has tag words labeled as a bottom sub-type; based on the search text sample, training a single-tag classification model corresponding to the preset type of tag word, wherein the training step comprises the following steps: Inputting the search text sample into a single-tag classification model corresponding to the preset type of tag words, and performing tag classification on the search text sample through the single-tag classification model to obtain a target classification result; And according to the target classification result and the labeled label words of the corresponding search text sample, carrying out parameter adjustment on the single-label classification model so as to train the single-label classification model.
  4. 4. The method of claim 3, wherein the single tag classification model comprises a base model, a first fully-connected layer, and a second fully-connected layer corresponding to each predetermined type, wherein, The base model is used for extracting features of an input search text, the first full-connection layer is used for classifying the features extracted by the base model in the preset type to obtain a first classification result, and the second full-connection layer corresponding to each preset type is used for classifying the first classification result of the first full-connection layer in the subtype under the corresponding preset type to obtain a target classification result.
  5. 5. The method of claim 1, wherein training the single tag classification model corresponding to the preset type of tag word based on the search text sample comprises: Aiming at the single-label classification model corresponding to each preset type of label word, a search text sample containing the corresponding preset type of label word is input as a positive sample, and a search text sample not containing the corresponding preset type of label word is input as a negative sample, so that the single-label classification model corresponding to the corresponding preset type of label word is trained.
  6. 6. The method of claim 1, wherein the step of performing combined training on the single-tag classification model corresponding to the preset type to obtain a multi-tag classification model comprises the following steps: combining all the single tag classification models corresponding to the preset types to obtain a combined model; Training the combined model through real search data in the appointed field to obtain a multi-label classification model.
  7. 7. The method according to claim 1, wherein the step of performing tag classification on the target search text by the multi-tag classification model in response to a search instruction for the target search text to obtain a tag classification result, and taking an object corresponding to at least one matched target tag word in the tag classification result as a target search result comprises: Responding to a search instruction aiming at a target search text, and carrying out tag classification on the target search text through the multi-tag classification model to obtain a tag classification result; and taking the tag words with the classification probability larger than a certain threshold value in the tag classification result as matched target tag words, and taking the objects corresponding to the target tag words as target search results.
  8. 8. A search apparatus, the apparatus comprising: The sample generation module is used for generating search texts for a plurality of preset types of tag words through a pre-trained search text generation model, and obtaining a search text sample with at least one tag word mark; the first training module is used for training a single-tag classification model corresponding to the preset type tag word based on the search text sample, wherein the single-tag classification model is at least used for determining whether the input search text belongs to the tag word corresponding to the preset type or not; the second training module is used for carrying out combined training on the single-label classification model corresponding to the preset type to obtain a multi-label classification model; The data searching module is used for responding to a searching instruction aiming at the target searching text, carrying out tag classification on the target searching text through the multi-tag classification model to obtain tag classification results, and taking an object corresponding to at least one matched target tag word in the tag classification results as a target searching result.
  9. 9. An electronic device comprising a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the search method of any of claims 1-7.
  10. 10. A computer readable storage medium storing computer executable instructions which, when invoked and executed by a processor, cause the processor to implement the search method of any one of claims 1 to 7.

Description

Searching method, searching device, electronic equipment and storage medium Technical Field The disclosure relates to the technical field of data searching, and in particular relates to a searching method, a searching device, electronic equipment and a storage medium. Background Under partial search scenes, users often search for things such as general search scenes of cloud music search, users may search for songs such as English songs suitable for sports, in order to accurately understand user intention, intention analysis is often needed to be carried out on search texts input by the users, tag words in the intention are extracted, and the search requirement of the users is met through tag recall. In the prior art, a label classification model of a search text is obtained by training the search text with different types of labels in advance, but the model obtained in the mode is difficult to eliminate mutual interference among multiple types of labels, so that the accuracy of the search result is low. Disclosure of Invention In view of the above, an object of the present disclosure is to provide a search method, apparatus, electronic device and storage medium, so as to improve the accuracy of the search. According to the method, a search text is generated through a pre-trained search text generation model, search text samples with at least one label word label are obtained through the multi-label classification model, a single-label classification model corresponding to the label word of the preset type is trained based on the search text samples, the single-label classification model is at least used for determining whether an input search text belongs to the label word corresponding to the preset type, the single-label classification model corresponding to the preset type is combined and trained to obtain a multi-label classification model, a search instruction for a target search text is responded, the target search text is subjected to label classification through the multi-label classification model, a label classification result is obtained, and an object corresponding to at least one matched target label word in the label classification result is used as a target search result. In a second aspect, an embodiment of the disclosure provides a search device, which includes a sample generation module, a first training module, a second training module and a data search module, wherein the sample generation module is used for generating a search text through a pre-trained search text generation model, generating search text for a plurality of preset types of tag words to obtain a search text sample with at least one tag word label, the first training module is used for training a single tag classification model corresponding to the preset types of tag words based on the search text sample, the single tag classification model is at least used for determining whether an input search text belongs to a tag word corresponding to the preset type, the second training module is used for carrying out combined training on the single tag classification model corresponding to the preset type to obtain a multi-tag classification model, the data search module is used for carrying out tag classification on a target search text through the multi-tag classification model to obtain a tag classification result, and an object corresponding to at least one matched target tag word in the tag classification result is used as a target search result. In a third aspect, an embodiment of the present disclosure provides an electronic device including a processor and a memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the above-described search method. In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the above-described search method. The embodiment of the disclosure brings the following beneficial effects: According to the searching method, the device, the electronic equipment and the storage medium, massive search text corpus can be constructed through the search text generation model, and the model can obtain decoupling identification and logic alignment capability with accurate multidimensional intention under rich training samples by adopting the training framework of single-label classification model combination, and can inhibit characteristic interference, so that the accuracy of the search result is improved as a whole. Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the disclosure. The objectives and other advantages of the disclosure will be realized and attained by the structure particularly pointed out in the writt