Feature processing method and apparatus, computing device, and medium
By introducing a second gating network and a feature extraction network for weighted processing, the problem of insufficient control over the flow of features across different dimensions in the feature vector of a deep learning model is solved, thereby improving the model's processing accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-11
- Publication Date
- 2026-03-17
AI Technical Summary
Existing deep learning network models cannot effectively control the flow of features in different dimensions within each feature vector, resulting in poor processing accuracy.
A second gating network is introduced. Feature parameters and features are obtained through multiple first gating networks and first feature extraction networks. The second gating network and the second feature extraction network are used for weighted processing to control the flow of features in different dimensions in the feature vector.
This improves the model's processing accuracy and enables precise control over features of different dimensions in the feature vector.
Smart Images

Figure CN114548425B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure relate to the field of deep learning, and more specifically, the embodiments of this disclosure relate to a feature processing method, apparatus, computing device, and medium. Background Technology
[0002] This section is intended to provide background or context for the embodiments of this disclosure as set forth in the claims. The description herein is not intended to be a prior art simply because it is included in this section.
[0003] Recommendation algorithms, which deeply understand user needs and provide targeted content recommendations, have been widely applied in content recommendation processes. Various types of deep learning network models can be used to implement recommendation algorithms, such as OneGate Mixture of Experts (OMoE), MultiGate Mixture of Experts (MMoE), and Progressive Layered Extraction (PLE). However, regardless of the type of deep learning network model, the core of the model is the feature extraction network (or expert network), and the knowledge selection of the feature extraction network determines the model's performance.
[0004] In related technologies, gating networks are mainly used to control the input and output of information, as well as the degree of information input and output, thereby controlling the flow of knowledge between feature extraction networks. For example, gating networks can be used to set different weights for the feature vectors output by different feature extraction networks, and then the weighted feature vectors can be summed to control the flow of knowledge between different feature extraction networks.
[0005] However, each feature vector can correspond to features in multiple dimensions, but the above implementation process cannot control the flow of features in different dimensions in each feature vector, resulting in poor processing accuracy of the model. Summary of the Invention
[0006] Given that related technologies cannot control the flow of features of different dimensions in each feature vector, resulting in poor model processing accuracy, the embodiments of this disclosure provide at least one feature processing method, apparatus, computing device, and medium.
[0007] In a first aspect of this disclosure, a feature processing method is provided, the method comprising:
[0008] Based on the feature information of the candidate object, multiple first feature parameters and multiple first features are obtained through multiple first gating networks and multiple first feature extraction networks respectively;
[0009] Based on multiple first feature parameters, multiple first features are weighted to obtain multiple first target features;
[0010] Based on multiple first target features, a set number of second feature parameters are obtained through multiple second gating networks. Based on feature information, multiple second features are obtained through multiple second feature extraction networks. The set number is determined based on the number of second feature extraction networks, the number of second gating networks, and the feature dimensions included in the second features.
[0011] Based on a set number of second feature parameters, the features of multiple dimensions included in the multiple second features are weighted to obtain multiple second target features.
[0012] In one embodiment of this disclosure, based on multiple first target features, a set number of second feature parameters are obtained through multiple second gating networks, including:
[0013] For any first target feature, the first target feature is input into the second gating network corresponding to the first target feature, and the first target feature is processed by the second gating network corresponding to the first target feature to obtain a second feature parameter that meets a first set number. The first set number is determined based on the number of second feature extraction networks and the feature dimensions included in the second feature.
[0014] The second feature parameters that meet the first set number include multiple sets of second feature parameters. The number of second feature parameters included in each set of second feature parameters is consistent with the number of feature dimensions included in the second feature. Each set of second feature parameters is used to perform weighted processing on the second feature output by a second feature extraction network.
[0015] In one embodiment of this disclosure, based on a predetermined number of second feature parameters, the features of multiple dimensions included in the multiple second features are weighted to obtain multiple second target features, including:
[0016] For any set of second feature parameters, the second feature output by the corresponding second feature extraction network is weighted using the second feature parameters to obtain the weighted features of multiple dimensions.
[0017] Based on the weighted features across multiple dimensions, the second target feature is determined.
[0018] In one embodiment of this disclosure, the second target feature is used to predict the recommendation score of the candidate object.
[0019] In one embodiment of this disclosure, after weighting the features of multiple dimensions included in multiple second features based on a predetermined number of second feature parameters to obtain multiple second target features, the method further includes:
[0020] For multiple sets of second feature parameters obtained through the same second gating network, the summation of multiple second target features obtained based on the processing of multiple sets of second feature parameters is performed to obtain the third feature.
[0021] Based on the third feature, the recommendation score of the candidate object under the prediction target corresponding to the task network is obtained through the task network corresponding to the second gating network.
[0022] In one embodiment of this disclosure, a second gating network corresponds to a plurality of first gating networks and a plurality of first feature extraction networks, wherein the number of first gating networks corresponding to each second gating network is the same as the number of first feature extraction networks;
[0023] Based on the feature information of the candidate objects, multiple first feature parameters are obtained through multiple first gating networks, including:
[0024] The feature information is input into the first gating network corresponding to each second gating network, and multiple first feature parameters corresponding to each second gating network are output through the first gating network corresponding to each second gating network.
[0025] Wherein, for any second gating network, the number of first feature parameters corresponding to the second gating network is the same as the number of first feature extraction networks corresponding to the second gating network.
[0026] In a second aspect of this disclosure, a feature processing apparatus is provided, the apparatus comprising:
[0027] The first acquisition module is used to acquire multiple first feature parameters and multiple first features based on the feature information of the candidate object by passing through multiple first gating networks and multiple first feature extraction networks respectively.
[0028] The first processing module is used to perform weighted processing on multiple first features based on multiple first feature parameters to obtain multiple first target features;
[0029] The second acquisition module is used to acquire a set number of second feature parameters based on multiple first target features and through multiple second gating networks, and to acquire multiple second features based on feature information and through multiple second feature extraction networks. The set number is determined based on the number of second feature extraction networks, the number of second gating networks, and the feature dimensions included in the second features.
[0030] The second processing module is used to perform weighted processing on the features of multiple dimensions included in the multiple second features based on a set number of second feature parameters, so as to obtain multiple second target features.
[0031] In one embodiment of this disclosure, the second acquisition module, when used to acquire a set number of second feature parameters based on multiple first target features through multiple second gating networks, is configured to:
[0032] For any first target feature, the first target feature is input into the second gating network corresponding to the first target feature, and the first target feature is processed by the second gating network corresponding to the first target feature to obtain a second feature parameter that meets a first set number. The first set number is determined based on the number of second feature extraction networks and the feature dimensions included in the second feature.
[0033] The second feature parameters that meet the first set number include multiple sets of second feature parameters. The number of second feature parameters included in each set of second feature parameters is consistent with the number of feature dimensions included in the second feature. Each set of second feature parameters is used to perform weighted processing on the second feature output by a second feature extraction network.
[0034] In one embodiment of this disclosure, the second processing module, when performing weighted processing on the features of multiple dimensions included in multiple second features based on a set number of second feature parameters to obtain multiple second target features, is configured to:
[0035] For any set of second feature parameters, the second feature output by the corresponding second feature extraction network is weighted using the second feature parameters to obtain the weighted features of multiple dimensions.
[0036] Based on the weighted features across multiple dimensions, the second target feature is determined.
[0037] In one embodiment of this disclosure, the second target feature is used to predict the recommendation score of the candidate object.
[0038] In one embodiment of this disclosure, the device further includes:
[0039] The third processing module is used to sum up multiple second target features obtained from multiple sets of second feature parameters obtained through the same second gating network to obtain a third feature.
[0040] The scoring module is used to obtain the recommendation score of the candidate object under the prediction target corresponding to the task network through the task network corresponding to the second gating network, based on the third feature.
[0041] In one embodiment of this disclosure, a second gating network corresponds to a plurality of first gating networks and a plurality of first feature extraction networks, wherein the number of first gating networks corresponding to each second gating network is the same as the number of first feature extraction networks;
[0042] The first acquisition module, when used to acquire multiple first feature parameters based on the feature information of candidate objects through multiple first gating networks, is used for:
[0043] The feature information is input into the first gating network corresponding to each second gating network, and multiple first feature parameters corresponding to each second gating network are output through the first gating network corresponding to each second gating network.
[0044] Wherein, for any second gating network, the number of first feature parameters corresponding to the second gating network is the same as the number of first feature extraction networks corresponding to the second gating network.
[0045] In a third aspect of the present disclosure, a computing device is provided, the computing device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to perform the operations performed by the feature processing method provided in the first aspect and any embodiment of the first aspect.
[0046] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a program is stored, the program being executed by a processor of the operation performed by the feature processing method provided in the first aspect and any embodiment of the first aspect.
[0047] In a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, performs the operations performed by the feature processing method provided in the first aspect and any embodiment of the first aspect.
[0048] This disclosure introduces a second gating network to obtain multiple first feature parameters and multiple first features based on the feature information of candidate objects through multiple first gating networks and multiple first feature extraction networks. Based on the multiple first feature parameters, the multiple first features are weighted to obtain multiple first target features. Then, based on the multiple first target features, multiple second gating networks are used to obtain a set number of second feature parameters. Based on the feature information, multiple second feature extraction networks are used to obtain multiple second features. Thus, based on a set number of second feature parameters, the features of multiple dimensions included in the multiple second features are weighted to obtain multiple second target features. This achieves control over the flow of features of different dimensions in each feature vector, thereby improving the processing accuracy of the model. Attached Figure Description
[0049] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which:
[0050] Figure 1 This is a flowchart illustrating a feature processing method according to an exemplary embodiment of the present disclosure;
[0051] Figure 2 This is a schematic diagram illustrating the structure of a recommendation model according to an exemplary embodiment of the present disclosure;
[0052] Figure 3 This is a block diagram illustrating a feature processing apparatus according to an exemplary embodiment of the present disclosure;
[0053] Figure 4 This is a schematic diagram illustrating a computer-readable storage medium according to an exemplary embodiment of the present disclosure;
[0054] Figure 5 This is a schematic diagram of the structure of a computing device according to an exemplary embodiment of the present disclosure;
[0055] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation
[0056] The principles and spirit of this disclosure will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0057] Those skilled in the art will recognize that embodiments of this disclosure can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0058] According to embodiments of this disclosure, a feature processing method, apparatus, computing device, and medium are proposed. The method can be executed by a computing device to process feature information input to a recommendation model. The computing device can be a server, such as a single server, multiple servers, a server cluster, a cloud computing platform, etc. This disclosure does not limit the type or number of computing devices.
[0059] This recommendation model can be used for content item recommendation (such as news recommendation, advertisement recommendation, novel recommendation, etc.), multimedia data recommendation (such as audio recommendation, video recommendation, etc.), product recommendation, etc. This disclosure does not limit the specific application scenarios of the recommendation model.
[0060] The following section, in conjunction with the above descriptions of application scenarios, provides further information. Figure 1 This description outlines a feature processing method provided according to exemplary embodiments of the present disclosure. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in any way. Rather, the embodiments of the present disclosure can be applied to any applicable scenario.
[0061] See Figure 1 , Figure 1 This is a flowchart illustrating a feature processing method according to an exemplary embodiment of the present disclosure, the method comprising:
[0062] S101. Based on the feature information of the candidate object, multiple first feature parameters and multiple first features are obtained through multiple first gating networks and multiple first feature extraction networks respectively.
[0063] Candidate objects can be content items, multimedia data, commodities, etc., and the feature information of candidate objects can be obtained based on the data features of candidate objects.
[0064] S102. Based on multiple first feature parameters, perform weighted processing on multiple first features to obtain multiple first target features.
[0065] S103. Based on multiple first target features, obtain a set number of second feature parameters through multiple second gating networks. Based on feature information, obtain multiple second features through multiple second feature extraction networks. The set number is determined based on the number of second feature extraction networks, the number of second gating networks, and the feature dimensions included in the second features.
[0066] Optionally, the first feature parameter and the second feature parameter involved in the above steps can both be weight parameters.
[0067] S104. Based on the set number of second feature parameters, perform weighted processing on the features of multiple dimensions included in the multiple second features to obtain multiple second target features.
[0068] This disclosure introduces a second gating network to obtain multiple first feature parameters and multiple first features based on the feature information of candidate objects, through multiple first gating networks and multiple first feature extraction networks respectively. After weighting the multiple first features based on the multiple first feature parameters to obtain multiple first target features, multiple second feature parameters that meet a set number can be obtained based on the multiple first target features through multiple second gating networks. Based on the feature information, multiple second feature extraction networks are used to obtain multiple second features. Thus, based on the set number of second feature parameters, the features of multiple dimensions included in the multiple second features are weighted to obtain multiple second target features. This realizes the control of the flow of features of different dimensions in each feature vector, thereby improving the processing accuracy of the model.
[0069] After introducing the basic principles of this disclosure, various non-limiting embodiments of this disclosure will be described in detail below.
[0070] It should be noted that the above feature processing methods can be applied to recommendation models, which can be MMoE models. Optionally, recommendation models can also be other types of deep learning network models. This disclosure does not limit the specific network type of the recommendation model.
[0071] The recommendation model can predict the recommendation score of a candidate object based on its feature information. Therefore, before S101, the method may further include:
[0072] S100, Obtain the feature information of the candidate object.
[0073] In one possible implementation, the feature information of the candidate object can be obtained in the following way, that is, S100 can include the following steps:
[0074] S1001. Based on the data corresponding to the candidate object, obtain multiple data features of the candidate object.
[0075] The data corresponding to the candidate object may include user data of the target user as the recommendation target, object data of the candidate object as the object to be recommended, and scene data. Optionally, the data corresponding to the candidate object may also include other types of data. This disclosure does not limit the specific content included in the data corresponding to the candidate object.
[0076] It should be noted that the target user's user data may include the target user's identity (ID), target user's user behavior information, etc. The user identity may be pre-assigned to each user, with each user having a unique identity, thus serving as a unique identifier for the user. The target user's user behavior information can be used to indicate the target user's behavioral preferences. This information can be determined based on the target user's historical interactions; for example, it could be based on the target user's historical video viewing history, or on the products the target user has purchased, and so on.
[0077] The object data of a candidate object can include its object identifier (ID) and attribute information. The object identifier can be pre-assigned to each candidate object, ensuring uniqueness for each object. The attribute information can include historical interaction data and the object's own attributes. For example, if the candidate object is a video, historical interaction data could include the number of historical clicks, viewing duration, playback progress, number of likes, number of comments, etc. The object's own attributes could include video duration, publisher, video type (e.g., suspense video, science video, comedy video), etc.
[0078] Context data may include the time when the target user requests object recommendations. Optionally, context data may also include other types of data. This disclosure does not limit the specific data types included in context data.
[0079] In one possible implementation, after obtaining the data corresponding to the candidate object, the target user features can be obtained based on the user data of the target user, the candidate object features can be obtained based on the object data of the candidate object, and the scene features can be obtained based on the scene data. Thus, the obtained target user features, candidate object features, and scene features are used as multiple data features of the candidate object.
[0080] S1002. Concatenate multiple data features corresponding to the candidate object to obtain the feature information of the candidate object.
[0081] In one possible implementation, multiple data features corresponding to the candidate object, namely the target user features, candidate object features, and scene features, can be concatenated to form a vector, which can then be used as the feature information (or input features) of the candidate object.
[0082] After obtaining the feature information of the candidate object through the above process, the feature processing method provided in this disclosure can be used to process the obtained feature information.
[0083] In one possible implementation, when processing the acquired feature information using the feature processing method provided in this disclosure, a recommendation model can be used to process the feature information in order to obtain the recommendation score of the candidate object.
[0084] Taking the MMoE model as an example, the recommendation model can include multiple first gating networks, multiple first feature extraction networks, multiple second gating networks, multiple second feature extraction networks, and multiple task networks.
[0085] In this system, one task network corresponds to one second gating network, one second gating network corresponds to one second feature extraction network, and one second gating network can correspond to multiple first gating networks and multiple first feature extraction networks. The number of first gating networks corresponding to each second gating network is the same as the number of first feature extraction networks, and one first gating network corresponds to one first feature extraction network.
[0086] See Figure 2 , Figure 2 This is a schematic diagram illustrating the structure of a recommendation model according to an exemplary embodiment of the present disclosure, such as... Figure 2 As shown, the recommendation model may include two task networks (i.e., task network A and task network B), two second gating networks (i.e., gating network A and gating network B), and two second feature extraction networks (i.e., expert network 1 and expert network 2). Each second gating network may correspond to two first gating networks and two first feature extraction networks. Taking the first gating network and first feature extraction network corresponding to gating network A as an example, gating network A may correspond to two first gating networks (i.e., gating network 1 and gating network 2) and two first feature extraction networks (i.e., expert network 1' and expert network 2'), where gating network 1 corresponds to expert network 1' and gating network 2 corresponds to expert network 2'.
[0087] It should be noted that, Figure 2 The structure shown is merely an exemplary structure of the recommendation model and does not constitute a limitation on the structure of the recommendation model. In many possible implementations, the recommendation model can also have other structures. This disclosure does not limit the specific structure of the recommendation model.
[0088] In some embodiments, for S101, when obtaining multiple first features based on the feature information of the candidate object through multiple first feature extraction networks, it can be implemented in the following way:
[0089] The feature information is input into the first feature extraction network corresponding to each first gating network. The first feature of each first gating network is output through the first feature extraction network corresponding to each first gating network, thereby obtaining multiple first features corresponding to multiple first gating networks.
[0090] Each of the first feature extraction networks can include one or more hidden layers. Therefore, when obtaining the first feature through the first feature extraction network, the feature information of the candidate object can be processed through the hidden layers included in each first feature extraction network to obtain the first feature corresponding to each first feature extraction network.
[0091] Still with Figure 2 Taking the recommendation model shown as an example, a first feature can be obtained by expert network 1' and expert network 2', which serve as the first feature extraction network.
[0092] Furthermore, when obtaining multiple first feature parameters based on the feature information of candidate objects through multiple first gating networks, this can be achieved in the following way:
[0093] The feature information is input into the first gating network corresponding to each second gating network, and multiple first feature parameters corresponding to each second gating network are output through the first gating network corresponding to each second gating network.
[0094] Each first gating network may include one or more hidden layers. Therefore, when obtaining the first feature parameters through the first gating network, the feature information of the candidate object can be processed through the hidden layers included in each first gating network to obtain the first feature parameters corresponding to each first gating network. For example, the output of the first gating network can be expressed mathematically by the following formula (1):
[0095] g′ k (x)=Softmax(W gk x) (1)
[0096] Among them, g′ k (x) represents the k-th first feature parameter output by the first gating network, Softmax represents the normalization exponential function, and W gk x represents the k-th dimension of the feature information input to the first gating network.
[0097] For any second gating network, the number of first feature parameters corresponding to the second gating network is the same as the number of first feature extraction networks corresponding to the second gating network, or in other words, the number of first feature parameters corresponding to the second gating network is the same as the number of first expert networks corresponding to the second gating network.
[0098] Through the above process, multiple first feature parameters and multiple first features can be obtained, and thus, through S102, multiple first target features can be obtained based on the multiple first feature parameters and multiple first features.
[0099] In some embodiments, when S102 is performed by weighting multiple first features based on multiple first feature parameters to obtain multiple first target features, it can be achieved in the following way:
[0100] Based on multiple first feature parameters, multiple first features are weighted and summed to obtain multiple first target features.
[0101] It should be noted that one first gating network corresponds to one first feature extraction network. Based on this, the first feature parameters output by each first gating network can be used to process the first feature output by the corresponding first feature extraction network. Each second gating network can correspond to multiple first gating networks. For any second gating network, the corresponding first feature can be processed by multiple first gating networks corresponding to the second gating network to obtain a first target feature for input to the second gating network.
[0102] In other words, when performing a weighted summation of multiple first features based on multiple first feature parameters, for any second gating network, the first features can be weighted according to the first feature parameters output by the first gating network corresponding to the second gating network, thereby obtaining multiple weighted features. Then, the weighted features are summed to obtain the first target feature corresponding to the first gating network. The process of obtaining the first target features corresponding to other first gating networks is the same as the above process. Through the above process, the first target features corresponding to each first gating network can be obtained, thereby obtaining multiple first target features.
[0103] Still with Figure 2 Taking the recommendation model shown as an example, the process of S102 obtaining multiple first target features by weighted summation of multiple first feature parameters is explained. Gated network 1 corresponds to expert network 1', and gated network 2 corresponds to expert network 2'. Therefore, the first feature parameters output by gated network 1 are used to weight the first features output by expert network 1', and the first feature parameters output by gated network 2 are used to weight the first features output by expert network 2'. Thus, the two weighted results can be summed to obtain the first target feature corresponding to gated network A. The processing of the first target feature corresponding to gated network B is similar and will not be repeated here.
[0104] In some embodiments, when obtaining multiple second features based on feature information through multiple second feature extraction networks in S103, it can be achieved in the following way:
[0105] The feature information is input into each second feature extraction network, and each second feature extraction network outputs a second feature, thus obtaining multiple second features output by multiple second feature extraction networks.
[0106] Each second feature extraction network can include one or more hidden layers. Therefore, when obtaining the second feature through the second feature extraction network, the feature information of the candidate object can be processed through the hidden layers included in each second feature extraction network to obtain the second feature corresponding to each second feature extraction network.
[0107] Still with Figure 2 Taking the recommendation model shown as an example, a second feature can be obtained by expert network 1 and expert network 2, which serve as the second feature extraction network.
[0108] It should be noted that since the first gating network, the first feature extraction network, and the second feature extraction network all process the feature information of the candidate object to obtain the corresponding processing results, in one possible implementation, the feature information of the candidate object can be simultaneously input into multiple first gating networks, multiple first feature extraction networks, and multiple second feature extraction networks, so that multiple first feature parameters, multiple first features, and multiple second features are output through multiple first gating networks, multiple first feature extraction networks, and multiple second feature extraction networks respectively. For specific processing procedures, please refer to the above embodiments, which will not be repeated here.
[0109] Furthermore, for S103, when obtaining a set number of second feature parameters based on multiple first target features through multiple second gating networks, it can be achieved in the following way:
[0110] For any first target feature, the first target feature is input into the second gating network corresponding to the first target feature, and the first target feature is processed by the second gating network corresponding to the first target feature to obtain a second feature parameter that meets the first set number.
[0111] Each second gating network may include one or more hidden layers. Therefore, when obtaining a first set number of second feature parameters through the second gating network, the input first target feature can be processed through the hidden layers included in each second gating network to obtain the second feature parameters corresponding to the first set number of second gating networks. For example, the output of the second gating network can be expressed mathematically using the following formula (2):
[0112]
[0113] Among them, g k (x) represents the k-th second feature parameter output by the second gating network, g′ k (x) i f represents the k-th first feature parameter output by the i-th first gating network. i ′(x) represents the first feature output by the i-th first feature extraction network.
[0114] It should be noted that the first set quantity is determined based on the number of second feature extraction networks and the feature dimensions included in the second feature. For example, the first set quantity is the product of the number of second feature extraction networks and the feature dimensions included in the second feature. Figure 2 Taking the recommendation model shown as an example, such as Figure 2 The recommendation model shown includes two second feature extraction networks. Each second feature includes three dimensions of features, so the first set number can be 6. That is, each second gating network (including gating network A and gating network B) can output 6 second feature parameters.
[0115] Furthermore, multiple second gating networks can output a set number of second feature parameters. This set number is determined based on the number of second feature extraction networks, the number of second gating networks, and the feature dimensions included in the second feature. For example, the set number can be the product of the number of second feature extraction networks, the number of second gating networks, and the feature dimensions included in the second feature. (Continuing with...) Figure 2 Taking the recommendation model shown as an example, such as Figure 2 In the recommendation model shown, each second gating network can output 6 second feature parameters, while... Figure 2 The recommended model shown includes two second gating networks (i.e., gating network A and gating network B), with a set number of 12, that is, as follows. Figure 2 The recommendation model shown includes two second gating networks that can output a total of 12 second feature parameters.
[0116] Furthermore, it should be noted that the second feature parameters conforming to the first predetermined number can include multiple sets of second feature parameters. The number of second feature parameters included in each set is consistent with the number of feature dimensions included in the second feature. Each set of second feature parameters is used to perform weighted processing on the second feature output by a second feature extraction network. (Still using...) Figure 2Taking the recommendation model shown as an example, the six second feature parameters output by the gate network A, which is the second gate network, can be divided into two groups. Each group of second feature parameters includes three second feature parameters. One group of second feature parameters is used to process the second feature output by the expert network 1, which is the second feature extraction network, and the other group of second feature parameters is used to process the second feature output by the expert network 2, which is the second feature extraction network.
[0117] Through the above process, multiple second feature parameters can be obtained to process the multi-dimensional features output by each second feature extraction network, so as to perform more refined weighting processing on the second features output by the second feature extraction network, thereby accurately controlling the knowledge flow of each second feature extraction network.
[0118] Additionally, it should be noted that the second gating network, as a newly introduced gating network in the recommendation model, can adopt the Mixture of Experts (MoE) method. By using the MoE method, the large matrix processing process can be transformed into the process of processing multiple small matrices, thereby effectively reducing the computational load of the model.
[0119] In some embodiments, when performing weighted processing on the features of multiple dimensions included in multiple second features based on a predetermined number of second feature parameters to obtain multiple second target features, the following steps may be included:
[0120] S1041. For any set of second feature parameters, the second feature output by the corresponding second feature extraction network is weighted using the second feature parameters to obtain the weighted features of multiple dimensions.
[0121] Still with Figure 2Taking the recommendation model shown as an example, for gate network A, which acts as the second gate network, it can output two sets of second feature parameters. Each set of second feature parameters includes three second feature parameters. For the set of second feature parameters used to process the second features output by expert network 1, which acts as the second feature extraction network, the three second feature parameters in this set can be used to weight the three dimensions of the second features output by expert network 1, resulting in the weighted three-dimensional features corresponding to expert network 1. Similarly, for the other set of second feature parameters used to process the second features output by expert network 2, which acts as the second feature extraction network, the three second feature parameters in this set can be used to weight the three dimensions of the second features output by expert network 2, resulting in the weighted three-dimensional features corresponding to expert network 2. It should be noted that the processing of gate network B is similar. Through the two sets of second feature parameters output by gate network B, the weighted three-dimensional features corresponding to expert network 1 and expert network 2 can also be obtained.
[0122] S1042. Based on the weighted features of multiple dimensions, determine the second target features.
[0123] In one possible implementation, the weighted features from multiple dimensions can be concatenated to obtain the second target feature. It should be noted that the second target feature can be used to predict the recommendation score of candidate objects.
[0124] Still with Figure 2 Taking the recommendation model shown as an example, for the set of second feature parameters output by gating network A used to process the second feature output by expert network 1, the weighted three-dimensional features corresponding to this set of second feature parameters have been obtained through S1041. Therefore, the weighted three-dimensional features can be concatenated through S1042 to obtain a second target feature. Similarly, for the set of second feature parameters output by gating network A used to process the second feature output by expert network 2, the weighted three-dimensional features corresponding to this set of second feature parameters have been obtained through S1041. Therefore, the weighted three-dimensional features can be concatenated through S1042 to obtain another second target feature. These two second target features corresponding to gating network A can be used to predict the recommendation score of a candidate object under one prediction target. Likewise, two second target features corresponding to gating network B can also be obtained, and these two second target features corresponding to gating network B can be used to predict the recommendation score of a candidate object under another prediction target.
[0125] In some embodiments, predicting the recommendation score of a candidate object based on the second target feature can be achieved through the following steps; that is, after S104, the method may further include the following steps:
[0126] S105. For multiple sets of second feature parameters obtained through the same second gating network, sum the multiple second target features obtained based on the processing of multiple sets of second feature parameters to obtain the third feature. For example, the obtained third feature can be expressed mathematically using the following formula (3):
[0127]
[0128] Among them, f k (x) represents the k-th third feature, g k (x) i f represents the second feature parameter output by the i-th second gating network, used to process the k-th second feature. i (x) represents the second feature output by the i-th second feature extraction network, and ⊙ represents corresponding multiplication.
[0129] Still with Figure 2 Taking the recommendation model shown as an example, the two sets of second feature parameters obtained through the gate network A, which acts as the second gate network, can be weighted to obtain two second target features. The sum of these two second target features yields the third feature to be input into the task network A. Similarly, the two sets of second feature parameters obtained through the gate network B, which also acts as the second gate network, can be weighted to obtain two second target features. The sum of these two second target features yields the third feature to be input into the task network B.
[0130] S106. Based on the third feature, the recommendation score of the candidate object under the prediction target corresponding to the task network is obtained through the task network corresponding to the second gating network.
[0131] It should be noted that the prediction target can be used to indicate the target user's interaction with the candidate object. For example, the prediction target could be whether the user has finished reading the content item, whether the user has clicked on the content item, whether the user has purchased the product, whether the user has clicked on multimedia data, etc. This disclosure does not limit the specific type of prediction target. A recommendation model can be used to predict the recommendation score of a candidate object under multiple prediction targets, wherein the number of prediction targets is consistent with the number of task networks.
[0132] Each task network can include one or more hidden layers. Therefore, when obtaining the recommendation score under the corresponding prediction target through the task network, the input third feature can be processed through the hidden layers included in each task network to obtain the recommendation score of the candidate object under the prediction target corresponding to each task network. For example, the recommendation score under each prediction target can be expressed mathematically by the following formula (4):
[0133] y k =h k (f k (x)) (4)
[0134] Among them, y k f represents the recommendation score output by the network for the k-th task. k (x) represents the k-th third feature, h k This represents the processing functions within the task network.
[0135] Still with Figure 2 Taking the recommendation model shown as an example, the hidden layer included in task network A can be used to process the third feature obtained by gating network A to obtain the recommendation score of the candidate object under the prediction target A. Similarly, the hidden layer included in task network B can be used to process the third feature obtained by gating network B to obtain the recommendation score of the candidate object under the prediction target B.
[0136] Optionally, after determining the recommendation scores of candidate objects under multiple prediction targets, the multiple recommendation scores can be weighted and summed, or the multiple recommendation scores can be averaged to obtain the final recommendation score of the candidate object, so that subsequent candidate object recommendations can be made to the target user based on the final recommendation scores of each candidate object.
[0137] After introducing the feature processing method of the exemplary embodiments of this disclosure, the structure of the feature processing apparatus and the computing device for implementing the feature processing method of the exemplary embodiments of this disclosure will be described next.
[0138] See Figure 3 , Figure 3 This is a block diagram illustrating a feature processing apparatus according to an exemplary embodiment of the present disclosure, the apparatus comprising:
[0139] The first acquisition module 301 is used to acquire multiple first feature parameters and multiple first features based on the feature information of the candidate object, respectively through multiple first gating networks and multiple first feature extraction networks;
[0140] The first processing module 302 is used to perform weighted processing on multiple first features based on multiple first feature parameters to obtain multiple first target features;
[0141] The second acquisition module 303 is used to acquire a set number of second feature parameters based on multiple first target features and through multiple second gating networks, and to acquire multiple second features based on feature information and through multiple second feature extraction networks. The set number is determined based on the number of second feature extraction networks, the number of second gating networks, and the feature dimensions included in the second features.
[0142] The second processing module 304 is used to perform weighted processing on the features of multiple dimensions included in the multiple second features based on a set number of second feature parameters, so as to obtain multiple second target features.
[0143] In one embodiment of this disclosure, the second acquisition module 303, when used to acquire a set number of second feature parameters based on multiple first target features through multiple second gating networks, is configured to:
[0144] For any first target feature, the first target feature is input into the second gating network corresponding to the first target feature, and the first target feature is processed by the second gating network corresponding to the first target feature to obtain a second feature parameter that meets a first set number. The first set number is determined based on the number of second feature extraction networks and the feature dimensions included in the second feature.
[0145] The second feature parameters that meet the first set number include multiple sets of second feature parameters. The number of second feature parameters included in each set of second feature parameters is consistent with the number of feature dimensions included in the second feature. Each set of second feature parameters is used to perform weighted processing on the second feature output by a second feature extraction network.
[0146] In one embodiment of this disclosure, the second processing module 304, when performing weighted processing on the features of multiple dimensions included in multiple second features based on a set number of second feature parameters to obtain multiple second target features, is configured to:
[0147] For any set of second feature parameters, the second feature output by the corresponding second feature extraction network is weighted using the second feature parameters to obtain the weighted features of multiple dimensions.
[0148] Based on the weighted features across multiple dimensions, the second target feature is determined.
[0149] In one embodiment of this disclosure, the second target feature is used to predict the recommendation score of the candidate object.
[0150] In one embodiment of this disclosure, the device further includes:
[0151] The third processing module is used to sum up multiple second target features obtained from multiple sets of second feature parameters obtained through the same second gating network to obtain a third feature.
[0152] The scoring module is used to obtain the recommendation score of the candidate object under the prediction target corresponding to the task network through the task network corresponding to the second gating network, based on the third feature.
[0153] In one embodiment of this disclosure, a second gating network corresponds to a plurality of first gating networks and a plurality of first feature extraction networks, wherein the number of first gating networks corresponding to each second gating network is the same as the number of first feature extraction networks;
[0154] The first acquisition module 301, when acquiring multiple first feature parameters based on the feature information of candidate objects through multiple first gating networks, is used for:
[0155] The feature information is input into the first gating network corresponding to each second gating network, and multiple first feature parameters corresponding to each second gating network are output through the first gating network corresponding to each second gating network.
[0156] Wherein, for any second gating network, the number of first feature parameters corresponding to the second gating network is the same as the number of first feature extraction networks corresponding to the second gating network.
[0157] It should be noted that, for the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. That is, the specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0158] It should be noted that although several modules of the feature processing apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0159] This disclosure also provides a computer-readable storage medium. Figure 4 This is a schematic diagram illustrating a computer-readable storage medium according to an exemplary embodiment of the present disclosure, such as... Figure 4 As shown, the storage medium stores a computer program 401, which, when executed by a processor, can perform the feature processing method provided in any embodiment of this disclosure.
[0160] This disclosure also provides a computing device, which may include a memory and a processor. The memory stores computer instructions that can run on the processor, and the processor, when executing the computer instructions, implements the feature processing method provided in any embodiment of this disclosure. See also Figure 5 , Figure 5 This disclosure is a schematic diagram of the structure of a computing device according to an exemplary embodiment. The computing device 500 may include, but is not limited to, a processor 510, a memory 520, and a bus 530 connecting different system components (including the memory 520 and the processor 510).
[0161] The memory 520 stores computer instructions that can be executed by the processor 510, enabling the processor 510 to perform the feature processing method provided in any embodiment of this disclosure. The memory 520 may include a random access memory (RAM) 521, a cache memory 522, and / or a read-only memory (ROM) 523. The memory 520 may also include a program tool 525 having a set of program modules 524, including but not limited to: an operating system, one or more application programs, other program modules, and program data. One or more combinations of these program modules may include an implementation of a network environment.
[0162] Bus 530 may include, for example, a data bus, an address bus, and a control bus. The computing device 500 can also communicate with external devices 550 via I / O interface 540, such as a keyboard or a Bluetooth device. The computing device 500 can also communicate with one or more networks via network adapter 560, such as a local area network (LAN), a wide area network (WAN), or a public network. Figure 5 As shown, the network adapter 560 can also communicate with other modules of the computing device 500 via the bus 530.
[0163] This disclosure also provides a computer program product, which includes a computer program. When the program is executed by the processor 510 of the computing device 500, it can implement the feature processing method provided in any embodiment of this disclosure.
[0164] Furthermore, although the operations of the methods disclosed herein are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0165] While the spirit and principles of this disclosure have been described with reference to several specific embodiments, it should be understood that this disclosure is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for convenience of expression. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A feature processing method characterized by, The method comprises: Based on the feature information of the candidate object, a plurality of first feature parameters and a plurality of first features are obtained through a plurality of first gating networks and a plurality of first feature extraction networks respectively, the feature information of the candidate object is obtained by splicing a plurality of data features of the candidate object, the plurality of data features of the candidate object are obtained based on user data of a target user as a recommendation target, object data of a candidate object as an object to be recommended, and scene data, the user data of the target user comprises a user identifier of the target user and user behavior information of the target user, the object data of the candidate object comprises an object identifier of the candidate object, historical interaction operation data of the candidate object, and attributes of the candidate object itself, and the scene data comprises a time when the target user requests object recommendation; Based on the plurality of first feature parameters, the plurality of first features are weighted processed to obtain a plurality of first target features; Based on the plurality of first target features, a plurality of second feature parameters meeting a set number are obtained through a plurality of second gating networks, and a plurality of second features are obtained through a plurality of second feature extraction networks based on the feature information, the set number is determined based on the number of the second feature extraction networks, the number of the second gating networks, and feature dimensions included in the second features; Based on the plurality of second feature parameters meeting the set number, a plurality of dimensions of features included in the plurality of second features are weighted processed to obtain a plurality of second target features, and the second target features are used to predict a recommendation score of the candidate object; Wherein, one second gating network corresponds to a plurality of first gating networks and a plurality of first feature extraction networks, the number of the first gating networks corresponding to each second gating network is consistent with the number of the first feature extraction networks; Based on the feature information of the candidate object, a plurality of first feature parameters are obtained through a plurality of first gating networks, comprising: The feature information is input into the first gating network corresponding to each second gating network respectively, and a plurality of first feature parameters corresponding to each second gating network are output through the first gating network corresponding to each second gating network respectively; Wherein, for any second gating network, the number of the first feature parameters corresponding to the second gating network is consistent with the number of the first feature extraction networks corresponding to the second gating network.
2. The method of claim 1, wherein, The method comprises: For any first target feature, the first target feature is input into the second gating network corresponding to the first target feature, the first target feature is processed through the second gating network corresponding to the first target feature to obtain a second feature parameter meeting a first set number, and the first set number is determined based on the number of the second feature extraction networks and the feature dimensions included in the second features. The second feature parameters meeting the first set number include multiple groups of second feature parameters, a number of second feature parameters included in each group of second feature parameters is consistent with a number of feature dimensions included in the second feature, and each group of second feature parameters is used for performing weighted processing on the second feature output by one second feature extraction network.
3. The method of claim 2, wherein, The method further includes: For any group of second feature parameters, the multiple dimensions of features included in the second feature output by the corresponding second feature extraction network are weighted processed based on the second feature parameters to obtain the multiple dimensions of weighted features; The second target features are determined based on the multiple dimensions of weighted features.
4. The method of claim 1, wherein, After the multiple second target features are obtained by weighting processing the multiple dimensions of features included in the multiple second features based on the second feature parameters meeting the set number, the method further includes: For the multiple groups of second feature parameters obtained by the same second gating network, the multiple second target features processed based on the multiple groups of second feature parameters are summed to obtain third features; The recommendation score of the candidate object under the prediction target corresponding to the task network of the second gating network is obtained based on the third features.
5. A feature processing apparatus characterized by comprising: The apparatus includes: The first obtaining module is configured to obtain multiple first feature parameters and multiple first features by multiple first gating networks and multiple first feature extraction networks respectively based on feature information of a candidate object, the feature information of the candidate object being obtained by splicing multiple data features of the candidate object, the multiple data features of the candidate object being obtained based on user data of a target user as a recommendation target, object data of the candidate object as a candidate object to be recommended, and scene data, the user data of the target user including a user identifier of the target user and user behavior information of the target user, the object data of the candidate object including an object identifier of the candidate object, historical interaction operation data of the candidate object, and attributes of the candidate object itself, and the scene data including a time at which the target user requests object recommendation; The first processing module is configured to obtain multiple first target features by weighting processing the multiple first features based on the multiple first feature parameters; The second obtaining module is configured to obtain second feature parameters meeting a set number by multiple second gating networks based on the multiple first target features, and obtain multiple second features by multiple second feature extraction networks based on the feature information, the set number being determined based on a number of the second feature extraction networks, a number of the second gating networks, and feature dimensions included in the second features; The second processing module is configured to obtain multiple second target features by weighting processing multiple dimensions of features included in the multiple second features based on the second feature parameters meeting the set number, the second target features being used for predicting a recommendation score of the candidate object. The apparatus includes: The first obtaining module is configured to obtain multiple first feature parameters and multiple first features by multiple first gating networks and multiple first feature extraction networks respectively based on feature information of a candidate object, the feature information of the candidate object being obtained by splicing multiple data features of the candidate object, the multiple data features of the candidate object being obtained based on user data of a target user as a recommendation target, object data of the candidate object as a candidate object to be recommended, and scene data, the user data of the target user including a user identifier of the target user and user behavior information of the target user, the object data of the candidate object including an object identifier of the candidate object, historical interaction operation data of the candidate object, and attributes of the candidate object itself, and the scene data including a time at which the target user requests object recommendation; The first processing module is configured to obtain multiple first target features by weighting processing the multiple first features based on the multiple first feature parameters; The second obtaining module is configured to obtain second feature parameters meeting a set number by multiple second gating networks based on the multiple first target features, and obtain multiple second features by multiple second feature extraction networks based on the feature information, the set number being determined based on a number of the second feature extraction networks, a number of the second gating networks, and feature dimensions included in the second features; The second processing module is configured to obtain multiple second target features by weighting processing multiple dimensions of features included in the multiple second features based on the second feature parameters meeting the set number, the second target features being used for predicting a recommendation score of the candidate object. The second gating network corresponds to the first gating network and the first feature extraction network, and the number of the first gating network corresponding to each second gating network is consistent with the number of the first feature extraction network; The first acquisition module is configured to: input the feature information into the first gating network corresponding to each second gating network, and output a plurality of first feature parameters corresponding to each second gating network through the first gating network corresponding to each second gating network; For any second gating network, the number of the first feature parameters corresponding to the second gating network is consistent with the number of the first feature extraction network corresponding to the second gating network.
6. The apparatus of claim 5, wherein, The second acquisition module is configured to: For any first target feature, the first target feature is input into the second gating network corresponding to the first target feature, and the first target feature is processed through the second gating network corresponding to the first target feature to obtain a second feature parameter meeting a first set number, and the first set number is determined based on the number of the second feature extraction network and the feature dimension included in the second feature. The second feature parameter meeting the first set number includes a plurality of groups of second feature parameters, the number of second feature parameters included in each group of second feature parameters is consistent with the number of feature dimensions included in the second feature, and each group of second feature parameters is used for weighted processing of the second feature output by a second feature extraction network.
7. The apparatus of claim 6, wherein, The second processing module is configured to: For any group of second feature parameters, the second feature parameters are used for weighted processing of the plurality of dimension features included in the second feature output by the corresponding second feature extraction network to obtain weighted plurality of dimension features. Based on the weighted plurality of dimension features, the second target feature is determined.
8. The apparatus of claim 5, wherein, The device further includes: The third processing module is configured to: For a plurality of groups of second feature parameters obtained through the same second gating network, the third feature is obtained by summing a plurality of second target features processed based on the plurality of groups of second feature parameters.
9. A computing device, comprising: The score acquisition module is configured to: Based on the third feature, the recommendation score of the candidate object under the prediction target corresponding to the task network is obtained through the task network corresponding to the second gating network. The computing device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the operations performed by the feature processing method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a program, and the program is executed by a processor to perform operations of the feature processing method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method for training recommendation probability prediction model and recommendation probability prediction method and device
CN113254792A
Recommendation method, device and equipment based on deep learning model
CN116861092A