Movatterモバイル変換


[0]ホーム

URL:


CN114356979A - A query method and related equipment - Google Patents

A query method and related equipment
Download PDF

Info

Publication number
CN114356979A
CN114356979ACN202111397842.1ACN202111397842ACN114356979ACN 114356979 ACN114356979 ACN 114356979ACN 202111397842 ACN202111397842 ACN 202111397842ACN 114356979 ACN114356979 ACN 114356979A
Authority
CN
China
Prior art keywords
resource
attribute
data
information
user
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.)
Granted
Application number
CN202111397842.1A
Other languages
Chinese (zh)
Other versions
CN114356979B (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.)
iFlytek Co Ltd
Original Assignee
iFlytek 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 iFlytek Co LtdfiledCriticaliFlytek Co Ltd
Priority to CN202111397842.1ApriorityCriticalpatent/CN114356979B/en
Publication of CN114356979ApublicationCriticalpatent/CN114356979A/en
Application grantedgrantedCritical
Publication of CN114356979BpublicationCriticalpatent/CN114356979B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

The application discloses a query method and related equipment thereof, wherein the method comprises the following steps: after a resource query request triggered by a user is received, determining a resource query result aiming at the information to be queried according to the information to be queried, which is carried by the resource query request and is used for describing the resource to be queried, so that when the resource query result is determined to indicate that the resource to be queried cannot be provided for the user, at least one recommended resource is determined according to the information to be queried, and certain similar points exist between the recommended resources and the resource to be queried; and then providing the recommended resources for the user so that the user can select some resource data from the recommended resources for use, thus some recommended resources can still be fed back to the user under the condition that the resources to be inquired cannot be provided for the user, the resource inquiry effect of the user can be improved, and the user experience can be improved.

Description

Translated fromChinese
一种查询方法及其相关设备A query method and related equipment

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种查询方法及其相关设备。The present application relates to the field of computer technology, and in particular, to a query method and related equipment.

背景技术Background technique

对于一些资源搜索场景(例如,影视资源搜索场景等)来说,当用户借助资源查询设备(例如,电视语音助手等)针对某一资源数据(例如,XXX电影)进行查询时,可能会因某些原因(例如,没有版权等)导致无法向该用户反馈该资源数据(例如,无法播放XXX电影),从而导致无法满足用户诉求,如此导致用户体验很差。For some resource search scenarios (for example, video resource search scenarios, etc.), when a user queries for a certain resource data (for example, XXX movies) by means of a resource query device (for example, a TV voice assistant, etc.) For some reasons (for example, no copyright, etc.), the resource data cannot be fed back to the user (for example, the XXX movie cannot be played), so that the user's demands cannot be satisfied, which leads to a poor user experience.

发明内容SUMMARY OF THE INVENTION

本申请实施例的主要目的在于提供一种查询方法及其相关设备,能够提高用户体验。The main purpose of the embodiments of the present application is to provide a query method and a related device thereof, which can improve user experience.

本申请实施例提供了一种查询方法,所述方法包括:接收用户触发的资源查询请求;其中,所述资源查询请求携带有待查询信息;所述待查询信息用于描述待查询资源;获取针对所述待查询信息的资源查询结果;若所述资源查询结果表示无法向所述用户提供所述待查询资源,则根据所述待查询信息,确定至少一个推荐资源;向所述用户提供所述至少一个推荐资源。An embodiment of the present application provides a query method, the method includes: receiving a resource query request triggered by a user; wherein, the resource query request carries information to be queried; the information to be queried is used to describe the resource to be queried; The resource query result of the information to be queried; if the resource query result indicates that the resource to be queried cannot be provided to the user, at least one recommended resource is determined according to the information to be queried; At least one recommended resource.

在一种可能的实施方式下,所述根据所述待查询信息,确定至少一个推荐资源,包括:根据所述待查询信息,确定至少一个候选资源的推荐表征数据;根据所述至少一个候选资源的推荐表征数据,从所述至少一个候选资源中确定至少一个推荐资源。In a possible implementation manner, the determining at least one recommended resource according to the information to be queried includes: determining recommendation representation data of at least one candidate resource according to the information to be queried; according to the at least one candidate resource The recommendation characterization data of the at least one recommended resource is determined from the at least one candidate resource.

在一种可能的实施方式下,所述推荐表征数据包括特征匹配表征数据和/或至少一个属性检索表征数据。In a possible implementation manner, the recommendation characterization data includes feature matching characterization data and/or at least one attribute retrieval characterization data.

在一种可能的实施方式下,所述特征匹配表征数据的确定过程,包括:根据所述待查询信息,确定待提取信息;利用预先构建的特征提取网络,对所述待提取信息进行特征提取处理,得到待匹配特征;将所述待匹配特征与各个所述候选资源的资源表征特征进行匹配处理,得到各个所述候选资源的特征匹配结果;根据所述至少一个候选资源的特征匹配结果,确定所述至少一个候选资源的特征匹配表征数据。In a possible implementation, the process of determining the feature matching representation data includes: determining the information to be extracted according to the information to be queried; using a pre-built feature extraction network to perform feature extraction on the information to be extracted processing to obtain the feature to be matched; performing matching processing on the feature to be matched with the resource characterizing feature of each of the candidate resources to obtain a feature matching result of each of the candidate resources; according to the feature matching result of the at least one candidate resource, A feature of the at least one candidate resource is determined to match the characterizing data.

在一种可能的实施方式下,各个所述候选资源的资源表征特征均是利用所述特征提取网络确定的。In a possible implementation manner, the resource characterizing features of each candidate resource are determined by using the feature extraction network.

在一种可能的实施方式下,所述方法还包括:根据所述用户的历史资源操作信息,确定至少一个资源样本数据;根据所述至少一个资源样本数据,构建所述特征提取网络。In a possible implementation manner, the method further includes: determining at least one resource sample data according to the user's historical resource operation information; and constructing the feature extraction network according to the at least one resource sample data.

在一种可能的实施方式下,所述至少一个资源样本数据包括至少一个正样本数据和至少一个负样本数据。In a possible implementation manner, the at least one resource sample data includes at least one positive sample data and at least one negative sample data.

在一种可能的实施方式下,所述历史资源操作信息用于描述所述用户针对至少一个待使用资源触发的操作行为;In a possible implementation manner, the historical resource operation information is used to describe the operation behavior triggered by the user for at least one resource to be used;

所述至少一个正样本数据的确定过程,包括:根据所述至少一个待使用资源,确定所述至少一个正样本数据;The process of determining the at least one positive sample data includes: determining the at least one positive sample data according to the at least one resource to be used;

和/或,and / or,

所述至少一个负样本数据的确定过程,包括:将至少一个备选资源的属性信息与所述至少一个待使用资源的属性信息进行比较,得到属性比较结果;根据所述属性比较结果,从所述至少一个备选资源中确定至少一个目标资源,以使各个所述目标资源的属性信息不同于所述至少一个待使用资源的属性信息;根据所述至少一个目标资源,确定所述至少一个负样本数据。The process of determining the at least one negative sample data includes: comparing the attribute information of the at least one candidate resource with the attribute information of the at least one resource to be used to obtain an attribute comparison result; determining at least one target resource from the at least one candidate resource, so that the attribute information of each target resource is different from the attribute information of the at least one resource to be used; according to the at least one target resource, determining the at least one negative resource sample.

在一种可能的实施方式下,所述至少一个备选资源包括待使用时间段内的达到预设资源条件的至少一个资源数据。In a possible implementation manner, the at least one candidate resource includes at least one resource data that reaches a preset resource condition within a to-be-used time period.

在一种可能的实施方式下,所述特征提取网络的构建过程,包括:根据所述至少一个资源样本数据、所述用户的描述信息、和待训练模型,确定所述至少一个资源样本数据的预测分类结果;根据所述至少一个资源样本数据和所述至少一个资源样本数据的实际分类信息,更新所述待训练模型,并继续执行所述根据所述至少一个资源样本数据、所述用户的描述信息、和待训练模型,确定所述至少一个资源样本数据的预测分类结果的步骤,直至在达到预设停止条件之后,根据所述待训练模型,确定所述特征提取网络。In a possible implementation manner, the construction process of the feature extraction network includes: determining the at least one resource sample data according to the at least one resource sample data, the description information of the user, and the model to be trained. Predict the classification result; update the to-be-trained model according to the at least one resource sample data and the actual classification information of the at least one resource sample data, and continue to execute the The description information and the model to be trained, and the step of determining the predicted classification result of the at least one resource sample data, until after a preset stop condition is reached, the feature extraction network is determined according to the model to be trained.

在一种可能的实施方式下,所述待训练模型包括用户特征提取层、资源特征提取层、特征拼接层和分类处理层;其中,所述分类处理层的输入数据包括所述特征拼接层的输出数据;所述特征拼接层的输入数据包括所述用户特征提取层的输出数据和所述资源特征提取层的输出数据;In a possible implementation, the model to be trained includes a user feature extraction layer, a resource feature extraction layer, a feature splicing layer and a classification processing layer; wherein, the input data of the classification processing layer includes the data of the feature splicing layer. output data; the input data of the feature splicing layer includes the output data of the user feature extraction layer and the output data of the resource feature extraction layer;

所述根据所述待训练模型,确定所述特征提取网络,包括:根据所述待训练模型中资源特征提取层,确定所述特征提取网络。The determining of the feature extraction network according to the model to be trained includes: determining the feature extraction network according to a resource feature extraction layer in the model to be trained.

在一种可能的实施方式下,所述至少一个属性检索表征数据的确定过程,包括:获取所述待查询信息对应的至少一个属性;在预先构建的资源知识图谱中按照所述至少一个属性进行检索处理,得到各个所述候选资源的至少一个属性检索表征数据;其中,所述资源知识图谱是根据至少一个待检索资源的属性信息进行构建的;所述至少一个待检索资源包括所述至少一个候选资源。In a possible implementation manner, the process of determining the at least one attribute retrieval representation data includes: acquiring at least one attribute corresponding to the information to be queried; Retrieval processing to obtain at least one attribute retrieval representation data of each of the candidate resources; wherein, the resource knowledge graph is constructed according to attribute information of at least one resource to be retrieved; the at least one resource to be retrieved includes the at least one resource to be retrieved candidate resource.

在一种可能的实施方式下,所述推荐表征数据包括特征匹配表征数据和Q个属性检索表征数据;其中,Q为正整数;In a possible implementation manner, the recommendation characterization data includes feature matching characterization data and Q attribute retrieval characterization data; wherein Q is a positive integer;

所述根据所述至少一个候选资源的推荐表征数据,从所述至少一个候选资源中确定至少一个推荐资源,包括:根据所述至少一个候选资源的特征匹配表征数据,从所述至少一个候选资源中确定满足第一条件的至少一个特征匹配资源;根据所述至少一个候选资源的第q个属性检索表征数据,从所述至少一个候选资源中确定第q个属性对应的至少一个属性命中资源;其中,所述第q个属性对应的各个所述属性命中资源均满足第q个属性筛选条件;q为正整数,q≤Q;根据所述至少一个特征匹配资源、第1个属性对应的至少一个属性命中资源至第Q个属性对应的至少一个属性命中资源,确定至少一个第一资源;根据所述至少一个第一资源的推荐表征数据,从所述至少一个第一资源中确定至少一个推荐资源。The determining at least one recommended resource from the at least one candidate resource according to the recommendation characteristic data of the at least one candidate resource includes: matching the characteristic data according to the characteristic of the at least one candidate resource, and selecting the at least one candidate resource from the at least one candidate resource. Determine at least one feature matching resource that satisfies the first condition; Retrieve representation data according to the qth attribute of the at least one candidate resource, and determine at least one attribute corresponding to the qth attribute from the at least one candidate resource to hit the resource; Wherein, each of the attribute hit resources corresponding to the q th attribute satisfies the q th attribute screening condition; q is a positive integer, q≤Q; according to the at least one characteristic matching resource, at least one corresponding to the first attribute From one attribute hit resource to at least one attribute hit resource corresponding to the Qth attribute, at least one first resource is determined; according to the recommendation representation data of the at least one first resource, at least one recommendation is determined from the at least one first resource resource.

在一种可能的实施方式下,所述方法还包括:从所述至少一个候选资源中确定出满足第二条件的至少一个第二资源;In a possible implementation manner, the method further includes: determining at least one second resource that satisfies a second condition from the at least one candidate resource;

所述根据所述至少一个候选资源的推荐表征数据,从所述至少一个候选资源中确定至少一个推荐资源,包括:根据所述至少一个第二资源的推荐表征数据,从所述至少一个候选资源中确定至少一个推荐资源。The determining at least one recommended resource from the at least one candidate resource according to the recommendation characterization data of the at least one candidate resource includes: according to the recommendation characterization data of the at least one second resource, from the at least one candidate resource Identify at least one recommended resource.

在一种可能的实施方式下,所述至少一个推荐资源的确定过程,包括:根据各个第三资源的推荐表征数据,确定各个所述第三资源的推荐得分;根据至少一个第三资源的推荐得分,从所述至少一个第三资源中确定满足第一条件的至少一个推荐资源。需要说明的是,上述“第三资源”可以是上文“候选资源”、“第一资源”、或者“第二资源”In a possible implementation manner, the process of determining the at least one recommended resource includes: determining a recommendation score of each third resource according to recommendation representation data of each third resource; score, and at least one recommended resource that satisfies the first condition is determined from the at least one third resource. It should be noted that the above-mentioned "third resource" may be the above-mentioned "candidate resource", "first resource", or "second resource"

本申请实施例还提供了一种查询装置,包括:接收单元,用于接收用户触发的资源查询请求;其中,所述资源查询请求携带有待查询信息;所述待查询信息用于描述待查询资源;查询单元,用于获取针对所述待查询信息的资源查询结果;确定单元,用于若所述资源查询结果表示无法向所述用户提供所述待查询资源,则根据所述待查询信息,确定至少一个推荐资源;推荐单元,用于向所述用户提供所述至少一个推荐资源。The embodiment of the present application further provides a query device, including: a receiving unit, configured to receive a resource query request triggered by a user; wherein, the resource query request carries information to be queried; the information to be queried is used to describe the resource to be queried ; a query unit, for obtaining a resource query result for the information to be queried; a determination unit, for if the resource query result indicates that the resource to be queried cannot be provided to the user, then according to the information to be queried, determining at least one recommended resource; and a recommending unit configured to provide the user with the at least one recommended resource.

本申请实施例还提供了一种设备,所述设备包括:处理器、存储器、系统总线;所述处理器以及所述存储器通过所述系统总线相连;所述存储器用于存储一个或多个程序,所述一个或多个程序包括指令,所述指令当被所述处理器执行时使所述处理器执行本申请实施例提供的查询方法的任一实施方式。An embodiment of the present application further provides a device, the device includes: a processor, a memory, and a system bus; the processor and the memory are connected through the system bus; the memory is used to store one or more programs , the one or more programs include instructions, and when executed by the processor, the instructions cause the processor to execute any implementation manner of the query method provided by the embodiments of this application.

本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备执行本申请实施例提供的查询方法的任一实施方式。Embodiments of the present application further provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device is made to execute the instructions provided by the embodiments of the present application. Any implementation of the query method.

本申请实施例还提供了一种计算机程序产品,所述计算机程序产品在终端设备上运行时,使得所述终端设备执行本申请实施例提供的查询方法的任一实施方式。The embodiments of the present application further provide a computer program product, which, when running on a terminal device, enables the terminal device to execute any implementation manner of the query method provided by the embodiments of the present application.

基于上述技术方案,本申请具有以下有益效果:Based on the above technical solutions, the application has the following beneficial effects:

本申请提供的技术方案中,在接收到用户触发的资源查询请求(例如,查询XXX电影的请求)之后,依据该资源查询请求携带的用于描述待查询资源的待查询信息,确定针对该待查询信息的资源查询结果,以便在确定该资源查询结果表示无法向该用户提供该待查询资源时,先根据该待查询信息,确定至少一个推荐资源,以使这些推荐资源与该待查询资源之间存在某些相似点(例如,某些属性相同等);再将这些推荐资源提供给用户,以使该用户可以从这些推荐资源中选择一些资源数据进行使用,如此能够实现在无法向该用户提供待查询资源的情况下依旧向该用户反馈一些推荐资源(尤其是,与待查询资源相似的资源),从而能够提高该用户的资源查询效果,进而能够提高用户体验。In the technical solution provided by the present application, after receiving a resource query request triggered by a user (for example, a request for querying XXX movies), according to the to-be-queried information that is carried in the resource query request and used to describe the resource to be queried, it is determined that the resource to be queried The resource query result of the query information, so that when it is determined that the resource query result indicates that the resource to be queried cannot be provided to the user, at least one recommended resource is first determined according to the information to be queried, so that these recommended resources and the resource to be queried are different. There are some similarities (for example, some attributes are the same, etc.); then these recommended resources are provided to the user, so that the user can select some resource data from these recommended resources for use, so that the user can be In the case of providing the resource to be queried, some recommended resources (especially, resources similar to the resource to be queried) are still fed back to the user, so that the resource query effect of the user can be improved, and thus the user experience can be improved.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are For some embodiments of the present application, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本申请实施例提供的一种查询方法的流程图;1 is a flowchart of a query method provided by an embodiment of the present application;

图2为本申请实施例提供的一种三元组的示意图;2 is a schematic diagram of a triplet provided by an embodiment of the present application;

图3为本申请实施例提供的一种待训练模型的结构示意图;3 is a schematic structural diagram of a model to be trained provided by an embodiment of the present application;

图4为本申请实施例提供的一种待训练模型的工作原理示意图;4 is a schematic diagram of the working principle of a model to be trained provided by an embodiment of the present application;

图5为本申请实施例提供的一种编码单元的工作原理示意图;5 is a schematic diagram of the working principle of an encoding unit provided by an embodiment of the present application;

图6为本申请实施例提供的一种影视资源搜索过程的示意图;6 is a schematic diagram of a process of searching for video resources according to an embodiment of the present application;

图7为本申请实施例提供的一种影视资源推荐过程的示意图;FIG. 7 is a schematic diagram of a video resource recommendation process according to an embodiment of the present application;

图8为本申请实施例提供的一种负样本数据的确定过程示意图;8 is a schematic diagram of a process for determining negative sample data according to an embodiment of the present application;

图9为本申请实施例提供的一种查询装置的结构示意图。FIG. 9 is a schematic structural diagram of a query apparatus provided by an embodiment of the present application.

具体实施方式Detailed ways

发明人在针对资源搜索处理的研究中发现,对于一个资源查询设备(例如,电视设备、影视播放客户端等)来说,因某些原因(例如,该资源查询设备没有某些资源数据的播放版权)导致用户无法从该资源查询设备中获取到某些资源数据(例如,新上映的电影等),以使当用户从该资源查询设备中查找这些资源数据时,该资源查询设备只能向该用户反馈“无法找到相应资源”这一提示信息,如此导致该用户经历了一次毫无意义的查询过程(也就是,没有获取到任何资源数据的查询过程),从而导致该用户体验比较差。In the research on resource search processing, the inventor found that for a resource query device (for example, a TV device, a video player client, etc.), for some reasons (for example, the resource query device does not have some resource data to play). copyright), so that the user cannot obtain some resource data (for example, newly released movies, etc.) from the resource query device, so that when the user searches for these resource data from the resource query device, the resource query device can only send The user feeds back a prompt message that "the corresponding resource cannot be found", which causes the user to go through a meaningless query process (that is, a query process in which no resource data is obtained), resulting in a poor user experience.

