Resource recommendation method and device, computer equipment, medium and product
By obtaining and extracting embedded vectors and enhancement vectors of objects and candidate resources, we integrate multi-dimensional features to recommend, solving the matching problem in massive data, and improving the accuracy and user experience of recommended resources.
Patent Information
- Application Number
- CN202310673158.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2043-06-07
AI Technical Summary
In the data recommendation system, how to effectively recall data matching users from massive multimedia data is a research hotspot, and it is difficult for the existing technology to improve the accuracy of recommended resources.
By obtaining the embedding vectors and enhancement vectors of objects and candidate resources, feature extraction and intersection are performed, and resource recommendations are recommended in a comprehensive multi-dimensional feature.
It effectively improves the accuracy of recommended resources, filters out more matching resources, and improves user experience.
Smart Images

Figure CN119106178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a resource recommendation method, device, computer equipment, medium and product. Background Art
[0002] With the rapid development of electronic technology and Internet technology, multimedia data has also developed rapidly. Users can browse a variety of multimedia data through various multimedia platforms. At present, after receiving the recommendation needs of users in the data recommendation system, in the face of such a large amount of multimedia data, some multimedia data will be recalled first to recommend data to users based on these multimedia data. Based on this, how to recall data that matches the object from a large amount of multimedia data has become a current research hotspot. Summary of the invention
[0003] The embodiments of the present application provide a resource recommendation method, apparatus, computer equipment, medium and product, which can select recommended resources based on multi-dimensional features, effectively improve the accuracy of determining recommended resources, and screen out more matching recommended resources for an object.
[0004] In a first aspect, an embodiment of the present application provides a resource recommendation method, comprising:
[0005] Acquire an object embedding vector and a target object enhancement vector of the object; the object embedding vector of the object is used to characterize the object, and the target object enhancement vector is obtained by performing feature fitting on resources operated on the object;
[0006] Obtaining a resource embedding vector and a target resource enhancement vector for each candidate resource in a candidate resource set for the object; the resource embedding vector of any candidate resource is used to characterize the any candidate resource, and the target resource enhancement vector is obtained by performing feature fitting on the object;
[0007] Performing 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; performing 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;
[0008] Based on the object feature vector and the resource feature vector of each candidate resource, a recommended resource is determined from the candidate resource set, and resource recommendations are made to the object based on the recommended resource.
[0009] In a second aspect, an embodiment of the present application provides a resource recommendation device, including:
[0010] A first acquisition unit is used to acquire an object embedding vector and a target object enhancement vector of the object; the object embedding vector of the object is used to characterize the object, and the target object enhancement vector is obtained by performing feature fitting on resources operated on the object;
[0011] A second acquisition unit is used to acquire a resource embedding vector and a 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 any candidate resource, and the target resource enhancement vector is obtained by performing feature fitting on the object;
[0012] An extraction unit is used to 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; and 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;
[0013] A recommendation unit is used to determine a recommended resource from the candidate resource set based on the object feature vector and the resource feature vector of each candidate resource, and make a resource recommendation for the object based on the recommended resource.
[0014] In a third aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute some or all of the steps in the above method.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program includes program instructions, which, when executed by a processor, are used to execute some or all of the steps in the above method.
[0016] In a fifth aspect, an embodiment of the present application further provides a computer program product or a computer program, which includes program instructions, and when the program instructions are executed by a processor, some or all of the steps in the above method can be implemented.
[0017] The embodiment of the present application can obtain the object embedding vector and the target object enhancement vector of the object; the object embedding vector of the object is used to characterize the object, and the target object enhancement vector is obtained by feature fitting the resources operated by the object; the resource embedding vector and the target resource enhancement vector of each candidate resource in the candidate resource set for the object can also be obtained; the resource embedding vector of any candidate resource is used to characterize any candidate resource, and the target resource enhancement vector is obtained by feature fitting the object; further, the object embedding vector and the target object enhancement vector of the object can be feature extracted to obtain the object feature vector of the object; the resource embedding vector and the target resource enhancement vector of each candidate resource are feature extracted respectively to obtain the resource feature vector of each candidate resource; thus, the recommended resources can be determined from the candidate resource set based on the object feature vector and the resource feature vector of each candidate resource, and the resource recommendation can be made to the object based on the recommended resources. In summary, it can be seen that the selection of recommended resources can be carried out by comprehensively considering multi-dimensional features, effectively improving the accuracy of determining recommended resources, and screening out more matching recommended resources for the object. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a schematic diagram of the architecture of a resource recommendation system provided in an embodiment of the present application;
[0020] Figure 2 It is a flowchart of a resource recommendation method provided in an embodiment of the present application;
[0021] Figure 3a is a structural diagram of a data processing network provided in an embodiment of the present application;
[0022] Figure 3b is a schematic diagram of the structure of another data processing network provided in an embodiment of the present application;
[0023] Figure 3c It is a structural diagram of another data processing network provided in an embodiment of the present application;
[0024] Figure 3d It is a structural diagram of another data processing network provided in an embodiment of the present application;
[0025] Figure 4a is a schematic diagram of training a data processing network provided in an embodiment of the present application;
[0026] Figure 4b is a flowchart of another resource recommendation method provided in an embodiment of the present application;
[0027] Figure 5a is another schematic diagram of training a data processing network provided in an embodiment of the present application;
[0028] Figure 5b It is a flowchart of another resource recommendation method provided in an embodiment of the present application;
[0029] Figure 6 is a structural diagram of a resource recommendation device provided in an embodiment of the present application;
[0030] Figure 7 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0032] The following first briefly introduces the relevant terms and concepts involved in the embodiments of the present application:
[0033] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0034] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0035] Among them, Computer Vision (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to using cameras and computers to replace human eyes to identify and measure targets, and further perform image processing to make computer processing into images that are more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), resource recommendation, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric vector recognition technologies such as face recognition and fingerprint recognition.
[0036] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers 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 make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0037] Based on the above-mentioned artificial intelligence and other technologies, the embodiment of the present application proposes a resource recommendation scheme; specifically, the general principle of the scheme is as follows: the object embedding vector and the target object enhancement vector of the object can be obtained; the object embedding vector of the object can be used to characterize the object, and the target object enhancement vector is obtained by feature fitting of the resources operated by the object; and the resource embedding vector and the target resource enhancement vector of each candidate resource in the candidate resource set for the object can be obtained; the resource embedding vector of any candidate resource can be used to characterize any candidate resource, and the target resource enhancement vector is obtained by feature fitting of the object. After obtaining these vectors, the 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 the 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 respectively 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, a recommended resource can be determined from the candidate resource set.
[0039] Through the above implementation, the object embedding vector that can represent the object and the target object enhancement vector that can represent the resource operated by the object can be used to obtain the object feature vector of the object, so that the object feature vector can not only contain the features of the object itself, but also contain the features of the resource operated by the object, that is, the object feature vector can contain the features of the two dimensions of the object and the resource, so that the feature characterization effect for the object can be effectively improved. And before feature extraction, the features of the object and the features of the resource can be cross-featured, so that the feature characterization effect of the object can be effectively improved. And, the resource embedding vector that can represent the resource and the target resource enhancement vector that can represent the object can be used to obtain the resource feature vector of the resource, so that the resource feature vector can not only contain the features of the candidate resource itself, but also contain the features of the object, that is, the resource feature vector can contain the features of the two dimensions of the object and the resource, so that the feature characterization effect for the resource can be effectively improved, and before feature extraction, the features of the object and the features of the resource can be cross-featured, so that the feature characterization effect of the resource can be effectively improved. Then, when determining recommended resources using the object feature vector of the object with better representation effect and the feature vector of the resource, the recommended resources can be selected by comprehensively considering multi-dimensional features, so as to effectively improve the accuracy of determining the recommended resources and screen out more matching recommended resources for the object, thereby effectively increasing the consumption of recommended resources and improving the object experience.
[0040] In a specific implementation, the execution subject of 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 smart phone, tablet computer, laptop computer, desktop computer and other devices, and can also be peripheral devices such as a handle, touch screen, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms, etc.
[0041] For example, when the computer device is a server, the embodiment of the present application provides 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 an object, and upload the obtained resource recommendation request to the server (i.e., a computer device), so that the server may respond to the resource recommendation request and make resource recommendations for the object based on a resource recommendation scheme.
[0042] Based on the resource recommendation scheme provided above, the embodiment of the present application provides a resource recommendation method, which can be executed by the computer device mentioned above. Figure 2 , the resource recommendation method includes but is not limited to the following steps:
[0043] S201, obtaining an object embedding vector of an object and a target object enhancement vector.
[0044] Among them, the object can refer to any user, and the object embedding vector of the object can be used to characterize the object; the target object enhancement vector can be obtained by fitting the features of the resources operated by the object, and the feature fitting of the resources operated by the object can be understood as fitting the features of the resources operated by the object; based on this, it can be known that to a certain extent, the target object enhancement vector can characterize the resources operated by the object. The target object enhancement vector can be obtained from a vector library, which stores a large number of target object enhancement vectors corresponding to objects.
[0045] In one implementation, obtaining an object embedding vector of an object may be specifically implemented by: obtaining object information of the object, where the object information may be used to characterize information of the object, where the object information may be attribute information for the object, for example, the object information may include one or more object sub-information, where the one or more object sub-information may include one or more of an identification (ID), gender, age, hobbies, etc. of the object; after obtaining the object information, the object information may be embedded to obtain an object embedding vector that has characterization capabilities for the object.
[0046] Optionally, the implementation of embedding the object information can be: first, the discrete features of the object information of the object can be obtained, and the discrete features are sparse discrete features; wherein, one object sub-information can be represented by a discrete feature, for example, the gender of the object can correspond to a discrete feature, and the age of the object can correspond to a discrete feature; it is known that the discrete features corresponding to one or more object sub-information can be combined into the discrete features of the object information of the object. It should be understood that the discrete features are high-dimensional vectors. In order to improve the processing speed of the data processing network, the discrete features of the object can be reduced in dimension to a low-dimensional space (such as 64 dimensions or 32 dimensions, etc.), and the discrete features after dimensionality reduction can be used as the object embedding vector of the object here. In one embodiment, the discrete features of the object are reduced in dimension to obtain the corresponding object embedding vector. The specific implementation can be: an embedding vector (such as a 64-dimensional embedding vector) can be queried in the dictionary for the discrete features corresponding to each object sub-information included in the discrete features, and then the object embedding vector of the object is obtained by combining the embedding vectors corresponding to each discrete feature. The combination here can refer to splicing processing.
[0047] In one implementation, the specific implementation of obtaining the object embedding vector of the object here can be implemented through a network, such as the network can be called an object embedding network, the object embedding network can be an independent network, or a sub-network in a data processing network, which is not limited. In a specific implementation, the object information of the object can be input into the object embedding network, so that the object information can be embedded by using the object embedding network to obtain the object embedding vector of the object. Among them, the understanding of the data processing network can refer to the following related description.
[0048] S202, obtaining a resource embedding vector and a target resource enhancement vector for each candidate resource in a candidate resource set for the object.
[0049] Among them, the resource embedding vector of any candidate resource can be used to characterize any candidate resource; the target resource enhancement vector is obtained by fitting the features of the object, and fitting the features of the object can be understood as fitting the features of the object; based on this, it can be seen that, to a certain extent, the target resource enhancement vector can characterize the object. The target resource enhancement vector can be obtained from a vector library, which stores a large number of target resource enhancement vectors corresponding to resources. The vector library here can be the same as the vector library in step S201, or it can be an unused library, without limitation. Among them, the candidate resource set can be a resource in a resource library, which stores a large number of resources to facilitate resource recommendation for objects with resource recommendation needs. The resources in the resource library can be advertisements, news information, items, commodities, etc., without specific limitation.
[0050] In one implementation, the specific implementation of obtaining the resource embedding vector of any candidate resource may be: obtaining resource information of any candidate resource, the resource information may be used to characterize information of any candidate resource, the resource information may be attribute information for any candidate resource, for example, the resource information may include one or more resource sub-information, the one or more resource sub-information may include one or more of the resource's identifier, name, type, etc.; after obtaining the resource information, the resource information may be embedded to obtain a resource embedding vector that has the ability to characterize any candidate resource.
[0051] Optionally, the implementation of embedding the resource information can be: first, the discrete features of the resource information of any candidate resource can be obtained, and the discrete features are sparse discrete features; wherein, a resource sub-information can be represented by a discrete feature, for example, the name of the resource can correspond to a discrete feature, and the type of the 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 into the discrete features of the resource information of any candidate resource. Then, the discrete features of any candidate resource can be subjected to dimensionality reduction processing to obtain the resource embedding vector of any 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 (such as a 64-dimensional embedding vector) can be queried in the dictionary for the discrete features corresponding to each resource sub-information included in the discrete features, and then the resource embedding vector of the resource is obtained by combining the embedding vectors corresponding to each discrete feature.
[0052] In one implementation, the specific implementation of obtaining the resource embedding vector of any candidate resource here can be implemented through a network, such as the network can be called a resource embedding network, and the resource embedding network can be an independent network or a sub-network in a data processing network. In a specific implementation, the resource information of any candidate resource can be input into the resource embedding network, so that the resource embedding network can be used to embed the resource information to obtain the resource embedding vector of the resource.
[0053] In one embodiment, when the object embedding network and the resource embedding network are sub-networks in the data processing network, the data processing network can be as follows: Figure 3a As shown. The data processing network can be constructed using the idea of a double-tower network, where one tower can be understood as an object tower (or User Tower), and the other tower can be understood as a resource tower (or Item Tower); for the object tower, the information input into the object tower can be information about the object, so as to use the information to characterize the object; for the resource tower, the information input into the object tower can be information about the resource, so as to use the information to characterize the resource.
[0054] For example, see Figure 3a The data processing network shown in the figure may include two branch networks, which may be respectively referred to as an object branch network and a resource branch network, wherein the object branch network may be understood as an object tower, and the resource branch network may be understood as a resource tower. The object branch network may be used to determine the object feature vector of the object, and the resource branch network may be used to determine the resource feature vector of the resource. The above-mentioned object embedding network may be included in the object branch network, and the resource embedding network may be included in the resource branch network. For an understanding of other sub-networks in the data processing network, please refer to the following related description.
[0055] The following specifically describes how to obtain the target object enhancement vector in step S201 and the target resource enhancement vector in step S202.
[0056] In one implementation, the target object enhancement vector obtained by fitting the features of the resources operated by the object, and the target resource enhancement vector obtained by fitting the features of the object, can be obtained by calling the data processing network, and specifically can be obtained during the training process of training the data processing network. It should be understood that the data processing network in the embodiment of the present application adopts a double-tower structure, and the two towers can be an object tower and a resource tower, respectively. The object tower and the resource tower can be understood as an object branch network and a resource branch network in the data processing network, respectively. During training, for multiple sample data used to train the data processing network, any sample data may include sample object information of a sample object and sample resource information of a sample resource operated by the sample object; in order to implement the training of 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] Among them, the sample object embedding vector can be used as the input of the object branch network, and the sample resource embedding vector can be used as the input of the resource branch network. In an embodiment of the present application, when training the data processing network, an enhancement vector can be added to the input of the object branch network and the resource branch network respectively. For example, the enhancement network on the object branch network side can be called an object enhancement vector, and the enhancement network on the resource branch network side can be called a resource enhancement vector, so as to train the data processing network using the sample object embedding vector, the sample resource embedding vector and the two enhancement vectors. During training, each sample object corresponds to an object enhancement vector, and each sample resource corresponds to a resource enhancement vector.
[0058] In the data processing network, the two enhancement vectors are also updated as the network is trained; and after the data processing network is trained, the two enhancement vectors are also updated. For the convenience of description, the updated object enhancement vector can be referred to as the target object enhancement vector, and the updated resource enhancement vector can be referred to as the target resource enhancement vector. After obtaining the target object enhancement vector and the target resource enhancement vector, the target object enhancement vector can be associated with the corresponding sample object and stored in the vector library, and the target resource enhancement vector can be associated with the corresponding sample resource and stored in the vector library.
[0059] It is also necessary to understand that in the data processing network, the object enhancement vector can be updated according to the output of the resource branch network, and the goal of the update is to reduce the difference between the object enhancement vector and the output of the resource branch network. Among them, the output of the resource branch network is the feature vector of the sample resource (such as it can be called the sample resource feature vector), that is, the object enhancement vector is the output of the fitting resource branch network, or in other words, the object enhancement vector is the feature vector of the fitting sample resource. It can be seen that the continuously updated object enhancement vector can carry the information in the feature vector of the sample resource output by the resource branch network. Based on this, it can be seen that the target object enhancement vector of an object is obtained by feature fitting the feature vector of the resource.
[0060] Similarly, the resource enhancement vector can be updated according to the output of the object branch network, and the goal of the update is to reduce the difference between the resource enhancement vector and the output of the object branch network. Among them, the output of the object branch network is the feature vector of the sample object (such as it can be called the sample object feature vector), that is, the resource enhancement vector is the output of the fitting object branch network, or in other words, the resource enhancement vector is the feature vector of the fitting sample object. It can be seen that the continuously updated resource enhancement vector can carry the information in the feature vector of the sample object output by the object branch network. Based on this, it can be seen that the target resource enhancement vector of a resource is obtained by feature fitting the feature vector of the object.
[0061] It should be noted that the embedding vector involved in the embodiments of the present application can be a representation of an entity (such as an object, resource, or behavior); a feature vector can refer to a deep semantic feature 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 of an object.
[0062] S203, performing 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; performing 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, the data processing network can be found in Figure 3a or Figure 3b As shown. Based on this, it can be known that the specific implementation of step S203 can be: by calling the object branch network in the data processing network, 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; and by calling the resource branch network in the data processing network, 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.
[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 Figure 3a or Figure 3b In this case, the specific implementation of step S203 may be: inputting the object embedding vector of the object and the target object enhancement vector 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, and obtain the object feature vector of the object; and inputting 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 respectively by calling the resource feature vector network, and obtain the resource feature vector of each candidate resource.
[0065] In one implementation, with respect to determining the object feature vector of an object, the object embedding vector and the target object enhancement vector of the object may be merged to obtain the target object embedding vector of the object; then, feature extraction may be performed on the target object embedding vector to obtain the object feature vector of the object.
[0066] In this case, it can be understood that, for the object branch network, the data input to the object branch network includes two vectors (the object embedding vector and the target object enhancement vector), and these two vectors can be merged first, and then the feature extraction of the vector obtained by the merged processing can be performed to obtain the object feature vector.
[0067] Based on this, we can know that for the object branch network, Figure 3cAs shown, the object branch network may include an object merging network and an object feature vector extraction network. The object merging network may be used to merge the object embedding vector and the target object enhancement vector of the object to obtain the target object embedding vector of the object; the object feature vector extraction network may be used to extract features from the target object embedding vector of the object to obtain the object feature vector of the object. Then, the specific implementation of determining the object feature vector of the object based on the object branch network may be: first, the object embedding vector and the target object enhancement vector of the object may be input into the object merging network in the object branch network, so as to merge the object embedding vector and the target object enhancement vector of the object by calling the object merging network in the object branch network, so as to obtain the target object embedding vector of the object; then, the target object embedding vector of the object may be input into the object feature vector extraction network in the object branch network, so as to extract features from the target object embedding vector of the object by calling the object feature vector extraction network in the object branch network, so as to obtain the object feature vector of the object.
[0068] In one implementation, to determine the resource feature vector of any candidate resource, the resource embedding vector of any candidate and the target resource enhancement vector 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 case, it can be understood that, for the resource branch network, the data input to the resource branch network includes two vectors (a resource embedding vector and a target resource enhancement vector), and these two vectors can be merged first, and then the vector obtained by the merged processing can be feature extracted to obtain a resource feature vector.
[0070] Based on this, we can know that for the resource branch network, if Figure 3cAs shown, the resource branch network may 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 may 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 may 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. Then, the specific implementation of determining the resource feature vector of any candidate resource based on the resource branch network may be: first, the resource embedding vector and the target resource enhancement vector of any candidate resource may be input into the resource merging network in the resource branch network, so as to merge the resource embedding vector and the target resource enhancement vector of any candidate resource by calling the resource merging network in the resource branch network, so as to obtain the target resource embedding vector of any candidate resource; then, the target resource embedding vector of any candidate resource may be input into the resource feature vector extraction network in the resource branch network, so as to extract features from the target resource embedding vector of any candidate resource by calling the resource feature vector extraction network in the resource branch network, so as to obtain the resource feature vector of any candidate resource.
[0071] From the above, it can be seen that the object feature vector of the object is obtained by performing feature extraction on the object embedding vector and the target object enhancement vector of the object, and the object embedding vector of the object can characterize the object, and the target object enhancement vector can characterize the resources operated by the object. For the object feature vector of the object, the object feature vector can not only include the characteristics of the object itself, but also include the characteristics of the resources operated by the object, that is, the object feature vector can include the characteristics of both the object and the resource dimensions, thereby effectively improving the feature characterization effect for the object.
[0072] Similarly, the resource feature vector of the candidate resource is obtained by extracting features from the resource embedding vector of the candidate resource and the target resource enhancement vector, and the resource embedding vector of the candidate resource can represent the candidate resource, and the target resource enhancement vector can represent the object. Then, for the resource feature vector of the candidate resource, the resource feature vector can not only include the features of the candidate resource itself, but also include the features of the object, that is, the resource feature vector can include features of both object and resource dimensions, thereby effectively improving the feature representation effect for the resource.
[0073] In one implementation, in order to obtain the object feature vector of the object, the object feature vector of the object can also be determined in combination with the behavior information of the object on the candidate resources. The behavior information may include one or more operation behaviors, and the one or more operation behaviors may include one or more of the object's click, download, favorite, share, like, oppose, play, etc. on the candidate resources. Based on this, it can be known that the behavior embedding vector corresponding to the behavior information of the object can also be obtained to determine the object feature vector of the object based on the object embedding vector of the object, the target object enhancement vector and the behavior embedding vector. The behavior embedding vector is used to characterize the operation behavior of the object on the candidate resources.
[0074] In one implementation, the specific implementation of obtaining the behavior embedding vector of the object may be:
[0075] First, the behavior information of the object can be obtained. The behavior information can include one or more operation behaviors. The behavior information can be behavior information within a historical time period. The historical time period can refer to a time period before the current time and a preset time interval (such as 7 days, 10 days, etc.) with the current time. The current time here can refer to the moment when the object is detected to have a resource recommendation demand. After obtaining the behavior information of the object, the discrete features corresponding to the behavior information can be determined; finally, the discrete features can be subjected to dimensionality reduction processing to obtain the behavior embedding vector of the object. Among them, the implementation principle of obtaining the behavior embedding vector corresponding to the behavior information is similar to the implementation principle of the resource embedding vector or the object embedding vector mentioned above, and its specific implementation is not repeated here. It should be understood that the behavior information of the object on the resource (or historical interaction information) is a continuous type. When determining the discrete features corresponding to the behavior information, the continuous feature vector for the behavior information is first determined, and then the continuous feature vector needs to be discretized to obtain the discrete features of the behavior information.
[0076] In one implementation, the specific implementation of obtaining the behavior embedding vector of the object here can be implemented through a network, such as the network can be called a behavior embedding network, and the behavior embedding network can be an independent network or a sub-network in a data processing network. In a specific implementation, the behavior information of the object can be input into the behavior embedding network, so that the behavior information can be embedded by using the behavior embedding network to obtain the behavior embedding vector of the object.
[0077] In this case, the specific implementation of step S203 may be: obtaining the behavior embedding vector of the object, and performing feature extraction on the object embedding vector, the target object enhancement vector and the behavior embedding vector of the object to determine the object feature vector of the object. The implementation here may also be implemented using the object branch network mentioned above. Specifically, the object embedding vector, the target object enhancement vector and the behavior embedding vector of the object may be input into the object branch network to perform feature extraction on the object embedding vector, the target object enhancement vector and the behavior embedding vector of the object through the object branch network to obtain the object feature vector of the object.
[0078] In one embodiment, the object embedding vector, target object enhancement vector and behavior embedding vector of the object may be merged first to obtain the target object embedding vector of the object; then, the target object embedding vector may be feature extracted to obtain the object feature vector of the object. The implementation here may also be implemented using the above-mentioned object branch network. Specifically, the object embedding vector, target object enhancement vector and enhanced behavior vector of the object may be input into the object merging network in the object branch network, so that the object embedding vector, target object enhancement vector and behavior embedding vector of the object may be merged through the object merging network to obtain the target object embedding vector of the object; then, the target object embedding vector of the object may be input into the object feature vector extraction network in the object branch network, so that the target object embedding vector of the object may be feature extracted through the object feature vector extraction network to obtain the object feature vector of the object.
[0079] As mentioned above, the object feature vector of an object is obtained by performing feature extraction on the object embedding vector, target object enhancement vector and behavior embedding vector of the object. That is, the object feature vector can not only include the features of the object itself, the features of the resources operated by the object, but also the features of the behavior of the object. The object feature vector can include features of three dimensions: object, resource and behavior, thereby effectively improving the feature representation effect for the object.
[0080] In one embodiment, after obtaining the behavior embedding vector of the object, the behavior embedding vector may be enhanced to obtain an enhanced behavior vector for the object; for example, the behavior embedding vector may be enhanced based on the target object enhancement vector using an attention mechanism to obtain an enhanced behavior vector for the object. After obtaining the enhanced behavior vector, the object feature vector of the object may be further determined based on the object embedding vector, the target object enhancement vector, and the enhanced behavior vector. For example, feature extraction may be performed on the object embedding vector, the target object enhancement vector, and the enhanced behavior vector of the object to obtain the object feature vector of the object; specifically, the object embedding vector, the target object enhancement vector, and the enhanced behavior vector of the object may be merged to obtain the target object embedding vector of the object; then, feature extraction may be performed on the target object embedding vector to obtain the object feature vector of the object.
[0081] In this case, the object branch network can also include an enhancement network, such as Figure 3d As shown, the object branch network may include an enhancement network, an object merging network, and an object feature vector extraction network. Among them, the enhancement network may use an attention mechanism to enhance the behavior embedding vector based on the target object enhancement vector to obtain an enhanced behavior vector of the object. Under this network structure, the specific implementation of determining the object feature vector of the object may be: first, the behavior embedding vector of the object and the target object enhancement vector may be input into the enhancement network to call the enhancement network to use an attention mechanism to enhance the behavior embedding vector based on the target object enhancement vector to obtain the enhanced behavior vector of the object; then, the object embedding vector, the target object enhancement vector, and the enhanced behavior vector of the object may be input into the object merging network to merge these three vectors through the object merging network to obtain the target object embedding vector of the object; finally, the target object embedding vector may be input into the object feature vector extraction network to extract features from the target object embedding vector through the object feature vector extraction network to obtain the object feature vector of the object.
[0082] The following is an explanation of using an attention mechanism to enhance the behavior embedding vector based on the target object enhancement vector to obtain an enhanced behavior vector of the object.
[0083] It is understandable that the attention mechanism is an algorithm that can be used in various fields of deep learning. For example, it can be used to capture the receptive field on the image in the direction of computer vision, or to locate key tokens (characters) or features in natural language processing (NLP), and so on. The core of the attention mechanism is to let the network corresponding to the attention mechanism (such as the enhanced network here) pay attention to where it needs more attention, which is generally reflected in the form of attention weights. Usually, the essence of the attention mechanism can be understood as weighted summation. The attention mechanism can use the target object enhancement vector as a query, the behavior embedding vector as a key, and the enhanced behavior vector as a value to realize the processing mechanism of the attention mechanism network. Correspondingly, in the embodiment of the present application, considering that the behavior embedding vector is an embedding vector for the operation behavior, the attention mechanism can be understood as the weighted summation of the operation behavior of the object, and the enhanced behavior vector can be understood as the weighted summation result of the operation behavior.
[0084] Based on this, the specific implementation of the enhanced behavior vector obtained by the attention mechanism can be: first, the weight coefficient for the behavior embedding vector can be determined based on the target object enhancement vector and the behavior embedding vector; then, the behavior embedding vector can be weighted and summed based on the weight coefficient to obtain the enhanced behavior vector. In summary, it can be seen that by using the attention mechanism, the behavior feature vector of the object can be extracted, or weighted to different degrees, so that the expression ability of the relevant feature vector can be effectively enhanced, that is, the enhanced behavior vector is an embedding vector with more representation ability for the operation behavior of the object, and the object feature vector of the object is also obtained based on the enhanced behavior vector, which can effectively improve the object feature vector representation effect on the object's feature vector; and then, when the object feature vector is used for resource recommendation in the future, the accuracy and reliability of determining the recommended resources can also be improved.
[0085] In summary, in the embodiment of the present application, a corresponding enhancement vector (i.e., target object enhancement vector and target resource enhancement vector) can be assigned to each object and resource, and the behavior information on the object side can be modeled using Attention. The target object enhancement vector is used as a query to retrieve the behavior information of the object, and then the final behavior feature expression (i.e., enhanced behavior vector) is obtained by weighted summation.
[0086] S204: Determine recommended resources from the candidate resource set based on the object feature vector and the resource feature vector of each candidate resource, and make resource recommendations to the object based on the recommended resources.
[0087] In one implementation, feature differences between the object feature vector and the resource feature vector of each candidate resource may be obtained to determine a recommended resource 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: for any candidate resource in the candidate resource set, the similarity between the object feature vector and the resource feature vector of any candidate resource can be calculated, and the similarity can be used as the feature difference between the object feature vector and the resource feature vector of any candidate resource. 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 any candidate resource.
[0089] Optionally, the candidate resources in the candidate resource set whose feature difference between the resource feature vector and the object feature vector is less than or equal to the feature difference threshold can be used as recommended resources. The feature difference threshold can be set in advance, and its numerical value is not limited. Optionally, the candidate resources can be sorted in the order of the feature difference between the resource feature vector and the object feature vector from small to large to obtain a resource sorting result; then, the candidate resources in the top L positions in the resource sorting result are used as recommended resources. The L value can be set in advance, such as 3, 4, etc., and its specific value is not limited.
[0090] By using the above method of determining recommended resources, candidate resources with a high similarity to the object can be used as recommended resources that need to be recommended to the object. The high similarity between the resource and the object means that the resource has a high match with the object. Therefore, using resources with a high match with the object for resource recommendation can effectively improve the accuracy of resource recommendation, and thus can also effectively improve the object browsing experience.
[0091] It is understandable that in the resource recommendation system, the amount of resources in the resource library is usually large (over one million level), and there may be a large order of magnitude difference from the resource library to the resource recall stage, which poses a great challenge to the recall module. The resource recall stage here can be understood as the process of determining the recommended resources; in order to improve the object's consumption of resources, it is usually necessary to recall "better" resources, such as the "better" resources here can refer to resources with a higher degree of match with the object. From the above, it can be seen that the embodiment of the present application can use the similarity between the object feature vector of the object and the resource feature vector of the resource to recall resources, and direct limited traffic to resources that are more matched with the object, which can increase the consumption of these resources, and can also improve the user's experience of consuming resources and enhance consumption stickiness. Consumption here can be the object's click, like, forward and other operations on the resource.
[0092] In one implementation, the embodiments of the present application can also be applied to scenarios related to advertising delivery. For example, the candidate resources mentioned above can refer to advertisements, that is, the resource feature vectors of the candidate resources can be referred to as the advertisement feature vectors of the advertisements. Then, it can be determined whether to deliver advertisements based on the object feature vectors and the advertisement feature vectors of each advertisement. For example, the advertisements to be delivered can be determined in accordance with the above method of determining the recommended resources, that is, advertisements with a high degree of match with the object can be delivered, thereby effectively improving the effect of advertising delivery.
[0093] In one implementation, the specific implementation of recommending resources to an object based on recommended resources may be: sending the recommended resources to a terminal used by the object, and displaying the recommended resources on the terminal screen of the terminal. It is understandable that when multiple recommended resources are displayed on the terminal screen, there are differences in the display order of the recommended resources on the terminal screen, such as some recommended resources can be displayed first so that the object can browse the recommended resources first. Based on this, it can be known that the display order of each recommended resource can also be determined to display on the terminal screen based on the display order of each recommended resource. In one embodiment, the display order can be determined based on the feature difference between the object feature vector of the object and the resource feature vector of each recommended resource; for example, each recommended resource can be sorted in order from small to large in feature difference to obtain a corresponding resource sorting result, wherein the ranking of each recommended resource in the resource sorting result is the display order. For example, if the ranking of a recommended resource in the resource sorting result is 1, it indicates that the display order of the recommended resource is 1. It can be seen that through this display method, resources that are more compatible with the object can be displayed first to improve the resource display effect and thus improve the object experience.
[0094] In an embodiment of the present application, an object feature vector of an object can be obtained by using an object embedding vector that can represent an object and a target object enhancement vector that can represent a resource operated by the object, so that the object feature vector can not only contain the features of the object itself, but also contain the features of the resource operated by the object, that is, the object feature vector can contain the features of the two dimensions of object and resource, thereby effectively improving the feature characterization effect for the object. In addition, a resource embedding vector that can represent a resource and a target resource enhancement vector that can represent an object can be used to obtain a resource feature vector of a resource, so that the resource feature vector can not only contain the features of the candidate resource itself, but also contain the features of the object, that is, the resource feature vector can contain the features of the two dimensions of object and resource, thereby effectively improving the feature characterization effect for the resource. Then, when the object feature vector of an object with a better representation effect and the feature vector of a resource are used to determine the recommended resource, the accuracy of determining the recommended resource can be effectively improved, and more matching recommended resources can be screened out for the object, thereby effectively improving the consumption of the recommended resource, thereby improving the object experience.
[0095] Based on the above description, the embodiment of the present application further proposes another resource recommendation method; in the embodiment of the present application, the training process of the data processing network is mainly described; the data processing network mentioned in the embodiment of the present application is constructed using the idea of a double-tower network, and the model structure of the data processing network can be seen in Figure 4a As shown, the data processing network may include an object branch network and a resource branch network. The object branch network may include an object merging network and an object feature extraction network, and the resource branch network may include a resource merging network and a resource feature extraction network. Figure 4a The data processing network shown below is combined with Figure 4b The specific process of the resource recommendation method proposed in the embodiment of the present application is described. Figure 4b As shown, the resource recommendation method may include the following steps S401-S404:
[0096] S401, obtaining a plurality of sample data for training a data processing network.
[0097] Any sample data may include: sample object information of a sample object and sample resource information of a sample resource operated by the sample object. The sample object information and sample resource information may refer to the description of the object information and resource information in the above steps S201 and S202, which will not be repeated here.
[0098] S402, determining a sample object embedding vector of sample object information and a sample resource embedding vector of sample resource information in each sample data, and obtaining an object enhancement vector of the sample object and a resource enhancement vector of the sample resource in each sample data.
[0099] Among them, the method for determining the sample object embedding vector can refer to the method for determining the object embedding vector in the above step S201, and the method for determining the sample resource embedding vector can refer to the method for determining the resource embedding vector in the above step S202, which will not be repeated here.
[0100] In one implementation, during the training of the data processing network, an object enhancement vector can be assigned to each sample object, and a resource enhancement vector can be assigned to each sample resource. Before the data processing network starts training, the object enhancement vector and the resource enhancement vector can be randomly initialized. During the training of the data processing network, the object enhancement vector of each sample object and the resource enhancement vector of the sample resource are updated as the network is trained.
[0101] It should be noted that, in the embodiments of the present application, when calculating the network loss of the data processing network, for example, see Figure 4a As shown in the figure, the object enhancement vector will calculate the network loss with the output of the resource tower (Item Tower), and the object enhancement vector will use the output of the resource tower to update the object enhancement vector; similarly, the resource enhancement vector will calculate the network loss with the output of the object tower (User Tower), and the resource enhancement vector will update the resource enhancement vector with the output of the object tower. The object enhancement vector is the input for the bottom layer of the object tower, and the resource enhancement vector is the input for the bottom layer of the resource tower. In this way, the input of one tower carries valuable information of the other tower, implicitly realizing the information interaction between the two towers.
[0102] S403, calling the data processing network to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector and the object enhancement vector of the sample object in each sample data; and calling the data processing network to generate a sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and the resource enhancement 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 called to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector and the object enhancement vector of the sample object in each sample data; and the resource branch network can be called to generate a sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and the resource enhancement vector of the sample resource in each sample data.
[0104] Considering that the processing principle of each sample data by the data processing network is similar, the following description will be made by taking any sample data among the 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: 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: first, the sample resource embedding vector and the resource enhancement vector of the sample resource in any sample data are input 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, the target sample resource embedding vector of the sample resource in any sample data can be input 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 enhancement vector and the sample object feature vector of the sample object in each sample data, and the resource enhancement vector and the sample resource feature vector of the sample resource in each sample data, the data processing network is trained to obtain a trained data processing network.
[0108] In one implementation, a target prediction deviation of a data processing network can be generated based on an object enhancement vector and a sample object feature vector of a sample object in each sample data, and a resource enhancement vector and a sample resource feature vector of a sample resource in each sample data; and then the data processing network can be trained based on the target prediction deviation 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 deviation to obtain a trained data processing network.
[0109] The following is a detailed explanation of the target prediction deviation of the data processing network.
[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 in each sample data and the sample resource feature vector of the sample resource; and a second prediction bias of the data processing network can be generated based on the difference between the object enhancement vector of the sample object in each sample data and the sample resource feature vector of the sample resource; and a third prediction bias of the data processing network can be generated based on the difference between the resource enhancement vector of the sample resource in each sample data and the object resource feature vector of the sample object; 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 deviation, the second prediction deviation, and the third prediction deviation may be used as the target prediction deviation for the data processing network. In this embodiment, the computer device may calculate the target prediction deviation using the following formula (1):
[0112] L=L1+L2+L3(1)
[0113] Wherein, L represents the target prediction deviation; L1, L2 and L3 represent the first prediction deviation, the second prediction deviation and the third prediction deviation respectively.
[0114] In another embodiment, the first prediction deviation, the second prediction deviation, and the third prediction deviation may be weighted and summed to obtain the target prediction deviation for the data processing network; wherein the specific values corresponding to the weighted coefficients corresponding to the respective prediction deviations are not limited. In this embodiment, the computer device may calculate the target prediction deviation using the following formula (2):
[0115] L=L1+λ1L2+λ2L3(2)
[0116] Wherein, λ1 and λ2 represent weighting coefficients corresponding to the second prediction deviation and the third prediction deviation respectively.
[0117] It should be understood that the prediction deviation described here can be understood as the network loss (network loss value) required for training the data processing network. For the convenience of description, the first prediction deviation, the second prediction deviation and the third prediction deviation here can be referred to as the first loss value, the second loss value and the third loss value, respectively, and the target prediction deviation can be referred to as the target loss value.
[0118] The first prediction deviation, the second prediction deviation and the third prediction deviation are understood separately as follows.
[0119] 1. Regarding the first prediction bias
[0120] Optionally, for any sample data among multiple sample data, a first feature prediction deviation 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 and the sample resource feature vector of the sample resource in any sample data; and a second feature prediction deviation 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 and the sample resource feature vector of the sample resource in other sample data; finally, a first prediction deviation of the data processing network for any sample data can be generated based on the first feature prediction deviation and the second feature prediction deviation.
[0121] It should be understood that, for a sample object in a certain sample data, the sample resources in the same sample data can be understood as the positive sample of the sample object, that is, for a sample object and a sample resource in the same sample data, the sample resource can be understood as the positive sample of the sample object, or the sample object and the sample resource in the same sample data can be constructed as a positive sample pair; for a sample object in a certain sample data, the sample resources in other sample data can be understood as the negative sample of the sample object, or the sample objects and sample resources in different sample data can be constructed as a negative sample pair. For example, assuming that the sample object feature vector of a sample object in one sample data is represented by A1, the sample resource feature vector of a sample resource is represented by B1, and the sample resource feature vector of a sample resource in another 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 the sample object in one sample data are the collection of sample resources in other sample data in the batch; if the number of other sample data is multiple, then the negative samples of the sample object in one sample data are also multiple.
[0122] The first feature prediction deviation can be used to reduce the difference between the sample object feature vector of the sample object and the sample resource feature vector of the sample resource in the same sample data; or to reduce the difference between the sample object feature vector of the sample object included in the positive sample pair and the sample resource feature vector of the sample resource. The second feature prediction deviation can be used to increase the difference between the sample object feature vector of the sample object and the sample resource feature vector of the sample resource in different sample data; or to increase the difference between the sample object feature vector of the sample object included in the negative sample pair and the sample resource feature vector of the sample resource.
[0123] Optionally, the difference between the sample object feature vector of the sample object and the sample resource feature vector of the sample resource can be characterized by the similarity between the two feature vectors (i.e., the sample object feature vector and the sample resource feature vector); the smaller the similarity between the two feature vectors, the greater the difference between the two feature vectors, and the greater the similarity between the two feature vectors, the smaller the difference between the two feature vectors. For example, the similarity can be cosine similarity, that is, the cosine distance between the two feature vectors can be used as the similarity between the two feature vectors, and the smaller the cosine distance between the two feature vectors, the more similar the two feature vectors are.
[0124] Based on this, it can be known that, for any sample data among multiple sample data, 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 determined, that is, the cosine distance between the sample object feature vector of the sample object in any sample data and the sample resource feature vector of the sample resource is calculated, and the cosine distance can be used as the first feature prediction deviation of the generated data processing network for any sample object.
[0125] Determine 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 other sample data, that is, calculate the cosine distance 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 other sample data. In the case where the other sample data includes multiple samples, multiple cosine distances can be obtained, and the sum of the multiple cosine distances can be used as the second feature prediction deviation of the generated data processing network for any sample object.
[0126] As mentioned above, the first prediction deviation can be understood as the network loss value required for training the data processing network, such as the first loss value; based on the above description, it can be known that the idea used to calculate the first prediction deviation is contrastive learning (CL), and the loss function used in calculating the first prediction deviation (first loss value) can be a contrast loss function, such as the contrast loss function can be an InfoNCE (Info Noise Contrastive Estimation, noise contrast estimation) loss function. That is, under this embodiment, the computer device can calculate the first prediction deviation of the data processing network for any sample data through the following formula (3):
[0127]
[0128] Among them, L1 represents the object prediction deviation of the data processing network for a sample data, log() represents the logarithmic effect, and exp() represents the exponential effect; sim(a,b) represents the difference between a and b. The difference between a and b can be represented by similarity, and the greater the similarity between a and b, the smaller the difference between a and b, and the smaller the similarity between a and b, the greater the difference between a and b.
[0129] p u The sample object feature vector representing the sample object in the sample data, p v + The sample resource feature vector representing the sample resource in the sample data, p v + It can be understood as the positive sample of the sample object in the sample data. v - The sample resource feature vector representing the sample resource in other sample data, p v - It can be understood as the negative sample of the sample object in the sample data. P represents the set of sample resource feature vectors constructed from sample resources of other sample data. This P can be understood as the negative sample set of the sample object in the sample data. τ is a hyperparameter used to control the discrimination of the data processing network for negative samples. This hyperparameter can be set to a smaller value, such as 0.1, 0.2, etc.
[0130] It can be understood that in the training of the data processing network, the training is carried out in the direction of reducing the target prediction deviation. In the training process, the first loss value needs to be reduced. The larger the numerator in formula (3) and the smaller the denominator, the smaller the first loss value can be. Through the training of the data processing network, the similarity of the same category will be larger and the similarity of different categories will be smaller. The same category can refer to the sample object feature vector of the sample object in the same sample data and the sample resource feature vector of the sample resource, and the different categories can refer to the sample object feature vector of the sample object in different sample data and the sample resource feature vector of the sample resource.
[0131] In summary, training the data processing network by comparing positive and negative samples can effectively improve the training effect of the data processing network, so that the data processing network obtained through training can improve the accuracy of feature representation of objects and resources, and then improve the accuracy of resource recommendation for objects based on the object feature vector of the object and the resource feature vector of the resource.
[0132] Second, for the second prediction bias
[0133] As mentioned above, for any sample data among multiple sample data, a second prediction deviation of the data processing network for any sample data can be generated based on the difference between the object enhancement 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 above, the second prediction deviation can be understood as the network loss value required for training the data processing network, such as the second loss value; the loss function used to calculate the network loss value can be the MSE (Mean Square Error) loss function. That is, in this embodiment, the computer device can calculate the second prediction deviation of the data processing network by the following formula (4):
[0135]
[0136] Where T represents the number of sample data in a batch of training data processing network, a u Represents the object enhancement vector of a sample object in a sample data, p v represents the sample resource feature vector 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, and it can also indicate a u and p v It is the corresponding vector in the case of 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] 3. Regarding the third prediction bias
[0138] As mentioned above, for any sample data among multiple sample data, a third prediction deviation of the data processing network for any sample data can be generated based on the difference between the resource enhancement vector of the sample resource in any sample data and the sample object feature vector of the sample object in any sample data.
[0139] As mentioned above, the third prediction deviation can be understood as the network loss value required for training the data processing network, such as the third loss value; the loss function used to calculate the network loss value can be the MSE (Mean Square Error) loss function. That is, in this embodiment, the computer device can calculate the third prediction deviation of the data processing network by the following formula (5):
[0140]
[0141] Among them, av Represents the resource enhancement vector of a sample resource in a sample data, p u represents the sample object feature vector 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, and it can also indicate a v and p u It is the corresponding vector in the case of 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] Through the above understanding of the second prediction deviation and the third prediction deviation, it can be known that the object enhancement vector can use the output of the resource tower (or the resource branch network) to calculate the second prediction deviation, that is, the object enhancement vector can use the output of the resource tower to update the object enhancement vector; similarly, the resource enhancement vector will calculate the third prediction deviation with the output of the object tower (or the object branch network), and the resource enhancement vector will update the resource enhancement vector with the output of the object tower. In this way, the input of one tower carries valuable information of another tower, implicitly realizing the information interaction between the two towers.
[0143] It can be seen that at the bottom layer of the data processing network, the enhanced vector can be used to directly learn the output of another tower, and the learned enhanced vector can be input into the tower again for learning, that is, the features of the object and the features of the resource have interacted with each other at the bottom layer of the two towers. Compared with the User Tower and Item Tower in the DSSM network, which only perform inner product (dot product) operations (i.e., calculation of similarity) on the object feature vector and the resource feature vector at the top layer of the network to achieve feature crossing, the data processing network and the training framework of the data processing network proposed in the embodiment of the present application can perform feature crossing on the object side and the resource side at the bottom layer of the network in addition to performing feature crossing on the object side and the resource side at the top layer of the network, thereby effectively improving the learning effect of the object feature vector and the resource feature vector obtained by the final training, and further improving the feature representation effect of the object feature vector and the resource feature vector.
[0144] In one implementation, considering that the enhancement vector itself is to fit the feature vector output by the other tower and does not want to be disturbed by other gradients, the enhancement vector (object enhancement vector and resource enhancement vector) can adopt the stop gradient strategy when it is concatenated with other feature vectors for feature crossover, that is, the calculation of the second loss and the third loss is calculated by the idea of the stop gradient strategy; Figure 4aThe dotted line in the middle indicates that a gradient stop strategy is adopted. Through this gradient strategy, the enhancement vector can be affected only by the gradient of the imitation loss (i.e., the second loss and the third loss mentioned above), such as the object enhancement vector is only affected by the gradient of the second loss, and the resource enhancement vector is only affected by the gradient of the third loss, thereby effectively improving the learning effect of the object enhancement vector and resource enhancement vector obtained by the final training, and further improving the feature representation effect of the object feature vector and the resource feature vector.
[0145] In summary, in the process of training the data processing network, the object enhancement vector for the sample object in each sample data and the resource enhancement vector for the sample resource are constantly updated, and after the data processing network is trained, the updated object enhancement vector has learned the output of the resource tower well, and the object enhancement vector itself is to fit the output of the resource tower, and the output of the resource tower is a feature vector for the sample resource, that is, the updated object enhancement vector can characterize the characteristics of the sample resource corresponding to the sample object to a certain extent. Similarly, after the data processing network is trained, the updated resource enhancement vector has learned the output of the object tower well, and the resource enhancement vector itself is to fit the output of the object tower, and the output of the object tower is a feature vector for the sample object, that is, the updated resource enhancement vector can characterize the characteristics of the sample object to a certain extent. It can be seen that after the training of the data processing network is completed, the object enhancement vector for the sample object in each updated sample data and the resource enhancement vector for the sample resource can be stored in the vector library, so that the required vector can be directly obtained from the vector library when performing resource recommendation later.
[0146] For the convenience of description, the updated object enhancement vector may be referred to as a target object enhancement vector, and the updated resource enhancement vector may be referred to as a target resource enhancement vector.
[0147] In one implementation, the data processing network can be trained periodically, and the sample resources and sample objects in the sample data for each training of the data processing network can be different to ensure that more target object enhancement vectors of objects and target resource enhancement vectors of resources can be obtained, and the obtained enhancement vectors are stored in a vector library to ensure that the enhancement vectors in the vector library can be updated in real time and contain enhancement vectors of objects and resources in the resource recommendation system as much as possible, so that in the actual resource recommendation scenario, the corresponding enhancement vector can be obtained. In one embodiment, in the actual resource recommendation scenario, if the corresponding target object enhancement vector or target resource enhancement vector cannot be obtained from the vector library, the target object enhancement vector or target resource enhancement vector can be assigned a default value, which can be a vector of all 0s, or a vector of all 1s, or a randomly generated vector, without limitation.
[0148] Based on this, it can be known that in one implementation, the object enhancement vector of the sample object in each sample data can be updated based on the difference between the object enhancement vector of the sample object in each sample data and the sample resource feature vector of the sample resource, so as to obtain the target object enhancement vector for the sample object in each sample data; and the resource enhancement vector of the sample resource in each sample data can be updated based on the difference between the resource enhancement vector of the sample resource in each sample data and the object resource feature vector of the sample object, so as to obtain the target resource enhancement vector for the sample resource in each sample data. Finally, the sample object in each sample data and the target object enhancement vector of the sample object can be associated and stored in the vector library, and the sample resource in each sample data and the target resource enhancement vector of the sample resource can be associated and stored in the vector library.
[0149] In an embodiment of the present application, the enhanced vector can be used at the bottom layer of the data processing network to directly learn the output of another tower, and the learned enhanced vector can be input into the tower again for learning, that is, the features of the object and the features of the resource are interacted at the bottom layer of the two towers, thereby realizing a dual enhanced training method. In addition to performing feature crossover between the object side and the resource side at the top layer of the network, the data processing network and the training framework of the data processing network proposed in the embodiment of the present application can also perform feature crossover between the object side and the resource side at the bottom layer of the network, thereby effectively improving the learning effect of the object feature vector and the resource feature vector obtained by the final training, and further improving the feature representation effect of the object feature vector and the resource feature vector.
[0150] Based on the above description, the embodiment of the present application further proposes another resource recommendation method; in the embodiment of the present application, the training process of the data processing network is mainly described; and the model structure of the data processing network mentioned in the embodiment of the present application can be referred to Figure 5a shown.
[0151] Based on the idea of attention mechanism, Figure 4a The network structure is slightly changed to design Figure 5a The data processing network shown in the figure 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, and the resource branch network may include a resource merging network and a resource feature extraction network. Figure 5a The data processing network shown is similar to Figure 4a The data processing network shown is compared: Figure 5a The object branch network of the data processing network shown in also includes an enhancement network.
[0152] based on Figure 5a The data processing network shown below is combined with Figure 5b The specific process of the resource recommendation method proposed in the embodiment of the present application is described. Figure 5b As shown, the resource recommendation method may include the following steps S501-S506:
[0153] S501, obtaining a plurality of sample data for training a data processing network.
[0154] Any sample data may include: sample object information of a sample object and sample resource information of a sample resource operated by the sample object; any sample data may also include: sample behavior information of an operation behavior of a sample object on the sample resource operated. The sample object information, sample resource information and sample behavior information may refer to the description of the object information, resource information and behavior information in the above steps S201, S202 and S203, which will not be repeated here.
[0155] S502, determining a sample object embedding vector of sample object information and a sample resource embedding vector of sample resource information in each sample data, and obtaining an object enhancement vector of the sample object and a resource enhancement vector of the sample resource in each sample data.
[0156] Among them, the method for determining the sample object embedding vector can refer to the method for determining the object embedding vector in the above step S201, and the method for determining the sample resource embedding vector can refer to the method for determining the resource embedding vector in the above step S202, which will not be repeated here.
[0157] S503: Determine a sample behavior embedding vector of sample behavior information of a sample object in each sample data.
[0158] The method for determining the sample behavior embedding vector may refer to the method for determining the behavior embedding vector in the above step S203, which will not be described in detail here.
[0159] S504, using an attention mechanism 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 enhanced behavior vector of the sample object in each sample data.
[0160] Considering that the principle of enhancing the sample behavior embedding vector of the sample object in each sample data is similar, the following is an explanation using any sample data among the multiple sample data as an example.
[0161] In one implementation, after determining the sample behavior embedding vector of the sample object in each sample data, each sample behavior embedding vector may be enhanced to obtain a sample enhanced behavior vector for the sample object in any sample data. For example, an attention mechanism may be used to enhance the sample behavior embedding vector based on the object enhancement vector to obtain a sample enhanced behavior vector for the sample object in any sample data.
[0162] The following is an explanation of using an attention mechanism based on an object enhancement vector to enhance the sample behavior embedding vector to obtain a sample enhanced behavior vector of the sample object.
[0163] It is understandable that the core of the attention mechanism is to let the network corresponding to the attention mechanism (such as the enhanced network here) pay attention to where it needs more attention, which is generally reflected in the form of attention weights. Usually, the essence of the attention mechanism can be understood as weighted summation. For example, in the training process of the data processing network, the attention mechanism can use the object enhancement vector as the query, the sample behavior embedding vector as the key, and the sample enhancement behavior vector as the value to realize the processing mechanism of the attention mechanism network. Correspondingly, in the embodiment of the present application, considering that the sample behavior embedding vector is an embedding vector for the operation behavior, the attention mechanism can be understood as the weighted summation of the operation behavior of the sample object, and the sample enhancement behavior vector can be understood as the weighted summation result of the operation behavior.
[0164] Based on this, the specific implementation of the attention mechanism to obtain the sample enhanced behavior vector can be: first, based on the object enhancement vector and the sample behavior embedding vector, determine the sample weight coefficient for the sample behavior embedding vector; wherein the sample weight coefficient can be used to represent the contribution of the object enhancement vector to the sample behavior embedding vector. Then, the sample behavior embedding vector can be weighted and summed based on the sample weight coefficient to obtain the sample enhanced 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 vector, that is, the sample enhanced behavior vector is an embedding vector that is more representative of the operational behavior of the sample object.
[0165] In this implementation, the computer device can calculate the sample enhancement behavior vector by the following formula (6) and formula (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 Represents the network parameters in the enhanced network; MatMul(a,b) represents a multiplied by b; scores represents the sample weighting coefficient for the sample behavior embedding vector, and output represents the sample enhanced behavior vector.
[0169] In summary, in the embodiment of the present application, a corresponding enhancement vector a may be assigned to each sample object and sample resource. u and a v ; and can model the behavior sequence of the object side with Attention. u As a query, the historical behavior of the object is retrieved, and then the final behavior feature expression (i.e., sample enhanced behavior vector) is obtained by weighted summation.
[0170] S505, calling the data processing network to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector, the object enhancement vector and the sample enhancement behavior vector of the sample object in each sample data; and calling the data processing network to generate a sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and the resource enhancement vector of the sample resource in each sample data.
[0171] Considering that the processing principle of each sample data by the data processing network is similar, the following description will be made by taking any sample data among the 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: first, the sample object embedding vector, the object enhancement vector and the 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 enhancement vector and the sample object feature vector of the sample object in each sample data, and the resource enhancement vector and the sample resource feature vector of the sample resource in each sample data, the data processing network is trained to obtain a trained data processing network.
[0174] The specific implementation of steps S505-S506 can refer to the specific description of steps S403-S404 in the above embodiment, which will not be repeated here.
[0175] In one implementation, the trained data processing network can also be tested to verify the effectiveness of the training method proposed by the embodiment of the present application; in a specific implementation, taking the advertising delivery scenario as an example, the data processing network in the embodiment of the present application is compared with the traditional DSSM (Deep Structured Semantic Model) network. When performing AB testing, it is found that compared with the DSSM network, the recall rate of the data processing network can be increased by 3%, and the GMV (Gross Merchandise Volume) can be increased by 0.5%, thereby effectively verifying the effectiveness of the training method of the data processing network proposed in the embodiment of the present application. DSSM is a model that uses a deep neural network to represent text (such as sentences, queries, entities, etc.) as vectors and can be applied to text similarity matching scenarios.
[0176] In an embodiment of the present application, the enhanced vector can be used at the bottom layer of the data processing network to directly learn the output of another tower, and the learned enhanced vector can be input into the tower again for learning, that is, the features of the object and the features of the resource have interacted with each other at the bottom layer of the two towers. In addition to performing feature crossover between the object side and the resource side at the top layer of the network, the data processing network and the training framework of the data processing network proposed in the embodiment of the present application can also perform feature crossover between the object side and the resource side at the bottom layer of the network. Moreover, the attention mechanism can be used to extract the behavioral features of the object to enhance the representation ability of the object feature vector of the object; it can be seen that the embodiment of the present application proposes a data processing network and a training method for the data processing network that combine dual enhancement with the attention mechanism, thereby effectively improving the learning effect of the object feature vector and the resource feature vector obtained by the final training, and further improving the feature representation effect of the object feature vector and the resource feature vector.
[0177] Among them, the above method embodiments are all examples of the method of the present application, and the description of each embodiment has its own emphasis. For the parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. For example, after training the data processing network, the data processing network can also be applied to actual resource recommendation scenarios to achieve resource recommendation. Exemplarily, after obtaining the object embedding vector and target object enhancement vector of the object, the resource embedding vector and target resource enhancement 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 resource, and then the object feature vector of the object and the resource feature vector of the candidate resource can be used to recommend resources to the object, which will not be repeated here.
[0178] The method of the embodiment of the present application is described in detail above. In order to facilitate better implementation of the above scheme of the embodiment of the present application, the device of the embodiment of the present application is provided below accordingly.
[0179] Figure 6 The schematic diagram of the structure of a resource recommendation device provided by an exemplary embodiment of the present application is shown; the resource recommendation device can be a computer program (including program code) running in 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 embodiment shown. Figure 6 , the resource recommendation device includes the following units:
[0180] A first acquisition unit 601 is used to acquire an object embedding vector and a target object enhancement vector of an object; the object embedding vector of the object is used to characterize the object, and the target object enhancement vector is obtained by performing feature fitting on resources operated on the object;
[0181] A second acquisition unit 602 is used to acquire a resource embedding vector and a 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 any candidate resource, and the target resource enhancement vector is obtained by performing feature fitting on the object;
[0182] The extraction unit 603 is used to 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;
[0183] The recommendation unit 604 is configured to determine a recommended resource from the candidate resource set based on the object feature vector and the resource feature vector of each candidate resource, and make a resource recommendation for the object based on the recommended resource.
[0184] In one implementation, the extracting unit 603 is specifically configured to:
[0185] Acquire a behavior embedding vector of the object; the behavior embedding vector is used to characterize the operation behavior of the object on the candidate resource;
[0186] Using an attention mechanism to enhance the behavior embedding vector based on the target object enhancement vector, to obtain an enhanced behavior vector of the object;
[0187] Feature extraction is performed on the object embedding vector, the target object enhancement vector, and the enhancement behavior vector of the object to obtain an object feature vector of the object.
[0188] In one implementation, the extracting unit 603 is specifically configured to:
[0189] Merging the object embedding vector, the target object enhancement vector and the enhancement behavior vector of the object to obtain the target object embedding vector of the object;
[0190] Feature extraction is performed on the target object embedding vector to obtain an object feature vector of the object.
[0191] In one implementation, the extracting unit 603 is specifically configured to:
[0192] For any candidate resource in the candidate resource set, merging the resource embedding vector and the target resource enhancement vector of the any candidate resource to obtain the target resource embedding vector of the any candidate resource;
[0193] Feature extraction is performed on the target resource embedding vector to obtain a resource feature vector of any candidate resource.
[0194] In one implementation, the recommendation unit 604 is specifically configured to:
[0195] Obtaining feature differences between the object feature vector and the resource feature vector of each candidate resource;
[0196] Based on the feature differences between the object feature vector and the resource feature vector of each candidate resource, a recommended resource is determined from the candidate resource set.
[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 apparatus further includes a training unit 605, which is specifically used to:
[0198] Acquire a plurality of sample data for training the data processing network, wherein any sample data includes: sample object information of a sample object and sample resource information of a sample resource operated by the sample object;
[0199] Determine a sample object embedding vector of sample object information and a sample resource embedding vector of sample resource information in each sample data, and obtain an object enhancement vector of the sample object and a resource enhancement vector of the sample resource in each sample data;
[0200] Calling the data processing network to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector and the object enhancement vector of the sample object in each sample data; and calling the data processing network to generate a sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and the resource enhancement vector of the sample resource in each sample data;
[0201] Based on the object enhancement vector and the sample object feature vector of the sample object in each sample data, and the resource enhancement vector and the sample resource feature vector of the sample resource in each sample data, the data processing network is trained to obtain a trained data processing network.
[0202] In one implementation, the training unit 605 is further configured to:
[0203] Based on the difference between the object enhancement vector of the sample object in each sample data and the sample resource feature vector of the sample resource, the object enhancement vector of the sample object in each sample data is updated to obtain a target object enhancement vector for the sample object in each sample data;
[0204] Based on the difference between the resource enhancement vector of the sample resource in each sample data and the object resource feature vector of the sample object, the resource enhancement vector of the sample resource in each sample data is updated to obtain a target resource enhancement vector for the sample resource in each sample data;
[0205] The sample object in each sample data and the target object enhancement vector of the sample object are associated and stored in a vector library, and the sample resource in each sample data and the target resource enhancement vector of the sample resource are associated and stored in the vector library.
[0206] In one implementation, the training unit 605 is specifically configured to:
[0207] Generate a target prediction deviation of the data processing network based on an object enhancement vector and a sample object feature vector of the sample object in each sample data and a resource enhancement vector and a sample resource feature vector of the sample resource in each sample data;
[0208] The data processing network is trained based on the target prediction deviation of the data processing network to obtain a trained data processing network.
[0209] In one implementation, the training unit 605 is specifically configured to:
[0210] generating a first prediction deviation of the data processing network based on a difference between a sample object feature vector of the sample object and a sample resource feature vector of the sample resource in each sample data;
[0211] generating a second prediction deviation of the data processing network based on a difference between an object enhancement vector of a sample object in each sample data and a sample resource feature vector of a sample resource;
[0212] generating a third prediction deviation of the data processing network based on a difference between a resource enhancement vector of a sample resource and an object resource feature vector of a sample object in each sample data;
[0213] A target prediction deviation of the data processing network is generated based on the first prediction deviation, the second prediction deviation and the third prediction deviation.
[0214] In one implementation, the training unit 605 is specifically configured to:
[0215] For any sample data among the multiple sample data, based on a difference between a sample object feature vector of a sample object in the any sample data and a sample resource feature vector of a sample resource in the any sample data, generating a first feature prediction deviation of the data processing network for the any sample data;
[0216] generating a second feature prediction deviation of the data processing network for the any sample data based on a difference between a sample object feature vector of the sample object in the any sample data and a sample resource feature vector of the sample resource in other sample data;
[0217] Based on the first feature prediction deviation and the second feature prediction deviation, a first prediction deviation of the data processing network for any sample data is generated.
[0218] In one implementation, any sample data further includes: sample behavior information of an operation behavior of a sample object on the operated sample resource; the training unit 605 is specifically used to:
[0219] Determine a sample behavior embedding vector of sample behavior information of the sample object in each sample data;
[0220] Using an attention mechanism 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 enhanced behavior vector of the sample object in each sample data;
[0221] The data processing network is called to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector, the object enhancement vector and the sample enhancement behavior vector of the sample object in each sample data.
[0222] It is understood that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional units in the embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0223] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 7 As shown, the computer device includes: at least one processor 701 and a memory 702. Optionally, the computer device may further include a network interface 703. The processor 701, the memory 702 and the network interface 703 may exchange data, the network interface 703 is controlled by the processor 701 to send and receive messages, the memory 702 is used to store a computer program, the computer program includes program instructions, and the processor 701 is used to execute the program instructions stored in the memory 702. The processor 701 is configured to call the program instructions to execute the above method.
[0224] Among them, the memory 702 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 702 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), etc.; 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 a possible implementation, the memory 702 is used to store program instructions, and the processor 701 may call the program instructions to perform the following steps:
[0227] Acquire an object embedding vector and a target object enhancement vector of the object; the object embedding vector of the object is used to characterize the object, and the target object enhancement vector is obtained by performing feature fitting on resources operated on the object;
[0228] Obtaining a resource embedding vector and a target resource enhancement vector for each candidate resource in a candidate resource set for the object; the resource embedding vector of any candidate resource is used to characterize the any candidate resource, and the target resource enhancement vector is obtained by performing feature fitting on the object;
[0229] Performing 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; performing 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;
[0230] Based on the object feature vector and the resource feature vector of each candidate resource, a recommended resource is determined from the candidate resource set, and resource recommendations are made to the object based on the recommended resource.
[0231] In one implementation, the processor 701 is specifically configured to:
[0232] Acquire a behavior embedding vector of the object; the behavior embedding vector is used to characterize the operation behavior of the object on the candidate resource;
[0233] Using an attention mechanism to enhance the behavior embedding vector based on the target object enhancement vector, to obtain an enhanced behavior vector of the object;
[0234] Feature extraction is performed on the object embedding vector, the target object enhancement vector, and the enhancement behavior vector of the object to obtain an object feature vector of the object.
[0235] In one implementation, the processor 701 is specifically configured to:
[0236] Merging the object embedding vector, the target object enhancement vector and the enhancement behavior vector of the object to obtain the target object embedding vector of the object;
[0237] Feature extraction is performed on the target object embedding vector to obtain an object feature vector of the object.
[0238] In one implementation, the processor 701 is specifically configured to:
[0239] For any candidate resource in the candidate resource set, merging the resource embedding vector and the target resource enhancement vector of the any candidate resource to obtain the target resource embedding vector of the any candidate resource;
[0240] Feature extraction is performed on the target resource embedding vector to obtain a resource feature vector of any candidate resource.
[0241] In one implementation, the processor 701 is specifically configured to:
[0242] Obtaining feature differences between the object feature vector and the resource feature vector of each candidate resource;
[0243] Based on the feature differences between the object feature vector and the resource feature vector of each candidate resource, a recommended resource is determined from the candidate resource set.
[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 a plurality of sample data for training the data processing network, wherein any sample data includes: sample object information of a sample object and sample resource information of a sample resource operated by the sample object;
[0246] Determine a sample object embedding vector of sample object information and a sample resource embedding vector of sample resource information in each sample data, and obtain an object enhancement vector of the sample object and a resource enhancement vector of the sample resource in each sample data;
[0247] Calling the data processing network to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector and the object enhancement vector of the sample object in each sample data; and calling the data processing network to generate a sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and the resource enhancement vector of the sample resource in each sample data;
[0248] Based on the object enhancement vector and the sample object feature vector of the sample object in each sample data, and the resource enhancement vector and the sample resource feature vector of the sample resource in each sample data, the data processing network is trained to obtain a trained data processing network.
[0249] In one implementation, the processor 701 is further configured to:
[0250] Based on the difference between the object enhancement vector of the sample object in each sample data and the sample resource feature vector of the sample resource, the object enhancement vector of the sample object in each sample data is updated to obtain a target object enhancement vector for the sample object in each sample data;
[0251] Based on the difference between the resource enhancement vector of the sample resource in each sample data and the object resource feature vector of the sample object, the resource enhancement vector of the sample resource in each sample data is updated to obtain a target resource enhancement vector for the sample resource in each sample data;
[0252] The sample object in each sample data and the target object enhancement vector of the sample object are associated and stored in a vector library, and the sample resource in each sample data and the target resource enhancement vector of the sample resource are associated and stored in the vector library.
[0253] In one implementation, the processor 701 is specifically configured to:
[0254] Generate a target prediction deviation of the data processing network based on an object enhancement vector and a sample object feature vector of the sample object in each sample data and a resource enhancement vector and a sample resource feature vector of the sample resource in each sample data;
[0255] The data processing network is trained based on the target prediction deviation of the data processing network to obtain a trained data processing network.
[0256] In one implementation, the processor 701 is specifically configured to:
[0257] generating a first prediction deviation of the data processing network based on a difference between a sample object feature vector of the sample object and a sample resource feature vector of the sample resource in each sample data;
[0258] generating a second prediction deviation of the data processing network based on a difference between an object enhancement vector of a sample object in each sample data and a sample resource feature vector of a sample resource;
[0259] generating a third prediction deviation of the data processing network based on a difference between a resource enhancement vector of a sample resource and an object resource feature vector of a sample object in each sample data;
[0260] A target prediction deviation of the data processing network is generated based on the first prediction deviation, the second prediction deviation and the third prediction deviation.
[0261] In one implementation, the processor 701 is specifically configured to:
[0262] For any sample data among the multiple sample data, based on a difference between a sample object feature vector of a sample object in the any sample data and a sample resource feature vector of a sample resource in the any sample data, generating a first feature prediction deviation of the data processing network for the any sample data;
[0263] generating a second feature prediction deviation of the data processing network for the any sample data based on a difference between a sample object feature vector of the sample object in the any sample data and a sample resource feature vector of the sample resource in other sample data;
[0264] Based on the first feature prediction deviation and the second feature prediction deviation, a first prediction deviation of the data processing network for any sample data is generated.
[0265] In an implementation manner, the any sample data further includes: sample behavior information of an operation behavior of a sample object on the operated sample resource; the processor 701 is specifically configured to:
[0266] Determine a sample behavior embedding vector of sample behavior information of the sample object in each sample data;
[0267] Using an attention mechanism 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 enhanced behavior vector of the sample object in each sample data;
[0268] The data processing network is called to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector, the object enhancement vector and the sample enhancement behavior vector of the sample object in each sample data.
[0269] In a specific implementation, the above-described device, processor, memory, etc. can execute the implementation described in the above-mentioned method embodiment, and can also execute the implementation described in the embodiment of the present application, which will not be repeated here.
[0270] A computer (readable) storage medium is also provided in an embodiment of the present application, and the computer storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by the processor, the processor can execute some or all of the steps performed in the above method embodiment. Optionally, the computer storage medium can be volatile or non-volatile. The computer-readable storage medium can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc.; the data storage area can store data created according to the use of the blockchain node, etc.
[0271] The embodiment of the present application also provides a computer program product, which includes program instructions, and when the program instructions are executed by a processor, some or all of the steps in the resource recommendation method described above can be implemented. Optionally, the program instructions can 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 the processor executes the program instructions, so that the computer device performs the resource recommendation method provided above.
[0272] The present application also involves blockchain-related technologies. Among them, blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain may include a blockchain underlying platform, a platform product service layer, and an application service layer. The blockchain includes a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the nodes in the blockchain system. In this application, the category recognition results of the determined text to be identified can be added to the blockchain for storage to ensure the immutability of the data.
[0273] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0274] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more program instructions. When loading and executing the computer program instructions on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. 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 by a computer-readable storage medium.
[0275] Program instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)), etc.
[0276] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A resource recommendation method, characterized in that: The method comprises: Acquire an object embedding vector and a target object enhancement vector of the object; the object embedding vector of the object is used to characterize the object, and the target object enhancement vector is obtained by performing feature fitting on resources operated on the object; Obtaining a resource embedding vector and a target resource enhancement vector for each candidate resource in a candidate resource set for the object; the resource embedding vector of any candidate resource is used to characterize the any candidate resource, and the target resource enhancement vector is obtained by performing feature fitting on the object; Performing 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; performing 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; Based on the object feature vector and the resource feature vector of each candidate resource, a recommended resource is determined from the candidate resource set, and resource recommendations are made to the object based on the recommended resource.
2. The method according to claim 1, characterized in that: The extracting features of the object embedding vector and the target object enhancement vector of the object to obtain the object feature vector of the object includes: Acquire a behavior embedding vector of the object; the behavior embedding vector is used to characterize the operation behavior of the object on the candidate resource; Using an attention mechanism to enhance the behavior embedding vector based on the target object enhancement vector, to obtain an enhanced behavior vector of the object; Feature extraction is performed on the object embedding vector, the target object enhancement vector, and the enhancement behavior vector of the object to obtain an object feature vector of the object.
3. The method according to claim 2, characterized in that The extracting features of the object embedding vector, the target object enhancement vector and the enhancement behavior vector of the object to obtain the object feature vector of the object includes: Merging the object embedding vector, the target object enhancement vector and the enhancement behavior vector of the object to obtain the target object embedding vector of the object; Feature extraction is performed on the target object embedding vector to obtain an object feature vector of the object.
4. The method according to claim 1, characterized in that: The extracting features of 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, merging the resource embedding vector and the target resource enhancement vector of the any candidate resource to obtain the target resource embedding vector of the any candidate resource; Feature extraction is performed on the target resource embedding vector to obtain a resource feature vector of any candidate resource.
5. The method according to claim 1, characterized in that The determining a recommended resource from the candidate resource set based on the object feature vector and the resource feature vector of each candidate resource includes: Obtaining 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, a recommended resource is determined from the candidate resource set.
6. The method according to any one of claims 1 to 5, 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 comprises: Acquire a plurality of sample data for training the data processing network, wherein any sample data includes: sample object information of a sample object and sample resource information of a sample resource operated by the sample object; Determine a sample object embedding vector of sample object information and a sample resource embedding vector of sample resource information in each sample data, and obtain an object enhancement vector of the sample object and a resource enhancement vector of the sample resource in each sample data; Calling the data processing network to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector and the object enhancement vector of the sample object in each sample data; and calling the data processing network to generate a sample resource feature vector of the sample resource in each sample data based on the sample resource embedding vector and the resource enhancement vector of the sample resource in each sample data; Based on the object enhancement vector and the sample object feature vector of the sample object in each sample data, and the resource enhancement vector and the sample resource feature vector of the sample resource in each sample data, the data processing network is trained to obtain a trained data processing network.
7. The method according to claim 6, characterized in that Also includes: Based on the difference between the object enhancement vector of the sample object in each sample data and the sample resource feature vector of the sample resource, the object enhancement vector of the sample object in each sample data is updated to obtain a target object enhancement vector for the sample object in each sample data; Based on the differences between the resource enhancement vector of the sample resource in each sample data and the object resource feature vector of the sample object, the resource enhancement vector of the sample resource in each sample data is updated to obtain a target resource enhancement vector for the sample resource in each sample data; The sample object in each sample data and the target object enhancement vector of the sample object are associated and stored in a vector library, and the sample resource in each sample data and the target resource enhancement vector of the sample resource are associated and stored in the vector library.
8. The method according to claim 6, characterized in that The step of training the data processing network based on the object enhancement vector and the sample object feature vector of the sample object in each sample data and the resource enhancement vector and the sample resource feature vector of the sample resource in each sample data to obtain a trained data processing network comprises: Generate a target prediction deviation of the data processing network based on an object enhancement vector and a sample object feature vector of the sample object in each sample data and a resource enhancement vector and a sample resource feature vector of the sample resource in each sample data; The data processing network is trained based on the target prediction deviation of the data processing network to obtain a trained data processing network.
9. The method according to claim 8, characterized in that The generating the target prediction deviation of the data processing network based on the object enhancement vector and the sample object feature vector of the sample object in each sample data and the resource enhancement vector and the sample resource feature vector of the sample resource in each sample data comprises: generating a first prediction deviation of the data processing network based on a difference between a sample object feature vector of the sample object and a sample resource feature vector of the sample resource in each sample data; generating a second prediction deviation of the data processing network based on a difference between an object enhancement vector of a sample object in each sample data and a sample resource feature vector of a sample resource; generating a third prediction deviation of the data processing network based on a difference between a resource enhancement vector of a sample resource and an object resource feature vector of a sample object in each sample data; A target prediction deviation of the data processing network is generated based on the first prediction deviation, the second prediction deviation and the third prediction deviation.
10. The method according to claim 9, characterized in that The generating a first prediction deviation of the data processing network based on a difference between a sample object feature vector of a sample object and a sample resource feature vector of a sample resource in each sample data comprises: For any sample data among the multiple sample data, based on a difference between a sample object feature vector of a sample object in the any sample data and a sample resource feature vector of a sample resource in the any sample data, generating a first feature prediction deviation of the data processing network for the any sample data; generating a second feature prediction deviation of the data processing network for the any sample data based on a difference between a sample object feature vector of the sample object in the any sample data and a sample resource feature vector of the sample resource in other sample data; Based on the first feature prediction deviation and the second feature prediction deviation, a first prediction deviation of the data processing network for any sample data is generated.
11. The method according to claim 6, characterized in that The any sample data further includes: sample behavior information of an operation behavior of a sample object on the operated sample resource; the calling data processing network generates a sample object feature vector of the sample object in each sample data based on the sample object embedding vector and the object enhancement vector of the sample object in each sample data, including: Determine a sample behavior embedding vector of sample behavior information of the sample object in each sample data; Using an attention mechanism 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 enhanced behavior vector of the sample object in each sample data; The data processing network is called to generate a sample object feature vector of the sample object in each sample data based on the sample object embedding vector, the object enhancement vector and the sample enhancement behavior vector of the sample object in each sample data.
12. A resource recommendation device, characterized in that: include: A first acquisition unit, used to acquire an object embedding vector of the object and a target object enhancement vector; The object embedding vector of the object is used to characterize the object, and the target object enhancement vector is obtained by performing feature fitting on the resources operated on the object; A second acquisition unit, configured to acquire a resource embedding vector and a 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 any candidate resource, and the target resource enhancement vector is obtained by performing feature fitting on the object; An extraction unit is used to 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; and 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; A recommendation unit is used to determine a recommended resource from the candidate resource set based on the object feature vector and the resource feature vector of each candidate resource, and make a resource recommendation for the object based on the recommended resource.
13. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to implement the method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product comprises program instructions, and when the program instructions are executed by a processor, they are used to implement the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Resource recommendation method and device, electronic equipment, product and medium
CN114428910A
Multimedia resource recommendation method and device and object representation network generation method and device
CN114491093A
Multimedia resource processing method and apparatus, and device and storage medium
WO2022262561A1
