Target model training method and recommendation method
By inputting data on object-item interaction and social relationships into a pre-defined model, and adjusting parameters using denoising self-supervised loss, the problem of low recommendation accuracy is solved, and high-quality item and object recommendations are achieved.
Patent Information
- Application Number
- CN202410588419.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2025-11-14
AI Technical Summary
Among existing recommendation technologies, the accuracy of item recommendation and object recommendation is low, and there are problems such as social noise interference and difficulty in feature extraction and utilization.
By inputting the first type of data representing the interaction between objects and items and the second type of data representing the social relationships between multiple objects into the preset model, the model parameters are adjusted using denoising self-supervised loss to remove social noise and improve feature quality.
It improves the accuracy of item and object recommendations, enhances feature quality, and overcomes the problems of social noise interference and difficulties in feature extraction and utilization.
Smart Images

Figure CN120950758A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a target model training method and a recommendation method. Background Technology
[0002] With the rapid development of the mobile internet, internet applications have brought great convenience to users' lives. Among them, AI-based recommendation technology has significantly enriched the functionality of internet applications. Based on recommendation technology, internet applications can provide users with advanced services such as related user recommendations and item recommendations. However, recommendation technologies in this field suffer from low accuracy. Summary of the Invention
[0003] This application provides a target model training method and a recommendation method, which can improve the accuracy of object recommendation and item recommendation.
[0004] According to one aspect of the embodiments of this application, a target model training method is provided, the method comprising:
[0005] Obtain sample data, which includes first relationship data and second relationship data. The first relationship data represents the interaction relationship between the sample object and the sample item, and the second relationship data represents the social relationship of the sample object.
[0006] The sample data is input into a preset model for feature extraction to obtain the first feature corresponding to each sample object in the first relation data and the second feature corresponding to each sample object in the second relation data.
[0007] Based on the first correlation and the second correlation, the noise reduction self-supervised loss is determined. The first correlation refers to the correlation between the first features corresponding to different sample objects, and the second correlation refers to the correlation between the second features corresponding to different sample objects.
[0008] The parameters of the preset model are adjusted based on the model loss to obtain the target model, wherein the model loss includes the noise reduction self-supervised loss.
[0009] According to one aspect of the embodiments of this application, a recommendation method is provided, the method comprising:
[0010] Acquire target data, which includes third relationship data and fourth relationship data. The third relationship data represents the interaction relationship between the target object and the target item, and the fourth relationship data represents the social relationship of the target object.
[0011] The target data is input into the target model to obtain the feature extraction results;
[0012] The feature extraction result includes the first feature corresponding to each target object in the third relationship data, and item recommendation is made based on the feature extraction result;
[0013] or,
[0014] The feature extraction result includes the second feature corresponding to each target object in the fourth relation data, and object recommendation is performed based on the feature extraction result;
[0015] The target model is trained according to the aforementioned target model training method.
[0016] According to one aspect of the embodiments of this application, a target model training apparatus is provided, the apparatus comprising:
[0017] The sample acquisition module is used to acquire sample data, which includes first relationship data and second relationship data. The first relationship data represents the interaction relationship between the sample object and the sample item, and the second relationship data represents the social relationship of the sample object.
[0018] The training module is used to perform the following operations:
[0019] The sample data is input into a preset model for feature extraction to obtain the first feature corresponding to each sample object in the first relation data and the second feature corresponding to each sample object in the second relation data.
[0020] Based on the first correlation and the second correlation, the noise reduction self-supervised loss is determined. The first correlation refers to the correlation between the first features corresponding to different sample objects, and the second correlation refers to the correlation between the second features corresponding to different sample objects.
[0021] The parameters of the preset model are adjusted based on the model loss to obtain the target model, wherein the model loss includes the noise reduction self-supervised loss.
[0022] According to one aspect of the embodiments of this application, a recommendation device is provided, the device comprising:
[0023] The data acquisition module is used to acquire target data, which includes third relationship data and fourth relationship data. The third relationship data represents the interaction relationship between the target object and the target item, and the fourth relationship data represents the social relationship of the target object.
[0024] The recommendation module is used to perform the following operations:
[0025] The target data is input into the target model to obtain the feature extraction result. The feature extraction result includes the first feature corresponding to each target object in the third relation data and the second feature corresponding to each target object in the fourth relation data.
[0026] Based on the feature extraction results, object or item recommendations are made.
[0027] The target model is trained according to the aforementioned target model training method.
[0028] According to one aspect of the embodiments of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the above-described target model training method or recommendation method.
[0029] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored in the storage medium, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the above-described target model training method or recommendation method.
[0030] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform an action to implement the above-described target model training method or recommendation method.
[0031] The technical solution provided in this application can bring the following beneficial effects:
[0032] This application proposes a target model training method and a recommendation method. In the target model training method, two types of data are simultaneously input into a preset model. The first type of data represents the interaction relationship between objects and items, and the second type of data represents the social relationship between multiple objects. This yields the features of objects based on the first type of data and the correlation between those features, as well as the features of objects based on the second type of data and the correlation between those features. A denoising self-supervised loss is determined based on these two correlations. This denoising self-supervised loss can be used to quantify the consistency between the relationships between objects in the first type of data and the relationships between objects in the second type of data. Adjusting the model parameters based on this denoising self-supervised loss allows the tuned target model to perceive different... The commonality of object interactions in the first type of data is used to remove social noise from the second type of data by using the first type of data that represents the interaction relationship between objects and items. Furthermore, the quality of the features obtained after feature extraction of objects and items in the first type of data is improved by using the denoised second type of data. This results in the three features extracted by the target model having high quality. These three features are the features of objects in the first type of data, the features of items in the first type of data, and the features of objects in the second type of data. High-quality features play a decisive role in improving recommendation accuracy. Therefore, based on these three features, high-quality item and object recommendations can be performed, improving the accuracy of item recommendations and the accuracy of object recommendations. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a schematic diagram of an application runtime environment provided in one embodiment of this application;
[0035] Figure 2 This is a flowchart of a target model training method provided in one embodiment of this application;
[0036] Figure 3 This is a schematic diagram of sample data provided in one embodiment of this application;
[0037] Figure 4 This is a schematic diagram of the recommended loss of an item provided in one embodiment of this application;
[0038] Figure 5 This is a schematic diagram of object recommendation loss provided in one embodiment of this application;
[0039] Figure 6This is a schematic diagram of the structure of a preset model provided in one embodiment of this application;
[0040] Figure 7 This is a schematic diagram of a recommended method flow provided in one embodiment of this application;
[0041] Figure 8 This is a framework diagram of an embodiment provided in this application;
[0042] Figure 9 This is a schematic diagram of object recommendation in a game scene provided in one embodiment of this application;
[0043] Figure 10 This is a block diagram of a target model training apparatus provided in one embodiment of this application;
[0044] Figure 11 This is a block diagram of a recommended apparatus provided in one embodiment of this application;
[0045] Figure 12 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation
[0046] Before introducing the method embodiments provided in this application, a brief introduction will be given to the relevant terms or nouns that may be involved in the method embodiments of this application, so as to facilitate the understanding of those skilled in the art.
[0047] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0048] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, large-scale model training techniques, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0049] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technology, information technology, integration technology, management platform technology, and application technology applied based on the cloud computing business model. It can form resource pools, be used on demand, and is flexible and convenient. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data of different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0050] Before describing the specific embodiments of this application, the relevant technical background related to the embodiments of this application will be introduced to facilitate understanding by those skilled in the art.
[0051] With the rapid development of the mobile internet, internet applications have brought great convenience to users' lives. Among them, recommendation technology based on artificial intelligence has significantly enriched the functions of internet applications. Based on recommendation technology, internet applications can provide users with advanced services such as related user recommendation services and item recommendation services.
[0052] Taking item recommendation services as an example, related technologies can extract features from multiple items, then calculate the similarity between any two items based on their respective features. If a user likes an item, other items with high similarity are recommended to the user, thus achieving similar item recommendation. However, this technical solution only utilizes the similarity information between items, and its utilization rate of other information that can improve recommendation accuracy is low. In other words, there is a problem of insufficient utilization of recommendation modeling information, which limits the upper limit of the accuracy of this type of technical solution.
[0053] Other technical solutions can leverage social information. For example, if user 1 likes item 1, user 1 and user 2 have a close social relationship, and item 1 and item 2 have a high similarity, then item 2 can be recommended to user 2. This recommendation process utilizes not only the similarity information between items but also the user's social information, improving the utilization rate of recommendation modeling information. These technical solutions offer a certain improvement in recommendation accuracy. However, these solutions also have the following problems:
[0054] First, this technical solution requires knowledge of "user 1 likes item 1", which means it needs to model the user-item relationship. Data representing this type of relationship usually has high sparsity, which makes feature extraction difficult. Furthermore, these features are difficult to realize their potential in recommendation modeling, meaning that feature extraction is difficult and feature utilization is also difficult.
[0055] Secondly, the technical solution is known that User 1 and User 2 have a close social relationship, which means that it is necessary to model the user-user relationship, i.e., to model the social relationship. Social relationships themselves contain a lot of noise. For example, User 1 and User 2 may just be colleagues who interact frequently, but they have no relationship in terms of personal preferences. In this case, if User 2 is identified as a user with a close social relationship with User 1 and item recommendations are made based on this identification, inappropriate recommendation results may be obtained.
[0056] Taking related user recommendation services as an example, related technologies typically recommend users based on their social relationships. If User 1 and User 2 have a close social relationship, and User 2 and User 3 have a close social relationship, User 3 can be recommended to User 1. However, it's possible that User 1 and User 2 only interact frequently for work, while User 2 and User 3 interact frequently for personal reasons due to shared interests. In this case, User 1 and User 3 may not share common interests, and recommending User 3 to User 1 could result in an inappropriate recommendation. This is due to social noise. If the purpose of related user recommendation is interest-based, then the social relationship between User 1 and User 2 becomes social noise, which reduces the accuracy of related user recommendations. In this embodiment of the application, the object is an abstract representation of the user in the computer world; therefore, in this embodiment, related user recommendation is also referred to as object recommendation.
[0057] In summary, social noise leads to low accuracy in both object and item recommendations. Furthermore, item recommendations based on user-item interactions suffer from difficulties in feature extraction and utilization, further reducing accuracy. Therefore, this application proposes a target model training method and a recommendation method. In this method, two types of data are simultaneously input into a preset model: the first type represents the interaction between objects and items, and the second type represents the social relationships between multiple objects. This yields the features of objects and their inter-feature correlations based on the first type of data, and the features of objects and their inter-feature correlations based on the second type of data. A denoising self-supervised loss is determined based on these two types of feature correlations. This denoising self-supervised loss quantifies the consistency between object relationships in the first and second types of data. Adjusting the model parameters based on this denoising self-supervised loss allows the tuned target model to better reflect user interactions. By understanding the commonalities of object interactions across different types of data, the first type of data, representing the interaction between objects and items, is used to remove social noise from the second type of data. Furthermore, the denoised second type of data is used to improve the quality of features extracted from objects and items in the first type of data. This results in the target model extracting three high-quality features: features of objects in the first type of data, features of items in the first type of data, and features of objects in the second type of data. High-quality features play a decisive role in improving recommendation accuracy. Therefore, based on these three features, high-quality item and object recommendations can be performed, improving both item and object recommendation accuracy.
[0058] In summary, the target model training method and recommendation method, by fully learning and fusing knowledge from the first and second types of data, not only reduce social noise but also overcome the difficulty of extracting and utilizing the features of items and objects in the first type of data, thereby improving feature quality and the accuracy of object and item recommendations.
[0059] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be noted that all data used in the embodiments of this application have been thoroughly examined before use. With authorization from the relevant parties.
[0060] Please refer to Figure 1 This diagram illustrates an application runtime environment provided in one embodiment of this application. The application runtime environment may include: terminal 10 and server 20.
[0061] Terminal 10 includes, but is not limited to, electronic devices such as mobile phones, computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, game consoles, e-book readers, multimedia playback devices, and wearable devices. Application clients can be installed on terminal 10.
[0062] In this embodiment, the application described above can be any application capable of providing target model training services and recommendation services based on the target model. Typically, this application is a game application. Of course, in addition to game applications, other types of applications can also provide services that rely on target model training services and provide recommendation services based on the target model. For example, news applications, social applications, interactive entertainment applications, browser applications, shopping applications, content sharing applications, virtual reality (VR) applications, augmented reality (AR) applications, etc., are not limited in this embodiment. Optionally, the terminal 10 runs a client of the above-mentioned application.
[0063] Server 20 provides background services to clients of applications in terminal 10. For example, server 20 can be a background server for the aforementioned applications. Server 20 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, server 20 can simultaneously provide background services to applications in multiple terminals 10.
[0064] Optionally, terminal 10 and server 20 can communicate with each other via network 30. Terminal 10 and server 20 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0065] Please refer to Figure 2 The diagram illustrates a flowchart of a target model training method according to an embodiment of this application. This method can be applied to a computer device, which refers to an electronic device capable of data computation and processing. For example, the entity executing each step may be... Figure 1 The relevant devices in the application's runtime environment, such as server 20 running clients. This method may include the following steps:
[0066] Step S201. Obtain sample data, which includes first relationship data and second relationship data. The first relationship data represents the interaction relationship between the sample object and the sample item, and the second relationship data represents the social relationship of the sample object.
[0067] This application does not limit the sample object; the sample object is the computer representation of the sample user. This application also does not limit the sample item; the sample item can be a computer representation of a virtual item or a physical item. For example, in gaming applications, the sample item can be game props, game characters, game medicines, etc.; in media applications, the sample item can be content carried in the form of short videos, videos, or text and images; in e-commerce applications, the sample item can be a physical or virtual item participating in e-commerce interaction.
[0068] The aforementioned first relationship data characterizes the interaction relationship between sample objects and sample items, which can be represented using an object-item interaction graph. Specifically, this interaction relationship includes at least the first-level interaction relationship between the sample object and the sample item, and the second-level interaction relationship between the sample item and other sample objects. For example, if sample object 1 performs actions on sample item A, including but not limited to buying, selling, forwarding, collecting, liking, and commenting, then sample object 1 and sample item A have an interaction relationship. In the first-level interaction relationship, sample object 1 and sample item A are considered to be related, and the object-item interaction graph represents a connection between the two nodes of sample object 1 and sample item A. If sample object 2 also performs actions on sample item A, including but not limited to buying, selling, forwarding, collecting, liking, and commenting, then sample object 2 and sample item A have an interaction relationship. In the second-level interaction relationship, sample object 2 and sample item A are considered to be related, and the object-item interaction graph represents a connection between the two nodes of sample object 2 and sample item A. Please refer to [reference needed]. Figure 3 The diagram illustrates sample data from an embodiment of this application. Figure 3 (1) Represents an object-item interaction graph, which constructs the interaction relationships between each sample object and each sample item through the aforementioned method. The object-item interaction graph may include interaction relationships of unlimited levels.
[0069] The aforementioned second relationship data represents the social relationships among multiple sample objects, and this second relationship data can be represented using an object social graph. Specifically, this object social graph can include the third-level interaction relationship between any sample object 3 and sample object 4, as well as the fourth-level interaction relationship between sample object 4 and other sample objects. For example, if sample object 3 and sample object 4 are friends, then in the third-level interaction relationship, sample object 3 and sample object 4 are considered to have a relationship, and in the object social graph, this is represented by a connection between the two nodes of sample object 3 and sample object 4. If sample object 5 is also a friend of sample object 4, then in the fourth-level interaction relationship, sample object 5 and sample object 4 are considered to have a relationship, and in the object social graph, this is represented by a connection between the two nodes of sample object 4 and sample object 5. Figure 3 (2) Represents an object social graph, which constructs the social relationships between sample objects through the aforementioned method. This object social graph can be of any level.
[0070] Step S202. Input the above sample data into a preset model for feature extraction to obtain the first features corresponding to each of the above sample objects in the first relation data and the second features corresponding to each of the above sample objects in the second relation data.
[0071] The sample objects in the first relational data and the sample objects in the second relational data can be overlapping objects. For example, sample object 3 can be a node in the object social graph or a node in the object item interaction graph. The aforementioned preset model performs graph feature extraction on the object item interaction graph to obtain the first feature corresponding to the sample object in the object item interaction graph, and can also obtain the item feature corresponding to the sample item in the object item interaction graph. The aforementioned preset model performs graph feature extraction on the object social graph to obtain the second feature corresponding to the sample object in the object social graph. The method of graph feature extraction of the preset model in this application embodiment is not limited. For example, a feature extraction layer can be used, which is a neural network with feature extraction function. Graph feature extraction is a feature extraction method applied to graph type data.
[0072] Step S203. Determine the noise reduction self-supervised loss based on the first correlation and the second correlation. The first correlation refers to the correlation between the first features corresponding to different sample objects, and the second correlation refers to the correlation between the second features corresponding to different sample objects.
[0073] Denoising self-supervised loss is one of the core losses used to train a pre-defined model. This denoising self-supervised loss measures the consistency loss between the results obtained from the correlation calculation of the first relation data and the results obtained from the correlation calculation of the second relation data. This denoising self-supervised loss can help the pre-defined model reduce the influence of useless social relations, reduce the difficulty of extracting and utilizing the first feature and item features, improve the utilization rate of the first feature and item features, and comprehensively improve the quality of the first feature, item features and second features.
[0074] The aforementioned denoising self-supervised loss is positively correlated with the first correlation, and also positively correlated with the second correlation. A high first correlation indicates a high degree of correlation between different sample objects in the object-item interaction graph. A large denoising self-supervised loss can guide the preset model to optimize towards prioritizing item recommendations between sample objects with close relationships. Conversely, a low second correlation indicates that two sample objects in the object social graph do not truly share consistency in item preferences. Their social relationship is meaningless for item recommendations and is considered useless. A low second correlation guides the preset model to optimize towards disregarding such relationships, thus ignoring useless social interactions during item or object recommendations.
[0075] This application does not limit the specific algorithms for the first relevance, the second relevance, and the denoising self-supervised loss, as long as the aforementioned positive correlation is satisfied. The measurement of relevance does not constitute an implementation obstacle and can be determined according to the actual situation. In one embodiment, determining the denoising self-supervised loss based on the first and second relevance includes: determining the denoising self-supervised loss based on the product of the first and second relevance. For two different sample objects i and i', x is used... i,i' This represents the first relevance calculated based on the first features of two different sample objects i and i', using... This represents the second relevance calculated based on the second features of two different sample objects i and i', based on x. i,i' and The product determines the self-supervised noise reduction loss L. 降噪自监督 In one implementation, the xi can be directly ,i' and The product of L is used as the self-supervised loss for noise reduction. 降噪自监督 Alternatively, the noise reduction self-supervised loss L can be obtained by multiplying the product by a preset coefficient. 降噪自监督 This application does not limit the value of the preset coefficient, and it can be adjusted according to the actual situation. Obviously, L 降噪自监督It is a cross-graph loss that measures the consistency loss of corresponding object relationships after graph feature extraction from both the object-item interaction graph and the object-social graph. For invalid social relationships, L... 降噪自监督 The impact of invalid social relationships will be very small, thus guiding the preset model to optimize in the direction of ignoring invalid social relationships. This will reduce the impact of invalid social noise when recommending objects or items.
[0076] Step S204. Adjust the parameters of the preset model based on the model loss to obtain the target model. The model loss includes the noise reduction self-supervised loss.
[0077] In this embodiment, some or all parameters in the preset model can be adjusted through model loss. The model tuning process does not constitute an implementation obstacle and can be determined according to the actual situation. Similarly, the cutoff condition for tuning does not constitute an implementation obstacle and can be determined according to the actual situation; therefore, it will not be elaborated upon. The resulting target model can accurately extract features from each object and each item in the input data representing the interaction relationships between objects and items, and it can also accurately extract features from each object in the input data representing the social relationships between objects. Based on the extracted features corresponding to various objects and items, object and item recommendations can be performed, thereby improving the accuracy of object and item recommendations.
[0078] The model loss includes the aforementioned noise reduction self-supervised loss, and the aforementioned model loss also includes at least one of item recommendation loss and object recommendation loss;
[0079] (1) The above-mentioned item recommendation loss characterizes the loss generated when the above-mentioned preset model recommends sample items for the first sample object based on the above-mentioned first relation data. The above-mentioned first sample object and the recommended sample items belong to the above-mentioned first relation data. In this application, the first sample object can be understood as any sample object belonging to the first relation data.
[0080] Item recommendation loss is a loss calculated from the perspective of the first relational data, without considering the second relational data. It is a recommendation loss in the scenario of item recommendation. In this embodiment, the preset model can use a graph feature neural network as a feature extraction layer to extract the first feature, item features, and second features. In this embodiment, the preset model may also include a recommendation rate fitting layer. In the above steps of inputting the sample data into the preset model for feature extraction, the item features corresponding to each sample item in the object item interaction graph are also obtained. The item recommendation loss is obtained through the following method:
[0081] S1-1. Input the first feature of the first sample object and the item features corresponding to each of the above sample items into the above recommendation rate fitting layer to obtain the recommendation rate corresponding to each of the above sample items;
[0082] S1-2. Determine the item recommendation loss based on the first objective constraint. The first objective constraint is used to increase the difference between the recommendation rate corresponding to the positive sample item and the recommendation rate corresponding to the negative sample item. The positive sample item is a sample item that has a connection relationship with the first sample object in the object item interaction graph. The negative sample item is a sample item that does not have a connection relationship with the first sample object in the object item interaction graph.
[0083] Please refer to Figure 4 The illustration shows a schematic diagram of item recommendation loss in an embodiment of this application. Taking item recommendation as an example, the first sample object is any sample object in the object-item interaction diagram, and the sample items in the object-item interaction diagram that are connected to the first sample object are the positive sample items. j is the sample item identifier, v is the item feature, and sample items that are not connected to the first sample object in the object-item interaction graph are negative sample items. First sample object u i Where u represents the first feature, and i is the sample object identifier, then the positive sample item Relative to the first sample object u i Recommendation rate With negative sample items Relative to the first sample object u i Recommendation rate The difference should be as large as possible.
[0084] (2) The above-mentioned object recommendation loss characterizes the loss generated by the above-mentioned preset model when recommending other sample objects to the second sample object based on the above-mentioned second relation data. The above-mentioned second sample object and the recommended other sample objects belong to the above-mentioned second relation data. In this application, the second sample object can be understood as any sample object belonging to the second relation data.
[0085] Object recommendation loss is a loss calculated from the perspective of second-relation data, without considering first-relation data. It is a recommendation loss used in object recommendation scenarios. The object recommendation loss mentioned above is obtained through the following method:
[0086] S2-1. Input the second feature of the second sample object and the second feature of each of the other sample objects besides the second sample object into the recommendation rate fitting layer to obtain the recommendation rate corresponding to each of the other sample objects.
[0087] S2-2. Determine the object recommendation loss based on the second objective constraint. The second objective constraint is used to increase the difference between the recommendation rate corresponding to the positive sample object and the recommendation rate corresponding to the negative sample object. The positive sample object is a sample object that has a connection relationship with the second sample object in the object social graph. The negative sample object is a sample object that does not have a connection relationship with the second sample object in the object social graph.
[0088] Please refer to Figure 5 The illustration shows a schematic diagram of object recommendation loss in an embodiment of this application. Taking the recommendation of sample objects with a second sample object as an example, the second sample object is any sample object in the object social graph, and the sample objects in the object social graph that are connected to the second sample object are positive sample objects. j is the sample object identifier, s is the second feature, and sample objects that are not connected to this second sample object in the object social graph are negative sample items. Second sample object s i If i is the sample object identifier, then the positive sample object... Relative to the second sample object s i Recommendation rate With negative sample objects Relative to the second sample object s i Recommendation rate The difference should be as large as possible.
[0089] Both item recommendation loss and object recommendation loss can be specifically calculated using Bayesian Personalized Ranking (BPR) loss. The BPR loss function is a loss function used to learn personalized preferences in a recommendation system. In an exemplary implementation, the item recommendation loss... Where ln is the natural logarithm, sigm denotes a normalization operation, and the object recommendation loss is...
[0090] Of course, in one exemplary implementation, the model loss is the sum of the losses for L. 降噪自监督 L 物品推荐 L 账户推荐 The weighted sum of the three factors is, of course, not limited to the weights in this embodiment of the application, and does not constitute an obstacle to implementation. The weights can be determined according to the actual situation.
[0091] In one implementation, a first relevance can be determined based on the inner product of first features between different sample objects, and a second relevance can be determined based on the inner product of inner features between different sample objects. In another implementation, the preset model includes a relevance fitting layer. Before determining the noise reduction self-supervised loss based on the first and second relevances, the method includes: inputting the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object into the relevance fitting layer to obtain the first relevance, wherein the third sample object and the fourth sample object are different objects; inputting the second feature corresponding to the third sample object and the second feature corresponding to the fourth sample object into the relevance fitting layer to obtain the second relevance; adjusting the parameters of the preset model based on the model loss includes: adjusting the parameters of the relevance fitting layer based on the model loss. In the embodiments of this application, the third sample object and the fourth sample object are both sample objects that exist in the first relation data and also exist in the second relation data.
[0092] By fitting the first and second relevance values using a relevance fitting layer, the parameter tuning of this layer can be incorporated into the overall parameter tuning process of the preset model, making the calculated first and second relevance values more accurate and reducing social noise interference. The method for calculating the first and second relevance values using this relevance fitting layer is the same; the calculation of the first relevance value will be used as an example for explanation.
[0093] The aforementioned relevance fitting layer includes a first parameter and a second parameter. The process of inputting the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object into the relevance fitting layer to obtain the first relevance includes the following operations performed by the relevance fitting layer: performing matrix multiplication on the first matrix and the second matrix to obtain a first parameter, wherein the first matrix is a matrix formed by the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object, and the second matrix is a matrix formed by the first parameter; summing the first parameter, the first feature corresponding to the third sample object, and the first feature corresponding to the fourth sample object to obtain a second parameter; performing an activation operation on the second parameter to obtain a third parameter; multiplying the third parameter with the second parameter to obtain a fourth parameter; and normalizing the fourth parameter to obtain the first relevance.
[0094] In a specific example, it can be expressed by the formula sigm(d TThe invention concept of the above process is embodied in *leakyReLu(T*[α,β]+α+β)), where α and β represent the first features corresponding to the third and fourth sample objects, respectively, [α,β] represents the first matrix, and T represents the second matrix formed by the first parameters. The LeakyReLU function is an activation function used in the field of artificial intelligence, designed to improve model performance and solve certain deep learning problems. T The first parameter is sigm, which represents the normalization operation. Both the first and second parameters are iteratively optimized during the training process.
[0095] In one exemplary implementation, please refer to Figure 6 The diagram illustrates the structure of a preset model in this embodiment. The preset model includes a feature extraction layer, a relevance fitting layer, and a recommendation rate fitting layer. The parameters of these three neural network layers can be optimized during model iterative training. The feature extraction layer is used for graph feature extraction, the output of the recommendation rate fitting layer is used to calculate the item recommendation loss and the object recommendation loss, and the output of the relevance fitting layer is used to calculate the denoising self-supervised loss. This embodiment can obtain the model loss by weighted linear superposition of the item recommendation loss, object recommendation loss, and denoising self-supervised loss. This application does not limit the weights of the item recommendation loss, object recommendation loss, and denoising self-supervised loss during linear superposition; they can be set according to actual conditions.
[0096] Based on the obtained model loss, the parameters of the feature extraction layer, relevance fitting layer, and recommendation rate fitting layer can be adjusted according to the model loss feedback. Feedback parameter tuning can be implemented using gradient descent, such as stochastic gradient descent or mini-batch gradient descent. This application does not limit the specific implementation method of feedback parameter tuning and does not constitute an obstacle to implementation. When the model loss is less than a preset loss threshold or the number of parameter tuning attempts reaches a preset threshold, parameter tuning can be stopped, and model training ends. This application does not limit the specific values of the loss threshold and the number of attempts threshold; they can be set according to actual conditions.
[0097] The features corresponding to each object and each item output by the feature extraction layer can be used independently for object recommendation and item recommendation. The recommendation rate output by the recommendation rate fitting layer can also be used for object recommendation and item recommendation. In other words, the target model trained based on this preset model can output various effective information for object recommendation and item recommendation.
[0098] This application employs a noise reduction self-supervised approach during model training to reduce the impact of noise from social relationships unrelated to interests on recommendation results. It not only provides useful social relationships to enhance the modeling of item-user interactions but also achieves personalized graph knowledge transfer through adaptive semantic alignment in the feature space via noise reduction self-supervised loss. This achieves sufficient noise reduction, realizes self-aware social supervision, fully identifies unreliable social relationships, and thus perceives commonalities in user interactions. Furthermore, it uses adaptive user representation alignment to denoise social effects. By doing so, the impact of noisy social noise is mitigated, ensuring that the extracted features and the fitted recommendation rate effectively reflect the consistency of social interests.
[0099] Please refer to Figure 7 It illustrates a schematic flowchart of a recommended method provided in an embodiment of this application. The method includes:
[0100] Step S701. Obtain target data, which includes third relationship data and fourth relationship data. The third relationship data represents the interaction relationship between the target object and the target item, and the fourth relationship data represents the social relationship of the target object.
[0101] The data content and structure of the target data are consistent with the aforementioned sample data, and will not be described again in this embodiment.
[0102] Step S702. Input the above target data into the target model to obtain the feature extraction results;
[0103] The feature extraction result may include the first feature of the object and the item feature of the item extracted based on the third relation data, and may also include the second feature of the object extracted based on the fourth relation data.
[0104] Step S703. The feature extraction results include the first features corresponding to each target object in the third relation data, and item recommendation is performed based on the feature extraction results; or, the feature extraction results include the second features corresponding to each target object in the fourth relation data, and object recommendation is performed based on the feature extraction results; wherein, the target model is trained according to the aforementioned target model training method.
[0105] Both the first and second features eliminate noise from invalid social interactions, resulting in a significant improvement in quality compared to related technologies. Therefore, this application's embodiments can achieve good recommendation accuracy for both object and item recommendations. Obtaining relevant feature representations is the core step in object and item recommendation. The specific recommendation steps after obtaining the feature representations are not subject to implementation obstacles, and this application's embodiments do not limit them.
[0106] In one exemplary embodiment, the target model is used to output a recommendation rate for each second target object relative to the first target object, based on the second features corresponding to each target object in the fourth relation data. The first target object is any target object in the fourth relation data, and the second target objects are other target objects in the fourth relation data besides the first target object. The object recommendation based on the feature extraction results includes recommending second target objects whose recommendation rates meet a preset requirement to the first target object. This application does not limit the preset requirement; for example, the recommendation rates can be sorted in descending order, and the top-ranked objects can be recommended. Alternatively, objects with recommendation rates greater than a preset recommendation rate threshold can be selected for recommendation. The specific value of this recommendation rate threshold is not limited in this embodiment.
[0107] In one exemplary embodiment, the target model is used to output a recommendation rate for each target item relative to the third target object based on the first feature corresponding to each target object in the third relation data and the item feature corresponding to each target item. The third target object is any target object in the third relation data. The item recommendation based on the feature extraction result includes recommending target items with recommendation rates that meet preset requirements to the third target object. This application does not limit the preset requirements. For example, the recommendation rates can be sorted in descending order, and several items at the top of the sort can be recommended. Alternatively, items with recommendation rates greater than a preset recommendation rate threshold can be selected for recommendation. The specific value of the recommendation rate threshold is not limited in this embodiment.
[0108] This application's embodiments can achieve object or item recommendations through interaction between the terminal and the server. Taking a game scenario as an example, please refer to... Figure 8 This diagram illustrates the implementation framework of an embodiment of this application. The terminal can interact with the gateway via the terminal cloud, and the gateway interacts with the server. The server is responsible for forwarding the data transmitted from the gateway using protocols. `gamesvr` represents the lobby server, which provides the game login page and in-game store services, etc. The lobby server is shared if objects from different regions (or even different countries) are matched together. `loadsvr` represents load management, minimizing the load on different regions and servers. `relaysvr` represents the battle server, which is strongly related to the game.
[0109] In the lobby and battle servers, different services can be requested via forwarding proxies as needed. For example, the lobby server can request store recommendation services; the lobby server's start page supports friend and stranger recommendation services; and the battle server supports game environment services. This framework can support out-of-game social services, out-of-game recommendation services, and out-of-game dialogue services.
[0110] Out-of-game social features include scenarios involving recommendations of potential partners, such as the friend list at the start of matchmaking, which offers services like recommending strangers or friends. Out-of-game recommendations also include scenarios involving item recommendations, such as skins, heroes, assets, and items in the shop, or rewards from promotional events. Out-of-game dialogue services support in-game conversations, enhancing the overall gaming experience.
[0111] Please refer to Figure 9 This illustration shows a schematic diagram of object recommendation in a game scenario according to an embodiment of this application. In game applications, different pages can be displayed to users, such as recommendation pages for platform friends, game friends, and nearby people. These recommendation pages can all use the object recommendation method of this application embodiment to recommend objects that fully meet the user's requirements, thereby supporting social activities between multiple objects. These object recommendation methods can also support filtering functions; for example, the target model outputs a batch of objects, which are then filtered according to user-specified filtering conditions and presented to the user.
[0112] The following are embodiments of the apparatus of this application, which can be used to execute embodiments of the method of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method of this application.
[0113] Please refer to Figure 10 This diagram illustrates a block diagram of a target model training apparatus according to an embodiment of this application. The apparatus has the function of implementing the aforementioned target model training method; this function can be implemented in hardware or by hardware executing corresponding software. The apparatus can be a computer device or can be installed within a computer device. The apparatus may include:
[0114] The sample acquisition module 1001 is used to acquire sample data, which includes first relationship data and second relationship data. The first relationship data represents the interaction relationship between the sample object and the sample item, and the second relationship data represents the social relationship of the sample object.
[0115] Training module 1002 is used to perform the following operations:
[0116] The above sample data is input into a preset model for feature extraction to obtain the first feature corresponding to each of the above sample objects in the first relation data and the second feature corresponding to each of the above sample objects in the second relation data.
[0117] Based on the first correlation and the second correlation, the noise reduction self-supervised loss is determined. The first correlation refers to the correlation between the first features corresponding to different sample objects, and the second correlation refers to the correlation between the second features corresponding to different sample objects.
[0118] The parameters of the preset model are adjusted based on the model loss to obtain the target model. The model loss includes the noise reduction self-supervised loss.
[0119] In one implementation, the noise reduction self-supervised loss is positively correlated with the first correlation and the noise reduction self-supervised loss is positively correlated with the second correlation.
[0120] In one implementation, the above-mentioned model loss further includes at least one of item recommendation loss and object recommendation loss;
[0121] The above-mentioned item recommendation loss characterizes the loss generated when the above-mentioned preset model recommends sample items for the first sample object based on the above-mentioned first relation data. The above-mentioned first sample object and the recommended sample items belong to the above-mentioned first relation data.
[0122] The aforementioned object recommendation loss characterizes the loss generated by the aforementioned preset model when recommending other sample objects to the second sample object based on the aforementioned second relation data. The aforementioned second sample object and the recommended other sample objects belong to the aforementioned second relation data.
[0123] In one embodiment, the preset model includes a relevance fitting layer, and the training module 1002 is used to perform the following operations:
[0124] The first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object are input into the above-mentioned correlation fitting layer to obtain the above-mentioned first correlation. The above-mentioned third sample object and the above-mentioned fourth sample object are different objects.
[0125] The second feature corresponding to the third sample object and the second feature corresponding to the fourth sample object are input into the correlation fitting layer to obtain the second correlation.
[0126] The above-mentioned adjustment of the parameters of the preset model based on model loss includes: adjusting the parameters of the correlation fitting layer based on model loss.
[0127] In one embodiment, the relevance fitting layer includes a first parameter and a second parameter. The step of inputting the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object into the relevance fitting layer to obtain the first relevance includes the relevance fitting layer performing the following operation:
[0128] Perform matrix multiplication on the first matrix and the second matrix to obtain the first parameter. The first matrix is formed by the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object. The second matrix is formed by the first parameter.
[0129] The first parameter, the first feature corresponding to the third sample object, and the first feature corresponding to the fourth sample object are summed to obtain the second parameter.
[0130] Activating the second parameter yields the third parameter;
[0131] Multiply the third parameter by the second parameter to obtain the fourth parameter;
[0132] Normalize the fourth parameter to obtain the first correlation.
[0133] In one embodiment, the training module 1002 described above is configured to perform the following operations:
[0134] The noise reduction self-supervised loss is determined based on the product of the first correlation and the second correlation.
[0135] In one implementation, the first relationship data is an object-item interaction graph, and the preset model includes a recommendation rate fitting layer.
[0136] In the above steps of inputting the above sample data into the preset model for feature extraction, the item features corresponding to each sample item in the above object item interaction graph are also obtained.
[0137] The training module 1002 described above is used to perform the following operations:
[0138] The first feature of the first sample object and the item features corresponding to each of the above sample items are input into the above recommendation rate fitting layer to obtain the recommendation rate corresponding to each of the above sample items.
[0139] The recommended loss of the above items is determined based on the first objective constraint, which is used to increase the difference between the recommendation rate corresponding to the positive sample items and the recommendation rate corresponding to the negative sample items. The positive sample items are sample items that have a connection relationship with the first sample object in the above object-item interaction graph, and the negative sample items are sample items that do not have a connection relationship with the first sample object in the above object-item interaction graph.
[0140] In one implementation, the second relationship data is an object social graph, the preset model includes a recommendation rate fitting layer, and the training module 1002 is used to perform the following operations:
[0141] The second feature of the second sample object and the second feature of each of the other sample objects are input into the recommendation rate fitting layer to obtain the recommendation rate corresponding to each of the other sample objects.
[0142] The object recommendation loss is determined based on the second objective constraint, which is used to increase the difference between the recommendation rate corresponding to the positive sample object and the recommendation rate corresponding to the negative sample object. The positive sample object is a sample object that has a connection relationship with the second sample object in the object social graph, and the negative sample object is a sample object that does not have a connection relationship with the second sample object in the object social graph.
[0143] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0144] Please refer to Figure 11 This diagram illustrates a block diagram of a recommended apparatus according to an embodiment of this application. The apparatus has the function of implementing the aforementioned recommended method; this function can be implemented in hardware or by hardware executing corresponding software. The apparatus can be a computer device or can be installed within a computer device. The apparatus may include:
[0145] The data acquisition module 1101 is used to acquire target data, which includes third relationship data and fourth relationship data. The third relationship data represents the interaction relationship between the target object and the target item, and the fourth relationship data represents the social relationship of the target object.
[0146] Recommended module 1102 is used to perform the following operations:
[0147] The target data is input into the target model to obtain the feature extraction results. The feature extraction results include the first features corresponding to each target object in the third relation data and the second features corresponding to each target object in the fourth relation data.
[0148] Based on the above feature extraction results, object or item recommendations are made;
[0149] The target model mentioned above is trained according to the aforementioned target model training method.
[0150] In one exemplary embodiment, the target model is used to output a recommendation rate for each second target object relative to the first target object based on the second features corresponding to each of the target objects in the fourth relation data. The first target object is any target object in the fourth relation data, and the second target object is any other target object in the fourth relation data besides the first target object. The object recommendation based on the feature extraction results includes recommending the second target object whose recommendation rate meets the preset requirements to the first target object.
[0151] In one exemplary embodiment, the target model is used to output the recommendation rate of each target item relative to the third target object based on the first feature corresponding to each target object in the third relation data and the item feature corresponding to each target item. The third target object is any target object in the third relation data. The item recommendation based on the feature extraction result includes recommending target items whose recommendation rate meets the preset requirements to the third target object.
[0152] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0153] Please refer to Figure 12 This diagram illustrates a structural block diagram of a computer device provided in one embodiment of this application, used to execute the aforementioned target model training or recommendation method. The computer device may be a server. Specifically:
[0154] Computer device 1200 includes a central processing unit (CPU) 1201, a system memory 1204 including random access memory (RAM) 1202 and read-only memory (ROM) 1203, and a system bus 1205 connecting the system memory 1204 and the CPU 1201. Computer device 1200 also includes a basic input / output system (I / O system) 1206 to facilitate information transfer between various devices within the computer, and a mass storage device 1207 for storing the operating system 1213, application programs 1214, and other program modules 1215.
[0155] The basic input / output system 1206 includes a display 1208 for displaying information and an input device 1209 for user input, such as a mouse or keyboard. Both the display 1208 and the input device 1209 are connected to the central processing unit 1201 via an input / output controller 1210 connected to the system bus 1205. The basic input / output system 1206 may also include the input / output controller 1210 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1210 also provides output to a display screen, printer, or other types of output devices.
[0156] Mass storage device 1207 is connected to central processing unit 1201 via a mass storage controller (not shown) connected to system bus 1205. Mass storage device 1207 and its associated computer-readable media provide non-volatile storage for computer device 1200. That is, mass storage device 1207 may include computer-readable media (not shown) such as hard disk or CD-ROM (Compact Disc Read-Only Memory) drive.
[0157] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the above-mentioned types. The system memory 1204 and mass storage device 1207 described above can be collectively referred to as memory.
[0158] According to various embodiments of this application, the computer device 1200 can also be connected to a remote computer on a network, such as the Internet. That is, the computer device 1200 can be connected to the network 1212 via the network interface unit 1211 connected to the system bus 1205, or the network interface unit 1211 can be used to connect to other types of networks or remote computer systems (not shown).
[0159] The aforementioned memory also includes a computer program stored in the memory and configured to be executed by one or more processors to implement the aforementioned target model training method or recommended method.
[0160] In an exemplary embodiment, a computer-readable storage medium is also provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, at least one program, code set, or instruction set is executed by a processor to implement the target model training method or recommendation method.
[0161] Specifically, the training method for this target model includes:
[0162] Obtain sample data, which includes first relationship data and second relationship data. The first relationship data represents the interaction relationship between the sample object and the sample item, and the second relationship data represents the social relationship of the sample object.
[0163] The above sample data is input into a preset model for feature extraction to obtain the first feature corresponding to each of the above sample objects in the first relation data and the second feature corresponding to each of the above sample objects in the second relation data.
[0164] Based on the first correlation and the second correlation, the noise reduction self-supervised loss is determined. The first correlation refers to the correlation between the first features corresponding to different sample objects, and the second correlation refers to the correlation between the second features corresponding to different sample objects.
[0165] The parameters of the preset model are adjusted based on the model loss to obtain the target model. The model loss includes the noise reduction self-supervised loss.
[0166] In one implementation, the noise reduction self-supervised loss is positively correlated with the first correlation and the noise reduction self-supervised loss is positively correlated with the second correlation.
[0167] In one implementation, the above-mentioned model loss further includes at least one of item recommendation loss and object recommendation loss;
[0168] The above-mentioned item recommendation loss characterizes the loss generated when the above-mentioned preset model recommends sample items for the first sample object based on the above-mentioned first relation data. The above-mentioned first sample object and the recommended sample items belong to the above-mentioned first relation data.
[0169] The aforementioned object recommendation loss characterizes the loss generated by the aforementioned preset model when recommending other sample objects to the second sample object based on the aforementioned second relation data. The aforementioned second sample object and the recommended other sample objects belong to the aforementioned second relation data.
[0170] In one implementation, the preset model includes a relevance fitting layer, and before determining the denoising self-supervised loss based on the first and second relevance, the method includes:
[0171] The first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object are input into the above-mentioned correlation fitting layer to obtain the above-mentioned first correlation. The above-mentioned third sample object and the above-mentioned fourth sample object are different objects.
[0172] The second feature corresponding to the third sample object and the second feature corresponding to the fourth sample object are input into the correlation fitting layer to obtain the second correlation.
[0173] The above-mentioned adjustment of the parameters of the preset model based on model loss includes: adjusting the parameters of the correlation fitting layer based on model loss.
[0174] In one embodiment, the relevance fitting layer includes a first parameter and a second parameter. The step of inputting the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object into the relevance fitting layer to obtain the first relevance includes the relevance fitting layer performing the following operation:
[0175] Perform matrix multiplication on the first matrix and the second matrix to obtain the first parameter. The first matrix is formed by the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object. The second matrix is formed by the first parameter.
[0176] The first parameter, the first feature corresponding to the third sample object, and the first feature corresponding to the fourth sample object are summed to obtain the second parameter.
[0177] Activating the second parameter yields the third parameter;
[0178] Multiply the third parameter by the second parameter to obtain the fourth parameter;
[0179] Normalize the fourth parameter to obtain the first correlation.
[0180] In one implementation, determining the denoising self-supervised loss based on the first correlation and the second correlation includes:
[0181] The noise reduction self-supervised loss is determined based on the product of the first correlation and the second correlation.
[0182] In one implementation, the first relationship data is an object-item interaction graph, and the preset model includes a recommendation rate fitting layer.
[0183] In the above steps of inputting the above sample data into the preset model for feature extraction, the item features corresponding to each sample item in the above object item interaction graph are also obtained.
[0184] The recommended loss for the above items is obtained through the following method:
[0185] The first feature of the first sample object and the item features corresponding to each of the above sample items are input into the above recommendation rate fitting layer to obtain the recommendation rate corresponding to each of the above sample items.
[0186] The recommended loss of the above items is determined based on the first objective constraint, which is used to increase the difference between the recommendation rate corresponding to the positive sample items and the recommendation rate corresponding to the negative sample items. The positive sample items are sample items that have a connection relationship with the first sample object in the above object-item interaction graph, and the negative sample items are sample items that do not have a connection relationship with the first sample object in the above object-item interaction graph.
[0187] In one implementation, the second relationship data is an object social graph, the preset model includes a recommendation rate fitting layer, and the object recommendation loss is obtained by the following method:
[0188] The second feature of the second sample object and the second feature of each of the other sample objects are input into the recommendation rate fitting layer to obtain the recommendation rate corresponding to each of the other sample objects.
[0189] The object recommendation loss is determined based on the second objective constraint, which is used to increase the difference between the recommendation rate corresponding to the positive sample object and the recommendation rate corresponding to the negative sample object. The positive sample object is a sample object that has a connection relationship with the second sample object in the object social graph, and the negative sample object is a sample object that does not have a connection relationship with the second sample object in the object social graph.
[0190] Specifically, the recommended method includes:
[0191] Acquire target data, which includes third-relationship data and fourth-relationship data. The third-relationship data represents the interaction relationship between the target object and the target item, and the fourth-relationship data represents the social relationship of the target object.
[0192] Input the target data into the target model to obtain the feature extraction results;
[0193] The above feature extraction results include the first features corresponding to each target object in the above third relationship data, and item recommendations are made based on the above feature extraction results;
[0194] or,
[0195] The above feature extraction results include the second features corresponding to each of the above target objects in the above fourth relationship data, and object recommendation is performed based on the above feature extraction results;
[0196] The target model mentioned above is trained according to the aforementioned target model training method.
[0197] In one embodiment, the target model is used to output the recommendation rate of each second target object relative to the first target object based on the second feature corresponding to each target object in the fourth relation data. The first target object is any target object in the fourth relation data, and the second target object is other target objects in the fourth relation data besides the first target object.
[0198] The above-mentioned object recommendation based on the feature extraction results includes: recommending a second target object whose recommendation rate meets the preset requirements to the first target object.
[0199] In one embodiment, the target model is used to output the recommendation rate of each target item relative to the third target object based on the first feature corresponding to each target object in the third relation data and the item feature corresponding to each target item. The third target object is any target object in the third relation data.
[0200] The above-mentioned item recommendation based on the feature extraction results includes: recommending target items with a recommendation rate that meets the preset requirements to the above-mentioned third target object.
[0201] Optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0202] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned target model training method or recommendation method.
[0203] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0204] In addition, in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0205] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims
1. A method for training a target model, characterized in that, The method includes: Obtain sample data, which includes first relationship data and second relationship data. The first relationship data represents the interaction relationship between the sample object and the sample item, and the second relationship data represents the social relationship of the sample object. The sample data is input into a preset model for feature extraction to obtain the first feature corresponding to each sample object in the first relation data and the second feature corresponding to each sample object in the second relation data. Based on the first correlation and the second correlation, the noise reduction self-supervised loss is determined. The first correlation refers to the correlation between the first features corresponding to different sample objects, and the second correlation refers to the correlation between the second features corresponding to different sample objects. The parameters of the preset model are adjusted based on the model loss to obtain the target model, wherein the model loss includes the noise reduction self-supervised loss.
2. The method according to claim 1, characterized in that, The noise reduction self-supervised loss is positively correlated with the first correlation, and the noise reduction self-supervised loss is positively correlated with the second correlation.
3. The method according to claim 1 or 2, characterized in that, The model loss also includes at least one of item recommendation loss and object recommendation loss; The item recommendation loss characterizes the loss generated when the preset model recommends sample items for a first sample object based on the first relation data, where the first sample object and the recommended sample items belong to the first relation data; The object recommendation loss characterizes the loss generated by the preset model when recommending other sample objects for the second sample object based on the second relation data, wherein the second sample object and the other recommended sample objects belong to the second relation data.
4. The method according to claim 2, characterized in that, The preset model includes a correlation fitting layer. Before determining the noise reduction self-supervised loss based on the first correlation and the second correlation, the method includes: The first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object are input into the correlation fitting layer to obtain the first correlation. The third sample object and the fourth sample object are different objects. The second feature corresponding to the third sample object and the second feature corresponding to the fourth sample object are input into the correlation fitting layer to obtain the second correlation. The step of adjusting the parameters of the preset model based on model loss includes: adjusting the parameters of the correlation fitting layer based on model loss.
5. The method according to claim 4, characterized in that, The relevance fitting layer includes a first parameter and a second parameter. The step of inputting the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object into the relevance fitting layer to obtain the first relevance includes the relevance fitting layer performing the following operations: Perform matrix multiplication on the first matrix and the second matrix to obtain a first parameter. The first matrix is a matrix formed by the first feature corresponding to the third sample object and the first feature corresponding to the fourth sample object, and the second matrix is a matrix formed by the first parameter. The first parameter, the first feature corresponding to the third sample object, and the first feature corresponding to the fourth sample object are summed to obtain the second parameter. Activate the second parameter to obtain the third parameter; Multiply the third parameter by the second parameter to obtain the fourth parameter; The fourth parameter is normalized to obtain the first correlation degree.
6. The method according to any one of claims 2, 4, and 5, characterized in that, The determination of the self-supervised denoising loss based on the first and second correlations includes: The noise reduction self-supervised loss is determined based on the product of the first correlation and the second correlation.
7. The method according to claim 3, characterized in that, The first relationship data is an object-item interaction graph, and the preset model includes a recommendation rate fitting layer. In the step of inputting the sample data into the preset model for feature extraction, the item features corresponding to each sample item in the object item interaction graph are also obtained. The recommended loss for the item is obtained through the following method: The first feature of the first sample object and the item features corresponding to each of the sample items are input into the recommendation rate fitting layer to obtain the recommendation rate corresponding to each of the sample items. The item recommendation loss is determined based on a first objective constraint, which is used to increase the difference between the recommendation rate corresponding to positive sample items and the recommendation rate corresponding to negative sample items. The positive sample items are sample items that have a connection relationship with the first sample object in the object item interaction graph, and the negative sample items are sample items that do not have a connection relationship with the first sample object in the object item interaction graph.
8. The method according to claim 3, characterized in that, The second relationship data is an object social graph, and the preset model includes a recommendation rate fitting layer. The object recommendation loss is obtained through the following method: The second feature of the second sample object and the second feature of each of the other sample objects are input into the recommendation rate fitting layer to obtain the recommendation rate corresponding to each of the other sample objects. The object recommendation loss is determined based on a second objective constraint, which is used to increase the difference between the recommendation rate corresponding to positive sample objects and the recommendation rate corresponding to negative sample objects. The positive sample objects are sample objects that have a connection relationship with the second sample objects in the object social graph, and the negative sample objects are sample objects that do not have a connection relationship with the second sample objects in the object social graph.
9. A recommended method, characterized in that, The method includes: Acquire target data, which includes third relationship data and fourth relationship data. The third relationship data represents the interaction relationship between the target object and the target item, and the fourth relationship data represents the social relationship of the target object. The target data is input into the target model to obtain the feature extraction results; The feature extraction result includes the first feature corresponding to each target object in the third relationship data, and item recommendation is made based on the feature extraction result; or, the feature extraction result includes the second feature corresponding to each target object in the fourth relationship data, and object recommendation is made based on the feature extraction result; The target model is trained using the target model training method according to any one of claims 1 to 8.
10. The method according to claim 9, characterized in that, The target model is used to output the recommendation rate of each second target object relative to the first target object based on the second feature corresponding to each target object in the fourth relation data. The first target object is any target object in the fourth relation data, and the second target object is other target objects in the fourth relation data except for the first target object. The object recommendation based on the feature extraction results includes: recommending a second target object whose recommendation rate meets a preset requirement to the first target object.
11. The method according to claim 9, characterized in that, The target model is used to output the recommendation rate of each target item relative to the third target object based on the first feature corresponding to each target object in the third relation data and the item feature corresponding to each target item. The third target object is any target object in the third relation data. The item recommendation based on the feature extraction results includes: recommending target items with a recommendation rate that meets a preset requirement to the third target object.
12. A target model training device, characterized in that, The device includes: The sample acquisition module is used to acquire sample data, which includes first relationship data and second relationship data. The first relationship data represents the interaction relationship between the sample object and the sample item, and the second relationship data represents the social relationship of the sample object. The training module is used to perform the following operations: The sample data is input into a preset model for feature extraction to obtain the first feature corresponding to each sample object in the first relation data and the second feature corresponding to each sample object in the second relation data. Based on the first correlation and the second correlation, the noise reduction self-supervised loss is determined. The first correlation refers to the correlation between the first features corresponding to different sample objects, and the second correlation refers to the correlation between the second features corresponding to different sample objects. The parameters of the preset model are adjusted based on the model loss to obtain the target model, wherein the model loss includes the noise reduction self-supervised loss.
13. A recommendation device, characterized in that, The device includes: The data acquisition module is used to acquire target data, which includes third relationship data and fourth relationship data. The third relationship data represents the interaction relationship between the target object and the target item, and the fourth relationship data represents the social relationship of the target object. The recommendation module is used to perform the following operations: The target data is input into the target model to obtain the feature extraction result. The feature extraction result includes the first feature corresponding to each target object in the third relation data and the second feature corresponding to each target object in the fourth relation data. Based on the feature extraction results, object or item recommendations are made. The target model is trained using the target model training method according to any one of claims 1 to 8.
14. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set, or an instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by the processor to implement the target model training method as described in any one of claims 1 to 8, or the recommended method as described in any one of claims 9 to 11.
15. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the target model training method as described in any one of claims 1 to 8, or the recommended method as described in any one of claims 9 to 11.