基于上述发现可知,为了克服背景技术部分所示的技术问题,本申请实施例提供了一种查询方法,该方法包括:在接收到用户触发的资源查询请求(例如,查询XXX电影的请求)之后,依据该资源查询请求携带的用于描述待查询资源的待查询信息,确定针对该待查询信息的资源查询结果,以便在确定该资源查询结果表示无法向该用户提供该待查询资源时,先根据该待查询信息,确定至少一个推荐资源,以使这些推荐资源与该待查询资源之间存在某些相似点(例如,某些属性相同等);再将这些推荐资源提供给用户,以使该用户可以从这些推荐资源中选择一些资源数据进行使用,如此能够实现在无法向该用户提供待查询资源的情况下依旧向该用户反馈一些有用资源,从而能够有效地避免该用户经历一次毫无意义的查询过程,进而能够提高该用户的资源查询效果,如此有利于提高用户体验。Based on the above findings, in order to overcome the technical problems shown in the background section, an embodiment of the present application provides a query method, the method includes: after receiving a resource query request triggered by a user (for example, a request for querying XXX movies) , according to the information to be queried that is used to describe the resource to be queried carried in the resource query request, to determine the resource query result for the information to be queried, so that when it is determined that the resource query result indicates that the resource to be queried cannot be provided to the user, first According to the information to be queried, at least one recommended resource is determined, so that there are some similarities between these recommended resources and the resource to be queried (for example, some attributes are the same, etc.); and then these recommended resources are provided to the user, so that the The user can select some resource data from these recommended resources for use, so that some useful resources can still be fed back to the user even if the resource to be queried cannot be provided to the user, thereby effectively preventing the user from going through a never-ending experience. The meaningful query process can further improve the resource query effect of the user, which is beneficial to improve the user experience.

另外,本申请实施例不限定查询方法的执行主体,例如,本申请实施例提供的查询方法的执行主体可以是终端设备或服务器等数据处理设备。其中,终端设备可以为电视(例如,大屏电视等)、智能手机、计算机、个人数字助理(Personal Digital Assitant,PDA)或平板电脑等。服务器可以为独立服务器、集群服务器或云服务器。In addition, the embodiment of the present application does not limit the execution body of the query method. For example, the execution body of the query method provided by the embodiment of the present application may be a data processing device such as a terminal device or a server. The terminal device may be a TV (eg, a large-screen TV, etc.), a smart phone, a computer, a personal digital assistant (Personal Digital Assistant, PDA), or a tablet computer. The server can be a standalone server, a cluster server or a cloud server.

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

方法实施例一Method Embodiment 1

参见图1,该图为本申请实施例提供的一种查询方法的流程图。Referring to FIG. 1 , which is a flowchart of a query method provided by an embodiment of the present application.

本申请实施例提供的查询方法,包括S1-S4:The query method provided by the embodiment of the present application includes S1-S4:

S1:接收用户触发的资源查询请求。S1: Receive a resource query request triggered by a user.

上述“资源查询请求”携带有待查询信息,以使该“资源查询请求”用于请求按照待查询信息进行资源数据查询。The above "resource query request" carries information to be queried, so that the "resource query request" is used to request resource data query according to the information to be queried.

上述“待查询信息”用于描述待查询资源;而且本申请实施例不限定该“待查询信息”,例如,该“待查询信息”可以是该待查询资源的名称标识。可见,当待查询资源为一个影视资源时,该待查询信息可以是该影视资源的名称标识(例如,电视剧名、电影名、综艺名等)。The above "information to be queried" is used to describe the resource to be queried; and the embodiment of the present application does not limit the "information to be queried", for example, the "information to be queried" may be the name identifier of the resource to be queried. It can be seen that, when the resource to be queried is a film and television resource, the information to be queried may be a name identifier of the film and television resource (for example, the name of a TV series, a movie, a variety show, etc.).

上述“待查询资源”是指用户想要获取的资源数据;而且本申请实施例不限定该“待查询资源”,例如,其可以是书籍资源数据、影视资源数据、或者文档资源数据等。The above-mentioned "resource to be queried" refers to resource data that the user wants to obtain; and the embodiment of the present application does not limit the "resource to be queried", for example, it may be book resource data, video resource data, or document resource data.

本申请实施例不限定S1的实施方式,例如,若本申请实施例提供的查询方法的执行主体为终端设备,则S1具体可以为:当用户在该终端设备上触发资源查询请求时,该终端设备可以接收到该用户触发的资源查询请求。又如,若本申请实施例提供的查询方法的执行主体为服务器,则S1具体可以为:当用户在该终端设备上触发资源查询请求时,该终端设备可以将该资源查询请求转发给服务器,以使该服务器能够接收到该用户触发的资源查询请求。This embodiment of the present application does not limit the implementation of S1. For example, if the execution subject of the query method provided by the embodiment of the present application is a terminal device, S1 may specifically be: when a user triggers a resource query request on the terminal device, the terminal The device can receive the resource query request triggered by the user. For another example, if the executing subject of the query method provided by the embodiment of the present application is a server, S1 may specifically be: when a user triggers a resource query request on the terminal device, the terminal device may forward the resource query request to the server, So that the server can receive the resource query request triggered by the user.

基于上述S1的相关内容可知,当一个用户想要针对待查询资源(例如,XXX书籍、XXX电影、XXX论文等)进行查询时,该用户可以在资源查询设备(例如,电视设备、影视播放客户端等终端设备)上触发资源查询请求,以使该资源查询请求携带有用于描述该待查询资源的待查询信息(例如,名称标识等),以使后续该资源查询设备或者该资源查询设备对应的服务器能够依据该资源查询请求进行资源查询处理。Based on the relevant content of S1 above, when a user wants to query the resources to be queried (eg, XXX books, XXX movies, XXX papers, etc.) A resource query request is triggered on a terminal device such as a terminal, so that the resource query request carries the to-be-queried information (for example, a name identifier, etc.) that is used to describe the resource to be queried, so that the subsequent resource query device or the resource query device corresponds to The server can perform resource query processing according to the resource query request.

S2:获取针对资源查询请求携带的待查询信息的资源查询结果。S2: Obtain a resource query result for the information to be queried carried in the resource query request.

本申请实施例中,在获取到资源查询请求之后,可以按照该资源查询请求携带的待查询信息进行资源查询处理,得到针对该待查询信息的资源查询结果,以使该资源查询结果能够表示出是否能够查找到具有该待查询信息的资源数据(也就是,上述“待查询资源”)、以及具有该待查询信息的资源数据具体是什么,以便在确定该资源查询结果表示已查找到待查询资源时,可以直接将该待查询资源发送给用户,以使该用户能够查看该待查询资源;然而,在确定该资源查询结果表示无法查找到待查询资源(也就是,无法向用户提供待查询资源)时,可以按照下文S3-S4所示的资源推荐过程,向该用户发送一些推荐资源,以使该用户能够从这些推荐资源中挑选一些其喜欢的资源进行查看。In this embodiment of the present application, after a resource query request is obtained, resource query processing may be performed according to the information to be queried carried in the resource query request, and a resource query result for the information to be queried can be obtained, so that the resource query result can express Whether the resource data with the information to be queried (that is, the above-mentioned "resource to be queried") can be found, and what the resource data with the information to be queried is specifically, so that when it is determined that the resource query result indicates that the to-be-queried information has been found When the resource to be queried can be directly sent to the user, so that the user can view the resource to be queried; however, when it is determined that the resource query result indicates that the resource to be queried cannot be found (that is, the resource to be queried cannot be provided to the user) resources), some recommended resources can be sent to the user according to the resource recommendation process shown in S3-S4 below, so that the user can select some resources he likes from these recommended resources for viewing.

需要说明的是,本申请实施例不限定S2的实施方式,可以采用现有的或者未来出现的任一种资源查询方法(例如,在资源数据库中进行精确搜索处理或者模糊搜索处理的方法)进行实施。It should be noted that the embodiments of the present application do not limit the implementation of S2, and any existing or future resource query method (for example, a method for performing precise search processing or fuzzy search processing in a resource database) can be used to perform implement.

S3:若资源查询结果表示无法向用户提供待查询资源,则根据待查询信息,确定至少一个推荐资源。S3: If the resource query result indicates that the resource to be queried cannot be provided to the user, at least one recommended resource is determined according to the information to be queried.

上述“推荐资源”是指推荐给用户的资源数据(也就是,针对上述“资源查询请求”反馈给用户的资源数据)。The above-mentioned "recommended resource" refers to resource data recommended to the user (that is, the resource data fed back to the user for the above-mentioned "resource query request").

另外,本申请实施例不限定上述“至少一个推荐资源”的确定过程,例如,可以采用现有的或者未来出现的任一种资源推荐方法进行实施。又如,为了进一步提高资源推荐效果,可以采用方法实施例二所示的“至少一个推荐资源”的确定过程进行实施。In addition, the embodiments of the present application do not limit the above-mentioned determination process of "at least one recommended resource", for example, any existing or future resource recommendation method may be used for implementation. For another example, in order to further improve the effect of resource recommendation, the determination process of "at least one recommended resource" shown in thesecond method embodiment may be used for implementation.

基于上述S3的相关内容可知,在获取到针对待查询信息的资源查询结果之后,若该资源查询结果表示没有查找到具有该待查询信息的资源数据(也就是,上述“待查询资源”),则可以确定该资源查询结果表示无法向用户提供待查询资源,故为了提高用户资源查询体验,可以依据该待查询信息,确定至少一个推荐资源,以使这些推荐资源与该待查询资源之间存在某些相似点(例如,某些属性相同等),从而使得这些推荐资源能够尽可能地满足该用户的资源查询需求,进而使得这些推荐资源能够尽可能地被用户所看中。Based on the relevant content of the above S3, after obtaining the resource query result for the information to be queried, if the resource query result indicates that no resource data with the information to be queried (that is, the above-mentioned "resource to be queried") is found, It can be determined that the resource query result indicates that the resource to be queried cannot be provided to the user. Therefore, in order to improve the user's resource query experience, at least one recommended resource can be determined based on the information to be queried, so that there is a relationship between these recommended resources and the resource to be queried. Some similarities (for example, some attributes are the same, etc.), so that these recommended resources can meet the resource query requirements of the user as much as possible, and then these recommended resources can be favored by the user as much as possible.

S4:向用户提供至少一个推荐资源。S4: Provide at least one recommended resource to the user.

本申请实施例中,在获取到至少一个推荐资源之后,可以向用户提供这些推荐资源,以使该用户能够从这些推荐资源中选择其想查看的资源数据,如此能够尽可能地避免用户经历一次毫无意义的查询过程,从而有利于提高用户体验。In this embodiment of the present application, after acquiring at least one recommended resource, these recommended resources can be provided to the user, so that the user can select the resource data that he wants to view from these recommended resources, so as to avoid the user from going through one time as much as possible. Meaningless query process, which is beneficial to improve user experience.

需要说明的是,本申请实施例不限定S4的实施方式,例如,若本申请实施例提供的查询方法的执行主体为终端设备,则S4具体可以为:在该终端设备上展示至少一个推荐资源,以使该用户能够在该终端设备上查看这些推荐资源。又如,若本申请实施例提供的查询方法的执行主体为服务器,则S4具体可以为:先由服务器将至少一个推荐资源发送给终端设备;再由该终端设备将该至少一个推荐资源展示给用户,以使该用户能够在该终端设备上查看这些推荐资源。It should be noted that the embodiments of the present application do not limit the implementation of S4. For example, if the execution subject of the query method provided by the embodiments of the present application is a terminal device, S4 may specifically be: displaying at least one recommended resource on the terminal device , so that the user can view these recommended resources on the terminal device. For another example, if the execution body of the query method provided by the embodiment of the present application is the server, S4 may specifically be: firstly, the server sends at least one recommended resource to the terminal device; then the terminal device displays the at least one recommended resource to the terminal device. user, so that the user can view these recommended resources on the terminal device.

基于上述S1至S4的相关内容可知,对于本申请实施例提供的查询方法来说,在接收到用户触发的资源查询请求(例如,查询XXX电影的请求)之后,依据该资源查询请求携带的用于描述待查询资源的待查询信息,确定针对该待查询信息的资源查询结果,以便在确定该资源查询结果表示无法向该用户提供该待查询资源时,先根据该待查询信息,确定至少一个推荐资源,以使这些推荐资源与该待查询资源之间存在某些相似点(例如,某些属性相同等);再将这些推荐资源提供给用户,以使该用户可以从这些推荐资源中选择一些资源数据进行使用,如此能够实现在无法向该用户提供待查询资源的情况下依旧向该用户反馈一些有用资源,从而能够有效地避免该用户经历一次毫无意义的查询过程,进而能够提高该用户的资源查询效果,如此有利于提高用户体验。Based on the relevant contents of S1 to S4 above, it can be known that, for the query method provided by the embodiment of the present application, after receiving a resource query request (for example, a request for querying XXX movies) triggered by a user, the resource query request carries the To describe the to-be-queried information of the resource to be queried, determine the resource query result for the to-be-queried information, so that when it is determined that the resource query result indicates that the resource to be queried cannot be provided to the user, first determine at least one resource based on the to-be-queried information. Recommend resources, so that there are some similarities between these recommended resources and the resource to be queried (for example, some attributes are the same, etc.); then provide these recommended resources to the user, so that the user can choose from these recommended resources Some resource data can be used, so that the user can still feed back some useful resources even if the resource to be queried cannot be provided to the user, so as to effectively avoid the user from going through a meaningless query process, thereby improving the user experience. The user's resource query effect is beneficial to improve the user experience.

方法实施例二Method Embodiment 2

另外,为了提高资源推荐效果,本申请实施例提供了确定上述“至少一个推荐资源”的另一种可能的实施方式,其具体可以包括步骤11-步骤12:In addition, in order to improve the effect of resource recommendation, this embodiment of the present application provides another possible implementation manner of determining the above-mentioned "at least one recommended resource", which may specifically include steps 11 to 12:

步骤11:根据待查询信息,确定至少一个候选资源的推荐表征数据。Step 11: Determine recommendation representation data of at least one candidate resource according to the information to be queried.

上述“至少一个候选资源”用于表示在资源推荐过程中需要被筛选的资源数据;而且本申请实施例不限定上述“至少一个候选资源”,例如,其可以包括:预先构建的资源数据库中所有的资源数据。其中,“资源数据库”用于记录至少一个资源数据以及各个资源数据的资源描述信息(例如,ID、至少一个属性、资源介绍内容等)。The above-mentioned "at least one candidate resource" is used to indicate resource data that needs to be screened during the resource recommendation process; and the embodiment of the present application does not limit the above-mentioned "at least one candidate resource", for example, it may include: all the resources in the pre-built resource database resource data. The "resource database" is used to record at least one resource data and resource description information (eg, ID, at least one attribute, resource introduction content, etc.) of each resource data.

第n个候选资源的推荐表征数据用于表示第n个候选资源与上述“待查询资源”之间的关联程度。其中,n为正整数,n≤N,N为正整数,N表示上述“至少一个候选资源”中候选资源的个数。The recommendation representation data of the nth candidate resource is used to indicate the degree of association between the nth candidate resource and the above-mentioned "resource to be queried". Wherein, n is a positive integer, n≤N, N is a positive integer, and N represents the number of candidate resources in the above-mentioned "at least one candidate resource".

另外,本申请实施例不限定上述“第n个候选资源的推荐表征数据”,例如,该“第n个候选资源的推荐表征数据”可以包括该第n个候选资源的特征匹配表征数据、该第n个候选资源的第1个属性检索表征数据、该第n个候选资源的第2个属性检索表征数据、……、以及该第n个候选资源的第Q个属性检索表征数据中的至少一个。其中,Q为正整数。In addition, the embodiment of the present application does not limit the above "recommended representation data of the nth candidate resource", for example, the "recommended representation data of the nth candidate resource" may include the feature matching representation data of the nth candidate resource, the At least one of the first attribute retrieval characteristic data of the nth candidate resource, the second attribute retrieval characteristic data of the nth candidate resource, ..., and the Qth attribute retrieval characteristic data of the nth candidate resource One. where Q is a positive integer.

上述“第n个候选资源的特征匹配表征数据”用于表示该第n个候选资源与待查询资源之间在资源特征上所呈现的相似程度。The above-mentioned "feature matching representation data of the nth candidate resource" is used to indicate the degree of similarity in resource characteristics between the nth candidate resource and the resource to be queried.

另外,本申请实施例不限定上述“N个候选资源的特征匹配表征数据”的确定过程,例如,其具体可以包括步骤21-步骤24:In addition, the embodiment of the present application does not limit the above-mentioned determination process of "feature matching representation data of N candidate resources", for example, it may specifically include steps 21 to 24:

步骤21:根据待查询信息,确定待提取信息。Step 21: Determine the information to be extracted according to the information to be queried.

上述“待提取信息”用于描述待查询资源所具有的资源特征;而且本申请实施例不限定该“待提取信息”,例如,其可以包括该待提取信息的身份识别号(Identity document,ID)。又如,其可以还包括该待提取信息的名称标识、各个属性信息、以及资源介绍内容中的至少一个。The above-mentioned "information to be extracted" is used to describe the resource characteristics of the resource to be queried; and the embodiment of the present application does not limit the "information to be extracted", for example, it may include the identification number (Identity document, ID of the information to be extracted) ). For another example, it may further include at least one of a name identifier of the information to be extracted, various attribute information, and resource introduction content.

另外,本申请实施例不限定步骤21的实施方式,例如,当上述“待查询信息”包括待查询资源的名称标识时,步骤21具体可以包括:先从资源数据库中查询与该待查询资源的名称标识相对应的资源描述信息;再将该资源描述信息,确定为待提取信息。In addition, the embodiment of the present application does not limit the implementation of step 21. For example, when the above-mentioned "information to be queried" includes the name identifier of the resource to be queried, step 21 may specifically include: first querying the resource database for the information related to the resource to be queried. The resource description information corresponding to the name identifier is identified; the resource description information is then determined as the information to be extracted.

基于上述步骤21的相关内容可知,在获取到待查询信息之后,可以先依据该待查询信息,确定待查询资源的资源描述信息;再从该资源描述信息中确定出待提取信息,以使该待提取信息能够描述出该待查询资源所具有的资源特征。Based on the relevant content of the above step 21, it can be known that after obtaining the information to be queried, the resource description information of the resource to be queried can be determined according to the information to be queried; and then the information to be extracted is determined from the resource description information, so that the The information to be extracted can describe the resource characteristics of the resource to be queried.

步骤22:利用预先构建的特征提取网络,对待提取信息进行特征提取处理,得到待匹配特征。Step 22: Use a pre-built feature extraction network to perform feature extraction processing on the information to be extracted to obtain features to be matched.

上述“特征提取网络”用于针对该特征提取网络的输入数据进行特征提取处理;而且本申请实施例不限定该“特征提取网络”,例如,其可以是任一种机器学习网络。The above-mentioned "feature extraction network" is used to perform feature extraction processing on the input data of the feature extraction network; and the embodiment of the present application does not limit the "feature extraction network", for example, it may be any kind of machine learning network.

另外,本申请实施例不限定上述“特征提取网络”的构建过程,例如,可以采用现有的或者未来出现的任一种机器学习网络构建方法进行实施。又如,为了提高上述“特征提取网络”的特征提取性能,可以采用方法实施例三所示的“特征提取网络”的构建过程进行实施。In addition, the embodiments of the present application do not limit the construction process of the above-mentioned "feature extraction network", for example, any existing or future machine learning network construction method can be used for implementation. For another example, in order to improve the feature extraction performance of the above-mentioned "feature extraction network", the construction process of the "feature extraction network" shown in thethird method embodiment may be used for implementation.

上述“待匹配特征”用于表示待提取信息所携带的资源特征(也就是,待查询资源所具有的资源特征)。The above-mentioned "feature to be matched" is used to represent the resource feature carried by the information to be extracted (that is, the resource feature of the resource to be queried).

基于上述步骤22的相关内容可知,在获取到待提取信息之后,可以将该待提取信息输入预先构建的特征提取网络,以使该特征提取网络能够针对该待提取信息进行特征提取处理,得到并输出待匹配特征,以使该待匹配特征能够表示出待提取信息所携带的资源特征(也就是,待查询资源所具有的资源特征)。Based on the relevant content of the above step 22, it can be known that after the information to be extracted is obtained, the information to be extracted can be input into a pre-built feature extraction network, so that the feature extraction network can perform feature extraction processing on the information to be extracted, and obtain and The feature to be matched is output, so that the feature to be matched can represent the resource feature carried by the information to be extracted (that is, the resource feature of the resource to be queried).

步骤23:将待匹配特征与第n个候选资源的资源表征特征进行匹配处理,得到第n个候选资源的特征匹配结果。其中,n为正整数,n≤N。Step 23 : Matching the feature to be matched with the resource characterizing feature of the nth candidate resource to obtain a feature matching result of the nth candidate resource. Among them, n is a positive integer, n≤N.

上述“第n个候选资源的资源表征特征”用于表示该第n个候选资源所具有的资源特征。The above-mentioned "resource characterizing feature of the nth candidate resource" is used to indicate the resource feature possessed by the nth candidate resource.

另外,本申请实施例不限定上述“第n个候选资源的资源表征特征”的获取过程,例如,可以利用预先构建的特征提取网络,对该第n个候选资源的特征表征信息进行特征提取处理,得到该第n个候选资源的资源表征特征。其中,“第n个候选资源的特征表征信息”用于描述该第n个候选资源所具有的资源特征;而且该“第n个候选资源的特征表征信息”类似于上文“待提取信息”。In addition, the embodiment of the present application does not limit the above-mentioned acquisition process of the "resource representation feature of the nth candidate resource". For example, a pre-built feature extraction network may be used to perform feature extraction processing on the feature representation information of the nth candidate resource , to obtain the resource representation feature of the nth candidate resource. Among them, the "feature representation information of the nth candidate resource" is used to describe the resource features of the nth candidate resource; and the "feature representation information of the nth candidate resource" is similar to the above "information to be extracted" .

上述“第n个候选资源的特征匹配结果”用于表示该第n个候选资源与待查询资源之间在资源特征上所呈现的相似性;而且本申请实施例不限定该“第n个候选资源的特征匹配结果”的确定过程,例如,其具体可以包括:按照预设距离公式,计算待匹配特征与第n个候选资源的资源表征特征之间的特征距离,并将该特征距离的倒数,确定为第n个候选资源的特征匹配结果,以使该第n个候选资源的特征匹配结果越大,则表示该第n个候选资源与待查询资源之间在资源特征上越相似。The above-mentioned "feature matching result of the nth candidate resource" is used to indicate the similarity in resource characteristics between the nth candidate resource and the resource to be queried; and this embodiment of the present application does not limit the "nth candidate resource". The process of determining the feature matching result of the resource", for example, it may specifically include: calculating the feature distance between the feature to be matched and the resource characterizing feature of the nth candidate resource according to a preset distance formula, and calculating the reciprocal of the feature distance , is determined as the feature matching result of the nth candidate resource, so that the larger the feature matching result of the nth candidate resource, the more similar the resource feature between the nth candidate resource and the resource to be queried.

需要说明的是,上述“预设距离公式”可以预先设定,而且本申请实施例不限定该“预设距离公式”,例如,其可以采用现有的或者未来出现的任一种距离计算方式(例如,欧式距离计算公式、余弦距离计算公式等)进行实施。It should be noted that the above-mentioned "preset distance formula" may be preset, and the embodiment of the present application does not limit the "preset distance formula", for example, it may adopt any existing or future distance calculation methods (For example, the Euclidean distance calculation formula, the cosine distance calculation formula, etc.) are implemented.

基于上述步骤23的相关内容可知,在获取到待匹配特征之后,可以将该待匹配特征与第n个候选资源的资源表征特征之间的相似度(例如,待匹配特征与第n个候选资源的资源表征特征之间的特征距离的倒数),确定为第n个候选资源的特征匹配结果,以使该“第n个候选资源的特征匹配结果”能够表示出该第n个候选资源与待查询资源之间在资源特征上所呈现的相似性。其中,n为正整数,n≤N。Based on the relevant content of the above step 23, it can be known that after the feature to be matched is obtained, the similarity between the feature to be matched and the resource characterizing feature of the nth candidate resource (for example, the feature to be matched and the nth candidate resource The reciprocal of the feature distance between the resource characterizing features) is determined as the feature matching result of the nth candidate resource, so that the "feature matching result of the nth candidate resource" can indicate the relationship between the nth candidate resource and the waiting resource. The similarity in resource characteristics presented between query resources. Among them, n is a positive integer, n≤N.

步骤24:根据N个候选资源的特征匹配结果,确定N个候选资源的特征匹配表征数据。Step 24: According to the feature matching results of the N candidate resources, determine the feature matching representation data of the N candidate resources.

本申请实施例不限定步骤24的实施方式,例如,其具体可以包括:直接将第n个候选资源的特征匹配结果,确定为第n个候选资源的特征匹配表征数据,以使该“第n个候选资源的特征匹配表征数据”越大,则表示该第n个候选资源与待查询资源之间在资源特征上的相似程度越大;其中,n为正整数,n≤N。This embodiment of the present application does not limit the implementation of step 24. For example, it may specifically include: directly determining the feature matching result of the nth candidate resource as the feature matching representation data of the nth candidate resource, so that the "nth candidate resource" The larger the feature matching representation data of each candidate resource, the greater the similarity in resource characteristics between the nth candidate resource and the resource to be queried; where n is a positive integer, n≤N.

另外,本申请实施例还提供了步骤24的另一种可能的实施方式,其具体可以包括:先将N个候选资源的特征匹配结果按照从大到小进行排序,得到特征相似序列,以使该特征相似序列用于记录按照相似性由大到小进行排序的N个候选资源;再将该特征相似序列中第n个候选资源的排列序号,确定为第n个候选资源的特征匹配表征数据,以使该“第n个候选资源的特征匹配表征数据”越小,则表示该第n个候选资源与待查询资源之间在资源特征上的相似程度越大;其中,n为正整数,n≤N。In addition, the embodiment of the present application also provides another possible implementation of step 24, which may specifically include: first, sorting the feature matching results of the N candidate resources in descending order to obtain a feature similarity sequence, so that the The feature similarity sequence is used to record N candidate resources sorted in descending order of similarity; then the sequence number of the nth candidate resource in the feature similarity sequence is determined as the feature matching representation data of the nth candidate resource , so that the smaller the "feature matching representation data of the nth candidate resource", the greater the similarity in resource characteristics between the nth candidate resource and the resource to be queried; where n is a positive integer, n≤N.

基于上述步骤21至步骤24的相关内容可知,对于N个候选资源来说,可以借助预先构建的特征提取网络,确定各个候选资源的特征匹配表征数据,以使各个候选资源的特征匹配表征数据能够准确地表示出各个候选资源与待查询资源之间在资源特征上所呈现的相似程度。Based on the above steps 21 to 24, it can be known that for N candidate resources, the feature matching representation data of each candidate resource can be determined by means of a pre-built feature extraction network, so that the feature matching representation data of each candidate resource can be Accurately indicate the degree of similarity in resource characteristics between each candidate resource and the resource to be queried.

上述“第n个候选资源的第q个属性检索表征数据”用于表示该第n个候选资源与待查询资源之间在第q个属性上所呈现的相似程度。其中,q为正整数,q≤Q,Q表示属性个数。The above "the qth attribute retrieval representation data of the nth candidate resource" is used to indicate the degree of similarity presented on the qth attribute between the nth candidate resource and the resource to be queried. Among them, q is a positive integer, q≤Q, and Q represents the number of attributes.

需要说明的是,本申请实施例不限定Q个属性,例如,当待查询资源属于影视资源时,则该Q个属性可以包括:资源类别(例如,喜剧、战争剧等)、导演、演员、上映年份、语言种类、国别、获奖信息等。It should be noted that the embodiment of the present application does not limit Q attributes. For example, when the resource to be queried belongs to a film and television resource, the Q attributes may include: resource category (for example, comedy, war drama, etc.), director, actor, Release year, language type, country, award information, etc.

另外,本申请实施例不限定上述“N个候选资源的第q个属性检索表征数据”的确定过程,例如,其具体可以包括:先在资源数据库中按照待查询资源的第q个属性进行检索处理,得到该第q个属性对应的检索结果,以使该检索结果包括N个候选资源的相关性排名(例如,按照相关性由大到小进行排列所得的各个候选资源的相关性排名);再根据该第q个属性对应的检索结果中第n个候选资源的相关性排名,确定为第n个候选资源的第q个属性检索表征数据,以使该“第n个候选资源的第q个属性检索表征数据”越小,则表示该第n个候选资源与待查询资源之间在第q个属性上所呈现的相似程度越大;其中,n为正整数,n≤N。In addition, the embodiment of the present application does not limit the above-mentioned determination process of "retrieving the representation data of the qth attribute of the N candidate resources". For example, it may specifically include: first, searching in the resource database according to the qth attribute of the resource to be queried. processing, to obtain the retrieval result corresponding to the qth attribute, so that the retrieval result includes the relevance ranking of N candidate resources (for example, the relevance ranking of each candidate resource obtained by arranging the relevance in descending order); Then, according to the relevance ranking of the nth candidate resource in the retrieval result corresponding to the qth attribute, it is determined to retrieve the representation data for the qth attribute of the nth candidate resource, so that the "qth of the nth candidate resource" The smaller the attribute retrieval representation data” is, the greater the degree of similarity between the nth candidate resource and the resource to be queried on the qth attribute; where n is a positive integer, n≤N.

需要说明的是,上述“第n个候选资源的相关性排名”用于表示该第n个候选资源与待查询资源之间在第q个属性上所呈现的相关程度(例如,相同、不同、相似等)。It should be noted that the above "relevance ranking of the nth candidate resource" is used to indicate the degree of correlation between the nth candidate resource and the resource to be queried on the qth attribute (for example, the same, different, similar, etc.).

另外,为了提高检索效果,本申请实施例还提供了确定上述“N个候选资源的至少一个属性检索表征数据”的一种可能的实施方式,其具体可以包括步骤31-步骤32:In addition, in order to improve the retrieval effect, the embodiment of the present application also provides a possible implementation manner of determining the above-mentioned "at least one attribute retrieval representation data of the N candidate resources", which may specifically include steps 31 to 32:

步骤31:获取待查询信息对应的至少一个属性。Step 31: Acquire at least one attribute corresponding to the information to be queried.

上述“待查询信息对应的至少一个属性”是指待查询资源的至少一个属性;而且本申请实施例不限定该“待查询信息对应的至少一个属性”中的属性个数,例如,其可以为Q。The above "at least one attribute corresponding to the information to be queried" refers to at least one attribute of the resource to be queried; and the embodiment of this application does not limit the number of attributes in the "at least one attribute corresponding to the information to be queried", for example, it may be Q.

另外,本申请实施例不限定步骤31的实施方式,例如,当上述“待查询信息”包括待查询资源的名称标识时,步骤3具体可以包括:先从资源数据库(或者下文“资源知识图谱”)中查询与该待查询资源的名称标识对应的至少一种属性;再将这些属性进行集合处理,得到该待查询信息对应的至少一个属性。In addition, the embodiment of the present application does not limit the implementation of step 31. For example, when the above-mentioned "information to be queried" includes the name identifier of the resource to be queried, step 3 may specifically include: starting from the resource database (or the following "resource knowledge graph") ) to query at least one attribute corresponding to the name identifier of the resource to be queried; and then perform aggregation processing on these attributes to obtain at least one attribute corresponding to the information to be queried.

步骤32:在预先构建的资源知识图谱中按照至少一个属性进行检索处理,得到各个候选资源的至少一个属性检索表征数据;其中,资源知识图谱是根据至少一个待检索资源的属性信息进行构建的;至少一个待检索资源包括至少一个候选资源和待查询资源。Step 32: Perform retrieval processing according to at least one attribute in the pre-built resource knowledge graph to obtain at least one attribute retrieval representation data of each candidate resource; wherein, the resource knowledge graph is constructed according to the attribute information of at least one resource to be retrieved; The at least one resource to be retrieved includes at least one candidate resource and a resource to be queried.

上述“资源知识图谱”包括每个资源数据的资源描述信息(例如,资源名称、资源类别、导演、演员、上映年份、语言种类、国别、获奖信息等)、以及任意两个资源数据之间的关联关系(例如,具有相同的导演等);而且该关联关系可以利用三元组(如图2所示的三元组)进行表示。The above-mentioned "resource knowledge graph" includes resource description information of each resource data (for example, resource name, resource category, director, actor, release year, language type, country, award information, etc.), as well as between any two resource data. The association relationship (for example, having the same director, etc.); and the association relationship can be represented by a triple (as shown in Figure 2).

需要说明的是,图2中“ID1”是指第一影视资源的ID;“ID2”是指第二影视资源的ID;“ID3”是指第三影视资源的ID;……。另外,图2中“A”是一个导演的名字;“B”是指第一演员的名字;“C”是指第二演员的名字;“D”是指一个影视资源类型(例如,喜剧)。It should be noted that “ID1” in FIG. 2 refers to the ID of the first video resource; “ID2” refers to the ID of the second video resource; “ID3” refers to the ID of the third video resource; In addition, "A" in Figure 2 is the name of a director; "B" refers to the name of the first actor; "C" refers to the name of the second actor; "D" refers to a movie resource type (eg, comedy) .

另外,本申请实施例不限定上述“资源知识图谱”的构建过程,例如,其具体可以包括:先将上述“资源数据库”中各个资源数据(例如,各个候选资源)均作为顶点,而且各个顶点都有资源类别、导演、演员、上映年份、语言种类、国别、获奖信息等属性;再在具有相同属性的任意两个资源数据之间构建边,如此能够得到该“资源数据库”对应的资源知识图谱,以便后续能够从该资源知识图谱中进行信息检索处理。In addition, the embodiment of the present application does not limit the construction process of the above-mentioned "resource knowledge graph". For example, it may specifically include: first, each resource data (for example, each candidate resource) in the above-mentioned "resource database" is used as a vertex, and each vertex There are attributes such as resource category, director, actor, release year, language type, country, and award information; and then construct an edge between any two resource data with the same attribute, so that the resources corresponding to the "resource database" can be obtained. Knowledge graph, so that information retrieval processing can be performed from the resource knowledge graph later.

此外,本申请实施例不限定步骤32的实施方式,例如,其具体可以包括:在获取到待查询信息对应的第q个属性之后,在预先构建的资源知识图谱中按照该第q个属性进行检索处理,得到该第q个属性对应的检索结果,以使该检索结果包括N个候选资源的相关性排名;再根据该第q个属性对应的检索结果中第n个候选资源的相关性排名,确定为第n个候选资源的第q个属性检索表征数据,以使该“第n个候选资源的第q个属性检索表征数据”越小,则表示该第n个候选资源与待查询资源之间在第q个属性上所呈现的相似程度越大。其中,q为正整数,q≤Q,Q为正整数。In addition, the embodiment of the present application does not limit the implementation of step 32. For example, it may specifically include: after obtaining the qth attribute corresponding to the information to be queried, perform the process according to the qth attribute in the pre-built resource knowledge graph. Retrieval processing to obtain the retrieval result corresponding to the qth attribute, so that the retrieval result includes the relevance ranking of the N candidate resources; and then according to the relevance ranking of the nth candidate resource in the retrieval result corresponding to the qth attribute , it is determined as the qth attribute retrieval characteristic data of the nth candidate resource, so that the smaller the "qth attribute retrieval characteristic data of the nth candidate resource" is, it means that the nth candidate resource is the same as the resource to be queried. The greater the similarity in the qth attribute between them. Among them, q is a positive integer, q≤Q, and Q is a positive integer.

基于上述步骤31至步骤32的相关内容可知,可以借助预先构建的资源知识图谱,确定各个候选资源的至少一个属性检索表征数据,如此有利于提高资源检索效果(例如,检索效率等)。Based on the above steps 31 to 32, it can be known that at least one attribute of each candidate resource can be determined by means of a pre-built resource knowledge graph to retrieve representation data, which is beneficial to improve resource retrieval effect (eg, retrieval efficiency, etc.).

基于上述步骤11的相关内容可知,可以利用用于描述待查询资源的待查询信息,确定各个候选资源的推荐表征数据,以使各个候选资源的推荐表征数据能够表示出各个候选资源与待查询资源之间的相似性,从而使得各个候选资源的推荐表征数据能够表示各个候选资源与上述“待查询资源”之间的关联程度。Based on the relevant content of the above step 11, it can be known that the information to be queried for describing the resource to be queried can be used to determine the recommendation representation data of each candidate resource, so that the recommendation representation data of each candidate resource can represent each candidate resource and the resource to be queried. Therefore, the recommendation representation data of each candidate resource can represent the degree of association between each candidate resource and the above-mentioned "resource to be queried".

步骤12:根据至少一个候选资源的推荐表征数据,从至少一个候选资源中确定至少一个推荐资源。Step 12: Determine at least one recommended resource from the at least one candidate resource according to the recommendation representation data of the at least one candidate resource.

本申请实施例不限定步骤12的实施方式,例如,当上述“至少一个候选资源”包括N个候选资源时,步骤12具体可以包括步骤41-步骤42:This embodiment of the present application does not limit the implementation of step 12. For example, when the above-mentioned "at least one candidate resource" includes N candidate resources, step 12 may specifically include steps 41 to 42:

步骤41:根据第n个候选资源的推荐表征数据,确定该第n个候选资源的推荐得分。其中,n为正整数,n≤N。Step 41: Determine the recommendation score of the nth candidate resource according to the recommendation representation data of the nth candidate resource. Among them, n is a positive integer, n≤N.

上述“第n个候选资源的推荐得分”用于表示向用户提供该第n个候选资源的可能性(也就是,该用户查看该第n个候选资源的可能性);而且该“第n个候选资源的推荐得分”越大,则表示向用户提供该第n个候选资源的可能性越大。The above-mentioned "recommendation score of the nth candidate resource" is used to indicate the possibility of providing the nth candidate resource to the user (that is, the possibility of the user viewing the nth candidate resource); and the "nth candidate resource" The larger the “recommendation score” of the candidate resource, the higher the possibility of providing the nth candidate resource to the user.

