Nothing Special   »   [go: up one dir, main page]

CN113282832B - Recommendation method and device for search information, electronic equipment and storage medium - Google Patents

Recommendation method and device for search information, electronic equipment and storage medium Download PDF

Info

Publication number
CN113282832B
CN113282832B CN202110648500.6A CN202110648500A CN113282832B CN 113282832 B CN113282832 B CN 113282832B CN 202110648500 A CN202110648500 A CN 202110648500A CN 113282832 B CN113282832 B CN 113282832B
Authority
CN
China
Prior art keywords
search information
information
model
search
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110648500.6A
Other languages
Chinese (zh)
Other versions
CN113282832A (en
Inventor
龚厚瑜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202110648500.6A priority Critical patent/CN113282832B/en
Publication of CN113282832A publication Critical patent/CN113282832A/en
Application granted granted Critical
Publication of CN113282832B publication Critical patent/CN113282832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供了一种搜索信息的推荐方法、装置、电子设备及存储介质,方法包括:获取用户输入的目标搜索信息;根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与目标搜索信息对应的目标特征向量,对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的;根据目标特征向量与对应关系包括的其他搜索信息特征向量之间的相似度,从对应关系包括的搜索信息中确定待推荐搜索信息;基于相似度对待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将推荐搜索信息推荐给用户。可以得到准确的目标特征向量,使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,改善搜索信息推荐效果。

The embodiment of the present invention provides a method, device, electronic device and storage medium for recommending search information, the method comprising: obtaining target search information input by a user; searching for a target feature vector corresponding to the target search information according to a pre-established correspondence between search information and search information feature vectors, the correspondence being established based on the search information feature vectors obtained through the first type of model and the second type of model; determining the search information to be recommended from the search information included in the correspondence according to the similarity between the target feature vector and other search information feature vectors included in the correspondence; sorting the search information to be recommended based on the similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user. An accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.

Description

一种搜索信息的推荐方法、装置、电子设备及存储介质Recommendation method, device, electronic device and storage medium for searching information

技术领域Technical Field

本发明涉及信息搜索技术领域,特别是涉及一种搜索信息的推荐方法、装置、电子设备及存储介质。The present invention relates to the field of information search technology, and in particular to a method, device, electronic device and storage medium for recommending information search.

背景技术Background Art

对于具有搜索功能的网站来说,针对不同的用户进行精准的搜索信息推荐,吸引用户点击推荐的搜索信息进行搜索,可以有效地达到引流的目的。相关技术中的搜索信息的推荐方法可分为两个阶段:召回和排序。其中,排序阶段是对召回的待推荐搜索信息进行打分和排序,最终根据打分和排序的结果确定出所要推荐给用户的搜索信息。For websites with search functions, accurate search information recommendations for different users can be made to attract users to click on the recommended search information for search, which can effectively achieve the purpose of attracting traffic. The search information recommendation method in the related art can be divided into two stages: recall and sorting. Among them, the sorting stage is to score and sort the recalled search information to be recommended, and finally determine the search information to be recommended to the user based on the results of scoring and sorting.

在召回阶段,一般认为用户搜索行为中,在一段时间内,搜索信息连续出现的次数越多的,关联性也就越强;所以电子设备可以通过item2vec模型建立连续出现的次数较多的搜索信息的特征向量之间的关系,这样在获取到用户输入的搜索信息后,可以将该搜索信息输入训练好的item2vec模型中,从而得到与该搜索信息对应的特征向量的相似度较高的相关搜索信息,并将该相关搜索信息推荐给用户。In the recall stage, it is generally believed that in user search behavior, the more times the search information appears continuously within a period of time, the stronger the correlation is; therefore, the electronic device can establish a relationship between the feature vectors of search information that appears continuously for a large number of times through the item2vec model. In this way, after obtaining the search information input by the user, the search information can be input into the trained item2vec model to obtain relevant search information with a high similarity to the feature vector corresponding to the search information, and the relevant search information can be recommended to the user.

然而,在模型训练过程中,获取到的用户在一段时间内输入的搜索信息之间可能毫无关联,例如:用户可能在一段时间内连续搜索了“士兵突击”、“莫吉托”、“西游记”等关联性不强的内容。采用上述方式对模型进行训练后,在用户输入“士兵突击”时,很可能会将“西游记”等不相关的搜索信息作为推荐搜索信息推荐给用户。可见,上述搜索信息的推荐方式中,待推荐搜索信息的召回质量不高,导致搜索信息的推荐缺乏针对性,效果不佳。However, during the model training process, the search information entered by the user within a period of time may have no correlation with each other. For example, the user may have continuously searched for "Soldier Assault", "Mojito", "Journey to the West" and other unrelated content within a period of time. After the model is trained in the above manner, when the user enters "Soldier Assault", irrelevant search information such as "Journey to the West" is likely to be recommended to the user as recommended search information. It can be seen that in the above search information recommendation method, the recall quality of the search information to be recommended is not high, resulting in a lack of pertinence in the recommendation of search information and poor results.

发明内容Summary of the invention

本发明实施例的目的在于提供一种搜索信息的推荐方法、装置、电子设备及存储介质,以提高搜索信息召回质量,进而提升搜索信息推荐针对性,改善搜索信息的推荐效果。具体技术方案如下:The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for recommending search information, so as to improve the recall quality of search information, thereby enhancing the pertinence of search information recommendation and improving the recommendation effect of search information. The specific technical solution is as follows:

第一方面,本发明实施例提供了一种搜索信息的推荐方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for recommending search information, the method comprising:

获取用户输入的目标搜索信息;Get the target search information entered by the user;

根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与所述目标搜索信息对应的目标特征向量,其中,所述对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,所述第一类模型为基于用户历史搜索行为训练得到的,所述第二类模型为基于内容信息训练得到的,所述内容信息为标识所述用户历史搜索行为的具体内容的信息;According to a pre-established correspondence between search information and search information feature vectors, a target feature vector corresponding to the target search information is searched, wherein the correspondence is established based on the search information feature vectors obtained through a first type of model and a second type of model, the first type of model is trained based on the user's historical search behavior, the second type of model is trained based on content information, and the content information is information identifying the specific content of the user's historical search behavior;

根据所述目标特征向量与所述对应关系包括的其他搜索信息特征向量之间的相似度,从所述对应关系包括的搜索信息中确定待推荐搜索信息;Determining the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relationship;

基于所述相似度对所述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将所述推荐搜索信息推荐给用户。The to-be-recommended search information is sorted based on the similarity, and recommended search information is determined based on the sorting result, and the recommended search information is recommended to the user.

可选的,第二类模型的训练方式,包括:Optional training methods for the second type of model include:

获取第二类初始模型及多个第二搜索信息样本;obtaining a second type of initial model and a plurality of second search information samples;

针对每个所述第二搜索信息样本,基于预设标定规则确定该所述第二搜索信息样本的标定信息,其中,所述预设标定规则为基于所述第二搜索信息样本的内容信息设定的;For each of the second search information samples, determining the calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule is set based on the content information of the second search information sample;

将所述第二搜索信息样本输入所述第二类初始模型,基于所述第二类初始模型的当前参数,将所述第二搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述第二搜索信息样本对应的预测信息;Inputting the second search information sample into the second type initial model, converting the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determining prediction information corresponding to the second search information sample based on the feature vector;

基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第二类初始模型收敛,停止训练,以使所述第二类初始模型基于调整后的参数对输入的所述第二搜索信息样本进行处理得到对应的特征向量。Based on the difference between the predicted information and the corresponding calibration information, the current parameters are adjusted until the second type of initial model converges, and the training is stopped so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.

可选的,所述内容信息包括以下至少一种:Optionally, the content information includes at least one of the following:

所述第二搜索信息样本在预设知识图谱中的关联实体信息、所述第二搜索信息样本对应的分词信息、所述第二搜索信息样本的类别标签。The associated entity information of the second search information sample in the preset knowledge graph, the word segmentation information corresponding to the second search information sample, and the category label of the second search information sample.

可选的,所述第二类模型包括第一子模型、第二子模型及第三子模型,所述第一子模型、所述第二子模型及所述第三子模型对应的内容信息分别为所述关联实体信息、所述分词信息及所述类别标签;Optionally, the second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are the associated entity information, the word segmentation information and the category label respectively;

所述第一类模型、所述第一子模型、所述第二子模型及所述第三子模型按照预设训练规则进行交替训练。The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules.

可选的,所述第一类模型的训练方式,包括:Optionally, the training method of the first type of model includes:

获取第一类初始模型及多个第一搜索信息样本,其中,每个所述第一搜索信息样本为预先获取的用户历史搜索行为序列中的搜索信息,所述用户历史搜索行为序列为用户历史搜索行为中连续输入的搜索信息组成的序列;Acquire a first type of initial model and a plurality of first search information samples, wherein each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence of search information continuously input in the user history search behavior;

针对每个所述第一搜索信息样本,选取任一搜索信息作为该第一搜索信息样本的中心搜索信息样本,将所述中心搜索信息样本在该第一搜索信息样本的语境下的其他搜索信息确定为该所述中心搜索信息样本的标定信息;For each of the first search information samples, select any search information as the central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample;

将所述中心搜索信息样本输入所述第一类初始模型,基于所述第一类初始模型的当前参数,将所述中心搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述中心搜索信息样本对应的预测信息;Inputting the center search information sample into the first type of initial model, converting the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determining prediction information corresponding to the center search information sample based on the feature vector;

基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第一类初始模型收敛,停止训练,以使所述第一类初始模型基于调整后的参数对输入的所述中心搜索信息样本进行处理得到对应的特征向量。Based on the difference between the predicted information and the corresponding calibration information, the current parameters are adjusted until the first type of initial model converges, and the training is stopped so that the first type of initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector.

可选的,所述基于所述相似度对所述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将所述推荐搜索信息推荐给用户的步骤,包括:Optionally, the step of sorting the search information to be recommended based on the similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user includes:

按照相似度由高到低的顺序对所述待推荐搜索信息进行排序,得到排序结果;Sorting the search information to be recommended in descending order of similarity to obtain a sorting result;

基于所述排序结果,从所述待推荐搜索信息中选取预设数量个待推荐搜索信息,作为目标信息;Based on the ranking result, selecting a preset number of search information to be recommended from the search information to be recommended as target information;

按照相似度由高到低的顺序,将所述目标信息显示于用户搜索页面的搜索信息推荐区域。The target information is displayed in a search information recommendation area of a user search page in a descending order of similarity.

第二方面,本发明实施例提供了一种搜索信息的推荐装置,所述装置包括:In a second aspect, an embodiment of the present invention provides a device for recommending search information, the device comprising:

搜索信息获取模块,用于获取用户输入的目标搜索信息;A search information acquisition module, used to acquire target search information input by a user;

特征向量查找模块,用于根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与所述目标搜索信息对应的目标特征向量,其中,所述对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,所述第一类模型为第一类模型训练模块基于用户历史搜索行为训练得到的,所述第二类模型为第二类模型训练模块基于内容信息训练得到的,所述内容信息为标识所述用户历史搜索行为的具体内容的信息;A feature vector search module, used to search for a target feature vector corresponding to the target search information according to a pre-established correspondence between search information and search information feature vectors, wherein the correspondence is established based on the search information feature vector obtained through a first type of model and a second type of model, the first type of model is obtained by training a first type of model training module based on user historical search behavior, the second type of model is obtained by training a second type of model training module based on content information, and the content information is information identifying the specific content of the user's historical search behavior;

待推荐搜索信息确定模块,用于根据所述目标特征向量与所述对应关系包括的其他搜索信息特征向量之间的相似度,从所述对应关系包括的搜索信息中确定待推荐搜索信息;A module for determining search information to be recommended, configured to determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and feature vectors of other search information included in the corresponding relationship;

搜索信息推荐模块,用于基于所述相似度对所述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将所述推荐搜索信息推荐给用户。The search information recommendation module is used to sort the search information to be recommended based on the similarity, determine the recommended search information based on the sorting result, and recommend the recommended search information to the user.

可选的,所述第二类模型训练模块包括:Optionally, the second type of model training module includes:

第二样本获取子模块,用于获取第二类初始模型及多个第二搜索信息样本;A second sample acquisition submodule, used to acquire a second type of initial model and a plurality of second search information samples;

第二标定子模块,用于针对每个所述第二搜索信息样本,基于预设标定规则确定该所述第二搜索信息样本的标定信息,其中,所述预设标定规则为基于所述第二搜索信息样本的内容信息设定的;A second calibration submodule, configured to determine, for each of the second search information samples, calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule is set based on content information of the second search information sample;

第二预测子模块,用于将所述第二搜索信息样本输入所述第二类初始模型,基于所述第二类初始模型的当前参数,将所述第二搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述第二搜索信息样本对应的预测信息;a second prediction submodule, configured to input the second search information sample into the second type initial model, convert the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determine prediction information corresponding to the second search information sample based on the feature vector;

第二参数调整子模块,用于基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第二类初始模型收敛,停止训练,以使所述第二类初始模型基于调整后的参数对输入的所述第二搜索信息样本进行处理得到对应的特征向量。The second parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the second type of initial model converges and stops training so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.

可选的,所述内容信息包括以下至少一种:Optionally, the content information includes at least one of the following:

所述搜索信息样本在预设知识图谱中的关联实体信息、所述搜索信息样本对应的分词信息、所述搜索信息样本的类别标签。The associated entity information of the search information sample in the preset knowledge graph, the word segmentation information corresponding to the search information sample, and the category label of the search information sample.

可选的,所述第二类模型包括第一子模型、第二子模型及第三子模型,所述第一子模型、所述第二子模型及所述第三子模型对应的内容信息分别为所述关联实体信息、所述分词信息及所述类别标签;Optionally, the second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are the associated entity information, the word segmentation information and the category label respectively;

所述第一类模型、所述第一子模型、所述第二子模型及所述第三子模型按照预设训练规则通过对应的所述第一类模型训练模块或者所述第二类模型训练模块进行交替训练。The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained through the corresponding first type of model training module or the second type of model training module according to preset training rules.

可选的,所述第一类模型训练模块包括:Optionally, the first type of model training module includes:

第一样本获取模块,用于获取第一类初始模型及多个第一搜索信息样本,其中,每个所述第一搜索信息样本为预先获取的用户历史搜索行为序列中的搜索信息,所述用户历史搜索行为序列为用户历史搜索行为中连续输入的搜索信息组成的序列;A first sample acquisition module, used to acquire a first type of initial model and a plurality of first search information samples, wherein each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence of search information continuously input in the user history search behavior;

第一标定子模块,用于针对每个所述第一搜索信息样本,选取任一搜索信息作为该第一搜索信息样本的中心搜索信息样本,将所述中心搜索信息样本在该第一搜索信息样本的语境下的其他搜索信息确定为该所述中心搜索信息样本的标定信息;A first calibration submodule is configured to select, for each of the first search information samples, any search information as a central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample;

第一预测子模块,用于将所述中心搜索信息样本输入所述第一类初始模型,基于所述第一类初始模型的当前参数,将所述中心搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述中心搜索信息样本对应的预测信息;a first prediction submodule, configured to input the center search information sample into the first type of initial model, convert the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determine prediction information corresponding to the center search information sample based on the feature vector;

第一参数调整子模块,用于基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第一类初始模型收敛,停止训练,以使所述第一类初始模型基于调整后的参数对输入的所述搜索信息样本进行处理得到对应的特征向量。The first parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the first type of initial model converges and stops training so that the first type of initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector.

可选的,所述搜索信息推荐模块包括:Optionally, the search information recommendation module includes:

推荐搜索信息排序子模块,用于按照相似度由高到低的顺序对所述待推荐搜索信息进行排序,得到排序结果;The recommended search information sorting submodule is used to sort the search information to be recommended in descending order of similarity to obtain a sorting result;

推荐搜索信息选取子模块,用于基于所述排序结果,从所述待推荐搜索信息中选取预设数量个待推荐搜索信息,作为目标信息;A recommended search information selection submodule, configured to select a preset number of search information to be recommended from the search information to be recommended as target information based on the sorting result;

推荐搜索信息显示子模块,用于按照相似度由高到低的顺序,将所述目标信息显示于用户搜索页面的搜索信息推荐区域。The recommended search information display submodule is used to display the target information in the search information recommendation area of the user search page in the order of similarity from high to low.

第三方面,本发明实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

存储器,用于存放计算机程序;Memory, used to store computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述第一方面任一所述的方法步骤。The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面任一所述的方法步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of the first aspects are implemented.

本发明实施例提供的方案中,电子设备可以获取用户输入的目标搜索信息,并根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与目标搜索信息对应的目标搜索词特征向量,其中,搜索信息与搜索信息特征向量的对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,第一类模型为基于用户历史搜索行为训练得到的,第二类模型为基于内容信息训练得到的,其中,内容信息为标识用户历史搜索行为的具体内容的信息,根据目标特征向量与对应关系中包括的其他搜索信息特征向量之间的相似度,从对应关系包括的搜索信息中确定待推荐搜索信息,基于相似度对待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,最终电子设备将推荐搜索信息推荐给用户。In the scheme provided by the embodiment of the present invention, the electronic device can obtain the target search information input by the user, and search for the target search word feature vector corresponding to the target search information according to the pre-established correspondence between the search information and the search information feature vector, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, and according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user.

由于在召回阶段,不仅利用基于用户历史搜索行为训练得到的第一类模型,还利用基于用户历史搜索行为的具体内容信息训练得到的第二类模型来确定目标特征向量,可以综合考虑用户历史搜索行为以及与用户历史搜索行为相关的具体内容信息,可以得到更加准确的目标特征向量,从而使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,进而改善搜索信息推荐效果。Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

图1为本发明实施例所提供的一种搜索信息的推荐方法的流程图;FIG1 is a flow chart of a method for recommending search information provided by an embodiment of the present invention;

图2为图1所示实施例中第二类模型的训练方式的一种流程图;FIG2 is a flow chart of a training method for the second type of model in the embodiment shown in FIG1 ;

图3为图2所示实施例中的知识图谱的一种示意图;FIG3 is a schematic diagram of a knowledge graph in the embodiment shown in FIG2 ;

图4为图1所示实施例中第一类模型的训练方式的一种流程图;FIG4 is a flow chart of a training method for the first type of model in the embodiment shown in FIG1 ;

图5为图1所示实施例中搜索信息与搜索信息特征向量之间的对应关系的建立方式的一种示意图;FIG5 is a schematic diagram of a method for establishing a corresponding relationship between search information and a search information feature vector in the embodiment shown in FIG1 ;

图6为图1所示实施例中步骤S104的一种具体流程图;FIG6 is a specific flow chart of step S104 in the embodiment shown in FIG1 ;

图7为本发明实施例所提供的一种搜索信息的推荐装置的结构示意图;FIG7 is a schematic diagram of the structure of a device for recommending search information provided by an embodiment of the present invention;

图8为图7所示实施例中第二类模型训练模块的一种具体结构示意图;FIG8 is a schematic diagram of a specific structure of the second type of model training module in the embodiment shown in FIG7 ;

图9为本发明实施例所提供的一种电子设备的结构示意图。FIG. 9 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

为了提高搜索信息召回质量,进而提升搜索信息推荐的针对性,改善搜索信息的推荐效果,本发明实施例提供了一种搜索信息的推荐方法、装置、电子设备及计算机可读存储介质。下面首先对本发明实施例所提供的一种搜索信息的推荐方法进行介绍。In order to improve the recall quality of search information, thereby enhancing the pertinence of search information recommendation and improving the recommendation effect of search information, an embodiment of the present invention provides a search information recommendation method, device, electronic device and computer-readable storage medium. First, a search information recommendation method provided by an embodiment of the present invention is introduced.

本发明实施例提供的一种搜索信息的推荐方法可以应用于任一需要向用户推荐搜索信息的电子设备,例如,可以为服务器、电脑、处理器等,在此不作具体限定。为了描述清楚,后续称为电子设备。The method for recommending search information provided by the embodiment of the present invention can be applied to any electronic device that needs to recommend search information to a user, for example, a server, a computer, a processor, etc., which is not specifically limited here. For the sake of clarity, it is referred to as an electronic device in the following.

如图1所示,一种搜索信息的推荐方法,所述方法包括:As shown in FIG1 , a method for recommending search information includes:

S101,获取用户输入的目标搜索信息;S101, obtaining target search information input by a user;

S102,根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与所述目标搜索信息对应的目标特征向量;S102, searching for a target feature vector corresponding to the target search information according to a pre-established correspondence between the search information and the search information feature vector;

其中,所述对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,所述第一类模型为基于用户历史搜索行为训练得到的,所述第二类模型为基于内容信息训练得到的,所述内容信息为标识所述用户历史搜索行为的具体内容的信息。Among them, the corresponding relationship is established based on the search information feature vector obtained through the first type of model and the second type of model, the first type of model is trained based on the user's historical search behavior, and the second type of model is trained based on content information, and the content information is information that identifies the specific content of the user's historical search behavior.

S103,根据所述目标特征向量与所述对应关系包括的其他搜索信息特征向量之间的相似度,从所述对应关系包括的搜索信息中确定待推荐搜索信息;S103, determining the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and feature vectors of other search information included in the corresponding relationship;

S104,基于所述相似度对所述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将所述推荐搜索信息推荐给用户。S104, sorting the search information to be recommended based on the similarity, determining recommended search information based on the sorting result, and recommending the recommended search information to the user.

可见,本发明实施例提供的方案中,电子设备可以获取用户输入的目标搜索信息,并根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与目标搜索信息对应的目标搜索词特征向量,其中,搜索信息与搜索信息特征向量的对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,第一类模型为基于用户历史搜索行为训练得到的,第二类模型为基于内容信息训练得到的,其中,内容信息为标识用户历史搜索行为的具体内容的信息,根据目标特征向量与对应关系中包括的其他搜索信息特征向量之间的相似度,从对应关系包括的搜索信息中确定待推荐搜索信息,基于相似度对待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,最终电子设备将推荐搜索信息推荐给用户。由于在召回阶段,不仅利用基于用户历史搜索行为训练得到的第一类模型,还利用基于用户历史搜索行为的具体内容信息训练得到的第二类模型来确定目标特征向量,可以综合考虑用户历史搜索行为以及与用户历史搜索行为相关的具体内容信息,可以得到更加准确的目标特征向量,从而使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,进而改善搜索信息推荐效果。It can be seen that in the scheme provided by the embodiment of the present invention, the electronic device can obtain the target search information input by the user, and according to the pre-established correspondence between the search information and the search information feature vector, find the target search word feature vector corresponding to the target search information, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.

用户在使用网站所提供的搜索功能进行信息搜索时,网站服务器可以在搜索页面向用户推荐相关的搜索信息,吸引用户基于推荐的搜索信息进行搜索,这样可以满足用户的搜索需求,同时可以有效地达到引流的目的。When users use the search function provided by the website to search for information, the website server can recommend relevant search information to users on the search page, attracting users to search based on the recommended search information, which can meet the user's search needs and effectively achieve the purpose of attracting traffic.

电子设备将搜索信息推荐给用户时,一般是基于用户输入的搜索信息,推荐与用户输入的搜索信息相关的搜索信息,那么,在上述步骤S101中,电子设备可以获取用户输入的搜索信息,将其作为目标搜索信息。其中,目标搜索信息即为用户想要搜索的搜索信息。目标搜索信息具体可以为词语、短语或者语句中的任意一种,在此不做具体限定。When the electronic device recommends search information to the user, it is generally based on the search information input by the user, and recommends search information related to the search information input by the user. Then, in the above step S101, the electronic device can obtain the search information input by the user and use it as the target search information. The target search information is the search information that the user wants to search. The target search information can be any one of a word, a phrase or a sentence, which is not specifically limited here.

例如,用户在使用网站提供的搜索功能进行信息搜索时,输入其想要搜索的搜索信息“西游记”,电子设备便可以获取到该搜索信息“西游记”,该获取到的搜索信息“西游记”即为目标搜索信息。For example, when a user uses the search function provided by the website to search for information, he enters the search information "Journey to the West" that he wants to search for, and the electronic device can obtain the search information "Journey to the West". The obtained search information "Journey to the West" is the target search information.

为了确定与用户输入的目标搜索信息具有关联性的待推荐搜索信息,由于目标搜索信息对应的特征向量可以表示用户输入的目标搜索信息的特征,所以在上述步骤S102中,电子设备可以根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与目标搜索信息对应的目标特征向量。In order to determine the recommended search information that is associated with the target search information input by the user, since the feature vector corresponding to the target search information can represent the characteristics of the target search information input by the user, in the above step S102, the electronic device can search for the target feature vector corresponding to the target search information based on the pre-established correspondence between the search information and the search information feature vector.

在一种实施方式中,上述搜索信息与搜索信息特征向量的对应关系可以包括搜索信息与搜索信息特征向量的一一对应关系,可以称之为“词-向量字典”,上述“词-向量字典”可以采用表格方式记录,例如,可以如下表所示:In one implementation, the correspondence between the search information and the search information feature vector may include a one-to-one correspondence between the search information and the search information feature vector, which may be referred to as a “word-vector dictionary”. The “word-vector dictionary” may be recorded in a table, for example, as shown in the following table:

搜索信息ASearch Information A 特征向量aEigenvector a 搜索信息BSearch Information B 特征向量bEigenvector b 搜索信息CSearch Information C 特征向量cEigenvector c 搜索信息DSearch information D 特征向量dEigenvector d

这样,如果目标搜索信息为搜索信息C,那么电子设备便可以根据上述表格中记录的对应关系,确定目标搜索信息对应的目标特征向量为特征向量c。In this way, if the target search information is search information C, the electronic device can determine that the target feature vector corresponding to the target search information is feature vector c according to the corresponding relationship recorded in the above table.

上述搜索信息与搜索信息特征向量的对应关系可以为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的。在一种实施方式中,电子设备可以预先基于用户历史搜索行为对第一类初始模型进行训练得到上述第一类模型。The correspondence between the search information and the search information feature vector may be established based on the search information feature vector obtained through the first model and the second model. In one embodiment, the electronic device may pre-train the first initial model based on the user's historical search behavior to obtain the first model.

用户在搜索页面中输入了搜索信息1,在此后一段时间内又连续输入了搜索信息2、搜索信息3等,那么“搜索信息1-搜索信息2-搜索信息3..搜索信息n”组成搜索信息序列,该搜索信息序列即可以表示该用户的历史搜索行为,其中,n为用户在该段时间内输入的搜索信息的数量。例如,用户在搜索页面中输入了西游记,在此后一段时间内又连续输入了孙悟空以及唐僧,那么“西游记-孙悟空-唐僧”组成搜索信息序列。The user enters search information 1 in the search page, and then enters search information 2, search information 3, etc. in succession within a period of time, then "search information 1-search information 2-search information 3.. search information n" constitutes a search information sequence, which can represent the user's historical search behavior, where n is the number of search information entered by the user during this period of time. For example, the user enters Journey to the West in the search page, and then enters Sun Wukong and Tang Monk in succession within a period of time, then "Journey to the West-Sun Wukong-Tang Monk" constitutes a search information sequence.

通过该方式可以获取多个搜索信息序列,进而可以基于多个搜索信息序列对第一类初始模型进行训练得到第一类模型。将搜索信息输入第一类模型时,该第一类模型可以基于搜索信息对应的特征向量,输出该搜索信息在用户历史搜索行为对应的语境下的其他搜索信息,也就是可以输出与输入的搜索信息同属一个搜索信息序列的其他搜索信息。在第一类模型的训练过程中,其模型参数会不断得到调整,从而搜索信息对应的特征向量也得到不断调整,越来越准确。In this way, multiple search information sequences can be obtained, and then the first type of initial model can be trained based on multiple search information sequences to obtain the first type of model. When the search information is input into the first type of model, the first type of model can output other search information of the search information in the context corresponding to the user's historical search behavior based on the feature vector corresponding to the search information, that is, it can output other search information belonging to the same search information sequence as the input search information. During the training process of the first type of model, its model parameters will be continuously adjusted, so that the feature vector corresponding to the search information will also be continuously adjusted, becoming more and more accurate.

在一种实施方式中,电子设备可以预先基于内容信息,对第二类初始模型进行训练得到上述第二类模型。其中,上述内容信息为标识用户历史搜索行为的具体内容的信息。为了提高特征向量的准确度,除了基于用户历史搜索行为训练得到第一类模型之外,还可以预先训练得到第二类初始模型。In one embodiment, the electronic device may pre-train the second type of initial model based on content information to obtain the above second type of model. The above content information is information identifying the specific content of the user's historical search behavior. In order to improve the accuracy of the feature vector, in addition to training the first type of model based on the user's historical search behavior, the second type of initial model may also be pre-trained.

用户搜索页面中输入了搜索信息,电子设备可以确定能够标识用户历史搜索行为的具体内容的信息,例如,用户搜索页面中输入了搜索信息“西游记”,可以将与能够标识“西游记”的具体内容的“四大名著”、“红楼梦”、“水浒传”及“三国演义”作为内容信息。When a user enters search information in a search page, the electronic device can determine information that can identify the specific content of the user's historical search behavior. For example, when a user enters the search information "Journey to the West" in a search page, the "Four Great Classical Novels", "Dream of Red Mansions", "Water Margin" and "Romance of the Three Kingdoms" that are related to the specific content that can identify "Journey to the West" can be used as content information.

通过该方式可以获取多个搜索信息对应的内容信息,进而可以基于该多个搜索信息及其对应的内容信息对第二类初始模型进行训练得到的第二类模型。将搜索信息输入第二类模型时,该第二类模型可以基于搜索信息对应的特征向量,输出该搜索信息对应的内容信息。在第二类模型的训练过程中,其模型参数会不断得到调整,从而搜索信息对应的特征向量也得到不断调整,越来越准确。In this way, content information corresponding to multiple search information can be obtained, and then the second type of model can be obtained by training the second type of initial model based on the multiple search information and its corresponding content information. When the search information is input into the second type of model, the second type of model can output the content information corresponding to the search information based on the feature vector corresponding to the search information. During the training process of the second type of model, its model parameters will be continuously adjusted, so that the feature vector corresponding to the search information will also be continuously adjusted, and it will become more and more accurate.

在获得上述目标搜索信息对应的目标特征向量后,电子设备可执行上述步骤S103,即根据目标特征向量与上述预先建立的对应关系包括的其他搜索信息特征向量之间的相似度,从该对应关系包括的搜索信息中确定待推荐搜索信息。After obtaining the target feature vector corresponding to the target search information, the electronic device may execute step S103, that is, determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and other search information feature vectors included in the pre-established corresponding relationship.

上述目标特征向量与预先建立的对应关系包括的其他搜索信息特征向量之间的相似度,可以基于各个特征向量之间的距离确定。具体的,针对上述对应关系包括的每个其他搜索信息,电子设备可以确定该其他搜索信息对应的特征向量与目标特征向量的距离,并基于该距离确定该其他搜索信息与目标搜索信息之间的相似度,并根据该相似度从对应关系包括的其他搜索信息中确定待推荐搜索信息。The similarity between the target feature vector and the feature vectors of other search information included in the pre-established correspondence relationship can be determined based on the distance between the feature vectors. Specifically, for each other search information included in the above correspondence relationship, the electronic device can determine the distance between the feature vector corresponding to the other search information and the target feature vector, and determine the similarity between the other search information and the target search information based on the distance, and determine the search information to be recommended from the other search information included in the correspondence relationship based on the similarity.

一般来说,两个特征向量之间的距离越小,那么两个特征向量对应的搜索信息之间的相似度也就越高;反之,两个特征向量之间的距离越大,那么两个特征向量对应的搜索信息之间的相似度也就越低。其中,两个特征向量之间的距离可以为余弦距离、欧氏距离、曼哈顿距离、切比雪夫距离等,在此不做具体限定。Generally speaking, the smaller the distance between two feature vectors, the higher the similarity between the search information corresponding to the two feature vectors; conversely, the larger the distance between two feature vectors, the lower the similarity between the search information corresponding to the two feature vectors. The distance between two feature vectors can be cosine distance, Euclidean distance, Manhattan distance, Chebyshev distance, etc., which is not specifically limited here.

作为一种实施方式,针对目标特征向量a和上述对应关系包括的任一其他搜索信息的特征向量b来说,目标特征向量a与特征向量b之间的余弦距离为:As an implementation manner, for the target feature vector a and the feature vector b of any other search information included in the above correspondence, the cosine distance between the target feature vector a and the feature vector b is:

其中,<a,b>为目标特征向量a与特征向量b之间的内积,|a|为目标特征向量a的长度,|b|为特征向量b的长度,θ为目标特征向量a与特征向量b之间的夹角。当cosθ越接近1时,说明方向也就越接近,上述两个特征向量之间的距离越小,那么上述两个特征向量对应的搜索信息之间的相似度也就越高;当cosθ越接近-1时,说明方向相差也就越大,上述两个特征向量之间的距离越大,那么上述两个特征向量对应的搜索信息之间的相似度也就越低。Among them, <a,b> is the inner product between the target feature vector a and the feature vector b, |a| is the length of the target feature vector a, |b| is the length of the feature vector b, and θ is the angle between the target feature vector a and the feature vector b. When cosθ is closer to 1, the directions are closer, the distance between the two feature vectors is smaller, and the similarity between the search information corresponding to the two feature vectors is higher; when cosθ is closer to -1, the directions are different, the distance between the two feature vectors is larger, and the similarity between the search information corresponding to the two feature vectors is lower.

在确定待推荐搜索信息后,电子设备即可基于相似度对上述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将推荐搜索信息推荐给用户,也就是执行上述步骤S104。After determining the search information to be recommended, the electronic device can sort the search information to be recommended based on similarity, determine recommended search information based on the sorting result, and recommend the recommended search information to the user, that is, execute the above step S104.

例如,电子设备确定了待推荐搜索信息1、待推荐搜索信息2、待推荐搜索信息3,上述待推荐搜索信息与用户输入的搜索信息之间的相似度分别为:0.75、0.55、0.99。电子设备可以基于相似度对待推荐搜索信息排序,根据相似度从高到低的排序进行排序,得到排序结果如下表所示:For example, the electronic device determines the recommended search information 1, the recommended search information 2, and the recommended search information 3, and the similarities between the recommended search information and the search information input by the user are 0.75, 0.55, and 0.99, respectively. The electronic device can sort the recommended search information based on the similarity, and sort them from high to low according to the similarity, and the sorting results are shown in the following table:

序号Serial number 相似度Similarity 排序结果Sorting results 11 0.990.99 待推荐搜索信息3Recommended search information 3 22 0.750.75 待推荐搜索信息1Recommended search information 1 33 0.550.55 待推荐搜索信息2Recommended search information 2

那么,在一种实施方式中,电子设备可以基于上表所示的相似度的排序结果,将相似度最高的待推荐搜索信息3作为推荐搜索信息推荐给用户。Then, in one implementation, the electronic device may recommend the to-be-recommended search information 3 with the highest similarity as the recommended search information to the user based on the ranking results of the similarities shown in the above table.

通过上述搜索信息的推荐方法,电子设备可以在获得用户输入的搜索信息后,根据基于用户历史搜索行为和内容信息训练后得到的第一类模型与第二类模型建立的搜索信息与搜索信息特征向量的对应关系,可以综合考虑用户历史搜索行为以及与用户历史搜索行为相关的具体内容信息,可以得到更加准确的目标特征向量,从而使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,进而改善搜索信息推荐效果。Through the above-mentioned search information recommendation method, after obtaining the search information input by the user, the electronic device can, based on the correspondence between the search information and the search information feature vector established by the first type of model and the second type of model obtained after training based on the user's historical search behavior and content information, comprehensively consider the user's historical search behavior and the specific content information related to the user's historical search behavior, and can obtain a more accurate target feature vector, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.

作为本发明实施例的一种实施方式,如图2所示,上述第二类模型的训练方式,可以包括:As an implementation of an embodiment of the present invention, as shown in FIG2 , the training method of the second type of model may include:

S201,获取第二类初始模型及多个第二搜索信息样本;S201, obtaining a second type of initial model and a plurality of second search information samples;

为了训练得到第二类模型,电子设备可以获取第二类初始模型及多个第二搜索信息样本。其中,第二类初始模型可以为多分类神经网络模型等。第二搜索信息样本可以预先获取的用户历史搜索行为中包括的搜索信息。In order to train the second type of model, the electronic device may obtain a second type of initial model and a plurality of second search information samples, wherein the second type of initial model may be a multi-classification neural network model, etc. The second search information samples may be search information included in the user's historical search behavior acquired in advance.

S202,针对每个所述第二搜索信息样本,基于预设标定规则确定该所述第二搜索信息样本的标定信息;S202: for each second search information sample, determine calibration information of the second search information sample based on a preset calibration rule;

针对每个第二搜索信息样本,电子设备可以基于预设标定规则确定该所述第二搜索信息样本的标定信息,其中,预设标定规则可以为基于第二搜索信息样本的内容信息设定的。基于该预设标定规则确定的第二搜索信息样本的标定信息可以标识第二搜索信息样本的具体内容。For each second search information sample, the electronic device may determine the calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule may be set based on the content information of the second search information sample. The calibration information of the second search information sample determined based on the preset calibration rule may identify the specific content of the second search information sample.

例如,第二搜索信息样本为“西游记”时,由于“孙悟空”是“西游记”中的主要角色,“西游记”属于“明清小说”,“西游”属于“西游记”的分词结果,因此“孙悟空”、“明清小说”、“西游”可以标识第二搜索信息样本“西游记”的具体内容,所以电子设备可以将“孙悟空”、“明清小说”、“西游”作为第二搜索信息样本“西游记”的标定信息。For example, when the second search information sample is "Journey to the West", since "Sun Wukong" is the main character in "Journey to the West", "Journey to the West" belongs to "Ming and Qing Novels", and "Journey to the West" is the word segmentation result of "Journey to the West", "Sun Wukong", "Ming and Qing Novels", and "Journey to the West" can identify the specific content of the second search information sample "Journey to the West", so the electronic device can use "Sun Wukong", "Ming and Qing Novels", and "Journey to the West" as the calibration information of the second search information sample "Journey to the West".

S203,将所述第二搜索信息样本输入所述第二类初始模型,基于所述第二类初始模型的当前参数,将所述第二搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述第二搜索信息样本对应的预测信息;S203, inputting the second search information sample into the second type initial model, converting the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determining prediction information corresponding to the second search information sample based on the feature vector;

在对第二类初始模型进行训练的过程中,电子设备可以将每个第二搜索信息样本输入第二类初始模型,第二类初始模型可以基于当前参数将第二搜索信息样本转化为对应的特征向量,并基于特征向量确定第二搜索信息样本对应的预测信息。During the training of the second type of initial model, the electronic device can input each second search information sample into the second type of initial model. The second type of initial model can convert the second search information sample into a corresponding feature vector based on the current parameters, and determine the prediction information corresponding to the second search information sample based on the feature vector.

S204,基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第二类初始模型收敛,停止训练,以使所述第二类初始模型基于调整后的参数对输入的所述第二搜索信息样本进行处理得到对应的特征向量。S204, based on the difference between the predicted information and the corresponding calibration information, adjust the current parameters until the second type of initial model converges, and stop training so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.

当前的第二类初始模型的模型参数很可能不合适,导致根据当前的模型参数将第二搜索信息样本转化为对应的特征向量并不准确,进而基于特征向量确定第二搜索信息样本对应的预测信息时,也很可能无法准确确定预测信息。因此,在得到每个第二搜索信息样本的预测信息之后,电子设备可以基于每个第二搜索信息样本的标定信息与预测信息之间的差异,调整第二类初始模型的模型参数,以使第二类初始模型的模型的参数更加合适,这样,根据调整后的模型参数将第二搜索信息样本转化为对应的特征向量时便可以得到准确的特征向量。The model parameters of the current second type of initial model are likely to be inappropriate, resulting in inaccurate conversion of the second search information sample into the corresponding feature vector based on the current model parameters, and further, when the prediction information corresponding to the second search information sample is determined based on the feature vector, the prediction information may not be accurately determined. Therefore, after obtaining the prediction information of each second search information sample, the electronic device can adjust the model parameters of the second type of initial model based on the difference between the calibration information and the prediction information of each second search information sample to make the model parameters of the second type of initial model more appropriate, so that when the second search information sample is converted into the corresponding feature vector based on the adjusted model parameters, an accurate feature vector can be obtained.

其中,上述调整第二类初始模型的模型参数的方式可以为梯度下降算法、随机梯度下降算法等模型参数调整方式,在此不做具体限定及说明。Among them, the above-mentioned method of adjusting the model parameters of the second type of initial model can be a model parameter adjustment method such as a gradient descent algorithm, a stochastic gradient descent algorithm, etc., which is not specifically limited or explained here.

为了确定上述第二类初始模型是否收敛,电子设备可以判断第二类初始模型的迭代次数是否达到预设次数,或者,第二类初始模型的预测结果的准确度是否大于预设值。In order to determine whether the second type initial model converges, the electronic device may determine whether the number of iterations of the second type initial model reaches a preset number, or whether the accuracy of the prediction result of the second type initial model is greater than a preset value.

如果第二类初始模型的迭代次数达到预设次数,或者,第二类初始模型的预测结果的准确度大于预设值,说明第二类初始模型已经收敛,也就是说,当前第二类初始模型可以准确确定第二搜索信息样本对应的特征向量,所以此时可以停止训练,得到第二类模型。此时基于第二类模型得到的第二搜索信息样本对应的特征向量是准确的。If the number of iterations of the second type of initial model reaches the preset number, or the accuracy of the prediction result of the second type of initial model is greater than the preset value, it means that the second type of initial model has converged, that is, the current second type of initial model can accurately determine the feature vector corresponding to the second search information sample, so the training can be stopped at this time to obtain the second type of model. At this time, the feature vector corresponding to the second search information sample obtained based on the second type of model is accurate.

其中,上述预设次数可以根据预测结果的准确度要求、模型结构等因素设定,例如,可以为6000次、9000次、12000次等,在此不做具体限定。预设值可以根据预测结果的准确度要求、模型结构等因素设定,例如可以为0.91、0.89、0.90等,在此不做具体限定。The above-mentioned preset number of times can be set according to the accuracy requirements of the prediction results, the model structure and other factors, for example, it can be 6000 times, 9000 times, 12000 times, etc., which are not specifically limited here. The preset value can be set according to the accuracy requirements of the prediction results, the model structure and other factors, for example, it can be 0.91, 0.89, 0.90, etc., which are not specifically limited here.

如果第二类初始模型的迭代次数没有达到预设次数,或者,第二类初始模型的预测结果的准确度不大于预设值,说明第二类初始模型还未收敛,也就是说,当前第二类初始模型还无法准确确定第二搜索信息样本对应的特征向量,那么电子设备需要继续训练第二类初始模型。If the number of iterations of the second type of initial model does not reach the preset number, or the accuracy of the prediction result of the second type of initial model is not greater than the preset value, it means that the second type of initial model has not converged, that is, the current second type of initial model cannot accurately determine the feature vector corresponding to the second search information sample, then the electronic device needs to continue training the second type of initial model.

可见,本发明实施例所提供的方案中,电子设备可以通过上述方式对第二类初始模型进行训练,得到第二类模型。这样,电子设备可以获得能够基于第二搜索信息样本中的内容信息准确确定该第二搜索信息样本对应的特征向量的第二类模型。It can be seen that in the solution provided by the embodiment of the present invention, the electronic device can train the second type of initial model in the above manner to obtain the second type of model. In this way, the electronic device can obtain the second type of model that can accurately determine the feature vector corresponding to the second search information sample based on the content information in the second search information sample.

作为本发明实施例的一种实施方式,上述内容信息可以包括以下至少一种:第二搜索信息样本在预设知识图谱中的关联实体信息、第二搜索信息样本对应的分词信息、第二搜索信息样本的类别标签。As an implementation mode of an embodiment of the present invention, the above-mentioned content information may include at least one of the following: associated entity information of the second search information sample in a preset knowledge graph, word segmentation information corresponding to the second search information sample, and category label of the second search information sample.

当电子设备训练上述第二类初始模型,确定第二搜索信息样本的标定信息时,可以选择第二搜索信息样本在预设知识图谱中的关联实体信息、第二搜索信息样本对应的分词信息、第二搜索信息样本的类别标签中的至少一种作为能够标识第二搜索信息样本的具体内容的标定信息。When the electronic device trains the above-mentioned second type of initial model and determines the calibration information of the second search information sample, it can select at least one of the associated entity information of the second search information sample in the preset knowledge graph, the word segmentation information corresponding to the second search information sample, and the category label of the second search information sample as the calibration information that can identify the specific content of the second search information sample.

在一种实施方式中,为了确定第二搜索信息样本在预设知识图谱中的关联实体信息,电子设备可以预先建立包括各个搜索信息的知识图谱。进而在需要确定第二搜索信息样本在预设知识图谱中的关联实体信息时,从预设知识图谱中查找到与该第二搜索信息样本相关联的实体信息,再以关联到的实体信息为起点,按照预设规则进行遍历,确定第二搜索信息样本在预设知识图谱中的关联实体信息。在预设知识图谱包括该第二搜索信息样本时,第二搜索信息样本在预设知识图谱中的实体信息即为第二搜索信息样本本身,在预设知识图谱不包括该第二搜索信息样本时,第二搜索信息样本在预设知识图谱中对应的实体信息可以为与第二搜索信息样本词义相近的实体信息。In one embodiment, in order to determine the associated entity information of the second search information sample in the preset knowledge graph, the electronic device can pre-establish a knowledge graph including various search information. Then, when it is necessary to determine the associated entity information of the second search information sample in the preset knowledge graph, the entity information associated with the second search information sample is found from the preset knowledge graph, and then the associated entity information is used as the starting point to traverse according to the preset rules to determine the associated entity information of the second search information sample in the preset knowledge graph. When the preset knowledge graph includes the second search information sample, the entity information of the second search information sample in the preset knowledge graph is the second search information sample itself. When the preset knowledge graph does not include the second search information sample, the entity information corresponding to the second search information sample in the preset knowledge graph can be entity information with a similar meaning to the second search information sample.

其中,上述预设游走规则可以为根据实体与实体之间存在的上下位关系、并列关系、整体-部分关系、因果关系中的任意一种或者多种关系在知识图谱的实体间进行遍历直到达到预设条件时停止遍历,在此不做具体限定。Among them, the above-mentioned preset roaming rules can be to traverse the entities in the knowledge graph according to any one or more of the hierarchical relationships, parallel relationships, whole-part relationships, and causal relationships between entities until the traversal is stopped when the preset conditions are met, and no specific limitation is made here.

在一种实施方式中,上述遍历过程中所遍历到的所有关联实体信息以及上述第二搜索信息样本在预设知识图谱中对应的实体信息均可以作为第二搜索信息样本的标定信息,其中,上述预设条件可以为遍历到的实体个数达到预设阈值、游走过程距离达到预设长度等,在此不做具体限定。In one embodiment, all the related entity information traversed during the above-mentioned traversal process and the entity information corresponding to the above-mentioned second search information sample in the preset knowledge graph can be used as calibration information of the second search information sample, wherein the above-mentioned preset conditions can be that the number of traversed entities reaches a preset threshold, the walking process distance reaches a preset length, etc., which are not specifically limited here.

例如,如图3所示,当第二搜索信息样本310为“西游记”时,电子设备可以在预设的知识图谱320中,将第二搜索信息样本310“西游记”关联到上述知识图谱中的实体信息321“西游记”上,实体信息321“西游记”即为第二搜索信息样本310的关联实体信息。进而电子设备可以以关联实体信息321作为起点,根据整体-部分关系遍历至实体信息322“孙悟空”,根据上下位关系遍历至实体信息323“四大名著”,根据并列关系遍历至实体信息324“红楼梦”。电子设备还可以继续以实体信息322“孙悟空”为起点根据相关关系遍历至实体信息325“大闹天宫”。至此,遍历到的实体信息个数为4,达到预设条件,电子设备可以终止遍历。上述实体信息“西游记”、“孙悟空”、“四大名著”、“红楼梦”、“大闹天宫”均可以作为第二搜索信息样本“西游记”在预设知识图谱中的关联实体信息。最后,电子设备可以将上述关联实体信息确定为第二搜索信息样本“西游记”的标定信息。For example, as shown in FIG3 , when the second search information sample 310 is “Journey to the West”, the electronic device can associate the second search information sample 310 “Journey to the West” with the entity information 321 “Journey to the West” in the above-mentioned knowledge graph in the preset knowledge graph 320, and the entity information 321 “Journey to the West” is the associated entity information of the second search information sample 310. Then, the electronic device can use the associated entity information 321 as the starting point, traverse to the entity information 322 “Sun Wukong” according to the whole-part relationship, traverse to the entity information 323 “Four Great Classics” according to the superior-subordinate relationship, and traverse to the entity information 324 “Dream of Red Mansions” according to the parallel relationship. The electronic device can also continue to use the entity information 322 “Sun Wukong” as the starting point and traverse to the entity information 325 “Havoc in Heaven” according to the related relationship. At this point, the number of entity information traversed is 4, and the preset condition is met, and the electronic device can terminate the traversal. The above entity information "Journey to the West", "Sun Wukong", "Four Great Classics", "Dream of Red Mansions", and "Havoc in Heaven" can all be used as the associated entity information of the second search information sample "Journey to the West" in the preset knowledge graph. Finally, the electronic device can determine the above associated entity information as the calibration information of the second search information sample "Journey to the West".

在一种实施方式中,电子设备可以对第二搜索信息样本进行分词处理,并将分词处理后得到的分词信息作为第二搜索信息样本的标定信息。其中,分词处理可以采用文本信息处理领域的任一分词处理方式,在此不做具体限定及说明。In one implementation, the electronic device may perform word segmentation processing on the second search information sample, and use the word segmentation information obtained after the word segmentation processing as the calibration information of the second search information sample. The word segmentation processing may adopt any word segmentation processing method in the field of text information processing, which is not specifically limited or described here.

例如,当第二搜索信息样本为“西游记之孙悟空三打白骨精”时,电子设备可以对上述第二搜索信息样本进行分词处理,得到“西游”、“西游记”、“孙悟空”、“白骨精”、“三打白骨精”等分词信息,上述分词信息均可以标识上述第二搜索信息样本“西游记之孙悟空三打白骨精”的具体内容,电子设备可以将上述分词信息确定为第二搜索信息样本“西游记之孙悟空三打白骨精”的标定信息。For example, when the second search information sample is "Journey to the West: The Monkey King Strikes the White Bone Demon Three Times", the electronic device can perform word segmentation processing on the above second search information sample to obtain word segmentation information such as "Journey to the West", "Journey to the West", "Sun Wukong", "White Bone Demon", "Three Strikes on the White Bone Demon", etc. The above word segmentation information can all identify the specific content of the above second search information sample "Journey to the West: The Monkey King Strikes the White Bone Demon Three Times", and the electronic device can determine the above word segmentation information as the calibration information of the second search information sample "Journey to the West: The Monkey King Strikes the White Bone Demon Three Times".

在一种实施方式中,电子设备可以预先根据第二搜索信息样本的具体内容为第二搜索信息样本确定类别标签,并将该类别标签确定为第二搜索信息样本的标定信息。其中,该类别标签可以为任意能够表示该第二搜索信息样本的类别特征的标签,对于其具体形式在此不做具体限定,例如,可以为数字、字母等。In one implementation, the electronic device may determine a category label for the second search information sample in advance according to the specific content of the second search information sample, and determine the category label as the calibration information of the second search information sample. The category label may be any label that can represent the category characteristics of the second search information sample, and its specific form is not specifically limited herein, for example, it may be a number, a letter, etc.

例如,当第二搜索信息样本为“西游记”时,电子设备可以根据预先确定分类规则确定第二搜索信息样本“西游记”的类别,进而确定第二搜索信息样本“西游记”的标签,例如,可以为“电视剧”、“明清小说”等类别标签。进而,电子设备可以将类别标签确定为第二搜索信息样本“西游记”的标定信息。For example, when the second search information sample is "Journey to the West", the electronic device can determine the category of the second search information sample "Journey to the West" according to a predetermined classification rule, and then determine a label of the second search information sample "Journey to the West", for example, the label can be a category label such as "TV series", "Ming and Qing novels", etc. Then, the electronic device can determine the category label as the calibration information of the second search information sample "Journey to the West".

可见,在本实施例中,电子设备可以将能够从不同维度标识第二搜索信息样本的具体内容的关联实体信息、分词信息和/或类别标签确定为标定信息。这样,基于标定信息训练得到的第二类模型能够根据从不同维度标识第二搜索信息样本的具体内容的标定信息更准确地确定第二搜索信息样本对应的特征向量,电子设备也就可以建立更加准确的搜索信息与搜索信息特征向量的对应关系。It can be seen that in this embodiment, the electronic device can determine the associated entity information, word segmentation information and/or category label that can identify the specific content of the second search information sample from different dimensions as the calibration information. In this way, the second type of model trained based on the calibration information can more accurately determine the feature vector corresponding to the second search information sample according to the calibration information that identifies the specific content of the second search information sample from different dimensions, and the electronic device can also establish a more accurate correspondence between the search information and the search information feature vector.

作为本发明实施例的一种实施方式,如图4所示,上述第一类模型的训练方式,可以包括:As an implementation of an embodiment of the present invention, as shown in FIG4 , the training method of the first type of model may include:

S401,获取第一类初始模型及多个第一搜索信息样本;S401, obtaining a first type of initial model and a plurality of first search information samples;

首先,电子设备可以获取第一类初始模型及多个第一搜索信息样本。其中,第一类初始模型可以为神经网络模型等,在此不做具体限定。First, the electronic device may obtain a first type of initial model and a plurality of first search information samples, wherein the first type of initial model may be a neural network model, etc., which is not specifically limited here.

其中,每个第一搜索信息样本可以为电子设备预先获取的用户历史搜索行为序列中的搜索信息,用户历史搜索行为序列为用户历史搜索行为中连续输入的搜索信息所组成的序列;Each first search information sample may be search information in a user's historical search behavior sequence pre-acquired by the electronic device, and the user's historical search behavior sequence is a sequence composed of search information continuously input in the user's historical search behavior;

例如,用户在一段时间内连续输入搜索信息“西游记”、“孙悟空”、“唐僧”,那么在该用户历史搜索行为中,“西游记”、“孙悟空”、“唐僧”即为用户连续输入的搜索信息,“西游记-孙悟空-唐僧”即为用户历史搜索行为序列,电子设备可以将“西游记-孙悟空-唐僧”这一用户历史搜索行为序列作为一个第一搜索信息样本。For example, a user continuously inputs the search information "Journey to the West", "Sun Wukong", and "Tang Monk" within a period of time. Then in the user's historical search behavior, "Journey to the West", "Sun Wukong", and "Tang Monk" are the search information continuously input by the user, and "Journey to the West-Sun Wukong-Tang Monk" is the user's historical search behavior sequence. The electronic device can use the user's historical search behavior sequence "Journey to the West-Sun Wukong-Tang Monk" as a first search information sample.

S402,针对每个所述第一搜索信息样本,选取任一搜索信息作为该第一搜索信息样本的中心搜索信息样本,将所述中心搜索信息样本在该第一搜索信息样本的语境下的其他搜索信息确定为该所述中心搜索信息样本的标定信息;S402, for each of the first search information samples, select any search information as the central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample;

获取了多个第一搜索信息样本后,针对每个第一搜索信息样本,电子设备可以选取该第一搜索信息样本中的任一搜索信息作为该第一搜索信息样本的中心搜索信息样本,将中心搜索信息样本在该第一搜索信息样本的语境下的其他搜索信息确定为该中心搜索信息样本的标定信息。也就是说,电子设备可以将该第一搜索信息样本所包括的除该中心搜索信息样本之外的其他搜索信息作为该中心搜索信息样本的标定信息。After obtaining multiple first search information samples, for each first search information sample, the electronic device can select any search information in the first search information sample as the central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as the calibration information of the central search information sample. In other words, the electronic device can use other search information included in the first search information sample except the central search information sample as the calibration information of the central search information sample.

例如,电子设备获取到的第一搜索信息样本为“西游记-孙悟空-唐僧”,可以从中选取“孙悟空”作为中心搜索信息样本,则在搜索信息“西游记”、“唐僧”即可以作为中心搜索信息样本“孙悟空”的标定信息。For example, the first search information sample acquired by the electronic device is "Journey to the West - Sun Wukong - Tang Monk", and "Sun Wukong" can be selected as the central search information sample. Then, in the search information "Journey to the West" and "Tang Monk", the calibration information of the central search information sample "Sun Wukong" can be used.

S403,将所述中心搜索信息样本输入所述第一类初始模型,基于所述第一类初始模型的当前参数,将所述中心搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述中心搜索信息样本对应的预测信息;S403, inputting the center search information sample into the first type of initial model, converting the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determining prediction information corresponding to the center search information sample based on the feature vector;

在对第一类初始模型进行训练的过程中,电子设备可以将每个中心搜索信息样本输入第一类初始模型,第一类初始模型便可以基于当前参数,将中心搜索信息样本转化为对应的特征向量,并基于特征向量确定中心搜索信息样本对应的预测信息。During the training of the first type of initial model, the electronic device can input each center search information sample into the first type of initial model, and the first type of initial model can convert the center search information sample into a corresponding feature vector based on the current parameters, and determine the prediction information corresponding to the center search information sample based on the feature vector.

S404,基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第一类初始模型收敛,停止训练,以使所述第一类初始模型基于调整后的参数对输入的所述中心搜索信息样本进行处理得到对应的特征向量。S404, based on the difference between the predicted information and the corresponding calibration information, adjust the current parameters until the first type of initial model converges, and stop training so that the first type of initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector.

当前的第一类初始模型的模型参数很可能不合适,导致根据当前的第一类初始模型的模型参数将中心搜索信息样本转化为对应的特征向量并不准确,进而基于该特征向量确定中心搜索信息样本对应的预测信息时,也很可能无法准确确定中心搜索样本对应的特征向量,进而导致预测信息不准确。因此,在得到上述每个中心搜索信息样本的标定信息及预测信息之后,电子设备可以基于每个中心搜索信息样本的标定信息与预测信息之间的差异,调整第一类初始模型的模型参数,以使第一类初始模型的模型的参数更加合适,这样,根据调整后的模型参数将第一搜索信息样本转化为对应的特征向量时便可以得到准确的特征向量。The model parameters of the current first-class initial model are likely to be inappropriate, resulting in inaccurate conversion of the center search information sample into the corresponding feature vector based on the model parameters of the current first-class initial model. When the prediction information corresponding to the center search information sample is determined based on the feature vector, it is also likely that the feature vector corresponding to the center search sample cannot be accurately determined, resulting in inaccurate prediction information. Therefore, after obtaining the calibration information and prediction information of each of the above-mentioned center search information samples, the electronic device can adjust the model parameters of the first-class initial model based on the difference between the calibration information and the prediction information of each center search information sample to make the model parameters of the first-class initial model more appropriate. In this way, when the first search information sample is converted into the corresponding feature vector according to the adjusted model parameters, an accurate feature vector can be obtained.

如果第一类初始模型的迭代次数达到预设次数,或者,第一类初始模型的预测结果的准确度大于预设值,说明第一类初始模型已经收敛,也就是说,当前第一类初始模型可以准确确定中心搜索信息样本对应的特征向量,所以此时可以停止训练,得到训练后的第一类模型。此时基于第一类模型得到的第一搜索信息样本对应的特征向量是准确的。If the number of iterations of the first type of initial model reaches the preset number, or the accuracy of the prediction result of the first type of initial model is greater than the preset value, it means that the first type of initial model has converged, that is, the current first type of initial model can accurately determine the feature vector corresponding to the central search information sample, so the training can be stopped at this time to obtain the trained first type of model. At this time, the feature vector corresponding to the first search information sample obtained based on the first type of model is accurate.

如果第一类初始模型的迭代次数没有达到预设次数,或者,第一类初始模型的预测结果的准确度不大于预设值,说明第一类初始模型还未收敛,也就是说,当前第一类初始模型还无法准确确定中心搜索信息样本对应的特征向量,那么电子设备需要继续训练第一类初始模型。If the number of iterations of the first type of initial model does not reach the preset number, or the accuracy of the prediction result of the first type of initial model is not greater than the preset value, it means that the first type of initial model has not converged, that is, the current first type of initial model cannot accurately determine the feature vector corresponding to the central search information sample, then the electronic device needs to continue training the first type of initial model.

可见,本发明实施例所提供的方案中,电子设备可以通过上述方式对第一类初始模型进行训练,得到第一类模型。这样,电子设备可以获得能够基于第一搜索信息样本中的中心搜索信息样本准确确定该中心搜索信息样本对应的特征向量的第一类模型。It can be seen that in the solution provided by the embodiment of the present invention, the electronic device can train the first type of initial model in the above manner to obtain the first type of model. In this way, the electronic device can obtain the first type of model that can accurately determine the feature vector corresponding to the central search information sample in the first search information sample based on the central search information sample.

作为本发明实施例的一种实施方式,如图5所示,上述第二类模型520可以包括第一子模型521、第二子模型522及第三子模型523,所述第一子模型、所述第二子模型及所述第三子模型对应的内容信息分别为第二搜索信息样本关联实体信息、分词信息及类别标签。第一类模型510根据中心搜索信息样本在第一搜索信息样本中语境下的搜索信息进行训练。在这种情况下,第一类模型510、第一子模型521、第二子模型522及第三子模型523可以按照预设训练规则进行交替训练。As an implementation of an embodiment of the present invention, as shown in FIG5 , the second type of model 520 may include a first sub-model 521, a second sub-model 522 and a third sub-model 523, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are the second search information sample associated entity information, word segmentation information and category label. The first type of model 510 is trained according to the search information of the central search information sample in the context of the first search information sample. In this case, the first type of model 510, the first sub-model 521, the second sub-model 522 and the third sub-model 523 can be alternately trained according to the preset training rules.

电子设备预先建立的搜索信息与特征向量之间的对应关系530中,搜索信息的特征向量是基于第一类模型和第二类模型处理得到的。在训练第一类模型和第二类模型的过程中,每进行一次迭代,第一类模型和第二类模型的参数都会进行一次调整,因此下一次迭代时,基于当前参数确定的第一搜索信息样本或第二搜索信息样本对应的特征向量也会随着发生改变,即每进行一次迭代便更新一次搜索信息与特征向量之间的对应关系,直到训练结束,得到第一类模型和第二类模型,同时也得到了最终的搜索信息与特征向量之间的对应关系。In the correspondence 530 between the search information and the feature vector pre-established by the electronic device, the feature vector of the search information is obtained based on the first type of model and the second type of model. In the process of training the first type of model and the second type of model, the parameters of the first type of model and the second type of model are adjusted once for each iteration, so in the next iteration, the feature vector corresponding to the first search information sample or the second search information sample determined based on the current parameters will also change accordingly, that is, the correspondence between the search information and the feature vector is updated once for each iteration until the training is completed, the first type of model and the second type of model are obtained, and the final correspondence between the search information and the feature vector is also obtained.

为了可以更加使特征向量更加准确,可以采用交替训练的方式来训练得到第一类模型和第二类模型。作为一种实施方式,可以将上述多个第一搜索信息样本划分为若干组样本,同样的,也可以将上述多个第二搜索信息样本划分为若干组样本。其中,每组样本包括的第一搜索信息样本或第二搜索信息样本的数量可以根据第一搜索信息样本或第二搜索信息样本的总数量等因素确定,例如,可以为10、50、100等,在此不做具体限定。In order to make the feature vector more accurate, an alternating training method can be used to train the first type of model and the second type of model. As an implementation method, the above-mentioned multiple first search information samples can be divided into several groups of samples, and similarly, the above-mentioned multiple second search information samples can also be divided into several groups of samples. Among them, the number of first search information samples or second search information samples included in each group of samples can be determined based on factors such as the total number of first search information samples or second search information samples, for example, it can be 10, 50, 100, etc., and is not specifically limited here.

进而,可以为采用一组第一搜索信息样本对第一类模型进行训练之后,各采用一组第二搜索信息样本分别对第一子模型、第二子模型或者第三子模型,在训练过程中,不断更新搜索信息与特征向量之间的对应关系。Furthermore, after using a group of first search information samples to train the first type of model, a group of second search information samples can be used for the first sub-model, the second sub-model or the third sub-model respectively. During the training process, the correspondence between the search information and the feature vector is continuously updated.

作为一种实施方式,交替训练的方式具体可以为:步骤A,利用第一组第一搜索信息样本训练第一类模型,同时更新搜索信息与特征向量之间的对应关系;步骤B,利用第一组第二搜索信息样本训练第一子模型,同时更新搜索信息与特征向量之间的对应关系;步骤C,利用第二组第二搜索信息样本训练第二子模型,同时更新搜索信息与特征向量之间的对应关系;步骤D,利用第三组第二搜索信息样本训练第三子模型,同时更新搜索信息与特征向量之间的对应关系;步骤E,利用第二组第一搜索信息样本训练第一类模型,同时更新搜索信息与特征向量之间的对应关系。以此类推,直到训练结束,便可以准确的搜索信息与特征向量之间的对应关系,也就是得到上述“词-向量字典”。As an implementation method, the alternating training method can be specifically as follows: Step A, using the first group of first search information samples to train the first type of model, and updating the corresponding relationship between the search information and the feature vector; Step B, using the first group of second search information samples to train the first sub-model, and updating the corresponding relationship between the search information and the feature vector; Step C, using the second group of second search information samples to train the second sub-model, and updating the corresponding relationship between the search information and the feature vector; Step D, using the third group of second search information samples to train the third sub-model, and updating the corresponding relationship between the search information and the feature vector; Step E, using the second group of first search information samples to train the first type of model, and updating the corresponding relationship between the search information and the feature vector. And so on, until the end of the training, the correspondence between the search information and the feature vector can be accurately obtained, that is, the above-mentioned "word-vector dictionary" is obtained.

可见,在本实施例中,电子设备可以通过不同的搜索信息样本训练对应的第一类模型、第一子模型、第二子模型或者第三子模型,同时更新搜索信息与特征向量之间的对应关系。这样,不仅利用了用户历史搜索行为训练第一类模型,更新搜索信息与特征向量之间的对应关系,还可以采用与用户历史搜索信息相关的内容信息训练第二类模型,更新搜索信息与特征向量的之间对应关系。可以综合考虑用户历史搜索行为以及与用户历史搜索行为相关的具体内容信息,进而可以得到更加准确的目标特征向量,从而使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,进一步改善搜索信息推荐效果。It can be seen that in this embodiment, the electronic device can train the corresponding first type model, first sub-model, second sub-model or third sub-model through different search information samples, and update the correspondence between the search information and the feature vector. In this way, not only the user's historical search behavior is used to train the first type model and update the correspondence between the search information and the feature vector, but also the content information related to the user's historical search information can be used to train the second type model and update the correspondence between the search information and the feature vector. The user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and then a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is further improved.

作为本发明实施例的一种实施方式,如图6所示,上述基于相似度对待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将该推荐搜索信息推荐给用户的步骤,可以包括:As an implementation of an embodiment of the present invention, as shown in FIG6 , the steps of sorting the recommended search information based on similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user may include:

S601,按照相似度由高到低的顺序对所述待推荐搜索信息进行排序,得到排序结果;S601, sorting the search information to be recommended in descending order of similarity to obtain a sorting result;

电子设备确定了上述待推荐搜索信息后,为了确定需要向用户推荐的推荐搜索信息,电子设备可以按照相似度由高到低的顺序对待推荐搜索信息进行排序,进而得到排序结果。After the electronic device determines the above-mentioned search information to be recommended, in order to determine the recommended search information that needs to be recommended to the user, the electronic device can sort the recommended search information in order of similarity from high to low, and then obtain the sorting result.

例如,电子设备确定了待推荐搜索信息1-待推荐搜索信息5,各个待推荐搜索信息对应的相似度分别为:0.75、0.55、0.99、0.87、0.35。电子设备可以按照相似度由高到低的顺序对待推荐搜索信息进行排序,得到排序结果,如下表所示:For example, the electronic device determines the recommended search information 1 to the recommended search information 5, and the similarities corresponding to the recommended search information are 0.75, 0.55, 0.99, 0.87, and 0.35 respectively. The electronic device can sort the recommended search information in descending order of similarity to obtain the sorting result as shown in the following table:

序号Serial number 相似度Similarity 排序结果Sorting results 11 0.990.99 待推荐搜索信息3Recommended search information 3 22 0.870.87 待推荐搜索信息4Recommended search information 4 33 0.750.75 待推荐搜索信息1Recommended search information 1 44 0.550.55 待推荐搜索信息2Recommended search information 2 55 0.350.35 待推荐搜索信息5Recommended search information 5

S602,基于所述排序结果,从所述待推荐搜索信息中选取预设数量个待推荐搜索信息,作为目标信息;S602, based on the ranking result, selecting a preset number of search information to be recommended from the search information to be recommended as target information;

确定了上述排序结果后,电子设备可以基于该排序结果,从待推荐搜索信息中选取预设数量个待推荐搜索信息,作为目标信息。其中,预设数量可以根据实际推荐需求等因素确定,预设数量可以小于待推荐搜索信息的总数量,当然,也可以等于待推荐搜索信息的总数量,这都是合理的。After determining the above ranking results, the electronic device can select a preset number of search information to be recommended from the search information to be recommended as target information based on the ranking results. The preset number can be determined based on factors such as actual recommendation needs, and the preset number can be less than the total number of search information to be recommended, and of course, it can also be equal to the total number of search information to be recommended, which is reasonable.

在一种实施方式中,电子设备可以选取排序结果中靠前的预设数量个待推荐搜索信息作为目标信息。例如,预设数量为3,基于上表所示的排序结果,电子设备可以选择排序结果中的前三个待推荐搜索信息作为目标信息,即“待推荐搜索信息3”、“待推荐搜索信息4”及“待推荐搜索信息1”。In one embodiment, the electronic device may select a preset number of search information to be recommended in the sorting results as target information. For example, the preset number is 3. Based on the sorting results shown in the above table, the electronic device may select the first three search information to be recommended in the sorting results as target information, namely, "search information to be recommended 3", "search information to be recommended 4" and "search information to be recommended 1".

S603,按照相似度由高到低的顺序,将所述目标信息显示于用户搜索页面的搜索信息推荐区域。S603: Display the target information in a search information recommendation area of a user search page in descending order of similarity.

电子设备确定目标信息后,可以按照相似度由高到低的顺序,将目标信息显示在用户搜索页面的搜索信息推荐区域。作为一种实施方式,可以按照相似度由高到低的顺序,将对应的目标信息从上至下显示于搜索信息推荐区域,这样,用户可以优先看到与目标搜索信息相似度高的目标信息,方便用户进行信息搜索。After the electronic device determines the target information, it can display the target information in the search information recommendation area of the user search page in the order of high to low similarity. As an implementation method, the corresponding target information can be displayed from top to bottom in the search information recommendation area in the order of high to low similarity, so that the user can preferentially see the target information with high similarity to the target search information, which is convenient for the user to search for information.

可见,在本实施例中,电子设备可以按照相似度由高到低的顺序对待推荐搜索信息进行排序,得到排序结果,基于排序结果,从待推荐搜索信息中选取预设数量个待推荐搜索信息,作为目标信息,进而,按照相似度由高到低的顺序,将目标信息显示于用户搜索页面的搜索信息推荐区域。这样,电子设备可以根据相似度由高到低的顺序将目标信息推荐给用户,将相似度高的目标信息优先推荐给用户,提高了搜索信息推荐的针对性和准确性,从而改善推荐效果。It can be seen that in this embodiment, the electronic device can sort the search information to be recommended in the order of similarity from high to low to obtain the sorting result, and based on the sorting result, select a preset number of search information to be recommended from the search information to be recommended as target information, and then display the target information in the search information recommendation area of the user search page in the order of similarity from high to low. In this way, the electronic device can recommend the target information to the user in the order of similarity from high to low, and give priority to recommending the target information with high similarity to the user, thereby improving the pertinence and accuracy of the search information recommendation, thereby improving the recommendation effect.

相应于上述搜索信息的推荐方法,本发明实施例还提供了一种搜索信息的推荐装置,下面对本发明实施例所提供的一种搜索信息的推荐装置进行介绍。Corresponding to the above-mentioned method for recommending search information, an embodiment of the present invention further provides a device for recommending search information. The following is an introduction to the device for recommending search information provided by an embodiment of the present invention.

如图7所示,一种搜索信息的推荐装置,所述装置包括:As shown in FIG. 7 , a device for recommending search information includes:

搜索信息获取模块710,用于获取用户输入的目标搜索信息;Search information acquisition module 710, used to acquire target search information input by the user;

特征向量查找模块720,用于根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与所述目标搜索信息对应的目标特征向量;The feature vector search module 720 is used to search for a target feature vector corresponding to the target search information according to a pre-established correspondence between the search information and the search information feature vector;

其中,所述对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,所述第一类模型为第一类模型训练模块基于用户历史搜索行为训练得到的,所述第二类模型为第二类模型训练模块基于内容信息训练得到的,所述内容信息为标识所述用户历史搜索行为的具体内容的信息。Among them, the corresponding relationship is established based on the search information feature vector obtained through the first type of model and the second type of model, the first type of model is obtained by training the first type of model training module based on the user's historical search behavior, and the second type of model is obtained by training the second type of model training module based on content information, and the content information is information that identifies the specific content of the user's historical search behavior.

待推荐搜索信息确定模块730,用于根据所述目标特征向量与所述对应关系包括的其他搜索信息特征向量之间的相似度,从所述对应关系包括的搜索信息中确定待推荐搜索信息;A module 730 for determining search information to be recommended, configured to determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and feature vectors of other search information included in the corresponding relationship;

搜索信息推荐模块740,用于基于所述相似度对所述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将所述推荐搜索信息推荐给用户。The search information recommendation module 740 is used to sort the search information to be recommended based on the similarity, determine the recommended search information based on the sorting result, and recommend the recommended search information to the user.

可见,本发明实施例提供的方案中,电子设备可以获取用户输入的目标搜索信息,并根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与目标搜索信息对应的目标搜索词特征向量,其中,搜索信息与搜索信息特征向量的对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,第一类模型为基于用户历史搜索行为训练得到的,第二类模型为基于内容信息训练得到的,其中,内容信息为标识用户历史搜索行为的具体内容的信息,根据目标特征向量与对应关系中包括的其他搜索信息特征向量之间的相似度,从对应关系包括的搜索信息中确定待推荐搜索信息,基于相似度对待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,最终电子设备将推荐搜索信息推荐给用户。由于在召回阶段,不仅利用基于用户历史搜索行为训练得到的第一类模型,还利用基于用户历史搜索行为的具体内容信息训练得到的第二类模型来确定目标特征向量,可以综合考虑用户历史搜索行为以及与用户历史搜索行为相关的具体内容信息,可以得到更加准确的目标特征向量,从而使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,进而改善搜索信息推荐效果。It can be seen that in the scheme provided by the embodiment of the present invention, the electronic device can obtain the target search information input by the user, and according to the pre-established correspondence between the search information and the search information feature vector, find the target search word feature vector corresponding to the target search information, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.

作为本发明实施例的一种实施方式,如图8所示,上述第二类模型训练模块可以包括:As an implementation of an embodiment of the present invention, as shown in FIG8 , the second type of model training module may include:

第二样本获取子模块810,用于获取第二类初始模型及多个第二搜索信息样本;The second sample acquisition submodule 810 is used to acquire a second type of initial model and a plurality of second search information samples;

第二标定子模块820,用于针对每个所述第二搜索信息样本,基于预设标定规则确定该所述第二搜索信息样本的标定信息;A second calibration submodule 820, configured to determine, for each second search information sample, calibration information of the second search information sample based on a preset calibration rule;

其中,所述预设标定规则为基于所述第二搜索信息样本的内容信息设定的。The preset calibration rule is set based on the content information of the second search information sample.

第二预测子模块830,用于将所述第二搜索信息样本输入所述第二类初始模型,基于所述第二类初始模型的当前参数,将所述第二搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述第二搜索信息样本对应的预测信息;A second prediction submodule 830 is configured to input the second search information sample into the second type initial model, convert the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determine prediction information corresponding to the second search information sample based on the feature vector;

第二参数调整子模块840,用于基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第二类初始模型收敛,停止训练,以使所述第二类初始模型基于调整后的参数对输入的所述第二搜索信息样本进行处理得到对应的特征向量。The second parameter adjustment submodule 840 is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the second type of initial model converges and stops training so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.

作为本发明实施例的一种实施方式,上述内容信息可以包括以下至少一种:第二搜索信息样本在预设知识图谱中的关联实体信息、第二搜索信息样本对应的分词信息、第二搜索信息样本的类别标签。As an implementation mode of an embodiment of the present invention, the above-mentioned content information may include at least one of the following: associated entity information of the second search information sample in a preset knowledge graph, word segmentation information corresponding to the second search information sample, and category label of the second search information sample.

作为本发明实施例的一种实施方式,上述第一类模型训练模块可以包括:As an implementation of an embodiment of the present invention, the first type of model training module may include:

第一样本获取子模块,用于获取第一类初始模型及多个第一搜索信息样本;A first sample acquisition submodule, used to acquire a first type of initial model and a plurality of first search information samples;

其中,每个所述第一搜索信息样本为预先获取的用户历史搜索行为序列中的搜索信息,所述用户历史搜索行为序列为用户历史搜索行为中连续输入的搜索信息组成的序列。Each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence consisting of search information continuously input in the user history search behavior.

第一标定子模块,用于针对每个所述第一搜索信息样本,选取任一搜索信息作为该第一搜索信息样本的中心搜索信息样本,将所述中心搜索信息样本在该第一搜索信息样本的语境下的其他搜索信息确定为该所述中心搜索信息样本的标定信息;A first calibration submodule is configured to select, for each of the first search information samples, any search information as a central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample;

第一预测子模块,用于将所述中心搜索信息样本输入所述第一类初始模型,基于所述第一类初始模型的当前参数,将所述中心搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述中心搜索信息样本对应的预测信息;a first prediction submodule, configured to input the center search information sample into the first type of initial model, convert the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determine prediction information corresponding to the center search information sample based on the feature vector;

第一参数调整子模块,用于基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第一类初始模型收敛,停止训练,以使所述第一类初始模型基于调整后的参数对输入的所述搜索信息样本进行处理得到对应的特征向量。The first parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the first type of initial model converges and stops training so that the first type of initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector.

作为本发明实施例的一种实施方式,上述第二类模型包括第一子模型、第二子模型及第三子模型,所述第一子模型、所述第二子模型及所述第三子模型对应的内容信息分别为所述关联实体信息、所述分词信息及所述类别标签;As an implementation manner of an embodiment of the present invention, the above-mentioned second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are respectively the associated entity information, the word segmentation information and the category label;

所述第一类模型、所述第一子模型、所述第二子模型及所述第三子模型按照预设训练规则通过对应的所述第一类模型训练模块或者所述第二类模型训练模块进行交替训练。The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules through the corresponding first type of model training module or the second type of model training module.

作为本发明的一种实施方式,上述搜索信息推荐模块740可以包括:As an implementation of the present invention, the search information recommendation module 740 may include:

推荐搜索信息排序子模块,用于按照相似度由高到低的顺序对所述待推荐搜索信息进行排序,得到排序结果;The recommended search information sorting submodule is used to sort the search information to be recommended in descending order of similarity to obtain a sorting result;

推荐搜索信息选取子模块,用于基于所述排序结果,从所述待推荐搜索信息中选取预设数量个待推荐搜索信息,作为目标信息;A recommended search information selection submodule, configured to select a preset number of search information to be recommended from the search information to be recommended as target information based on the sorting result;

推荐搜索信息显示子模块,用于按照相似度由高到低的顺序,将所述目标信息显示于用户搜索页面的搜索信息推荐区域。The recommended search information display submodule is used to display the target information in the search information recommendation area of the user search page in the order of similarity from high to low.

本发明实施例还提供了一种电子设备,如图9所示,包括处理器901、通信接口902、存储器903和通信总线904,其中,处理器901,通信接口902,存储器903通过通信总线904完成相互间的通信,The embodiment of the present invention further provides an electronic device, as shown in FIG9 , including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

存储器903,用于存放计算机程序;Memory 903, used for storing computer programs;

处理器901,用于执行存储器903上所存放的程序时,实现上述任一实施例所述的搜索信息的推荐方法步骤。The processor 901 is configured to implement the steps of the recommended method for searching information described in any of the above embodiments when executing the program stored in the memory 903 .

可见,本发明实施例提供的方案中,电子设备可以获取用户输入的目标搜索信息,并根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与目标搜索信息对应的目标搜索词特征向量,其中,搜索信息与搜索信息特征向量的对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,第一类模型为基于用户历史搜索行为训练得到的,第二类模型为基于内容信息训练得到的,其中,内容信息为标识用户历史搜索行为的具体内容的信息,根据目标特征向量与对应关系中包括的其他搜索信息特征向量之间的相似度,从对应关系包括的搜索信息中确定待推荐搜索信息,基于相似度对待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,最终电子设备将推荐搜索信息推荐给用户。由于在召回阶段,不仅利用基于用户历史搜索行为训练得到的第一类模型,还利用基于用户历史搜索行为的具体内容信息训练得到的第二类模型来确定目标特征向量,可以综合考虑用户历史搜索行为以及与用户历史搜索行为相关的具体内容信息,可以得到更加准确的目标特征向量,从而使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,进而改善搜索信息推荐效果。It can be seen that in the scheme provided by the embodiment of the present invention, the electronic device can obtain the target search information input by the user, and according to the pre-established correspondence between the search information and the search information feature vector, find the target search word feature vector corresponding to the target search information, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.

上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral ComponentInterconnect,简称PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,简称EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the above electronic device and other devices.

存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processor,简称DSP)、专用集成电路(Application SpecificIntegrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

在本发明提供的又一实施例中,还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述实施例中任一所述的搜索信息的推荐方法。In another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for recommending search information described in any of the above embodiments is implemented.

可见,本发明实施例提供的方案中,计算机可读存储介质中存储有指令在计算机上运行时,可以获取用户输入的目标搜索信息,并根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与目标搜索信息对应的目标搜索词特征向量,其中,搜索信息与搜索信息特征向量的对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,第一类模型为基于用户历史搜索行为训练得到的,第二类模型为基于内容信息训练得到的,其中,内容信息为标识用户历史搜索行为的具体内容的信息,根据目标特征向量与对应关系中包括的其他搜索信息特征向量之间的相似度,从对应关系包括的搜索信息中确定待推荐搜索信息,基于相似度对待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,最终电子设备将推荐搜索信息推荐给用户。由于在召回阶段,不仅利用基于用户历史搜索行为训练得到的第一类模型,还利用基于用户历史搜索行为的具体内容信息训练得到的第二类模型来确定目标特征向量,可以综合考虑用户历史搜索行为以及与用户历史搜索行为相关的具体内容信息,可以得到更加准确的目标特征向量,从而使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,进而改善搜索信息推荐效果。It can be seen that in the scheme provided by the embodiment of the present invention, the computer-readable storage medium stores instructions that, when executed on a computer, can obtain the target search information input by the user, and find the target search term feature vector corresponding to the target search information based on the pre-established correspondence between the search information and the search information feature vector, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained through the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, and according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.

在本发明提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的搜索信息的推荐方法。In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer executes the method for recommending search information described in any one of the above embodiments.

可见,本发明实施例提供的方案中,包含指令的计算机程序产品在计算机上运行时,可以获取用户输入的目标搜索信息,并根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与目标搜索信息对应的目标搜索词特征向量,其中,搜索信息与搜索信息特征向量的对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,第一类模型为基于用户历史搜索行为训练得到的,第二类模型为基于内容信息训练得到的,其中,内容信息为标识用户历史搜索行为的具体内容的信息,根据目标特征向量与对应关系中包括的其他搜索信息特征向量之间的相似度,从对应关系包括的搜索信息中确定待推荐搜索信息,基于相似度对待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,最终电子设备将推荐搜索信息推荐给用户。由于在召回阶段,不仅利用基于用户历史搜索行为训练得到的第一类模型,还利用基于用户历史搜索行为的具体内容信息训练得到的第二类模型来确定目标特征向量,可以综合考虑用户历史搜索行为以及与用户历史搜索行为相关的具体内容信息,可以得到更加准确的目标特征向量,从而使得基于目标特征向量确定的待推荐搜索信息更加具有针对性,召回质量得到提高,进而改善搜索信息推荐效果。It can be seen that in the scheme provided by the embodiment of the present invention, when the computer program product containing instructions is run on a computer, it can obtain the target search information input by the user, and find the target search word feature vector corresponding to the target search information according to the pre-established correspondence between the search information and the search information feature vector, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relationship, the search information to be recommended is determined from the search information included in the corresponding relationship, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备、计算机可读存储介质以及计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (14)

1.一种搜索信息的推荐方法,其特征在于,所述方法包括:1. A method for recommending search information, characterized in that the method comprises: 获取用户输入的目标搜索信息;Get the target search information entered by the user; 根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与所述目标搜索信息对应的目标特征向量,其中,所述对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,所述第一类模型为基于用户历史搜索行为训练得到的,所述第二类模型为基于内容信息训练得到的,所述内容信息为标识所述用户历史搜索行为的具体内容的信息;According to a pre-established correspondence between search information and search information feature vectors, a target feature vector corresponding to the target search information is searched, wherein the correspondence is established based on the search information feature vectors obtained through a first type of model and a second type of model, the first type of model is trained based on the user's historical search behavior, the second type of model is trained based on content information, and the content information is information identifying the specific content of the user's historical search behavior; 根据所述目标特征向量与所述对应关系包括的其他搜索信息特征向量之间的相似度,从所述对应关系包括的搜索信息中确定待推荐搜索信息;Determining the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relationship; 基于所述相似度对所述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将所述推荐搜索信息推荐给用户;sorting the search information to be recommended based on the similarity, determining recommended search information based on the sorting result, and recommending the recommended search information to the user; 其中,所述第一类模型用于基于搜索信息对应的特征向量,输出与该搜索信息同属一个搜索信息序列的其他搜索信息,搜索信息序列为历史用户在预设时长内输入的各个搜索信息所组成的序列;所述第二类模型用于基于搜索信息对应的特征向量,输出该搜索信息对应的内容信息。Among them, the first type of model is used to output other search information belonging to the same search information sequence as the search information based on the feature vector corresponding to the search information, and the search information sequence is a sequence composed of various search information input by historical users within a preset time length; the second type of model is used to output content information corresponding to the search information based on the feature vector corresponding to the search information. 2.根据权利要求1所述的方法,其特征在于,所述第二类模型的训练方式,包括:2. The method according to claim 1, characterized in that the training method of the second type of model includes: 获取第二类初始模型及多个第二搜索信息样本;obtaining a second type of initial model and a plurality of second search information samples; 针对每个所述第二搜索信息样本,基于预设标定规则确定该所述第二搜索信息样本的标定信息,其中,所述预设标定规则为基于所述第二搜索信息样本的内容信息设定的;For each of the second search information samples, determining the calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule is set based on the content information of the second search information sample; 将所述第二搜索信息样本输入所述第二类初始模型,基于所述第二类初始模型的当前参数,将所述第二搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述第二搜索信息样本对应的预测信息;Inputting the second search information sample into the second type initial model, converting the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determining prediction information corresponding to the second search information sample based on the feature vector; 基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第二类初始模型收敛,停止训练,以使所述第二类初始模型基于调整后的参数对输入的所述第二搜索信息样本进行处理得到对应的特征向量。Based on the difference between the predicted information and the corresponding calibration information, the current parameters are adjusted until the second type of initial model converges, and the training is stopped so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector. 3.根据权利要求2所述的方法,其特征在于,所述内容信息包括以下至少一种:3. The method according to claim 2, wherein the content information includes at least one of the following: 所述第二搜索信息样本在预设知识图谱中的关联实体信息、所述第二搜索信息样本对应的分词信息、所述第二搜索信息样本的类别标签。The associated entity information of the second search information sample in the preset knowledge graph, the word segmentation information corresponding to the second search information sample, and the category label of the second search information sample. 4.根据权利要求3所述的方法,其特征在于,所述第二类模型包括第一子模型、第二子模型及第三子模型,所述第一子模型、所述第二子模型及所述第三子模型对应的内容信息分别为所述关联实体信息、所述分词信息及所述类别标签;4. The method according to claim 3 is characterized in that the second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are the associated entity information, the word segmentation information and the category label respectively; 所述第一类模型、所述第一子模型、所述第二子模型及所述第三子模型按照预设训练规则进行交替训练。The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules. 5.根据权利要求1所述的方法,其特征在于,所述第一类模型的训练方式,包括:5. The method according to claim 1, characterized in that the training method of the first type of model comprises: 获取第一类初始模型及多个第一搜索信息样本,其中,每个所述第一搜索信息样本为预先获取的用户历史搜索行为序列中的搜索信息,所述用户历史搜索行为序列为用户历史搜索行为中连续输入的搜索信息组成的序列;Acquire a first type of initial model and a plurality of first search information samples, wherein each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence of search information continuously input in the user history search behavior; 针对每个所述第一搜索信息样本,选取任一搜索信息作为该第一搜索信息样本的中心搜索信息样本,将所述中心搜索信息样本在该第一搜索信息样本的语境下的其他搜索信息确定为该所述中心搜索信息样本的标定信息;For each of the first search information samples, select any search information as the central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample; 将所述中心搜索信息样本输入所述第一类初始模型,基于所述第一类初始模型的当前参数,将所述中心搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述中心搜索信息样本对应的预测信息;Inputting the center search information sample into the first type of initial model, converting the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determining prediction information corresponding to the center search information sample based on the feature vector; 基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第一类初始模型收敛,停止训练,以使所述第一类初始模型基于调整后的参数对输入的所述中心搜索信息样本进行处理得到对应的特征向量。Based on the difference between the predicted information and the corresponding calibration information, the current parameters are adjusted until the first type of initial model converges, and the training is stopped so that the first type of initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector. 6.根据权利要求1-5任一项所述的方法,其特征在于,所述基于所述相似度对所述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将所述推荐搜索信息推荐给用户的步骤,包括:6. The method according to any one of claims 1 to 5, characterized in that the step of sorting the search information to be recommended based on the similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user comprises: 按照相似度由高到低的顺序对所述待推荐搜索信息进行排序,得到排序结果;Sorting the search information to be recommended in descending order of similarity to obtain a sorting result; 基于所述排序结果,从所述待推荐搜索信息中选取预设数量个待推荐搜索信息,作为目标信息;Based on the ranking result, selecting a preset number of search information to be recommended from the search information to be recommended as target information; 按照相似度由高到低的顺序,将所述目标信息显示于用户搜索页面的搜索信息推荐区域。The target information is displayed in a search information recommendation area of a user search page in a descending order of similarity. 7.一种搜索信息的推荐装置,其特征在于,所述装置包括:7. A device for recommending search information, characterized in that the device comprises: 搜索信息获取模块,用于获取用户输入的目标搜索信息;A search information acquisition module, used to acquire target search information input by a user; 特征向量查找模块,用于根据预先建立的搜索信息与搜索信息特征向量的对应关系,查找与所述目标搜索信息对应的目标特征向量,其中,所述对应关系为基于通过第一类模型和第二类模型得到的搜索信息特征向量建立的,所述第一类模型为第一类模型训练模块基于用户历史搜索行为训练得到的,所述第二类模型为第二类模型训练模块基于内容信息训练得到的,所述内容信息为标识所述用户历史搜索行为的具体内容的信息;A feature vector search module, used to search for a target feature vector corresponding to the target search information according to a pre-established correspondence between search information and search information feature vectors, wherein the correspondence is established based on the search information feature vector obtained through a first type of model and a second type of model, the first type of model is obtained by training a first type of model training module based on user historical search behavior, the second type of model is obtained by training a second type of model training module based on content information, and the content information is information identifying the specific content of the user's historical search behavior; 待推荐搜索信息确定模块,用于根据所述目标特征向量与所述对应关系包括的其他搜索信息特征向量之间的相似度,从所述对应关系包括的搜索信息中确定待推荐搜索信息;A module for determining search information to be recommended, configured to determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and feature vectors of other search information included in the corresponding relationship; 搜索信息推荐模块,用于基于所述相似度对所述待推荐搜索信息进行排序,并基于排序结果确定推荐搜索信息,将所述推荐搜索信息推荐给用户;A search information recommendation module, configured to sort the search information to be recommended based on the similarity, determine recommended search information based on the sorting result, and recommend the recommended search information to the user; 其中,所述第一类模型用于基于搜索信息对应的特征向量,输出与该搜索信息同属一个搜索信息序列的其他搜索信息,搜索信息序列为历史用户在预设时长内输入的各个搜索信息所组成的序列;所述第二类模型用于基于搜索信息对应的特征向量,输出该搜索信息对应的内容信息。Among them, the first type of model is used to output other search information belonging to the same search information sequence as the search information based on the feature vector corresponding to the search information, and the search information sequence is a sequence composed of various search information input by historical users within a preset time length; the second type of model is used to output content information corresponding to the search information based on the feature vector corresponding to the search information. 8.根据权利要求7所述的装置,其特征在于,所述第二类模型训练模块包括:8. The device according to claim 7, characterized in that the second type of model training module comprises: 第二样本获取子模块,用于获取第二类初始模型及多个第二搜索信息样本;A second sample acquisition submodule, used to acquire a second type of initial model and a plurality of second search information samples; 第二标定子模块,用于针对每个所述第二搜索信息样本,基于预设标定规则确定该所述第二搜索信息样本的标定信息,其中,所述预设标定规则为基于所述第二搜索信息样本的内容信息设定的;A second calibration submodule, configured to determine, for each of the second search information samples, calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule is set based on content information of the second search information sample; 第二预测子模块,用于将所述第二搜索信息样本输入所述第二类初始模型,基于所述第二类初始模型的当前参数,将所述第二搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述第二搜索信息样本对应的预测信息;a second prediction submodule, configured to input the second search information sample into the second type initial model, convert the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determine prediction information corresponding to the second search information sample based on the feature vector; 第二参数调整子模块,用于基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第二类初始模型收敛,停止训练,以使所述第二类初始模型基于调整后的参数对输入的所述第二搜索信息样本进行处理得到对应的特征向量。The second parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the second type of initial model converges and stops training so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector. 9.根据权利要求8所述的装置,其特征在于,所述内容信息包括以下至少一种:9. The device according to claim 8, wherein the content information includes at least one of the following: 所述搜索信息样本在预设知识图谱中的关联实体信息、所述搜索信息样本对应的分词信息、所述搜索信息样本的类别标签。The associated entity information of the search information sample in the preset knowledge graph, the word segmentation information corresponding to the search information sample, and the category label of the search information sample. 10.根据权利要求9所述的装置,其特征在于,所述第二类模型包括第一子模型、第二子模型及第三子模型,所述第一子模型、所述第二子模型及所述第三子模型对应的内容信息分别为所述关联实体信息、所述分词信息及所述类别标签;10. The device according to claim 9, characterized in that the second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are the associated entity information, the word segmentation information and the category label respectively; 所述第一类模型、所述第一子模型、所述第二子模型及所述第三子模型按照预设训练规则通过对应的所述第一类模型训练模块或者所述第二类模型训练模块进行交替训练。The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules through the corresponding first type of model training module or the second type of model training module. 11.根据权利要求7所述的装置,其特征在于,所述第一类模型训练模块包括:11. The device according to claim 7, characterized in that the first type of model training module comprises: 第一样本获取模块,用于获取第一类初始模型及多个第一搜索信息样本,其中,每个所述第一搜索信息样本为预先获取的用户历史搜索行为序列中的搜索信息,所述用户历史搜索行为序列为用户历史搜索行为中连续输入的搜索信息组成的序列;A first sample acquisition module, used to acquire a first type of initial model and a plurality of first search information samples, wherein each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence of search information continuously input in the user history search behavior; 第一标定子模块,用于针对每个所述第一搜索信息样本,选取任一搜索信息作为该第一搜索信息样本的中心搜索信息样本,将所述中心搜索信息样本在该第一搜索信息样本的语境下的其他搜索信息确定为该所述中心搜索信息样本的标定信息;A first calibration submodule is configured to select, for each of the first search information samples, any search information as a central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample; 第一预测子模块,用于将所述中心搜索信息样本输入所述第一类初始模型,基于所述第一类初始模型的当前参数,将所述中心搜索信息样本转化为对应的特征向量,并基于所述特征向量确定所述中心搜索信息样本对应的预测信息;a first prediction submodule, configured to input the center search information sample into the first type of initial model, convert the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determine prediction information corresponding to the center search information sample based on the feature vector; 第一参数调整子模块,用于基于所述预测信息与对应的标定信息之间的差异,调整所述当前参数,直到所述第一类初始模型收敛,停止训练,以使所述第一类初始模型基于调整后的参数对输入的所述搜索信息样本进行处理得到对应的特征向量。The first parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the first type of initial model converges and stops training so that the first type of initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector. 12.根据权利要求7-11任一项所述的装置,其特征在于,所述搜索信息推荐模块包括:12. The device according to any one of claims 7 to 11, wherein the search information recommendation module comprises: 推荐搜索信息排序子模块,用于按照相似度由高到低的顺序对所述待推荐搜索信息进行排序,得到排序结果;The recommended search information sorting submodule is used to sort the search information to be recommended in descending order of similarity to obtain a sorting result; 推荐搜索信息选取子模块,用于基于所述排序结果,从所述待推荐搜索信息中选取预设数量个待推荐搜索信息,作为目标信息;A recommended search information selection submodule, configured to select a preset number of search information to be recommended from the search information to be recommended as target information based on the sorting result; 推荐搜索信息显示子模块,用于按照相似度由高到低的顺序,将所述目标信息显示于用户搜索页面的搜索信息推荐区域。The recommended search information display submodule is used to display the target information in the search information recommendation area of the user search page in the order of similarity from high to low. 13.一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;13. An electronic device, characterized in that it comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; 存储器,用于存放计算机程序;Memory, used to store computer programs; 处理器,用于执行存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory. 14.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤。14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.
CN202110648500.6A 2021-06-10 2021-06-10 Recommendation method and device for search information, electronic equipment and storage medium Active CN113282832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110648500.6A CN113282832B (en) 2021-06-10 2021-06-10 Recommendation method and device for search information, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110648500.6A CN113282832B (en) 2021-06-10 2021-06-10 Recommendation method and device for search information, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113282832A CN113282832A (en) 2021-08-20
CN113282832B true CN113282832B (en) 2024-10-25

Family

ID=77284089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110648500.6A Active CN113282832B (en) 2021-06-10 2021-06-10 Recommendation method and device for search information, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113282832B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934938A (en) * 2021-10-22 2022-01-14 北京字跳网络技术有限公司 Information display method, apparatus, readable medium and electronic device
CN114003772A (en) * 2021-11-05 2022-02-01 北京爱奇艺科技有限公司 Video searching method and device, electronic equipment and storage medium
CN114138859A (en) * 2021-11-18 2022-03-04 北京三快在线科技有限公司 Method, device, device and storage medium for displaying search results
CN114329210A (en) * 2021-12-30 2022-04-12 北京百度网讯科技有限公司 Information recommendation method and device and electronic equipment
CN116610853A (en) * 2022-02-08 2023-08-18 中兴通讯股份有限公司 Search recommendation method, search recommendation system, computer device, and storage medium
CN114581190A (en) * 2022-03-09 2022-06-03 北京百度网讯科技有限公司 Commodity recommendation method, device, equipment and storage medium
CN114741605A (en) * 2022-04-26 2022-07-12 泰康保险集团股份有限公司 Method and device for recommending annuity products, electronic equipment and readable medium
CN115718772B (en) * 2022-11-24 2024-08-20 腾讯科技(深圳)有限公司 Recommended resource determining method, data processing method, device and computer medium
CN116226297B (en) * 2023-05-05 2023-07-25 深圳市唯特视科技有限公司 Visual search method, system, equipment and storage medium for data model
CN118982083B (en) * 2024-10-17 2025-04-01 宁波市东方理工高等研究院 Model determination method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912630A (en) * 2016-04-07 2016-08-31 北京搜狗科技发展有限公司 Information expansion method and device
CN109189990A (en) * 2018-07-25 2019-01-11 北京奇艺世纪科技有限公司 A kind of generation method of search term, device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10846350B2 (en) * 2016-10-18 2020-11-24 Facebook, Inc. Systems and methods for providing service directory predictive search recommendations
CN110532454B (en) * 2019-08-28 2022-04-22 北京奇艺世纪科技有限公司 Search term recommendation method and device
CN111666450B (en) * 2020-06-04 2024-04-26 北京奇艺世纪科技有限公司 Video recall method, device, electronic equipment and computer readable storage medium
CN111859138B (en) * 2020-07-27 2024-05-14 小红书科技有限公司 Searching method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912630A (en) * 2016-04-07 2016-08-31 北京搜狗科技发展有限公司 Information expansion method and device
CN109189990A (en) * 2018-07-25 2019-01-11 北京奇艺世纪科技有限公司 A kind of generation method of search term, device and electronic equipment

Also Published As

Publication number Publication date
CN113282832A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN113282832B (en) Recommendation method and device for search information, electronic equipment and storage medium
CN110704640A (en) Representation learning method and device of knowledge graph
JP5612731B2 (en) Determining relevant information about the area of interest
WO2020207074A1 (en) Information pushing method and device
WO2020037931A1 (en) Item recommendation method and apparatus, computer device and storage medium
CN110704626B (en) Short text classification method and device
CN109189990B (en) Search word generation method and device and electronic equipment
CN104750798B (en) Recommendation method and device for application program
CN112100396B (en) Data processing method and device
CN108776684A (en) Optimization method, device, medium, equipment and the system of side right weight in knowledge mapping
JP2016532173A (en) Semantic information, keyword expansion and related keyword search method and system
CN110991476A (en) Training of decision classifier, audio and video recommendation method, device and storage medium
CN111814842A (en) Object classification method and device based on multi-channel graph convolutional neural network
CN113360780A (en) Big data based information recommendation method and system
CN110688452A (en) Text semantic similarity evaluation method, system, medium and device
CN114564594B (en) A knowledge graph user preference entity recall method based on double tower model
CN118132732A (en) Enhanced retrieval user question and answer method, device, computer equipment and storage medium
CN112862567B (en) Method and system for recommending exhibits in online exhibition
WO2020073526A1 (en) Trust network-based push method, apparatus, computer device, and storage medium
CN110083766B (en) Query recommendation method and device based on meta-path guiding embedding
CN113282831B (en) Recommendation method, device, electronic device and storage medium for searching information
Al Awienoor et al. Movie Recommendation System Based on Tweets Using Switching Hybrid Filtering with Recurrent Neural Network.
CN113656575B (en) Training data generation method and device, electronic equipment and readable medium
CN113190763B (en) Information recommendation method and system
CN112163415B (en) Method, device and electronic device for identifying user intention based on feedback content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant