CN114282094A - Resource ordering method and device, electronic equipment and storage medium - Google Patents

Resource ordering method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114282094A
CN114282094A CN202111226038.7A CN202111226038A CN114282094A CN 114282094 A CN114282094 A CN 114282094A CN 202111226038 A CN202111226038 A CN 202111226038A CN 114282094 A CN114282094 A CN 114282094A
Authority
CN
China
Prior art keywords
resource
resources
sorted
network
sequenced
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.)
Pending
Application number
CN202111226038.7A
Other languages
Chinese (zh)
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.)
Tencent Technology Wuhan Co Ltd
Original Assignee
Tencent Technology Wuhan 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 Tencent Technology Wuhan Co Ltd filed Critical Tencent Technology Wuhan Co Ltd
Priority to CN202111226038.7A priority Critical patent/CN114282094A/en
Publication of CN114282094A publication Critical patent/CN114282094A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to the technical field of computers, in particular to a resource sequencing method, a resource sequencing device, electronic equipment and a storage medium, which can be applied to scenes such as cloud technology, artificial intelligence, intelligent traffic, auxiliary driving and the like and are used for improving resource sequencing accuracy. The method comprises the following steps: acquiring a plurality of resources to be ordered, and dividing the resources to be ordered with the same resource type into the same resource set; respectively acquiring unique features and shared features corresponding to the resources to be sorted; performing characteristic analysis on each resource to be sorted based on the shared characteristic and the unique characteristic of each resource to be sorted to obtain a sorting parameter of each resource to be sorted for the type of the resource to which the resource belongs; and respectively sequencing the resources to be sequenced in each resource set based on the sequencing parameters corresponding to the resources to be sequenced in the same resource set. According to the resource sorting method and device, the resources to be sorted are sorted based on the shared features and the unique features of the resources to be sorted, so that the resource sorting accuracy can be improved.

Description

Resource ordering method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of computers, in particular to the technical field of artificial intelligence, and provides a resource sequencing method and device, electronic equipment and a storage medium.
Background
With the rapid development of the internet technology, more and more contents need to be acquired through computer processing and then transmitted through a network after the processing; resource recommendation is required under more and more scenes; such as recommendations for news, videos, or advertisements, etc. Therefore, in the search scenario of the internet, the problem of many types of search resources is inevitably faced.
In the related art, when searching and sorting different types of resources, the following two solutions are more common:
the method I adopts a model to train and predict different types of resources simultaneously.
However, in this method, since the representation of the features is different between different types of resources, there is a problem that the features of the different types of resources cannot be aligned.
And secondly, splitting the model according to the resource types, and adopting a separate search sorting algorithm for each type of resource.
However, in this method, the amount of resource data of some types is small, the data is sparse, and it is easy for a deep model trained based on large data to cause a problem of difficulty in convergence and optimization.
In summary, the problems of feature misalignment and data sparsity existing in the search ordering scene of the multi-source heterogeneous resources are to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a resource sorting method and device, electronic equipment and a storage medium, which are used for improving the resource sorting accuracy.
The resource ordering method provided by the embodiment of the application comprises the following steps:
acquiring a plurality of resources to be ordered, and dividing the resources to be ordered with the same resource type into the same resource set, wherein the plurality of resources to be ordered have at least two resource types;
respectively acquiring unique features and shared features corresponding to the resources to be sequenced, wherein the unique feature of each resource to be sequenced is characterized by: the resource features of the resource type are unique, and the sharing feature of each resource to be sequenced is characterized in that: resource characteristics common to all resource types;
performing feature analysis on each resource to be sequenced based on the shared features and the unique features of each resource to be sequenced to obtain sequencing parameters of each resource to be sequenced aiming at the respective resource type;
and respectively sequencing the resources to be sequenced in each resource set based on the sequencing parameters corresponding to the resources to be sequenced in the same resource set.
An embodiment of the present application provides a resource ordering apparatus, including:
the resource sorting device comprises a dividing unit, a sorting unit and a processing unit, wherein the dividing unit is used for acquiring a plurality of resources to be sorted and dividing the resources to be sorted with the same resource type into the same resource set, and the plurality of resources to be sorted have at least two resource types;
an obtaining unit, configured to obtain unique features and shared features corresponding to the resources to be sorted, respectively, where the unique feature of each resource to be sorted is characterized by: the resource features of the resource type are unique, and the sharing feature of each resource to be sequenced is characterized in that: resource characteristics common to all resource types;
the analysis unit is used for carrying out feature analysis on each resource to be sequenced based on the shared features and the unique features of each resource to be sequenced to obtain sequencing parameters of each resource to be sequenced aiming at the type of the resource to which the resource belongs;
and the sequencing unit is used for sequencing the resources to be sequenced in each resource set respectively based on the sequencing parameters corresponding to the resources to be sequenced in the same resource set.
Optionally, the analysis unit is specifically configured to:
inputting the shared characteristic and the unique characteristic of one resource to be sequenced into a trained resource sequencing model, and performing characteristic analysis on the resource to be sequenced through the resource sequencing model to obtain a sequencing parameter of the resource to be sequenced for the resource type to which the resource belongs;
the resource ranking model is obtained by performing loop iteration training on the initial resource ranking model based on a training sample data set containing sample resources of various resource types.
Optionally, the resource ordering model includes a plurality of expert networks, and a gate control network and a tower network corresponding to different resource types, respectively, where the network structures of the plurality of different expert networks are the same, the network parameters are different, and the importance degrees of the expert networks corresponding to the same resource type are different.
Optionally, the analysis unit is specifically configured to:
performing joint feature extraction based on each expert network in the resource sorting model to respectively obtain joint feature vectors output by each expert network for the resource to be sorted;
based on a target gating network corresponding to the resource type of the resource to be sequenced, performing weighted summation on each joint feature vector to obtain a target feature vector for the resource to be sequenced;
and inputting the target characteristic vector into a target tower network corresponding to the resource type of the resource to be sorted, and performing click rate estimation on the resource to be sorted based on the target tower network to obtain a recommendation parameter corresponding to the resource to be sorted.
Optionally, the analysis unit is specifically configured to:
after carrying out feature splicing on the shared features and the unique features corresponding to the resource to be sequenced, respectively inputting the shared features and the unique features into each expert network;
and respectively performing joint feature extraction on the spliced feature vector corresponding to the resource to be sorted based on each expert network to obtain a joint feature vector output by each expert network for the resource to be sorted.
Optionally, the analysis unit is specifically configured to:
inputting the shared characteristic and the unique characteristic corresponding to the resource to be sequenced into a target gating network corresponding to the resource type of the resource to be sequenced, and inputting the joint characteristic vector output by each expert network aiming at the resource to be sequenced into the target gating network corresponding to the resource type of the resource to be sequenced;
based on the target gating network, performing attention feature extraction on the shared features and the unique features to obtain an attention weight vector aiming at the resource to be sequenced;
and carrying out weighted summation on each combined feature vector based on the attention weight vector to obtain a weighted feature vector corresponding to the resource to be sequenced.
Optionally, each element in the attention weight vector represents: the weights corresponding to the expert networks, and the weights corresponding to different expert networks are positively correlated with the importance degrees respectively corresponding to the resource types.
Optionally, the analysis unit is specifically configured to:
performing feature concatenation on the shared features and the unique features based on the target gated network;
performing attention feature extraction on the spliced feature vector corresponding to the resource to be sorted to obtain a weighted feature vector corresponding to the resource to be sorted, wherein the dimension of the weighted feature vector is the same as the number of the expert networks, and one dimension corresponds to one expert network;
determining weights corresponding to all dimensions based on the ratio of the exponential powers corresponding to the element values of all dimensions in the weighted feature vector to the sum of the exponential powers corresponding to all dimension element values, and taking the weight vector formed by the obtained weights as the attention weight vector.
Optionally, the apparatus further includes a training unit, which trains the resource ranking model in the following manner:
selecting a plurality of sample resources from the training sample data set, and acquiring unique features and shared features of the selected sample resources;
respectively inputting the unique characteristics and the shared characteristics of each sample resource into the resource sequencing model, and acquiring sequencing parameters corresponding to each sample resource, which are obtained based on the resource sequencing model;
and constructing a loss function based on the sequencing parameters corresponding to the sample resources and the sequencing labels corresponding to the sample resources, and adjusting the network parameters of the resource sequencing model based on the loss function, wherein the sequencing labels are used for representing whether the sample resources are clicked or not.
Optionally, the resource ranking model includes a plurality of expert networks, and a gate control network and a tower network corresponding to different resource types, and the training unit is specifically configured to:
determining a loss function corresponding to each sample resource based on the sequencing parameter and the sequencing label corresponding to each sample resource;
respectively adjusting parameters of a tower network and a gating network corresponding to the resource type of the corresponding sample resource based on each loss function;
and adjusting the parameters of each expert network based on the parameter adjustment result of each gating network.
An electronic device provided by an embodiment of the present application includes a processor and a memory, where the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute the steps of the resource ordering method.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps of any of the resource ordering methods described above.
An embodiment of the present application provides a computer-readable storage medium, which includes program code for causing an electronic device to perform the steps of the resource ordering method when the program product runs on the electronic device.
The beneficial effect of this application is as follows:
according to the resource sorting method, the resource sorting device, the electronic equipment and the storage medium, in the embodiment of the application, the resources to be sorted with the same resource type in the obtained multiple resources to be sorted are divided into the same resource set, the unique features and the shared features corresponding to the resources to be sorted are respectively obtained, further, feature analysis is carried out on the resources to be sorted based on the shared features and the unique features of the resources to be sorted, the problem that partial resource types are sparse in vertical data is solved, finally, the resources to be sorted in the resource sets are respectively sorted based on the obtained sorting parameters of the resources to be sorted aiming at the resource types to which the resources belong, and the problem that the features of different types of resources cannot be aligned is solved. The resource sorting is carried out based on the mode, the problem that different types of resource features cannot be aligned is solved, computing resources are saved, and the resource sorting accuracy is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1a is a schematic diagram of a model structure of a resource sorting method in the related art;
FIG. 1b is a schematic diagram of a model structure of another resource sorting method in the related art;
FIG. 2a is a diagram illustrating a unique feature of a resource in an embodiment of the present application;
FIG. 2b is a schematic diagram illustrating an information video click rate cumulative probability distribution according to an embodiment of the present application;
fig. 3a is a schematic view of an application scenario of the resource sorting method in the embodiment of the present application;
fig. 3b is a schematic view of another application scenario of the resource sorting method in the embodiment of the present application;
FIG. 4 is a flowchart illustrating an implementation of a resource sorting method in an embodiment of the present application;
FIG. 5 is an overall framework diagram of a resource ranking model in an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an expert network in a resource ranking model according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a gating network in a resource ranking model according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a tower network in a resource ranking model according to an embodiment of the present application;
FIG. 9a is a schematic diagram of a testing process of a resource ranking model in an embodiment of the present application;
FIG. 9b is a schematic diagram illustrating a resource sorting result in the embodiment of the present application;
fig. 10 is a schematic structural diagram of a resource sorting apparatus in an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device in an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computing device to which an embodiment of the present application is applied.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the technical solutions of the present application. All other embodiments obtained by a person skilled in the art without any inventive step based on the embodiments described in the present application are within the scope of the protection of the present application.
Some concepts related to the embodiments of the present application are described below.
The unique characteristics are as follows: the resource type is the unique characteristic of each resource type corresponding to the resource, and the unique characteristics corresponding to different resource types are different. For example, the unique features of the information include the number of information pictures and the total length of the information, which are feature values not available in other resource types, and correspondingly, the unique features of the video, such as video frames and video durations, are also feature values not available in the information.
The common characteristics are as follows: the method refers to the common characteristics of all resource types, such as information, video and common characteristics corresponding to small programs, including statistical reflux characteristics and semantic matching characteristics, and can solve the problem of sparse data of part of the resource types by sharing the common characteristics with different resource types.
Resource ordering model: the method is characterized in that a neural network model composed of a bottom layer expert network, a middle layer gating network and an upper layer tower network inputs common characteristics of multi-source heterogeneous resources and unique characteristics of each resource type, and outputs estimated click rate scores of resources to be sorted for resource sorting.
An expert network: the method is a network structure taking shared features and unique features of multi-source heterogeneous resources as input, different experts can learn different signals from different angles due to weight distribution of a gating network, and finally each expert network outputs a joint feature vector aiming at one resource to be sequenced.
A gate control network: the method is characterized in that a network structure taking shared characteristics and unique characteristics of a certain resource and the output of an expert network as input is adopted to realize characteristic isolation, the gated network carries out weight distribution on the expert network aiming at the importance of different expert networks to the same task, and the weight distribution of the gated network is continuously adjusted through the target of different tasks and the gradient return of a loss function.
Tower network: the method is a network structure which takes a feature vector which is obtained by weighting a joint feature vector output by an expert network through a gate control network as an input to realize sample isolation, and a tower network carries out click rate scoring and estimation aiming at a certain type of resource, so that different verticals learn different information and describe the difference between the verticals.
The vertical type: the method is used for classifying large fields according to specific regions to obtain more detailed vertical class classification, information, videos and small programs belong to different vertical classes in the embodiment of the application, and the generalization capability of vertical class resources with sparse data can be improved through expert network sharing characteristics.
The embodiments of the present application relate to AI (Artificial Intelligence), NLP (natural Language processing), and ML (Machine Learning technology), and are designed based on computer vision technology and Machine Learning in Artificial Intelligence.
Artificial intelligence is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence.
Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making. The artificial intelligence technology mainly comprises a computer vision technology, a natural language processing technology, machine learning/deep learning, automatic driving, intelligent traffic and other directions. With the research and progress of artificial intelligence technology, artificial intelligence is researched and applied in a plurality of fields, such as common smart homes, smart customer service, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, robots, smart medical treatment and the like.
Natural language processing is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic question and answer, knowledge mapping, and the like.
Machine learning is a multi-field cross discipline, and relates to a plurality of disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and the like. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Compared with the method for finding mutual characteristics among big data by data mining, the machine learning focuses on the design of an algorithm, so that a computer can automatically learn rules from the data and predict unknown data by using the rules.
Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. Machine learning and deep learning generally include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and the like. The natural language model in the embodiment of the application is obtained by training through a machine learning or deep learning technology. The model parameter updating method based on the natural language model in the embodiment of the application can update parameters of models such as machine translation, text classification and text semantic comparison.
The method for training the resource ranking model provided in the embodiment of the application can be divided into two parts, including a training part and an application part; the training part relates to the technical field of machine learning, and in the training part, a resource ranking model is trained through the technology of machine learning. Specifically, the resource ranking model is trained by using the sample resources in the training sample data set given in the embodiment of the application, the output result of the resource ranking model is obtained after the sample resources pass through the resource ranking model, the model parameters are continuously adjusted by combining the output result, and the trained resource ranking model is output; the application part is used for ordering the resources by using the resource ordering model trained in the training part.
The following briefly introduces the design concept of the embodiments of the present application:
in the internet era, in order to solve the problem of information explosion and present resources meeting requirements to users, search ranking technologies have gained extensive attention and research in academia and industry, and search ranking technologies based on Deep Neural Networks (DNNs) have gained tremendous development.
Compared with the traditional machine learning algorithm, the DNN-based search ranking algorithm can obtain better ranking effect and generalization capability by virtue of an end-to-end training mode, automatic and efficient feature extraction capability and flexible structural design. The Deep Crossing Network (DCN) performs Deep information fusion on input features by adopting a Residual Network (RN), and scores the click rate of the estimated samples to realize search sequencing. The WDL (Wireless and Deep Learning) algorithm further obtains excellent performance in the search ranking technology by combining a Deep network and a shallow network. In the WDL method, the deep network improves the generalization capability of the features through a multilayer fully-connected network, the shallow network enhances the utilization of strong features by memorizing historical data, and the deep network and the shallow network combine to obtain a better sequencing effect. In the Deep Cross joint Learning (DCL) network technology, a wide network in the WDL algorithm is replaced with a feature Cross network to enhance feature information fusion and improve the ranking effect. Although the algorithm solves the problem of search sequencing under a single task by using a deep network, the algorithm cannot be well applied to the current situations of more types of current search resources and more measurement dimensions of user satisfaction.
In the search scene of the internet, the problem of many types of search resources is inevitably faced. For search ranking of different types of resources, a common solution is to use a model to train and predict different types of resources simultaneously. As shown in fig. 1a, for all types of resources, one WDL model is used for learning optimization of search ranking. The method has a simple structure, but has the problem that different types of resource features cannot be aligned, so that the model is difficult to optimize. The feature misalignment problem includes misalignment of feature types and inconsistency of feature distribution. The characteristic type misalignment means that the multi-source heterogeneous resources respectively have unique characteristics, and as shown in fig. 2a, the information, video, account number and other type resources all have unique characteristics corresponding to the resources. The inconsistent feature distribution means that the statistical distribution of the same feature is inconsistent for different types of resources, as shown in fig. 2b, for Click-Through Rate (CTR) features, quantiles represented by the same feature value under different types of resources have larger difference.
To solve this problem, the related art further splits the model according to the resource types, and adopts a separate search ranking algorithm for one type of resource, as shown in fig. 1 b. The method splits the model according to the resource type, thereby solving the problem that the features can not be aligned. But doing so introduces new problems: the resource data quantity of part types is small, the data are sparse, and the problem that convergence and optimization are difficult to achieve is easily caused for a depth model based on big data training; in addition, too many models are introduced, the difficulty of model maintenance is increased, and the application cost is greatly increased for the industry.
In view of this, an embodiment of the present application provides a resource sorting method, an apparatus, an electronic device, and a storage medium, where in the embodiment of the present application, resources to be sorted having the same resource type among multiple acquired resources to be sorted are divided into the same resource set, unique features and shared features corresponding to the respective resources to be sorted are respectively acquired, and further, based on the shared features and the unique features of the respective resources to be sorted, feature analysis is performed on the respective resources to be sorted, so as to alleviate the problem of sparse pendulous data of part of resource types, and finally, based on the obtained sorting parameters of the respective resource types of the respective resources to be sorted, the resources to be sorted in the respective resource sets are respectively sorted, so as to solve the problem that features of different types of resources cannot be aligned. The resource sorting is carried out based on the mode, the problem that different types of resource features cannot be aligned is solved, computing resources are saved, and the resource sorting accuracy is improved.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it should be understood that the preferred embodiments described herein are merely for illustrating and explaining the present application, and are not intended to limit the present application, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Fig. 3a is a schematic view of an application scenario according to an embodiment of the present application. The application scenario diagram includes two terminal devices 310 and a server 320. The terminal device 310 in the embodiment of the present application may be installed with a resource ranking client, where the resource ranking client is configured to rank resources that need to be recommended to a user in a scenario where the user performs resource search, resource recommendation, and the like, and specifically may be social software, such as instant messaging software and short video software, and may also be an applet, a web page, and the like.
It should be noted that the resource sequencing client in the embodiment of the present application may also refer to various resource sequencing applications that can be applied to the vehicle for education, information, tourism, listening to books, advertisements, and the like, and correspondingly, the resource to be sequenced may refer to news, books, strategies, and the like related to the education and the tourism, or advertisements, information flow messages, and the like, which is not limited specifically herein.
Server 320 may include a resource ranking server. The resource sequencing server is used for providing resource materials for the resource sequencing client, for example, the resources to be sequenced in the embodiment of the application can be positioned on the resource sequencing server side, a plurality of resources to be sequenced are stored, and unique features and shared features of the resources to be sequenced can also be stored. Alternatively, the resource to be sorted may be local to the resource sorting client. In addition, the resource sorting server in the embodiment of the present application may also be used for resource sorting, and is not specifically limited herein.
In the embodiment of the present application, the resource ranking model may be deployed on the terminal device 310 for training, or may be deployed on the server 320 for training. The server 320 may store a plurality of training samples, including at least one set of sample resources, for training the resource ranking model. Optionally, after the resource ranking model is obtained based on the training method in the embodiment of the present application through training, the trained resource ranking model may be directly deployed on the server 320 or the terminal device 310. In general, the resource ranking model is deployed directly on the server 320, and in the embodiment of the present application, the resource ranking model is often used to rank resources.
It should be noted that, the resource ordering method in the embodiment of the present application may be executed by the server or the terminal device alone, or may be executed by both the server and the terminal device. For example, after a user inputs a search word through a resource sorting client installed on a terminal device, the resource sorting client sends related search content to a resource sorting server (server for short), the server performs resource feature analysis, returns the sorted resources to the terminal device, and then the terminal device displays the sorted resources to the user through a resource display interface.
Fig. 3b is a schematic diagram of a resource display interface according to an embodiment of the present application. The method and the device can be applied to the internal sequencing of the multiple types of resource cards of the vertical type of cards in the comprehensive result page in the search scene of the browser and the resource sequencing of the vertical type of resource result pages of different types of resources. For example, different types of resources, such as video, information, users, applets, novels, etc., are ordered. Wherein, fig. 3b shows (1) sorting the resources in the synthesized result page, (2) sorting the resources in the video page, and (3) sorting the resources in the information page.
Through the combined learning of multi-source heterogeneous resources, the sorting effect of the vertical classes with sparse data is improved, and the user requirements are better met.
In a typical application scene, such as browser search, the method and the device can perform combined sequencing on different types of resources according to search terms of a user, and can solve the problems of data sparseness and feature alignment by using multi-source heterogeneous resource data during training, so that the sequencing effects of different verticals can be jointly optimized, and the user satisfaction is improved. The search ordering performance of multiple types of resources is optimized simultaneously through a multi-task learning method, a single model is adopted to perform ordering pre-estimation on the multi-source heterogeneous resources, the maintenance cost of the model is reduced, the problem that model tuning and ordering pre-estimation are difficult to perform for the vertical type with small data volume is solved, and the problem that the features of the multi-source heterogeneous data cannot be aligned is solved.
It should be noted that the embodiment of the present invention can be applied to various scenarios, including but not limited to various scenarios such as cloud technology, artificial intelligence, smart traffic, and assisted driving.
In an alternative embodiment, terminal device 310 and server 320 may communicate via a communication network.
In an alternative embodiment, the communication network is a wired network or a wireless network.
In this embodiment, the terminal device 310 is a computer device used by a user, and the computer device may be a computer device having a certain computing capability and running instant messaging software and a website or social contact software and a website, such as a personal computer, a mobile phone, a tablet computer, a notebook, an electronic book reader, an intelligent voice interaction device, an intelligent appliance, and a vehicle-mounted terminal. Each terminal device 310 is connected to a server 320 through a wireless network, and the server 320 is a server or a server cluster or a cloud computing center formed by a plurality of servers, or is a virtualization platform.
It should be noted that the resource ranking method provided in the embodiment of the present application may be applied to various application scenarios including resource ranking tasks, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, and the like, and training samples used in different scenarios are different, for example, video samples, article samples, applet samples, and the like, which are not listed here.
It should be noted that fig. 3a is only an example, and the number of the terminal devices and the servers is not limited in practice, and is not specifically limited in the embodiment of the present application.
The video detection method provided by the exemplary embodiment of the present application is described below with reference to the accompanying drawings in conjunction with the application scenarios described above, and it should be noted that the application scenarios described above are only shown for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect.
Referring to fig. 4, an implementation flowchart of a resource ordering method provided in the embodiment of the present application is shown, which is briefly introduced here by taking a server as an execution subject, and a specific implementation flow of the method is as follows:
s41: the server acquires a plurality of resources to be sorted and divides the resources to be sorted with the same resource type into the same resource set;
the plurality of resources to be sorted have at least two resource types, and the resource types include but are not limited to any one of the following: information, video, applets, news.
S42: the server respectively acquires unique characteristics and shared characteristics corresponding to each resource to be sequenced;
the unique feature of each resource to be sequenced represents the unique resource feature of the resource type to which the resource belongs, and the shared feature of each resource to be sequenced represents the resource feature common to all resource types.
For example, when the resource type includes information and video, the unique feature of the information may be the total length of the information, the number of images of the information, the unique feature of the video may be the total duration of the video, the multi-mode signal of the video, and the common feature of the information and the video may be the click rate, the correlation between the search request and the resource tag, and the like.
The video multimode signal refers to features obtained by deep learning of a video cover, each video frame and the like.
S43: the server performs characteristic analysis on each resource to be sequenced based on the shared characteristic and the unique characteristic of each resource to be sequenced to obtain sequencing parameters of each resource to be sequenced aiming at the type of the resource to which the resource belongs;
the sorting parameter may represent a click rate obtained by performing click rate estimation on the resource to be sorted.
S44: and the server sorts the resources to be sorted in each resource set respectively based on the sorting parameters corresponding to the resources to be sorted in the same resource set.
The resource sorting is carried out based on the mode, the resources to be sorted with the same resource type in the obtained multiple resources to be sorted are divided into the same resource set, the unique features and the shared features corresponding to the resources to be sorted are respectively obtained, further, the resources to be sorted are subjected to feature analysis based on the shared features and the unique features of the resources to be sorted, finally, the problem that partial resource types are sparse in vertical data is solved by sorting the resources to be sorted in the resource sets respectively based on the obtained sorting parameters of the resources to be sorted aiming at the resource types to which the resources belong, the problem that the features of different types of resources cannot be aligned is solved, the calculation resources are saved, and the resource sorting accuracy is improved.
In an optional implementation manner, step S43 in this embodiment may also be implemented based on machine learning, for example, the following operations are respectively performed for each resource to be sorted:
inputting the shared characteristic and the unique characteristic of one resource to be sorted into a trained resource sorting model, and performing characteristic analysis on the resource to be sorted through the resource sorting model to obtain a sorting parameter of the resource to be sorted aiming at the resource type.
The resource ranking model is obtained by performing loop iterative training on the initial resource ranking model based on a training sample data set containing sample resources of various resource types, and the training process of the model is described in detail below.
For example, 2 resources to be sorted in total are input with the shared features and unique features of the 2 resources to be sorted into a trained resource sorting model, feature analysis is performed on the resources to be sorted based on the resource sorting model, and sorting parameters of the resources to be sorted, which are output by the resource sorting model, for the resource types to which the resources belong are obtained respectively. For example, the resource 1 to be sorted is an information type, the corresponding sorting parameter is 0.9, the resource 2 to be sorted is a video type, and the corresponding sorting parameter is 0.3.
For the inside of the same resource set, sorting is performed according to the sorting parameters corresponding to the resources to be sorted, for example, if a resource set of a certain video class includes 3 resources to be sorted, the sorting parameter corresponding to the resource 1 to be sorted is 0.5, the sorting parameter corresponding to the resource 2 to be sorted is 0.7, and the sorting parameter corresponding to the resource 3 to be sorted is 0.3, then the resources to be sorted are sorted according to the order of the sorting parameters from large to small: resource 2 to be sorted, resource 1 to be sorted, and resource 3 to be sorted.
In an alternative embodiment, the resource ranking model includes a plurality of expert networks, and a gating network and a tower network that correspond to different resource types, respectively.
The network structures of a plurality of different expert networks are the same, the network parameters are different, and the importance degrees of the expert networks corresponding to the same resource type are different.
For different expert networks, learning is mainly performed from different angles, and for the same resource type, the learning importance degrees of different expert networks are different, so that the parameters are different.
For example, the importance of the expert network 1 is important, the importance of the expert network 2 is general, and the importance of the expert network 3 is not important, so that the network parameters of the three types of expert networks are different, and the information can be learned from different angles.
Fig. 5 is a block diagram of an overall resource ranking model according to an embodiment of the present disclosure. In the embodiment of the application, the input of the resource sequencing model is the common characteristics of the multi-source heterogeneous resources and the unique characteristics of each resource. The following is an example of three resources, information, video and applets.
Wherein, the unique features of the information include the total length of the information, the number of the information pictures; the unique characteristics of the video comprise the total video duration and video multimode signals; the unique characteristics of the small program comprise a small program quality grade and a small program heat; common features of these three resources include: selecting bias characteristics (such as position information, equipment information and the like), characteristics of a request side (a user inquiry side) and a content side (a server side), counting reflux characteristics (resource click rate), semantic matching characteristics (semantic matching degree of search keywords and resources), correlation characteristics (correlation of the search keywords and the resources), term (term) level characteristics of the request, and term level characteristics of the content side. Wherein, term level characteristics refer to characteristics learned based on Transform.
For each type of resource, common characteristics and unique characteristics are input into a shared expert network and a gating network unique to a corresponding task, the gating network weights the output of the expert network and sends the output to a tower network of the corresponding task, and finally the click rate of the output resource is scored and estimated for searching and sequencing.
It should be noted that fig. 5 exemplarily shows three resource types of information, video and applet as inputs, and actually the resource ordering model in the present application can order more types of resources, which is not limited herein.
In addition, fig. 5 only shows the unique features and common features of the resources, such as three resource types of information, video, and applet, and does not limit the present application, and actually, other features may not be specifically limited herein.
In an alternative embodiment, the ranking parameter of the resource to be ranked for the resource type may be obtained by:
firstly, performing joint feature extraction based on each expert network in a resource sorting model to respectively obtain joint feature vectors output by each expert network aiming at one resource to be sorted; then, based on a target gating network corresponding to the resource type of the resource to be sequenced, carrying out weighted summation on all the joint feature vectors to obtain a target feature vector for the resource to be sequenced; and finally, inputting the target characteristic vector into a target tower network corresponding to the resource type of the resource to be sorted, and performing click rate estimation on the resource to be sorted based on the target tower network to obtain a recommendation parameter corresponding to the resource to be sorted.
For example, the target gating network corresponding to the resource 1 to be sorted is the gating network 1, the corresponding target tower network is the tower network 1, the gating network 1 weights the joint feature vector output by the expert network to obtain a target feature vector, the target feature vector is input into the tower network 1, and the tower network 1 outputs the recommended parameter corresponding to the resource 1 to be sorted.
The specific work flow of the expert network, the gating network, and the tower network of the resource ranking model in the embodiment of the present application is described in detail below with reference to fig. 5.
In an alternative embodiment, the joint feature vector output by the expert network for one resource to be ranked is obtained by:
firstly, performing feature splicing on shared features and unique features corresponding to one resource to be sequenced, and then respectively inputting the shared features and the unique features into each expert network; and then respectively extracting joint features of the spliced feature vectors corresponding to the resources to be sorted based on each expert network to obtain the joint feature vectors output by each expert network aiming at the resources to be sorted.
Referring to fig. 6, it is a schematic diagram of a structure of an expert network in a resource ranking model in the embodiment of the present application, where network structures of different expert networks are the same, and network parameters are different. The input of the expert network is the concatenation of the shared characteristics and the unique characteristics of the multi-source heterogeneous resources, and the input characteristics of the jth sample of the ith resource can be expressed as:
Figure BDA0003314071360000161
wherein, FinputRepresenting the input characteristics of the expert network, Concat representing the dimension splicing operation,
Figure BDA0003314071360000162
indicating a shared characteristic of the resource, Ei,jRepresenting unique characteristics of the resource.
Input feature FinputWith three fully-connected layers with output feature dimensions of 512, 256, and 128, respectively, each fully-connected layer having a Linear rectification function (ReLU) as an activation function, the operation of each layer can be expressed as:
Fout=ReLU(Wi,jFin+bi,j)
wherein W and b are weight and bias parameters of the fully-connected layer of the layer, the initialized values of W and b are different for different expert networks, ReLU is an activation function, FinThe specific operation of (a) is as follows:
F(x)=max(0,x)
after the above operations, the ith expert network outputs a Vector with 128 dimensions for the jth resourceiAs a joint feature vector learned by the above.
In the embodiment, different expert networks have different importance for the same task, the introduction of the shared expert network group can enable different vertical classes to be jointly trained, and implicit data enhancement can be realized for shared characteristics, so that an information island is opened, and the problem of sparse partial vertical class data is solved.
In an alternative embodiment, the target feature vector of the target gating network for the resource to be sorted is obtained by:
firstly, inputting a sharing characteristic and a unique characteristic corresponding to a resource to be sequenced into a target gating network corresponding to the resource type of the resource to be sequenced, and inputting a target gating network corresponding to the resource type of the resource to be sequenced by each expert network aiming at a joint characteristic vector output by the resource to be sequenced; then, based on a target gating network, extracting attention features of the shared features and the unique features to obtain an attention weight vector for a resource to be sequenced; and finally, based on the attention weight vector, carrying out weighted summation on each combined feature vector to obtain a weighted feature vector corresponding to the resource to be sorted.
Specifically, the input of the gating network is the shared feature and the unique feature corresponding to the resource to be sorted, and the joint feature vector aiming at the resource to be sorted, which is output by each expert network, the shared feature and the unique feature corresponding to the resource to be sorted are spliced and the attention feature is extracted, so as to obtain the attention weight vector aiming at the resource to be sorted, and finally, the weighted sum is performed on each joint feature vector based on the attention weight vector, so as to obtain the weighted feature vector corresponding to the resource to be sorted.
Fig. 7 is a schematic structural diagram of a gate network in a resource ranking model according to an embodiment of the present application. For the kth resource, the input of the corresponding gating network is the concatenation of the shared features and the unique features of the resource, and m joint feature vectors output by m expert networks, namely a joint feature vector 1, a joint feature vector 2, … … and a joint feature vector m in fig. 7, wherein the spliced shared features and unique features are subjected to probability normalization operation after being subjected to full connection layers to obtain an m-dimensional attention weight vector for weighting the joint features.
In an alternative embodiment, the attention weight vector is obtained by:
firstly, performing feature splicing on shared features and unique features based on a target gating network; then, performing attention feature extraction on a spliced feature vector corresponding to a resource to be sorted to obtain a weighted feature vector corresponding to the resource to be sorted, wherein the dimension of the weighted feature vector is the same as the number of expert networks, and one dimension corresponds to one expert network; and finally, determining weights corresponding to all dimensions based on the ratio of the exponential powers corresponding to the element values of all dimensions in the weighted feature vector to the sum of the exponential powers corresponding to all dimension element values, and using the weight vector formed by the obtained weights as an attention weight vector.
As shown in fig. 7, for the input shared features and unique features of this kind of resource, vector splicing is performed first, and the spliced feature vector passes through full connection layers with output feature dimensions of 256, 128, and m respectively, where each full connection layer uses ReLU as an activation function. Full-connection layer output m-dimensional vector FoutThen, probability normalization is performed through a softmax function, and an attention weight vector of the gated network output of the kth resource can be calculated as follows:
Figure BDA0003314071360000181
wherein the content of the first and second substances,
Figure BDA0003314071360000182
i-dimensional value, w, representing the output vector of the fully-connected layerk,iThe ith dimension of the attention weight vector representing the kth resource,
Figure BDA0003314071360000183
and j represents the j dimension value of the output vector of the full connection layer, and the value of j is (1, m). When the values of i are different, the corresponding denominators of the formulas have the same value, and therefore the sum of the weights of the attention weight vectors calculated based on the values is 1.
Finally, the attention weight vector W is usedkJoint feature Vector for expert network outputiWeighting to obtain the final output weighted feature vector fk
Figure BDA0003314071360000184
In the embodiment, due to the weight distribution of the gating network, different expert networks can learn different signals from different angles, so that the characteristic isolation is realized, and the problem of characteristic misalignment among different types of resources is solved.
In an alternative embodiment, the elements in the attention weight vector represent: the weights corresponding to the expert networks, and the weights corresponding to different expert networks are positively correlated with the importance degrees of the expert networks corresponding to the resource types.
Specifically, the weights for different expert networks are different, and the more important an expert network for a certain resource type is, the greater the weight is.
Referring to fig. 8, which is a schematic structural diagram of a tower network in a resource ranking model in the embodiment of the present application, a process of obtaining recommendation parameters of resources to be ranked through a target tower network in the embodiment of the present application is described in detail below with reference to fig. 8.
Weighted feature vector f obtained by gating networkkAnd then input into the corresponding tower network. The structure of the tower network corresponding to the kth resource is shown in fig. 8, which takes three fully connected layers as an example, and mainly comprises three fully connected networks with 128, 32, 1 output dimensions and Sigmoid (S-type) activation functions. Wherein the operation of the fully connected network is as described above, the Sigmoid function is calculated as follows:
Figure BDA0003314071360000191
wherein, akValue, s, representing the third fully-connected layer outputkAnd expressing the estimated click rate score, and sequencing the final search result according to the estimated click rate score, or inputting the click rate score as a signal into other models for comprehensive sequencing.
The following describes the training process of the resource ranking model in detail:
in an alternative embodiment, the resource ranking model is trained by:
firstly, selecting a plurality of sample resources from a training sample data set, and acquiring unique characteristics and shared characteristics of each selected sample resource; secondly, respectively inputting the unique characteristics and the shared characteristics of each sample resource into a resource sequencing model, and acquiring sequencing parameters corresponding to each sample resource, which are obtained based on the resource sequencing model; and finally, constructing a loss function based on the sequencing parameters corresponding to the sample resources and the sequencing labels corresponding to the sample resources, and adjusting the network parameters of the resource sequencing model based on the loss function, wherein the sequencing labels are used for representing whether the sample resources are clicked or not.
Specifically, in a model training stage, a small batch random gradient descent method may be adopted to train a model, a plurality of sample resources are selected from a training sample data set, in the present application, a small batch sample number is mainly exemplified as 128, data of each batch is randomly sampled from a multi-source heterogeneous resource sample, unique features and common features of each sample resource are input into a resource ordering model, an ordering parameter corresponding to each sample resource is obtained, a loss function is constructed based on the ordering parameter and an ordering label, network parameters of the resource ordering model are adjusted, and a cross entropy loss function is adopted as the model loss function, which can be expressed as:
Figure BDA0003314071360000201
where y represents a sample label, 1 represents a dotted sample, 0 represents a non-dotted sample,
Figure BDA0003314071360000202
and the evaluation score of the click rate is expressed and is a floating point number in a value range (0, 1).
In the above embodiment, in a typical application scenario such as browser search, the method and the device can perform joint sequencing on different types of resources according to search terms of a user, and can solve the problems of data sparsity and feature alignment by using multi-source heterogeneous resource data during training, so that the sequencing effects of different verticals can be jointly optimized, and the user satisfaction is improved.
In an optional implementation manner, the resource ranking model includes a plurality of expert networks, and the network parameters of the resource ranking model are adjusted by the following methods corresponding to the gate control network and the tower network of different resource types:
firstly, determining a loss function corresponding to each sample resource based on a sorting parameter and a sorting label corresponding to each sample resource; then, based on each loss function, parameter adjustment is carried out on a tower network and a gating network corresponding to the resource type to which the corresponding sample resource belongs; and finally, adjusting the parameters of each expert network based on the parameter adjustment result of each gating network.
Specifically, for a sample resource, a loss function is constructed according to a corresponding sorting parameter and a sorting label, and besides the input of the shared expert network group, the characteristic signal of each sample can also be input into a gating network of a corresponding resource type, and finally reaches an upper tower network. Because one sample resource corresponds to one resource type, only one corresponding upper tower network is entered, the corresponding tower network is only updated when the updating parameters are propagated reversely, the network parameters of the gating network are correspondingly updated, and the parameters of the expert network are adjusted based on the network parameters of the gating network.
In the embodiment of the present application, the attention weight vector is initialized randomly at first (the initialization is normal distribution random initialization without human intervention), and the weight distribution of the attention feature vector of the gated network is continuously adjusted through the target of different tasks and the gradient feedback of the loss function, and the weight distribution changes, so that signals learned by different expert networks also have a differentiation effect:
because the distribution of the weights of the gating network corresponding to a certain task to different expert networks is different, the expert network with larger weight has larger importance to the task, so that the expert network can learn more information related to the task and generate differentiation with the information learned by the expert with smaller weight.
Fig. 9a is a schematic flowchart of a resource sorting method according to an embodiment of the present application.
Firstly, inputting resources to be sorted, inputting unique characteristics and shared characteristics into an expert network group and a gating network corresponding to the types of the resources, carrying out weighted summation on output of the expert network group through attention weight vectors by the gating network, outputting the characteristic vectors obtained through the weighted summation into a corresponding tower network, and outputting click rate estimated scores by the tower network to serve as a basis for searching and sorting.
Specifically, referring to fig. 9b, which is a schematic diagram of resource sorting results provided in this embodiment of the present application, when a user inputs a keyword for searching, resources to be sorted include information 1, information 2, information 3, and video 1, video 2, and video 3, common features of the resources to be sorted are a selection bias feature, a statistical backflow feature, a semantic matching feature, and a correlation feature, unique features of the information include an information total length and an information picture number, and unique features of the video include a video total length and a video multi-mode signal. And inputting the unique characteristics of the common characteristics of the resources into an expert network to obtain a joint characteristic vector. Aiming at the information 1, the common characteristics of the resources and the unique characteristics of the information 1 are input into a gate control network 1, the gate control network 1 weights the combined characteristic vector through the attention weight vector, the weighted characteristic vector is input into a tower network 1, and the estimated click rate of the output information 1 is scored to be 0.5. Similarly, the estimated click rate scores of the information 2 and the information 3 are 0.7 and 0.4, respectively. For the video 1, the common characteristics of the resources and the unique characteristics of the video 1 are input into a gating network 2, the gating network 2 weights the combined characteristic vector through an attention weight vector, the weighted characteristic vector is input into a tower network 2, and the estimated click rate of the output video 1 is scored by 0.3. Similarly, the estimated click rate scores of video 2 and video 3 are 0.5 and 0.6, respectively. According to the estimated click rate score, sequencing the resources to be sequenced on the information page and the video page respectively, wherein the sequencing on the information page is as follows: information 2, information 1, information 3; the ordering on the video page is: video 3, video 2 and video 1, and displaying the pages to the user.
The resources are sorted based on the mode, the multi-gate multi-expert network is adopted for joint learning of multi-source heterogeneous data, joint search sorting of different types of resources can be achieved through one model, the characteristics and the structure sharing of the various types of resources are jointly extracted through the bottom-layer expert network aiming at the different types of resources, the problem of data sparseness is solved, sample isolation and characteristic isolation are achieved by disassembling the top-layer task tower, the problem that the characteristics of the different types of resources cannot be aligned is solved, computing resources are saved, and model maintenance cost is reduced.
Based on the same inventive concept, the embodiment of the present application further provides a schematic structural diagram of a resource sorting apparatus. As shown in fig. 10, it is a schematic structural diagram of a resource sorting apparatus 1000, and may include:
a dividing unit 1001, configured to obtain multiple resources to be sorted, and divide the resources to be sorted having the same resource type into the same resource set, where the multiple resources to be sorted have at least two resource types;
an obtaining unit 1002, configured to obtain unique features and shared features corresponding to each resource to be sorted, respectively, where the unique feature of each resource to be sorted is characterized by: the resource features of the resource type are unique, and the sharing feature of each resource to be sequenced is characterized in that: resource characteristics common to all resource types;
an analyzing unit 1003, configured to perform feature analysis on each resource to be sorted based on the shared feature and the unique feature of each resource to be sorted, to obtain a sorting parameter of each resource to be sorted for a resource type to which the resource belongs;
the sorting unit 1004 is configured to sort the resources to be sorted in each resource set based on the sorting parameters corresponding to the resources to be sorted in the same resource set.
Optionally, the analysis unit 1003 is specifically configured to:
inputting the shared characteristic and the unique characteristic of one resource to be sequenced into a trained resource sequencing model, and performing characteristic analysis on one resource to be sequenced through the resource sequencing model to obtain a sequencing parameter of the resource to be sequenced aiming at the resource type to which the resource belongs;
the resource ranking model is obtained by performing loop iterative training on the initial resource ranking model based on a training sample data set containing sample resources of various resource types.
Optionally, the resource ordering model includes a plurality of expert networks, and a gate control network and a tower network corresponding to different resource types, respectively, where the network structures of the plurality of different expert networks are the same, the network parameters are different, and the importance degrees of the expert networks corresponding to the same resource type are different.
Optionally, the analysis unit 1003 is specifically configured to:
performing joint feature extraction based on each expert network in the resource sorting model to respectively obtain joint feature vectors output by each expert network aiming at one resource to be sorted;
based on a target gating network corresponding to the resource type of the resource to be sequenced, performing weighted summation on all the joint eigenvectors to obtain a target eigenvector for the resource to be sequenced;
and inputting the target characteristic vector into a target tower network corresponding to the resource type of the resource to be sorted, and performing click rate estimation on the resource to be sorted based on the target tower network to obtain a recommendation parameter corresponding to the resource to be sorted.
Optionally, the analysis unit 1003 is specifically configured to:
after carrying out feature splicing on shared features and unique features corresponding to one resource to be sequenced, respectively inputting the shared features and the unique features into each expert network;
and respectively extracting joint features of the spliced feature vectors corresponding to the resources to be sorted based on each expert network to obtain the joint feature vectors output by each expert network aiming at the resources to be sorted.
Optionally, the analysis unit 1003 is specifically configured to:
inputting a sharing characteristic and a unique characteristic corresponding to a resource to be sequenced into a target gating network corresponding to the resource type of the resource to be sequenced, and inputting a target gating network corresponding to the resource type of the resource to be sequenced by each expert network aiming at a combined characteristic vector output by the resource to be sequenced;
based on a target gating network, extracting attention features of the shared features and the unique features to obtain an attention weight vector for a resource to be sequenced;
and carrying out weighted summation on each combined feature vector based on the attention weight vector to obtain a weighted feature vector corresponding to the resource to be sequenced.
Optionally, each element in the attention weight vector represents: the weights corresponding to the expert networks, and the weights corresponding to different expert networks are positively correlated with the importance degrees of the expert networks corresponding to the resource types.
Optionally, the analysis unit 1003 is specifically configured to:
performing feature splicing on the shared features and the unique features based on the target gating network;
performing attention feature extraction on a spliced feature vector corresponding to a resource to be sorted to obtain a weighted feature vector corresponding to the resource to be sorted, wherein the dimension of the weighted feature vector is the same as the number of expert networks, and one dimension corresponds to one expert network;
determining the weight corresponding to each dimension based on the ratio of the exponential power corresponding to the element value of each dimension in the weighted feature vector to the sum of the exponential powers corresponding to all dimension element values, and using the weight vector formed by the obtained weights as the attention weight vector.
Optionally, the apparatus further includes a training unit 1005, which trains the resource ranking model by:
selecting a plurality of sample resources from a training sample data set, and acquiring unique characteristics and shared characteristics of each selected sample resource;
respectively inputting the unique characteristics and the shared characteristics of each sample resource into a resource sequencing model to obtain sequencing parameters corresponding to each sample resource, which are obtained based on the resource sequencing model;
and constructing a loss function based on the sequencing parameters corresponding to the sample resources and the sequencing labels corresponding to the sample resources, adjusting the network parameters of the resource sequencing model based on the loss function, and using the sequencing labels to represent whether the sample resources are clicked or not.
Optionally, the resource ranking model includes a plurality of expert networks, and a gate control network and a tower network corresponding to different resource types, and the training unit 1005 is specifically configured to:
determining a loss function corresponding to each sample resource based on the sequencing parameter and the sequencing label corresponding to each sample resource;
respectively adjusting parameters of a tower network and a gating network corresponding to the resource type of the corresponding sample resource based on each loss function;
and adjusting the parameters of each expert network based on the parameter adjustment result of each gating network.
The resource sorting is carried out based on the mode, the resources to be sorted with the same resource type in the obtained multiple resources to be sorted are divided into the same resource set, the unique features and the shared features corresponding to the resources to be sorted are respectively obtained, further, the resources to be sorted are subjected to feature analysis based on the shared features and the unique features of the resources to be sorted, finally, the problem that partial resource types are sparse in vertical data is solved by sorting the resources to be sorted in the resource sets respectively based on the obtained sorting parameters of the resources to be sorted aiming at the resource types to which the resources belong, the problem that the features of different types of resources cannot be aligned is solved, the calculation resources are saved, and the resource sorting accuracy is improved.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same one or more pieces of software or hardware when implementing the present application.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, a resource ranking apparatus according to the present application may include at least a processor and a memory. Wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the resource ranking method according to various exemplary embodiments of the present application described in the specification. For example, the processor may perform the steps as shown in fig. 4.
The electronic equipment is based on the same inventive concept as the method embodiment, and the embodiment of the application also provides the electronic equipment. In one embodiment, the electronic device may be a server, such as server 320 shown in FIG. 3. In this embodiment, the electronic device may be configured as shown in fig. 11, and include a memory 1101, a communication module 1103, and one or more processors 1102.
A memory 1101 for storing computer programs executed by the processor 1102. The memory 1101 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a program required for running an instant messaging function, and the like; the storage data area can store various instant messaging information, operation instruction sets and the like.
The memory 1101 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1101 may also be a non-volatile memory (non-volatile memory), such as a read-only memory (rom), a flash memory (flash memory), a hard disk (HDD) or a solid-state drive (SSD); or the memory 1101 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1101 may be a combination of the above memories.
The processor 1102 may include one or more Central Processing Units (CPUs), a digital processing unit, and the like. The processor 1102 is configured to implement the resource sorting method when the computer program stored in the memory 1101 is called.
The communication module 1103 is used for communicating with the terminal device and other servers.
In the embodiment of the present application, a specific connection medium among the memory 1101, the communication module 1103, and the processor 1102 is not limited. In the embodiment of the present application, the memory 1101 and the processor 1102 are connected through a bus 1104 in fig. 11, the bus 1104 is depicted by a thick line in fig. 11, and the connection manner between other components is merely an illustrative illustration and is not limited thereto. The bus 1104 may be divided into an address bus, a data bus, a control bus, and the like. For ease of description, only one thick line is depicted in FIG. 11, but only one bus or one type of bus is not depicted.
The memory 1101 stores a computer storage medium, and the computer storage medium stores computer-executable instructions for implementing the resource ordering method according to the embodiment of the present application. The processor 1102 is configured to perform the resource ordering method described above, as shown in fig. 4.
In another embodiment, the electronic device may also be other electronic devices, such as terminal device 310 shown in fig. 3. In this embodiment, the structure of the electronic device may be as shown in fig. 12, including: communications assembly 1210, memory 1220, display unit 1230, camera 1240, sensors 1250, audio circuitry 1260, bluetooth module 1270, processor 1280, and the like.
The communication component 1210 is configured to communicate with a server. In some embodiments, a Wireless Fidelity (WiFi) module may be included, the WiFi module being a short-range Wireless transmission technology, through which the electronic device may help the user to transmit and receive information.
The memory 1220 may be used for storing software programs and data. The processor 1280 performs various functions of the terminal device 310 and data processing by executing software programs or data stored in the memory 1220. The memory 1220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Memory 1220 stores an operating system that enables terminal device 310 to operate. The memory 1220 may store an operating system and various application programs, and may also store codes for executing the resource sorting method according to the embodiment of the present application.
The display unit 1230 may also be used to display information input by the user or information provided to the user and a Graphical User Interface (GUI) of various menus of the terminal apparatus 310. Specifically, the display unit 1230 may include a display screen 1232 provided on the front surface of the terminal device 310. The display 1232 may be configured in the form of a liquid crystal display, a light emitting diode, or the like. The display unit 1230 may be used to display a resource display interface in the embodiment of the present application.
The display unit 1230 may be further configured to receive input numeric or character information and generate signal input related to user settings and function control of the terminal device 310, and specifically, the display unit 1230 may include a touch screen 1231 disposed on the front surface of the terminal device 310 and configured to collect touch operations of a user thereon or nearby, such as clicking a button, dragging a scroll box, and the like.
The touch screen 1231 may cover the display screen 1232, or the touch screen 1231 and the display screen 1232 may be integrated to implement the input and output functions of the terminal device 310, and after the integration, the touch screen may be referred to as a touch display screen for short. The display unit 1230 in this application can display the application programs and the corresponding operation steps.
The camera 1240 may be used to capture still images and a user may post comments on the images taken by the camera 1240 through an application. The number of the cameras 1240 may be one or plural. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing elements convert the light signals into electrical signals, which are then passed to a processor 1280 for conversion into digital image signals.
The terminal device may further comprise at least one sensor 1250, such as an acceleration sensor 1251, a distance sensor 1252, a fingerprint sensor 1253, a temperature sensor 1254. The terminal device may also be configured with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, motion sensor, and the like.
Audio circuit 1260, speaker 1261, microphone 1262 can provide an audio interface between a user and terminal device 310. The audio circuit 1260 may transmit the received electrical signal converted from the audio data to the speaker 1261, and the audio signal is converted into a sound signal by the speaker 1261 and output. The terminal device 310 may also be provided with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 1262 converts the collected sound signals into electrical signals, which are received by the audio circuit 1260 and converted into audio data, which are output to the communication module 1210 for transmission to, for example, another terminal device 310, or output to the memory 1220 for further processing.
The bluetooth module 1270 is used for information interaction with other bluetooth devices having bluetooth modules through a bluetooth protocol. For example, the terminal device may establish a bluetooth connection with a wearable electronic device (e.g., a smart watch) that is also equipped with a bluetooth module through the bluetooth module 1270, so as to perform data interaction.
The processor 1280 is a control center of the terminal device, connects various parts of the entire terminal device using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs stored in the memory 1220 and calling data stored in the memory 1220. In some embodiments, processor 1280 may include one or more processing units; the processor 1280 may also integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a baseband processor, which primarily handles wireless communications. It is to be appreciated that the baseband processor described above may not be integrated into the processor 1280. In the application, the processor 1280 may run an operating system, an application program, a user interface display and a touch response, and the resource sorting method according to the embodiment of the application. Additionally, processor 1280 is coupled with display unit 1230.
In some possible embodiments, the various aspects of the resource ranking method provided herein may also be implemented in the form of a program product comprising program code for causing a computer device to perform the steps of the resource ranking method according to various exemplary embodiments of the present application described above in this specification when the program product is run on a computer device, for example, the computer device may perform the steps as shown in fig. 4.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user computing device, partly on the user equipment, as a stand-alone software package, partly on the user computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (15)

1. A method for resource ordering, the method comprising:
acquiring a plurality of resources to be ordered, and dividing the resources to be ordered with the same resource type into the same resource set, wherein the plurality of resources to be ordered have at least two resource types;
respectively acquiring unique features and shared features corresponding to the resources to be sequenced, wherein the unique feature of each resource to be sequenced is characterized by: the resource features of the resource type are unique, and the sharing feature of each resource to be sequenced is characterized in that: resource characteristics common to all resource types;
performing feature analysis on each resource to be sequenced based on the shared features and the unique features of each resource to be sequenced to obtain sequencing parameters of each resource to be sequenced aiming at the respective resource type;
and respectively sequencing the resources to be sequenced in each resource set based on the sequencing parameters corresponding to the resources to be sequenced in the same resource set.
2. The method according to claim 1, wherein, when feature analysis is performed on the resources to be sorted based on the shared features and the unique features of the resources to be sorted, and the sorting parameters of the resources to be sorted for the resource types to which the resources to be sorted belong are obtained, the following operations are respectively performed for the resources to be sorted:
inputting the shared characteristic and the unique characteristic of one resource to be sequenced into a trained resource sequencing model, and performing characteristic analysis on the resource to be sequenced through the resource sequencing model to obtain a sequencing parameter of the resource to be sequenced for the resource type to which the resource belongs;
the resource ranking model is obtained by performing loop iteration training on the initial resource ranking model based on a training sample data set containing sample resources of various resource types.
3. The method of claim 2, wherein the resource ranking model comprises a plurality of expert networks, and a gating network and a tower network corresponding to different resource types, respectively, wherein the network structures of the plurality of different expert networks are the same, the network parameters are different, and the importance of each of the expert networks corresponding to the same resource type is different.
4. The method as claimed in claim 3, wherein said performing feature analysis on said one resource to be sorted through said resource sorting model to obtain a sorting parameter of said one resource to be sorted for a resource type to which said one resource to be sorted belongs includes:
performing joint feature extraction based on each expert network in the resource sorting model to respectively obtain joint feature vectors output by each expert network for the resource to be sorted;
based on a target gating network corresponding to the resource type of the resource to be sequenced, performing weighted summation on each joint feature vector to obtain a target feature vector for the resource to be sequenced;
and inputting the target characteristic vector into a target tower network corresponding to the resource type of the resource to be sorted, and performing click rate estimation on the resource to be sorted based on the target tower network to obtain a recommendation parameter corresponding to the resource to be sorted.
5. The method of claim 4, wherein the jointly extracting features based on the expert network joints in the resource ranking model to obtain joint feature vectors output by the expert networks for the resource to be ranked respectively comprises:
after carrying out feature splicing on the shared features and the unique features corresponding to the resource to be sequenced, respectively inputting the shared features and the unique features into each expert network;
and respectively performing joint feature extraction on the spliced feature vector corresponding to the resource to be sorted based on each expert network to obtain a joint feature vector output by each expert network for the resource to be sorted.
6. The method of claim 4, wherein the performing a weighted summation on each joint feature vector based on a target gating network corresponding to a resource type to which the one resource to be sorted belongs to obtain a target feature vector for the one resource to be sorted comprises:
inputting the shared characteristic and the unique characteristic corresponding to the resource to be sequenced into a target gating network corresponding to the resource type of the resource to be sequenced, and inputting the joint characteristic vector output by each expert network aiming at the resource to be sequenced into the target gating network corresponding to the resource type of the resource to be sequenced;
based on the target gating network, performing attention feature extraction on the shared features and the unique features to obtain an attention weight vector aiming at the resource to be sequenced;
and carrying out weighted summation on each combined feature vector based on the attention weight vector to obtain a weighted feature vector corresponding to the resource to be sequenced.
7. The method of claim 6, wherein the elements in the attention weight vector respectively represent: the weights corresponding to the expert networks, and the weights corresponding to different expert networks are positively correlated with the importance degrees respectively corresponding to the resource types.
8. The method of claim 6, wherein said performing attention feature extraction on said shared features and said unique features based on said target gating network to obtain an attention weight vector for said one resource to be ranked comprises:
performing feature concatenation on the shared features and the unique features based on the target gated network;
performing attention feature extraction on the spliced feature vector corresponding to the resource to be sorted to obtain a weighted feature vector corresponding to the resource to be sorted, wherein the dimension of the weighted feature vector is the same as the number of the expert networks, and one dimension corresponds to one expert network;
determining weights corresponding to all dimensions based on the ratio of the exponential powers corresponding to the element values of all dimensions in the weighted feature vector to the sum of the exponential powers corresponding to all dimension element values, and taking the weight vector formed by the obtained weights as the attention weight vector.
9. The method of any one of claims 2 to 8, wherein the following operations are performed in one loop iteration when the resource ranking model is trained:
selecting a plurality of sample resources from the training sample data set, and acquiring unique features and shared features of the selected sample resources;
respectively inputting the unique characteristics and the shared characteristics of each sample resource into the resource sequencing model, and acquiring sequencing parameters corresponding to each sample resource, which are obtained based on the resource sequencing model;
and constructing a loss function based on the sequencing parameters corresponding to the sample resources and the sequencing labels corresponding to the sample resources, and adjusting the network parameters of the resource sequencing model based on the loss function, wherein the sequencing labels are used for representing whether the sample resources are clicked or not.
10. The method of claim 9, wherein the resource ordering model comprises a plurality of expert networks, and gating networks and tower networks corresponding to different resource types;
then, the constructing a loss function based on the ranking parameter corresponding to each sample resource and the ranking label corresponding to each sample resource, and adjusting the network parameter of the resource ranking model based on the loss function includes:
determining a loss function corresponding to each sample resource based on the sequencing parameter and the sequencing label corresponding to each sample resource;
respectively adjusting parameters of a tower network and a gating network corresponding to the resource type of the corresponding sample resource based on each loss function;
and adjusting the parameters of each expert network based on the parameter adjustment result of each gating network.
11. An apparatus for resource ranking, comprising:
the resource sorting device comprises a dividing unit, a sorting unit and a processing unit, wherein the dividing unit is used for acquiring a plurality of resources to be sorted and dividing the resources to be sorted with the same resource type into the same resource set, and the plurality of resources to be sorted have at least two resource types;
an obtaining unit, configured to obtain unique features and shared features corresponding to the resources to be sorted, respectively, where the unique feature of each resource to be sorted is characterized by: the resource features of the resource type are unique, and the sharing feature of each resource to be sequenced is characterized in that: resource characteristics common to all resource types;
the analysis unit is used for carrying out feature analysis on each resource to be sequenced based on the shared features and the unique features of each resource to be sequenced to obtain sequencing parameters of each resource to be sequenced aiming at the type of the resource to which the resource belongs;
and the sequencing unit is used for sequencing the resources to be sequenced in each resource set respectively based on the sequencing parameters corresponding to the resources to be sequenced in the same resource set.
12. The apparatus of claim 11, wherein the analysis unit is specifically configured to:
inputting the shared characteristic and the unique characteristic of one resource to be sequenced into a trained resource sequencing model, and performing characteristic analysis on the resource to be sequenced through the resource sequencing model to obtain a sequencing parameter of the resource to be sequenced for the resource type to which the resource belongs;
the resource ranking model is obtained by performing loop iteration training on the initial resource ranking model based on a training sample data set containing sample resources of various resource types.
13. An electronic device, comprising a processor and a memory, wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 10.
14. A computer-readable storage medium, characterized in that it comprises program code for causing an electronic device to perform the steps of the method of any of claims 1-10, when said storage medium is run on said electronic device.
15. A computer program product comprising computer instructions, characterized in that the computer instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.
CN202111226038.7A 2021-10-21 2021-10-21 Resource ordering method and device, electronic equipment and storage medium Pending CN114282094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111226038.7A CN114282094A (en) 2021-10-21 2021-10-21 Resource ordering method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111226038.7A CN114282094A (en) 2021-10-21 2021-10-21 Resource ordering method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114282094A true CN114282094A (en) 2022-04-05