另外,本申请实施例不限定步骤41的实施方式,例如,当上述“第n个候选资源的推荐表征数据”包括该第n个候选资源的特征匹配表征数据、该第n个候选资源的第1个属性检索表征数据、该第n个候选资源的第2个属性检索表征数据、……、以及该第n个候选资源的第Q个属性检索表征数据时,步骤41具体可以包括步骤411-步骤412:In addition, the embodiment of the present application does not limit the implementation of step 41. For example, when the above-mentioned "recommended representation data of the nth candidate resource" includes the feature matching representation data of the nth candidate resource, the When 1 attribute retrieval characteristic data, the second attribute retrieval characteristic data of the nth candidate resource, ..., and the Qth attribute retrieval characteristic data of the nth candidate resource, step 41 may specifically include steps 411- Step 412:

步骤411:根据第n个候选资源的特征匹配表征数据,确定该第n个候选资源的特征匹配得分。Step 411: Determine the feature matching score of the nth candidate resource according to the feature matching representation data of the nth candidate resource.

本申请实施例不限定步骤411的实施方式,例如,当上述“第n个候选资源的特征匹配表征数据”包括上文“特征相似序列”中第n个候选资源的排列序号时,步骤411具体可以包括:将该“特征相似序列”中第n个候选资源的排列序号的倒数,确定为该第n个候选资源的特征匹配得分,以使该“第n个候选资源的特征匹配得分”越大,表示在资源特征方面向用户推荐该第n个候选资源的可能性越大。This embodiment of the present application does not limit the implementation of step 411. For example, when the above-mentioned "feature matching representation data of the nth candidate resource" includes the sequence number of the nth candidate resource in the above "feature similarity sequence", step 411 is specifically It may include: determining the reciprocal of the sequence number of the nth candidate resource in the "feature similarity sequence" as the feature matching score of the nth candidate resource, so that the "feature matching score of the nth candidate resource" is higher. If it is large, it means that the probability of recommending the nth candidate resource to the user is higher in terms of resource characteristics.

需要说明的是,上述“特征相似序列”的相关内容请参见上文步骤24的相关内容。It should be noted that, for the relevant content of the above-mentioned "feature-similar sequence", please refer to the relevant content of step 24 above.

步骤412:根据第n个候选资源的第q个属性检索表征数据,确定该第n个候选资源的第q个属性得分。其中,q为正整数,q≤Q。Step 412: Retrieve the representation data according to the qth attribute of the nth candidate resource, and determine the qth attribute score of the nth candidate resource. Among them, q is a positive integer, q≤Q.

本申请实施例不限定步骤412的实施方式,例如,当上述“第n个候选资源的第q个属性检索表征数据”包括上述“第q个属性对应的检索结果”中第n个候选资源的相关性排名时,步骤412具体可以包括:将该“第q个属性对应的检索结果”中第n个候选资源的相关性排名的倒数,确定为该第n个候选资源的第q个属性得分,以使该“第n个候选资源的第q个属性得分”越大,则表示在第q个属性方面向用户推荐该第n个候选资源的可能性越大。This embodiment of the present application does not limit the implementation of step 412. For example, when the above-mentioned "retrieve representation data of the q-th attribute of the n-th candidate resource" includes the above-mentioned "retrieval result corresponding to the q-th attribute" of the n-th candidate resource During the relevance ranking, step 412 may specifically include: determining the reciprocal of the relevance ranking of the nth candidate resource in the "retrieval result corresponding to the qth attribute" as the qth attribute score of the nth candidate resource , so that the larger the "qth attribute score of the nth candidate resource" is, the greater the possibility of recommending the nth candidate resource to the user in terms of the qth attribute is greater.

步骤413:将第n个候选资源的特征匹配得分、第n个候选资源的第1个属性得分、第n个候选资源的第2个属性得分、……、以及第n个候选资源的第Q个属性得分进行加和处理,得到该第n个候选资源的推荐得分(如公式(1)所示)。Step 413: Match the feature score of the nth candidate resource, the first attribute score of the nth candidate resource, the second attribute score of the nth candidate resource, ..., and the Qth of the nth candidate resource The attribute scores are summed to obtain the recommendation score of the nth candidate resource (as shown in formula (1)).

Figure BDA0003364342980000111
Figure BDA0003364342980000111

式中,RankScore(Itemn)表示第n个候选资源的推荐得分;

Figure BDA0003364342980000112
表示上文“特征相似序列”中第n个候选资源的排列序号;
Figure BDA0003364342980000113
表示上述“第q个属性对应的检索结果”中第n个候选资源的相关性排名。In the formula, RankScore(Itemn ) represents the recommendation score of the nth candidate resource;
Figure BDA0003364342980000112
Indicates the sequence number of the nth candidate resource in the above "feature similarity sequence";
Figure BDA0003364342980000113
Represents the relevance ranking of the nth candidate resource in the above "retrieval result corresponding to the qth attribute".

基于上述步骤41的相关内容可知,在获取到根据第n个候选资源的推荐表征数据之后,可以根据该第n个候选资源的推荐表征数据,确定该第n个候选资源的推荐得分,以使该“第n个候选资源的推荐得分”能够表示向用户提供该第n个候选资源的可能性。其中,n为正整数,n≤N。Based on the relevant content of the above step 41, it can be known that after the recommendation characteristic data according to the nth candidate resource is obtained, the recommendation score of the nth candidate resource can be determined according to the recommendation characteristic data of the nth candidate resource, so that the The "recommendation score of the nth candidate resource" can represent the possibility of providing the nth candidate resource to the user. Among them, n is a positive integer, n≤N.

步骤42:根据N个候选资源的推荐得分,从该N个候选资源中确定至少一个推荐资源。Step 42: Determine at least one recommended resource from the N candidate resources according to the recommendation scores of the N candidate resources.

本申请实施例不限定步骤42的实施方式,例如,其具体可以包括:按照N个候选资源的推荐得分,将该N个候选资源中推荐得分高于预设得分阈值的各个候选资源,均确定为推荐资源。其中,“预设得分阈值”可以预先设定。The embodiment of the present application does not limit the implementation of step 42. For example, it may specifically include: according to the recommendation scores of the N candidate resources, determine each candidate resource whose recommendation score is higher than the preset score threshold among the N candidate resources, and determine all the candidate resources. for recommended resources. The "preset score threshold" can be preset.

又如,步骤42具体可以包括:先根据N个候选资源的推荐得分,将该N个候选资源按照推荐得分由大到小进行排序,得到推荐得分序列,以使该推荐得分序列包括各个候选资源的推荐排名;再将该N个候选资源中推荐排名低于预设排名阈值的各个候选资源,均确定为推荐资源。其中,“预设排名阈值”可以预先设定。For another example, step 42 may specifically include: first, according to the recommendation scores of the N candidate resources, sorting the N candidate resources in descending order of the recommendation scores to obtain a recommendation score sequence, so that the recommendation score sequence includes each candidate resource Then, each candidate resource whose recommended ranking is lower than the preset ranking threshold among the N candidate resources is determined as a recommended resource. The "preset ranking threshold" may be preset.

基于上述步骤41至步骤42的相关内容可知,在获取到至少一个候选资源的推荐表征数据之后,可以先根据各个候选资源的推荐表征数据,确定各个候选资源的推荐得分;再按照各个候选资源的推荐得分,从该至少一个候选资源中确定至少一个推荐资源,以使这些推荐资源的推荐得分均高于上述“至少一个候选资源”中除了这些推荐资源以外的其他任一资源数据的推荐得分,如此有利于提高推荐效果。Based on the relevant content of the above steps 41 to 42, it can be known that after obtaining the recommendation representation data of at least one candidate resource, the recommendation score of each candidate resource can be determined according to the recommendation representation data of each candidate resource; recommendation score, at least one recommended resource is determined from the at least one candidate resource, so that the recommendation score of these recommended resources is higher than the recommendation score of any other resource data except these recommended resources in the above-mentioned "at least one candidate resource", This will help to improve the recommendation effect.

另外,为了提高推荐效果,本申请实施例还提供了步骤12的另一种可能的实施方式,在该实施方式中,当上述“推荐表征数据”包括特征匹配表征数据和Q个属性检索表征数据时,步骤12具体可以包括步骤51-步骤54:In addition, in order to improve the recommendation effect, the embodiment of the present application also provides another possible implementation of step 12. In this implementation, when the above-mentioned "recommended representation data" includes feature matching representation data and Q attribute retrieval representation data , step 12 may specifically include steps 51-54:

步骤51:根据至少一个候选资源的特征匹配表征数据,从该至少一个候选资源中确定满足第一条件的至少一个特征匹配资源。Step 51: Determine at least one feature matching resource that satisfies the first condition from the at least one candidate resource according to the feature matching representation data of the at least one candidate resource.

上述“第一条件”可以预先设定;而且本申请实施例不限定该“第一条件”,例如,当上述“第n个候选资源的特征匹配表征数据”包括上文“特征相似序列”中第n个候选资源的排列序号时,该“第一条件”可以包括:低于预设序号阈值。其中,“预设序号阈值”可以预先设定。The above "first condition" can be preset; and the embodiment of the present application does not limit the "first condition", for example, when the above "feature matching representation data of the nth candidate resource" includes the above "feature similarity sequence" When the sequence number of the nth candidate resource is the sequence number, the "first condition" may include: lower than a preset sequence number threshold. The "preset serial number threshold" can be preset.

上述“特征匹配资源”用于表示特征匹配表征数据满足第一条件的候选资源。The above-mentioned "feature matching resource" is used to indicate a candidate resource whose feature matching representation data satisfies the first condition.

另外,本申请实施例不限定上述“至少一个特征匹配资源”的确定过程,例如,其具体可以包括:判断第n个候选资源的特征匹配表征数据是否满足第一条件;若满足,则将该第n个候选资源确定为特征匹配资源;若不满足,则舍弃该第n个候选资源。In addition, the embodiment of the present application does not limit the above-mentioned determination process of "at least one feature matching resource". For example, it may specifically include: judging whether the feature matching representation data of the nth candidate resource satisfies the first condition; The nth candidate resource is determined as a feature matching resource; if not, the nth candidate resource is discarded.

基于上述步骤51的相关内容可知,在获取到N个候选资源的特征匹配表征数据之后,可以从该N个候选资源中查找特征匹配表征数据满足第一条件的各个特征匹配资源,以便后续能够从这些特征匹配资源中挑选用于推荐给用户的资源数据。Based on the relevant content of the above step 51, it can be known that after the feature matching representation data of the N candidate resources is obtained, each feature matching resource whose feature matching representation data satisfies the first condition can be searched from the N candidate resources, so that the subsequent feature matching resources can be retrieved from the N candidate resources. These features match the resource data selected for recommending to users.

步骤52:根据至少一个候选资源的第q个属性检索表征数据,从该至少一个候选资源中确定第q个属性对应的至少一个属性命中资源。其中,第q个属性对应的各个属性命中资源均满足第q个属性筛选条件;q为正整数,q≤Q。Step 52: Retrieve the representation data according to the qth attribute of the at least one candidate resource, and determine from the at least one candidate resource that at least one attribute corresponding to the qth attribute hits the resource. Wherein, each attribute hit resource corresponding to the qth attribute satisfies the qth attribute filter condition; q is a positive integer, and q≤Q.

上述“第q个属性筛选条件”可以预先设定;而且本申请实施例不限定该“第q个属性筛选条件”,例如,其具体可以为:与待查询资源的第q个属性相同的资源数据。可见,若上述“第n个候选资源的第q个属性检索表征数据”表示该第n个候选资源的第q个属性与待查询资源的第q个属性相同,则可以确定该第n个候选资源满足第q个属性筛选条件。The above-mentioned "qth attribute screening condition" may be preset; and the embodiment of the present application does not limit the "qth attribute screening condition", for example, it may specifically be: a resource that is the same as the qth attribute of the resource to be queried data. It can be seen that if the above-mentioned "retrieve representation data of the qth attribute of the nth candidate resource" indicates that the qth attribute of the nth candidate resource is the same as the qth attribute of the resource to be queried, then the nth candidate resource can be determined. The resource satisfies the qth attribute filter condition.

又如,当上述“第n个候选资源的第q个属性检索表征数据”包括上述“第q个属性对应的检索结果”中第n个候选资源的相关性排名时,该第q个属性筛选条件”具体可以为:相关性排名低于第q个排名阈值的资源数据。其中,“第q个排名阈值”可以预先设定。可见,若上述“第q个属性对应的检索结果”中第n个候选资源的相关性排名低于第q个排名阈值,则可以确定该第n个候选资源满足第q个属性筛选条件。For another example, when the "qth attribute retrieval representation data of the nth candidate resource" includes the relevance ranking of the nth candidate resource in the above "retrieval result corresponding to the qth attribute", the qth attribute is filtered. Condition" can be specifically: resource data whose relevance ranking is lower than the qth ranking threshold. Among them, the "qth ranking threshold" can be preset. It can be seen that if the above "retrieval result corresponding to the qth attribute" in the first If the relevance ranking of the n candidate resources is lower than the qth ranking threshold, it can be determined that the nth candidate resource satisfies the qth attribute screening condition.

基于上述步骤52的相关内容可知,在获取到N个候选资源的第q个属性检索表征数据之后,先依据这些候选资源的第q个属性检索表征数据,从这些候选资源中查找满足第q个属性筛选条件的各个候选资源;再将满足第q个属性筛选条件的各个候选资源,分别确定为第q个属性对应的各个属性命中资源,以便后续能够从这些属性命中资源中挑选用于推荐给用户的资源数据。其中,q为正整数,q≤Q。Based on the relevant content of the above step 52, it can be known that after the qth attribute retrieval characteristic data of the N candidate resources is obtained, the characteristic data is first retrieved according to the qth attribute of these candidate resources, and the qth attribute that satisfies the qth attribute is searched from these candidate resources. Each candidate resource of the attribute filter condition; and then each candidate resource that satisfies the qth attribute filter condition is determined as each attribute hit resource corresponding to the qth attribute, so that the following can be selected from these attribute hit resources for recommendation to User resource data. Among them, q is a positive integer, q≤Q.

步骤53:根据至少一个特征匹配资源、第1个属性对应的至少一个属性命中资源至第Q个属性对应的至少一个属性命中资源,确定至少一个第一资源。Step 53: Determine at least one first resource according to at least one feature matching resource, at least one attribute hit resource corresponding to the first attribute to at least one attribute hit resource corresponding to the Qth attribute.

本申请实施例中,在获取到至少一个特征匹配资源、第1个属性对应的至少一个属性命中资源、第2个属性对应的至少一个属性命中资源、……、以及第Q个属性对应的至少一个属性命中资源之后,可以将各个特征匹配资源、第1个属性对应的各个属性命中资源、第2个属性对应的各个属性命中资源、……、以及第Q个属性对应的各个属性命中资源,均确定为第一资源,以便后续能够从这些第一资源中挑选用于推荐给用户的资源数据。In the embodiment of the present application, after obtaining at least one feature matching resource, at least one attribute hit resource corresponding to the first attribute, at least one attribute hit resource corresponding to the second attribute, ..., and at least one attribute corresponding to the Qth attribute After an attribute hits a resource, each feature matching resource, each attribute corresponding to the first attribute hits the resource, each attribute corresponding to the second attribute hits the resource, ..., and each attribute corresponding to the Qth attribute hits the resource, Both are determined as first resources, so that resource data for recommending to users can be selected from these first resources subsequently.

步骤54:根据至少一个第一资源的推荐表征数据,从至少一个第一资源中确定至少一个推荐资源。Step 54: Determine at least one recommended resource from the at least one first resource according to the recommended representation data of the at least one first resource.

本申请实施例不限定步骤54的实施方式,例如,当上述“至少一个第一资源”包括T个第一资源时,步骤54可以采用上文步骤41-步骤42所示的“至少一个推荐资源”的确定过程进行实施,只需将上文步骤41-步骤42所示的“至少一个推荐资源”的确定过程中“候选资源”替换为“第一资源”、“n”替换为“t”、以及“N”替换为“T”即可。其中,t为正整数,t≤T,T为正整数。This embodiment of the present application does not limit the implementation of step 54. For example, when the above "at least one first resource" includes T first resources, step 54 may adopt the "at least one recommended resource" shown in steps 41 to 42 above. " to implement the determination process of "at least one recommended resource" shown in steps 41 to 42 above, replace "candidate resource" with "first resource" and "n" with "t" , and replace "N" with "T". Among them, t is a positive integer, t≤T, and T is a positive integer.

基于上述步骤51至步骤53的相关内容可知,在获取到N个候选资源的特征匹配表征数据以及Q个属性检索表征数据之后,可以先根据N个候选资源的特征匹配表征数据以及Q个属性检索表征数据,从该N个候选资源中筛选出至少一个第一资源;再依据这些第一资源的推荐表征数据,从这些第一资源中确定至少一个推荐资源,如此有利于提高资源推荐效果(例如,提高资源推荐效率)。Based on the relevant content of the above steps 51 to 53, it can be known that after obtaining the characteristic matching representation data of the N candidate resources and the Q attribute retrieval representation data, you can first match the representation data and the Q attributes according to the N candidate resources. Characterization data, screen out at least one first resource from the N candidate resources; and then determine at least one recommended resource from these first resources according to the recommended characterizing data of these first resources, which is beneficial to improve the effect of resource recommendation (for example, , to improve the efficiency of resource recommendation).

另外,为了提高资源推荐效果,本申请实施例还提供了步骤12的又一种可能的实施方式,其具体可以包括步骤61-步骤62:In addition, in order to improve the effect of resource recommendation, the embodiment of the present application also provides another possible implementation of step 12, which may specifically include step 61-step 62:

步骤61:从至少一个候选资源中确定出满足第二条件的至少一个第二资源。Step 61: Determine at least one second resource that satisfies the second condition from the at least one candidate resource.

上述“第二条件”可以预先设定;而且本申请实施例不限定该“第二条件”,例如,其具体可以包括:具有资源使用权限的资源数据(例如,具有播放版权的影视资源)。又如,“第二条件”可以包括:下文步骤611-步骤614所示的第二资源的筛选条件。The above-mentioned "second condition" can be preset; and the embodiment of the present application does not limit the "second condition", for example, it may specifically include: resource data with resource usage rights (for example, video resources with playback rights). For another example, the "second condition" may include: the filtering conditions of the second resource shown in steps 611 to 614 below.

上述“第二资源”是指满足第二条件的候选资源。The above-mentioned "second resource" refers to a candidate resource that satisfies the second condition.

另外,本申请实施例不限定步骤61的实施方式,例如,当上述“第二条件”为具有资源使用权限的资源数据时,步骤61具体可以包括:从至少一个候选资源中确定出具有资源使用权限的至少一个第二资源。可见,对于第n个候选资源来说,若该第n个候选资源不具有资源使用权限,则导致用户无法在终端设备上查看该第n个候选资源,故需要将该第n个候选资源舍弃;若第n个候选资源具有资源使用权限,则可以确定用户可以在终端设备上查看该第n个候选资源,故可以将该第n个候选资源确定为第二资源。其中,n为正整数,n≤N。In addition, this embodiment of the present application does not limit the implementation of step 61. For example, when the above-mentioned "second condition" is resource data with resource usage rights, step 61 may specifically include: determining from at least one candidate resource that the resource usage Permission to at least one second resource. It can be seen that for the nth candidate resource, if the nth candidate resource does not have the resource use permission, the user cannot view the nth candidate resource on the terminal device, so the nth candidate resource needs to be discarded. ; If the nth candidate resource has the resource use authority, it can be determined that the user can view the nth candidate resource on the terminal device, so the nth candidate resource can be determined as the second resource. Among them, n is a positive integer, n≤N.

