Information recommendation method, device, equipment, storage medium and program product
By constructing a semi-supervised generative adversarial network model and combining it with a long short-term memory model and a multi-head self-attention model, the accuracy and adaptability problems of traditional methods in financial product recommendation are solved, and more efficient product category recommendation is achieved.
Patent Information
- Application Number
- CN202411995233.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Traditional machine learning methods suffer from insufficient understanding of complex data relationships and weak adaptability in financial product recommendations. While deep learning models can uncover non-linear relationships, there is still room for improvement in accuracy.
A semi-supervised generative adversarial network model is constructed, which combines a long short-term memory model, a multi-head self-attention model, and a fully connected neural network to generate product category recommendation results by capturing the time dependence and attribute relationships in user behavior data.
It improves the accuracy and adaptability of financial product recommendations, enabling more precise recommendations of product categories that meet user needs.
Smart Images

Figure CN119809765B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, and in particular to an information recommendation method and device, equipment, a storage medium and a program product. BACKGROUND
[0002] In recent years, there are various financial products in banks and the update is extremely rapid. Therefore, having an efficient product recommendation system can not only better promote its own products and reduce unnecessary costs, but also improve customer satisfaction, thereby helping the bank attract more customers and enhance competitiveness.
[0003] In the prior art, when a traditional machine learning method is used to recommend products, the objectivity and accuracy of the recommendation are improved. However, the traditional machine learning method has the problems of insufficient understanding of complex data relationships and insufficient adaptability. Therefore, a deep learning model can use a complex network to mine and understand the complex nonlinear relationship between user behavior data and product feature data, overcoming the difficulties of manual analysis and traditional machine learning in processing large-scale complex data. However, there is still the technical problem of low accuracy in recommending product categories using a deep learning model. SUMMARY
[0004] The embodiments of the present application provide an information recommendation method, device, equipment, storage medium and program product to improve the accuracy of product category recommendation results.
[0005] In a first aspect, the embodiments of the present application provide an information recommendation method, comprising:
[0006] obtaining attribute information of a to-be-recommended user and behavior data information in a preset time period;
[0007] inputting the behavior data information into a plurality of long short-term memory models respectively to obtain interest degrees of the to-be-recommended user in various product categories;
[0008] inputting the attribute information into a multi-head self-attention model to obtain a feature representation, the feature representation being used to represent a probability of the to-be-recommended user selecting various product categories depending on the attribute information;
[0009] inputting the interest degrees of the to-be-recommended user in various product categories and the feature representation into a fully connected neural network to obtain a product category recommendation result corresponding to the to-be-recommended user, wherein the plurality of long short-term memory models, the multi-head self-attention model and the fully connected neural network constitute a discriminator in a semi-supervised generative adversarial network model.
[0010] In a possible implementation, before obtaining the attribute information of the to-be-recommended user and the behavior data information in the preset time period, the method further comprises:
[0011] constructing a first semi-supervised generative adversarial network model;
[0012] obtaining a plurality of first training samples and a plurality of second training samples for training the first semi-supervised generative adversarial network model; the first training sample comprises input information and a label corresponding to a historical user, and the label is used to represent a target product category corresponding to the historical user; the second training sample comprises input information of the historical user; the input information comprises attribute information and behavior data information;
[0013] training the first semi-supervised generative adversarial network model according to the plurality of first training samples, the plurality of second training samples, and a random noise vector, to obtain a trained semi-supervised generative adversarial network model, wherein the first semi-supervised generative adversarial network model comprises a first generator and a first discriminator, the first generator is used to generate pseudo input information according to the random noise vector, and the first discriminator is used to distinguish the authenticity of the input information and determine a corresponding prediction result according to the input information.
[0014] In a possible implementation, the first semi-supervised generative adversarial network model is constructed, comprising:
[0015] obtaining product attribute data, processing the product attribute data according to a product attribute clustering model, obtaining a plurality of product categories, and determining second behavior data information of all historical users in a preset historical time period corresponding to any product category and an interest degree of each historical user to any product category;
[0016] for any product category, training the first long short-term memory model according to the second behavior data information of each historical user and the interest degree of any product category, to obtain a trained long short-term memory model corresponding to any product category, wherein a plurality of product categories correspond to a plurality of long short-term memory models;
[0017] constructing the first semi-supervised generative adversarial network model according to the plurality of long short-term memory models, the first multi-head self-attention model, and the first fully connected neural network.
[0018] In a possible implementation, the first long short-term memory model is trained according to the second behavior data information of each historical user and the interest degree of any product category, to obtain a trained long short-term memory model corresponding to any product category, comprising:
[0019] determining a training set and a test set according to the second behavior data information and the interest degree of any product category;
[0020] obtaining a second long short-term memory model by optimizing model parameters of the first long short-term memory model using a particle swarm algorithm according to the training set;
[0021] According to the test set, the second long short-term memory model is tested and processed to obtain the long short-term memory model.
[0022] In a possible implementation, according to the training set, and by using a particle swarm algorithm to optimize model parameters of the first long short-term memory model, a second long short-term memory model is obtained, including:
[0023] The particle swarm is initialized, and the initial position and speed of each particle, the number of iterations are determined, and the initial position is used to represent the initial model parameters of the first long short-term memory model;
[0024] For each particle, the first long short-term memory model is trained according to the initial position and the training set, a prediction error is obtained, and the fitness of each particle is calculated according to the prediction error;
[0025] According to the fitness of each particle, the individual extreme value and the global extreme value are determined, and the position and speed of each particle are updated according to the individual extreme value and the global extreme value, and the iteration process is traversed until the number of iterations is satisfied, and the target position of the particle corresponding to the global extreme value is obtained;
[0026] According to the model parameters corresponding to the target position, the second long short-term memory model is obtained.
[0027] In a possible implementation, the first semi-supervised generative adversarial network model is trained according to the plurality of first training samples, the plurality of second training samples, and the random noise vector, and a trained semi-supervised generative adversarial network model is obtained, including:
[0028] The random noise vector is input into the first generator in the first semi-supervised generative adversarial network model to generate pseudo input information;
[0029] The input information in the first training sample is input into the first discriminator in the first semi-supervised generative adversarial network model to obtain a prediction result, and a prediction loss is determined according to the prediction result and the label in the first training sample;
[0030] The input information in the second training sample is input into the first discriminator to obtain a first probability value, and a first adversarial loss is obtained according to the first probability value, wherein the first probability value indicates the probability that the input information is real.
[0031] The pseudo input information is input into the first discriminator to obtain a second probability value, and a second adversarial loss is obtained according to the second probability value, wherein the second probability value indicates the probability that the pseudo input information is real.
[0032] The first discriminator is updated according to the prediction loss, the first adversarial loss, and the second adversarial loss to obtain a second discriminator.
[0033] According to the second adversarial loss, the first generator is updated to obtain a second generator;
[0034] The second generator and the second discriminator are iteratively trained to obtain a semi-supervised generative adversarial network model.
[0035] In a second aspect, an embodiment of the present application provides an information recommendation device, comprising:
[0036] A first processing module is configured to obtain attribute information of a to-be-recommended user and behavior data information in a preset time period;
[0037] A second processing module is configured to input the behavior data information into a plurality of long short-term memory models respectively to obtain interest degrees of the to-be-recommended user in various product categories;
[0038] A third processing module is configured to input the attribute information into a multi-head self-attention model to obtain a feature representation, the feature representation being used to represent a probability of the to-be-recommended user selecting various product categories depending on the attribute information;
[0039] A fourth processing module is configured to input the interest degrees of the to-be-recommended user in various product categories and the feature representation into a fully connected neural network to obtain a product category recommendation result corresponding to the to-be-recommended user, wherein the plurality of long short-term memory models, the multi-head self-attention model, and the fully connected neural network constitute a discriminator in a semi-supervised generative adversarial network model.
[0040] In a possible implementation, the first processing module is further configured to:
[0041] construct a first semi-supervised generative adversarial network model;
[0042] obtain a plurality of first training samples and a plurality of second training samples for training the first semi-supervised generative adversarial network model; the first training sample comprises input information and a label corresponding to a historical user, the label being used to represent a target product category corresponding to the historical user; the second training sample comprises input information of the historical user; the input information comprises attribute information and behavior data information;
[0043] train the first semi-supervised generative adversarial network model according to the plurality of first training samples, the plurality of second training samples, and a random noise vector to obtain a trained semi-supervised generative adversarial network model, wherein the first semi-supervised generative adversarial network model comprises a first generator and a first discriminator, the first generator is configured to generate pseudo input information according to the random noise vector, and the first discriminator is configured to distinguish the authenticity of the input information and determine a corresponding prediction result according to the input information.
[0044] In a possible implementation, the first processing module is further configured to:
[0045] obtaining product attribute data, processing the product attribute data according to a product attribute clustering model to obtain a plurality of product categories, and determining second behavior data information of all historical users in a preset historical time period corresponding to any product category of the plurality of product categories and an interest degree of each historical user in any product category;
[0046] For any product category, the first long short-term memory model is trained according to the second behavior data information of each historical user and the interest degree of any product category, to obtain a trained long short-term memory model corresponding to any product category, wherein the plurality of product categories correspond to a plurality of long short-term memory models.
[0047] The first semi-supervised generative adversarial network model is constructed according to the plurality of long short-term memory models, the first multi-head self-attention model and the first fully connected neural network.
[0048] In a possible implementation, the first processing module is further configured to:
[0049] The training set and the test set are determined according to the second behavior data information and the interest degree of any product category.
[0050] The second long short-term memory model is obtained by optimizing the model parameters of the first long short-term memory model using a particle swarm algorithm according to the training set.
[0051] The second long short-term memory model is tested according to the test set to obtain the long short-term memory model.
[0052] In a possible implementation, the first processing module is further configured to:
[0053] The particle swarm is initialized to determine the initial position and speed of each particle, the number of iterations, and the initial position is used to represent the initial model parameters of the first long short-term memory model.
[0054] For each particle, the first long short-term memory model is trained according to the initial position and the training set to obtain a prediction error, and the fitness of each particle is calculated according to the prediction error.
[0055] The individual extreme value and the global extreme value are determined according to the fitness of each particle, and the position and speed of each particle are updated according to the individual extreme value and the global extreme value, and the iteration process is traversed until the number of iterations is satisfied, to obtain the target position of the particle corresponding to the global extreme value.
[0056] The second long short-term memory model is obtained according to the model parameters corresponding to the target position.
[0057] In a possible implementation, the first processing module is further configured to:
[0058] inputting the random noise vector into a first generator in the first semi-supervised generative adversarial network model to generate pseudo input information;
[0059] inputting the input information in the first training sample into a first discriminator in the first semi-supervised generative adversarial network model to obtain a prediction result, and determining a prediction loss according to the prediction result and a label in the first training sample;
[0060] inputting the input information in the second training sample into the first discriminator to obtain a first probability value, and obtaining a first adversarial loss according to the first probability value, wherein the first probability value is used to indicate a probability that the input information is real;
[0061] inputting the pseudo input information into the first discriminator to obtain a second probability value, and obtaining a second adversarial loss according to the second probability value, wherein the second probability value is used to indicate a probability that the pseudo input information is real;
[0062] updating the first discriminator according to the prediction loss, the first adversarial loss and the second adversarial loss to obtain a second discriminator;
[0063] updating the first generator according to the second adversarial loss to obtain a second generator;
[0064] iteratively training the second generator and the second discriminator to obtain a semi-supervised generative adversarial network model.
[0065] In a third aspect, an information recommendation device is provided, including a memory and a processor.
[0066] The memory stores computer execution instructions.
[0067] The processor executes the computer execution instructions stored in the memory, so that the processor executes the first aspect and / or various possible implementation manners of the first aspect.
[0068] In a fourth aspect, a computer readable storage medium is provided, which stores computer execution instructions. When the processor executes the computer execution instructions, the computer execution instructions are used to implement the first aspect and / or various possible implementation manners of the first aspect.
[0069] In a fifth aspect, a computer program product is provided, which includes a computer program. When the processor executes the computer program, the computer program implements the first aspect and / or various possible implementation manners of the first aspect.
[0070] The information recommendation method, device, equipment, storage medium and program product provided by the embodiment of the application, by utilizing a long short-term memory model, a multi-head self-attention model and a fully connected neural network, a semi-supervised generative adversarial network model is constructed. The long short-term memory model processes sequence data, can capture time dependence and long-term dependence in user behavior data information of a user to be recommended in a pre-trial time period, and predict the interest degree of the user to different product categories. The multi-head self-attention model can capture complex relationships in attribute information, generate feature representation of a product category by focusing on different feature subsets in the attribute information. The fully connected network further improves the accuracy of the product type recommendation result by capturing the relationship between the interest degree of the user to different product categories and the feature representation generated by the multi-head self-attention model. BRIEF DESCRIPTION OF DRAWINGS
[0071] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0072] Figure 1 A flowchart of an information recommendation method provided by an embodiment of the application Figure One ;
[0073] Figure 2 A structure diagram of a long short-term memory model provided by an embodiment of the application
[0074] Figure 3 A flowchart of an information recommendation method provided by an embodiment of the application Figure Two ;
[0075] Figure 4 A diagram of a product classification result provided by an embodiment of the application
[0076] Figure 5 A flowchart of an information recommendation method provided by an embodiment of the application Figure Three ;
[0077] Figure 6 A structure diagram of a semi-supervised generative adversarial network model provided by an embodiment of the application
[0078] Figure 7 A flowchart of an information recommendation method provided by an embodiment of the application Figure Four ;
[0079] Figure 8 A flowchart of an information recommendation method provided by an embodiment of the application Figure Five ;
[0080] Figure 9 A structure diagram of an information recommendation device provided by the application
[0081] Figure 10 Fig. 1 is a schematic diagram of an information recommendation device according to an embodiment of the present application.
[0082] The specific embodiments of the application have been shown by way of example in the above figures, and will be described in more detail hereafter. These figures and this written description are not intended to limit the scope of the inventive concept in any way, but merely to illustrate the inventive concept to one of ordinary skill in the art by reference to the particular embodiments. DETAILED DESCRIPTION
[0083] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, like reference numerals refer to like elements, unless the context clearly dictates otherwise. The following description is not intended to limit the scope of the application in any way, but rather to provide an example of how the application can be implemented in accordance with some aspects of the application as detailed in the appended claims.
[0084] In recent years, with the rapid development of financial markets, banks have launched a wide variety of financial products, and the update speed is also getting faster and faster. In this environment, banks are facing the challenge of how to effectively recommend suitable products to customers. An efficient product recommendation system not only helps banks to better promote their products and reduce unnecessary marketing costs, but also enhances the competitiveness of banks in the market while improving customer satisfaction.
[0085] Traditional product category recommendation systems usually rely on machine learning methods, which analyze historical data to predict products that customers may be interested in. Traditional machine learning methods have improved the objectivity and accuracy of recommendations to some extent. However, these methods have limitations when dealing with complex data relationships, especially when faced with multi-dimensional, multi-level user behavior data and product feature data, the adaptability of traditional methods is not strong enough.
[0086] To solve these problems, deep learning models are introduced into product category recommendation systems. Deep learning can better mine and understand the complex nonlinear relationships between user behavior data and product feature data through its complex network structure. Compared with traditional methods, deep learning performs well in handling large-scale complex data sets, and can automatically extract features, reducing the dependence on manual analysis.
[0087] However, although deep learning models perform well in many aspects, existing technologies still face some challenges when using deep learning for product category recommendation. In particular, the accuracy of recommendations still needs to be improved. Therefore, how to further optimize the deep learning model to achieve higher accuracy in product category recommendation has become a problem to be solved.
[0088] The information recommendation method provided by the application constructs a semi-supervised generative adversarial network model by using a long short-term memory model, a multi-head self-attention model and a fully connected neural network. The long short-term memory model processes sequence data and can capture time dependence and long-term dependence in user behavior data information of a user to be recommended within a pre-trial time period, and predict the interest intensity of the user to different product categories. The multi-head self-attention mechanism can capture complex relationships in attribute information, and generate feature representations of product categories by focusing on different feature subsets in the attribute information. The fully connected network captures the relationship between the interest intensity of the user to different product categories and the feature representations generated by the multi-head self-attention model, and solves the technical problem of poor accuracy of product type recommendation results in the prior art.
[0089] The technical solutions of the application and how the technical solutions of the application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the application will be described below with reference to the drawings.
[0090] Figure 1 Flowchart of an information recommendation method provided by an embodiment of the application Figure One As shown in Figure 1 , the method comprises:
[0091] S101, attribute information of a user to be recommended and behavior data information within a preset time period are obtained.
[0092] In this embodiment, the attribute information of the user to be recommended includes but is not limited to numerical features such as capital, age, enterprise size and registration time of the user to be recommended, and discrete features such as user category and education level. Within the preset time period, various system logs, monitoring tools or special data analysis platforms are used to obtain the behavior data information of the user to be recommended. For example, it includes the browsing records, search behavior, interaction behavior or consumption records of the user to be recommended on a specific application or platform, and the frequency and mode of using specific functions. Among them, the browsing records include, for example, visited pages, dwell time, clicked content; the search behavior includes, for example, searched keywords; the interaction behavior includes, for example, likes, comments and shares. Through detailed recording and sorting of these behavior data, a comprehensive information set about the behavior performance of the user to be recommended within the preset time period is formed. These information will provide an important basis for subsequent analysis and recommendation algorithm, so as to realize more accurate personalized recommendation.
[0093] It should be noted that the attribute information of the user to be recommended and the behavior data information within the preset time period are both feature information.
[0094] In a possible implementation, the attribute information and the behavior data information in the preset time period can be preprocessed to improve the quality of the attribute information and the behavior data information in the preset time period. The preprocessing process includes, for example, one-hot encoding for discrete data, normalization for numerical data, or data cleaning and processing, outlier detection, duplicate data deletion, and standardization processing of the attribute information and the behavior data information. For example, if one attribute information or behavior data information is missing more than 1 / 4 of the attribute values, the entire data is discarded. If the missing attribute values are less than 1 / 4, the data can be discarded or filled by K-means, for example, by selecting the average value of the attribute of multiple attribute information or behavior data information collected in the same period and having complete attribute values as the value of the missing attribute field of the data to be filled.
[0095] In S102, the behavior data information is input into the multiple long short-term memory models to obtain the interest degrees of the user to be recommended to various product categories.
[0096] In this embodiment, the multiple long short-term memory models process the behavior data information to obtain the interest degrees of the user to be recommended to various product categories. The interest degree can be a quantitative index, for example, a value from 0 to 1, and a higher value indicates a greater interest. For example, the interest degree can also be the total number of transactions of products corresponding to various product categories.
[0097] The long short-term memory (LSTM) model is a sub-type of recurrent neural networks. It combines feedback links, which enables it to process time-series data such as behavior data information. See Figure 2 , Figure 2 The structure of the long short-term memory model provided in the embodiments of the present application is shown in the figure. The long short-term memory model has multiple LSTM units, such as C1, C2, and C3. For example, the LSTM unit corresponding to C2 includes a forget gate, an input gate, and an output gate. The forget gate determines which information is discarded from the cell state by the formula:
[0098] f t =σ(W f ·[H t-1 ,X t ]+b f )
[0099] t is the output of the forget gate, σ is the sigmoid activation function, W f is the weight matrix, and b f is the bias term, Ht-1 X t is the hidden state for the previous time step.
[0100] The input gate and the candidate cell state are determined by:
[0101] i t = σ(W i · [H t-1 , X t ] + b i )
[0102] C t = tanh(W c · [H t-1 , X t ] + b c )
[0103] Together determine which behavioral data information will be added to the cell state, where i t is the output of the input gate, C t is the candidate cell state, W i and W c are weight matrices, and b i and b c are bias terms.
[0104] The cell state is updated by combining the results of the forget gate and the input gate, which is achieved by the following formula:
[0105] C t = f t * C t-1 + i t * C t
[0106] Where C t is the updated cell state, and * denotes element-wise multiplication.
[0107] The output gate determines which behavioral data information will be output from the cell state to the hidden state according to:
[0108] o t = σ(W o · [H t-1 , X t ] + b o )
[0109] H t = o t * tanh(C t )
[0110] Control which behavioral data information will be output from the cell state to the hidden state, where o t is the output of the output gate, and H t is the hidden state for the current time step.
[0111] S103, input the attribute information into the multi-head self-attention model to obtain a feature representation.
[0112] In this embodiment, the attribute information is digitally encoded so that it can be processed by the model. The encoded attribute information is input into the multi-head self-attention model, which processes the input attribute information. Inside the model, it calculates the degree of association and importance between each attribute information. Through the self-attention mechanism, the model can focus on the relationship between different attributes and give more attention to important attributes. The multi-head self-attention model processes the input attribute information to obtain a feature representation. The feature representation is used to represent the probability of the user to be recommended selecting various product categories depending on attribute information. This feature representation can be used to represent the probability of the user to be recommended selecting various product categories depending on attribute information because it captures the potential association between user attributes and product categories. It can be understood as a digital summary and refinement of the preferences and behavior patterns of the user to be recommended.
[0113] The multi-head self-attention (Multi-Head Attention) model is an extended form of attention mechanism widely used in Transformer models. It obtains the attention distribution of input attribute information by running multiple independent attention mechanisms in parallel, thereby more comprehensively capturing the potential multiple semantic associations in the sequence.
[0114] S104, input the interest degree of the user to be recommended for various product categories and the feature representation into a fully connected neural network to obtain the product category recommendation result corresponding to the user to be recommended.
[0115] In this embodiment, the interest degree of the user to be recommended for various product categories and the feature representation are used as input data for the fully connected neural network. These input data are propagated and calculated among the nodes of the fully connected neural network. The neurons in the fully connected neural network process the input data. In this process, the fully connected neural network integrates and processes the input data through its internally trained parameters and connection structure. It tries to find patterns and associations in the combination of interest degree and feature representation. After calculation and processing, a result is finally output, which is the product category recommendation result corresponding to the user to be recommended. It represents the product category that the fully connected neural network judges to be the most suitable for the user to be recommended based on the input data. The fully connected neural network used in this embodiment is a simple single-hidden-layer neural network.
[0116] It should be noted that, since each Long Short-Term Memory (LSTM) model outputs the interest level of the corresponding product category, and the multi-head self-attention (MSA) model outputs the corresponding feature representation, which is used to determine the probability of the user choosing various product categories based on attribute information, the fully connected neural network, when processing the interest levels and feature representations of various product categories, generates probabilities for recommending each product category. Then, it selects the product category with the highest probability from these probabilities as the recommended product category for the user.
[0117] The discriminator in the semi-supervised generative adversarial network (GAN) model comprises multiple long short-term memory (LSTM) models, multi-head self-attention (MOA) models, and fully connected neural networks. When attribute information and behavioral data within a preset time period are input into the GAN model, these different model components work collaboratively. The LTM model derives the interest levels for various product categories based on the behavioral data; the MOA model focuses on global relationships and patterns; and the fully connected neural network obtains feature representations based on attribute information. The fully connected neural network integrates the outputs of these two models as input and makes the final discriminative decision, resulting in the product category recommendation for the user. Through this combination, the GAN model can analyze the input data more comprehensively and deeply, thereby improving the accuracy of the product category recommendation results.
[0118] It should be noted that the semi-supervised generative adversarial network model provided in this embodiment can not only recommend product categories of bank products, but also recommend other information, such as product recommendations on e-commerce platforms, and information or video recommendations on content platforms.
[0119] This application provides an information recommendation method that utilizes a Long Short-Term Memory (LSTM) model, a multi-head self-attention (MSA) model, and a fully connected neural network to construct a semi-supervised generative adversarial network (GAN) model. The LTM model processes sequential data, capturing the temporal and long-term dependencies in user behavior data of users to be recommended within a pre-screening period, and predicting the user's interest in different product categories. The MSA model captures complex relationships in attribute information, generating feature representations of product categories by focusing on different feature subsets of attribute information. The fully connected network further improves the accuracy of product type recommendation results by capturing the relationship between the user's interest in different product categories and the feature representations generated by the MSA model.
[0120] Figure 3 A flowchart illustrating an information recommendation method provided in this application embodiment. Figure Two ,like Figure 3 As shown, in this embodiment... Figure 1Based on the embodiment, a possible implementation of the information recommendation method is described in detail, which comprises the following steps:
[0121] S301, product attribute data is acquired, the product attribute data is processed according to a product attribute clustering model, a plurality of product categories are obtained, and second behavior data information of all historical users in a preset historical time period corresponding to any product category in the plurality of product categories and an interest degree of each historical user to any product category are determined.
[0122] In this embodiment, the product attribute data includes unit price, release time, product score, holding period, etc., and the product attribute data is all numerical characteristic attributes. In order to avoid product classification errors caused by insufficient human experience, a Gaussian Mixture Clustering Model (GMM) is used to train a product attribute clustering model based on all product attribute data. The product attribute data is processed according to the product attribute clustering model to obtain a plurality of product categories, for example, M product categories, and also obtain clustering centers, product data of each category, etc. The product categories include, for example, loan products, deposit products, credit products, etc. By using the Gaussian Mixture Clustering Model algorithm, the similarity relationship between the attributes of the products can be more deeply mined, the products with similar attribute characteristics can be divided into a cluster, and the classification result is as shown in Figure 4 The different colors represent the differences between the product categories.
[0123] Next, the second behavior data information of all historical users in a preset historical time period corresponding to any product category in the plurality of product categories and the interest degree of each historical user to any product category are determined, wherein the interest degree of each historical user to any product category is equivalent to the label corresponding to each historical user.
[0124] Specifically, for example, M product categories are obtained, and the mth product category is taken. The second behavior data information of all historical users in a preset historical time period under the mth product category and the interest degree of each historical user to the mth product category are obtained from the database. The second behavior data information is preprocessed to ensure the quality and accuracy of the data. The interest degree of each historical user to the mth product category may, for example, be the total number of transactions of each product in the mth product category by the historical user in the preset historical time period.
[0125] S302, for any product category, a training set and a test set are determined according to the second behavior data information and the interest degree of any product category.
[0126] In this embodiment, for example, the mth product category is taken as an example: for the mth product category, the second behavior data information and the interest degree of the mth product category are divided according to a preset proportion, for example, 80% of all data is used for training, and 20% is used for prediction, and the training set and the prediction set are divided. It should be noted that the second behavior data information of a historical user corresponds to the interest degree of the mth product category of the historical user.
[0127] S303, initializing the particle swarm, determining the initial position and speed of each particle, and the number of iterations.
[0128] In this embodiment, the particle swarm algorithm is used to optimize the first long short-term memory model. The particle swarm algorithm is an optimization algorithm based on swarm intelligence, which simulates the behavior of bird or fish groups to find the optimal solution.
[0129] Before optimizing the first long short-term memory model, the particle swarm is initialized, and each particle is randomly assigned an initial position and speed. The initial position is usually randomly selected within the search space, while the speed can be set to zero or initialized according to a preset strategy (such as Gaussian distribution). During initialization, the current position of each particle is set to its individual optimal position, i.e. the individual extreme value, and an optimal position is selected from all particles as the global optimal position, i.e. the global extreme value. At the same time, the maximum number of iterations or convergence conditions of the algorithm are set. This determines the length of time the algorithm runs and the search accuracy.
[0130] The initial position is used to represent the initial model parameters of the first long short-term memory model, which includes, for example, the learning rate, batch size, number of neurons, etc. of the first long short-term memory model.
[0131] In one possible implementation, the size of the particle swarm can be determined, for example, according to the problem size or computing resources. Generally, the more particles, the stronger the search ability of the algorithm, but the computational cost also increases accordingly.
[0132] S304, for each particle, the first long short-term memory model is trained according to the initial position and the training set, the prediction error is obtained, and the fitness of each particle is calculated according to the prediction error.
[0133] In this embodiment, the initial position of each particle represents the initial model parameters of the first long short-term memory model. Therefore, the training set is input into the first long short-term memory model to obtain the prediction result corresponding to each historical user under the training set, and the prediction result and the true result are analyzed to obtain the prediction error corresponding to each historical user under the training set. The true result refers to the interest degree of the mth product category of each historical user under the training set.
[0134] The prediction error corresponding to each historical user is calculated to obtain the fitness of each particle. By calculating the fitness of each particle, the advantages and disadvantages of the model parameters represented by each particle are measured, which provides a basis for subsequent optimization and search process, such as selecting particles with high fitness for further operation or updating the position of the particle, etc., to gradually find better model parameter configuration and improve the performance of the first long short-term memory model.
[0135] S305, according to the fitness of each particle, determine the individual extreme value and the global extreme value, and update the position and speed of each particle according to the individual extreme value and the global extreme value, and iterate until the number of iterations is met, and the target position of the particle corresponding to the global extreme value is obtained.
[0136] In this embodiment, after obtaining the fitness of each particle, for each particle itself, the current fitness is compared with the fitness it has experienced before (i.e. individual extreme value). If the current fitness is better, the individual extreme value is updated to the current fitness, and the corresponding position at this time is recorded. Then, among all the individual extreme values of the particles, the one with the optimal fitness is found as the global extreme value. Then, the position and speed of each particle are updated. When updating the speed, the current speed of the particle, the distance from the individual extreme value and the distance from the global extreme value are usually considered. The position is calculated according to the new speed and the current position. In this way, the position and speed are updated once. Then this process is repeated constantly, and the optimal solution is approached constantly in the iteration process. When the number of iterations is reached, the position of the particle corresponding to the global extreme value at this time is the final target position, which represents the optimal model parameters. Through the particle swarm method, a more extensive and rapid search can be performed in the parameter space, the efficiency of finding the optimal solution is improved, and the performance of the first long short-term memory model is improved.
[0137] S306, according to the model parameters corresponding to the target position, a second long short-term memory model is obtained.
[0138] In this embodiment, after determining the model parameters corresponding to the target position, these parameters are applied to the first long short-term memory model, thereby forming a second long short-term memory model with specific structure and performance.
[0139] S307, according to the test set, the second long short-term memory model is tested to obtain a long short-term memory model, and a first semi-supervised generative adversarial network model is constructed according to the plurality of long short-term memory models, the first multi-head self-attention model and the first fully connected neural network.
[0140] In this embodiment, the second long short-term memory model is tested using the test set to measure the performance of the model on new data, such as accuracy, recall, F1 value, etc., to determine whether the performance meets the requirements, and if it meets the requirements, the long short-term memory model is obtained. The plurality of long short-term memory models
[0141] The first semi-supervised generative adversarial network model is constructed according to the plurality of long short-term memory models, the first multi-head self-attention model and the first fully connected neural network. Since the long short-term memory model has been trained, it means that part of the model parameters in the first semi-supervised generative adversarial network model has been determined. By integrating the plurality of long short-term memory models and the first multi-head self-attention model using the first fully connected neural network, the first semi-supervised generative adversarial network model has stronger adaptability and generalization ability, can effectively learn and generate in the case of a small amount of labeled data and a large amount of unlabeled data, and improve the performance and application range of the model in complex tasks.
[0142] It should be noted that the plurality of product categories correspond to the plurality of long short-term memory models. For example, if there are M product categories, there are M long short-term memory models.
[0143] S308, obtaining a plurality of first training samples and a plurality of second training samples for training the first semi-supervised generative adversarial network model;
[0144] In this embodiment, the first training sample includes input information and a label corresponding to the historical user, and the label is used to represent the target product category corresponding to the historical user. The target product category may be, for example, the real choice of the historical user, which helps the model to learn the association between different input information and a specific product category. The second training sample only includes the input information of the historical user, which plays an auxiliary role in semi-supervised learning, enabling the first semi-supervised generative adversarial network model to mine potential patterns and features from a large amount of unlabeled data. The input information includes attribute information and behavior data information.
[0145] S309, training the first semi-supervised generative adversarial network model according to the plurality of first training samples, the plurality of second training samples and a random noise vector, to obtain a trained semi-supervised generative adversarial network model.
[0146] In this embodiment, the first semi-supervised generative adversarial network model includes a first generator and a first discriminator. The first generator is used to generate pseudo input information according to a random noise vector, and the first discriminator is used to distinguish the authenticity of the input information and determine the corresponding prediction result according to the input information.
[0147] It should be noted that the label of the first training sample helps guide the first semi-supervised generative adversarial network model to learn the correspondence between different inputs and target categories, and the second training sample can help the first semi-supervised generative adversarial network model learn general features from a wider data distribution. The introduction of the random noise vector increases the flexibility and creativity of the model, enabling it to generate new data. By continuously adjusting the parameters of the first generator and the first discriminator, the first semi-supervised generative adversarial network model gradually achieves better performance in generating data and distinguishing between true and false data, and ultimately obtains a trained semi-supervised generative adversarial network model that can effectively process and generate relevant data.
[0148] The information recommendation method provided by the embodiments of the present application can effectively divide products into different categories by processing product attribute data through the product attribute clustering model, which helps to more carefully analyze and understand the market positioning and user demand of products. The LSTM model is optimized using the particle swarm algorithm, which can improve the prediction accuracy of the model. By combining multiple long short-term memory models, multi-head self-attention models, and fully connected neural networks to build a semi-supervised generative adversarial network model, the advantages of different models can be fully utilized to improve the performance of the overall model, thereby achieving the effect of improving product category recommendation results.
[0149] Figure 5 Flowchart of the information recommendation method provided by the embodiments of the present application Figure Three As shown in Figure 5 , the embodiments of the present application are based on Figure 3 the embodiments, and a possible implementation of training and processing the first semi-supervised generative adversarial network model according to the multiple first training samples, the multiple second training samples, and the random noise vector to obtain a trained semi-supervised generative adversarial network model is described in detail. The method includes:
[0150] S501, inputting the random noise vector into the first generator in the first semi-supervised generative adversarial network model to generate pseudo input information.
[0151] In this embodiment, after the random noise vector is input into the first generator of the first semi-supervised generative adversarial network model, the first generator will try to convert this noise vector into pseudo input information that looks like real data based on the patterns and rules it has learned, in order to deceive the first discriminator. The real data refers to the input information corresponding to the historical users in the first training sample and the input information corresponding to the historical users in the second training sample.
[0152] S502, inputting the input information in the first training sample into the first discriminator in the first semi-supervised generative adversarial network model to obtain a prediction result, and determining a prediction loss according to the prediction result and the label in the first training sample.
[0153] In this embodiment, when the input information (real data) in the first training sample is input into the first discriminator of the first semi-supervised generative adversarial network model. The first discriminator processes it and outputs a prediction result. The prediction result is, for example, in the form of a scalar value, indicating the predicted product category corresponding to the historical user. By calculating the difference between the predicted product category and the label (target product category corresponding to the historical user) in the first training sample, a prediction loss is obtained. This prediction loss measures the classification performance of the first discriminator on real data.
[0154] S503, input the input information in the second training sample into the first discriminator to obtain a first probability value, and obtain a first adversarial loss according to the first probability value, wherein the first probability value is used to indicate the probability that the input information is real.
[0155] In this embodiment, when the input information (unlabeled input information) of the second training sample is input into the first discriminator. The first discriminator will output a probability value indicating that the input information is real, that is, the first probability value. The first adversarial loss is calculated based on this first probability value. For example, if the first probability value is close to 1, it means that the first discriminator tends to think that the input information is real; if it is close to 0, it means that the first discriminator tends to think that the input information is false. Since the input information is real data, the first discriminator should output a high probability (close to 1) indicating that it thinks the input is real. Therefore, the first adversarial loss is usually measured based on the ability of the first discriminator to output a high probability for real data.
[0156] S504, input the pseudo input information into the first discriminator to obtain a second probability value, and obtain a second adversarial loss according to the second probability value, wherein the second probability value is used to indicate the probability that the pseudo input information is real.
[0157] In this embodiment, the first discriminator processes these pseudo input information and outputs a probability value, that is, the second probability value. The second probability value is used to indicate the probability that the pseudo input information is real. Ideally, for pseudo input information, the first discriminator should output a low probability (close to 0), indicating that it thinks the pseudo input information is false. The second adversarial loss is calculated using the second probability value. In this case, the second adversarial loss is measured based on the ability of the first discriminator to output a low probability for the pseudo input information generated by the first generator. This means that the first discriminator can identify which data is generated by the first generator.
[0158] S505, update the first discriminator according to the prediction loss, the first adversarial loss and the second adversarial loss to obtain a second discriminator.
[0159] In the training process of the semi-supervised generative adversarial network model in this embodiment, the update of the first discriminator is based on a combination of multiple loss functions, including the prediction loss, the first adversarial loss, and the second adversarial loss. The total loss is obtained by weighted calculation of these losses, and the gradient of the total loss with respect to the parameters of the first discriminator is calculated by the back propagation algorithm. Then, the calculated gradient is used to adjust the parameters of the first discriminator by using an optimization algorithm to minimize the total loss, and finally the second discriminator is obtained.
[0160] It should be noted that when the weighted calculation is performed, the weights corresponding to the prediction loss, the first adversarial loss, and the second adversarial loss depend on the training strategy and the target. For example, the weights can be set artificially. If it is desired that the first semi-supervised generative adversarial network model pays more attention to the prediction accuracy of the labeled input information, the weight corresponding to the prediction loss is set to a larger value. If it is desired to enhance the adversarial nature between the first generator and the first discriminator, the weight corresponding to the second adversarial loss is set to a larger value.
[0161] In a possible implementation, during the model training process, the learning rate of the second discriminator uses an adaptive learning rate. The adaptive learning rate method can dynamically adjust the learning rate according to the feedback in the training process. For example, in the early stage of training, the learning rate can be larger to accelerate the convergence, and in the later stage of training, the learning rate can be reduced to improve the accuracy and stability of the model.
[0162] S506, updating the first generator according to the second adversarial loss to obtain a second generator.
[0163] In this embodiment, the second adversarial loss is calculated to generate the gradient with respect to the parameters of the first generator. Then, the calculated gradient is used to adjust the parameters of the first generator by using an optimization algorithm to minimize the second adversarial loss, and finally the second discriminator is obtained.
[0164] S507, iteratively training the second generator and the second discriminator to obtain a semi-supervised generative adversarial network model.
[0165] In this embodiment, the second generator and the second discriminator are alternately trained continuously, and in this iterative process, both sides continuously promote and improve each other, and gradually reach a balanced state. For example, the maximum number of iterations can be preset in advance, and when the maximum number of iterations is met, a relatively mature semi-supervised generative adversarial network model is obtained, which can better complete the generation task and the discrimination task under semi-supervision, and can be used in the scene of product category recommendation.
[0166] It should be noted that the second discriminator includes multiple long short-term memory models, a multi-head self-attention model and a fully connected neural network. Since the multiple long short-term memory models have been trained before being integrated into the second discriminator, it means that the model parameters of the multiple long short-term memory models have been set. Therefore, the process of training the second discriminator by the above steps S501-S507 is to determine the model parameters of the multi-head self-attention model and the fully connected neural network. When the second discriminator is trained, the model parameters of the multi-head self-attention model and the fully connected neural network are also determined.
[0167] The information recommendation method provided by the embodiments of the present application can input a random noise vector into the first generator to generate pseudo input information, and calculate prediction loss, adversarial loss and the like by inputting and discriminating the training samples, and update and iteratively train the first discriminator and the first generator accordingly. In this way, the model can better learn the data distribution and features, and improve the generation ability and discrimination ability of the semi-supervised generative adversarial network model. At the same time, by using the semi-supervised learning method, the labeled and unlabeled data are fully utilized to improve the generalization ability and adaptability of the semi-supervised generative adversarial network model, and thus the accuracy of the product category recommendation result is improved.
[0168] In one possible implementation, Figure 6 The structure diagram of the semi-supervised generative adversarial network model provided by the embodiments of the present application is shown in Figure 6 As shown in the figure, the semi-supervised generative adversarial network model includes a generator and a discriminator. The discriminator includes multiple long short-term memory models and a multi-head self-attention model. The multiple long short-term memory models and the multi-head self-attention model are connected through a fully connected neural network. The multiple long short-term memory models constitute an LSTM interest degree prediction module, and the multi-head self-attention model includes an Embedding layer and a Transfomer structure. The generator is used to generate pseudo input information (x * ) as a pseudo sample according to a random noise vector Z. The data set includes multiple first training samples (x, y) and multiple second training samples (x). The first training sample includes input information (x) corresponding to a historical user and a label (y), and the label is used to represent a target product category corresponding to the historical user. The second training sample only includes input information (x) of the historical user. The input information includes attribute information and behavior data information. The data set and the pseudo input information are input into the discriminator, and the discriminator is used to distinguish the authenticity of the input information and determine the corresponding prediction result according to the input information. By continuously optimizing the parameters of the generator and the discriminator, the final semi-supervised generative adversarial network model is obtained.
[0169] In one possible implementation, Figure 7 The flowchart of the information recommendation method provided by the embodiments of the present application is shown in Figure Four As shown in the figure,Figure 7 As shown, one possible implementation of the information recommendation method is illustrated, the method comprising:
[0170] First-level data from historical users is obtained, including attribute information, behavioral data, and product attribute data. This data is then processed and standardized. Based on the product attribute data, a Gaussian Mixture Model (GMM) is used to train a product attribute clustering model, yielding the product category classification results.
[0171] Based on the classification results, taking the m-th product category as an example, we obtain the tags and behavioral information data of all users in the m-th product category within a preset historical time period. We then train the Long Short-Term Memory (LSTM) model using the tags and behavioral information data, and optimize it using a particle swarm optimization algorithm. We then determine whether the LTM model has reached its optimal state; if so, we obtain the trained LTM model.
[0172] Based on the classification results, attribute information data of the first historical user is obtained. This first historical user is partially tagged and partially untagged. The tag indicates the numerical code of the product category that should be recommended for this first historical user.
[0173] A multi-head self-attention model is trained using attribute information data. This model serves as part of the discriminator in a semi-supervised generative adversarial network (GAN) model; therefore, the generator within the GAN model can be used simultaneously to train the multi-head self-attention model. During training, it is determined whether the dataset input to the multi-head self-attention model has reached a preset size. This dataset includes the input attribute information data and the pseudo-attribute information data generated by the generator. If so, it is determined whether the model training cycle has reached a preset value (epoch value). If so, the trained multi-head self-attention model is obtained.
[0174] A multi-head self-attention model and multiple long short-term memory models are connected through a fully connected neural network to obtain a discriminator in a semi-supervised generative adversarial network model. This semi-supervised generative adversarial network model is then used to predict the attribute information of the user to be recommended and the behavioral data information within a preset time period to obtain the product category recommendation results.
[0175] In one possible implementation, Figure 8 A flowchart illustrating an information recommendation method provided in this application embodiment. Figure Five ,like Figure 8 As shown, a possible implementation of the optimization process for a Long Short-Term Memory (LSTM) model using the particle swarm optimization algorithm is illustrated. The method includes:
[0176] For any product category, taking the mth product category as an example, the preprocessed historical user data in the mth product category is obtained, the historical user data including a label corresponding to a historical user and behavior data in a preset historical time period, the label being used to represent the interest degree of the historical user in the mth product category.
[0177] According to the preprocessed historical user data, the long short-term memory model is trained and processed by using a particle swarm algorithm. First, the particle swarm is initialized to determine the initial position and speed of each particle, the number of iterations, and the initial position is used to represent the initial model parameters of the long short-term memory model, wherein the model parameters include, for example, learning rate, batch-size, number of neurons, etc.
[0178] For each particle, the long short-term memory model is trained according to the preprocessed historical user data and the corresponding initial model parameters, and the prediction result of the interest degree of the mth product category is output. According to the prediction error between the prediction result and the actual result, the fitness of each particle is calculated, and the individual extreme value and the global extreme value in the particle swarm are determined.
[0179] According to the individual extreme value and the global extreme value, the speed and position of the particle are updated, and the fitness of the new particle is calculated again. The above iteration process is traversed, and it is judged whether the preset condition is met. If yes, the long short-term memory model (PSO-LSTM) based on particle swarm parameter optimization is obtained. The preset conditions include, but are not limited to, the maximum number of iterations of training the long short-term memory model and the loss function converging to a certain value.
[0180] Since there are multiple product categories, the long short-term memory model corresponding to each product category needs to be trained and processed, and then multiple long short-term memory models are obtained.
[0181] Figure 9 The structure diagram of an information recommendation device provided in the present application is shown in FIG. 1, which comprises: Figure 9 as shown in the figure, the information recommendation device 900 provided in the present embodiment comprises:
[0182] The first processing module 901 is configured to obtain attribute information of a user to be recommended and behavior data information in a preset time period.
[0183] The second processing module 902 is configured to input the behavior data information into multiple long short-term memory models respectively to obtain the interest degrees of the user to be recommended for various product categories.
[0184] The third processing module 903 is configured to input the attribute information into a multi-head self-attention model to obtain a feature representation, the feature representation being used to represent the probability of the user to be recommended selecting various product categories depending on the attribute information.
[0185] The fourth processing module 904 is configured to input the interest degrees and feature representations of the to-be-recommended user on various product categories into a full connection neural network to obtain a product category recommendation result corresponding to the to-be-recommended user, wherein the plurality of long short-term memory models, the multi-head self-attention model, and the full connection neural network constitute a discriminator in a semi-supervised generative adversarial network model.
[0186] In a possible implementation, the first processing module 901 is further configured to:
[0187] construct a first semi-supervised generative adversarial network model;
[0188] obtain a plurality of first training samples and a plurality of second training samples for training the first semi-supervised generative adversarial network model; the first training samples include input information and labels corresponding to historical users, and the labels are used to represent target product categories corresponding to the historical users; the second training samples include input information of the historical users; the input information includes attribute information and behavior data information;
[0189] train the first semi-supervised generative adversarial network model according to the plurality of first training samples, the plurality of second training samples, and a random noise vector to obtain a trained semi-supervised generative adversarial network model, wherein the first semi-supervised generative adversarial network model includes a first generator and a first discriminator, the first generator is configured to generate pseudo input information according to the random noise vector, and the first discriminator is configured to distinguish the authenticity of the input information and determine a corresponding prediction result according to the input information.
[0190] In a possible implementation, the first processing module 901 is further configured to:
[0191] obtain product attribute data, process the product attribute data according to a product attribute clustering model to obtain a plurality of product categories, and determine second behavior data information of all historical users in a preset historical time period and an interest degree of each historical user on any product category corresponding to any product category in the plurality of product categories;
[0192] for any product category, train the first long short-term memory model according to the second behavior data information of each historical user and the interest degree of any product category to obtain a trained long short-term memory model corresponding to any product category, wherein the plurality of product categories correspond to a plurality of long short-term memory models;
[0193] construct the first semi-supervised generative adversarial network model according to the plurality of long short-term memory models, the first multi-head self-attention model, and the first full connection neural network.
[0194] In a possible implementation, the first processing module 901 is further configured to:
[0195] determine a training set and a test set according to the second behavior data information and the interest degree of any product category;
[0196] optimize model parameters of the first long short-term memory model according to the training set and by using a particle swarm algorithm, to obtain a second long short-term memory model;
[0197] test the second long short-term memory model according to the test set, to obtain the long short-term memory model.
[0198] In a possible implementation, the first processing module 901 is further configured to:
[0199] initialize the particle swarm, to determine an initial position and a speed of each particle, and an iteration number, the initial position being used to represent initial model parameters of the first long short-term memory model;
[0200] for each particle, train the first long short-term memory model according to the initial position and the training set, to obtain a prediction error, and calculate an adaptability of each particle according to the prediction error;
[0201] determine an individual extreme value and a global extreme value according to the adaptability of each particle, and update the position and the speed of each particle according to the individual extreme value and the global extreme value, to traverse an iteration process until the iteration number is satisfied, to obtain a target position of a particle corresponding to the global extreme value;
[0202] obtain the second long short-term memory model according to model parameters corresponding to the target position.
[0203] In a possible implementation, the first processing module 901 is further configured to:
[0204] input a random noise vector into a first generator in the first semi-supervised generative adversarial network model, to generate pseudo input information;
[0205] input input information in the first training sample into a first discriminator in the first semi-supervised generative adversarial network model, to obtain a prediction result, and determine a prediction loss according to the prediction result and a label in the first training sample;
[0206] input input information in the second training sample into the first discriminator, to obtain a first probability value, and obtain a first adversarial loss according to the first probability value, wherein the first probability value is used to indicate a probability that the input information is real;
[0207] input the pseudo input information into the first discriminator, to obtain a second probability value, and obtain a second adversarial loss according to the second probability value, wherein the second probability value is used to indicate a probability that the pseudo input information is real;
[0208] The first discriminator is updated according to the predicted loss, the first adversarial loss and the second adversarial loss, to obtain a second discriminator;
[0209] The first generator is updated according to the second adversarial loss, to obtain a second generator;
[0210] The second generator and the second discriminator are iteratively trained to obtain a semi-supervised generative adversarial network model.
[0211] The information recommendation apparatus provided in the embodiment can execute the method provided in the method embodiment, and has similar implementation principles and technical effects, which will not be described here again.
[0212] Figure 10 A structural schematic diagram of an information recommendation device provided in the present application is shown in FIG. 1. Figure 10 As shown in the figure, the information recommendation device 1000 provided in the embodiment includes at least one processor 1001 and a memory 1002. Optionally, the device 1000 further includes a communication component 1003. The processor 1001, the memory 1002 and the communication component 1003 are connected through a bus 1004.
[0213] In the specific implementation process, the at least one processor 1001 executes the computer execution instructions stored in the memory 1002, so that the at least one processor 1001 executes the method described above.
[0214] The specific implementation process of the processor 1001 can refer to the method embodiment described above, which has similar implementation principles and technical effects, and will not be described here again.
[0215] In the above embodiment, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC) and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The steps of the method disclosed in the application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0216] The memory can include a random access memory (RAM), and can also include a non-volatile memory (NVM), for example, at least one disk memory.
[0217] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.
[0218] The present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described above.
[0219] The present application also provides a computer readable storage medium, which stores computer execution instructions, and when a processor executes the computer execution instructions, the method described above is implemented.
[0220] The readable storage medium described above can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0221] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium, and can write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.
[0222] The division of units is only a logical functional division, and in actual implementation, there can be another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0223] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e. may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0224] In addition, each functional unit in each embodiment of the application can be integrated into one processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0225] If the function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0226] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction-related hardware. The aforementioned program can be stored in a computer readable storage medium. The program executes the steps of the above-mentioned method embodiments when executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, and various media that can store program codes.
[0227] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards of relevant countries and regions, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.
[0228] And the present application relates to the user information for big data analysis (including but not limited to personal biological characteristics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and adopts artificial intelligence technology to make automatic decision, makes the technical scheme based on automatic decision result to have the important influence decision to personal rights and interests, provides the corresponding operation entrance for user, for user to choose to agree or refuse automatic decision result;If user chooses to refuse, then enter expert decision process.
[0229] It should be noted that the terms "first", "second", etc. in the claims and the description and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be exchanged under appropriate circumstances, so that the embodiments of the application described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, products or devices.
[0230] Finally, it should be noted that: after considering the specification and practicing the application disclosed herein, those skilled in the art will easily think of other embodiments of the application. The application is intended to cover any variations, uses or adaptations of the application that follow the general principles of the application and include common knowledge or conventional techniques in the art that are not disclosed by the application, and is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the application is only limited by the appended claims.
Claims
1. An information recommendation method characterized by comprising: The method comprises the following steps: obtaining attribute information of a user to be recommended and behavior data information in a preset time period; inputting the behavior data information into a plurality of long short-term memory models respectively to obtain interest degrees of the user to be recommended for various product categories; wherein a plurality of product categories correspond to a plurality of long short-term memory models; inputting the attribute information into a multi-head self-attention model to obtain a feature representation, the feature representation being used to represent a probability of the user to be recommended selecting the various product categories depending on the attribute information; inputting the interest degrees of the user to be recommended for the various product categories and the feature representation into a fully connected neural network to obtain a product category recommendation result corresponding to the user to be recommended, wherein the plurality of long short-term memory models, the multi-head self-attention model and the fully connected neural network constitute a discriminator in a semi-supervised generative adversarial network model; the semi-supervised generative adversarial network model comprises a generator and a discriminator, the generator is used to generate pseudo input information according to a random noise vector, and the discriminator is used to distinguish the authenticity of input information and determine a corresponding prediction result according to the input information.
2. The method of claim 1, wherein, Before obtaining the attribute information of the user to be recommended and the behavior data information in the preset time period, the method further comprises the following steps: constructing a first semi-supervised generative adversarial network model; obtaining a plurality of first training samples and a plurality of second training samples for training the first semi-supervised generative adversarial network model; the first training sample comprises input information and a label corresponding to a historical user, the label being used to represent a target product category corresponding to the historical user; the second training sample comprises input information of a historical user; the input information comprises attribute information and behavior data information; training the first semi-supervised generative adversarial network model according to the plurality of first training samples, the plurality of second training samples and a random noise vector to obtain a trained semi-supervised generative adversarial network model, wherein the first semi-supervised generative adversarial network model comprises a first generator and a first discriminator, the first generator is used to generate pseudo input information according to the random noise vector, and the first discriminator is used to distinguish the authenticity of input information and determine a corresponding prediction result according to the input information.
3. The method of claim 2, wherein, constructing a first semi-supervised generative adversarial network model, comprising: obtaining product attribute data, processing the product attribute data according to a product attribute clustering model to obtain a plurality of product categories, and determining second behavior data information of all historical users in a preset historical time period corresponding to any product category in the plurality of product categories and an interest degree of each historical user for the any product category; for the any product category, training a first long short-term memory model according to the second behavior data information of each historical user and the interest degree of the any product category to obtain a trained long short-term memory model corresponding to the any product category, wherein a plurality of product categories correspond to a plurality of long short-term memory models; constructing the first semi-supervised generative adversarial network model according to the plurality of long short-term memory models, a first multi-head self-attention model and a first fully connected neural network.
4. The method of claim 3, wherein, According to the second behavior data information of each historical user and the interest degree of any product category, the first long short-term memory model is trained to obtain a trained long short-term memory model corresponding to any product category, including: According to the second behavior data information and the interest degree of any product category, a training set and a test set are determined; According to the training set, the model parameters of the first long short-term memory model are optimized by using a particle swarm algorithm to obtain a second long short-term memory model; According to the test set, the second long short-term memory model is tested to obtain the long short-term memory model.
5. The method of claim 4, wherein, According to the training set, the model parameters of the first long short-term memory model are optimized by using a particle swarm algorithm to obtain a second long short-term memory model, including: The particle swarm is initialized to determine the initial position and speed of each particle, the number of iterations, and the initial position is used to represent the initial model parameters of the first long short-term memory model; For each particle, the first long short-term memory model is trained according to the initial position and the training set to obtain a prediction error, and the fitness of each particle is calculated according to the prediction error; According to the fitness of each particle, individual extreme values and global extreme values are determined, and the position and speed of each particle are updated according to the individual extreme values and the global extreme values, and the iteration process is traversed until the number of iterations is satisfied, to obtain the target position of the particle corresponding to the global extreme value; According to the model parameters corresponding to the target position, a second long short-term memory model is obtained.
6. The method of claim 2, wherein, According to the plurality of first training samples, the plurality of second training samples and the random noise vector, the first semi-supervised generative adversarial network model is trained to obtain a trained semi-supervised generative adversarial network model, including: The random noise vector is input into the first generator in the first semi-supervised generative adversarial network model to generate the pseudo input information; The input information in the first training sample is input into the first discriminator in the first semi-supervised generative adversarial network model to obtain a prediction result, and a prediction loss is determined according to the prediction result and the label in the first training sample; The input information in the second training sample is input into the first discriminator to obtain a first probability value, and a first adversarial loss is obtained according to the first probability value, wherein the first probability value indicates the probability that the input information is real; The pseudo input information is input into the first discriminator to obtain a second probability value, and a second adversarial loss is obtained according to the second probability value, wherein the second probability value indicates the probability that the pseudo input information is real; The first discriminator is updated according to the prediction loss, the first adversarial loss and the second adversarial loss to obtain a second discriminator; The first generator is updated according to the second adversarial loss to obtain a second generator; The second generator and the second discriminator are iteratively trained to obtain the semi-supervised generative adversarial network model.
7. An information recommendation device characterized by comprising: including: The first processing module is configured to obtain attribute information of a user to be recommended and behavior data information in a preset time period; The second processing module is configured to input the behavior data information into a plurality of long short-term memory models respectively to obtain interest degrees of the user to be recommended for various product categories; wherein the plurality of product categories correspond to the plurality of long short-term memory models; The third processing module is configured to input the attribute information into a multi-head self-attention model to obtain a feature representation, the feature representation being used to represent a probability of the user to be recommended selecting the various product categories depending on the attribute information; The fourth processing module is configured to input the interest degrees of the user to be recommended for the various product categories and the feature representation into a fully connected neural network to obtain a product category recommendation result corresponding to the user to be recommended, wherein the plurality of long short-term memory models, the multi-head self-attention model and the fully connected neural network constitute a discriminator in a semi-supervised generative adversarial network model; the semi-supervised generative adversarial network model comprises a generator and the discriminator, the generator being configured to generate pseudo input information according to a random noise vector, and the discriminator being configured to distinguish the authenticity of input information and determine a corresponding prediction result according to the input information.
8. An information recommendation device characterized by comprising: Comprise: Memory, processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1-6.
10. A computer program product, characterised in that, The computer program is executed by the processor to implement the method of any one of claims 1-6.
Citation Information
Patent Citations
Article recommendation method and device
CN110992127A
Information recommendation method and device and equipment and readable storage medium
CN111460130A