Family

ID=80868712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111226038.7A Pending CN114282094A (en) 2021-10-21 2021-10-21 Resource ordering method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114282094A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024027162A1 (en) * 2022-08-03 2024-02-08 北京百度网讯科技有限公司 Target sorting model training method and apparatus, target sorting method and apparatus, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024027162A1 (en) * 2022-08-03 2024-02-08 北京百度网讯科技有限公司 Target sorting model training method and apparatus, target sorting method and apparatus, electronic device and storage medium

Similar Documents

Publication Publication Date Title
US20210012198A1 (en) Method for training deep neural network and apparatus
WO2021190451A1 (en) Method and apparatus for training image processing model
WO2020177673A1 (en) Video sequence selection method, computer device and storage medium
CN116720004B (en) Recommendation reason generation method, device, equipment and storage medium
CN113761153B (en) Picture-based question-answering processing method and device, readable medium and electronic equipment
CN111783903B (en) Text processing method, text model processing method and device and computer equipment
CN113704388A (en) Training method and device for multi-task pre-training model, electronic equipment and medium
CN114238690A (en) Video classification method, device and storage medium
CN114283316A (en) Image identification method and device, electronic equipment and storage medium
CN114707513A (en) Text semantic recognition method and device, electronic equipment and storage medium
CN113807399A (en) Neural network training method, neural network detection method and neural network detection device
CN115131638B (en) Training method, device, medium and equipment for visual text pre-training model
CN114036398B (en) Content recommendation and ranking model training method, device, equipment and storage medium
CN113010702A (en) Interactive processing method and device for multimedia information, electronic equipment and storage medium
WO2024002167A1 (en) Operation prediction method and related apparatus
WO2023185925A1 (en) Data processing method and related apparatus
US20240046067A1 (en) Data processing method and related device
CN115114395A (en) Content retrieval and model training method and device, electronic equipment and storage medium
US20220327835A1 (en) Video processing method and apparatus
CN114201516A (en) User portrait construction method, information recommendation method and related device
CN114282094A (en) Resource ordering method and device, electronic equipment and storage medium
WO2023231753A1 (en) Neural network training method, data processing method, and device
CN116628345A (en) Content recommendation method and device, electronic equipment and storage medium
CN115130461A (en) Text matching method and device, electronic equipment and storage medium
CN117540024B (en) Classification model training method and device, electronic equipment and storage medium

Legal Events

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