此外,为了提高资源推荐效果,本申请实施例还提供了步骤61的另一种可能的实施方式,其具体可以包括步骤611-步骤614:In addition, in order to improve the effect of resource recommendation, this embodiment of the present application also provides another possible implementation of step 61, which may specifically include steps 611 to 614:

步骤611:根据至少一个候选资源的特征匹配表征数据,从该至少一个候选资源中确定满足第一条件的至少一个特征匹配资源。Step 611: Determine at least one feature matching resource that satisfies the first condition from the at least one candidate resource according to the feature matching representation data of the at least one candidate resource.

步骤612:根据至少一个候选资源的第q个属性检索表征数据,从该至少一个候选资源中确定第q个属性对应的至少一个属性命中资源。其中,第q个属性对应的各个属性命中资源均满足第q个属性筛选条件;q为正整数,q≤Q。Step 612: Retrieve the representation data according to the qth attribute of the at least one candidate resource, and determine from the at least one candidate resource that at least one attribute corresponding to the qth attribute hits the resource. Wherein, each attribute hit resource corresponding to the qth attribute satisfies the qth attribute filter condition; q is a positive integer, and q≤Q.

步骤613:根据至少一个特征匹配资源、第1个属性对应的至少一个属性命中资源至第Q个属性对应的至少一个属性命中资源,确定至少一个第一资源。Step 613: Determine at least one first resource according to at least one feature matching resource, at least one attribute hit resource corresponding to the first attribute to at least one attribute hit resource corresponding to the Qth attribute.

需要说明的是,步骤611-步骤613的相关内容请分别参见上文步骤51-步骤53的相关内容。It should be noted that, for the relevant content of steps 611 to 613, please refer to the relevant content of steps 51 to 53 above, respectively.

步骤614:从至少一个第一资源中确定出满足第三条件的至少一个第二资源。Step 614: Determine at least one second resource that satisfies the third condition from the at least one first resource.

上述“第三条件”可以预先设定;而且本申请实施例不限定该“第三条件”,例如,其具体可以包括:具有资源使用权限的资源数据(例如,具有播放版权的影视资源)。可见,对于第t个第一资源来说,若该第t个第一资源不具有资源使用权限,则导致用户无法在终端设备上查看该第t个第一资源,故需要将该第t个第一资源舍弃;若第t个第一资源具有资源使用权限,则可以确定用户可以在终端设备上查看该第t个第一资源,故可以将该第t个第一资源确定为第二资源。其中,t为正整数,t≤T,T为正整数,T表示上述“至少一个第一资源”中第一资源的个数。The above-mentioned "third condition" may be preset; and the embodiment of the present application does not limit the "third condition", for example, it may specifically include: resource data with resource usage rights (for example, video resources with playback rights). It can be seen that, for the t-th first resource, if the t-th first resource does not have resource use rights, the user cannot view the t-th first resource on the terminal device, so it is necessary to use the t-th first resource. The first resource is discarded; if the t-th first resource has the resource usage authority, it can be determined that the user can view the t-th first resource on the terminal device, so the t-th first resource can be determined as the second resource . Wherein, t is a positive integer, t≤T, T is a positive integer, and T represents the number of first resources in the above-mentioned "at least one first resource".

基于上述步骤61的相关内容可知,在获取到N个候选资源之后,可以先从这些候选资源中挑选出满足第二条件的各个第二资源,以便后续能够从这些第二资源中挑选用于推荐给用户的资源数据。Based on the relevant content of the above step 61, it can be known that after N candidate resources are obtained, each second resource that satisfies the second condition can be selected from these candidate resources, so that these second resources can be selected for recommendation later. Resource data for users.

步骤62:根据至少一个第二资源的推荐表征数据,从至少一个候选资源中确定至少一个推荐资源。Step 62: Determine at least one recommended resource from the at least one candidate resource according to the recommended representation data of the at least one second resource.

本申请实施例不限定步骤62的实施方式,例如,当上述“至少一个第二资源”包括K个第二资源时,步骤62可以采用上文步骤41-步骤42所示的“至少一个推荐资源”的确定过程进行实施,只需将上文步骤41-步骤42所示的“至少一个推荐资源”的确定过程中“候选资源”替换为“第二资源”、“n”替换为“k”、以及“N”替换为“K”即可。其中,k为正整数,k≤K,K为正整数。This embodiment of the present application does not limit the implementation of step 62. For example, when the above-mentioned "at least one second resource" includes K second resources, step 62 may adopt the "at least one recommended resource" shown in the above steps 41-42. " to implement the process of determining "at least one recommended resource" shown in steps 41-42 above, replace "candidate resource" with "second resource" and "n" with "k" , and replace "N" with "K". Among them, k is a positive integer, k≤K, and K is a positive integer.

基于上述步骤61至步骤62的相关内容可知,在获取到N个候选资源的特征匹配表征数据以及Q个属性检索表征数据之后,可以参考从N个候选资源中挑选出的各个第二资源的推荐表征数据,从这些第二资源中确定出至少一个推荐资源,以保证这些推荐资源均能够被用户在终端设备上进行查看,如此有利于提高资源推荐效果,从而有利于提高用户资源查询体验。Based on the relevant contents of the above steps 61 to 62, it can be known that after obtaining the feature matching representation data of the N candidate resources and the Q attribute retrieval representation data, you can refer to the recommendation of each second resource selected from the N candidate resources. Characterization data, at least one recommended resource is determined from these second resources to ensure that these recommended resources can be viewed by the user on the terminal device, which is conducive to improving the resource recommendation effect and thus improving the user resource query experience.

方法实施例三Method embodiment three

为了提高资源推荐效果,本申请实施例还提供了构建上文“特征提取网络”的一种可能的实施方式,其具体可以包括步骤71-步骤72:In order to improve the effect of resource recommendation, the embodiment of the present application also provides a possible implementation manner of constructing the above "feature extraction network", which may specifically include steps 71 to 72:

步骤71:根据用户的历史资源操作信息,确定至少一个资源样本数据。Step 71: Determine at least one resource sample data according to the user's historical resource operation information.

上述“历史资源操作信息”用于描述在上文“资源查询请求”的触发时刻之前,该用户针对资源数据触发过的操作行为(例如,资源查询操作、资源使用操作等)。The above-mentioned "historical resource operation information" is used to describe the operation behavior (eg, resource query operation, resource use operation, etc.) triggered by the user with respect to the resource data before the trigger time of the above "resource query request".

另外,本申请实施例不限定上述“历史资源操作信息”的获取方式,例如,可以从用户针对资源数据的操作日志中汇总该用户的历史资源操作信息。In addition, the embodiment of the present application does not limit the acquisition method of the above-mentioned "historical resource operation information". For example, the user's historical resource operation information may be summarized from the user's operation log for resource data.

此外,上述“历史资源操作信息”可以包括至少一条历史资源操作记录。其中,“历史资源操作记录”用于表示用户针对历史资源数据的操作行为;而且该“资源操作记录”携带有该历史资源数据的描述内容(例如,名称标识等)。“历史资源数据”是指在上述“历史资源操作记录”中涉及到的资源数据(也就是,被用户历史操作行为涉及到的资源数据)。In addition, the above-mentioned "historical resource operation information" may include at least one historical resource operation record. The "historical resource operation record" is used to represent the user's operation behavior on the historical resource data; and the "resource operation record" carries the description content of the historical resource data (for example, name identification, etc.). "Historical resource data" refers to the resource data involved in the above-mentioned "historical resource operation record" (that is, the resource data involved by the user's historical operation behavior).

上述“资源样本数据”是指上述“历史资源数据”的资源描述信息;而且上述“资源样本数据”类似于上述“待提取信息”。The above-mentioned "resource sample data" refers to the resource description information of the above-mentioned "historical resource data"; and the above-mentioned "resource sample data" is similar to the above-mentioned "information to be extracted".

另外,本申请实施例不限定步骤71的实施方式,例如,当上述“历史资源操作信息”包括至少一条历史资源操作记录,且各个历史资源操作记录携带有历史资源数据的描述内容时,步骤71具体可以包括步骤711-步骤713:In addition, the embodiment of the present application does not limit the implementation of step 71. For example, when the above-mentioned "historical resource operation information" includes at least one historical resource operation record, and each historical resource operation record carries the description content of historical resource data, step 71 Specifically, it may include steps 711-713:

步骤711:从各个历史资源操作记录中提取各个历史资源数据的描述内容。Step 711: Extract the description content of each historical resource data from each historical resource operation record.

步骤712:根据各个历史资源数据的描述内容,确定各个历史资源数据的资源描述信息。Step 712: Determine resource description information of each historical resource data according to the description content of each historical resource data.

本申请实施例中,当上述“描述内容”包括名称标识时,在获取到第e个历史资源数据的描述内容之后,可以从资源数据库中查询与该第e个历史资源数据的名称标识相对应的资源描述信息;再将该资源描述信息确定为该第e个历史资源数据的资源描述信息。其中,e为正整数,e≤E,E为正整数,E表示历史资源数据的个数。In the embodiment of the present application, when the above-mentioned "descriptive content" includes a name identifier, after obtaining the description content of the e-th historical resource data, the resource database can be queried corresponding to the name identifier of the e-th historical resource data The resource description information; then determine the resource description information as the resource description information of the e-th historical resource data. Among them, e is a positive integer, e≤E, E is a positive integer, and E represents the number of historical resource data.

步骤713:根据各个历史资源数据的资源描述信息,确定各个资源样本数据。Step 713: Determine each resource sample data according to the resource description information of each historical resource data.

本申请实施例中,在获取到第e个历史资源数据的资源描述信息之后,可以将该第e个历史资源数据的资源描述信息,确定为第e个资源样本数据。其中,e为正整数,e≤E,E为正整数,E表示历史资源数据的个数。In the embodiment of the present application, after the resource description information of the e-th historical resource data is obtained, the resource description information of the e-th historical resource data may be determined as the e-th resource sample data. Among them, e is a positive integer, e≤E, E is a positive integer, and E represents the number of historical resource data.

基于上述步骤711至步骤713的相关内容可知,在一些情况下,可以根据用户的历史资源操作记录,确定出各个资源样本数据,以使这些资源样本数据能够描述出该用户的资源使用喜好。Based on the relevant content of the above steps 711 to 713, in some cases, each resource sample data can be determined according to the user's historical resource operation records, so that the resource sample data can describe the user's resource usage preferences.

此外,为了提高网络构建效果,本申请实施例还提供了步骤71的另一种可能的实施方式,其具体可以包括:根据用户的历史资源操作信息,确定至少一个正样本数据和至少一个负样本数据。In addition, in order to improve the network construction effect, this embodiment of the present application also provides another possible implementation of step 71, which may specifically include: determining at least one positive sample data and at least one negative sample data according to the user's historical resource operation information data.

上述“正样本数据”是指上述“历史资源数据”的资源描述信息。可见,上述“正样本数据”是指用户已操作过的资源数据的资源描述信息(也就是,用户喜欢的资源数据的资源描述信息)。The above-mentioned "positive sample data" refers to the resource description information of the above-mentioned "historical resource data". It can be seen that the above-mentioned "positive sample data" refers to the resource description information of the resource data that the user has operated (that is, the resource description information of the resource data that the user likes).

另外,本申请实施例不限定“正样本数据”的确定过程,例如,当上述“历史资源操作信息”用于描述针对至少一个待使用资源触发的操作行为时,该“正样本数据”的确定过程具体可以包括:根据至少一个待使用资源,确定至少一个正样本数据。其中,上述“待使用资源”用于表示用户已操作过的一个资源数据(也就是,上述“历史资源数据”)。In addition, the embodiments of the present application do not limit the determination process of "positive sample data". For example, when the above-mentioned "historical resource operation information" is used to describe the operation behavior triggered for at least one resource to be used, the determination of the "positive sample data" The process may specifically include: determining at least one positive sample data according to at least one resource to be used. Wherein, the above-mentioned "resource to be used" is used to represent a piece of resource data that has been operated by the user (that is, the above-mentioned "historical resource data").

需要说明的是,本申请实施例不限定上述步骤“根据至少一个待使用资源,确定至少一个正样本数据”的实施方式,例如,其具体可以包括:可以将第e个待使用资源的资源描述信息,确定为第e个正样本数据。其中,e为正整数,e≤E,E为正整数。It should be noted that this embodiment of the present application does not limit the implementation of the above step of “determining at least one positive sample data according to at least one resource to be used”. For example, it may specifically include: the resource description of the e-th resource to be used can be described information, which is determined as the e-th positive sample data. Among them, e is a positive integer, e≤E, and E is a positive integer.

上述“负样本数据”是指用户不喜欢的资源数据的资源描述信息;而且本申请实施例不限定上述“至少一个负样本数据”的确定过程,例如,当上述“历史资源操作信息”用于描述针对至少一个待使用资源触发的操作行为时,该“负样本数据”的确定过程具体可以包括步骤81-步骤83:The above-mentioned "negative sample data" refers to the resource description information of the resource data that the user does not like; and the embodiment of the present application does not limit the determination process of the above-mentioned "at least one negative sample data". For example, when the above-mentioned "historical resource operation information" is used for When describing the operation behavior triggered for at least one resource to be used, the process of determining the "negative sample data" may specifically include steps 81 to 83:

步骤81:将至少一个备选资源的属性信息与至少一个待使用资源的属性信息进行比较,得到属性比较结果。Step 81: Compare the attribute information of the at least one candidate resource with the attribute information of the at least one resource to be used to obtain an attribute comparison result.

上述“至少一个备选资源”是指在确定用户不喜欢的资源数据时所需参考的资源数据;而且本申请实施例不限定该“至少一个备选资源”,例如,其可以包括上文“至少一个候选资源”。The above-mentioned "at least one alternative resource" refers to the resource data that needs to be referred to when determining the resource data that the user does not like; and the embodiment of the present application does not limit the "at least one alternative resource", for example, it may include the above " at least one candidate resource".

另外,为了提高负样本数据的确定效率,可以参考一段时间内的热搜资源数据,确定上述“至少一个备选资源”。基于此可知,本申请实施例还提供了上述“至少一个备选资源”的另一种可能的实施方式,在该实施方式中,上述“至少一个备选资源”包括待使用时间段内的达到预设资源条件的至少一个资源数据。In addition, in order to improve the determination efficiency of negative sample data, the above-mentioned "at least one candidate resource" may be determined with reference to the hot search resource data within a period of time. Based on this, it can be seen that the embodiment of the present application also provides another possible implementation of the above-mentioned "at least one alternative resource". In this implementation, the above-mentioned "at least one alternative resource" includes the reaching of At least one resource data of preset resource conditions.

上述“待使用时间段”可以根据预先设定的预设时长(例如,1个月等)进行确定;而且该“待使用时间段”可以表示为[上文“资源查询请求”的触发时刻-预设时长,上文“资源查询请求”的触发时刻]。The above "time period to be used" can be determined according to a preset preset time period (for example, 1 month, etc.); and the "time period to be used" can be expressed as [the trigger moment of the above "resource query request"- The preset duration, the trigger moment of the above "resource query request"].

上述“预设资源条件”可以预先设定;而且本申请实施例不限定该“预设资源条件”,例如,其可以为:进入热搜榜单的资源数据。The above-mentioned "preset resource condition" may be preset; and the embodiment of the present application does not limit the "preset resource condition", for example, it may be: resource data entered into the hot search list.

上述“属性信息”用于描述一个资源数据的至少一个属性(例如,上文“Q个属性”)。The above-mentioned "attribute information" is used to describe at least one attribute of one resource data (for example, the above "Q attributes").

上述“属性比较结果”用于描述各个备选资源与各个待使用资源之间在属性信息上的差异性;而且本申请实施例不限定该“属性比较结果”,例如,当上述“备选资源”的个数为Y时,该“属性比较结果”可以包括第1个备选资源与第e个待使用资源之间在属性信息上的比较结果、第2个备选资源与第e个待使用资源之间在属性信息上的比较结果、……、以及第Y个备选资源与第e个待使用资源之间在属性信息上的比较结果。其中,e为正整数,e≤E。The above "attribute comparison result" is used to describe the difference in attribute information between each candidate resource and each resource to be used; and the embodiment of the present application does not limit the "attribute comparison result", for example, when the above "alternative resource" When the number of "" is Y, the "attribute comparison result" may include the comparison result of the attribute information between the first candidate resource and the e-th resource to be used, the second candidate resource and the e-th resource to be used The comparison result on the attribute information between the used resources, ..., and the comparison result on the attribute information between the Y th candidate resource and the e th resource to be used. Among them, e is a positive integer, e≤E.

上述“第y个备选资源与第e个待使用资源之间在属性信息上的比较结果”用于表示第y个备选资源与第e个待使用资源之间在属性信息上的差异性;而且该“第y个备选资源与第e个待使用资源之间在属性信息上的比较结果”可以包括:第y个备选资源与第e个待使用资源之间在第1个属性上的比较结果、第y个备选资源与第e个待使用资源之间在第2个属性上的比较结果、……、以及第y个备选资源与第e个待使用资源之间在第Q个属性上的比较结果。其中,y为正整数,y≤Y,Y为正整数。The above-mentioned "comparison result of attribute information between the y-th candidate resource and the e-th resource to be used" is used to indicate the difference in attribute information between the y-th candidate resource and the e-th resource to be used. And this " comparison result on attribute information between the yth candidate resource and the e-th resource to be used " can include: the 1st attribute between the y-th candidate resource and the e-th resource to be used The comparison result on the second attribute, the comparison result between the yth candidate resource and the e-th resource to be used, and the comparison result between the y-th candidate resource and the e-th resource to be used. The result of the comparison on the Qth attribute. Among them, y is a positive integer, y≤Y, and Y is a positive integer.

需要说明的是,“第y个备选资源与第e个待使用资源之间在第q个属性上的比较结果”用于表示第y个备选资源与第e个待使用资源之间在第q个属性上是否具有相同的属性值。其中,q为正整数,q≤Q。It should be noted that the "comparison result between the y-th candidate resource and the e-th resource to be used on the q-th attribute" is used to indicate the difference between the y-th candidate resource and the e-th resource to be used. Whether the qth attribute has the same attribute value. Among them, q is a positive integer, q≤Q.

基于上述步骤81的相关内容可知,在获取到至少一个待使用资源之后,可以借助这些待使用资源的属性信息描述上述“用户”所喜欢的资源数据,故将各个待使用资源的属性信息与各个备选资源的属性信息进行比较,得到属性比较结果,以使该属性比较结果能够表示出各个待使用资源与各个备选资源的在属性信息上所呈现的差异性,以便后续能够借助该属性比较结果,预测上述“用户”不喜欢的资源数据。Based on the relevant content of the above step 81, it can be known that after obtaining at least one resource to be used, the resource data that the “user” likes can be described with the help of the attribute information of the resource to be used. The attribute information of the candidate resources is compared, and the attribute comparison result is obtained, so that the attribute comparison result can represent the difference between the attribute information of each resource to be used and each candidate resource, so that the attribute comparison can be used later. As a result, resource data that the above-mentioned "user" does not like is predicted.

