A resource recommendation method and device, computer equipment, medium and product
By obtaining the embedding vectors and enhancement vectors of objects and candidate resources for feature extraction and cross-feature fusion, the problem of insufficient recommendation accuracy in multimedia data recommendation systems is solved, achieving higher recommendation resource matching degree and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-06-07
- Publication Date
- 2026-06-19
AI Technical Summary
In multimedia data recommendation systems, retrieving user-matched data from massive datasets to improve recommendation accuracy is a challenge.
By obtaining the embedding vectors and enhancement vectors of objects and candidate resources, feature extraction and cross-feature fusion are performed to determine recommended resources.
It improves the accuracy of recommended resources, ensures that recommended resources are more closely matched with the target audience, and enhances the user experience.
Smart Images

Figure CN119106178B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a resource recommendation method, apparatus, computer equipment, medium, and product. Background Technology
[0002] With the rapid development of electronic and internet technologies, multimedia data has also developed rapidly. Users can browse various types of multimedia data through various multimedia platforms. Currently, after receiving a user's recommendation request, a data recommendation system, faced with such a massive amount of multimedia data, will first recall a portion of the multimedia data to make recommendations to the user based on this data. Therefore, how to recall data that matches the target audience from a large amount of multimedia data has become a current research hotspot. Summary of the Invention
[0003] This application provides a resource recommendation method, apparatus, computer equipment, medium, and product that can comprehensively select recommended resources based on multi-dimensional features, effectively improving the accuracy of determining recommended resources and filtering out more suitable recommended resources for the target.
[0004] In a first aspect, embodiments of this application provide a resource recommendation method, including:
[0005] Obtain the object embedding vector of the object and the target object augmentation vector; the object embedding vector is used to represent the object, and the target object augmentation vector is obtained by feature fitting of the resources operated on by the object;
[0006] Obtain the resource embedding vector and target resource enhancement vector for each candidate resource in the candidate resource set for the object; the resource embedding vector of any candidate resource is used to characterize the candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object;
[0007] Feature extraction is performed on the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object; feature extraction is performed on the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource.
[0008] Based on the object feature vector and the resource feature vector of each candidate resource, recommended resources are determined from the candidate resource set, and resource recommendations are made for the object based on the recommended resources.
[0009] Secondly, embodiments of this application provide a resource recommendation device, including:
[0010] The first acquisition unit is used to acquire the object embedding vector of the object and the target object enhancement vector; the object embedding vector of the object is used to represent the object, and the target object enhancement vector is obtained by feature fitting of the resources operated on by the object;
[0011] The second acquisition unit is used to acquire the resource embedding vector and the target resource enhancement vector of each candidate resource in the candidate resource set for the object; the resource embedding vector of any candidate resource is used to characterize the candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object;
[0012] The extraction unit is used to extract features from the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object; and to extract features from the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource.
[0013] The recommendation unit is used to determine recommended resources from the candidate resource set based on the object feature vector and the resource feature vector of each candidate resource, and to recommend resources to the object based on the recommended resources.
[0014] Thirdly, embodiments of this application provide a computer device including a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute some or all of the steps in the above method.
[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, are used to perform some or all of the steps in the above-described method.
[0016] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes program instructions that, when executed by a processor, can implement some or all of the steps in the above-described method.
[0017] This application embodiment can obtain the object embedding vector and the target object enhancement vector of an object. The object embedding vector is used to represent the object, and the target object enhancement vector is obtained by feature fitting of the resources operated on by the object. It can also obtain the resource embedding vector and the target resource enhancement vector of each candidate resource in the candidate resource set for the object. The resource embedding vector of any candidate resource is used to represent any candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object. Furthermore, feature extraction can be performed on the object embedding vector and the target object enhancement vector to obtain the object feature vector of the object. Feature extraction can also be performed on the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource. Therefore, based on the object feature vector and the resource feature vector of each candidate resource, recommended resources can be determined from the candidate resource set, and resource recommendations can be made for the object based on these recommended resources. In summary, it can be seen that multi-dimensional features can be comprehensively considered for the selection of recommended resources, effectively improving the accuracy of determining recommended resources and selecting more suitable recommended resources for the object. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the architecture of a resource recommendation system provided in an embodiment of this application;
[0020] Figure 2 This is a flowchart illustrating a resource recommendation method provided in an embodiment of this application;
[0021] Figure 3a This is a schematic diagram of the structure of a data processing network provided in an embodiment of this application;
[0022] Figure 3b This is a schematic diagram of another data processing network structure provided in an embodiment of this application;
[0023] Figure 3c This is a schematic diagram of the structure of another data processing network provided in the embodiments of this application;
[0024] Figure 3d This is a schematic diagram of the structure of another data processing network provided in the embodiments of this application;
[0025] Figure 4a This is a schematic diagram illustrating the training of a data processing network according to an embodiment of this application;
[0026] Figure 4b This is a flowchart illustrating another resource recommendation method provided in an embodiment of this application;
[0027] Figure 5a This is a schematic diagram illustrating another method for training a data processing network, as provided in an embodiment of this application.
[0028] Figure 5b This is a flowchart illustrating another resource recommendation method provided in an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of the structure of a resource recommendation device provided in an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0032] The following is a brief introduction to the relevant terms and concepts involved in the embodiments of this application:
[0033] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, 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 attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0034] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0035] Computer vision (CV) is a science that studies how to enable machines to "see." More specifically, it refers to using cameras and computers to replace human eyes in recognizing and measuring targets, and then performing image processing to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), resource recommendation, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), and common biometric vector recognition technologies such as facial recognition and fingerprint recognition.
[0036] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0037] Based on the aforementioned artificial intelligence and other technologies, this application proposes a resource recommendation scheme. Specifically, the scheme's general principle is as follows: It can obtain the object embedding vector and the target object enhancement vector of an object. The object embedding vector can be used to represent the object, and the target object enhancement vector is obtained by feature fitting of the resources operated on by the object. It can also obtain the resource embedding vector and the target resource enhancement vector of each candidate resource in the candidate resource set for the object. The resource embedding vector of any candidate resource can be used to represent any candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object. After obtaining these vectors, recommended resources for the object can be determined from the candidate resource set based on these vectors, and resource recommendations can be made for the object based on these recommended resources.
[0038] In one embodiment, feature extraction can be performed on the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object; and feature extraction can be performed on the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource; and then, based on the object feature vector and the resource feature vector of each candidate resource, recommended resources can be determined from the candidate resource set.
[0039] Through the above implementation methods, the object feature vector of an object can be obtained by utilizing the object embedding vector of the object and the target object augmentation vector of the resource operated by the object. This ensures that the object feature vector includes not only the features of the object itself but also the features of the resource operated by the object; that is, the object feature vector includes features from both the object and resource dimensions, thereby effectively improving the feature representation effect for the object. Furthermore, feature cross-referencing of the object and resource features can be performed before feature extraction, further enhancing the object's feature representation effect. Similarly, the resource feature vector of a resource can be obtained by utilizing the resource embedding vector of the resource and the target resource augmentation vector of the object. This ensures that the resource feature vector includes not only the features of the candidate resource itself but also the features of the object; that is, the resource feature vector includes features from both the object and resource dimensions, thereby effectively improving the feature representation effect for the resource. Moreover, feature cross-referencing of the object and resource features can be performed before feature extraction, further enhancing the resource's feature representation effect. Therefore, when determining recommended resources by using the feature vectors of objects with good representation effects and the feature vectors of resources, we can combine multi-dimensional features to select recommended resources, which can effectively improve the accuracy of determining recommended resources, select more suitable recommended resources for objects, thereby effectively increasing the consumption of recommended resources and improving the object experience.
[0040] In practical implementation, the entity executing the resource recommendation scheme mentioned above can be a computer device, which can be a terminal or a server. The terminal mentioned here can be a smartphone, tablet, laptop, desktop computer, or other devices, or peripheral devices such as a gamepad or touchscreen; the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, etc.
[0041] For example, when the computer device is a server, embodiments of this application provide a resource recommendation system, such as... Figure 1 As shown, the resource recommendation system may include at least one terminal and at least one server; the terminal may obtain a resource recommendation request for a target and upload the obtained resource recommendation request to the server (i.e., computer device), so that the server may respond to the resource recommendation request and recommend resources to the target based on the resource recommendation scheme.
[0042] Based on the resource recommendation scheme provided above, this application embodiment provides a resource recommendation method, which can be executed by the aforementioned computer device. Please refer to... Figure 2 The resource recommendation method includes, but is not limited to, the following steps:
[0043] S201, obtain the object embedding vector of the object and the target object enhancement vector.
[0044] Here, "object" can refer to any user, and the object embedding vector of an object can be used to represent the object. The target object augmentation vector can be obtained by feature fitting of the resources operated on by the object. Feature fitting of the resources operated on by the object can be understood as fitting the features of the resources operated on by the object. Based on this, it can be seen that, to a certain extent, the target object augmentation vector can represent the resources operated on by the object. The target object augmentation vector can be obtained from a vector library, which stores a large number of target object augmentation vectors corresponding to objects.
[0045] In one implementation, the specific implementation of obtaining the object embedding vector of an object can be: obtaining the object information of the object, which can be used to represent the information of the object. The object information can be attribute information of the object. For example, the object information can include one or more object sub-information, which can include one or more of the object's identifier (ID), gender, age, hobbies, etc. After obtaining the object information, the object information can be embedded to obtain the object embedding vector that has the ability to represent the object.
[0046] Optionally, the embedding of object information can be implemented as follows: First, discrete features of the object information can be obtained, which are sparse discrete features. Each object sub-information can be represented by a discrete feature; for example, the object's gender can correspond to a discrete feature, and the object's age can correspond to a discrete feature. It is understood that the discrete features corresponding to one or more object sub-information can be combined to form the discrete features of the object information. It is important to understand that discrete features are high-dimensional vectors. To improve the processing speed of the data processing network, the discrete features of the object can be reduced in dimensionality to a lower-dimensional space (such as 64-dimensional or 32-dimensional). The dimensionality-reduced discrete features can then be used as the object embedding vector. In one embodiment, the specific implementation of reducing the dimensionality of the object's discrete features to obtain the corresponding object embedding vector can be: an embedding vector (e.g., a 64-dimensional embedding vector) can be queried from the dictionary for each object sub-information included in the discrete features. Then, the object embedding vector is obtained by combining the embedding vectors corresponding to each discrete feature. Here, "combination" can refer to concatenation processing.
[0047] In one implementation, obtaining the object embedding vector can be achieved through a network, such as an object embedding network. This object embedding network can be a standalone network or a sub-network within a data processing network; there is no limitation on this. Specifically, the object information can be input into the object embedding network to perform embedding processing on the object information, thereby obtaining the object embedding vector. For an understanding of the data processing network, please refer to the relevant description below.
[0048] S202, obtain the resource embedding vector and target resource enhancement vector for each candidate resource in the candidate resource set for the target.
[0049] In this context, the resource embedding vector of any candidate resource can be used to represent that candidate resource; the target resource enhancement vector is obtained by feature fitting of the object, which can be understood as fitting the object's features; based on this, it can be seen that, to a certain extent, the target resource enhancement vector can represent the object. This target resource enhancement vector can be obtained from a vector library, which stores a large number of target resource enhancement vectors corresponding to various resources. The vector library here can be the same as the one in step S201, or it can be a different library; there is no limitation on this. The candidate resource set can be resources in a resource library, which stores a large number of resources to facilitate resource recommendations for objects with resource recommendation needs. The resources in this resource library can be advertisements, information, items, commodities, etc., without specific limitations.
[0050] In one implementation, obtaining the resource embedding vector of any candidate resource can be achieved by: obtaining the resource information of any candidate resource, which can be used to characterize the information of any candidate resource. The resource information can be attribute information for any candidate resource. For example, the resource information can include one or more resource sub-information, which can include one or more of the resource's identifier, name, type, etc. After obtaining the resource information, the resource information can be embedded to obtain a resource embedding vector that has the ability to characterize any candidate resource.
[0051] Optionally, the embedding of resource information can be implemented as follows: First, the discrete features of the resource information of any candidate resource can be obtained. These discrete features are sparse discrete features. A resource sub-information can be represented by a discrete feature; for example, the name of a resource can correspond to a discrete feature, and the type of a resource can correspond to a discrete feature. It is known that the discrete features corresponding to one or more resource sub-information can be combined to form the discrete features of the resource information of any candidate resource. Then, the discrete features of any candidate resource can be dimensionality-reduced to obtain the resource embedding vector of that candidate resource. In one embodiment, the specific implementation of dimensionality reduction of the discrete features of any candidate resource to obtain the corresponding resource embedding vector can be: an embedding vector (e.g., a 64-dimensional embedding vector) can be queried from a dictionary for each discrete feature corresponding to a resource sub-information included in the discrete features, and then the resource embedding vector is obtained by combining the embedding vectors corresponding to each discrete feature.
[0052] In one implementation, obtaining the resource embedding vector of any candidate resource can be achieved through a network, such as a resource embedding network. This resource embedding network can be an independent network or a sub-network within a data processing network. Specifically, the resource information of any candidate resource can be input into the resource embedding network to perform embedding processing on the resource information, thereby obtaining the resource embedding vector.
[0053] In one embodiment, when the object embedding network and the resource embedding network are sub-networks in a data processing network, the data processing network can be as follows: Figure 3a As shown, this data processing network can be constructed using the concept of a dual-tower network. One tower can be understood as the object tower (or User Tower), and the other tower can be understood as the resource tower (or Item Tower). For the object tower, the input information can be about the object, so as to use this information to characterize the object. For the resource tower, the input information can be about the resource, so as to use this information to characterize the resource.
[0054] For example, see Figure 3a The data processing network shown may include two branch networks, which can be referred to as the object branch network and the resource branch network, respectively. The object branch network can be understood as an object pyramid, and the resource branch network as a resource pyramid. The object branch network is used to determine the object feature vectors of objects, and the resource branch network is used to determine the resource feature vectors of resources. The aforementioned object embedding network may be included within the object branch network, and the resource embedding network may be included within the resource branch network. For an understanding of the other sub-networks in this data processing network, please refer to the relevant descriptions below.
[0055] The following section elaborates on the acquisition of the target object enhancement vector in step S201 and the target resource enhancement vector in step S202.
[0056] In one implementation, the target object augmentation vector obtained by feature fitting of the resources operated on by the object, and the target resource augmentation vector obtained by feature fitting of the object, can be obtained by calling a data processing network, specifically during the training process of the data processing network. It should be understood that the data processing network in this embodiment adopts a dual-tower structure, where the two towers can be an object tower and a resource tower, respectively, which can be understood as the object branch network and the resource branch network in the data processing network. During training, for multiple sample data used to train the data processing network, any sample data can include sample object information of a sample object and sample resource information of the sample resources operated on by that sample object. To train the data processing network, the sample object embedding vector of the sample object information and the sample resource embedding vector of the sample resource information in each sample data can be determined first.
[0057] The sample object embedding vector can be used as the input to the object branch network, and the sample resource embedding vector can be used as the input to the resource branch network. In this embodiment, when training the data processing network, an augmentation vector can be added to the input of both the object branch network and the resource branch network. For example, the augmentation vector on the object branch network side can be called the object augmentation vector, and the augmentation vector on the resource branch network side can be called the resource augmentation vector. The data processing network is trained using the sample object embedding vector, the sample resource embedding vector, and the two augmentation vectors. During training, each sample object corresponds to one object augmentation vector, and each sample resource corresponds to one resource augmentation vector.
[0058] In the data processing network, the two augmentation vectors are updated as the network trains. Once the network is trained, both vectors are updated. For ease of description, the updated object augmentation vector can be called the target object augmentation vector, and the updated resource augmentation vector can be called the target resource augmentation vector. After obtaining the target object augmentation vector and the target resource augmentation vector, the target object augmentation vector can be associated with its corresponding sample object and stored in a vector library, and the target resource augmentation vector can be associated with its corresponding sample resource and stored in a vector library.
[0059] It's also important to understand that in data processing networks, object augmentation vectors can be updated based on the output of resource branch networks, with the goal of minimizing the difference between the object augmentation vector and the resource branch network's output. The output of the resource branch network is the feature vector of the sample resource (which can be called the sample resource feature vector). In other words, the object augmentation vector is fitting the output of the resource branch network, or fitting the feature vector of the sample resource. Therefore, the continuously updated object augmentation vector can carry information from the feature vector of the sample resource as output by the resource branch network. Based on this, we can conclude that the target object augmentation vector of an object is obtained by feature fitting the resource's feature vector.
[0060] Similarly, the resource augmentation vector can be updated based on the output of the object branch network, and the goal of the update is to minimize the difference between the resource augmentation vector and the output of the object branch network. Here, the output of the object branch network is the feature vector of the sample object (which can be called the sample object feature vector). That is, the resource augmentation vector is fitting the output of the object branch network, or in other words, fitting the feature vector of the sample object. It can be seen that the continuously updated resource augmentation vector can carry information from the feature vector of the sample object as output by the object branch network. Based on this, it can be concluded that the target resource augmentation vector of a resource is obtained by feature fitting the object's feature vector.
[0061] It should be noted that the embedding vector involved in the embodiments of this application can be a representation of an entity (such as an object, resource, or behavior); the feature vector can refer to the deep semantic features of an entity. For example, an object embedding feature is a representation obtained based on the object information of an object, and an object feature vector is a semantic feature extracted after semantic understanding of the object information.
[0062] S203, perform feature extraction on the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object; perform feature extraction on the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource.
[0063] In one implementation, the specific implementation of step S203 can be obtained by calling a data processing network, for example, such as... Figure 3a or Figure 3b As shown. Based on this, the specific implementation of step S203 can be as follows: by calling the object branch network in the data processing network to extract features from the object embedding vector and the target object enhancement vector of the object, so as to obtain the object feature vector of the object; and by calling the resource branch network in the data processing network to extract features from the resource embedding vector and the target resource enhancement vector of each candidate resource, so as to obtain the resource feature vector of each candidate resource.
[0064] In one implementation, the object branch network may include an object feature vector network, and the resource branch network may include a resource feature vector network; for example, see [link to relevant documentation]. Figure 3a or Figure 3b As shown. In this case, the specific implementation of step S203 can be as follows: input the object embedding vector and the target object enhancement vector of the object into the object feature vector network in the object branch network, so as to extract features from the object embedding vector and the target object enhancement vector of the object through the object feature vector network to obtain the object feature vector of the object; and input the resource embedding vector and the target resource enhancement vector of each candidate resource into the resource feature vector network, so as to extract features from the resource embedding vector and the target resource enhancement vector of each candidate resource by calling the resource feature vector network respectively to obtain the resource feature vector of each candidate resource.
[0065] In one implementation, for a given object feature vector, the object embedding vector and the target object augmentation vector can be merged to obtain the target object embedding vector; then, feature extraction is performed on the target object embedding vector to obtain the object feature vector.
[0066] In this context, it is understandable that, for the object branch network, the input data for the object branch network includes two vectors (object embedding vector and target object augmentation vector). These two vectors can be merged first, and then feature extraction can be performed on the merged vector to obtain the object feature vector.
[0067] Based on this, it can be concluded that, for object branch networks, such as Figure 3cAs shown, the object branching network can include an object merging network and an object feature vector extraction network. The object merging network can merge the object embedding vector and the target object augmentation vector to obtain the target object embedding vector. The object feature vector extraction network can extract features from the target object embedding vector to obtain the object feature vector. Therefore, the specific implementation of determining the object feature vector based on the object branching network can be as follows: First, the object embedding vector and the target object augmentation vector can be input into the object merging network in the object branching network to merge them and obtain the target object embedding vector. Then, the target object embedding vector can be input into the object feature vector extraction network in the object branching network to extract features from the target object embedding vector and obtain the object feature vector.
[0068] In one implementation, for determining the resource feature vector of any candidate resource, the resource embedding vector and the target resource enhancement vector of any candidate resource can be merged to obtain the target resource embedding vector of any candidate resource; then, feature extraction is performed on the target resource embedding vector to obtain the resource feature vector of any candidate resource.
[0069] In this context, it is understandable that, for the resource branch network, the input data includes two vectors (resource embedding vector and target resource enhancement vector). These two vectors can be merged first, and then feature extraction can be performed on the merged vector to obtain the resource feature vector.
[0070] Based on this, it can be concluded that, for resource branch networks, such as Figure 3cAs shown, the resource branching network can include a resource merging network and a resource feature vector extraction network. For any candidate resource in the candidate resource set, the resource merging network can be used to merge the resource embedding vector and the target resource enhancement vector of any candidate resource to obtain the target resource embedding vector of any candidate resource; the resource feature vector extraction network can be used to extract features from the target resource embedding vector of any candidate resource to obtain the resource feature vector of any candidate resource. Therefore, the specific implementation of determining the resource feature vector of any candidate resource based on the resource branching network can be as follows: First, the resource embedding vector and the target resource enhancement vector of any candidate resource can be input into the resource merging network in the resource branching network to merge the resource embedding vector and the target resource enhancement vector of any candidate resource, thereby obtaining the target resource embedding vector of any candidate resource; then, the target resource embedding vector of any candidate resource can be input into the resource feature vector extraction network in the resource branching network to extract features from the target resource embedding vector of any candidate resource, thereby obtaining the resource feature vector of any candidate resource.
[0071] As can be seen from the above, the object feature vector of an object is obtained by extracting features from the object embedding vector of the object and the target object augmentation vector. The object embedding vector of the object can represent the object, and the target object augmentation vector can represent the resource operated by the object. Therefore, the object feature vector of the object can not only contain the features of the object itself, but also the features of the resource operated by the object. That is, the object feature vector can contain features of both the object and the resource, thereby effectively improving the feature representation effect of the object.
[0072] Similarly, the resource feature vector of a candidate resource is obtained by extracting features from the resource embedding vector of the candidate resource and the target resource enhancement vector. The resource embedding vector of the candidate resource can represent the candidate resource, and the target resource enhancement vector can represent the object. Therefore, the resource feature vector of the candidate resource can not only contain the features of the candidate resource itself, but also the features of the object. That is, the resource feature vector can contain features of both the object and the resource, thereby effectively improving the feature representation effect of the resource.
[0073] In one implementation, to obtain the object feature vector of an object, the object feature vector can also be determined by combining the object's behavioral information on candidate resources. This behavioral information can include one or more operational behaviors, such as clicking, downloading, saving, sharing, liking, disliking, and playing on candidate resources. Based on this, the behavior embedding vector corresponding to the object's behavioral information can also be obtained. The object feature vector of the object can then be determined based on the object embedding vector, the target object enhancement vector, and the behavior embedding vector. The behavior embedding vector is used to characterize the object's operational behavior on candidate resources.
[0074] In one implementation, the specific implementation for obtaining the behavior embedding vector of an object can be:
[0075] First, the object's behavioral information can be obtained. This behavioral information may include one or more operational behaviors. This behavioral information can be behavioral information within a historical time period, which can be a period preceding the current time and within a preset time interval (e.g., 7 days, 10 days, etc.). Here, the current time can refer to the moment when the object's resource recommendation request is detected. After obtaining the object's behavioral information, the corresponding discrete features can be determined. Finally, the discrete features can be reduced in dimensionality to obtain the object's behavioral embedding vector. The implementation principle of obtaining the behavioral embedding vector corresponding to the behavioral information is similar to the implementation principle of the resource embedding vector or object embedding vector mentioned above, and its specific implementation will not be elaborated here. It is important to understand that if the object's behavioral information regarding resources (or historical interaction information) is continuous, then when determining the discrete features corresponding to the behavioral information, the continuous feature vector of the behavioral information is first determined, and then this continuous feature vector needs to be discretized to obtain the discrete features of the behavioral information.
[0076] In one implementation, obtaining the object's behavior embedding vector can be achieved through a network, such as a behavior embedding network. This behavior embedding network can be a standalone network or a sub-network within a data processing network. Specifically, the object's behavior information can be input into this behavior embedding network to perform embedding processing, thereby obtaining the object's behavior embedding vector.
[0077] In this context, step S203 can be implemented by: obtaining the object's behavior embedding vector, and performing feature extraction on the object embedding vector, the target object augmentation vector, and the behavior embedding vector to determine the object's object feature vector. This can also be achieved using the aforementioned object branch network. Specifically, the object embedding vector, the target object augmentation vector, and the behavior embedding vector can be input into the object branch network to extract features from these vectors, thus obtaining the object's object feature vector.
[0078] In one embodiment, the object embedding vector, target object augmentation vector, and behavior embedding vector of the object can be merged first to obtain the target object embedding vector of the object. Then, feature extraction can be performed on the target object embedding vector to obtain the object feature vector of the object. This can also be implemented using the object branch network described above. Specifically, the object embedding vector, target object augmentation vector, and augmented behavior vector of the object can be input into the object merging network in the object branch network. This object merging network merges the object embedding vector, target object augmentation vector, and behavior embedding vector of the object to obtain the target object embedding vector of the object. Then, the target object embedding vector of the object can be input into the object feature vector extraction network in the object branch network. This object feature vector extraction network extracts features from the target object embedding vector of the object to obtain the object feature vector of the object.
[0079] As mentioned earlier, the object feature vector of an object is obtained by extracting features from the object embedding vector, the target object augmentation vector, and the behavior embedding vector. That is, the object feature vector can not only contain the features of the object itself, but also the features of the resources operated by the object, and also the features of the object's behavior. The object feature vector can contain features of three dimensions: object, resource, and behavior, thereby effectively improving the feature representation effect of the object.
[0080] In one embodiment, after obtaining the behavior embedding vector of an object, the behavior embedding vector can be enhanced to obtain an enhanced behavior vector for the object. For example, an attention mechanism can be used to enhance the behavior embedding vector based on the target object's enhanced vector to obtain the enhanced behavior vector of the object. After obtaining this enhanced behavior vector, the object feature vector of the object can be further determined based on the object embedding vector, the target object enhanced vector, and the enhanced behavior vector. For example, feature extraction can be performed on the object embedding vector, the target object enhanced vector, and the enhanced behavior vector to obtain the object feature vector of the object. Specifically, the object embedding vector, the target object enhanced vector, and the enhanced behavior vector can be merged to obtain the target object embedding vector of the object; then, feature extraction can be performed on the target object embedding vector to obtain the object feature vector of the object.
[0081] In this context, the object branch network can also include an enhancement network, such as... Figure 3d As shown, the object branch network can include an enhancement network, an object merging network, and an object feature vector extraction network. The enhancement network uses an attention mechanism to enhance the behavior embedding vector based on the target object enhancement vector, resulting in an enhanced behavior vector for the object. Under this network structure, the specific implementation of determining the object feature vector can be as follows: First, the object's behavior embedding vector and the target object enhancement vector can be input into the enhancement network, which uses an attention mechanism to enhance the behavior embedding vector based on the target object enhancement vector, resulting in an enhanced behavior vector for the object. Then, the object embedding vector, the target object enhancement vector, and the enhanced behavior vector can be input into the object merging network, which merges these three vectors to obtain the target object embedding vector. Finally, the target object embedding vector can be input into the object feature vector extraction network, which extracts features from the target object embedding vector to obtain the object feature vector for the object.
[0082] The following section elaborates on how to use an attention mechanism to enhance the behavior embedding vector based on the target object's enhancement vector, in order to obtain the object's enhanced behavior vector.
[0083] Understandably, attention mechanisms are algorithms that can be leveraged across various fields of deep learning. For example, in computer vision, they can be used to capture receptive fields in images, or in Natural Language Processing (NLP), they can be used to locate key tokens (characters) or features. The core of an attention mechanism is to make the network (such as the augmentation network here) focus on what it needs to pay more attention to, typically represented by attention weights. Generally, the essence of an attention mechanism can be understood as a weighted summation. This attention mechanism can use the target object augmentation vector as the query, the behavior embedding vector as the key, and the augmented behavior vector as the value to implement the processing mechanism of the attention network. Correspondingly, in the embodiments of this application, considering that the behavior embedding vector is an embedding vector for the operation behavior, the attention mechanism can be understood as a weighted summation of the operation behavior of the object, and the augmented behavior vector can be understood as the result of the weighted summation of the operation behavior.
[0084] Based on this, the specific implementation of the attention mechanism to obtain the enhanced behavior vector can be as follows: First, based on the target object's enhanced vector and the behavior embedding vector, a weighting coefficient for the behavior embedding vector can be determined; then, based on this weighting coefficient, the behavior embedding vector can be weighted and summed to obtain the enhanced behavior vector. In summary, by using the attention mechanism, the behavior feature vector of an object can be extracted, or weighted to different degrees, thereby effectively enhancing the expressive power of the relevant feature vectors. That is, the enhanced behavior vector is an embedding vector that is more representative of the object's operational behavior, and the object's feature vector is also obtained based on this enhanced behavior vector, which can effectively improve the representation effect of the object's feature vector on the object's feature vector; consequently, when using the object's feature vector for resource recommendation, it can also improve the accuracy and reliability of determining the recommended resources.
[0085] In summary, in this embodiment, both the object and the resource can be assigned a corresponding enhancement vector (i.e., the target object enhancement vector and the target resource enhancement vector); and attention modeling can be performed on the object-side behavioral information. The target object enhancement vector is used as the query to retrieve the object's behavioral information, and then weighted summation is used to obtain the final behavioral feature representation (i.e., the enhanced behavioral vector).
[0086] S204. Based on the object feature vector and the resource feature vector of each candidate resource, determine the recommended resources from the candidate resource set, and make resource recommendations for the object based on the recommended resources.
[0087] In one implementation, the feature differences between the object feature vector and the resource feature vector of each candidate resource can be obtained, so as to determine the recommended resources from the candidate resource set based on the feature differences between the object feature vector and the resource feature vector of each candidate resource.
[0088] Optionally, the specific implementation of obtaining the feature difference between the object feature vector and the resource feature vector of each candidate resource can be as follows: For any candidate resource in the candidate resource set, the similarity between the object feature vector and the resource feature vector of that candidate resource can be calculated, and this similarity can be used as the feature difference between the object feature vector and the resource feature vector of that candidate resource. Here, the similarity can be cosine similarity, that is, it can be based on calculating the cosine distance between the object feature vector and the resource feature vector of any candidate resource, and the calculated cosine distance can be used as the similarity between the object feature vector and the resource feature vector of that candidate resource.
[0089] Optionally, candidate resources whose feature differences between their resource feature vectors and object feature vectors are less than or equal to a feature difference threshold can be selected as recommended resources. This feature difference threshold can be preset, and its value is not limited. Alternatively, candidate resources can first be sorted in ascending order of feature differences between their resource feature vectors and object feature vectors to obtain a resource ranking result; then, the top L candidate resources in the ranking result can be selected as recommended resources. The value of L can be preset, such as 3 or 4, and its specific value is not limited.
[0090] By using the above method to determine recommended resources, candidate resources with high similarity to the object can be used as recommended resources for the object. High similarity between a resource and an object indicates a high degree of matching between the resource and the object. Therefore, using resources with high matching degree to recommend resources can effectively improve the accuracy of resource recommendations, and thus also effectively improve the browsing experience of the object.
[0091] Understandably, in resource recommendation systems, the resource library typically contains a large amount of resources (over a million). However, there can be a significant order-of-magnitude difference between the resource library and the resource recall stage, posing a substantial challenge to the recall module. The resource recall stage here can be understood as the process of determining recommended resources. To increase user consumption of resources, it is usually necessary to recall "better" resources, which here can refer to resources with a higher degree of matching with the user. In summary, this application's embodiment can utilize the similarity between the object's feature vector and the resource's feature vector for resource recall, directing limited traffic to resources that are more closely matched to the user. This can increase the consumption of these resources, improve the user's resource consumption experience, and enhance user stickiness. Here, consumption can refer to user actions such as clicking, liking, and sharing resources.
[0092] In one implementation, this embodiment can also be applied to scenarios related to advertising placement. For example, the candidate resources mentioned above can refer to advertisements, that is, the resource feature vector of the candidate resources can be called the advertisement feature vector of the advertisement. Therefore, it can be determined whether to place an advertisement based on the object feature vector and the advertisement feature vectors of each advertisement. For example, the advertisements to be placed can be determined according to the method for determining recommended resources described above. In other words, advertisements with a high degree of matching with the object can be placed, thereby effectively improving the advertising placement effect.
[0093] In one implementation, recommending resources to an object based on recommended resources can be achieved by sending the recommended resources to the terminal used by the object and displaying the recommended resources on the terminal screen. It is understood that when displaying multiple recommended resources on the terminal screen, the display order of the recommended resources may differ; for example, some recommended resources may be displayed first so that the object can browse them first. Therefore, the display order of each recommended resource can be determined to display them on the terminal screen according to this order. In one embodiment, the display order can be determined based on the feature differences between the object's feature vector and the resource feature vectors of each recommended resource. For example, the recommended resources can be sorted sequentially according to the feature differences from smallest to largest to obtain a corresponding resource sorting result, where the rank of each recommended resource in the resource sorting result is the display order. For example, if a recommended resource has a rank of 1 in the resource sorting result, it indicates that the display order of that recommended resource is 1. Thus, this display method prioritizes the display of resources that are more suitable for the object, improving the resource display effect and thus enhancing the user experience.
[0094] In this embodiment, the object feature vector of an object can be obtained by using the object embedding vector of the object and the target object augmentation vector of the resource operated by the object. This allows the object feature vector to include not only the features of the object itself but also the features of the resource operated by the object, thus effectively improving the feature representation effect for the object. Similarly, the resource feature vector can be obtained by using the resource embedding vector of the resource and the target resource augmentation vector of the object. This allows the resource feature vector to include not only the features of the candidate resource itself but also the features of the object, again effectively improving the feature representation effect for the resource. Therefore, when using the object feature vector of an object with good representation and the feature vector of a resource to determine recommended resources, the accuracy of resource recommendation can be effectively improved, selecting more suitable recommended resources for the object, thereby effectively increasing the consumption of recommended resources and ultimately improving the user experience.
[0095] Based on the above description, this application further proposes another resource recommendation method; in this application embodiment, the training process of the data processing network is mainly described; the data processing network mentioned in this application embodiment is constructed using the idea of a dual-tower network, and the model structure of this data processing network can be found in [reference needed]. Figure 4a As shown, the data processing network can include an object branch network and a resource branch network. The object branch network can include an object merging network and an object feature extraction network, while the resource branch network can include a resource merging network and a resource feature extraction network. Based on... Figure 4a The data processing network shown below, in conjunction with... Figure 4b The specific process of the resource recommendation method proposed in the embodiments of this application is described below. See also... Figure 4b As shown, the resource recommendation method may include the following steps S401-S404:
[0096] S401, acquire multiple sample data for training the data processing network.
[0097] Any sample data may include: sample object information of a sample object and sample resource information of the sample resources operated on by the sample object. The sample object information and sample resource information can be referred to in the descriptions of object information and resource information in steps S201 and S202 above, and will not be repeated here.
[0098] S402, determine the sample object embedding vector of the sample object information and the sample resource embedding vector of the sample resource information in each sample data, and obtain the object augmentation vector of the sample object and the resource augmentation vector of the sample resource in each sample data.
[0099] The method for determining the sample object embedding vector can refer to the method for determining the object embedding vector in step S201 above, and the method for determining the sample resource embedding vector can refer to the method for determining the resource embedding vector in step S202 above. It will not be repeated here.
[0100] In one implementation, during the training of the data processing network, each sample object can be assigned an object augmentation vector, and each sample resource can be assigned a resource augmentation vector. Before the data processing network starts training, the object augmentation vector and the resource augmentation vector can be randomly initialized. During the training of the data processing network, the object augmentation vector of each sample object and the resource augmentation vector of the sample resource are updated as the network trains.
[0101] It should be noted that, in the embodiments of this application, when calculating the network loss of the data processing network, for example, see... Figure 4a As shown, the object augmentation vector is used to calculate the network loss with the output of the item tower. The object augmentation vector is then updated using the output of the item tower. Similarly, the resource augmentation vector is used to calculate the network loss with the output of the user tower. Since the object augmentation vector is the input to the bottom layer of the item tower, and the resource augmentation vector is the input to the bottom layer of the resource tower, the input of one tower carries valuable information from the other, implicitly enabling information exchange between the two towers.
[0102] S403, the data processing network is invoked to generate the sample object feature vector of the sample object in each sample data based on the sample object embedding vector and the object augmentation vector of the sample object in each sample data; and the data processing network is invoked to generate the sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and the resource augmentation vector of the sample resource in each sample data.
[0103] In one implementation, as described above, the data processing network includes an object branch network and a resource branch network; that is, the object branch network can be invoked to generate the sample object feature vector of the sample object in each sample data based on the sample object embedding vector and the object augmentation vector of the sample object in each sample data; and the resource branch network can be invoked to generate the sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and the resource augmentation vector of the sample resource in each sample data.
[0104] Considering that the processing principle of the data processing network is similar for each sample data, the following explanation will take any sample data from multiple sample data as an example.
[0105] In one implementation, the data processing network is as follows: Figure 4a In the case of the network structure shown, the specific implementation of the sample object feature vector in step S403 can be as follows: First, the sample object embedding vector and the object enhancement vector of the sample object in any sample data are input into the object merging network for merging processing to obtain the target sample object embedding vector of the sample object in any sample data; then, the target sample object embedding vector of the sample object in any sample data can be input into the object feature extraction network for feature extraction to obtain the sample object feature vector of the sample object in any sample data.
[0106] The specific implementation of the sample resource feature vector in step S403 can be as follows: First, input the sample resource embedding vector and resource enhancement vector of the sample resource in any sample data into the resource merging network for merging processing to obtain the target sample resource embedding vector of the sample resource in any sample data; then, input the target sample resource embedding vector of the sample resource in any sample data into the resource feature extraction network for feature extraction to obtain the sample resource feature vector of the sample resource in any sample data.
[0107] S404, based on the object augmentation vector and feature vector of the sample object in each sample data, as well as the resource augmentation vector and feature vector of the sample resource in each sample data, the data processing network is trained to obtain the trained data processing network.
[0108] In one implementation, the target prediction bias of the data processing network can be generated based on the object augmentation vector and feature vector of the sample object in each sample data, as well as the resource augmentation vector and feature vector of the sample resource in each sample data. Then, the data processing network can be trained based on the target prediction bias of the data processing network to obtain a trained data processing network. For example, the network parameters of the data processing network can be corrected in the direction of reducing the target prediction bias to obtain a trained data processing network.
[0109] The following section elaborates on the target prediction bias of data processing networks.
[0110] In one implementation, a first prediction bias of the data processing network can be generated based on the difference between the sample object feature vector of the sample object and the sample resource feature vector of the sample resource in each sample data; a second prediction bias of the data processing network can be generated based on the difference between the object augmentation vector of the sample object and the sample resource feature vector of the sample resource in each sample data; a third prediction bias of the data processing network can be generated based on the difference between the resource augmentation vector of the sample resource and the object resource feature vector of the sample object in each sample data; finally, a target prediction bias of the data processing network can be generated based on the first prediction bias, the second prediction bias, and the third prediction bias.
[0111] In one embodiment, the sum of the first prediction bias, the second prediction bias, and the third prediction bias can be used as the target prediction bias for the data processing network. In this implementation, the computer device can calculate the target prediction bias using the following formula (1):
[0112] L=L1+L2+L3(1)
[0113] Where L represents the target prediction bias; L1, L2 and L3 represent the first prediction bias, the second prediction bias and the third prediction bias, respectively.
[0114] In another embodiment, the first prediction bias, the second prediction bias, and the third prediction bias can be weighted and summed to obtain the target prediction bias for the data processing network; wherein the specific values of the weighting coefficients corresponding to each prediction bias are not limited. In this embodiment, the computer device can calculate the target prediction bias using the following formula (2):
[0115] L=L1+λ1L2+λ2L3(2)
[0116] Where λ1 and λ2 represent the weighting coefficients corresponding to the second and third prediction biases, respectively.
[0117] It is important to understand that the prediction bias described here can be understood as the network loss (network loss value) required to process the training data network. For ease of description, the first prediction bias, the second prediction bias, and the third prediction bias can be referred to as the first loss value, the second loss value, and the third loss value, respectively, and the target prediction bias can be referred to as the target loss value.
[0118] The first prediction bias, the second prediction bias, and the third prediction bias will be explained separately below.
[0119] I. Regarding the first prediction bias
[0120] Optionally, for any sample data in multiple sample data sets, a first feature prediction bias of the data processing network for any sample data can be generated based on the difference between the sample object feature vector of the sample object in any sample data set and the sample resource feature vector of the sample resource in any sample data set; and a second feature prediction bias of the data processing network for any sample data can be generated based on the difference between the sample object feature vector of the sample object in any sample data set and the sample resource feature vector of the sample resource in other sample data sets; finally, the first prediction bias of the data processing network for any sample data can be generated based on the first feature prediction bias and the second feature prediction bias.
[0121] It's important to understand that, for a sample object within a given set of sample data, sample resources within the same set of sample data can be considered positive samples of that sample object. In other words, for both sample objects and sample resources within the same set of sample data, the sample resource can be considered a positive sample of that sample object, or a positive sample pair can be constructed from sample objects and sample resources within the same set of sample data. Conversely, for a sample object within a given set of sample data, sample resources in other set of sample data can be considered negative samples of that sample object, or a negative sample pair can be constructed from sample objects and sample resources in different set of sample data. For example, suppose the feature vector of a sample object in one set of sample data is represented by A1, the feature vector of a sample resource is represented by B1, and the feature vector of a sample resource in another set of sample data is represented by B2. Then the positive sample pair is (A1, B1), and the negative sample pair is (A1, B2). It should also be understood that in a batch of sample data corresponding to the training data processing network, the negative samples of a sample object in a sample data are the set of sample resources in other sample data in that batch; if there are multiple other sample data, then there are also multiple negative samples of a sample object in a sample data.
[0122] The first feature prediction bias can be used to reduce the difference between the feature vector of a sample object and the feature vector of a sample resource in the same sample data; or, in other words, to reduce the difference between the feature vector of the sample object included in a positive sample pair and the feature vector of the sample resource. The second feature prediction bias can be used to increase the difference between the feature vector of a sample object and the feature vector of the sample resource in different sample data; or, in other words, to increase the difference between the feature vector of the sample object included in a negative sample pair and the feature vector of the sample resource.
[0123] Optionally, the difference between the feature vector of a sample object and the feature vector of a sample resource can be characterized by the similarity between the two feature vectors (i.e., the feature vector of the sample object and the feature vector of the sample resource). The smaller the similarity between the two feature vectors, the greater the difference between them; conversely, the greater the similarity, the smaller the difference. For example, this similarity can be cosine similarity, meaning the cosine distance between the two feature vectors can be used as the similarity between them, and the smaller the cosine distance, the more similar they are.
[0124] Based on this, it can be seen that, taking any sample data in multiple sample data as an example, determining the difference between the sample object feature vector of the sample object in any sample data and the sample resource feature vector of the sample resource in any sample data is equivalent to calculating the cosine distance between the sample object feature vector of the sample object and the sample resource feature vector of the sample resource in any sample data, and this cosine distance can be used as the first feature prediction bias of the generated data processing network for any sample object.
[0125] Determining the difference between the feature vector of a sample object in any given sample data and the feature vector of a sample resource in other sample data involves calculating the cosine distance between the feature vectors of the sample object in any given sample data and the feature vectors of the sample resources in other sample data. If there are multiple other sample data sets, multiple cosine distances can be obtained. The sum of these multiple cosine distances can then be used as the second feature prediction bias of the data processing network for any given sample object.
[0126] As mentioned above, the first prediction bias can be understood as the network loss value required to train the data processing network, which can be called the first loss value. Based on the above description, it can be seen that the idea used to calculate the first prediction bias is contrastive learning (CL). Therefore, the loss function used to calculate the first prediction bias (first loss value) can be a contrastive loss function, such as the InfoNCE (Info Noise Contrastive Estimation) loss function. That is, in this implementation, the computer device can calculate the first prediction bias of the data processing network for any sample data using the following formula (3):
[0127]
[0128] Where L1 represents the object prediction bias of the data processing network for a sample of data, log() represents the logarithmic effect, exp() represents the exponential effect, and sim(a,b) represents the difference between a and b. The difference between a and b can be characterized by similarity. The greater the similarity between a and b, the smaller the difference between a and b. The smaller the similarity between a and b, the greater the difference between a and b.
[0129] p u p represents the feature vector of a sample object in the sample data. v + p represents the sample resource feature vector of the sample resources in the sample data. v + This can be understood as a positive sample of the sample objects in the sample data. v - p represents the sample resource feature vector of the sample resources in other sample data. v - This can be understood as the negative samples of the sample objects in the sample data. P represents the set constructed from the feature vectors of the sample resources of other sample data. This P can be understood as the negative sample set of the sample objects in the sample data. τ is a hyperparameter used to control the discrimination of the data processing network on negative samples. This hyperparameter can be set to a small value, such as 0.1, 0.2, etc.
[0130] It is understandable that the training of the data processing network is aimed at reducing the target prediction bias. Therefore, during the training process, the first loss value needs to be reduced. The larger the numerator and the smaller the denominator in formula (3), the smaller the first loss value can be. Thus, through the training of the data processing network, the similarity of the same category will be greater, and the similarity of different categories will be smaller. Here, the same category can refer to the sample object feature vector of the sample object and the sample resource feature vector of the sample resource in the same sample data, and the different categories can refer to the sample object feature vector of the sample object and the sample resource feature vector of the sample resource in different sample data.
[0131] In summary, training a data processing network using the idea of comparing positive and negative samples can effectively improve the training performance of the network. This, in turn, can enhance the accuracy of feature representation of objects and resources, thereby improving the accuracy of resource recommendation based on object feature vectors and resource feature vectors.
[0132] II. Regarding the second prediction bias
[0133] As mentioned earlier, for any sample data among multiple sample data, a second prediction bias of the data processing network for any sample data can be generated based on the difference between the object augmentation vector of the sample object in any sample data and the sample resource feature vector of the sample resource in any sample data.
[0134] As mentioned earlier, the second prediction bias can be understood as the network loss value required to train the data processing network, which can be called the second loss value; the loss function used to calculate this network loss value can be the MSE (Mean Square Error) loss function. That is, in this implementation, the computer device can calculate the second prediction bias of the data processing network using the following formula (4):
[0135]
[0136] Where T represents the number of sample data in a batch of training data processing network, a u p represents the object augmentation vector of a sample object in a sample dataset. v This represents the feature vector of the sample resource corresponding to the sample resource in the sample data; y represents the sample label, which can be represented by 1 or 0; here y can represent the sample label of the sample resource relative to the sample object; when y represents 1, it indicates that the sample resource is a positive sample of the sample object, or it can indicate that a u and p v It is the vector corresponding to the same sample data, or in other words, when y represents 1, it indicates that p is generated. v The sample resources used are positive samples.
[0137] III. Regarding the third prediction bias
[0138] As mentioned earlier, for any sample data in multiple sample data sets, a third prediction bias of the data processing network for any sample data can be generated based on the difference between the resource augmentation vector of the sample resources in any sample data set and the sample object feature vector of the sample objects in any sample data set.
[0139] As mentioned earlier, the third prediction bias can be understood as the network loss value required to train the data processing network, which can be called the third loss value; the loss function used to calculate this network loss value can be the MSE (Mean Square Error) loss function. That is, in this implementation, the computer device can calculate the third prediction bias of the data processing network using the following formula (5):
[0140]
[0141] Among them, av p represents the resource augmentation vector of a sample resource in a sample dataset. u This represents the feature vector of the sample object corresponding to the sample object in the sample data; y represents the sample label, which can be represented by 1 or 0; here y can represent the sample label of the sample object relative to the sample resource; when y represents 1, it indicates that the sample object is a positive sample of the sample resource, or it can indicate that a v and p u It is the vector corresponding to the same sample data, or in other words, when y represents 1, it indicates that p is generated. u The sample objects used are positive samples.
[0142] Based on the above understanding of the second and third prediction biases, we can see that the object augmentation vector can use the output of the resource tower (or resource branch network) to calculate the second prediction bias; that is, the object augmentation vector can use the output of the resource tower to update the object augmentation vector. Similarly, the resource augmentation vector will use the output of the object tower (or object branch network) to calculate the third prediction bias, and then the resource augmentation vector will use the output of the object tower to update the resource augmentation vector. In this way, the input of one tower carries valuable information from the other tower, implicitly realizing information exchange between the two towers.
[0143] As can be seen, the output of another tower can be directly learned using augmentation vectors at the bottom layer of the data processing network, and the learned augmentation vectors are then input back into the current tower for further learning. This means that the features of objects and resources interact at the bottom layer of the dual towers. Compared to the DSSM network where the User Tower and Item Tower only perform inner product (dot product) operations (i.e., similarity calculation) on object and resource feature vectors at the top layer to achieve feature crossover, the data processing network and its training framework proposed in this application can perform feature crossover on both the object and resource sides not only at the top layer but also at the bottom layer. This effectively improves the learning effect of the final trained object and resource feature vectors, thereby enhancing their feature representation performance.
[0144] In one implementation, considering that the augmentation vector itself is intended to fit the feature vector output by the other tower and should not be disturbed by other gradients, the augmentation vector (object augmentation vector and resource augmentation vector) can adopt a gradient-stopping strategy when concatenating with other feature vectors for feature cross. That is, the calculation of the second and third losses is performed using the idea of the gradient-stopping strategy; for example... Figure 4aThe dashed lines in the middle indicate the use of a gradient stopping strategy. This gradient strategy ensures that the augmented vectors are only affected by the gradients of the imitation loss (i.e., the second and third losses mentioned above). For example, the object augmented vector is only affected by the gradient of the second loss, and the resource augmented vector is only affected by the gradient of the third loss. This effectively improves the learning performance of the final trained object and resource augmented vectors, and consequently improves the feature representation performance of the object and resource feature vectors.
[0145] In summary, during the training of the data processing network, the object augmentation vector for each sample object and the resource augmentation vector for each sample resource are continuously updated. After training the data processing network, the updated object augmentation vector has learned the output of the resource pyramid quite well. The object augmentation vector itself is designed to fit the output of the resource pyramid, and the output of the resource pyramid is a feature vector for the sample resource. Therefore, the updated object augmentation vector can, to some extent, represent the features of the sample resource corresponding to the sample object. Similarly, after training the data processing network, the updated resource augmentation vector has learned the output of the object pyramid quite well. The resource augmentation vector itself is designed to fit the output of the object pyramid, and the output of the object pyramid is a feature vector for the sample object. Therefore, the updated resource augmentation vector can, to some extent, represent the features of the sample object. Thus, after training the data processing network, the updated object augmentation vector for each sample object and the resource augmentation vector for each sample resource can be stored in a vector library. This allows for the direct retrieval of the required vectors from this library during subsequent resource recommendation.
[0146] For ease of description, the updated object augmentation vector can be called the target object augmentation vector, and the updated resource augmentation vector can be called the target resource augmentation vector.
[0147] In one implementation, the data processing network can be trained periodically. The sample resources and objects in the training data can be different each time, ensuring that more target object augmentation vectors and target resource augmentation vectors are obtained. The obtained augmentation vectors are stored in a vector library to ensure that the vector library is updated in real time and contains as many augmentation vectors as possible for objects and resources in the resource recommendation system, so that the corresponding augmentation vectors can be obtained in actual resource recommendation scenarios. In one embodiment, if the corresponding target object augmentation vector or target resource augmentation vector cannot be obtained from the vector library in an actual resource recommendation scenario, the target object augmentation vector or target resource augmentation vector can be assigned a default value. This default value can be a vector of all zeros, a vector of all one values, or a randomly generated vector; there is no limitation on this.
[0148] Based on this, in one implementation, the object enhancement vector of each sample object in each sample data can be updated based on the differences between the object enhancement vector of the sample object and the sample resource feature vector of the sample resource in each sample data, to obtain the target object enhancement vector for each sample object in each sample data. Similarly, the resource enhancement vector of each sample resource in each sample data can be updated based on the differences between the resource enhancement vector of the sample resource and the object resource feature vector of the sample object, to obtain the target resource enhancement vector for each sample resource in each sample data. Finally, the sample objects and their target object enhancement vectors in each sample data can be stored together in a vector library, and the sample resources and their target resource enhancement vectors in each sample data can also be stored together in the vector library.
[0149] In this embodiment, the output of another tower can be directly learned using augmentation vectors at the bottom layer of the data processing network. The learned augmentation vectors are then input back into the current tower for further learning. This means that the features of the object and resources interact at the bottom layer of the two towers, achieving a dual-augmentation training method. Besides performing feature cross-interaction between the object and resource sides at the top layer of the network, the data processing network and its training framework proposed in this embodiment can also perform feature cross-interaction between the object and resource sides at the bottom layer of the network. This effectively improves the learning effect of the final trained object and resource feature vectors, thereby enhancing their feature representation performance.
[0150] Based on the above description, this application further proposes another resource recommendation method; in this application embodiment, the training process of the data processing network is mainly described; and the model structure of the data processing network mentioned in this application embodiment can be found in [reference needed]. Figure 5a As shown.
[0151] Based on the idea of attention mechanism, it is possible to... Figure 4a The network structure is slightly modified to design such as Figure 5a The data processing network shown may include an object branch network and a resource branch network. The object branch network may include an enhancement network, an object merging network, and an object feature extraction network, while the resource branch network may include a resource merging network and a resource feature extraction network. Figure 5a The data processing network shown is Figure 4a Compare the data processing networks shown: Figure 5a The data processing network shown also includes an enhancement network in its object branch network.
[0152] based on Figure 5a The data processing network shown below, in conjunction with... Figure 5b The specific process of the resource recommendation method proposed in the embodiments of this application is described below. See also... Figure 5b As shown, the resource recommendation method may include the following steps S501-S506:
[0153] S501, acquire multiple sample data for training the data processing network.
[0154] Any sample data may include: sample object information of a sample object and sample resource information of the sample resource operated by the sample object; any sample data may also include: sample behavior information of the operation behavior of a sample object on the operated sample resource. The sample object information, sample resource information and sample behavior information can be referred to the description of object information, resource information and behavior information in steps S201, S202 and S203 above, and will not be repeated here.
[0155] S502, determine the sample object embedding vector of the sample object information and the sample resource embedding vector of the sample resource information in each sample data, and obtain the object augmentation vector of the sample object and the resource augmentation vector of the sample resource in each sample data.
[0156] The method for determining the sample object embedding vector can refer to the method for determining the object embedding vector in step S201 above, and the method for determining the sample resource embedding vector can refer to the method for determining the resource embedding vector in step S202 above. It will not be repeated here.
[0157] S503, determine the sample behavior embedding vector of the sample behavior information of the sample object in each sample data.
[0158] The method for determining the sample behavior embedding vector can refer to the method for determining the behavior embedding vector in step S203 above, and will not be repeated here.
[0159] S504. An attention mechanism is used to enhance the sample behavior embedding vector of the sample object based on the object enhancement vector of the sample object in each sample data, so as to obtain the sample enhancement behavior vector of the sample object in each sample data.
[0160] Considering that the principle of enhancing the embedding vector of sample behavior of sample objects in each sample data is similar, the following explanation will take any sample data from multiple sample data as an example.
[0161] In one implementation, after determining the sample behavior embedding vector of a sample object in each sample data set, each sample behavior embedding vector can be augmented to obtain an augmented behavior vector for the sample object in any given sample data set. For example, an attention mechanism can be used to augment the sample behavior embedding vector based on the object augmentation vector to obtain an augmented behavior vector for the sample object in any given sample data set.
[0162] The following section elaborates on how to use an attention mechanism based on object augmentation vectors to enhance the sample behavior embedding vectors, thereby obtaining the sample augmentation behavior vectors of the sample objects.
[0163] Understandably, the core of an attention mechanism is to make the network (such as the augmentation network here) focus on the areas that need more attention, generally represented by attention weights. Essentially, the attention mechanism can be understood as a weighted summation. For example, during the training of a data processing network, this attention mechanism can use the object augmentation vector as the query, the sample behavior embedding vector as the key, and the sample augmentation behavior vector as the value to implement the network's processing mechanism. Correspondingly, in the embodiments of this application, considering that the sample behavior embedding vector is an embedding vector for operational behavior, the attention mechanism can be understood as a weighted summation of the operational behavior of the sample object, and the sample augmentation behavior vector can be understood as the result of this weighted summation of operational behavior.
[0164] Based on this, the specific implementation of the attention mechanism to obtain the sample augmentation behavior vector can be as follows: First, based on the object augmentation vector and the sample behavior embedding vector, determine the sample weighting coefficients for the sample behavior embedding vector; where the sample weighting coefficients can be used to represent the degree of contribution of the object augmentation vector to the sample behavior embedding vector. Then, the sample behavior embedding vector can be weighted and summed based on these sample weighting coefficients to obtain the sample augmentation behavior vector. In summary, it can be seen that by using the attention mechanism, the sample behavior feature vector of the sample object can be extracted, or weighted to different degrees, thereby effectively enhancing the expressive power of the relevant feature vectors. That is, the sample augmentation behavior vector is an embedding vector that is more representative of the operation behavior of the sample object.
[0165] In this implementation, the computer device can calculate the sample augmentation behavior vector using the following formulas (6) and (7):
[0166] scores = MatMul(query, key) T (6)
[0167] output=MatMul(scores,value)(7)
[0168] Where query = W q a u key=W k Seq-emb, value = W v Seq-emb; Seq-emb represents the sample behavior embedding vector, W q W k W v The parameters in the augmented network are represented; MatMul(a,b) represents a multiplied by b; scores represent the sample weighting coefficients for the sample behavior embedding vector; and output represents the sample augmented behavior vector.
[0169] In summary, in this embodiment of the application, a corresponding enhancement vector a can be assigned to each sample object and sample resource. u and a v It can also perform attention modeling on the behavior sequences of the object side. Using a u As a query, the historical behavior of an object is retrieved, and then weighted summation is used to obtain the final behavioral feature representation (i.e., sample augmentation behavior vector).
[0170] S505, the data processing network is invoked to generate the sample object feature vector of the sample object in each sample data based on the sample object embedding vector, object enhancement vector and sample enhancement behavior vector of the sample object in each sample data; and the data processing network is invoked to generate the sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and resource enhancement vector of the sample resource in each sample data.
[0171] Considering that the processing principle of the data processing network is similar for each sample data, the following explanation will take any sample data from multiple sample data as an example.
[0172] In one implementation, the data processing network is as follows: Figure 5a In the case of the network structure shown, the specific implementation of the sample object feature vector in step S403 can be as follows: First, the sample object embedding vector, object enhancement vector, and sample enhancement behavior vector of the sample object in any sample data are input into the object merging network for merging processing to obtain the target sample object embedding vector of the sample object in any sample data; then, the target sample object embedding vector of the sample object in any sample data can be input into the object feature extraction network for feature extraction to obtain the sample object feature vector of the sample object in any sample data.
[0173] S506, based on the object augmentation vector and feature vector of the sample object in each sample data, as well as the resource augmentation vector and feature vector of the sample resource in each sample data, the data processing network is trained to obtain the trained data processing network.
[0174] The specific implementation of steps S505-S506 can be found in the detailed description of steps S403-S404 in the above embodiment, and will not be repeated here.
[0175] In one implementation, the trained data processing network can be tested to verify the effectiveness of the training method proposed in this application embodiment. Specifically, taking an advertising scenario as an example, the data processing network in this application embodiment is compared with the traditional DSSM (Deep Structured Semantic Model) network. During A / B testing, it was found that compared to the DSSM network, the recall rate of the data processing network can be improved by 3%, and the GMV (Gross Merchandise Volume) can be improved by 0.5%, thus effectively verifying the effectiveness of the training method of the data processing network proposed in this application embodiment. DSSM is a model that uses deep neural networks to represent text (such as sentences, queries, entities, etc.) as vectors, and can be applied to text similarity matching scenarios.
[0176] In this embodiment, the output of another tower can be directly learned using augmentation vectors at the bottom layer of the data processing network, and the learned augmentation vectors are then input back into the current tower for further learning. This means that the features of the object and the resources interact at the bottom layer of the dual towers. The data processing network and its training framework proposed in this embodiment not only perform feature cross-interaction between the object and resource sides at the top layer of the network but also at the bottom layer. Furthermore, an attention mechanism can be used to extract the behavioral features of the object, thereby enhancing the representational ability of the object feature vector. Therefore, this embodiment proposes a data processing network and its training method that combines dual augmentation and attention mechanisms, effectively improving the learning effect of the finally trained object and resource feature vectors, and thus enhancing the feature representation effect of the object and resource feature vectors.
[0177] The above method embodiments are illustrative examples of the methods in this application. Each embodiment has its own emphasis, and parts not detailed in a particular embodiment can be found in the relevant descriptions of other embodiments. For example, after training the data processing network, it can be applied to actual resource recommendation scenarios to achieve resource recommendation. For instance, after obtaining the object embedding vector and target object augmentation vector of an object, and the resource embedding vector and target resource augmentation vector of each candidate resource in the candidate resource set, the data processing network can be used to extract features from these vectors to obtain the object feature vector of the object and the resource feature vector of the candidate resources. Then, the object feature vector and the resource feature vector of the candidate resources can be used to recommend resources to the object; this will not be elaborated further here.
[0178] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above solutions of the embodiments of this application, the apparatus of the embodiments of this application is provided below.
[0179] Figure 6 This illustration shows a schematic diagram of a resource recommendation device provided in an exemplary embodiment of this application; the resource recommendation device can be used as a computer program (including program code) running on a computer device, for example, the resource recommendation device can be an application program in the computer device; the resource recommendation device can be used to execute Figure 2 , Figure 4b and Figure 5b Some or all of the steps in the method embodiments shown. Please refer to [link / reference]. Figure 6 The resource recommendation device includes the following units:
[0180] The first acquisition unit 601 is used to acquire the object embedding vector of the object and the target object enhancement vector; the object embedding vector of the object is used to represent the object, and the target object enhancement vector is obtained by feature fitting of the resources operated on by the object;
[0181] The second acquisition unit 602 is used to acquire the resource embedding vector and the target resource enhancement vector of each candidate resource in the candidate resource set for the object; the resource embedding vector of any candidate resource is used to characterize the candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object;
[0182] The extraction unit 603 is used to extract features from the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object; and to extract features from the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource.
[0183] The recommendation unit 604 is used to determine recommended resources from the candidate resource set based on the object feature vector and the resource feature vector of each candidate resource, and to recommend resources to the object based on the recommended resources.
[0184] In one implementation, the extraction unit 603 is specifically used for:
[0185] Obtain the behavior embedding vector of the object; the behavior embedding vector is used to characterize the object's operational behavior towards candidate resources;
[0186] An attention mechanism is used to enhance the behavior embedding vector based on the target object's enhancement vector to obtain the enhanced behavior vector of the object.
[0187] Feature extraction is performed on the object embedding vector, target object enhancement vector, and enhancement behavior vector of the object to obtain the object feature vector of the object.
[0188] In one implementation, the extraction unit 603 is specifically used for:
[0189] The object embedding vector, the target object enhancement vector, and the enhancement behavior vector of the object are merged to obtain the target object embedding vector of the object.
[0190] Feature extraction is performed on the embedding vector of the target object to obtain the object feature vector of the object.
[0191] In one implementation, the extraction unit 603 is specifically used for:
[0192] For any candidate resource in the candidate resource set, the resource embedding vector and the target resource enhancement vector of the candidate resource are merged to obtain the target resource embedding vector of the candidate resource.
[0193] Feature extraction is performed on the target resource embedding vector to obtain the resource feature vector of any candidate resource.
[0194] In one implementation, the recommendation unit 604 is specifically used for:
[0195] Obtain the feature differences between the object feature vector and the resource feature vector of each candidate resource;
[0196] Recommended resources are determined from the candidate resource set based on the feature differences between the object feature vector and the resource feature vector of each candidate resource.
[0197] In one implementation, the object feature vector of the object and the resource feature vector of each candidate resource are obtained by calling a data processing network; the device further includes a training unit 605, specifically used for:
[0198] Acquire multiple sample data for training the data processing network, each sample data including: sample object information of a sample object and sample resource information of the sample resources operated by the sample object;
[0199] Determine the sample object embedding vector of sample object information and the sample resource embedding vector of sample resource information in each sample data, and obtain the object augmentation vector of sample object and the resource augmentation vector of sample resource in each sample data.
[0200] The data processing network is invoked to generate a sample object feature vector for each sample object in each sample data based on the sample object embedding vector and the object augmentation vector of the sample object in each sample data; and the data processing network is invoked to generate a sample resource feature vector for each sample resource in each sample data based on the sample resource embedding vector and the resource augmentation vector of the sample resource in each sample data.
[0201] The data processing network is trained based on the object augmentation vector and sample object feature vector of the sample object in each sample data, as well as the resource augmentation vector and sample resource feature vector of the sample resource in each sample data, to obtain a trained data processing network.
[0202] In one implementation, the training unit 605 is further configured to:
[0203] Based on the differences between the object augmentation vector of the sample object and the sample resource feature vector of the sample resource in each sample data, the object augmentation vector of the sample object in each sample data is updated to obtain the target object augmentation vector for the sample object in each sample data.
[0204] Based on the difference between the resource enhancement vector of the sample resource and the object resource feature vector of the sample object in each sample data, the resource enhancement vector of the sample resource in each sample data is updated to obtain the target resource enhancement vector for the sample resource in each sample data.
[0205] The sample objects and their target objects in each sample data are associated and stored in the vector library, and the sample resources and their target resources in each sample data are associated and stored in the vector library.
[0206] In one implementation, the training unit 605 is specifically used for:
[0207] The target prediction bias of the data processing network is generated based on the object augmentation vector and sample object feature vector of the sample object in each sample data, as well as the resource augmentation vector and sample resource feature vector of the sample resource in each sample data.
[0208] The data processing network is trained based on the target prediction bias of the data processing network to obtain a trained data processing network.
[0209] In one implementation, the training unit 605 is specifically used for:
[0210] Based on the difference between the feature vector of the sample object and the feature vector of the sample resource in each sample data, a first prediction bias is generated for the data processing network.
[0211] Based on the difference between the object augmentation vector of the sample object and the sample resource feature vector of the sample resource in each sample data, a second prediction bias is generated for the data processing network.
[0212] Based on the difference between the resource augmentation vector of the sample resource and the object resource feature vector of the sample object in each sample data, a third prediction bias is generated for the data processing network.
[0213] Based on the first prediction bias, the second prediction bias, and the third prediction bias, the target prediction bias of the data processing network is generated.
[0214] In one implementation, the training unit 605 is specifically used for:
[0215] For any sample data among the plurality of sample data, based on the difference between the sample object feature vector of the sample object in the any sample data and the sample resource feature vector of the sample resource in the any sample data, the data processing network generates a first feature prediction bias for the any sample data.
[0216] Based on the difference between the feature vector of the sample object in any sample data and the feature vector of the sample resource in other sample data, a second feature prediction bias is generated by the data processing network for any sample data.
[0217] Based on the first feature prediction bias and the second feature prediction bias, the data processing network generates a first prediction bias for any sample data.
[0218] In one implementation, the sample data further includes: sample behavior information of a sample object's operation on the sample resource; the training unit 605 is specifically used for:
[0219] Determine the sample behavior embedding vector of the sample behavior information of the sample object in each sample data;
[0220] An attention mechanism is used to enhance the sample behavior embedding vector of each sample object based on the object enhancement vector of the sample object in each sample data, thereby obtaining the sample enhancement behavior vector of the sample object in each sample data.
[0221] The data processing network is invoked to generate a sample object feature vector for each sample object in each sample data based on the sample object embedding vector, object augmentation vector, and sample augmentation behavior vector of the sample object in each sample data.
[0222] It is understood that the division of units in this embodiment is illustrative and merely a logical functional division; in actual implementation, there may be other division methods. The functional units in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0223] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 7 As shown, the computer device includes at least one processor 701 and a memory 702. Optionally, the computer device may also include a network interface 703. The processor 701, memory 702, and network interface 703 can exchange data. The network interface 703, controlled by the processor 701, is used to send and receive messages. The memory 702 stores a computer program, which includes program instructions. The processor 701 executes the program instructions stored in the memory 702. The processor 701 is configured to invoke the program instructions to execute the aforementioned method.
[0224] The memory 702 may include volatile memory, such as random-access memory (RAM); the memory 702 may also include non-volatile memory, such as flash memory, solid-state drive (SSD); the memory 702 may also include a combination of two or more of the above types of memory.
[0225] The processor 701 may be a central processing unit (CPU). In one embodiment, the processor 701 may also be a graphics processing unit (GPU). The processor 701 may also be a combination of a CPU and a GPU.
[0226] In one possible implementation, memory 702 is used to store program instructions, which processor 701 can invoke to perform the following steps:
[0227] Obtain the object embedding vector of the object and the target object augmentation vector; the object embedding vector is used to represent the object, and the target object augmentation vector is obtained by feature fitting of the resources operated on by the object;
[0228] Obtain the resource embedding vector and target resource enhancement vector for each candidate resource in the candidate resource set for the object; the resource embedding vector of any candidate resource is used to characterize the candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object;
[0229] Feature extraction is performed on the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object; feature extraction is performed on the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource.
[0230] Based on the object feature vector and the resource feature vector of each candidate resource, recommended resources are determined from the candidate resource set, and resource recommendations are made for the object based on the recommended resources.
[0231] In one implementation, the processor 701 is specifically used for:
[0232] Obtain the behavior embedding vector of the object; the behavior embedding vector is used to characterize the object's operational behavior towards candidate resources;
[0233] An attention mechanism is used to enhance the behavior embedding vector based on the target object's enhancement vector to obtain the enhanced behavior vector of the object.
[0234] Feature extraction is performed on the object embedding vector, target object enhancement vector, and enhancement behavior vector of the object to obtain the object feature vector of the object.
[0235] In one implementation, the processor 701 is specifically used for:
[0236] The object embedding vector, the target object enhancement vector, and the enhancement behavior vector of the object are merged to obtain the target object embedding vector of the object.
[0237] Feature extraction is performed on the embedding vector of the target object to obtain the object feature vector of the object.
[0238] In one implementation, the processor 701 is specifically used for:
[0239] For any candidate resource in the candidate resource set, the resource embedding vector and the target resource enhancement vector of the candidate resource are merged to obtain the target resource embedding vector of the candidate resource.
[0240] Feature extraction is performed on the target resource embedding vector to obtain the resource feature vector of any candidate resource.
[0241] In one implementation, the processor 701 is specifically used for:
[0242] Obtain the feature differences between the object feature vector and the resource feature vector of each candidate resource;
[0243] Recommended resources are determined from the candidate resource set based on the feature differences between the object feature vector and the resource feature vector of each candidate resource.
[0244] In one implementation, the object feature vector of the object and the resource feature vector of each candidate resource are obtained by calling a data processing network; the processor 701 is further configured to:
[0245] Acquire multiple sample data for training the data processing network, each sample data including: sample object information of a sample object and sample resource information of the sample resources operated by the sample object;
[0246] Determine the sample object embedding vector of sample object information and the sample resource embedding vector of sample resource information in each sample data, and obtain the object augmentation vector of sample object and the resource augmentation vector of sample resource in each sample data.
[0247] The data processing network is invoked to generate a sample object feature vector for each sample object in each sample data based on the sample object embedding vector and the object augmentation vector of the sample object in each sample data; and the data processing network is invoked to generate a sample resource feature vector for each sample resource in each sample data based on the sample resource embedding vector and the resource augmentation vector of the sample resource in each sample data.
[0248] The data processing network is trained based on the object augmentation vector and sample object feature vector of the sample object in each sample data, as well as the resource augmentation vector and sample resource feature vector of the sample resource in each sample data, to obtain a trained data processing network.
[0249] In one implementation, the processor 701 is further configured to:
[0250] Based on the differences between the object augmentation vector of the sample object and the sample resource feature vector of the sample resource in each sample data, the object augmentation vector of the sample object in each sample data is updated to obtain the target object augmentation vector for the sample object in each sample data.
[0251] Based on the difference between the resource enhancement vector of the sample resource and the object resource feature vector of the sample object in each sample data, the resource enhancement vector of the sample resource in each sample data is updated to obtain the target resource enhancement vector for the sample resource in each sample data.
[0252] The sample objects and their target objects in each sample data are associated and stored in the vector library, and the sample resources and their target resources in each sample data are associated and stored in the vector library.
[0253] In one implementation, the processor 701 is specifically used for:
[0254] The target prediction bias of the data processing network is generated based on the object augmentation vector and sample object feature vector of the sample object in each sample data, as well as the resource augmentation vector and sample resource feature vector of the sample resource in each sample data.
[0255] The data processing network is trained based on the target prediction bias of the data processing network to obtain a trained data processing network.
[0256] In one implementation, the processor 701 is specifically used for:
[0257] Based on the difference between the feature vector of the sample object and the feature vector of the sample resource in each sample data, a first prediction bias is generated for the data processing network.
[0258] Based on the difference between the object augmentation vector of the sample object and the sample resource feature vector of the sample resource in each sample data, a second prediction bias is generated for the data processing network.
[0259] Based on the difference between the resource augmentation vector of the sample resource and the object resource feature vector of the sample object in each sample data, a third prediction bias is generated for the data processing network.
[0260] Based on the first prediction bias, the second prediction bias, and the third prediction bias, the target prediction bias of the data processing network is generated.
[0261] In one implementation, the processor 701 is specifically used for:
[0262] For any sample data among the plurality of sample data, based on the difference between the sample object feature vector of the sample object in the any sample data and the sample resource feature vector of the sample resource in the any sample data, the data processing network generates a first feature prediction bias for the any sample data.
[0263] Based on the difference between the feature vector of the sample object in any sample data and the feature vector of the sample resource in other sample data, a second feature prediction bias is generated by the data processing network for any sample data.
[0264] Based on the first feature prediction bias and the second feature prediction bias, the data processing network generates a first prediction bias for any sample data.
[0265] In one implementation, the sample data further includes: sample behavior information of a sample object's operation on the sample resource; the processor 701 is specifically used for:
[0266] Determine the sample behavior embedding vector of the sample behavior information of the sample object in each sample data;
[0267] An attention mechanism is used to enhance the sample behavior embedding vector of each sample object based on the object enhancement vector of the sample object in each sample data, thereby obtaining the sample enhancement behavior vector of the sample object in each sample data.
[0268] The data processing network is invoked to generate a sample object feature vector for each sample object in each sample data based on the sample object embedding vector, object augmentation vector, and sample augmentation behavior vector of the sample object in each sample data.
[0269] In specific implementations, the devices, processors, memory, etc. described above can execute the implementation methods described in the above method embodiments, or they can execute the implementation methods described in the embodiments of this application, which will not be repeated here.
[0270] This application also provides a computer-readable storage medium storing a computer program. The computer program includes program instructions, which, when executed by a processor, enable the processor to perform some or all of the steps described in the above method embodiments. Optionally, the computer storage medium can be volatile or non-volatile. The computer-readable storage medium may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application program required for a given function, etc.; the data storage area may store data created based on the use of blockchain nodes, etc.
[0271] This application also provides a computer program product including program instructions that, when executed by a processor, can implement some or all of the steps in the resource recommendation method described above. Optionally, the program instructions may be stored in a computer-readable storage medium, and a computer device, such as a processor of a computer device, reads the program instructions from the computer-readable storage medium and executes the program instructions, causing the computer device to perform the resource recommendation method provided above.
[0272] This application also relates to blockchain-related technologies. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer. A blockchain consists of a series of blocks sequentially generated in chronological order. Once a new block is added to the blockchain, it cannot be removed. Each block records the data submitted by nodes in the blockchain system. In this application, the category recognition result of the determined text to be identified can be added to the blockchain for storage to ensure the immutability of the data.
[0273] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0274] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more program instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The program instructions can be stored in a computer-readable storage medium or transmitted through a computer-readable storage medium.
[0275] Program instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives, SSDs), etc.
[0276] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A resource recommendation method, characterized by, The method includes: Obtain the object embedding vector of the object and the target object augmentation vector; the object embedding vector is used to represent the object, and the target object augmentation vector is obtained by feature fitting of the resources operated on by the object; Obtain the resource embedding vector and target resource enhancement vector for each candidate resource in the candidate resource set for the object; the resource embedding vector of any candidate resource is used to characterize the candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object; Feature extraction is performed on the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object; feature extraction is performed on the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource. Obtain the feature differences between the object feature vector and the resource feature vector of each candidate resource; Based on the feature differences between the object feature vector and the resource feature vector of each candidate resource, recommended resources are determined from the candidate resource set, and resource recommendations are made for the object based on the recommended resources.
2. The method of claim 1, wherein, The step of extracting features from the object embedding vector and the target object augmentation vector of the object to obtain the object feature vector includes: Obtain the behavior embedding vector of the object; the behavior embedding vector is used to characterize the object's operational behavior towards candidate resources; An attention mechanism is used to enhance the behavior embedding vector based on the target object's enhancement vector, thereby obtaining the enhanced behavior vector of the object. Feature extraction is performed on the object embedding vector, target object enhancement vector, and enhancement behavior vector of the object to obtain the object feature vector of the object.
3. The method of claim 2, wherein, The step of extracting features from the object embedding vector, the target object augmentation vector, and the augmentation behavior vector of the object to obtain the object feature vector includes: The object embedding vector, the target object enhancement vector, and the enhancement behavior vector of the object are merged to obtain the target object embedding vector of the object. Feature extraction is performed on the embedding vector of the target object to obtain the object feature vector of the object.
4. The method of claim 1, wherein, The step of extracting features from the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource includes: For any candidate resource in the candidate resource set, the resource embedding vector and the target resource enhancement vector of the candidate resource are merged to obtain the target resource embedding vector of the candidate resource. Feature extraction is performed on the target resource embedding vector to obtain the resource feature vector of any candidate resource.
5. The method according to any one of claims 1 to 4, characterized in that, The object feature vector of the object and the resource feature vector of each candidate resource are obtained by calling a data processing network; the method further includes: Acquire multiple sample data for training the data processing network, each sample data including: sample object information of a sample object and sample resource information of the sample resources operated by the sample object; Determine the sample object embedding vector of sample object information and the sample resource embedding vector of sample resource information in each sample data, and obtain the object augmentation vector of sample object and the resource augmentation vector of sample resource in each sample data. The data processing network is invoked to generate a sample object feature vector for each sample object in each sample data based on the sample object embedding vector and the object augmentation vector of the sample object in each sample data; and the data processing network is invoked to generate a sample resource feature vector for each sample resource in each sample data based on the sample resource embedding vector and the resource augmentation vector of the sample resource in each sample data. The data processing network is trained based on the object augmentation vector and sample object feature vector of the sample object in each sample data, as well as the resource augmentation vector and sample resource feature vector of the sample resource in each sample data, to obtain a trained data processing network.
6. The method of claim 5, wherein, Also includes: Based on the differences between the object augmentation vector of the sample object and the sample resource feature vector of the sample resource in each sample data, the object augmentation vector of the sample object in each sample data is updated to obtain the target object augmentation vector for the sample object in each sample data. Based on the difference between the resource enhancement vector of the sample resource and the object resource feature vector of the sample object in each sample data, the resource enhancement vector of the sample resource in each sample data is updated to obtain the target resource enhancement vector for the sample resource in each sample data. The sample objects and their target objects in each sample data are associated and stored in the vector library, and the sample resources and their target resources in each sample data are associated and stored in the vector library.
7. The method of claim 5, wherein, The data processing network is trained based on the object augmentation vector and feature vector of the sample object in each sample data, as well as the resource augmentation vector and feature vector of the sample resource in each sample data, to obtain a trained data processing network, including: The target prediction bias of the data processing network is generated based on the object augmentation vector and sample object feature vector of the sample object in each sample data, as well as the resource augmentation vector and sample resource feature vector of the sample resource in each sample data. The data processing network is trained based on the target prediction bias of the data processing network to obtain a trained data processing network.
8. The method of claim 7, wherein, The process of generating the target prediction bias of the data processing network based on the object augmentation vector and feature vector of the sample object in each sample data, and the resource augmentation vector and feature vector of the sample resource in each sample data, includes: Based on the difference between the feature vector of the sample object and the feature vector of the sample resource in each sample data, a first prediction bias is generated for the data processing network. Based on the difference between the object augmentation vector of the sample object and the sample resource feature vector of the sample resource in each sample data, a second prediction bias is generated for the data processing network. Based on the difference between the resource augmentation vector of the sample resource and the object resource feature vector of the sample object in each sample data, a third prediction bias is generated for the data processing network. Based on the first prediction bias, the second prediction bias, and the third prediction bias, the target prediction bias of the data processing network is generated.
9. The method of claim 8, wherein, The first prediction bias of the data processing network is generated based on the difference between the feature vectors of sample objects and the feature vectors of sample resources in each sample data, including: For any sample data among the plurality of sample data, based on the difference between the sample object feature vector of the sample object in the any sample data and the sample resource feature vector of the sample resource in the any sample data, the data processing network generates a first feature prediction bias for the any sample data. Based on the difference between the feature vector of the sample object in any sample data and the feature vector of the sample resource in other sample data, a second feature prediction bias is generated by the data processing network for any sample data. Based on the first feature prediction bias and the second feature prediction bias, the data processing network generates a first prediction bias for any sample data.
10. The method according to claim 5, characterized in that, Each sample data also includes: sample behavior information of a sample object's operation on the sample resource; the data processing network generates a sample object feature vector for each sample object based on the sample object embedding vector and object augmentation vector of the sample object in each sample data, including: Determine the sample behavior embedding vector of the sample behavior information of the sample object in each sample data; An attention mechanism is used to enhance the sample behavior embedding vector of each sample object based on the object enhancement vector of the sample object in each sample data, thereby obtaining the sample enhancement behavior vector of the sample object in each sample data. The data processing network is invoked to generate a sample object feature vector for each sample object in each sample data based on the sample object embedding vector, object augmentation vector, and sample augmentation behavior vector of the sample object in each sample data.
11. A resource recommendation apparatus, characterized by comprising: include: The first acquisition unit is used to acquire the object embedding vector of the object and the target object enhancement vector; The object embedding vector of the object is used to characterize the object, and the target object augmentation vector is obtained by feature fitting of the resources operated on by the object; The second acquisition unit is used to acquire the resource embedding vector and the target resource enhancement vector for each candidate resource in the candidate resource set for the object; The resource embedding vector of any candidate resource is used to characterize the candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object; The extraction unit is used to extract features from the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object; and to extract features from the resource embedding vector and the target resource enhancement vector of each candidate resource to obtain the resource feature vector of each candidate resource. The recommendation unit is used to obtain the feature differences between the object feature vector and the resource feature vector of each candidate resource; Based on the feature differences between the object feature vector and the resource feature vector of each candidate resource, recommended resources are determined from the candidate resource set, and resource recommendations are made for the object based on the recommended resources.
12. A computer device, comprising: The system includes a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to perform the method as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that, when executed, implement the method as described in any one of claims 1-10.
14. A computer program product, characterised in that, The computer program product includes program instructions that, when executed by a processor, are used to implement the method as described in any one of claims 1-10.