Recommendation method and device, computer equipment and storage medium
By introducing the concept of feature groups into feature data and adopting the crossover and weighted fusion of sub-features corresponding to the feature groups, the problem of insufficient fitting ability of FM technology is solved and higher recommendation accuracy is achieved.
Patent Information
- Application Number
- CN202410351814.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2025-09-26
AI Technical Summary
Existing FM technology has shortcomings in recommendation accuracy and cannot accurately learn the interaction between objects and resources, resulting in low recommendation accuracy.
The concept of feature group is introduced. Each feature in the feature data includes sub-features corresponding to each feature group. When crossing, the sub-features corresponding to the feature group to which the other feature belongs are selected. The cross feature is generated through Hadar product and weighted fusion to improve the fitting ability.
The accuracy of recommendations is improved, and the interaction between objects and resources can be learned more accurately, which improves the accuracy of recommendations.
Smart Images

Figure CN120705388A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a recommendation method, apparatus, computer device, and storage medium. Background Art
[0002] As the internet continues to expand and the number of resources increases, various resource platforms recommend resources to individuals. To ensure accurate recommendations, they typically derive cross-features from both object and resource features, and then use these cross-features to determine matching parameters between the object and the resource. Because cross-features represent the interaction between the object and the resource, the matching parameters determined based on these cross-features can indicate whether the resource is suitable for recommendation to the individual.
[0003] Currently, FM (Factorization Machine) technology is commonly used. For feature data containing both object and resource features, the crossover between each pair of features is performed and the sum is calculated to generate the crossover feature. However, FM technology suffers from poor fitting capabilities, which affects recommendation accuracy. Summary of the Invention
[0004] The embodiments of the present application provide a recommendation method, apparatus, computer device, and storage medium to improve the accuracy of recommendations. The technical solution is as follows:
[0005] In one aspect, a recommendation method is provided, comprising:
[0006] Acquiring feature data, the feature data including at least two feature groups of an object feature group, a resource feature group, and a context feature group, the object feature group including features of an object, the resource feature group including features of a resource, the context feature including a context feature, the context feature representing at least one of a state of the object and a state of the resource, and the features in the feature data including sub-features corresponding to each feature group;
[0007] For a feature pair including a first feature and a second feature in the feature data, intersecting the first sub-feature and the second sub-feature to obtain a first intersecting feature of the feature pair, wherein the first sub-feature is a sub-feature of the first feature corresponding to the feature group to which the second feature belongs, and the second sub-feature is a sub-feature of the second feature corresponding to the feature group to which the first feature belongs;
[0008] Based on the first intersection feature of each feature pair in the feature data, a second intersection feature between the object and the resource is determined, and based on the second intersection feature, a matching parameter between the object and the resource is determined.
[0009] In another aspect, a recommendation device is provided, comprising:
[0010] a feature acquisition module, configured to acquire feature data, the feature data comprising at least two feature groups selected from an object feature group, a resource feature group, and a context feature group, the object feature group comprising features of an object, the resource feature group comprising features of a resource, the context feature comprising a context feature, the context feature representing at least one of a state of the object and a state of the resource, and the features in the feature data comprising sub-features corresponding to each feature group;
[0011] a first intersection module, configured to, for a feature pair including a first feature and a second feature in the feature data, intersect a first sub-feature and a second sub-feature to obtain a first intersection feature of the feature pair, wherein the first sub-feature is a sub-feature of the first feature corresponding to the feature group to which the second feature belongs, and the second sub-feature is a sub-feature of the second feature corresponding to the feature group to which the first feature belongs;
[0012] a second intersection module, configured to determine a second intersection feature between the object and the resource based on the first intersection feature of each feature pair in the feature data;
[0013] A parameter determination module is used to determine a matching parameter between the object and the resource based on the second intersection feature.
[0014] Optionally, the first intersection module is configured to determine a Hadar product of the first sub-feature and the second sub-feature as a first intersection feature of the feature pair.
[0015] Optionally, the second cross-connect module includes:
[0016] The weighted cross unit is used to perform weighted fusion on the first cross features of at least two feature pairs based on the first weight of each feature pair to obtain the second cross feature.
[0017] Optionally, the device further comprises:
[0018] a third cross module, configured to perform weighted fusion on at least two features in the feature data based on a second weight of each feature in the feature data to obtain a third cross feature;
[0019] The parameter determination module is used to determine the matching parameter based on the second intersection feature and the third intersection feature.
[0020] Optionally, the recommendation model includes an encoding layer, a feature cross layer, and at least one network layer;
[0021] The encoding layer is used to encode the data of the object and the data of the resource to obtain the feature data;
[0022] The feature intersection layer is used to determine the second intersection feature based on the feature data;
[0023] The at least one network layer is configured to determine the matching parameter based on the second intersection feature.
[0024] Optionally, the recommendation model further includes a first weight extraction layer;
[0025] The first weight extraction layer is used to determine a first weight of each feature pair based on the feature data.
[0026] Optionally, the recommendation model further includes a second weight extraction layer;
[0027] The second weight extraction layer is configured to determine a second weight of each feature in the feature data based on the feature data;
[0028] The feature cross layer is further configured to perform weighted fusion on at least two features in the feature data based on a second weight of each feature in the feature data to obtain a third cross feature;
[0029] The at least one network layer is further configured to determine the matching parameter based on the second intersection feature and the third intersection feature.
[0030] Optionally, the device further comprises:
[0031] A training module, configured to train the recommendation model based on data of sample objects, data of sample resources, and sample labels;
[0032] The sample tag indicates whether the sample resource is recommended to the sample object.
[0033] Optionally, the matching parameter includes at least one of the following:
[0034] Click-through rate, where the click-through rate represents the probability of the object clicking on the resource;
[0035] a conversion rate, where the conversion rate represents a probability that the object will perform a conversion operation on the resource after clicking on the resource;
[0036] The input quantity represents the amount of cost invested by the object for the resource.
[0037] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the recommended method described in the above aspects.
[0038] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed by the recommended method described in the above aspects.
[0039] On the other hand, a computer program product is provided, comprising a computer program, wherein the computer program is loaded and executed by a processor to implement the operations performed by the recommended method as described in the above aspects.
[0040] The embodiment of the present application introduces the concept of feature groups, and each feature in the feature data includes sub-features corresponding to each feature group. When the same feature is crossed with other features, the sub-features corresponding to the feature group to which the other feature belongs will be selected for crossing. Therefore, for different feature groups, the sub-features of the feature involved in the crossing are not shared, thereby improving the fitting ability, being able to accurately learn the interaction between objects and resources, and thereby improving the recommendation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0042] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0043] Figure 2 This is a schematic diagram showing a resource provided by an embodiment of the present application;
[0044] Figure 3 This is a schematic diagram showing another resource provided in an embodiment of the present application;
[0045] Figure 4 This is a flowchart of a recommended method provided in an embodiment of the present application;
[0046] Figure 5 This is a schematic diagram of a feature crossover process provided by an embodiment of the present application;
[0047] Figure 6This is a flowchart of another recommended method provided in an embodiment of the present application;
[0048] Figure 7 is a flowchart of a process for determining a second intersection feature provided by an embodiment of the present application;
[0049] Figure 8 This is a processing flow chart of an FM technology provided by an embodiment of the present application;
[0050] Figure 9 This is a processing flow chart of an FFM technology provided in an embodiment of the present application;
[0051] Figure 10 This is a processing flow chart of a FwFM technology provided by an embodiment of the present application;
[0052] Figure 11 This is a flowchart of another recommended method provided in an embodiment of the present application;
[0053] Figure 12 This is a schematic diagram of the structure of a recommendation model provided in an embodiment of the present application;
[0054] Figure 13 This is a schematic diagram of the structure of another recommendation model provided in an embodiment of the present application;
[0055] Figure 14 This is a flowchart of another recommended method provided in an embodiment of the present application;
[0056] Figure 15 This is a schematic structural diagram of a recommended device provided in an embodiment of the present application;
[0057] Figure 16 is a structural diagram of another recommended device provided in an embodiment of the present application;
[0058] Figure 17 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0059] Figure 18 This is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0061] It is understood that the terms "first," "second," and the like used herein may be used to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are merely used to distinguish one concept from another. For example, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature without departing from the scope of this application.
[0062] Here, "at least two" refers to two or more. For example, the at least two features can be two features, three features, or any other integer greater than or equal to two. "Each" refers to each of the at least two features. For example, "each feature" refers to each of the at least two features. If the at least two features are three features, "each feature" refers to each of the three features.
[0063] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices, etc.) involved in this application are all fully authorized by users or relevant parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0064] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0065] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, pre-trained models, operating / interaction systems, and mechatronics. Pre-trained models, also known as large models or basic models, can be fine-tuned and widely applied to downstream tasks across various AI disciplines. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and smart transportation.
[0066] A pre-training model (PTM), also known as a cornerstone model or a large model, refers to a deep neural network (DNN) with large parameters. It is trained on massive amounts of unlabeled data, and the function approximation capability of the large-parameter DNN is used to enable the PTM to extract common features from the data. Through fine tuning, parameter-efficient fine-tuning (PEFT), prompt-tuning and other techniques, it is suitable for downstream tasks. Therefore, the pre-training model can achieve ideal results in few-shot or zero-shot scenarios. PTM can be divided into language models, visual models, speech models, multimodal models, etc. according to the data modality processed. Among them, a multimodal model refers to a model that establishes feature representations of two or more data modalities. The pre-training model is an important tool for outputting AI-generated content, and can also be used as a general interface to connect multiple specific task models.
[0067] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by demonstration. Pretrained models are the latest development in deep learning, integrating these techniques.
[0068] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, digital twins, virtual humans, robots, artificial intelligence-generated content, conversational interaction, smart medical care, smart customer service, game AI, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0069] The solutions provided in the embodiments of this application involve artificial intelligence technology, which is specifically illustrated by the following embodiments:
[0070] First, the terms involved in the embodiments of this application are introduced as follows:
[0071] 1. Factorization machine technologies include the following:
[0072] FM: Factorization Machine;
[0073] FFM (Field Aware Factorization Machines);
[0074] FwFM (Field Weight Factorization Machines);
[0075] GEFN (Group-aware Embedding Field Network).
[0076] In addition, FM technology is applied in both NFM (Neural Factorization Machines) and DeepFM (DeepFactorization Machines) recommendation models.
[0077] 2. Feature Field: This is a concept in the recommendation domain. A Field can be considered a set of features, representing a type of feature input with a specific meaning. For example, age and gender are each a Field. Male and female both belong to the "Gender" field, and 13, 15, and 17 years old all belong to the "Age" field.
[0078] 3. Feature Group: This is a concept in the recommendation field. A Group is a feature group that contains multiple fields. For example, features can be divided into three groups: object feature group, resource feature group, and context feature group.
[0079] 4. Features: A parametric expression of discrete input features in the recommendation field. Features can be in the form of feature vectors or matrices.
[0080] 5. Dimension explosion: The input features in the recommendation field are often in the tens to hundreds of millions of dimensions. If feature cross-pollination is performed, the cross-feature dimensions will reach trillions or even higher, leading to a serious dimensionality explosion that exceeds the system's cost tolerance.
[0081] 6. Hadar product: Taking two eigenvectors of length K as an example, the Hadar product of these two eigenvectors refers to multiplying the elements of the same dimension in the two eigenvectors to obtain a eigenvector of length K.
[0082] 7. pCTR (predict the Click-Through Rate): Predicts the probability of a user clicking on a resource after it is recommended to them.
[0083] 8. pCVR (predict Conversion Rate), conversion rate prediction model: estimates the probability that a user will perform a conversion operation on a resource after a resource is recommended to the user.
[0084] The method provided in the embodiment of the present application is used in a computer device. Optionally, the computer device is a terminal or a server. Optionally, the terminal is a smart phone, a computer, a laptop, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, etc., but is not limited thereto. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network) and basic cloud computing services such as big data and artificial intelligence platforms. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
[0085] In one possible implementation, the computer program involved in the embodiments of the present application can be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected through a communication network. Multiple computer devices distributed at multiple locations and interconnected through a communication network can constitute a blockchain system.
[0086] In one possible implementation, the computer device in the embodiment of the present application is a node in a blockchain system, which can store feature data, cross-features or matching parameters in the blockchain. Thereafter, the node or the node corresponding to other devices in the blockchain can query the data stored in the blockchain by accessing the blockchain.
[0087] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present application, see Figure 1 The implementation environment includes: a terminal 101 and a server 102, and the terminal 101 and the server 102 are connected via a wired network or a wireless network.
[0088] The terminal 101 has a client 111 installed and running. The client 111 can be a video sharing client, a social application client, a game client, etc. When the terminal 101 runs the client 111, the user interface of the client 111 is displayed on the screen of the terminal 101. The terminal 101 is the terminal used by the user 121.
[0089] Optionally, terminal 101 may generally refer to one of multiple terminals, including but not limited to: smart phones, tablet computers, laptop computers, desktop computers, smart watches, smart game consoles, smart TVs, etc.
[0090] Those skilled in the art will appreciate that the number of the above-mentioned terminals may be more or less. For example, the above-mentioned terminal may be only one, or the above-mentioned terminals may be 6, 8, or more. The embodiments of the present application do not limit the number of terminals and device types.
[0091] Figure 1 Only one terminal is shown, but in different embodiments, multiple other terminals 103 can access the server 102. Optionally, there are one or more terminals 103 corresponding to developers, and a client development and editing platform is installed on the terminal 103. The developer can edit and update the client on the terminal 103 and transmit the updated client installation package to the server 102 via a wired or wireless network. The terminal 101 can download the client installation package from the server 102 to update the client.
[0092] The terminal 101 and other terminals 103 are connected to the server 102 via a wired network or a wireless network.
[0093] Server 102 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 102 provides backend services for clients. Optionally, server 102 performs primary computing tasks, while terminal 101 performs secondary computing tasks; alternatively, server 102 performs secondary computing tasks, while terminal 101 performs primary computing tasks; alternatively, server 102 and terminal 101 utilize a distributed computing architecture for collaborative computing.
[0094] In an embodiment of the present application, the server 102 determines the object to which the terminal 101 belongs and the resource to be recommended, and based on the data of the object and the data of the resource, uses the method provided in the embodiment of the present application to determine the matching parameters between the object and the resource, thereby determining whether to recommend the resource to the object based on the matching parameters. If it is determined that the resource is to be recommended to the object, the server 102 sends the resource to the terminal 101, and the terminal 101 displays the resource.
[0095] For example, see Figure 2Terminal 101 displays the article pushed by the official account, and displays the recommended resources at the bottom of the article, including the resource image, the copy recommending the resource "Compared prices for several days, now is the best time to buy it" and a control for viewing details. Clicking the control can view the detailed information of the resource. Or, see Figure 3 Terminal 101 displays a news list, which includes multiple news messages, and recommended resources are displayed in the middle of the multiple news messages, including car photos, text introducing the car "new model, hard-core appearance, preferential price" and the release time of the resource "5 minutes ago".
[0096] It should be noted that the above implementation environment is only an example. The method provided in the embodiment of the present application can also be executed by the server 102 alone, or by other computer devices, and the embodiment of the present application does not limit this.
[0097] Figure 4 This is a flowchart of a recommended method provided by an embodiment of the present application. The embodiment of the present application is executed by a computer device, which is as follows Figure 1 The terminal 101 or server 102 shown in FIG. Figure 4 , the method comprising:
[0098] 401. The computer device obtains characteristic data.
[0099] The embodiments of the present application are applied to the recommendation field. It is necessary to determine matching parameters between the object and the resource based on the characteristics of the object and the resource, so as to measure whether the resource is suitable for recommendation to the object based on the matching parameters. The object can be a terminal, an account logged into an application, etc. The resource can include information in at least one format such as video, audio, image, and text, and can include at least one type of information such as merchandise, movies, TV series, and performances.
[0100] The feature data includes multiple features, and the multiple features are further divided into different feature groups. Therefore, the feature data includes at least two feature groups of an object feature group, a resource feature group, and a context feature group. The object feature group includes the features of the object, which are used to describe the object. For example, the object feature group includes: age features, gender features, interest features, job features, features of historically purchased goods, features of historically clicked goods, etc. The resource feature group includes the features of the resources, which are used to describe the resources. For example, the resource feature group includes: type features, sales quantity features, sales price features, rating features, click-through rate features, conversion rate features, etc. The context feature group includes context features, which represent at least one of the state of the object and the state of the resource. For example, the context feature group includes: features of the current time, features of the object's location, features of the object's mood, features of the current season, features of the duration of the resource, etc.
[0101] For example, feature data is shown in Table 1 below. As shown in Table 1, the feature data is divided into multiple feature domains, which represent the dimensions to which the features belong. Features in the feature data are also divided into multiple feature groups based on object features, resource features, and context features. Multiple features of an object can belong to different feature domains, but all belong to the object feature group. Multiple features of a resource can belong to different feature domains, but all belong to the resource feature group. Different context features belong to different feature domains, but all belong to the context feature group.
[0102] Table 1
[0103]
[0104] For the sake of convenience, the present application embodiment only uses the above-mentioned object-side features and resource-side features as examples. However, there are many types of features in actual application scenarios, and it is impossible to describe them one by one. For features not listed, they are still applicable to the present application embodiment.
[0105] In addition, the feature in the feature data includes sub-features corresponding to each feature group, that is, the feature includes at least two sub-features, each sub-feature corresponds to a feature group, and each sub-feature is used to intersect with another sub-feature belonging to the feature group. And the number of sub-features included in the feature is equal to the number of feature groups in the feature data. For example, see Figure 5When feature data includes two feature groups, an object feature group and a resource feature group, each feature in the feature data includes two sub-features. The first sub-feature (indicated by a blank box) corresponds to the object feature group, and the second sub-feature (indicated by a slashed box) corresponds to the resource feature group. When crossing one feature with another, the two complete features are not crossed directly. Instead, the sub-features corresponding to the feature group to which the other feature belongs are crossed.
[0106] How the sub-features in each feature are divided and which feature group each sub-feature corresponds to can be flexibly set by the computer device, and the embodiments of the present application do not limit this.
[0107] 402. The computer device intersects the first sub-feature and the second sub-feature for a feature pair including a first feature and a second feature in the feature data to obtain a first intersecting feature of the feature pair, where the first sub-feature is a sub-feature of the first feature that corresponds to the feature group to which the second feature belongs, and the second sub-feature is a sub-feature of the second feature that corresponds to the feature group to which the first feature belongs.
[0108] The feature data includes at least one feature pair, each feature pair including two different features in the feature data. For example, the feature data includes two features, the two features belong to two different feature groups, and the two features form a feature pair. Alternatively, the feature data includes at least three features, and the computer device pairs the at least three features in the feature data to form at least two feature pairs, wherein the features included in different feature pairs are not completely identical.
[0109] In the embodiment of the present application, any feature pair is taken as an example. The two features in the feature pair are called the first feature and the second feature. When the first feature and the second feature need to be crossed, the first sub-feature and the second sub-feature are crossed to obtain the first crossed feature of the feature pair.
[0110] See also Figure 5 In each feature, the first sub-feature (represented by a blank box) is the sub-feature corresponding to the object feature group, and the second sub-feature (represented by a slashed box) is the sub-feature corresponding to the resource feature group. The age feature and the gender feature belong to the object feature group, so the first sub-feature in the age feature and the first sub-feature in the gender feature are selected for intersection, while the type feature belongs to the resource feature group, so the second sub-feature in the age feature and the first sub-feature in the type feature are selected for intersection. Similarly, the second sub-feature in the gender feature and the first sub-feature in the type feature are selected for intersection.
[0111] This crossover method crosses the first-order features to obtain second-order crossover features, which increases the dimension of the feature space and the complexity of the crossover features, thereby improving the ability to fit the data.
[0112] 403. The computer device determines a second intersection feature between the object and the resource based on the first intersection feature of each feature pair in the feature data, and determines a matching parameter between the object and the resource based on the second intersection feature.
[0113] The first cross-feature represents the interaction between the two features in a feature pair, while the second cross-feature, derived by summarizing the first cross-features of each feature pair, represents the interaction between the object and the resource, reflecting the influence of the resource on the object. The matching parameter determined based on the second cross-feature represents the degree of match between the object and the resource, thus indicating whether the resource is suitable for recommending to the object.
[0114] In one possible implementation, if the feature data includes a feature pair, the first intersection feature of the feature pair is determined as the second intersection feature of the object and the resource. Alternatively, if the feature data includes at least two feature pairs, the first intersection features of the at least two feature pairs are fused to obtain the second intersection feature. The fusion can be performed by summation, weighted summation, or other fusion methods.
[0115] In one possible implementation, it may be determined whether the matching parameter is greater than a threshold. If the matching parameter is greater than the threshold, the resource is recommended to the object; if the matching parameter is not greater than the threshold, the resource is not recommended to the object.
[0116] In another possible implementation, matching parameters between multiple resources and the object are determined separately, the matching parameters of the multiple resources are sorted in descending order, and then a preset number of resources are selected according to the sorting and recommended to the object, thereby recommending resources with larger matching parameters to the object.
[0117] The FM technology used in related technologies crosses features belonging to different dimensions and then sums them up, such as age features and gender features. When the same feature is crossed with other features, the feature itself is selected. That is, for different feature pairs, the features are completely shared, resulting in poor fitting ability of FM technology and inability to accurately learn the interaction between objects and resources, which in turn leads to low recommendation accuracy.
[0118] The method provided in the embodiment of the present application introduces the concept of feature groups, and each feature in the feature data includes sub-features corresponding to each feature group. When the same feature is crossed with other features, the sub-features corresponding to the feature group to which the other feature belongs will be selected for crossing. Therefore, for different feature groups, the sub-features in the features that participate in the crossing are not shared, thereby improving the fitting ability, being able to accurately learn the interaction between objects and resources, and thereby improving the recommendation accuracy.
[0119] Figure 6 This is a flowchart of a recommended method provided by an embodiment of the present application. The embodiment of the present application is executed by a computer device, which is as follows Figure 1 The terminal 101 or server 102 shown in FIG. Figure 6 , the method comprising:
[0120] 601. The computer device obtains characteristic data.
[0121] The feature data includes at least two feature groups of an object feature group, a resource feature group, and a context feature group, the object feature group includes features of the object, the resource feature group includes features of the resource, the context features include context features, the context features represent at least one of a state of the object and a state of the resource, and the features in the feature data include sub-features corresponding to each feature group.
[0122] The process of step 601 is the same as that of step 401 above, and will not be repeated here.
[0123] 602. The computer device determines, for a feature pair including a first feature and a second feature in the feature data, a Hadar product of the first sub-feature and the second sub-feature as a first cross feature of the feature pair.
[0124] Taking two eigenvectors of length K as an example, the Hadar product of the two eigenvectors refers to a eigenvector of length K obtained by multiplying elements of the same dimension in the two eigenvectors.
[0125] In the embodiment of the present application, the Hadar product of the first sub-feature and the second sub-feature is determined as the first cross-feature, so that the first cross-feature can comprehensively reflect the interaction between the first feature and the second feature, thereby improving the accuracy of the first cross-feature.
[0126] In the embodiment of the present application, the first cross-feature is taken as the Hadar product of the first sub-feature and the second sub-feature. In another embodiment, other methods can be used to determine the first cross-feature, as long as the first cross-feature can reflect the interaction between the first sub-feature and the second sub-feature.
[0127] 603. The computer device performs weighted fusion on the first cross features of at least two feature pairs based on the first weight of each feature pair to obtain a second cross feature, and determines a matching parameter between the object and the resource based on the second cross feature.
[0128] In this embodiment of the present application, a computer device determines a first weight for each feature pair, using the example of feature data comprising at least two feature pairs. This first weight is used to represent the importance of the feature pair when performing weighted fusion. Based on the first weight of each feature pair, this embodiment of the present application performs a weighted fusion of the first cross-features of each feature pair, taking into account the importance of each feature pair, improving the accuracy of the cross-features, and thereby improving the accuracy of recommendations.
[0129] In one possible implementation, the first weight of each feature pair is set to a fixed value by a computer device, and even if the object or resource is replaced, the first weight of the feature pair consisting of two features at the same position in the feature data will not change.
[0130] In another possible implementation, the first weight of each feature pair is determined based on the feature data, that is, the computer device processes the feature data to obtain the first weight of each feature pair. The processing method can be set by the computer device, or the computer device determines it by training the recommendation model. It only needs to ensure that the first weight of each feature pair is affected by the feature data, and a personalized first weight can be obtained when the object or resource is replaced. For example, the computer device performs a linear transformation on the feature data to obtain the first weight of each feature pair. Exemplarily, the computer device determines the first weight of each feature pair based on all features in the feature data, or the computer device selects some features from the feature data to determine the first weight of each feature pair to reduce the amount of calculation. The selected features can be features of the feature data belonging to the target dimension, or features located at the target position, etc. Alternatively, the selected features are elements located at the target position in each feature in the feature data, etc. Moreover, the above-mentioned method of selecting features is only an example, and different methods can be used to select features in actual application scenarios, and the selection methods cannot be described one by one. For methods not listed, they are still applicable to the embodiments of the present application.
[0131] In an embodiment of the present application, a personalized first weight is determined based on feature data, rather than setting a fixed value for the first weight. The matching first weight can be dynamically learned based on the feature data for different objects or different resources, thereby improving the accuracy of the first weight. This solution is more suitable for the personalized needs of large-scale data scenarios.
[0132] In addition, weighted fusion can be weighted summation, that is, based on the first weight of each feature pair, the first cross features of at least two feature pairs are weighted and fused to obtain a second cross feature, including: based on the first weight of each feature pair, the first cross features of each feature pair are weighted to obtain the weighted cross feature of each feature pair, and the weighted cross features of at least two feature pairs are summed to obtain the second cross feature. In addition, weighted fusion can also be other weighted processing methods, which are not limited in the embodiments of the present application.
[0133] For example, the processing flow chart of the computer device determining the second intersection feature is shown in Figure 7 , the computer device determines the second cross feature by the following formula:
[0134]
[0135] Among them, y is the second cross feature, i and j are the feature numbers, i and j are positive integers, N is the total number of features in the feature data, G j is the feature group to which the jth feature belongs, G is the sub-feature of the i-th feature that corresponds to the feature group to which the j-th feature belongs, and is also the sub-feature used when intersecting with the j-th feature. i is the feature group to which the i-th feature belongs, w(x) is the sub-feature of the j-th feature that corresponds to the feature group to which the i-th feature belongs, and is also the sub-feature used when intersecting with the i-th feature. ij The first weight of the feature pair consisting of the i-th feature and the j-th feature represents the Hadar product.
[0136] In one possible implementation, determining the matching parameter based on the second cross feature includes: performing a full-connection process on the second cross feature, processing the obtained full-connection value using an activation function to obtain an activation value corresponding to the second cross feature, and determining the activation value as the matching parameter. Alternatively, the matching parameter may be determined using other methods. The activation function may be a ReLU (Rectified Linear Unit) function, a sigmoid function, or other functions.
[0137] In the embodiment of the present application, different features in the feature data are crossed, and the obtained second cross feature takes into account the influence of different features, so the second cross feature can be called a second-order cross feature. In another possible implementation, the computer device can also obtain a first-order cross feature, that is, the method also includes: based on the second weight of each feature in the feature data, performing weighted fusion on at least two features in the feature data to obtain a third cross feature, and the third cross feature is fused without crossing the two features, so it can be called a first-order cross feature. Among them, weighted fusion can be a weighted summation or other weighted processing method.
[0138] Furthermore, in this case, determining the matching parameter between the object and the resource based on the second intersection feature includes: determining the matching parameter based on the second intersection feature and the third intersection feature.
[0139] Among them, the second weight of each feature is used to represent the importance of the feature when performing weighted fusion. In one possible implementation, the second weight of each feature is set to a fixed value by a computer device, and even if the object or resource is replaced, the second weight of the feature at the same position in the feature data will not change. The embodiment of the present application performs weighted fusion of at least two features in the feature data based on the second weight of each feature, takes into account the importance of each feature, improves the accuracy of the third cross-feature, and comprehensively considers the first-order cross-features and second-order cross-features, increases the amount of information of the cross-features, and thus improves the recommendation accuracy.
[0140] In another possible implementation, the second weight of each feature is determined based on the feature data, that is, the computer device processes the feature data to obtain the second weight of each feature. The processing method can be set by the computer device, or the computer device determines it by training the recommendation model. It only needs to ensure that the second weight of each feature will be affected by the feature data, and a personalized second weight can be obtained when the object or resource is replaced. For example, the computer device performs a linear transformation on the feature data to obtain the second weight of each feature. Exemplarily, the computer device determines the second weight of each feature based on all the features in the feature data, or the computer device selects some features from the feature data to determine the second weight of each feature to reduce the amount of calculation. The selected features can be features of the target dimension of the feature data, or features located at the target position, etc. Alternatively, the selected features are elements located at the target position in each feature in the feature data, etc., and the embodiments of the present application are not limited to this.
[0141] In an embodiment of the present application, a personalized second weight is determined based on feature data, rather than setting a fixed value for the second weight. The matching second weight can be dynamically learned based on the feature data for different objects or different resources, thereby improving the accuracy of the second weight. This solution is more suitable for the personalized needs of large-scale data scenarios.
[0142] In another possible implementation, determining the matching parameter based on the second and third cross-features includes calculating the sum of the second and third cross-features to obtain a total feature, and determining the matching parameter based on the total feature. Alternatively, calculating the sum of the second, third, and preset bias terms to obtain a total feature, and determining the matching parameter based on the total feature. The value of the preset bias term can be set by a computer device, or the preset bias term can be a model parameter in a recommendation model, and the value of the preset bias term can be determined by training the recommendation model.
[0143] In the embodiment of the present application, not only the second cross feature is obtained, but also the third cross feature is obtained, which increases the information content and complexity of the feature, improves the accuracy of the matching parameters, and thus improves the recommendation accuracy.
[0144] In another possible implementation, the matching parameter includes at least one of the following:
[0145] 1. Click-through rate. Click-through rate indicates the probability of an object clicking on a resource.
[0146] 2. Conversion rate: The conversion rate indicates the probability that a user will perform a conversion action on a resource after clicking it. Conversion actions can include registering the application that owns the resource, adding the resource to favorites, adding the resource to a shopping cart, purchasing the resource, and so on.
[0147] 3. Input quantity: Input quantity indicates the amount of cost invested in resources. The cost invested in resources can be time cost, monetary cost, etc.
[0148] For example, the recommended model is a long-term value estimation model, which is used to estimate the long-term value of resource investment.
[0149] For the sake of convenience, the embodiments of this application only use the above-mentioned matching parameters as examples. However, there are many types of matching parameters in actual application scenarios, and it is impossible to describe them one by one. For matching parameters not listed, they are still applicable to the embodiments of this application. The recommendation method provided in the embodiments of this application can be applied to determine different types of matching parameters, and thus can be widely used in various application scenarios such as estimating click-through rate, estimating conversion rate, estimating investment quantity, etc., thereby improving flexibility.
[0150] The related art provides a variety of factor decomposition technologies. The embodiments of the present application provide a new factor decomposition technology called GEFN (Group-aware Embedding Field Network). The following will compare the related art and the factor decomposition technology provided by the embodiments of the present application:
[0151] 1.FM:
[0152] The processing flow chart of FM technology can be found in Figure 8 , the formula for determining the cross-feature is as follows:
[0153]
[0154] Among them, y is the cross feature, i and j are the feature numbers, i and j are positive integers, N is the total number of features in the feature data, x i is the i-th feature, x j is the j-th feature, representing the Hadar product.
[0155] FM technology crosses features belonging to different dimensions and then sums them, such as age features and gender features. When the same feature is crossed with other features, the feature itself is selected. That is, for different feature pairs, the features are completely shared, resulting in poor fitting ability of FM technology and the inability to accurately learn the interaction between objects and resources, which in turn leads to low recommendation accuracy.
[0156] The GEFN provided in the embodiment of the present application introduces the concept of feature groups, and each feature in the feature data includes sub-features corresponding to each feature group. When the same feature is crossed with other features, the sub-features corresponding to the feature group to which the other feature belongs will be selected for crossing. Therefore, for different feature groups, the sub-features involved in the crossing in the features are not shared, thereby improving the fitting ability, being able to accurately learn the interaction between objects and resources, and thereby improving the recommendation accuracy.
[0157] In addition, FM technology does not set feature weights and does not consider the importance of each feature. It directly sums up the cross-features. However, in fact, the cross-contributions of different features are different. Therefore, the cross-features determined by FM technology are inaccurate, which leads to low recommendation accuracy.
[0158] The GEFN provided in the embodiments of this application performs a weighted fusion of the first cross-features of each feature pair based on the first weight of each feature pair. This takes into account the importance of each feature pair, improves the accuracy of the cross-features, and thus improves the accuracy of recommendations. Furthermore, by determining a personalized first weight based on feature data, rather than setting a fixed first weight, it can dynamically learn matching first weights based on feature data for different objects or resources, improving the accuracy of the first weights. This solution is more suitable for the personalized needs of large-scale data scenarios.
[0159] 2. FFM:
[0160] See the processing flow chart of FFM technology for Figure 9 , the formula for determining the cross-feature is as follows:
[0161]
[0162] Where y is the crossover feature, i and j are feature indices, both positive integers, and N is the total number of features in the feature data. Each feature consists of multiple sub-features, and different sub-features are selected when crossing different feature domains. Each sub-feature is a K-dimensional feature vector, where K is a positive integer. Each feature belongs to a feature domain, which represents the dimension to which the feature belongs. If the feature data contains N feature domains, the length of each feature is (N-1)*K. is the jth sub-feature in the i-th feature, used when crossing with the j-th feature domain. It is the i-th sub-feature in the j-th feature, used when crossing with the i-th feature domain, and represents the Hadar product.
[0163] FFM technology introduces the concept of feature domains. Each feature in the feature data includes sub-features corresponding to each of the other feature domains. When a feature is intersected with another feature, the sub-features corresponding to the feature domain of the other feature are used for the intersecting. Therefore, sub-features involved in the intersecting feature are not shared across different feature domains. Therefore, compared to FM technology, FFM technology improves fitting capabilities. However, FFM technology is significantly affected by the number of feature domains. Once the number of feature domains increases, the feature length scales linearly with the number of feature domains. In actual production scenarios, N often needs to be in the range of 500-1000, resulting in very long feature lengths. Therefore, FFM technology lacks scalability to the number of feature domains, making it difficult to apply in production scenarios.
[0164] The GEFN provided in the embodiments of the present application introduces the concept of feature groups, thereby improving fitting capabilities and accurately learning the interactions between objects and resources, thereby improving recommendation accuracy. Furthermore, compared to FFM technology, the length of features in GEFN is G*K, where G represents the number of feature groups. Since one feature group corresponds to multiple feature domains, the number of feature groups can be flexibly set, and the number of feature groups is much smaller than the number of feature domains. Even if the number of feature domains increases, the number of feature groups will not be too large. Therefore, GEFN is still applicable when the number of feature domains is expanded, making it suitable for application in actual production scenarios.
[0165] It should be noted that the number of feature domains, the length of features, and the number of feature groups are universal. The embodiments of the present application do not limit the number of feature domains, the length of features, and the number of feature groups. The adjusted number of feature domains, the length of features, and the number of feature groups are still applicable to the embodiments of the present application.
[0166] In addition, FFM technology does not set feature weights and does not consider the importance of each feature. It directly sums up the cross-features. However, in reality, the cross-contributions of different features are different. Therefore, the cross-features determined by FFM technology are inaccurate, which leads to low recommendation accuracy.
[0167] The GEFN provided in the embodiments of this application performs a weighted fusion of the first cross-features of each feature pair based on the first weight of each feature pair. This takes into account the importance of each feature pair, improves the accuracy of the cross-features, and thus improves the accuracy of recommendations. Furthermore, by determining a personalized first weight based on feature data, rather than setting a fixed first weight, it can dynamically learn matching first weights based on feature data for different objects or resources, improving the accuracy of the first weights. This solution is more suitable for the personalized needs of large-scale data scenarios.
[0168] 3. FwFM:
[0169] See the processing flow chart of FwFM technology for Figure 10 , the formula for determining the cross-feature is as follows:
[0170]
[0171] Where y is the cross feature, i and j are the feature numbers, i and j are positive integers, N is the total number of features in the feature data, each feature is a K-dimensional feature vector, K is a positive integer. ij is the weight of the intersection of the i-th feature and the j-th feature, representing the Hadar product.
[0172] FwFM technology performs weighted cross-calculation on features belonging to different dimensions and then sums them up. For example, when a feature is crossed with other features, the feature itself is selected. That is, for different feature pairs, features are completely shared. This results in poor fitting ability of FwFM technology, and it cannot accurately learn the interaction between objects and resources, which in turn leads to low recommendation accuracy.
[0173] The GEFN provided in the embodiment of the present application introduces the concept of feature groups, and each feature in the feature data includes sub-features corresponding to each feature group. When the same feature is crossed with other features, the sub-features corresponding to the feature group to which the other feature belongs will be selected for crossing. Therefore, for different feature groups, the sub-features involved in the crossing in the features are not shared, thereby improving the fitting ability, being able to accurately learn the interaction between objects and resources, and thereby improving the recommendation accuracy.
[0174] Furthermore, FwFM technology assigns weights to each feature pair, taking into account their importance. However, these weights are fixed values and are the same for different objects or resources, lacking personalization capabilities. In contrast, the GEFN provided in the present embodiment can dynamically learn the first matching weight based on feature data for different objects or resources, improving the accuracy of the first weight. This solution is also more suitable for the personalized needs of large-scale data scenarios.
[0175] In summary, the GEFN provided in the embodiments of this application introduces the concept of feature groups, compared to FM, FFM, and FwFM. This improves fitting capabilities, enables dynamic learning of matching weights, and avoids the problem of feature dimensionality explosion. It remains applicable even when the number of feature domains is expanded, making it suitable for practical production scenarios. Therefore, by balancing fitting capabilities and feature length, it can achieve better results than FM, FFM, and FwFM, improving recommendation accuracy.
[0176] On the basis of the above embodiment, the embodiment of the present application further provides another recommendation method, which is executed by a computer device based on a recommendation model. The computer device is as follows: Figure 1 The terminal 101 or server 102 and other devices shown, Figure 11 This is a flowchart of another recommended method provided in an embodiment of the present application. Figure 12 This is a schematic diagram of the structure of a recommendation model provided in the embodiment of the present application, see Figure 11 and Figure 12The recommendation model includes a coding layer, a feature cross layer and at least one network layer, wherein the coding layer is used to encode the data of the object and the data of the resource to obtain feature data; the feature cross layer is used to determine the second cross feature based on the feature data; and the at least one network layer is used to determine the matching parameter based on the second cross feature.
[0177] The method includes:
[0178] 1101. The computer device encodes the object data and resource data through the encoding layer to obtain feature data.
[0179] Among them, the data of the object may include age, gender, interests, work, historical purchased products, historical clicked products, etc., and the data of the resource may include the type of resource, sales quantity, sales value, rating, click-through rate and conversion rate, etc.
[0180] In addition, in addition to object and resource data, the data acquired by the computer device may also include context data, including the current time, the location of the object, the mood of the object, the current season, the duration of the resource, etc.
[0181] The feature data includes at least two feature groups of an object feature group, a resource feature group, and a context feature group, the object feature group includes features of the object, the resource feature group includes features of the resource, the context features include context features, the context features represent at least one of a state of the object and a state of the resource, and the features in the feature data include sub-features corresponding to each feature group.
[0182] In one possible implementation, a mapping table is provided in the coding layer, which includes features corresponding to each type of data. After obtaining the object data, resource data, and context data, the features corresponding to each type of data can be determined according to the mapping table, thereby obtaining feature data.
[0183] 1102. The computer device intersects the first sub-feature and the second sub-feature for a feature pair including a first feature and a second feature through a feature intersection layer to obtain a first intersection feature of the feature pair, where the first sub-feature is a sub-feature in the first feature corresponding to the feature group to which the second feature belongs, and the second sub-feature is a sub-feature in the second feature corresponding to the feature group to which the first feature belongs; and determines a second intersection feature of the object and the resource based on the first intersection features of at least two feature pairs.
[0184] 1103. The computer device determines a matching parameter based on the second cross-feature through at least one network layer.
[0185] The process of steps 1101-1103 is the same as above Figure 4 and Figure 6The process in the illustrated embodiment is similar and will not be described again here.
[0186] Among them, for different matching parameters, the type of recommendation model is also different. For example, if the matching parameter is click-through rate, the recommended model is a click-through rate prediction model; or, if the matching parameter is conversion rate, the recommended model is a conversion rate prediction model; or, if the matching parameter is input value, the recommended model is an input value prediction model, etc.
[0187] In addition, the at least one network layer may include a fully connected layer, an activation layer, an output layer, etc., which is not limited in this embodiment of the present application.
[0188] The method provided in the embodiment of the present application introduces the concept of feature groups, and each feature in the feature data includes sub-features corresponding to each feature group. When the same feature is crossed with other features, the sub-features corresponding to the feature group to which the other feature belongs will be selected for crossing. Therefore, for different feature groups, the sub-features involved in the crossing in the features are not shared, thereby improving the fitting ability of the recommendation model, so that the recommendation model can accurately learn the interaction between objects and resources by determining the cross-features between objects and resources, thereby improving the recommendation accuracy.
[0189] In one possible implementation, see Figure 13 The recommendation model further includes a first weight extraction layer for determining a first weight for each feature pair based on the feature data. The first weight extraction layer can be an MLP (Multilayer Perceptron) or a network layer of other structures.
[0190] Therefore, the method also includes: the computer device determines the first weight of each feature pair based on the feature data through the first weight extraction layer, and the process of "determining the second cross-features of the object and the resource based on the first cross-features of at least two feature pairs" in step 1102 includes: based on the first weight of each feature pair, weighted fusion of the first cross-features of at least two feature pairs is performed to obtain the second cross-feature.
[0191] The method provided in the embodiment of the present application sets a first weight extraction layer in the recommendation model. Through the first weight extraction layer, based on the feature data, the personalized first weight of each feature is determined, instead of setting a fixed first weight. For different objects or different resources, the matching first weight can be dynamically learned according to the feature data, thereby improving the accuracy of the first weight. Moreover, this solution is more suitable for the personalized needs of large-scale data scenarios.
[0192] In another possible implementation, see Figure 14The recommendation model also includes a second weight extraction layer, which is used to determine the second weight of each feature in the feature data based on the feature data; the feature cross layer is also used to perform weighted fusion on at least two features in the feature data based on the second weight of each feature in the feature data to obtain a third cross feature; at least one network layer is also used to determine matching parameters based on the second cross feature and the third cross feature.
[0193] The second weight extraction layer may be an MLP or a network layer of other structures.
[0194] The method provided in the embodiment of the present application sets a second weight extraction layer in the recommendation model. Through the second weight extraction layer, a personalized second weight for each feature is determined based on the feature data, instead of setting a second weight with a fixed value. This method can dynamically learn the matching second weight according to the feature data for different objects or different resources, thereby improving the accuracy of the second weight. In addition, this solution is more suitable for the personalized needs of large-scale data scenarios.
[0195] In another possible implementation, the method further includes training a recommendation model, namely, training the recommendation model based on the sample object data, the sample resource data, and the sample label, wherein the sample label indicates whether the sample resource matches the sample object. For example, the sample label may indicate whether the sample resource is suitable for recommendation to the sample object, whether the sample object clicked on the sample resource after the sample resource was recommended to the sample object, or whether the sample object performed a conversion operation on the sample resource after the sample resource was recommended to the sample object. The sample label may represent different content for different types of matching parameters.
[0196] The sample object is similar to the object in the above embodiment, and the sample resource is similar to the resource in the above embodiment. The sample label may include a first label and a second label. The first label indicates that the sample resource matches the sample object, and the second label indicates that the sample resource does not match the sample object.
[0197] In one possible implementation, training a recommendation model based on sample object data, sample resource data, and sample labels includes:
[0198] The data of the sample object and the data of the sample resource are input into the recommendation model, and the matching parameters of the sample object and the sample resource are determined by the recommendation model. Based on the matching parameters and the sample label, the model parameters of the recommendation model are adjusted so that the matching parameters determined by the adjusted recommendation model are more matched with the sample label, thereby obtaining a trained recommendation model after one or more adjustments.
[0199] Exemplarily, based on the matching parameters and the sample label, the model parameters of the recommendation model are adjusted so that the matching parameters determined by the adjusted recommendation model are more matched with the sample label, including: based on the error between the matching parameters and the sample label, determining a loss value, the loss value is positively correlated with the error, and adjusting the model parameters of the recommendation model with the goal of making the loss value approach the minimum value.
[0200] The model parameters of the recommendation model may include parameters within each layer of the recommendation model, or parameters between any two layers. Examples include the mapping table in the encoding layer and the linear transformation parameters in the first weight extraction layer. After training, the model parameters in the recommendation model gradually become more accurate. The recommendation model learns an accurate method for determining matching parameters based on feature data. Therefore, each time the model is trained, it can determine the matching parameters corresponding to the feature data, thereby accurately making recommendations.
[0201] Since the recommendation model introduces the concept of feature groups, each feature in the feature data includes sub-features corresponding to each feature group. When the same feature is crossed with other features, the sub-features corresponding to the feature group to which the other feature belongs will be selected for crossing. Therefore, for different feature groups, the sub-features involved in the crossing are not shared, thereby improving the fitting ability of the recommendation model. Through training, the recommendation model can accurately learn the interaction between objects and resources, thereby improving the recommendation accuracy.
[0202] In addition, this embodiment of the application also uses the AUC (Area Under Curve) metric to evaluate the performance of the recommendation model. AUC values range from 0 to 1, with higher values indicating better model performance. Experiments have shown that the performance of the recommendation model using GEFN in this embodiment of the application is superior, exceeding that of recommendation models in related technologies.
[0203] Based on the above embodiment, the following embodiment uses the recommendation model as a click-through rate prediction model to explain the recommendation method in detail. Figure 14 This is a flowchart of another recommended method provided in the embodiment of the present application, see Figure 14 , the method is as follows Figure 1 The server 102 shown is executed based on a click-through rate prediction model. The click-through rate prediction model includes an encoding layer, a feature intersection layer, and a click-through rate prediction layer. The method includes:
[0204] 1401. The server encodes the user data, resource data, and context data through the encoding layer in the click rate prediction model to obtain feature data.
[0205] The user is the user to whom the terminal belongs, and the server can determine the user based on information such as the user account and the terminal's phone number.
[0206] 1402. The server crosses the first sub-feature and the second sub-feature for a feature pair including the first feature and the second feature through the feature cross layer in the click-through rate prediction model to obtain a first cross feature of the feature pair, where the first sub-feature is a sub-feature of the first feature that corresponds to the feature group to which the second feature belongs, and the second sub-feature is a sub-feature of the second feature that corresponds to the feature group to which the first feature belongs.
[0207] 1403. The server performs weighted fusion of the first cross features of at least two feature pairs based on the first weight of each feature pair through the feature cross layer in the click rate prediction model to obtain a second cross feature.
[0208] Exemplarily, the click-through rate prediction model further includes a first weight extraction layer, through which a first weight of each feature pair can be determined based on the feature data.
[0209] 1404. The server determines a click-through rate based on the second cross-feature through the click-through rate prediction layer in the click-through rate prediction model. The click-through rate represents the probability that the user clicks on the resource after the resource is recommended to the user.
[0210] Exemplarily, the click-through rate prediction layer may include a network layer of any structure, such as a fully connected layer, an activation layer, and an output layer, which is not limited in this embodiment of the present application.
[0211] 1405. When the server determines that the click rate is greater than a threshold, the server sends the resource to the terminal.
[0212] 1406. After receiving the resource, the terminal displays the resource.
[0213] Exemplarily, the click-through rate prediction model also includes a second weight extraction layer, which is used to determine the second weight of each feature in the feature data based on the feature data; the feature cross layer is also used to perform weighted fusion on at least two features in the feature data based on the second weight of each feature in the feature data to obtain a third cross feature; the click-through rate prediction layer is also used to determine the click-through rate based on the second cross feature and the third cross feature.
[0214] Exemplarily, the method further includes a process of training a click-through rate prediction model, namely, training the click-through rate prediction model based on the data of the sample user, the data of the sample resource, and the sample label, wherein the sample label indicates whether the sample user clicked on the sample resource after the sample resource was recommended to the sample user. The sample label may include a first label and a second label, wherein the first label indicates that the sample user clicked on the sample resource after the sample resource was recommended to the sample user, and the second label indicates that the sample user did not click on the sample resource after the sample resource was recommended to the sample user.
[0215] In one possible implementation, training a click-through rate prediction model based on sample user data, sample resource data, and sample labels includes:
[0216] The data of sample users and sample resources are input into the click-through rate prediction model, and the click-through rate of the sample users and sample resources is determined by the click-through rate prediction model. Based on the click-through rate and the sample label, the model parameters of the click-through rate prediction model are adjusted so that the click-through rate determined by the adjusted click-through rate prediction model is more consistent with the sample label, thereby obtaining a trained click-through rate prediction model after one or more adjustments.
[0217] Exemplarily, based on the click-through rate and the sample label, the model parameters of the click-through rate prediction model are adjusted so that the click-through rate determined by the adjusted click-through rate prediction model better matches the sample label, including: based on the error between the click-through rate and the sample label, determining a loss value, the loss value is positively correlated with the error, and adjusting the model parameters of the click-through rate prediction model with the goal of making the loss value approach the minimum value.
[0218] above Figure 14 The embodiment shown is described by taking the click rate prediction model as an example. In other embodiments, the recommendation model can also be a conversion rate prediction model, an investment value prediction model, etc. For other recommendation models, the processing process is the same as the above. Figure 14 The same is true for the embodiment shown, which will not be described again here.
[0219] Figure 15 This is a schematic diagram of a recommended device provided in the embodiment of the present application. Figure 15 , the device comprises:
[0220] Feature acquisition module 1501 is configured to acquire feature data, the feature data including at least two feature groups selected from an object feature group, a resource feature group, and a context feature group, wherein the object feature group includes features of the object, the resource feature group includes features of the resource, and the context feature includes context features, wherein the context feature represents at least one of a state of the object and a state of the resource, and the features in the feature data include sub-features corresponding to each feature group;
[0221] A first intersection module 1502 is configured to intersect a first sub-feature with a second sub-feature for a feature pair including a first feature and a second feature in the feature data to obtain a first intersection feature of the feature pair, where the first sub-feature is a sub-feature of the first feature that corresponds to the feature group to which the second feature belongs, and the second sub-feature is a sub-feature of the second feature that corresponds to the feature group to which the first feature belongs;
[0222] A second intersection module 1503 is configured to determine a second intersection feature between the object and the resource based on the first intersection feature of each feature pair in the feature data;
[0223] The parameter determination module 1504 is configured to determine the matching parameters between the object and the resource based on the second intersection feature.
[0224] Optionally, the first intersection module 1502 is configured to determine a Hadar product of the first sub-feature and the second sub-feature as a first intersection feature of the feature pair.
[0225] Alternatively, see Figure 16 The second cross-connect module 1503 includes:
[0226] The weighted cross unit 1513 is configured to perform weighted fusion on the first cross features of at least two feature pairs based on the first weight of each feature pair to obtain a second cross feature.
[0227] Alternatively, see Figure 16 , the device further comprises:
[0228] A third cross module 1505 is configured to perform weighted fusion on at least two features in the feature data based on a second weight of each feature in the feature data to obtain a third cross feature;
[0229] The parameter determination module 1504 is configured to determine matching parameters based on the second cross-feature and the third cross-feature.
[0230] Optionally, the recommendation model includes an encoding layer, a feature cross layer, and at least one network layer;
[0231] The encoding layer is used to encode the object data and resource data to obtain feature data;
[0232] A feature cross layer, for determining a second cross feature based on the feature data;
[0233] At least one network layer is configured to determine a matching parameter based on the second cross-feature.
[0234] Optionally, the recommendation model further includes a first weight extraction layer;
[0235] The first weight extraction layer is used to determine a first weight for each feature pair based on the feature data.
[0236] Optionally, the recommendation model further includes a second weight extraction layer;
[0237] a second weight extraction layer, configured to determine, based on the feature data, a second weight for each feature in the feature data;
[0238] The feature cross layer is further configured to perform weighted fusion on at least two features in the feature data based on a second weight of each feature in the feature data to obtain a third cross feature;
[0239] The at least one network layer is further configured to determine a matching parameter based on the second cross-feature and the third cross-feature.
[0240] Alternatively, see Figure 16 , the device further comprises:
[0241] A training module 1506 is used to train a recommendation model based on the data of sample objects, sample resource data, and sample labels;
[0242] The sample label indicates whether the sample resource is recommended to the sample object.
[0243] Optionally, the matching parameters include at least one of the following:
[0244] Click-through rate, which indicates the probability that an object clicks on a resource;
[0245] Conversion rate: The conversion rate indicates the probability that an object will perform a conversion operation on a resource after clicking on it.
[0246] Input quantity: Input quantity indicates the amount of cost invested by the object for resources.
[0247] It should be noted that the recommendation apparatus provided in the above embodiments is merely illustrated by the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be distributed among different functional modules as needed, i.e., the internal structure of a computer device can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the recommendation apparatus provided in the above embodiments and the recommendation method embodiments share the same concept. The specific implementation process is detailed in the method embodiments and will not be further elaborated here.
[0248] An embodiment of the present application further provides a computer device, which includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the recommended method of the above embodiment.
[0249] Optionally, the computer device is provided as a terminal. Figure 17 A schematic structural diagram of a terminal 1700 provided by an exemplary embodiment of the present application is shown.
[0250] The terminal 1700 includes a processor 1701 and a memory 1702 .
[0251] The processor 1701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0252] Memory 1702 may include one or more computer-readable storage media, which may be non-transitory. Memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1702 is used to store at least one computer program, which is used by processor 1701 to implement the recommended method provided in the method embodiment of this application.
[0253] In some embodiments, terminal 1700 may optionally include a peripheral device interface 1703 and at least one peripheral device. Processor 1701, memory 1702, and peripheral device interface 1703 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1703 via a bus, signal lines, or circuit boards. Optionally, the peripheral device includes at least one of a radio frequency circuit 1704, a display screen 1705, a camera assembly 1706, and a power supply 1707.
[0254] The peripheral device interface 1703 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1701 and the memory 1702. In some embodiments, the processor 1701, the memory 1702, and the peripheral device interface 1703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1701, the memory 1702, and the peripheral device interface 1703 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0255] RF circuit 1704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. RF circuit 1704 communicates with communication networks and other communication devices via electromagnetic signals. RF circuit 1704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. RF circuit 1704 optionally includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. RF circuit 1704 can communicate with other devices via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, RF circuit 1704 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0256] The display screen 1705 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1705 is a touch screen display, the display screen 1705 also has the ability to collect touch signals on the surface or above the surface of the display screen 1705. The touch signal can be input as a control signal to the processor 1701 for processing. At this time, the display screen 1705 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1705, which is set on the front panel of the terminal 1700; in other embodiments, there can be at least two display screens 1705, which are respectively set on different surfaces of the terminal 1700 or in a folding design; in other embodiments, the display screen 1705 can be a flexible display screen, which is set on the curved surface or folding surface of the terminal 1700. Even more, the display screen 1705 can be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1705 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0257] The camera assembly 1706 is used to capture images or videos. Optionally, the camera assembly 1706 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal 1700, and the rear camera is arranged on the back of the terminal 1700. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1706 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0258] Power supply 1707 is used to power various components in terminal 1700. Power supply 1707 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1707 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0259] Those skilled in the art will understand that Figure 17The structure shown in the figure does not constitute a limitation on the terminal 1700, and the terminal 1700 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0260] Optionally, the computer device is provided as a server. Figure 18 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1800 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1801 and one or more memories 1802, wherein the memory 1802 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 1801 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.
[0261] An embodiment of the present application further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed by the recommended method of the above embodiment.
[0262] An embodiment of the present application further provides a computer program product, including a computer program, which is loaded and executed by a processor to implement the operations performed by the recommended method of the above embodiment.
[0263] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0264] The above description is merely an optional embodiment of the embodiments of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included in the scope of protection of the present application.
Claims
1. A recommendation method, characterized in that: The method comprises: Acquiring feature data, the feature data including at least two feature groups of an object feature group, a resource feature group, and a context feature group, the object feature group including features of an object, the resource feature group including features of a resource, the context feature including a context feature, the context feature representing at least one of a state of the object and a state of the resource, and the features in the feature data including sub-features corresponding to each feature group; For a feature pair including a first feature and a second feature in the feature data, intersecting the first sub-feature and the second sub-feature to obtain a first intersecting feature of the feature pair, wherein the first sub-feature is a sub-feature of the first feature corresponding to the feature group to which the second feature belongs, and the second sub-feature is a sub-feature of the second feature corresponding to the feature group to which the first feature belongs; Based on the first intersection feature of each feature pair in the feature data, a second intersection feature between the object and the resource is determined, and based on the second intersection feature, a matching parameter between the object and the resource is determined.
2. The method according to claim 1, characterized in that The step of intersecting the first sub-feature and the second sub-feature to obtain a first intersecting feature of the feature pair includes: The Hadar product of the first sub-feature and the second sub-feature is determined as a first intersection feature of the feature pair.
3. The method according to claim 1, characterized in that The determining, based on the first intersection feature of each feature pair in the feature data, a second intersection feature between the object and the resource, comprises: Based on the first weight of each feature pair, first cross features of at least two feature pairs are weightedly fused to obtain the second cross feature.
4. The method according to claim 1, wherein The method further comprises: performing weighted fusion on at least two features in the feature data based on a second weight of each feature in the feature data to obtain a third cross feature; The determining, based on the second intersection feature, a matching parameter between the object and the resource includes: The matching parameter is determined based on the second intersection feature and the third intersection feature.
5. The method according to any one of claims 1 to 4, characterized in that The recommendation model includes an encoding layer, a feature cross layer, and at least one network layer; The encoding layer is used to encode the data of the object and the data of the resource to obtain the feature data; The feature intersection layer is used to determine the second intersection feature based on the feature data; The at least one network layer is configured to determine the matching parameter based on the second intersection feature.
6. The method according to claim 5, characterized in that The recommendation model further includes a first weight extraction layer; The first weight extraction layer is used to determine a first weight of each feature pair based on the feature data.
7. The method according to claim 5, characterized in that The recommendation model also includes a second weight extraction layer; The second weight extraction layer is configured to determine a second weight of each feature in the feature data based on the feature data; The feature cross layer is further configured to perform weighted fusion on at least two features in the feature data based on a second weight of each feature in the feature data to obtain a third cross feature; The at least one network layer is further configured to determine the matching parameter based on the second intersection feature and the third intersection feature.
8. The method according to claim 5, characterized in that The method further comprises: Training the recommendation model based on the data of the sample objects, the data of the sample resources, and the sample labels; The sample tag indicates whether the sample resource is recommended to the sample object.
9. The method according to any one of claims 1 to 4, characterized in that The matching parameters include at least one of the following: Click-through rate, where the click-through rate represents the probability of the object clicking on the resource; a conversion rate, where the conversion rate represents a probability that the object will perform a conversion operation on the resource after clicking on the resource; The input quantity represents the amount of cost invested by the object for the resource.
10. A recommendation device, characterized in that: The device comprises: a feature acquisition module, configured to acquire feature data, the feature data comprising at least two feature groups selected from an object feature group, a resource feature group, and a context feature group, the object feature group comprising features of an object, the resource feature group comprising features of a resource, the context feature comprising a context feature, the context feature representing at least one of a state of the object and a state of the resource, and the features in the feature data comprising sub-features corresponding to each feature group; a first intersection module, configured to, for a feature pair including a first feature and a second feature in the feature data, intersect a first sub-feature and a second sub-feature to obtain a first intersection feature of the feature pair, wherein the first sub-feature is a sub-feature of the first feature corresponding to the feature group to which the second feature belongs, and the second sub-feature is a sub-feature of the second feature corresponding to the feature group to which the first feature belongs; a second intersection module, configured to determine a second intersection feature between the object and the resource based on the first intersection feature of each feature pair in the feature data; A parameter determination module is used to determine a matching parameter between the object and the resource based on the second intersection feature.
11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the recommendation method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the recommendation method according to any one of claims 1 to 9.
13. A computer program product comprising a computer program, characterized in that The computer program is loaded and executed by a processor to implement the operations performed by the recommendation method according to any one of claims 1 to 9.