步骤82:根据属性比较结果,从至少一个备选资源中确定至少一个目标资源,以使各个目标资源的属性信息不同于所有待使用资源的属性信息。Step 82: Determine at least one target resource from at least one candidate resource according to the attribute comparison result, so that the attribute information of each target resource is different from the attribute information of all resources to be used.

本申请实施例不限定步骤82的实施方式,例如,当上述“属性比较结果”包括第1个备选资源与第e个待使用资源之间在属性信息上的比较结果、第2个备选资源与第e个待使用资源之间在属性信息上的比较结果、……、以及第Y个备选资源与第e个待使用资源之间在属性信息上的比较结果时,步骤82具体可以包括步骤821-步骤823:This embodiment of the present application does not limit the implementation of step 82. For example, when the above-mentioned "attribute comparison result" includes the attribute information comparison result between the first candidate resource and the e-th resource to be used, the second candidate resource When the comparison result on the attribute information between the resource and the e-th resource to be used, ..., and the comparison result of the attribute information between the Y-th candidate resource and the e-th resource to be used, step 82 may specifically Including steps 821-823:

步骤821:根据第y个备选资源与第e个待使用资源之间在属性信息上的比较结果,确定第y个备选资源与第e个待使用资源之间的相同属性分析结果。其中,y为正整数,y≤Y,Y为正整数;e为正整数,e≤E,E为正整数。Step 821: Determine the same attribute analysis result between the y-th candidate resource and the e-th resource to be used according to the attribute information comparison result between the y-th candidate resource and the e-th resource to be used. Among them, y is a positive integer, y≤Y, Y is a positive integer; e is a positive integer, e≤E, E is a positive integer.

上述“第y个备选资源与第e个待使用资源之间的相同属性分析结果”用于表示该第y个备选资源的属性信息与该第e个待使用资源的属性信息之间是否存在相同属性值(也就是,第y个备选资源与第e个待使用资源之间是否存在相同属性)。The above-mentioned "the same attribute analysis result between the y-th candidate resource and the e-th resource to be used" is used to indicate whether there is a relationship between the attribute information of the y-th candidate resource and the attribute information of the e-th resource to be used. The same attribute value exists (that is, whether the same attribute exists between the y-th candidate resource and the e-th resource to be used).

步骤822:对第y个备选资源与第1个待使用资源之间的相同属性分析结果、第y个备选资源与第2个待使用资源之间的相同属性分析结果、……、以及第y个备选资源与第E个待使用资源之间的相同属性分析结果进行统计分析处理,得到第y个备选资源对应的相同属性汇总结果。其中,y为正整数,y≤Y,Y为正整数。Step 822: Analyze the result of the same attribute between the y-th candidate resource and the first resource to be used, the same attribute analysis result between the y-th candidate resource and the second resource to be used, ..., and Statistical analysis is performed on the same attribute analysis result between the yth candidate resource and the Eth resource to be used, and a summary result of the same attribute corresponding to the yth candidate resource is obtained. Among them, y is a positive integer, y≤Y, and Y is a positive integer.

上述“第y个备选资源对应的相同属性汇总结果”用于表示该第y个备选资源的属性信息与E个待使用资源的属性信息之间是否存在相同属性值(也就是,第y个备选资源与所有待使用资源之间是否存在相同属性)。The above-mentioned "summary result of the same attribute corresponding to the yth candidate resource" is used to indicate whether there is the same attribute value between the attribute information of the yth candidate resource and the attribute information of the E resources to be used (that is, the yth Whether there are the same attributes between a candidate resource and all resources to be used).

步骤823:根据第y个备选资源对应的相同属性汇总结果,确定该第y个备选资源是否为目标资源。其中,y为正整数,y≤Y,Y为正整数。Step 823: Determine whether the y th candidate resource is the target resource according to the same attribute aggregation result corresponding to the y th candidate resource. Among them, y is a positive integer, y≤Y, and Y is a positive integer.

本申请实施例中,在获取到上述“第y个备选资源对应的相同属性汇总结果”之后,若该“第y个备选资源对应的相同属性汇总结果”表示第y个备选资源的属性信息与E个待使用资源的属性信息之间不存在相同属性值,则可以确定第y个备选资源很有可能属于用户不喜欢的资源数据,故可以将该第y个备选资源确定为目标资源;然而,若该“第y个备选资源对应的相同属性汇总结果”表示第y个备选资源的属性信息与E个待使用资源的属性信息之间存在至少一个相同属性值,则可以确定该有可能属于用户喜欢的资源数据,故可以直接舍弃该第y个备选资源即可。其中,y为正整数,y≤Y,Y为正整数。In this embodiment of the present application, after the above-mentioned "summary result of the same attribute corresponding to the yth candidate resource" is obtained, if the "summary result of the same attribute corresponding to the yth candidate resource" indicates the result of the yth candidate resource If there is no same attribute value between the attribute information and the attribute information of the E resources to be used, it can be determined that the y-th candidate resource is likely to belong to the resource data that the user does not like, so the y-th candidate resource can be determined. is the target resource; however, if the "summary result of the same attribute corresponding to the y-th candidate resource" indicates that there is at least one identical attribute value between the attribute information of the y-th candidate resource and the attribute information of the E resource to be used, Then, it can be determined that the resource data may belong to the user's favorite, so the yth candidate resource can be directly discarded. Among them, y is a positive integer, y≤Y, and Y is a positive integer.

基于上述步骤82的相关内容可知,在获取到上述“属性比较结果”之后,可以参考该属性比较结果,从一些备选资源中挑选出属性信息与完全不同于所有待使用资源的属性信息的各个目标资源,以使各个目标资源的属性信息与所有待使用资源的属性信息之间不存在相同属性值,从而使得各个目标资源很有可能属于用户不喜欢的资源数据。Based on the relevant content of the above-mentioned step 82, it can be known that after the above-mentioned "attribute comparison result" is obtained, the attribute comparison result can be referred to, and the attribute information and the attribute information completely different from the attribute information of all the resources to be used can be selected from some candidate resources. target resources, so that there is no identical attribute value between the attribute information of each target resource and the attribute information of all resources to be used, so that each target resource is likely to belong to resource data that the user does not like.

步骤83:根据至少一个目标资源,确定至少一个负样本数据。Step 83: Determine at least one negative sample data according to at least one target resource.

本申请实施例不限定步骤83的实施方式,例如,其可以包括:将各个目标资源的资源描述信息,确定为各个负样本数据。又如,为了提高网络构建效果,步骤83具体可以包括:先根据上述“正样本数据”的个数,确定待使用个数;再从所有目标资源中随机挑选出待使用个数的目标资源;最后,将各个被挑选出的目标资源的资源描述信息,确定为各个负样本数据,以使上述“负样本数据”的个数与上述“正样本数据”的个数之间的比例满足预设比例。This embodiment of the present application does not limit the implementation of step 83. For example, it may include: determining the resource description information of each target resource as each negative sample data. In another example, in order to improve the network construction effect, step 83 may specifically include: first, according to the number of the above-mentioned "positive sample data", determine the number to be used; then randomly select the number of target resources to be used from all target resources; Finally, the resource description information of each selected target resource is determined as each negative sample data, so that the ratio between the number of the above-mentioned "negative sample data" and the above-mentioned number of "positive sample data" satisfies the preset Proportion.

需要说明的是,上述“预设比例”可以预先设定(例如,1:1)。上述“待使用个数”是指上述“负样本数据”的个数;而且该“待使用个数”可以根据上述“正样本数据”的个数以及上述“预设比例”进行确定(例如,当上述“预设比例”为1:1,且上述“正样本数据”的个数为E时,可以确定该“待使用个数”为E)。It should be noted that, the above-mentioned "preset ratio" may be preset (for example, 1:1). The above-mentioned "number of samples to be used" refers to the number of the above-mentioned "negative sample data"; and the "number of samples to be used" can be determined according to the number of the above-mentioned "positive sample data" and the above-mentioned "preset ratio" (for example, When the above-mentioned "preset ratio" is 1:1, and the above-mentioned number of "positive sample data" is E, it can be determined that the "to-be-used number" is E).

基于上述步骤81至步骤83的相关内容可知,在获取到至少一个待使用资源之后,可以借助这些待使用资源的属性信息描述上述“用户”所喜欢的资源数据,故可以先参考一些备选资源的属性信息与各个待使用资源的属性信息之间的属性比较结果,从这些备选资源中挑选出属性信息与完全不同于所有待使用资源的属性信息的各个目标资源;再根据这些目标资源的资源描述信息,确定为至少一个负样本数据,以使这些负样本数据能够表示出用户不喜欢的资源数据的资源描述信息。Based on the relevant contents of the above steps 81 to 83, it can be known that after obtaining at least one resource to be used, the resource data that the “user” likes can be described with the help of the attribute information of the resource to be used. Therefore, you can refer to some alternative resources first. The attribute comparison result between the attribute information of each resource to be used and the attribute information of each resource to be used, select from these candidate resources the attribute information and each target resource that is completely different from the attribute information of all the resources to be used; The resource description information is determined as at least one negative sample data, so that these negative sample data can represent the resource description information of the resource data that the user does not like.

基于上述步骤71的相关内容可知,为了提高上文“特征提取网络”的特征提取效果,可以利用上述“用户”针对资源数据的历史操作行为记录,确定一些资源样本数据,以使这些资源样本数据能够表示出该“用户”针对资源数据的个人偏好,以便后续能够借助机器学习原理从这些资源样本数据中学习到该“用户”针对资源数据的个人偏好。Based on the relevant content of the above step 71, it can be seen that in order to improve the feature extraction effect of the above "feature extraction network", the above-mentioned "users" can use the historical operation behavior records of the resource data to determine some resource sample data, so that these resource sample data The personal preference of the "user" with respect to the resource data can be represented, so that the personal preference of the "user" with respect to the resource data can be subsequently learned from the resource sample data by means of machine learning principles.

步骤72:根据资源样本数据,构建特征提取网络。Step 72: Construct a feature extraction network according to the resource sample data.

本申请实施例不限定步骤72的实施方式,例如,其具体可以包括步骤721-步骤724:This embodiment of the present application does not limit the implementation of step 72, for example, it may specifically include steps 721 to 724:

步骤721:根据至少一个资源样本数据、用户的描述信息、和待训练模型,确定该至少一个资源样本数据的预测分类结果。Step 721: Determine the predicted classification result of the at least one resource sample data according to the at least one resource sample data, the user's description information, and the model to be trained.

上述“用户的描述信息”用于描述上述“用户”所具有的特征;而且本申请实施例不限定该“用户的描述信息”,例如,其可以包括该用户的ID。又如,其可以还包括:该用户的个人信息(例如,性别、年龄、资源数据使用喜好等)。The above "user description information" is used to describe the features of the above "user"; and the embodiment of the present application does not limit the "user description information", for example, it may include the user's ID. For another example, it may further include: the user's personal information (eg, gender, age, resource data usage preferences, etc.).

上述“待训练模型”用于针对该待训练模型的输入数据进行分类处理(例如,是否属于上述“用户”所喜欢的资源数据等分类处理。又如,是正样本数据,或者是负样本数据等分类处理)。The above-mentioned "model to be trained" is used to classify the input data of the model to be trained (for example, whether it belongs to the classification processing such as the resource data that the above-mentioned "user" likes. Another example is positive sample data, or negative sample data, etc. classification process).

另外,本申请实施例不限定上述“待训练模型”的网络结构,例如,可以采用现有的或者未来出现的任一种分类模型结构进行实施。In addition, the embodiments of the present application do not limit the network structure of the above-mentioned "model to be trained", for example, any existing or future classification model structure may be used for implementation.

此外,为了进一步提高上述“待训练模型”的分类效果,本申请实施例还提供了上述“待训练模型”的网络结构的一种可能的实施方式,在该实施方式中,如图3所示,待训练模型300可以包括用户特征提取层301、资源特征提取层302、特征拼接层303和分类处理层304。其中,分类处理层304的输入数据包括特征拼接层303的输出数据;特征拼接层303的输入数据包括用户特征提取层301的输出数据和资源特征提取层302的输出数据。In addition, in order to further improve the classification effect of the above "model to be trained", the embodiment of the present application also provides a possible implementation of the network structure of the above "model to be trained". In this implementation, as shown in FIG. 3 , themodel 300 to be trained may include a userfeature extraction layer 301 , a resourcefeature extraction layer 302 , afeature splicing layer 303 and aclassification processing layer 304 . The input data of theclassification processing layer 304 includes the output data of thefeature splicing layer 303 ; the input data of thefeature splicing layer 303 includes the output data of the userfeature extraction layer 301 and the output data of the resourcefeature extraction layer 302 .

为了便于理解待训练模型300的工作原理,下面以第h个资源样本数据的预测分类结果的确定过程为例进行说明。其中,h为正整数,h≤H,H为正整数,H表示资源样本数据的个数。In order to facilitate the understanding of the working principle of themodel 300 to be trained, the following description will be given by taking the process of determining the predicted classification result of the h th resource sample data as an example. Wherein, h is a positive integer, h≤H, H is a positive integer, and H represents the number of resource sample data.

作为示例,利用待训练模型300确定上述“第h个资源样本数据的预测分类结果”的过程具体可以包括步骤91-步骤94:As an example, the process of determining the "predicted classification result of the h-th resource sample data" using the model to be trained 300 may specifically include steps 91 to 94:

步骤91:将上述“用户的描述信息”输入用户特征提取层301,得到该用户特征提取层301输出的用户表征特征。Step 91 : Input the above-mentioned “descriptive information of the user” into the userfeature extraction layer 301 to obtain the user characteristic feature output by the userfeature extraction layer 301 .

其中,用户特征提取层301用于针对该用户特征提取层301的输入数据进行特征提取处理;而且本申请实施例不限定该用户特征提取层301的实施方式,例如,可以采用现有的或者未来出现的任一种特征提取网络进行实施。The userfeature extraction layer 301 is used to perform feature extraction processing on the input data of the userfeature extraction layer 301; and the embodiments of the present application do not limit the implementation of the userfeature extraction layer 301, for example, existing or future Implement any feature extraction network that appears.

另外,为了提高用户特征提取效果,本申请实施例还提供了用户特征提取层301的一种可能的实施方式,在该实施方式中,该用户特征提取层301包括G个特征提取单元和特征融合单元;而且该特征融合单元的输入数据包括G个特征提取单元的输出数据。In addition, in order to improve the user feature extraction effect, this embodiment of the present application also provides a possible implementation of the userfeature extraction layer 301. In this implementation, the userfeature extraction layer 301 includes G feature extraction units and feature fusion. unit; and the input data of the feature fusion unit includes the output data of the G feature extraction units.

第g个特征提取单元用于针对上述“用户特征提取层301的输入数据”进行特征提取处理。另外,本申请实施例不限定第g个特征提取单元的实施方式,例如,如图4所示,其可以包括编码单元和解码单元;而且该解码单元的输入数据包括该编码单元的输出数据。其中,g为正整数,g≤G,G为正整数。The g-th feature extraction unit is used to perform feature extraction processing on the above-mentioned "input data of the userfeature extraction layer 301". In addition, the embodiment of the present application does not limit the implementation of the gth feature extraction unit. For example, as shown in FIG. 4 , it may include an encoding unit and a decoding unit; and the input data of the decoding unit includes the output data of the encoding unit. Among them, g is a positive integer, g≤G, G is a positive integer.

上述“编码单元”用于针对该编码单元的输入数据进行编码处理;而且本申请不限定该“编码单元”的实施方式,例如,其可以采用现有的或者未来出现的任一种编码网络进行实施。又如,其可以采用图5所示的编码网络进行实施。The above-mentioned "coding unit" is used to perform coding processing on the input data of the coding unit; and the present application does not limit the implementation of the "coding unit", for example, it can be performed by any existing or future coding network. implement. For another example, it can be implemented by using the encoding network shown in FIG. 5 .

需要说明的是,对于图5所示的编码网络来说,该编码网络包括线性层(例如,全连接层等)、转化层以及归一化层。其中,“LinearLayer(input,hidden)”用于表示线性层;“input”表示线性层的输入数据;“hidden”表示隐藏数据。“Switch(x)”用于表示转化层;而且该“Switch(x)”可以按照公式(2)进行实施。“LayerNorm”表示归一化层。It should be noted that, for the encoding network shown in FIG. 5 , the encoding network includes a linear layer (for example, a fully connected layer, etc.), a transformation layer, and a normalization layer. Among them, "LinearLayer(input, hidden)" is used to represent the linear layer; "input" represents the input data of the linear layer; "hidden" represents the hidden data. "Switch(x)" is used to represent the conversion layer; and this "Switch(x)" can be implemented according to formula (2). "LayerNorm" means normalization layer.

Figure BDA0003364342980000191
Figure BDA0003364342980000191

式中,switch(x)表示转化层的输出结果;x表示转化层的输入数据。In the formula, switch(x) represents the output result of the conversion layer; x represents the input data of the conversion layer.

上述“解码单元”用于针对该解码单元的输入数据进行解码处理;而且本申请实施例不限定该“解码单元”的实施方式,例如,其可以采用现有的或者未来出现的任一种解码网络进行实施。又如,其可以借助两次线性层进行实施。The above-mentioned "decoding unit" is used to perform decoding processing on the input data of the decoding unit; and the embodiments of the present application do not limit the implementation of the "decoding unit", for example, it may adopt any existing or future decoding method network to implement. As another example, it can be implemented with two linear layers.

上述“特征融合单元”用于针对该特征融合单元的输入数据进行特征融合处理;而且本申请实施例不限定该“特征融合单元”工作原理,例如,其可以采用特征拼接方式进行实施(也就是,将G个特征提取单元的输出数据进行特征拼接处理)。The above-mentioned "feature fusion unit" is used to perform feature fusion processing for the input data of this feature fusion unit; and the embodiment of the present application does not limit the working principle of this "feature fusion unit", for example, it can be implemented by adopting a feature splicing method (that is, , perform feature splicing processing on the output data of the G feature extraction units).

上述“用户表征特征”用于表示上述“用户的描述信息”所携带的用户特征。The above-mentioned "user characteristic feature" is used to represent the user characteristic carried by the above-mentioned "user description information".

基于上述步骤91的相关内容可知,对于待训练模型300来说,在将上述“用户的描述信息”输入该待训练模型300之后,可以由该待训练模型300中用户特征提取层301对该“用户的描述信息”进行特征提取处理,得到并输出用户表征特征,以使该用户表征特征能够表示出该“用户的描述信息”所携带的用户特征。Based on the relevant content of the above step 91, it can be seen that, for themodel 300 to be trained, after the above-mentioned "user's description information" is input into themodel 300 to be trained, the userfeature extraction layer 301 in themodel 300 to be trained The user's description information" performs feature extraction processing to obtain and output the user's characteristic features, so that the user's characteristic features can represent the user characteristics carried by the "user's description information".

步骤92:将第h个资源样本数据输入资源特征提取层302,得到该资源特征提取层302输出的该第h个资源样本特征。Step 92 : Input the h th resource sample data into the resourcefeature extraction layer 302 to obtain the h th resource sample feature output by the resourcefeature extraction layer 302 .

其中,资源特征提取层302用于针对该资源特征提取层302的输入数据进行特征提取处理。The resourcefeature extraction layer 302 is used to perform feature extraction processing on the input data of the resourcefeature extraction layer 302 .

