Material recommendation method, device and equipment and computer storage medium
By screening and processing user behavior sequences, combining attention modules and deep neural networks, users' long-term historical behavior information is extracted, and the problem that existing systems cannot effectively capture long behavior sequence information is solved, achieving more accurate material recommendations and reducing system burden effect.
Patent Information
- Application Number
- CN202411058926.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-11-15
AI Technical Summary
The existing recommendation system can only process short-term user behavior sequence data and cannot effectively capture useful information in the user's long behavior sequence, resulting in insufficient material recommendation and increasing the delay and storage burden of online service systems.
By screening out the second behavior sequence related to the candidate material from the first behavior sequence, combining the auxiliary information sequence, using attention module and deep neural network, the long-term historical behavior information of the target user is extracted, and the user's click rate of the candidate material is predicted , thereby achieving more accurate material recommendations.
Effectively capture information in the long user behavior sequence, reduce the length of the user behavior sequence, simplify the calculation of the recommendation model, realize more accurate material recommendation, and reduce system delay and storage burden.
Smart Images

Figure CN118972437A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a material recommendation method, device, equipment and computer storage medium. Background Art
[0002] Long-term historical behavior sequences in user interest models can significantly improve the performance of click-through-rate (CTR) models. Although longer user behavior sequences bring more useful information for user interest modeling, they greatly increase the latency and storage burden of online serving systems, and contain a lot of noise for point-by-point CTR prediction.
[0003] In existing recommendation systems, behavior sequence models can only process short-term behavior sequence data. The length of short-term behavior sequence data (i.e., the number of user behaviors in the sequence) is usually less than 150, making it impossible to capture useful information in the user's long behavior sequence, resulting in the inability to achieve more accurate material recommendations. Summary of the invention
[0004] The present application provides a material recommendation method, device, equipment and computer storage medium to achieve more accurate material recommendation.
[0005] The technical solution of this application is implemented as follows:
[0006] The present application provides a material recommendation method, which includes: based on candidate materials to be recommended, screening out a second behavior sequence related to the candidate materials from a first behavior sequence; the first behavior sequence is used to characterize multiple historical materials clicked by a target user, and the second behavior sequence is used to characterize target historical materials related to the candidate materials among the multiple historical materials; determining an auxiliary information sequence associated with the second behavior sequence; the auxiliary information sequence is used to characterize the time information of the target user clicking on each target historical material; through an attention module in a recommendation model, obtaining a weight of each target historical material based on the second behavior sequence, the auxiliary information sequence and the candidate materials, and aggregating all target historical materials based on the weight to obtain sequence aggregation features; through a deep neural network in the recommendation model, predicting the click rate of the target user on the candidate materials based on the sequence aggregation features, the candidate materials, and the material features of each target historical material; and recommending materials to the target user based on the click rate.
[0007] In some possible implementations, based on the candidate material to be recommended, a second behavior sequence related to the candidate material is screened out from the first behavior sequence, including: screening historical materials of the same material category as the candidate material from multiple historical materials as target historical materials; and generating the second behavior sequence based on the material identification of the target historical material.
[0008] In some possible implementations, based on the candidate materials to be recommended, a second behavior sequence related to the candidate materials is screened out from the first behavior sequence, including: encoding the material identifications of multiple historical materials to obtain a first embedded vector matrix corresponding to the first behavior sequence; multiple elements in the first embedded vector matrix correspond one-to-one to the material identifications of multiple historical materials; encoding the material identifications of the candidate materials to obtain a second embedded vector corresponding to the candidate materials; performing similarity calculations on each element in the first embedded vector matrix and the second embedded vector respectively to obtain a first element; the first element is an element in the first embedded vector matrix whose similarity with the second embedded vector is greater than a preset threshold; taking the historical material corresponding to the first element as the target historical material, combining the material identifications of the target historical materials, and generating a second behavior sequence.
[0009] In some possible implementations, through the attention module in the recommendation model, the weight of each target historical material is obtained based on the second behavior sequence, the auxiliary information sequence and the candidate materials, and all the target historical materials are aggregated based on the weight to obtain a sequence aggregation feature, including: encoding the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; encoding the material identification of each target historical material to obtain a third embedding vector matrix corresponding to the second behavior sequence; encoding the time information of each target historical material to obtain a fourth embedding vector matrix; multiple elements in the fourth embedding vector matrix correspond one-to-one to multiple elements in the third embedding vector matrix; through the attention module, the weight of each target historical material is determined based on the second embedding vector, the third embedding vector matrix and the fourth embedding vector matrix; based on the weight of each target historical material, weighted summation is performed on the elements corresponding to each target historical material in the third embedding vector matrix to obtain a sequence aggregation feature.
[0010] In some possible implementations, the weight of each target historical material is determined through an attention module based on the second embedding vector, the third embedding vector matrix and the fourth embedding vector matrix, including: performing a Hadamard product operation on each element in the third embedding vector matrix and the second embedding vector to obtain a fusion matrix; the fusion matrix is used to represent the correlation between each target historical material and the candidate material; and through the attention module, performing function mapping on the fusion matrix and the fourth embedding vector matrix to obtain the weight of each target historical material.
[0011] In some possible implementations, a Hadamard product operation is performed on each element in the third embedded vector matrix and the second embedded vector to obtain a fusion matrix, including: performing a Hadamard product operation on each element in the third embedded vector matrix and the second embedded vector respectively to obtain multiple second elements; the multiple second elements correspond one-to-one to the multiple elements in the third embedded vector matrix; each second element is used to characterize the correlation between the corresponding target historical material and the candidate material; and combining the multiple second elements to obtain a fusion matrix.
[0012] In some possible implementations, a function mapping is performed on the fusion matrix and the fourth embedded vector matrix through an attention module to obtain a sequence aggregation feature, including: through the attention module, function mapping is performed on each second element and the element in the fourth embedded vector matrix corresponding to each second element to obtain multiple first output features; the multiple first output features correspond one-to-one to the multiple second elements; Hadamard product operations are performed on each first output feature and the second element corresponding to each first output feature to obtain multiple subsequence aggregation features; and the multiple subsequence aggregation features are summed to obtain a sequence aggregation feature.
[0013] In some possible implementations, a deep neural network in a recommendation model is used to predict the click rate of a target user on a candidate material based on sequence aggregation features and the candidate material, including: encoding the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; performing a Hadamard product operation on the second embedding vector and the sequence aggregation features to obtain a correlation feature; the correlation feature is used to characterize the correlation between the candidate material and all target historical materials; and inputting the correlation feature, the sequence aggregation feature, the second embedding vector, and the material feature of each target historical material into the deep neural network to obtain a predicted value of the click rate of the target user on the candidate material.
[0014] The present application provides a material recommendation device, which includes: a first data processing module, which is used to screen out a second behavior sequence related to the candidate material from the first behavior sequence based on the candidate material to be recommended; the first behavior sequence is used to characterize multiple historical materials clicked by the target user, and the second behavior sequence is used to characterize the target historical material related to the candidate material among the multiple historical materials; a second data processing module is used to determine an auxiliary information sequence associated with the second behavior sequence; the auxiliary information sequence is used to characterize the time information of the target user clicking on each target historical material; a data calculation module is used to obtain the weight of each target historical material based on the second behavior sequence, the auxiliary information sequence and the candidate material through the attention module in the recommendation model, and aggregate all the target historical materials based on the weight to obtain sequence aggregation features; a prediction module, which predicts the click rate of the target user on the candidate material based on the sequence aggregation features, the candidate material, and the material features of each target historical material through the deep neural network in the recommendation model; and a recommendation module, which recommends materials to the target user based on the click rate.
[0015] In some possible implementations, the first data processing module is used to select historical materials of the same material category as the candidate material from multiple historical materials as target historical materials; and generate a second behavior sequence based on the material identifier of the target historical material.
[0016] In some possible implementations, a first data processing module is used to encode the material identifications of multiple historical materials to obtain a first embedded vector matrix corresponding to a first behavior sequence; multiple elements in the first embedded vector matrix correspond one-to-one to the material identifications of multiple historical materials; the material identifications of candidate materials are encoded to obtain a second embedded vector corresponding to the candidate materials; similarity is calculated for each element in the first embedded vector matrix and the second embedded vector respectively to obtain a first element; the first element is an element in the first embedded vector matrix whose similarity with the second embedded vector is greater than a preset threshold; the historical material corresponding to the first element is taken as the target historical material, the material identification of the target historical material is combined, and a second behavior sequence is generated.
[0017] In some possible implementations, a data calculation module is used to encode the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; encode the material identification of each target historical material to obtain a third embedding vector matrix corresponding to the second behavior sequence; encode the time information of each target historical material to obtain a fourth embedding vector matrix; multiple elements in the fourth embedding vector matrix correspond one-to-one to multiple elements in the third embedding vector matrix; through the attention module, the weight of each target historical material is determined based on the second embedding vector, the third embedding vector matrix and the fourth embedding vector matrix; based on the weight of each target historical material, the elements corresponding to each target historical material in the third embedding vector matrix are weighted summed to obtain sequence aggregation features.
[0018] In some possible implementations, the data calculation module is used to perform a Hadamard product operation on each element in the third embedding vector matrix and the second embedding vector to obtain a fusion matrix; the fusion matrix is used to represent the correlation between each target historical material and the candidate material; through the attention module, the fusion matrix and the fourth embedding vector matrix are functionally mapped to obtain the weight of each target historical material.
[0019] In some possible implementations, the data calculation module is used to perform Hadamard product operations on each element in the third embedded vector matrix and the second embedded vector respectively to obtain multiple second elements; the multiple second elements correspond one-to-one to the multiple elements in the third embedded vector matrix; each second element is used to characterize the correlation between the corresponding target historical material and the candidate material; and the multiple second elements are combined to obtain a fusion matrix.
[0020] In some possible implementations, the data calculation module is used to perform function mapping on each second element and the elements in the fourth embedded vector matrix corresponding to each second element through the attention module to obtain multiple first output features; the multiple first output features correspond one-to-one to the multiple second elements; perform Hadamard product operations on each first output feature and the second element corresponding to each first output feature to obtain multiple subsequence aggregation features; and sum the multiple subsequence aggregation features to obtain a sequence aggregation feature.
[0021] In some possible implementations, the prediction module is used to encode the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; perform a Hadamard product operation on the second embedding vector and the sequence aggregation feature to obtain a correlation feature; the correlation feature is used to characterize the correlation between the candidate material and all target historical materials; the correlation feature, the sequence aggregation feature, the second embedding vector and the material feature of each target historical material are input into a deep neural network to obtain a predicted value of the click rate of the target user for the candidate material.
[0022] The present application provides an electronic device, comprising: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the method provided by the present application.
[0023] The present application provides a computer storage medium storing executable instructions for implementing the method provided by the present application when the executable instructions are executed by a processor.
[0024] The present application provides a computer program product, including a computer program or instructions, for implementing the method provided by the present application when the computer program or instructions are executed by a processor.
[0025] This application has the following beneficial effects:
[0026] In the present application, the second behavior sequence is determined through the first behavior sequence and the candidate material, wherein the first behavior sequence is used to characterize multiple historical materials clicked by the target user, and the second behavior sequence is used to characterize the target historical materials related to the candidate material in the multiple historical materials, that is, the second behavior sequence is a part of the first behavior sequence, and the length of the second behavior sequence is smaller than the first behavior sequence. In this way, the length of the user behavior sequence can be reduced while the useful information in the user's long behavior sequence is effectively captured; based on this, the second behavior sequence and the auxiliary information sequence associated with the candidate material and the target historical material are used as the input data of the recommendation model, which can more simply and effectively extract the information of the target user's long-term historical behavior sequence in the recommendation model, thereby achieving more accurate material recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the architecture of the recommendation system provided in the embodiment of the present application;
[0028] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0029] Figure 3 This is an optional flow chart of the material recommendation method provided in the embodiment of the present application;
[0030] Figure 4 It is an optional structural diagram of a recommendation model provided in an embodiment of the present application;
[0031] Figure 5 It is an optional flow chart of the material recommendation method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0033] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0034] If similar descriptions of "first / second" appear in the application documents, the following explanation is added. In the following description, the terms "first / second / third" involved are merely to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first / second / third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0036] User behavior sequences are highly personalized for each user, and they contain information about user interests in different scenarios. Introducing continuous user behaviors into click-through-rate (CTR) models is a milestone. For example, YoutubeDNN uses video sequences watched by users and search tags to capture user interests. In order to better extract user interests from user behavior sequences, various models have been proposed, including convolutional neural networks (CNN), recurrent neural networks (RNN), deep neural network models based on self-attention mechanisms (transformers), and capsule networks. The deep interest network (DIN) proposed an attention-based method called target attention to capture the different local interests of specific users facing different target items. The deep interest evolution network (DIEN) pointed out that better modeling the temporal relationship between user historical behaviors is important for modeling user interest changes, so a gated recurrent unit (GRU) is used in DIEN to model user history lines. At the same time, an interest extraction layer with auxiliary loss is designed to assist the parameter training inside the GRU. However, using a single vector to represent a user is not enough to capture the different nature of user interests. Therefore, capsule networks and dynamic routing methods are introduced in multi-interest network with dynamic routing (MIND) to learn multiple vector representations of user interests. In addition, inspired by the success of self-attention architecture in sequence-to-sequence learning tasks, deep session interest network (DSIN) uses long short-term memory (LSTM) and transformer to model users' cross-session and intra-session interests, respectively.
[0037] Long-term historical behavior sequences in user interest models can significantly improve the performance of CTR models. Although longer user behavior sequences bring more useful information to user interest modeling, it greatly increases the latency and storage burden of online service systems, and contains a lot of noise for point-by-point click-through rate prediction. A series of works are devoted to addressing the challenges in long-term user interest modeling, which usually learns user interest representations based on extremely long or even lifetime historical behavior sequences. The multi-channel user interest memory network (MIMN) proposes a memory-based architecture that embeds user long-term interests into a fixed-size memory network to solve the problem of massive storage of user behavior data. The user interest center (UIC) module is designed to incrementally record new user behaviors to cope with latency constraints. However, MIMN does not use the information of target items in training samples, which is also important for user interest modeling.
[0038] CTR prediction modeling based on user behavior data has been proven to be effective. However, in real systems, these behavior sequence models can only process short-term behavior sequence data, whose length is usually less than 150, making it impossible to capture useful information in users' long behavior sequences, resulting in the inability to achieve more accurate material recommendations.
[0039] In response to the above problems, an embodiment of the present application provides a material recommendation method to achieve more accurate material recommendation.
[0040] The following describes an exemplary application of the electronic device provided by the embodiment of the present application. The electronic device provided by the embodiment of the present application can be implemented as various types of user terminals such as a laptop computer, a tablet computer, a desktop computer, a mobile device (for example, a mobile phone, a wearable smart watch, a dedicated messaging device), and can also be implemented as a server. The following describes an exemplary application when the electronic device is implemented as a server.
[0041] See also Figure 1 , Figure 1 It is a schematic diagram of the architecture of the recommendation system provided in an embodiment of the present application. Electronic devices (electronic device 40-1 and electronic device 40-2 are shown as examples) are connected to server 200 via network 300. Network 300 can be a wide area network or a local area network, or a combination of the two.
[0042] In some possible implementations, user A may publish material information A through terminal 40-1, and user B may publish material information B through terminal 40-2. Material information A and material information B are uploaded to server 200 through network 300. Server 200 may store material information A and material information B in database 500. In order to accurately push materials according to the interests of users, server 200 may push materials that have the highest degree of matching with the interests of users to users after sorting, and the materials pushed to users may be displayed on the graphical interface of electronic device 400 (graphical interface 41-1 and graphical interface 41-2 are shown as examples).
[0043] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms. The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present invention.
[0044] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 2 The electronic device 400 shown may be the above-mentioned terminal and / or server 200. The electronic device 400 includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the electronic device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .
[0045] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0046] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0047] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0048] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0049] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0050] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0051] A network communication module 452, for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, wireless compatibility certification (WiFi), and universal serial bus (USB), etc.;
[0052] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0053] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0054] In some embodiments, the material recommendation device provided in the embodiments of the present application can be implemented in a software manner. Figure 2 A material recommendation device 455 stored in a memory 450 is shown, which may be software in the form of a program or plug-in, etc. The material recommendation device 455 includes the following software modules: a first data processing module 4551, a second data processing module 4552, a data calculation module 4553, a prediction module 4554 and a recommendation module 4555.
[0055] These modules are logical, so they can be arbitrarily combined or further divided according to the functions to be implemented. The functions of each module will be explained below.
[0056] In other embodiments, the material recommendation device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the material recommendation method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (application specific integrated circuit, ASIC,), DSP, programmable logic device (programmable logic device, PLD,), complex programmable logic device (complex programmable logic device, CPLD), field programmable gate array (field-programmable gate array, FPGA) or other electronic components.
[0057] The material recommendation method provided in the embodiment of the present application will be described below in conjunction with the exemplary application and implementation of the electronic device provided in the embodiment of the present application.
[0058] See also Figure 3 , Figure 3 This is an optional flow chart of the material recommendation method provided in the embodiment of the present application. Figure 3 The steps shown illustrate the material recommendation method.
[0059] S301, based on the candidate material to be recommended, filter out a second behavior sequence related to the candidate material from the first behavior sequence.
[0060] The first behavior sequence is used to represent multiple historical materials clicked by the target user, and the second behavior sequence is used to represent the target historical material related to the candidate material among the multiple historical materials.
[0061] It can be understood that candidate materials are materials newly released by other users. The recommendation system can obtain candidate materials from the material database, and the materials in the material database are updated in real time. The first behavior sequence is a sequence of click behaviors of the user on multiple historical materials before the new target material is recommended. The first behavior sequence may include the material identification of the historical materials clicked by the user. The recommendation system can obtain the above first behavior sequence from the user's behavior log. After obtaining the first behavior sequence and candidate materials, the recommendation system can further filter and screen out the second behavior sequence. The second behavior sequence can be understood as a part of the first behavior sequence, and the target historical materials in the second behavior sequence are correlated with the candidate materials.
[0062] In an embodiment of the present application, in order to ensure that the data of the first behavior sequence has longer traceability and contains more useful information, a first behavior sequence of longer length can be collected. For example, the length of the first behavior sequence can be set to 300. The length of the first historical behavior sequence can be set according to actual needs, and the embodiment of the present application does not make specific limitations on this. The length of the second behavior sequence is less than the length of the first historical behavior sequence. For example, the length of the first behavior sequence can be set to 300, and the length of the second behavior sequence can be set to 50. The length of the second historical behavior sequence can be set according to actual needs, and the embodiment of the present application does not make specific limitations on this.
[0063] It can be understood that the length of a behavior sequence refers to the number of elements in the sequence. For example, the length of the first behavior sequence is 300, indicating that the first behavior sequence includes 300 elements, each of which is used to represent the material identifier of a historical material clicked by the user.
[0064] In the embodiment of the present application, the length of the first behavior sequence is relatively long and there is a lot of noise, which makes it impossible to model the user's interests and make it impossible to accurately predict the user's interest in the candidate materials. Therefore, by filtering out a part of the elements in the first behavior sequence that have no correlation or weak correlation with the candidate materials, a second behavior sequence with a shorter length is obtained, which can meet the limitations of computing time and computing resources.
[0065] S302: Determine an auxiliary information sequence associated with the second behavior sequence.
[0066] Among them, the auxiliary information sequence is used to represent the time information when the target user clicks on each target historical material.
[0067] It can be understood that the second behavior sequence is a sequence composed of material identifiers of multiple target historical materials that are relevant to the candidate material, and the time information when the user clicks the above target historical material can constitute an auxiliary information sequence.
[0068] In some embodiments, the auxiliary information sequence associated with the second behavior sequence, in addition to representing the time information of the user clicking on multiple target historical materials, can also represent other user behaviors (for example, likes, comments, and viewing time, etc.) performed by the user after clicking on the above-mentioned multiple target historical materials, as well as the weights of the above-mentioned other user behaviors.
[0069] It can be understood that the weights of other user behaviors performed by the user can represent the user's interest in the target historical material. For example, if user A watches historical material A for 3 seconds and user A watches historical material B for 8 seconds, then user A's interest in historical material B is higher than user A's interest in historical material A, that is, the weight of user A's viewing behavior for historical material A is lower than the weight of user A's viewing behavior for historical material B.
[0070] In other embodiments, the auxiliary information sequence associated with the second behavior sequence may not only represent the time information when the user clicks on multiple target historical materials, but also represent the scenarios when the user clicks on the multiple target historical materials (for example, focus flow scenarios, popular flow scenarios, and recommended scenarios).
[0071] It can be understood that the sources of the target historical materials clicked by the user may include three types, corresponding to three different scenarios: the first scenario is that the blogger followed by the user releases new materials, and the user accepts and clicks on the newly released materials; the second scenario is that the user sends a request to obtain popular materials, and the recommendation system sends the popular materials to the user based on the request to obtain popular materials, and the user accepts and clicks on the popular materials; the third scenario is that the user sends a request to obtain recommended materials, and the recommendation system recommends the target materials to the user based on the request to obtain recommended materials, and the user receives and clicks on the target materials.
[0072] In some further embodiments, the auxiliary information sequence associated with the second behavior sequence may simultaneously represent the time information of the user clicking on multiple target historical materials, other user behaviors performed after the user clicks on the multiple target historical materials and the weights of multiple other user behaviors, and the scenarios when the user clicks on the multiple target historical materials.
[0073] S303, through the attention module in the recommendation model, the weight of each target historical material is obtained based on the second behavior sequence, the auxiliary information sequence and the candidate materials, and all target historical materials are aggregated based on the weight to obtain a sequence aggregation feature.
[0074] It is understandable that in the process of recommending materials to users, the recommendation system can predict the probability of users clicking on candidate materials through the recommendation model, and the recommendation system includes the above-mentioned recommendation model. The recommendation model includes multiple modules, among which the attention module in the recommendation model can determine the sequence aggregation feature based on the second behavior sequence, the auxiliary information sequence and the candidate materials. The attention module aggregates the second behavior sequence, the auxiliary information sequence and the candidate materials into one feature to simplify the data, so that other network layers (or modules) in the recommendation model can further process the data output by the attention module to save computing power.
[0075] S304, predicting the click rate of the target user on the candidate material based on the sequence aggregation features, the candidate material, and the material features of each target historical material through the deep neural network in the recommendation model.
[0076] It can be understood that the sequence aggregation features, candidate materials, and material features of each target historical material in the second behavior sequence can be used as input data of the deep neural network, and the deep neural network outputs the predicted value of the probability of the target user clicking the candidate material.
[0077] S305, recommending materials to target users based on the click-through rate.
[0078] It can be understood that the recommendation system can obtain multiple candidate materials, and then use the recommendation model to predict the target user's click rate for each candidate material. According to the prediction results (i.e., the predicted value of the click rate corresponding to each candidate material), the target material that meets the preset click rate threshold is screened out from the multiple candidate materials, and the target material is recommended to the target user.
[0079] In some possible implementations, the above S301 may include: selecting a historical material of the same material category as the candidate material from a plurality of historical materials as the target historical material; and generating a second behavior sequence based on the material identifier of the target historical material.
[0080] It is understandable that one way to determine whether the multiple historical materials in the first behavior sequence are relevant to the candidate materials is to determine whether the multiple historical materials are in the same material category as the candidate materials. Specifically, after the recommendation system obtains the first behavior sequence and the candidate materials, it can determine whether the material category of the multiple historical materials in the first behavior sequence is the same as the material category of the candidate materials. If they are the same, the historical materials of the same category as the candidate materials are used as the target historical materials, and the material identifiers of the target historical materials constitute the second behavior sequence.
[0081] In one example, assuming that the material category of the candidate material is "Variety Show", multiple historical materials in the first row sequence are filtered according to the material category of "Variety Show", and historical materials that also belong to the "Variety Show" category are taken as target historical materials.
[0082] In some possible implementations, the above S301 may include: encoding the material identifications of multiple historical materials to obtain a first embedded vector matrix corresponding to a first behavior sequence; multiple elements in the first embedded vector matrix correspond one-to-one to the material identifications of multiple historical materials; encoding the material identifications of candidate materials to obtain a second embedded vector corresponding to the candidate materials; performing similarity calculations on each element in the first embedded vector matrix and the second embedded vector respectively to obtain a first element; the first element is an element in the first embedded vector matrix whose similarity with the second embedded vector is greater than a preset threshold; taking the historical material corresponding to the first element as the target historical material, combining the material identifications of the target historical materials, and generating a second behavior sequence.
[0083] It can be understood that another way to determine whether the multiple historical materials in the first behavior sequence are relevant to the candidate materials is to determine whether the multiple historical materials are similar to the candidate materials. The method for determining similar material categories is as follows: the material identification of each of the multiple historical materials in the first historical behavior sequence is encoded to obtain a first embedded vector matrix, and the elements in the first embedded vector matrix correspond to the elements in the first behavior sequence one by one; and the material identification of the candidate material is encoded in the same way to obtain a second embedded vector. Each element in the first embedded vector matrix and the second embedded vector are substituted into the preset similarity calculation formula to calculate the similarity between each element in the first embedded vector matrix and the second embedded vector. According to the similarity result, the elements that meet the preset threshold are screened out, and the elements that meet the preset threshold are used as the first element. The material identification of the historical material (i.e., the target historical material) corresponding to the first element constitutes the above-mentioned second behavior sequence. Among them, the number of first elements is the same as the length of the preset second behavior sequence.
[0084] In one example, the recommendation system can encode the material identification of each historical material and the material identification of the candidate material in the first behavior sequence by word2vec (word to vector) or contrastive learning. Specifically, the first behavior sequence is used as a training sample, and the first embedding vector matrix is obtained by modeling the co-occurrence of historical materials in the user's first behavior. Among them, word2vec and contrastive learning both use self-supervised learning to vectorize the data (i.e., the above encoding process).
[0085] In some embodiments, in addition to comparing the similarity between the elements in the first embedding vector matrix and the second embedding vector, it is also possible to determine which historical materials in the first behavior sequence are of similar categories to the candidate materials through manual experience.
[0086] In the embodiment of the present application, the second behavior sequence can be determined by any of the above methods, namely: (1) same category screening; (2) vector-based similar category screening; (3) human experience-based similar category screening.
[0087] In some possible implementations, the above S303 may include: encoding the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; encoding the material identification of each target historical material to obtain a third embedding vector matrix corresponding to the second behavior sequence; encoding the time information of each target historical material to obtain a fourth embedding vector matrix; multiple elements in the fourth embedding vector matrix correspond one-to-one to multiple elements in the third embedding vector matrix; determining the weight of each target historical material based on the second embedding vector, the third embedding vector matrix and the fourth embedding vector matrix through the attention module; and performing weighted summation processing on the elements corresponding to each target historical material in the third embedding vector matrix based on the weight of each target historical material to obtain a sequence aggregation feature.
[0088] It can be understood that the recommendation system can encode the material identification of the candidate material, the material identification of each target historical material in the second line sequence, and the time information of each historical material in the auxiliary information sequence, respectively, to obtain the second embedding vector corresponding to the candidate material, the third embedding vector matrix corresponding to the second line sequence, and the fourth embedding vector matrix corresponding to the auxiliary information sequence. Among them, since the multiple elements in the auxiliary information sequence correspond one-to-one to the multiple elements in the second line sequence, the multiple elements in the fourth embedding vector matrix obtained after the encoding process also correspond one-to-one to the multiple elements in the third embedding vector matrix.
[0089] In one example, the third embedding vector matrix can be expressed as E*=[e1, e2, ..., e k ], where k is the number of elements in the third embedding vector matrix, and the fourth embedding vector matrix can be expressed as Es = [es1, es2, ..., es k ], the second embedding vector can be expressed as e T .
[0090] In some possible implementations, the above-mentioned determination of the weight of each target historical material based on the second embedding vector, the third embedding vector matrix and the fourth embedding vector matrix through the attention module may include: performing a Hadamard product operation on each element in the third embedding vector matrix and the second embedding vector to obtain a fusion matrix; the fusion matrix is used to represent the correlation between each target historical material and the candidate material; and performing function mapping on the fusion matrix and the fourth embedding vector matrix through the attention module to obtain the weight of each target historical material.
[0091] It can be understood that after performing the Hadamard product operation on the third embedding vector matrix and the second embedding vector, a fusion matrix is obtained, and multiple elements in the fusion matrix correspond one-to-one to multiple elements in the third embedding vector matrix. Since multiple elements in the third embedding vector matrix correspond one-to-one to multiple elements in the fourth embedding vector matrix, multiple elements in the fusion matrix correspond one-to-one to multiple elements in the fourth embedding vector matrix. The fusion matrix and the fourth embedding vector matrix are input into the attention module, and the attention module performs function mapping on the fusion matrix and the fourth embedding vector matrix based on the attention mechanism to obtain the weight of each target historical material.
[0092] In some possible implementations, the above-mentioned performing a Hadamard product operation on each element in the third embedded vector matrix and the second embedded vector to obtain a fusion matrix may include: performing a Hadamard product operation on each element in the third embedded vector matrix and the second embedded vector respectively to obtain multiple second elements; the multiple second elements correspond one-to-one to the multiple elements in the third embedded vector matrix; each second element is used to characterize the correlation between the corresponding target historical material and the candidate material; and combining the multiple second elements to obtain a fusion matrix.
[0093] It can be understood that in the process of performing Hadamard product operation on the third embedded vector matrix and the second embedded vector, the specific steps are: performing Hadamard product operation on each element in the third embedded vector matrix with the second embedded vector respectively, obtaining multiple operation results (i.e., the second elements mentioned above), the number of second elements is the same as the number of elements in the third embedded vector matrix, and writing multiple second elements into corresponding positions in the matrix to obtain a fused matrix.
[0094] In one example, the expression for performing a Hadamard product operation on the elements in the third embedding vector matrix and the second embedding vector is:
[0095]
[0096] In formula (1), i is an integer greater than or equal to 1 and less than or equal to k, k is the number of elements in the third embedding vector matrix, and e T is the second embedding vector, e iis the i-th element in the third embedding vector matrix.
[0097] In some possible implementations, the above-mentioned function mapping of the fusion matrix and the fourth embedded vector matrix through the attention module to obtain the sequence aggregation feature may include: through the attention module, function mapping each second element and the element in the fourth embedded vector matrix corresponding to each second element, respectively, to obtain multiple first output features; the multiple first output features correspond one-to-one to the multiple second elements; Hadamard product operations are performed on each first output feature and the second element corresponding to each first output feature, respectively, to obtain multiple subsequence aggregation features; and multiple subsequence aggregation features are summed to obtain a sequence aggregation feature.
[0098] It can be understood that multiple elements (i.e., second elements) in the fusion matrix correspond one-to-one to multiple elements in the fourth embedding vector matrix. After the recommendation system inputs the fusion matrix and the fourth embedding vector matrix into the attention module, assuming that there are k second elements in the fusion matrix, the attention module can combine each second element in the fusion matrix with the corresponding element in the fourth embedding vector matrix to obtain k groups of element combinations; the attention module processes the k groups of element combinations k times (i.e., function mapping) to obtain k first output features; each first output feature is respectively subjected to Hadamard product operation with the corresponding second element to obtain k subsequence aggregation features; the k subsequence aggregation features are summed to finally obtain a sequence aggregation feature.
[0099] In one example, assuming that there are k second elements in the third embedding vector matrix, the expression for determining the sequence aggregation feature is as follows:
[0100]
[0101] In formula (2), u is the sequence aggregation feature, a i is the i-th first output feature of the attention module, e i is the i-th element in the third embedding vector matrix.
[0102] It can be understood that in formula (2), through the calculation of the attention module, the output of the attention module is i Used to represent the weight of the i-th target historical material in the second line sequence.
[0103] In some possible implementations, the above S304 may include: encoding the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; performing a Hadamard product operation on the second embedding vector and the sequence aggregation feature to obtain a correlation feature; the correlation feature is used to characterize the correlation between the candidate material and all target historical materials; and inputting the correlation feature, the sequence aggregation feature, the second embedding vector and the material feature of each target historical material into a deep neural network to obtain a predicted value of the click rate of the target user for the candidate material.
[0104] It can be understood that after obtaining the second embedding vector and the sequence aggregation feature, the recommendation system can perform a Hadamard product operation on the second embedding vector and the sequence aggregation feature to obtain the correlation feature. The correlation feature, the second embedding vector, the sequence aggregation feature, and the material feature of each target historical material in the second behavior sequence are input into the deep neural network in the recommendation model, and after data processing by the deep neural network, the predicted value of the click rate of the target user for the candidate material is output.
[0105] In one example, the features input to a deep neural network can be represented as Among them, u is the sequence aggregation feature, is the correlation feature, e T is the second embedding vector, o is the material feature of each target historical material in the second line sequence, is the operator of the Hadamard product.
[0106] Figure 4 It is an optional structural diagram of the recommendation model provided in the embodiment of the present application. Figure 5 This is an optional flow chart of the material recommendation method provided in the embodiment of the present application. Figure 4 right Figure 5 The steps shown are explained.
[0107] Below, the material recommendation method in the embodiment of the present application is explained by taking the recommendation model including an attention module and a deep neural network, and the length of the second behavior sequence is k, that is, the second behavior sequence includes material identifications of k target historical materials as an example.
[0108] S501, the recommendation system collects the first behavior sequence from the user log of the target user and collects candidate materials from the material database;
[0109] S502: The recommendation system determines a second behavior sequence according to the material identifier of the candidate material and the first behavior sequence.
[0110] S503: The recommendation system generates a corresponding auxiliary information sequence based on the second behavior sequence.
[0111] S504, the recommendation system encodes the second behavior sequence, the auxiliary information sequence and the material identification of the candidate material respectively to obtain a third embedded vector matrix, a fourth embedded vector matrix and a second embedded vector.
[0112] S505, the recommendation system performs k Hadamard product operations on the k elements in the third embedding vector matrix and the second embedding vector respectively to obtain a fusion matrix, wherein the fusion matrix has k elements.
[0113] S506, the recommendation system inputs the fusion matrix and the fourth embedding vector matrix into the attention module 41 to obtain k first output features.
[0114] Among them, the attention module 41 performs function mapping processing on the i-th element in the fusion matrix and the i-th element in the fourth embedded vector matrix. The attention module performs function mapping k times in the process of S506 to obtain k first output features.
[0115] S507, the recommendation system performs a Hadamard product operation on the k first output features and the third embedding vector matrix to obtain a plurality of subsequence aggregate features.
[0116] Among them, a Hadamard product operation is performed on the i-th first output feature output by the attention module 41 and the i-th element (i.e., the second element) in the third embedding vector matrix, and k Hadamard product operations are performed k times to obtain k subsequence aggregation features.
[0117] S508: The recommendation system sums up the multiple subsequence aggregation features to obtain a sequence aggregation feature.
[0118] S509, the recommendation system performs a Hadamard product operation on the sequence aggregation feature and the second embedding vector to obtain a correlation feature.
[0119] S510, the deep neural network 42 in the recommendation model processes the correlation features, the sequence aggregation features, the second embedding vector, and the material features of each target historical material in the second behavior sequence, and outputs the predicted value of the click rate of the target user for the candidate material.
[0120] At this point, the recommendation system has completed the above-mentioned material recommendation method.
[0121] In an embodiment of the present application, a second behavior sequence is determined through a first behavior sequence and candidate materials, wherein the first behavior sequence is used to characterize multiple historical materials clicked by a target user, and the second behavior sequence is used to characterize a target historical material related to the candidate material in the multiple historical materials, that is, the second behavior sequence is a part of the first behavior sequence, and the length of the second behavior sequence is smaller than the first behavior sequence. In this way, the length of the user behavior sequence can be reduced while effectively capturing useful information in the user's long behavior sequence. Based on this, the second behavior sequence and the auxiliary information sequence associated with the candidate material and the target historical material are used as input data of the recommendation model, so that the information of the target user's long-term historical behavior sequence can be extracted more simply and effectively in the recommendation model, thereby achieving more accurate material recommendations.
[0122] The following is a description of an exemplary structure of the material recommendation device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, for example, Figure 2 As shown, the software modules stored in the material recommendation device 455 of the memory 450 may include: a first data processing module 4551, based on the candidate material to be recommended, screening out a second behavior sequence related to the candidate material from the first behavior sequence; the first behavior sequence is used to characterize multiple historical materials clicked by the target user, and the second behavior sequence is used to characterize the target historical material related to the candidate material in the multiple historical materials; a second data processing module 4552, used to determine the auxiliary information sequence associated with the second behavior sequence; the auxiliary information sequence is used to characterize the time information of the target user clicking on each target historical material; a data calculation module 4553, used to obtain the weight of each target historical material based on the second behavior sequence, the auxiliary information sequence and the candidate material through the attention module in the recommendation model, and aggregate all the target historical materials based on the weight to obtain the sequence aggregation feature; a prediction module 4554, used to predict the click rate of the target user on the candidate material based on the sequence aggregation feature, the candidate material, and the material feature of each target historical material through the deep neural network in the recommendation model; a recommendation module 4555, based on the click rate, recommends materials to the target user.
[0123] In some possible implementations, the first data processing module 4551 is used to select historical materials of the same material category as the candidate material from multiple historical materials as the target historical material; and generate a second behavior sequence based on the material identification of the target historical material.
[0124] In some possible implementations, the first data processing module 4551 is used to encode the material identifications of multiple historical materials to obtain a first embedded vector matrix corresponding to a first behavior sequence; multiple elements in the first embedded vector matrix correspond one-to-one to the material identifications of multiple historical materials; the material identifications of candidate materials are encoded to obtain a second embedded vector corresponding to the candidate materials; similarity is calculated for each element in the first embedded vector matrix and the second embedded vector respectively to obtain a first element; the first element is an element in the first embedded vector matrix whose similarity with the second embedded vector is greater than a preset threshold; the historical material corresponding to the first element is taken as the target historical material, the material identification of the target historical material is combined, and a second behavior sequence is generated.
[0125] In some possible implementations, the data calculation module 4553 is used to encode the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; encode the material identification of each target historical material to obtain a third embedding vector matrix corresponding to the second behavior sequence; encode the time information of each target historical material to obtain a fourth embedding vector matrix; multiple elements in the fourth embedding vector matrix correspond one-to-one to multiple elements in the third embedding vector matrix; through the attention module, the weight of each target historical material is determined based on the second embedding vector, the third embedding vector matrix and the fourth embedding vector matrix; based on the weight of each target historical material, the elements corresponding to each target historical material in the third embedding vector matrix are weighted summed to obtain sequence aggregation features.
[0126] In some possible implementations, the data calculation module 4553 is used to perform a Hadamard product operation on each element in the third embedding vector matrix and the second embedding vector to obtain a fusion matrix; the fusion matrix is used to represent the correlation between each target historical material and the candidate material; through the attention module, the fusion matrix and the fourth embedding vector matrix are functionally mapped to obtain the weight of each target historical material.
[0127] In some possible implementations, the data calculation module 4553 is used to perform Hadamard product operations on each element in the third embedded vector matrix and the second embedded vector respectively to obtain multiple second elements; the multiple second elements correspond one-to-one to the multiple elements in the third embedded vector matrix; each second element is used to characterize the correlation between the corresponding target historical material and the candidate material; and the multiple second elements are combined to obtain a fusion matrix.
[0128] In some possible implementations, the data calculation module 4553 is used to perform function mapping on each second element and the elements in the fourth embedded vector matrix corresponding to each second element through the attention module to obtain multiple first output features; the multiple first output features correspond one-to-one to the multiple second elements; perform Hadamard product operations on each first output feature and the second element corresponding to each first output feature to obtain multiple subsequence aggregation features; and sum the multiple subsequence aggregation features to obtain a sequence aggregation feature.
[0129] In some possible implementations, the prediction module 4554 is used to encode the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; perform a Hadamard product operation on the second embedding vector and the sequence aggregation feature to obtain a correlation feature; the correlation feature is used to characterize the correlation between the candidate material and all target historical materials; the correlation feature, the sequence aggregation feature, the second embedding vector and the material feature of each target historical material are input into a deep neural network to obtain a predicted value of the click rate of the target user for the candidate material.
[0130] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer storage medium. The processor of the computer device reads the computer instructions from the computer storage medium, and the processor executes the computer instructions, so that the computer device executes the material recommendation method described in the embodiment of the present application.
[0131] The present application embodiment provides a computer storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the material recommendation method provided by the present application embodiment, for example Figure 3 Recommended method for materials shown.
[0132] In some embodiments, the computer storage medium may be a memory such as FRAM, ROM, PROM, EPRO M, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.
[0133] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0134] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a hypertext markup language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0135] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0136] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A material recommendation method, characterized in that: The method comprises: Based on the candidate material to be recommended, a second behavior sequence related to the candidate material is screened out from the first behavior sequence; the first behavior sequence is used to represent multiple historical materials clicked by the target user, and the second behavior sequence is used to represent the target historical material related to the candidate material among the multiple historical materials; Determine an auxiliary information sequence associated with the second behavior sequence; the auxiliary information sequence is used to represent time information of the target user clicking each target historical material; Obtaining, by an attention module in the recommendation model, a weight of each target historical material based on the second behavior sequence, the auxiliary information sequence, and the candidate material, and aggregating all target historical materials based on the weight to obtain a sequence aggregation feature; Predicting the click rate of the target user on the candidate material based on the sequence aggregation features, the candidate material, and the material features of each target historical material through the deep neural network in the recommendation model; Based on the click rate, material recommendations are made to the target user.
2. The method according to claim 1, characterized in that: The step of screening out a second behavior sequence related to the candidate material from the first behavior sequence based on the candidate material to be recommended includes: Selecting, from the plurality of historical materials, historical materials of the same material category as the candidate material as target historical materials; Based on the material identification of the target historical material, the second behavior sequence is generated.
3. The method according to claim 1, characterized in that: The step of screening out a second behavior sequence related to the candidate material from the first behavior sequence based on the candidate material to be recommended includes: Encoding the material identifiers of the plurality of historical materials to obtain a first embedded vector matrix corresponding to the first line sequence; a plurality of elements in the first embedded vector matrix correspond one-to-one to the material identifiers of the plurality of historical materials; Encoding the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; Calculate the similarity between each element in the first embedding vector matrix and the second embedding vector respectively to obtain a first element; the first element is an element in the first embedding vector matrix whose similarity with the second embedding vector is greater than a preset threshold; The historical material corresponding to the first element is used as the target historical material, and the material identifiers of the target historical material are combined to generate the second behavior sequence.
4. The method according to claim 1, characterized in that: The attention module in the recommendation model obtains the weight of each target historical material based on the second behavior sequence, the auxiliary information sequence and the candidate materials, and aggregates all target historical materials based on the weight to obtain sequence aggregation features, including: Encoding the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; Encoding the material identification of each target historical material to obtain a third embedding vector matrix corresponding to the second row sequence; Encoding the time information of each target historical material to obtain a fourth embedded vector matrix; a plurality of elements in the fourth embedded vector matrix correspond one-to-one to a plurality of elements in the third embedded vector matrix; Determining, by the attention module, a weight of each target historical material based on the second embedding vector, the third embedding vector matrix, and the fourth embedding vector matrix; Based on the weight of each target historical material, weighted sum processing is performed on the elements corresponding to each target historical material in the third embedded vector matrix to obtain the sequence aggregation feature.
5. The method according to claim 4, characterized in that The step of determining the weight of each target historical material based on the second embedding vector, the third embedding vector matrix, and the fourth embedding vector matrix by the attention module includes: Performing a Hadamard product operation on each element in the third embedding vector matrix and the second embedding vector to obtain a fusion matrix; the fusion matrix is used to represent the correlation between each target historical material and the candidate material; Through the attention module, function mapping is performed on the fusion matrix and the fourth embedding vector matrix to obtain the weight of each target historical material.
6. The method according to claim 5, characterized in that The performing a Hadamard product operation on each element in the third embedding vector matrix and the second embedding vector to obtain a fusion matrix includes: Performing Hadamard product operations on each element in the third embedding vector matrix and the second embedding vector respectively to obtain a plurality of second elements; the plurality of second elements correspond one-to-one to a plurality of elements in the third embedding vector matrix; each second element is used to characterize the correlation between the corresponding target historical material and the candidate material; The multiple second elements are combined to obtain the fusion matrix.
7. The method according to claim 6, characterized in that The performing function mapping on the fusion matrix and the fourth embedding vector matrix through the attention module to obtain the sequence aggregation feature includes: By means of the attention module, function mapping is performed on each second element and an element in the fourth embedded vector matrix corresponding to each second element to obtain a plurality of first output features; the plurality of first output features correspond one-to-one to the plurality of second elements; Performing a Hadamard product operation on each first output feature and a second element corresponding to each first output feature to obtain a plurality of subsequence aggregate features; A plurality of subsequence aggregation features are summed to obtain the sequence aggregation feature.
8. The method according to claim 1, characterized in that The predicting the click rate of the target user on the candidate material based on the sequence aggregation features and the candidate material by the deep neural network in the recommendation model includes: Encoding the material identification of the candidate material to obtain a second embedding vector corresponding to the candidate material; Performing a Hadamard product operation on the second embedding vector and the sequence aggregation feature to obtain a correlation feature; the correlation feature is used to characterize the correlation between the candidate material and all target historical materials; The correlation feature, the sequence aggregation feature, the second embedding vector and the material feature of each target historical material are input into the deep neural network to obtain a predicted value of the click rate of the target user for the candidate material.
9. A material recommendation device, characterized in that: The device comprises: A first data processing module is used to filter out a second behavior sequence related to a candidate material to be recommended from a first behavior sequence based on the candidate material to be recommended; the first behavior sequence is used to represent multiple historical materials clicked by a target user, and the second behavior sequence is used to represent a target historical material related to the candidate material among the multiple historical materials; A second data processing module is used to determine an auxiliary information sequence associated with the second behavior sequence; the auxiliary information sequence is used to represent the time information when the target user clicks each target historical material; a data calculation module, configured to obtain a weight of each target historical material based on the second behavior sequence, the auxiliary information sequence and the candidate material through an attention module in the recommendation model, and aggregate all target historical materials based on the weight to obtain a sequence aggregation feature; A prediction module, which predicts the click rate of the target user on the candidate material based on the sequence aggregation features, the candidate material, and the material features of each target historical material through a deep neural network in the recommendation model; A recommendation module recommends materials to the target user based on the click-through rate.
10. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable instructions; A processor, configured to implement the method according to any one of claims 1 to 8 when executing the executable instructions or computer programs stored in the memory.