另外,本申请实施例不限定该用户特征提取层301的实施方式,例如,可以采用现有的或者未来出现的任一种特征提取网络进行实施。又如,为了提高分类效果,资源特征提取层302的网络结构可以与上述用户特征提取层301的网络结构保持一致。In addition, the embodiments of the present application do not limit the implementation of the userfeature extraction layer 301, for example, any existing or future feature extraction network may be used for implementation. For another example, in order to improve the classification effect, the network structure of the resourcefeature extraction layer 302 may be consistent with the network structure of the userfeature extraction layer 301 described above.

上述“第h个资源样本特征”用于表示上述“第h个资源样本数据”所携带的资源特征。The above "h th resource sample feature" is used to represent the resource feature carried by the above "h th resource sample data".

基于上述步骤92的相关内容可知,对于待训练模型300来说,在将上述“第h个资源样本数据”输入该待训练模型300之后,可以由该待训练模型300中资源特征提取层302对该“第h个资源样本数据”进行特征提取处理,得到并输出第h个资源样本特征,以使该用户表征特征能够表示出该“第h个资源样本数据”所携带的资源特征。Based on the relevant content of the above step 92, it can be known that, for themodel 300 to be trained, after the “h th resource sample data” is input into themodel 300 to be trained, the resourcefeature extraction layer 302 in themodel 300 to be trained can The "h th resource sample data" is subjected to feature extraction processing to obtain and output the h th resource sample feature, so that the user characteristic feature can represent the resource feature carried by the "h th resource sample data".

步骤93:将用户表征特征和第h个资源样本特征输入特征拼接层303,得到该特征拼接层303输出的第h个拼接特征。Step 93 : Input the user characteristic feature and the h-th resource sample feature into thefeature splicing layer 303 to obtain the h-th splicing feature output by thefeature splicing layer 303 .

其中,特征拼接层303用于针对该特征拼接层303的输入数据进行拼接处理;而且本申请实施例不限定特征拼接层303的实施方式,例如,可以采用现有的或者未来出现的任意一种特征拼接方法进行实施。Among them, thefeature splicing layer 303 is used to perform splicing processing on the input data of thefeature splicing layer 303; and the embodiment of the present application does not limit the implementation of thefeature splicing layer 303, for example, any existing or future can be used. Feature splicing method is implemented.

步骤94:将第h个拼接特征输入分类处理层304,得到该分类处理层304输出的第h个资源样本数据的预测分类结果。Step 94 : Input the h th splicing feature into theclassification processing layer 304 to obtain the predicted classification result of the h th resource sample data output by theclassification processing layer 304 .

其中,分类处理层304用于针对该分类处理层304的输入数据进行分类处理(例如,是否属于上述“用户”所喜欢的资源数据等分类处理。又如,是正样本数据,或者是负样本数据等分类处理)。Wherein, theclassification processing layer 304 is used to perform classification processing on the input data of the classification processing layer 304 (for example, whether it belongs to the above-mentioned “user” favorite resource data and so on. Another example is positive sample data or negative sample data. and other classification processing).

另外,本申请实施例不限定分类处理层304的实施方式,例如,其可以采用现有的或者未来出现的任一种分类方法(例如,多层感知器(Muti-Layer Perception,MLP))进行实施。In addition, the embodiment of the present application does not limit the implementation of theclassification processing layer 304, for example, it can be performed by any existing or future classification method (for example, a multi-layer perceptron (Multi-Layer Perception, MLP)). implement.

上述“第h个资源样本数据的预测分类结果”是指针对该第h个资源样本数据预测得到的分类结果。例如,“第h个资源样本数据的预测分类结果”可以用于表示该第h个资源样本数据是否属于上述“用户”所喜欢的资源数据。又如,“第h个资源样本数据的预测分类结果”也可以用于表示该第h个资源样本数据属于正样本数据,还是属于负样本数据。The above-mentioned "predicted classification result of the h-th resource sample data" refers to the classification result obtained by prediction of the h-th resource sample data. For example, "the predicted classification result of the h-th resource sample data" may be used to indicate whether the h-th resource sample data belongs to the resource data that the "user" likes. For another example, "the predicted classification result of the h-th resource sample data" may also be used to indicate whether the h-th resource sample data belongs to positive sample data or negative sample data.

基于上述步骤91至步骤94的相关内容可知,对于待训练模型300来说,该待训练模型300可以先针对上述“用户的描述信息”以及一个资源样本数据分别进行特征提取,得到用户特征以及资源特征;然后,借助参考用户特征以及资源特征,针对该资源样本数据进行分类处理。Based on the relevant contents of the above steps 91 to 94, it can be known that for themodel 300 to be trained, themodel 300 to be trained can first perform feature extraction on the above-mentioned "user description information" and a resource sample data, respectively, to obtain user features and resources. feature; then, with reference to the user feature and the resource feature, the resource sample data is classified.

基于上述步骤721的相关内容可知,在获取到各个资源样本数据之后,可以由待训练模型参考上述“用户”的描述信息,针对各个资源样本数据进行分类处理,得到并输出各个资源样本数据的预测分类结果,以便后续能够参考这些资源样本数据的预测分类结果,确定该待训练模型的分类性能。Based on the relevant content of the above step 721, it can be known that after each resource sample data is obtained, the model to be trained can refer to the above-mentioned "user" description information, classify and process each resource sample data, and obtain and output the prediction of each resource sample data. classification results, so that the classification performance of the to-be-trained model can be determined with reference to the predicted classification results of these resource sample data subsequently.

步骤722:判断是否达到预设停止条件,若是,则执行步骤724;若否,则执行步骤723。Step 722 : Determine whether the preset stop condition is reached, if yes, go to Step 724 ; if not, go to Step 723 .

上述“预设停止条件”可以预先设定;而且本申请实施例不限定该“预设停止条件”,例如,其具体可以为:待训练模型的模型损失值低于预设损失阈值。又如,“预设停止条件”也可以为:待训练模型的模型损失值的变化率低于预设变化率阈值。还如,“预设停止条件”还可以为:待训练模型的更新次数达到预设次数阈值。The above "preset stop condition" may be preset; and the embodiment of the present application does not limit the "preset stop condition", for example, it may specifically be: the model loss value of the model to be trained is lower than the preset loss threshold. For another example, the "preset stop condition" may also be: the rate of change of the model loss value of the model to be trained is lower than the preset rate of change threshold. For another example, the "preset stop condition" may also be: the update times of the model to be trained reaches the preset times threshold.

需要说明的是,上述“待训练模型的模型损失值”用于表示该待训练模型的分类性能;而且本申请实施例不限定“待训练模型的模型损失值”的确定过程,例如,可以采用现有的或者未来出现的任一种损失函数(例如,边缘损失等)进行实施。It should be noted that the above-mentioned "model loss value of the model to be trained" is used to represent the classification performance of the model to be trained; and the embodiment of the present application does not limit the process of determining the "model loss value of the model to be trained". Any existing or future loss function (eg, edge loss, etc.) is implemented.

步骤723:根据至少一个资源样本数据的预测分类结果和该至少一个资源样本数据的实际分类信息,更新待训练模型,并返回执行步骤721。Step 723 : Update the model to be trained according to the predicted classification result of the at least one resource sample data and the actual classification information of the at least one resource sample data, and return to step 721 .

其中,第h个资源样本数据的实际分类结果是指针对该第h个资源样本数据实际标注的标签信息(例如,是否属于上述“用户”所喜欢的资源数据。又如,属于正样本数据,还是属于负样本数据)。其中,h为正整数,h≤H,H为正整数,H表示资源样本数据的个数。Wherein, the actual classification result of the hth resource sample data refers to the label information (for example, whether it belongs to the resource data liked by the above-mentioned "user". For example, belongs to the positive sample data, still belong to the negative sample data). Wherein, h is a positive integer, h≤H, H is a positive integer, and H represents the number of resource sample data.

基于上述步骤723的相关内容可知,在确定当前轮的待训练模型未达到预设停止条件时,可以确定该待训练模型的分类性能比较差,故可以根据各个资源样本数据的预测分类结果与实际分类信息之间的差异性,更新待训练模型,以使更新后的待训练模型具有更好的分类性能,以便基于更新后的待训练模型,执行步骤721及其后续步骤,以实现针对该待训练模型的下一轮训练过程。Based on the relevant content of the above step 723, when it is determined that the model to be trained in the current round does not reach the preset stop condition, it can be determined that the classification performance of the model to be trained is relatively poor, so the predicted classification result of each resource sample data can be compared with the actual The difference between the classification information, update the to-be-trained model, so that the updated to-be-trained model has better classification performance, so that based on the updated to-be-trained model, step 721 and its subsequent steps are performed to achieve The next round of training process to train the model.

步骤724:根据待训练模型,确定特征提取网络。Step 724: Determine a feature extraction network according to the model to be trained.

本申请实施例中,在确定当前轮的待训练模型达到预设停止条件时,可以确定该待训练模型的分类性能比较好,故可以根据该待训练模型,确定特征提取网络(例如,将待训练模型中资源特征提取层,确定为特征提取网络),以使该特征提取网络针对资源数据具有较好的特征提取性能。In the embodiment of the present application, when it is determined that the model to be trained in the current round reaches the preset stop condition, it can be determined that the classification performance of the model to be trained is relatively good, so a feature extraction network can be determined according to the model to be trained (for example, the The resource feature extraction layer in the training model is determined to be a feature extraction network), so that the feature extraction network has better feature extraction performance for resource data.

基于上述步骤721至步骤724的相关内容可知,在一些情况下,可以借助一个分类模型(例如,上述“待训练模型”)的训练过程,构建上述“特征提取网络”,以使构建好的“特征提取网络”具有较好的资源特征提取性能,以便后续能够利用构建好的“特征提取网络”,实现针对一个资源数据(例如,候选资源等)的资源特征提取处理过程。Based on the relevant content of the above steps 721 to 724, it can be known that in some cases, the above-mentioned "feature extraction network" can be constructed by means of a training process of a classification model (for example, the above-mentioned "model to be trained"), so that the constructed "feature extraction network" can be The feature extraction network" has better resource feature extraction performance, so that the constructed "feature extraction network" can be used to implement the resource feature extraction process for a resource data (for example, candidate resources, etc.).

基于上述步骤71至步骤72的相关内容可知,在一些应用场景中,为了提高上文“特征提取网络”的特征提取效果,可以借助上述“用户”针对资源数据的历史操作行为记录,构建特征提取网络,以使构建好的特征提取网络具有较好的特征提取效果。Based on the relevant content of the above steps 71 to 72, in some application scenarios, in order to improve the feature extraction effect of the above "feature extraction network", the above-mentioned "users" can use the historical operation behavior records of resource data to construct feature extraction. network, so that the constructed feature extraction network has better feature extraction effect.

另外,为了进一步提高上文“特征提取网络”的特征提取效果,可以实时地获取并保存上述“用户”针对资源数据的操作行为,以便后续能够每间隔一段时间(例如,1天、1个星期、1个月等)执行一次步骤71-步骤72,以尽可能地保证上文“特征提取网络”始终保持较好的特征提取效果。In addition, in order to further improve the feature extraction effect of the above "feature extraction network", the operation behavior of the above "user" with respect to the resource data can be acquired and saved in real time, so that subsequent time intervals (for example, 1 day, 1 week) , 1 month, etc.) perform steps 71 to 72 once to ensure that the above "feature extraction network" always maintains a good feature extraction effect as much as possible.

场景实施例Scenario Example

为了便于理解上述“查询方法”,下面以影视资源搜索场景为例进行说明。In order to facilitate the understanding of the above-mentioned "query method", the following description is given by taking a video resource search scenario as an example.

如图6所示,当本申请实施例提供的“查询方法”应用于语音搜索领域(例如,电视大屏、电视语音助手、语音搜索等领域)时,针对影视资源(又称,影视媒资)的搜索过程具体可以包括步骤101-步骤109:As shown in FIG. 6 , when the “query method” provided in the embodiment of the present application is applied to the field of voice search (for example, large TV screens, TV voice assistants, voice search, etc.) ) search process may specifically include steps 101-109:

步骤101:用户利用语音遥控器发出语音指令,以使该语音指令用于请求针对某一影视媒资(例如,XXX电影)进行查询处理。Step 101: The user sends out a voice command by using a voice remote controller, so that the voice command is used to request query processing for a certain video media resource (eg, XXX movie).

步骤102:利用预先设定的语音识别引擎,对语音指令进行语音识别处理,得到语音识别文本,以使该语音识别文本携带有搜索词(例如,上述“XXX电影”的电影名称)。Step 102: Use a preset speech recognition engine to perform speech recognition processing on the speech command to obtain speech recognition text, so that the speech recognition text carries a search term (for example, the movie name of the above-mentioned "XXX Movie").

步骤103:按照上述“搜索词”,在预先构建的资源数据库(如图6所示的“有版权的媒资库”)进行影视资源搜索处理(例如,精确搜索处理或者模糊搜索处理),得到资源搜索结果,以使该资源搜索结果用于表示上述“资源数据库”中是否存在上述“某一影视媒资”。Step 103: According to the above-mentioned "search term", perform video resource search processing (for example, precise search processing or fuzzy search processing) in a pre-built resource database (as shown in Figure 6 "Copyrighted Media Repository"), to obtain: The resource search result, so that the resource search result is used to indicate whether the above-mentioned "a certain video media asset" exists in the above-mentioned "resource database".

需要说明的是,由于图6所示的“有版权的媒资库”中影视资源有限,导致易出现无法搜索到相应影视资源的情况。It should be noted that, due to the limited video resources in the "copyrighted media resource library" shown in FIG. 6 , it is easy to find a situation where the corresponding video resources cannot be searched.

步骤104:若上述“资源搜索结果”表示上述“资源数据库”中存在上述“某一影视媒资”,则可以直接将搜索到的影视资源反馈给用户即可。Step 104: If the above-mentioned "resource search result" indicates that the above-mentioned "a certain film and television media resource" exists in the above-mentioned "resource database", the searched film and television resource can be directly fed back to the user.

步骤105:若上述“资源搜索结果”表示上述“资源数据库”中不存在上述“某一影视媒资”,则可以进入资源推荐系统,以使该资源推荐系统能够参考上述“搜索词”确定至少一个推荐资源(如图7所示),并将这些推荐资源反馈给用户即可。Step 105: If the above-mentioned "resource search result" indicates that the above-mentioned "a certain film and television media asset" does not exist in the above-mentioned "resource database", the resource recommendation system can be entered, so that the resource recommendation system can refer to the above-mentioned "search term" to determine at least A recommended resource (as shown in Figure 7), and these recommended resources are fed back to the user.

需要说明的是,步骤105中“至少一个推荐资源”的确定过程类似于上文确定“至少一个推荐资源”过程。另外,图7中“负样本数据”可以采用图8所示的负样本数据确定流程进行实施。It should be noted that the process of determining "at least one recommended resource" in step 105 is similar to the above process of determining "at least one recommended resource". In addition, the “negative sample data” in FIG. 7 can be implemented by using the negative sample data determination process shown in FIG. 8 .

基于上述步骤101至步骤105的相关内容可知,对于语音搜索领域来说,可以借助本申请实施例提供的查询方法的任一实施方式,实现针对某一影视资源的搜索反馈过程,以使用户能够在反馈页面上查看到上述“某一影视资源”,或者类似于该“某一影视资源”的一些推荐资源,如此有利于提高用户资源查询体验。Based on the relevant contents of the above steps 101 to 105, it can be known that, for the field of voice search, any implementation of the query method provided in the embodiments of the present application can be used to realize the search feedback process for a certain video resource, so that the user can Viewing the above-mentioned "a certain video resource" on the feedback page, or some recommended resources similar to the "a certain video resource", is conducive to improving the user resource query experience.

需要说明的是,图6中“Netty”是一个java开源框架;“HDFS”是一个分布式文件系统(Hadoop Distributed File System)。It should be noted that "Netty" in Figure 6 is a java open source framework; "HDFS" is a distributed file system (Hadoop Distributed File System).

基于上述方法实施例提供的查询方法,本申请实施例还提供了一种查询装置,下面结合附图进行解释和说明。Based on the query method provided by the above method embodiments, the embodiments of the present application further provide a query device, which will be explained and described below with reference to the accompanying drawings.

装置实施例Device embodiment

装置实施例对查询装置进行介绍,相关内容请参见上述方法实施例。The apparatus embodiment introduces the query apparatus. For related content, please refer to the above method embodiment.

参见图9,该图为本申请实施例提供的一种查询装置的结构示意图。Referring to FIG. 9 , this figure is a schematic structural diagram of a query apparatus provided by an embodiment of the present application.

本申请实施例提供的查询装置900,包括:Thequery device 900 provided by the embodiment of the present application includes:

接收单元901,用于接收用户触发的资源查询请求;其中,所述资源查询请求携带有待查询信息;所述待查询信息用于描述待查询资源;A receivingunit 901, configured to receive a resource query request triggered by a user; wherein, the resource query request carries information to be queried; the information to be queried is used to describe the resource to be queried;

查询单元902,用于获取针对所述待查询信息的资源查询结果;Aquery unit 902, configured to obtain a resource query result for the information to be queried;

确定单元903,用于若所述资源查询结果表示无法向所述用户提供所述待查询资源,则根据所述待查询信息,确定至少一个推荐资源;A determiningunit 903, configured to determine at least one recommended resource according to the information to be queried if the resource query result indicates that the resource to be queried cannot be provided to the user;

推荐单元904,用于向所述用户提供所述至少一个推荐资源。A recommendingunit 904, configured to provide the user with the at least one recommended resource.

在一种可能的实施方式中,所述确定单元903,包括:In a possible implementation manner, the determiningunit 903 includes:

第一确定子单元,用于根据所述待查询信息,确定至少一个候选资源的推荐表征数据;a first determination subunit, configured to determine recommendation representation data of at least one candidate resource according to the information to be queried;

第二确定子单元,用于根据所述至少一个候选资源的推荐表征数据,从所述至少一个候选资源中确定至少一个推荐资源。The second determination subunit is configured to determine at least one recommended resource from the at least one candidate resource according to the recommendation characterizing data of the at least one candidate resource.

在一种可能的实施方式中,所述推荐表征数据包括特征匹配表征数据和/或至少一个属性检索表征数据。In a possible implementation, the recommendation characterization data includes feature matching characterization data and/or at least one attribute retrieval characterization data.

在一种可能的实施方式中,所述第一确定子单元,包括:In a possible implementation manner, the first determination subunit includes:

第三确定子单元,用于根据所述待查询信息,确定待提取信息;利用预先构建的特征提取网络,对所述待提取信息进行特征提取处理,得到待匹配特征;将所述待匹配特征与各个所述候选资源的资源表征特征进行匹配处理,得到各个所述候选资源的特征匹配结果;根据所述至少一个候选资源的特征匹配结果,确定所述至少一个候选资源的特征匹配表征数据。The third determination subunit is used to determine the information to be extracted according to the information to be queried; use a pre-built feature extraction network to perform feature extraction processing on the information to be extracted to obtain the feature to be matched; Perform matching processing with the resource characterization features of each of the candidate resources to obtain a feature matching result of each of the candidate resources; and determine the feature matching representation data of the at least one candidate resource according to the feature matching result of the at least one candidate resource.

在一种可能的实施方式中,各个所述候选资源的资源表征特征均是利用所述特征提取网络确定的。In a possible implementation manner, the resource characterizing features of each candidate resource are determined by using the feature extraction network.

在一种可能的实施方式中,所述查询装置900还包括:In a possible implementation manner, thequery apparatus 900 further includes:

生成单元,用于根据所述用户的历史资源操作信息,确定至少一个资源样本数据;a generating unit, configured to determine at least one resource sample data according to the user's historical resource operation information;

构建单元,用于根据所述至少一个资源样本数据,构建所述特征提取网络。A construction unit, configured to construct the feature extraction network according to the at least one resource sample data.

在一种可能的实施方式中,所述至少一个资源样本数据包括至少一个正样本数据和至少一个负样本数据。In a possible implementation manner, the at least one resource sample data includes at least one positive sample data and at least one negative sample data.

在一种可能的实施方式中,所述历史资源操作信息用于描述所述用户针对至少一个待使用资源触发的操作行为;所述生成单元包括第四确定子单元和/或第五确定子单元;In a possible implementation manner, the historical resource operation information is used to describe the operation behavior triggered by the user for at least one resource to be used; the generation unit includes a fourth determination subunit and/or a fifth determination subunit ;

所述第四确定子单元,用于根据所述至少一个待使用资源,确定所述至少一个正样本数据;the fourth determination subunit, configured to determine the at least one positive sample data according to the at least one resource to be used;

所述第五确定子单元,用于将至少一个备选资源的属性信息与所述至少一个待使用资源的属性信息进行比较,得到属性比较结果;根据所述属性比较结果,从所述至少一个备选资源中确定至少一个目标资源,以使各个所述目标资源的属性信息不同于所述至少一个待使用资源的属性信息;根据所述至少一个目标资源,确定所述至少一个负样本数据。The fifth determining subunit is configured to compare the attribute information of the at least one candidate resource with the attribute information of the at least one resource to be used to obtain an attribute comparison result; according to the attribute comparison result, from the at least one resource At least one target resource is determined among the candidate resources, so that the attribute information of each of the target resources is different from the attribute information of the at least one resource to be used; and the at least one negative sample data is determined according to the at least one target resource.

在一种可能的实施方式中,所述至少一个备选资源包括待使用时间段内的达到预设资源条件的至少一个资源数据。In a possible implementation manner, the at least one candidate resource includes at least one resource data that reaches a preset resource condition within a to-be-used time period.

在一种可能的实施方式中,所述构建单元,具体用于:根据所述至少一个资源样本数据、所述用户的描述信息、和待训练模型,确定所述至少一个资源样本数据的预测分类结果;根据所述至少一个资源样本数据和所述至少一个资源样本数据的实际分类信息,更新所述待训练模型,并继续执行所述根据所述至少一个资源样本数据、所述用户的描述信息、和待训练模型,确定所述至少一个资源样本数据的预测分类结果的步骤,直至在达到预设停止条件之后,根据所述待训练模型,确定所述特征提取网络。In a possible implementation manner, the construction unit is specifically configured to: determine the predicted classification of the at least one resource sample data according to the at least one resource sample data, the description information of the user, and the model to be trained Result: according to the at least one resource sample data and the actual classification information of the at least one resource sample data, update the to-be-trained model, and continue to execute the description according to the at least one resource sample data and the user's description information , and the to-be-trained model, the step of determining the predicted classification result of the at least one resource sample data, until after reaching a preset stop condition, the feature extraction network is determined according to the to-be-trained model.

在一种可能的实施方式中,所述待训练模型包括用户特征提取层、资源特征提取层、特征拼接层和分类处理层;其中,所述分类处理层的输入数据包括所述特征拼接层的输出数据;所述特征拼接层的输入数据包括所述用户特征提取层的输出数据和所述资源特征提取层的输出数据;In a possible implementation, the model to be trained includes a user feature extraction layer, a resource feature extraction layer, a feature splicing layer, and a classification processing layer; wherein the input data of the classification processing layer includes the data of the feature splicing layer. output data; the input data of the feature splicing layer includes the output data of the user feature extraction layer and the output data of the resource feature extraction layer;

所述构建单元,具体用于:根据所述至少一个资源样本数据、所述用户的描述信息、和待训练模型,确定所述至少一个资源样本数据的预测分类结果;根据所述至少一个资源样本数据和所述至少一个资源样本数据的实际分类信息,更新所述待训练模型,并继续执行所述根据所述至少一个资源样本数据、所述用户的描述信息、和待训练模型,确定所述至少一个资源样本数据的预测分类结果的步骤,直至在达到预设停止条件之后,根据所述待训练模型中资源特征提取层,确定所述特征提取网络。The construction unit is specifically configured to: determine the predicted classification result of the at least one resource sample data according to the at least one resource sample data, the description information of the user, and the to-be-trained model; according to the at least one resource sample data and the actual classification information of the at least one resource sample data, update the to-be-trained model, and continue to perform the process of determining the to-be-trained model according to the at least one resource sample data, the user's description information, and the to-be-trained model. In the step of predicting the classification result of at least one resource sample data, after reaching a preset stop condition, the feature extraction network is determined according to the resource feature extraction layer in the model to be trained.

在一种可能的实施方式中,所述第一确定子单元,包括:In a possible implementation manner, the first determination subunit includes:

第六确定子单元,用于获取所述待查询信息对应的至少一个属性;在预先构建的资源知识图谱中按照所述至少一个属性进行检索处理,得到各个所述候选资源的至少一个属性检索表征数据;其中,所述资源知识图谱是根据至少一个待检索资源的属性信息进行构建的;所述至少一个待检索资源包括所述至少一个候选资源。The sixth determination subunit is used to obtain at least one attribute corresponding to the information to be queried; perform retrieval processing according to the at least one attribute in the pre-built resource knowledge graph, and obtain at least one attribute retrieval representation of each of the candidate resources data; wherein, the resource knowledge graph is constructed according to attribute information of at least one resource to be retrieved; the at least one resource to be retrieved includes the at least one candidate resource.

在一种可能的实施方式中,所述推荐表征数据包括特征匹配表征数据和Q个属性检索表征数据;其中,Q为正整数;In a possible implementation manner, the recommendation characterization data includes feature matching characterization data and Q attribute retrieval characterization data; wherein Q is a positive integer;

所述第二确定子单元,具体用于根据所述至少一个候选资源的特征匹配表征数据,从所述至少一个候选资源中确定满足第一条件的至少一个特征匹配资源;根据所述至少一个候选资源的第q个属性检索表征数据,从所述至少一个候选资源中确定第q个属性对应的至少一个属性命中资源;其中,所述第q个属性对应的各个所述属性命中资源均满足第q个属性筛选条件;q为正整数,q≤Q;根据所述至少一个特征匹配资源、第1个属性对应的至少一个属性命中资源至第Q个属性对应的至少一个属性命中资源,确定至少一个第一资源;根据所述至少一个第一资源的推荐表征数据,从所述至少一个第一资源中确定至少一个推荐资源。The second determining subunit is specifically configured to determine at least one feature matching resource that satisfies the first condition from the at least one candidate resource according to the feature matching representation data of the at least one candidate resource; according to the at least one candidate resource The qth attribute of the resource retrieves the representation data, and determines at least one attribute hit resource corresponding to the qth attribute from the at least one candidate resource; wherein, each of the attribute hit resources corresponding to the qth attribute meets the requirements of the qth attribute. q attribute screening conditions; q is a positive integer, q≤Q; according to the at least one feature matching resource, the at least one attribute hit resource corresponding to the first attribute, to the at least one attribute hit resource corresponding to the Qth attribute, it is determined that at least one attribute hits the resource. A first resource; and determining at least one recommended resource from the at least one first resource according to the recommendation characterization data of the at least one first resource.

在一种可能的实施方式中,所述第二确定子单元,具体用于从所述至少一个候选资源中确定出满足第二条件的至少一个第二资源;根据所述至少一个第二资源的推荐表征数据,从所述至少一个候选资源中确定至少一个推荐资源。In a possible implementation manner, the second determining subunit is specifically configured to determine, from the at least one candidate resource, at least one second resource that satisfies the second condition; recommending characterizing data, and determining at least one recommended resource from the at least one candidate resource.

在一种可能的实施方式中,所述至少一个推荐资源的确定过程,包括:根据各个第三资源的推荐表征数据,确定各个所述第三资源的推荐得分;根据至少一个第三资源的推荐得分,从所述至少一个第三资源中确定满足第一条件的至少一个推荐资源。In a possible implementation manner, the process of determining the at least one recommended resource includes: determining a recommendation score of each third resource according to recommendation characterization data of each third resource; according to the recommendation of at least one third resource score, and at least one recommended resource that satisfies the first condition is determined from the at least one third resource.

进一步地,本申请实施例还提供了一种设备,包括:处理器、存储器、系统总线;Further, an embodiment of the present application also provides a device, including: a processor, a memory, and a system bus;

该处理器以及该存储器通过该系统总线相连;The processor and the memory are connected through the system bus;

该存储器用于存储一个或多个程序,该一个或多个程序包括指令,该指令当被该处理器执行时使该处理器执行上述查询方法的任一种实现方法。The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform any of the implementations of the above query methods.

进一步地,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在终端设备上运行时,使得该终端设备执行上述查询方法的任一种实现方法。Further, an embodiment of the present application also provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium, and when the instruction is executed on a terminal device, the terminal device is made to execute any one of the above query methods. an implementation method.

进一步地,本申请实施例还提供了一种计算机程序产品,该计算机程序产品在终端设备上运行时,使得该终端设备执行上述查询方法的任一种实现方法。Further, an embodiment of the present application further provides a computer program product, which, when running on a terminal device, enables the terminal device to execute any one of the above query methods.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如媒体网关等网络通信设备,等等)执行本申请各个实施例或者实施例的某些部分该的方法。From the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in storage media, such as ROM/RAM, magnetic disks , CD-ROM, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to perform the method of each embodiment or some part of the embodiment of the present application .

需要说明的是,本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments may be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.

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

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, this application is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (16)

1. A method for querying, the method comprising:
receiving a resource query request triggered by a user; wherein the resource query request carries information to be queried; the information to be queried is used for describing resources to be queried;
acquiring a resource query result aiming at the information to be queried;
if the resource query result shows that the resources to be queried cannot be provided for the user, determining at least one recommended resource according to the information to be queried;
providing the at least one recommended resource to the user.
2. The method of claim 1, wherein the determining at least one recommended resource according to the information to be queried comprises:
determining recommendation characterization data of at least one candidate resource according to the information to be queried;
determining at least one recommended resource from the at least one candidate resource based on the recommended characterization data for the at least one candidate resource.
3. The method of claim 2, wherein the recommended characterization data comprises feature matching characterization data and/or at least one attribute retrieval characterization data.
4. The method of claim 3, wherein the determining the feature matching characterization data comprises:
determining information to be extracted according to the information to be inquired;
performing feature extraction processing on the information to be extracted by using a pre-constructed feature extraction network to obtain features to be matched;
matching the feature to be matched with the resource characterization feature of each candidate resource to obtain a feature matching result of each candidate resource;
and determining feature matching characterization data of the at least one candidate resource according to the feature matching result of the at least one candidate resource.
5. The method of claim 4, further comprising:
determining at least one resource sample data according to the historical resource operation information of the user; wherein the at least one resource sample data comprises at least one positive sample data and at least one negative sample data;
and constructing the feature extraction network according to the at least one resource sample data.
6. The method according to claim 5, wherein the historical resource operation information is used for describing operation behaviors triggered by the user for at least one resource to be used;
the determination process of the at least one positive sample data includes:
determining the at least one positive sample data according to the at least one resource to be used;
and/or the presence of a gas in the gas,
the determination process of the at least one negative sample data includes:
comparing the attribute information of at least one alternative resource with the attribute information of at least one resource to be used to obtain an attribute comparison result;
determining at least one target resource from the at least one alternative resource according to the attribute comparison result, so that the attribute information of each target resource is different from the attribute information of the at least one resource to be used;
determining the at least one negative sample data according to the at least one target resource.
7. The method according to claim 6, wherein the at least one alternative resource comprises at least one resource data reaching a preset resource condition within a period of time to be used.
8. The method according to any one of claims 5 to 7, wherein the construction process of the feature extraction network comprises:
determining a prediction classification result of the at least one resource sample data according to the at least one resource sample data, the description information of the user and a model to be trained;
and updating the model to be trained according to the at least one resource sample data and the actual classification information of the at least one resource sample data, and continuing to execute the step of determining the predicted classification result of the at least one resource sample data according to the at least one resource sample data, the description information of the user and the model to be trained until the feature extraction network is determined according to the model to be trained after a preset stopping condition is reached.
9. The method according to claim 8, wherein the model to be trained comprises a user feature extraction layer, a resource feature extraction layer, a feature splicing layer and a classification processing layer; wherein the input data of the classification processing layer comprises the output data of the feature splicing layer; the input data of the feature splicing layer comprises the output data of the user feature extraction layer and the output data of the resource feature extraction layer;
the determining the feature extraction network according to the model to be trained includes:
and determining the feature extraction network according to a resource feature extraction layer in the model to be trained.
10. The method of claim 3, wherein the determining of the at least one attribute to retrieve characterization data comprises:
acquiring at least one attribute corresponding to the information to be queried;
retrieving processing is carried out in a pre-constructed resource knowledge graph according to the at least one attribute, and at least one attribute retrieval characterization data of each candidate resource is obtained; the resource knowledge graph is constructed according to attribute information of at least one resource to be retrieved; the at least one resource to be retrieved comprises the at least one candidate resource.
11. The method of claim 2, wherein the recommended characterization data comprises feature matching characterization data and Q attribute retrieval characterization data; wherein Q is a positive integer;
the determining at least one recommended resource from the at least one candidate resource according to the recommendation characterization data of the at least one candidate resource includes:
determining at least one feature matching resource meeting a first condition from the at least one candidate resource according to the feature matching characterization data of the at least one candidate resource;
retrieving characterization data according to the qth attribute of the at least one candidate resource, and determining at least one attribute hit resource corresponding to the qth attribute from the at least one candidate resource; each attribute hit resource corresponding to the qth attribute meets the qth attribute screening condition; q is a positive integer, and Q is less than or equal to Q;
determining at least one first resource according to the at least one feature matching resource, at least one attribute hit resource corresponding to the 1 st attribute to at least one attribute hit resource corresponding to the Q < th > attribute;
determining at least one recommended resource from the at least one first resource based on the recommended characterization data for the at least one first resource.
12. The method of claim 2, further comprising:
determining at least one second resource satisfying a second condition from the at least one candidate resource;
the determining at least one recommended resource from the at least one candidate resource according to the recommendation characterization data of the at least one candidate resource includes:
determining at least one recommended resource from the at least one candidate resource based on the recommended characterization data for the at least one second resource.
13. The method according to claim 2, 11 or 12, wherein the determining of the at least one recommended resource comprises:
determining a recommendation score of each third resource according to the recommendation characterization data of each third resource;
and determining at least one recommended resource meeting the first condition from the at least one third resource according to the recommendation score of the at least one third resource.
14. An inquiry apparatus, comprising:
the receiving unit is used for receiving a resource query request triggered by a user; wherein the resource query request carries information to be queried; the information to be queried is used for describing resources to be queried;
the query unit is used for acquiring a resource query result aiming at the information to be queried;
a determining unit, configured to determine at least one recommended resource according to the information to be queried if the resource query result indicates that the resource to be queried cannot be provided to the user;
a recommending unit for providing the at least one recommended resource to the user.
15. An apparatus, characterized in that the apparatus comprises: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is to store one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the method of any of claims 1 to 13.
16. A computer-readable storage medium having stored therein instructions which, when run on a terminal device, cause the terminal device to perform the method of any one of claims 1 to 13.
CN202111397842.1A2021-11-192021-11-19 A query method and related equipmentActiveCN114356979B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111397842.1ACN114356979B (en)2021-11-192021-11-19 A query method and related equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111397842.1ACN114356979B (en)2021-11-192021-11-19 A query method and related equipment

Publications (2)

Publication NumberPublication Date
CN114356979Atrue CN114356979A (en)2022-04-15
CN114356979B CN114356979B (en)2025-01-03

Family

ID=81096107

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111397842.1AActiveCN114356979B (en)2021-11-192021-11-19 A query method and related equipment

Country Status (1)

CountryLink
CN (1)CN114356979B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20170060985A1 (en)*2015-08-282017-03-02Magna Services, LLCSystem and method for matching resource capacity with resource needs
WO2018090793A1 (en)*2016-11-182018-05-24腾讯科技(深圳)有限公司Multimedia recommendation method and device
WO2020048084A1 (en)*2018-09-072020-03-12平安科技(深圳)有限公司Resource recommendation method and apparatus, computer device, and computer-readable storage medium
WO2020057022A1 (en)*2018-09-182020-03-26深圳壹账通智能科技有限公司Associative recommendation method and apparatus, computer device, and storage medium
CN112860997A (en)*2021-02-092021-05-28挂号网(杭州)科技有限公司Medical resource recommendation method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20170060985A1 (en)*2015-08-282017-03-02Magna Services, LLCSystem and method for matching resource capacity with resource needs
WO2018090793A1 (en)*2016-11-182018-05-24腾讯科技(深圳)有限公司Multimedia recommendation method and device
WO2020048084A1 (en)*2018-09-072020-03-12平安科技(深圳)有限公司Resource recommendation method and apparatus, computer device, and computer-readable storage medium
WO2020057022A1 (en)*2018-09-182020-03-26深圳壹账通智能科技有限公司Associative recommendation method and apparatus, computer device, and storage medium
CN112860997A (en)*2021-02-092021-05-28挂号网(杭州)科技有限公司Medical resource recommendation method, device, equipment and storage medium

Also Published As

Publication numberPublication date
CN114356979B (en)2025-01-03

Similar Documents

PublicationPublication DateTitle
US20220035827A1 (en)Tag selection and recommendation to a user of a content hosting service
US10657985B2 (en)Systems and methods for manipulating electronic content based on speech recognition
US10250933B2 (en)Remote device activity and source metadata processor
US10515133B1 (en)Systems and methods for automatically suggesting metadata for media content
US9253511B2 (en)Systems and methods for performing multi-modal video datastream segmentation
US10380649B2 (en)System and method for logistic matrix factorization of implicit feedback data, and application to media environments
US20100070507A1 (en)Hybrid content recommending server, system, and method
US9489626B2 (en)Systems and methods for identifying and notifying users of electronic content based on biometric recognition
CN111008321A (en)Recommendation method and device based on logistic regression, computing equipment and readable storage medium
JP2011175362A (en)Information processing apparatus, importance level calculation method, and program
JP2013541793A (en) Multi-mode search query input method
US9535996B1 (en)Selecting content objects for recommendation based on content object collections
KR101780237B1 (en)Method and device for answering user question based on q&amp;a data provided on online
TW200834355A (en)Information processing apparatus and method, and program
Zhuang et al.Data summarization with social contexts
CN109933691A (en) Method, apparatus, device and storage medium for content retrieval
EP3144825A1 (en)Enhanced digital media indexing and retrieval
WO2013097078A1 (en)Video search method and video search system
JP5102883B2 (en) User utterance extraction apparatus, method and program
CN114356979A (en) A query method and related equipment
CN110147488B (en)Page content processing method, processing device, computing equipment and storage medium
Song et al.Fine-Grain Level Sports Video Search Engine
CN116095410A (en)Video type prediction and recommendation method and system based on depth visual features
Arabi et al.Social tagging in recommender systems
CN114417890A (en)Comment content reply method and device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp