Product recommendation method and device
Through multiple rounds of feature retrieval and feature similarity calculation, cigarette recommendations are dynamically updated, solving the problem of inaccurate recommendations under the single-round reasoning paradigm, and achieving more accurate consumer preference capture and product recommendations.
Patent Information
- Application Number
- CN202411386164.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2024-12-31
AI Technical Summary
Existing product recommendation methods rely on a single-round reasoning paradigm and cannot effectively capture changes in consumer preferences, resulting in inaccurate recommendation results.
Through multiple rounds of feature retrieval, cigarette and consumer feature information are extracted from historical cigarette purchase information, feature similarity is calculated, candidate cigarette pools are dynamically updated, and products that are most in line with consumer preferences are recommended.
It improves the accuracy of product recommendations, adapts to consumers' interest preferences for product changes, and enhances the ability to identify complex behavior patterns and diversified preferences.
Smart Images

Figure CN119228503A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of product recommendation, and in particular to a product recommendation method and device. Background Art
[0002] With the development of society and the improvement of people's living standards, consumers' demand for products is also changing. Therefore, it is particularly important for tobacco companies to adapt to consumers' demand for products in advance.
[0003] At present, the product prediction method mainly relies on the single-round reasoning paradigm, which predicts the products that the target user wants to buy based on the target user's single-round purchase record. This limits the ability of tobacco companies to capture the ever-changing diversity of consumer preferences and leads to inaccurate recommendation results. Summary of the invention
[0004] In view of this, the present invention provides a product recommendation method and device to solve the problem of inaccurate recommendation results.
[0005] In a first aspect, the present invention provides a product recommendation method, comprising: performing multiple rounds of feature retrieval on historical cigarette purchase information of a target consumer, obtaining multiple cigarette context representation information; wherein the multiple cigarette context representation information is used to characterize cigarette feature information and target consumer feature information obtained through multiple single-round feature retrievals; performing cigarette feature extraction on the multiple cigarette context representation information to obtain multiple first feature information, performing consumer feature extraction on the multiple first feature information to obtain multiple second feature information; wherein the multiple first feature information is used to characterize feature information inherent in multiple single-round retrieved cigarette commodities for satisfying target consumer preferences; the multiple second feature information is used to characterize the cigarette preference feature information of the target consumer through multiple single-round retrievals; respectively determining the similarities between the multiple first feature information and the multiple second feature information to obtain multiple feature similarities; and recommending products to the target consumer based on the multiple feature similarities.
[0006] The present invention uses multiple rounds of feature retrieval to retrieve cigarette context representation information for characterizing cigarette feature information and target consumer feature information obtained through multiple single-round feature retrieval from historical cigarette purchase information, efficiently obtains dynamic features of multiple elements related to cigarettes and target consumers in historical cigarette purchase information, establishes a dynamic understanding of different elements in historical cigarette information, and facilitates subsequent feature extraction. The present invention performs cigarette feature extraction on multiple cigarette context representation information to obtain multiple first feature information inherent in characterizing multiple single-round retrieved cigarette commodities for satisfying target consumer preferences, performs consumer feature extraction on multiple first feature information, and obtains multiple second feature information for characterizing cigarette preferences of target consumers through multiple single-round retrievals. The present invention uses the cigarette context representation information obtained through multiple rounds of feature retrieval to extract the first feature information and the second feature information from the perspective of the commodity itself and the perspective of the target consumer, respectively, so as to facilitate the extraction of the changed first feature information and the second feature information, realize the dynamic extraction of cigarette features and target consumer features and the diverse feature recognition, and facilitate the analysis of the complex behavior patterns of target consumers and the capture of diverse cigarette features and target consumer preference features. The present invention determines the similarities between multiple first feature information and multiple second feature information respectively to obtain multiple feature similarities; based on the multiple feature similarities, recommends products to target consumers. The present invention calculates the similarities between multiple first feature information and multiple second feature information so as to recommend products that best meet the preferences of target consumers to target consumers. Compared with the single-round reasoning paradigm in the related art, the present invention can adapt to the changing interest preferences of target consumers for products, thereby improving the accuracy of product recommendations to target consumers.
[0007] In an optional embodiment, multiple rounds of feature retrieval are performed on the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette context representation information, including: screening the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette products corresponding to the consumer preference information of the current retrieval round; wherein the consumer preference information represents the target consumer's preference information for cigarette products; updating the candidate cigarette pool according to the multiple cigarette products to obtain a target candidate cigarette pool; wherein the candidate cigarette pool represents a container pool for storing cigarette products retrieved in each round; and multiple rounds of feature retrieval are performed on the target candidate cigarette pool to obtain multiple cigarette context representation information.
[0008] The present invention updates a candidate cigarette pool by screening historical cigarette purchase information, and performs multiple rounds of feature retrieval on the updated target candidate cigarette pool to obtain multiple cigarette context representation information. The multiple cigarette context representation information obtained can more dynamically reflect cigarette feature information and target consumer preference information that meet target consumer preferences, thereby improving the accuracy of subsequent product recommendations.
[0009] In an optional embodiment, cigarette feature extraction is performed on multiple cigarette context representation information to obtain multiple first feature information, and consumer feature extraction is performed on the multiple first feature information to obtain multiple second feature information, including: cigarette feature extraction is performed on multiple cigarette context representation information based on a cigarette product feature extraction algorithm to obtain multiple first feature information; consumer feature extraction is performed on multiple first feature information based on a cigarette consumer feature extraction algorithm to obtain multiple second feature information.
[0010] In an optional embodiment, cigarette feature extraction is performed on multiple cigarette context representation information based on a cigarette product feature extraction algorithm to obtain multiple first feature information, including: encoding multiple cigarette context representation information to obtain multiple encoding results; performing dimension conversion on the multiple encoding results to obtain multiple dimension conversion results; performing spectral modulation on the multiple dimensional conversion results to obtain multiple spectral modulation results; performing regularization processing on the multiple spectral modulation results to obtain multiple regularization processing results; performing cigarette feature extraction on the acquired cigarette purchase sequence to obtain cigarette extraction results; and fusing the multiple regularization processing results with the cigarette extraction results to obtain multiple first feature information.
[0011] The present invention introduces a cigarette product feature extraction algorithm to enhance filtering, performs spectral modulation on multiple dimensional conversion results, realizes filtering operations on feature information of each dimension, and performs regularization processing on multiple spectral modulation results. It solves the problems of gradient vanishing and training instability. The present invention captures valuable fine-grained first feature information and filters out noise, and can effectively obtain multiple first feature information.
[0012] In an optional embodiment, consumer feature extraction is performed on multiple first feature information based on a cigarette consumer feature extraction algorithm to obtain multiple second feature information, including: based on a multi-scale attention mechanism, screening the multiple first feature information to obtain multiple first extraction results; performing consumer preference feature extraction on the multiple first extraction results to obtain multiple second extraction results; integrating the multiple first extraction results and the multiple second extraction results to obtain multiple second feature information.
[0013] The present invention is based on a multi-scale attention mechanism, performs consumer preference feature extraction on multiple first feature information, performs consumer preference feature extraction on multiple first extraction results, and integrates multiple first extraction results and multiple second extraction results, thereby realizing the integration of different information in different fields, enhancing the ability to capture consumer preference features at different scales, and obtaining second feature information that is more in line with the preferences of target consumers.
[0014] In an optional embodiment, the similarities between multiple first feature information and multiple second feature information are determined respectively to obtain multiple feature similarities, including: obtaining multiple first feature vectors from the multiple first feature information; obtaining multiple second feature vectors from the multiple second feature information; and obtaining multiple feature similarities based on the inner product between the multiple first feature vectors and the multiple second feature vectors.
[0015] In an optional embodiment, recommending products to target consumers based on multiple feature similarities includes: selecting multiple target feature similarities greater than or equal to a preset value from the multiple feature similarities; and recommending multiple products corresponding to the multiple target feature similarities to the target consumers.
[0016] The present invention recommends products with higher feature similarity between the first feature information and the second feature information to target consumers, so that the recommended products are more in line with the preferences of the target consumers and the accuracy of product recommendations is improved.
[0017] In an optional embodiment, after recommending products to target consumers based on multiple feature similarities, the method further includes: based on a first encoder, predicting a first cigarette preference feature of the target consumer based on multiple cigarette context representation information to obtain a first prediction result; wherein the first encoder indicates that a prediction of a previous item is performed based on the target consumer's future interaction history; the first cigarette preference feature indicates a cigarette preference feature of a previous item; based on a second encoder, predicting a second cigarette preference feature of the target consumer based on multiple cigarette context representation information to obtain a second prediction result; wherein the second encoder indicates that a next item is performed based on the target consumer's past interaction history. The invention discloses a method for predicting a project; the second cigarette preference feature represents the cigarette preference feature of the next project; generating ranking loss information according to the first prediction result and the second prediction result; wherein the ranking loss information represents information used to optimize the ranking ability of product recommendations; classifying multiple cigarette context representation information to obtain predicted cigarette labels and real cigarette labels; determining cross entropy loss information according to the predicted cigarette labels and the real cigarette labels; wherein the cross entropy loss information represents information used to optimize the classification task of consumer characteristics and cigarette characteristics; integrating the ranking loss information and the cross entropy loss information to obtain the target loss information; adjusting the recommended products according to the target loss information.
[0018] The present invention predicts the cigarette preference characteristics of target consumers based on a first encoder for predicting history and a second encoder for predicting the future, and generates ranking loss information according to the prediction results. The ranking loss information improves the ranking ability of product recommendations and can improve the accuracy of product recommendations. The present invention classifies multiple cigarette context representation information to obtain predicted cigarette labels and real cigarette labels; according to the predicted cigarette labels and the real cigarette labels, cross entropy loss information is determined. The cross entropy loss information can optimize the classification task of consumer characteristics and cigarette characteristics, thereby improving the accuracy of extracting consumer characteristics and cigarette characteristics. The present invention integrates the ranking loss information and the cross entropy loss information to obtain the target loss information; according to the target loss information, the recommended products are adjusted to improve the accuracy of product recommendations, so that the recommended products are more in line with the preferences of target consumers.
[0019] In a second aspect, the present invention provides a product recommendation device, comprising: a cigarette context representation information determination module, used to perform multiple rounds of feature retrieval on the historical cigarette purchase information of the target consumer obtained, and obtain multiple cigarette context representation information; wherein the multiple cigarette context representation information is used to characterize the cigarette feature information and target consumer feature information obtained through multiple single-round feature retrievals; a feature extraction module, used to perform cigarette feature extraction on the multiple cigarette context representation information, and obtain multiple first feature information, and perform consumer feature extraction on the multiple first feature information, and obtain multiple second feature information; wherein the multiple first feature information is used to characterize the feature information inherent in the cigarette products retrieved through multiple single-round retrievals for satisfying the preferences of the target consumers; the multiple second feature information is used to characterize the cigarette preference feature information of the target consumers retrieved through multiple single-round retrievals; a feature similarity determination module, used to respectively determine the similarity between the multiple first feature information and the multiple second feature information, and obtain multiple feature similarities; a product recommendation module, used to recommend products to the target consumers based on the multiple feature similarities. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] FIG. 1( a ) is a schematic diagram of a single-round search technology process according to an embodiment of the present invention;
[0022] FIG. 1( b ) is a schematic diagram of a multi-round search technology process according to an embodiment of the present invention;
[0023] Figure 2 is a flowchart of a method for recommending a product according to an embodiment of the present invention;
[0024] Figure 3 is a flowchart of a method for recommending another product according to an embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of an extraction process of a cigarette commodity feature extraction algorithm according to an embodiment of the present invention;
[0026] Figure 5 is a schematic diagram of an extraction process of a cigarette consumer feature extraction algorithm according to an embodiment of the present invention;
[0027] Figure 6 is a flowchart of a method for adjusting product recommendations according to an embodiment of the present invention;
[0028] Figure 7 is a schematic diagram of the working process of the first encoder and the second encoder according to an embodiment of the present invention;
[0029] Figure 8 is a flowchart of a method for recommending a product according to another embodiment of the present invention;
[0030] Fig. 9 4 is a structural block diagram of a device for recommending products according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0032] The product prediction method in the related art mainly relies on the single-round reasoning paradigm. According to the single-round purchase record of the target user, the product that the target user wants to buy is predicted. As shown in Figure 1(a), the consumer's cigarette purchase sequence is input into the recommendation model. In the recommendation model, after the embedding layer and the sequence compiler, the consumer representation used to characterize the consumer's preference is obtained. According to the consumer representation, k candidate cigarettes corresponding to the consumer representation are selected from the cigarette product pool and recommended to the consumer. However, the consumer's preference may change. This method limits the ability of tobacco companies to capture the ever-changing diversity of consumer preferences, resulting in inaccurate recommendation results.
[0033] An embodiment of the present invention provides a product recommendation method, as shown in FIG1(b) which is a schematic diagram of a multi-round retrieval process. According to the multi-scale cigarette purchase sequence of consumers, the preference characteristics of consumers are extracted to obtain multiple consumer representations. The cigarette product pool is continuously updated according to the multiple consumer representations to continuously obtain k / n candidate cigarettes until the cigarette that best matches the consumer's preference is selected and recommended to the consumer, thereby achieving the effect of accurately recommending cigarettes.
[0034] According to an embodiment of the present invention, a recommended method embodiment of a product is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] In this embodiment, a product recommendation method is provided, which can be used in computer devices. Figure 2 is a flow chart of a method for recommending a product according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0036] Step S201, performing multiple rounds of feature retrieval on the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette context representation information; wherein the multiple cigarette context representation information is used to represent the cigarette feature information and target consumer feature information obtained through multiple single-round feature retrieval.
[0037] The historical cigarette purchase information represents the sequence information formed by the target consumer according to the cigarette purchase time. Feature retrieval represents retrieving relevant content by calculating the semantic similarity between instances. In the embodiment of the present invention, feature retrieval represents retrieving multiple information related to cigarette commodity features and target consumer features from the historical cigarette purchase information.
[0038] In some optional embodiments, the method of multi-round feature retrieval is: performing multiple rounds of screening on historical cigarette purchase information to obtain multiple target consumer preference features and multiple cigarette product features, determining the semantic similarity between the multiple target consumer preference features and the multiple cigarette product features, sorting the multiple cigarette product features according to the semantic similarity to obtain a sorted sequence, screening out multiple cigarette features in the sorted sequence, and forming cigarette context representation information from information corresponding to the multiple target consumer preference features and information corresponding to the multiple cigarette features.
[0039] Among them, multiple cigarette context representation information can be expressed in vector form, specifically, it can be expressed as: in, represents the cigarette context information of the t-th retrieval round of target consumer u, represents the k-th cigarette as the context of the t-th retrieval round.
[0040] Step S202, performing cigarette feature extraction on multiple cigarette context representation information to obtain multiple first feature information, and performing consumer feature extraction on the multiple first feature information to obtain multiple second feature information; wherein the multiple first feature information is used to characterize the feature information inherent in multiple single-round retrieved cigarette products for satisfying the preferences of target consumers; and the multiple second feature information is used to characterize the cigarette preference feature information of the target consumers retrieved through multiple single-round retrievals.
[0041] In some optional implementations, a cigarette product feature extraction algorithm performs cigarette feature extraction on multiple cigarette context representation information to obtain multiple first feature information; and a cigarette consumer feature extraction algorithm performs consumer feature extraction on multiple first feature information to obtain multiple second feature information.
[0042] Among them, the cigarette product feature extraction algorithm can be applied to the cigarette product extractor, which includes a learnable filtering layer, that is, a multi-layer perceptual neural network with enhanced filtering, which is used to capture valuable fine-grained information and filter out noise. In an embodiment of the present invention, the cigarette product feature extraction algorithm is used to perform fine-grained extraction of cigarette product features in multiple cigarette context representation information to obtain multiple first feature information.
[0043] In some optional embodiments, the cigarette consumer feature extraction algorithm may be a multi-scale self-attention mechanism for learning the preference features of target consumers at different time scales, thereby extracting a plurality of second feature information from a plurality of first feature information.
[0044] Step S203: respectively determine the similarities between the plurality of first feature information and the plurality of second feature information to obtain a plurality of feature similarities.
[0045] In some optional embodiments, the similarities between multiple first feature information and multiple second feature information are determined respectively to obtain multiple feature similarities, including: obtaining multiple first feature vectors from the multiple first feature information; obtaining multiple second feature vectors from the multiple second feature information; and obtaining multiple feature similarities based on the inner product between the multiple first feature vectors and the multiple second feature vectors.
[0046] Among them, obtaining multiple feature similarities according to the inner products between the multiple first feature vectors and the multiple second feature vectors includes: dividing the dot products between the multiple first feature vectors and the multiple second feature vectors by the products of the lengths between the multiple first feature vectors and the multiple second feature vectors to obtain multiple feature similarities.
[0047] Exemplarily, the values of the multiple feature similarities range from -1 to 1, where 1 represents complete similarity, 0 represents no correlation, and -1 represents complete opposite.
[0048] Step S204: recommend products to target consumers based on multiple feature similarities.
[0049] In some optional embodiments, products are recommended to target consumers based on multiple feature similarities, including: selecting multiple target feature similarities greater than or equal to a preset value from multiple feature similarities; and recommending multiple products corresponding to the multiple target feature similarities to the target consumers.
[0050] Exemplarily, the preset value may be 1, that is, among multiple feature similarities, multiple target feature similarities greater than or equal to 1 are selected, and multiple products corresponding to the multiple target feature similarities are recommended to target consumers.
[0051] The product recommendation method provided in this embodiment uses multiple rounds of feature retrieval to retrieve cigarette context representation information used to characterize cigarette feature information and target consumer feature information obtained through multiple single-round feature retrieval from historical cigarette purchase information, efficiently obtain dynamic features of multiple elements related to cigarettes and target consumers in historical cigarette purchase information, establish a dynamic understanding of different elements in historical cigarette information, and facilitate subsequent feature extraction. The present invention performs cigarette feature extraction on multiple cigarette context representation information to obtain multiple first feature information inherent in multiple single-round retrieved cigarette products to meet the preferences of target consumers, performs consumer feature extraction on multiple first feature information, and obtains multiple second feature information used to characterize the cigarette preferences of target consumers through multiple single-round retrievals. The present invention uses the cigarette context representation information obtained by multiple rounds of feature retrieval to extract the first feature information and the second feature information from the perspective of the product itself and the perspective of the target consumer, respectively, so as to facilitate the extraction of the transformed first feature information and the second feature information, realize the dynamic extraction of cigarette features and target consumer features and diverse feature recognition, and facilitate the analysis of complex behavior patterns of target consumers and capture of diverse cigarette features and target consumer preference features. The present invention determines the similarities between multiple first feature information and multiple second feature information respectively to obtain multiple feature similarities; based on the multiple feature similarities, recommends products to target consumers. The present invention calculates the similarities between multiple first feature information and multiple second feature information so as to recommend products that best meet the preferences of target consumers to target consumers. Compared with the single-round reasoning paradigm in the related art, the present invention can adapt to the changing interest preferences of target consumers for products, thereby improving the accuracy of product recommendations to target consumers.
[0052] In this embodiment, a product recommendation method is provided, which can be used for the above-mentioned computer device. Figure 3 is a flow chart of a method for recommending another product according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0053] Step S301, performing multiple rounds of feature retrieval on the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette context representation information; wherein the multiple cigarette context representation information is used to represent the cigarette feature information and target consumer feature information obtained through multiple single-round feature retrieval.
[0054] Specifically, step S301 includes:
[0055] Step S3011, filtering the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette products corresponding to the consumer preference information of the current search round; wherein the consumer preference information represents the target consumer's preference information for cigarette products.
[0056] In some optional implementations, the acquired historical cigarette purchase information of the target consumer is screened to obtain multiple cigarette products with the highest scores corresponding to the consumer preference information of the current search round.
[0057] Among them, the consumer preference information of each round can be expressed as Among them, u represents the target consumer, t-1 represents the retrieval round, and the stacking strategy is used to generate a set of context vectors from the consumer preference information.
[0058] In some optional implementations, if the vector corresponding to the consumer preference information of the current retrieval round is Then filter out the target consumers’ historical cigarette purchase information and The corresponding top k cigarette products with the highest alignment scores.
[0059] Step S3012, updating the candidate cigarette pool according to the multiple cigarette products to obtain a target candidate cigarette pool; wherein the candidate cigarette pool represents a container pool for storing the cigarette products retrieved in each round.
[0060] The updating of the candidate cigarette pool according to the multiple cigarette products to obtain the target candidate cigarette pool includes: adding multiple cigarette identification numbers corresponding to the multiple cigarette products to the candidate cigarette pool to obtain the target candidate cigarette pool.
[0061] Step S3013, performing multiple rounds of feature retrieval on the target candidate cigarette pool to obtain multiple cigarette context representation information.
[0062] Among them, multiple rounds of feature retrieval are performed on the target candidate cigarette pool to obtain multiple target consumer preference features and multiple cigarette product features, the semantic similarity between the multiple target consumer preference features and the multiple cigarette product features is determined, the multiple cigarette product features are sorted according to the semantic similarity to obtain a sorted sequence, and multiple cigarette features are screened out in the sorted sequence. The information corresponding to the multiple target consumer preference features and the information corresponding to the multiple cigarette features constitute the cigarette context representation information.
[0063] Step S302, performing cigarette feature extraction on multiple cigarette context representation information to obtain multiple first feature information, and performing consumer feature extraction on the multiple first feature information to obtain multiple second feature information; wherein the multiple first feature information is used to characterize the feature information inherent in multiple single-round retrieved cigarette products for satisfying the preferences of target consumers; and the multiple second feature information is used to characterize the cigarette preference feature information of the target consumers retrieved through multiple single-round retrievals.
[0064] Specifically, step S302 includes:
[0065] Step S3021: extract cigarette features from multiple cigarette context representation information based on a cigarette product feature extraction algorithm to obtain multiple first feature information.
[0066] In some optional implementations, the above step S3021 includes:
[0067] Step a1, encoding multiple cigarette context representation information to obtain multiple encoding results.
[0068] Among them, multiple cigarette context representation information can be expressed as in, represents the cigarette context information of the t-th retrieval round of target consumer u, represents the k-th cigarette as the context of the t-th retrieval round.
[0069] Using the cigarette product embedding matrix E I ∈R N×d right Encode each cigarette product in , use d to represent the dimension of cigarette product embedding, and N is the total number of different cigarette products.
[0070] Step a2, performing dimension conversion on multiple encoding results to obtain multiple dimension conversion results.
[0071] In some optional implementations, the plurality of cigarette context representation information is encoded, and the high-dimensional matrices corresponding to the plurality of cigarette context representation information are projected into a low-dimensional dense representation.
[0072] For example, the high-dimensional matrix E corresponding to the multiple cigarette context representation information is I Projection into a low-dimensional dense representation The calculation formula is:
[0073]
[0074] in, Represents the projection result, Indicates cigarettes The LookUp operation represents the low-dimensional dense representation of I The search strategy used to retrieve cigarette product embeddings in .
[0075] Step a3, performing spectrum modulation on the multiple dimensional conversion results to obtain multiple spectrum modulation results.
[0076] In some optional embodiments, a filtering operation is performed on each dimension of the feature in the frequency domain, the projection result is converted to the frequency domain to obtain multiple frequency domain results, spectral modulation is performed on the multiple spectral results to obtain multiple modulation spectra, and the multiple modulation spectra are converted to the time domain to obtain multiple spectral modulation results.
[0077] Among them, a filtering operation is performed on each dimension of the feature in the frequency domain: the cigarette dimension is subjected to a fast Fourier transform represented as F(·). This operation converts the cigarette product representation into the frequency domain, which can be expressed as:
[0078]
[0079] in, represents the frequency domain result, F(·) represents the fast Fourier transform, Represents the projection result, C k×d Represents a complex matrix with k rows and d columns, where k and d represent the dimensions of the variable.
[0080] Using a learnable filter W∈C k×d The spectrum is modulated by element-wise multiplication, calculated as follows:
[0081]
[0082] in, represents the modulation spectrum, W represents the learnable filter, Represents the frequency domain results.
[0083] In some optional embodiments, the modulation spectrum is transformed into Converting back to the time domain, the calculation formula is as follows:
[0084]
[0085] in, Indicates the spectrum modulation result, F -1 represents the inverse fast Fourier transform, represents the modulation spectrum, R k×d Represents a real matrix of dimension k×d, where k and d represent the dimension of the variable.
[0086] Step a4, performing regularization processing on the multiple spectrum modulation results to obtain multiple regularization processing results.
[0087] Among them, skip connections, normalization layers, and random dropout layers are introduced into multiple spectrum modulation results to obtain multiple regularization processing results. The calculation formula is:
[0088]
[0089] in, Represents the result of regularization processing, LayerNorm is the normalization function, represents the projection result, Dropout represents random inactivation processing, Indicates the spectrum modulation result.
[0090] Step a5, extracting cigarette features from the acquired cigarette purchase sequence to obtain a cigarette extraction result.
[0091] Among them, the cigarette purchase sequence means that the cigarette features are obtained from the order in which consumers buy cigarettes. The cigarette extraction results can be used to u express.
[0092] Step a6, fusing the multiple regularization processing results and the cigarette extraction results to obtain multiple first feature information.
[0093] Among them, X u and Through the cross-attention network, multiple first feature information are obtained.
[0094] In some optional embodiments, X u and The formula for fusion through the cross-attention network is:
[0095]
[0096]
[0097] Among them, ATT represents the calculation function of the attention mechanism, Q is the query matrix, K is the key matrix, V is the value matrix, d represents the dimension size, T is the retrieval round, is the first feature information, X uExtract results for cigarettes, is the result of regularization processing, W Q To query the projection matrix, W K is the key projection matrix, W K is the value projection matrix. The query matrix Q is used to represent the items that need to be paid attention to at present, and the key matrix K is used to represent the items that can be paid attention to. During the calculation process, a transposition operation will be performed. Each key vector is matched with the query vector to calculate the similarity or attention score with the query. The value matrix V contains the actual required content.
[0098] For example, Figure 4 The figure shows the extraction process diagram of the cigarette commodity feature extraction algorithm. After Fast Fourier Transform (FFT), learnable filter and Inverse Fast Fourier Transform (IFFT), and then after connection and normalization, multiple regularization results are obtained. The multiple regularization results and the cigarette extraction result X obtained from the cigarette purchase sequence are combined. u After the attention layer and connection normalization processing, the first feature information is obtained
[0099] Step S3022: extract consumer characteristics from the plurality of first characteristic information based on a cigarette consumer characteristic extraction algorithm to obtain a plurality of second characteristic information.
[0100] In some optional implementations, the above step S3022 includes:
[0101] Step b1, based on the multi-scale attention mechanism, multiple first feature information are screened to obtain multiple first extraction results.
[0102] In some optional embodiments, the operation process of the multi-scale attention mechanism includes: allocating functions of window sizes for multiple attention heads respectively, using multiple attention heads to screen multiple first feature information, and obtaining multiple first extraction results.
[0103] In some optional implementations, the window size allocation function for the jth attention head is: according to the number of the attention head j={1,…,H} and the sequence length L, a heuristic rule is implemented to allocate a window size to each attention head. The attention heads are assigned to linearly growing local windows, and attention heads are assigned to an exponentially growing global window. The attention head of , the window size is:
[0104] WS(j)=j+1,
[0105] Among them, WS(j) represents the window size of the j-th attention head.
[0106] For attention heads with label numbers greater than The attention head of , the window size is:
[0107]
[0108] Among them, WS(j) represents the window size of the jth attention head, represents half of the attention heads, H represents the total number of attention heads, exp represents the exponential function with e as the base, j represents the number of the attention heads, and L represents the sequence length of the attention heads.
[0109] In some optional implementations, the expression for calculating the first extraction result is:
[0110]
[0111]
[0112] Among them, head i,k represents the vector of the i-th attention head at the k-th position, represents the first feature information, τ represents the extraction range, σ is the normalized exponential (softmax) function, and represents the query matrix, let represents the key matrix, let represents the value matrix, Representative extraction The context information within the range τ, the matrix obtained by transposing the context information, Representation Extraction Context information within range τ.
[0113] In some optional implementations, consumer preference features are extracted from the plurality of first feature information according to the above formula, and a plurality of feature extraction results Z are outputted. u , for multiple feature extraction results Z u Perform normalization processing to obtain multiple first extraction results
[0114] Step b2, extracting consumer preference features from the multiple first extraction results to obtain multiple second extraction results.
[0115] In some optional implementations, during multiple rounds of retrieval, the cigarette context representation information of the previous round will continue to affect the current round, and this influence will gradually weaken as the round distance increases. Therefore, in the embodiment of the present invention, a gated recurrent unit (Gated Recurrent Unit, GRUs) is used to capture the valuable consumer relevance accumulated from the previous rounds, and the formula for extracting consumer preference features from multiple cigarette context representation information based on the gated recurrent unit is:
[0116]
[0117] Among them, F t represents the second extraction result of the current round t, GRU represents the gated recurrent unit, θ g represents the model parameters of GRU, Indicates the second extraction result of the previous round t-1, Indicates the first extraction result.
[0118] Step b3: Integrate the multiple first extraction results and the multiple second extraction results to obtain multiple second feature information.
[0119] In some optional implementations, the multiple first extraction results and the multiple second extraction results are integrated using an attention function to obtain multiple second feature information.
[0120] Exemplarily, the calculation formula of the attention function is:
[0121]
[0122] in, Indicates the first extraction result The sum of the extraction results of the second extraction result Ft, f att represents the attention function, η κ represents the attention weight of the total extraction result K, exp represents the exponential function with e as the base, represents the transpose of the weight vector used to compute the scalar attention value, W att represents a trainable parameter, f represents the subscript of the second extraction result, and z represents the subscript of the first extraction result.
[0123] In some optional embodiments, according to n κ and The expression for calculating the second characteristic information is:
[0124]
[0125] in, represents the second characteristic information, η κrepresents the attention weight of the total extracted result K, Indicates the first extraction result and the sum of the extraction results of the second extraction result Ft, f represents the subscript of the second extraction result, and z represents the subscript of the first extraction result.
[0126] like Figure 5 As shown in the figure, it is a schematic diagram of the extraction process of the cigarette consumer feature extraction algorithm. After the self-attention mechanism of the multi-scale scheme, multiple first feature information Screening to obtain multiple first extraction results In the figure, head i,k represents the vector of the i-th attention head at the k-th position, represents the vector of the first feature information at the kth position, Q represents the query matrix, K represents the key matrix, V represents the value matrix, and multiple GRUs are used to extract consumer preference features from multiple first extraction results to obtain multiple second extraction results F t , based on consumer feature fusion, multiple first extraction results and multiple second extraction results Ft to obtain multiple second feature information F t .
[0127] Step S303, respectively determine the similarities between the plurality of first feature information and the plurality of second feature information to obtain a plurality of feature similarities. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0128] Step S304: recommend products to target consumers based on multiple feature similarities. Figure 2 Step S204 of the illustrated embodiment will not be described in detail here.
[0129] The product recommendation method provided in this embodiment updates the candidate cigarette pool by screening historical cigarette purchase information, performs multiple rounds of feature retrieval on the updated target candidate cigarette pool, and obtains multiple cigarette context representation information. The obtained multiple cigarette context representation information can more dynamically reflect the cigarette feature information and target consumer preference information that meet the preferences of target consumers, thereby improving the accuracy of subsequent product recommendations. The embodiment of the present invention introduces enhanced filtering of the cigarette commodity feature extraction algorithm, performs spectral modulation on the results of multiple dimensional conversion, realizes the filtering operation of the feature information of each dimension, and performs regularization on the multiple spectral modulation results. The problem of gradient disappearance and unstable training in the link is solved. The embodiment of the present invention captures valuable fine-grained first feature information and filters out noise, and can effectively obtain multiple first feature information. Based on the multi-scale attention mechanism, the embodiment of the present invention extracts consumer preference features from multiple first feature information, extracts consumer preference features from multiple first extraction results, and integrates multiple first extraction results and multiple second extraction results to realize the integration of different information in different fields, enhances the ability to capture consumer preference features at different scales, and obtains second feature information that better meets the preferences of target consumers.
[0130] In this embodiment, a product recommendation method is provided, which can be used for the above-mentioned computer device. Figure 6 is a flow chart of a method for adjusting product recommendations according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:
[0131] Step S601, based on the first encoder, predict the first cigarette preference feature of the target consumer according to multiple cigarette context representation information to obtain a first prediction result; wherein the first encoder indicates that the prediction of the previous item is performed based on the future interaction history of the target consumer; the first cigarette preference feature indicates the cigarette preference feature of the previous item.
[0132] The previous item represents the most recent prediction item before the first encoder executes the current prediction item.
[0133] In some optional embodiments, the first encoder may be a future encoder that performs prediction of the next item based on the consumer's past interaction history. The future encoder designs a future mask M F , cancel the attention link of the self-attention mechanism, so as to predict the first cigarette preference feature of the target consumer according to the self-attention mechanism after canceling the attention link, and obtain the first prediction result
[0134] Step S602, based on the second encoder, predict the second cigarette preference feature of the target consumer according to multiple cigarette context representation information to obtain a second prediction result; wherein the second encoder indicates that the prediction of the next item is performed based on the past interaction history of the target consumer; the second cigarette preference feature indicates the cigarette preference feature of the next item.
[0135] The next item indicates the item that will be executed after the second encoder finishes executing the current item.
[0136] In some optional embodiments, the second encoder may be a past encoder that performs prediction of the next item based on the consumer's past interaction history. p The prediction result obtained according to the single-round reasoning paradigm is used as the second prediction result
[0137] Step S603: Generate ranking loss information according to the first prediction result and the second prediction result; wherein the ranking loss information represents information for optimizing the ranking capability of product recommendations.
[0138] Among them, the ranking loss information includes the ranking loss calculation formula:
[0139]
[0140] Among them, L ss represents ranking loss, log represents logarithmic formula, p θ represents the ranking loss function parameters, is the second prediction result, This is the first prediction result.
[0141] like Figure 7 As shown, it is a schematic diagram of the working process of the first encoder and the second encoder, based on the future mask M F and past mask M p The design of the invention is to extract consumer features and cigarette features from past consumer context information and past cigarette context information through a consumer extractor and a cigarette product extractor respectively for multiple times, and input them into the recommendation model to obtain multiple past consumer feature information, and then pass them through a prediction layer to predict cigarette products and obtain multiple second prediction results. The future consumer context information and the future cigarette context information are respectively subjected to consumer feature extraction and cigarette feature extraction by the consumer extractor and the cigarette product extractor for multiple times, and input into the recommendation model to obtain multiple future consumer feature information, and the cigarette products are predicted by passing the information through the prediction layer to obtain multiple first prediction results. According to the first prediction results And the second prediction result Generate ranking loss information to adjust the recommended products.
[0142] Step S604: classify the multiple cigarette context representation information to obtain predicted cigarette labels and real cigarette labels.
[0143] Among them, use y ui;t Indicates the real cigarette label, Represents the predicted cigarette label.
[0144] Step S605, determining cross entropy loss information according to the predicted cigarette label and the real cigarette label; wherein the cross entropy loss information represents information for optimizing the classification task of consumer characteristics and cigarette characteristics.
[0145] Among them, the cross entropy loss information includes the cross entropy loss function:
[0146]
[0147] Among them, L t represents the cross entropy loss function, b represents the cross entropy loss function parameter, σ represents the normalized exponential (softmax) function, y ui;t Indicates the real cigarette label, Represents the predicted cigarette label.
[0148] Step S606: Integrate the ranking loss information and the cross entropy loss information to obtain target loss information.
[0149] Among them, the target loss information includes the target loss function:
[0150]
[0151] Among them, L a represents the target loss function, L t represents the cross entropy loss function, L ss represents the ranking loss, t represents the retrieval round, and λ and γ represent the artificially set hyperparameters in the model.
[0152] Step S607: Adjust the recommended products according to the target loss information.
[0153] In some optional implementations, the recommended products are input into a target loss function according to the target loss information, and the recommended products are adjusted.
[0154] The product recommendation adjustment method provided in this embodiment predicts the cigarette preference characteristics of the target consumer based on the first encoder for predicting the history and the second encoder for predicting the future, and generates ranking loss information according to the prediction results. The ranking loss information improves the ranking ability of product recommendations and can improve the accuracy of product recommendations. The present invention classifies multiple cigarette context representation information to obtain predicted cigarette labels and real cigarette labels; according to the predicted cigarette labels and the real cigarette labels, the cross entropy loss information is determined. The cross entropy loss information can optimize the classification task of consumer characteristics and cigarette characteristics, thereby improving the accuracy of extracting consumer characteristics and cigarette characteristics. The present invention integrates the ranking loss information and the cross entropy loss information to obtain the target loss information; according to the target loss information, the recommended products are adjusted to improve the accuracy of product recommendations, so that the recommended products are more in line with the preferences of the target consumers.
[0155] In this embodiment, a product recommendation method is provided, which can be used for the above-mentioned computer device. Figure 8 is a flow chart of a method for recommending a product according to another embodiment of the present invention. Figure 8 As shown, the process includes the following steps:
[0156] Step S801, using a cigarette product-based extractor, re-evaluate and modify the learned cigarette product embedding.
[0157] In some optional implementations, a cigarette commodity-based extractor is used to extract the acquired historical cigarette purchase information to obtain cigarette commodity embeddings, wherein the cigarette commodity embeddings may be cigarette commodity features.
[0158] Step S802, based on the extractor of cigarette consumers, an adaptive consumer representation is generated mainly by using the context information of consumers.
[0159] In some optional embodiments, a cigarette consumer-based extractor is used to perform feature extraction on the context-related content of the consumer to obtain an adaptive consumer representation, wherein the adaptive consumer representation may be a consumer feature.
[0160] Step S803, construct a past-future based knowledge distillation retrieval enhancement module, starting from the consumer's future purchase sequence, extracting self-supervisory signals to promote knowledge transfer from a feature-based perspective.
[0161] In an embodiment of the present invention, knowledge distillation technology is performed based on consumers' future purchase sequences to optimize the final prediction results and improve the accuracy of subsequent prediction results.
[0162] Step S804: using a context information generator, obtain context-related content of cigarette products and consumers.
[0163] In some optional implementations, the context information generator is used to extract cigarette context information related to cigarette products and consumer context information related to consumers from historical cigarette purchase information according to time series and retrieval rounds.
[0164] Step S805, using the consumer characteristics and cigarette product characteristics, finally obtaining the prediction results and realizing the model.
[0165] In some optional implementations, the similarity between cigarette product characteristics and consumer characteristics is calculated, and cigarette products corresponding to high similarity are selected as prediction results.
[0166] In the embodiment of the present invention, by performing multiple rounds of retrieval of cigarette consumer purchase record data and multiple rounds of knowledge distillation of future purchase sequences, a dynamic understanding of different consumer characteristics is established, which makes up for the static retrieval process based on single consumer representation in the traditional product recommendation process, thereby greatly reducing the consumer preference characteristics extracted by the model and the various noises contained in the cigarette product characteristics, and at the same time improving the accuracy of cigarette recommendations to consumers.
[0167] In this embodiment, a recommended device for a product is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0168] This embodiment provides a product recommendation device, such as Fig. 9 As shown, including:
[0169] The cigarette context representation information determination module 901 is used to perform multiple rounds of feature retrieval on the historical cigarette purchase information of the target consumer obtained to obtain multiple cigarette context representation information; wherein the multiple cigarette context representation information is used to represent the cigarette feature information and target consumer feature information obtained through multiple single-round feature retrievals.
[0170] The feature extraction module 902 is used to perform cigarette feature extraction on multiple cigarette context representation information to obtain multiple first feature information, and perform consumer feature extraction on the multiple first feature information to obtain multiple second feature information; wherein the multiple first feature information is used to characterize the feature information inherent in multiple single-round retrieved cigarette products for satisfying the preferences of target consumers; and the multiple second feature information is used to characterize the cigarette preference feature information of the target consumers retrieved through multiple single-round retrievals.
[0171] The feature similarity determination module 903 is used to respectively determine the similarities between the multiple first feature information and the multiple second feature information to obtain multiple feature similarities.
[0172] The product recommendation module 904 is used to recommend products to target consumers based on multiple feature similarities.
[0173] In some optional implementations, the cigarette context representation information determination module 901 includes:
[0174] The screening unit is used to screen the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette products corresponding to the consumer preference information of the current search round; wherein the consumer preference information represents the target consumer's preference information for cigarette products.
[0175] The candidate cigarette pool updating unit is used to update the candidate cigarette pool according to multiple cigarette products to obtain a target candidate cigarette pool; wherein the candidate cigarette pool represents a container pool for storing cigarette products retrieved in each round.
[0176] The cigarette context representation information determination unit is used to perform multiple rounds of feature retrieval on the target candidate cigarette pool to obtain multiple cigarette context representation information.
[0177] In some optional implementations, the feature extraction module 902 includes:
[0178] The first feature information determination unit is used to extract cigarette features from multiple cigarette context representation information based on a cigarette product feature extraction algorithm to obtain multiple first feature information.
[0179] The second characteristic information determination unit is used to extract consumer characteristics from the plurality of first characteristic information based on a cigarette consumer characteristic extraction algorithm to obtain a plurality of second characteristic information.
[0180] In some optional implementations, the first feature information determining unit includes:
[0181] The encoding subunit is used to encode multiple cigarette context representation information to obtain multiple encoding results.
[0182] The dimension conversion subunit is used to perform dimension conversion on multiple encoding results to obtain multiple dimension conversion results.
[0183] The spectrum modulation subunit is used to perform spectrum modulation on multiple dimensional conversion results to obtain multiple spectrum modulation results.
[0184] The regularization subunit is used to perform regularization processing on multiple spectrum modulation results to obtain multiple regularization processing results.
[0185] The cigarette feature extraction subunit is used to extract cigarette features from the acquired cigarette purchase sequence to obtain a cigarette extraction result.
[0186] The first feature information determination subunit is used to fuse multiple regularization processing results and cigarette extraction results to obtain multiple first feature information.
[0187] In some optional implementations, the second feature information determining unit includes:
[0188] The first extraction result determination subunit is used to extract consumer preference features from multiple first feature information based on a multi-scale attention mechanism to obtain multiple first extraction results.
[0189] The second extraction result determination subunit is used to extract consumer preference features from the multiple first extraction results to obtain multiple second extraction results.
[0190] The result integration subunit is used to integrate the multiple first extraction results and the multiple second extraction results to obtain multiple second feature information.
[0191] In some optional implementations, the feature similarity determination module 903 includes:
[0192] The feature vector acquisition unit is used to acquire a plurality of first feature vectors from a plurality of first feature information; and acquire a plurality of second feature vectors from a plurality of second feature information.
[0193] The feature similarity determination unit is used to obtain multiple feature similarities according to the inner products between the multiple first feature vectors and the multiple second feature vectors.
[0194] In some optional implementations, the product recommendation module 904 includes:
[0195] The target feature similarity selection unit is used to select a plurality of target feature similarities that are greater than or equal to a preset value from a plurality of feature similarities.
[0196] The product recommendation unit is used to recommend multiple products corresponding to multiple target feature similarities to target consumers.
[0197] In some optional implementations, the product recommendation device further includes:
[0198] The first prediction result determination module is used to predict the first cigarette preference feature of the target consumer based on the first encoder and multiple cigarette context representation information to obtain a first prediction result; wherein the first encoder indicates that the prediction of the previous item is performed based on the future interaction history of the target consumer; and the first cigarette preference feature indicates the cigarette preference feature of the previous item.
[0199] The second prediction result determination module is used to predict the second cigarette preference feature of the target consumer based on the second encoder and multiple cigarette context representation information to obtain a second prediction result; wherein the second encoder indicates that the prediction of the next item is performed based on the past interaction history of the target consumer; and the second cigarette preference feature indicates the cigarette preference feature of the next item.
[0200] The ranking loss information determination module is used to generate ranking loss information based on the first prediction result and the second prediction result; wherein the ranking loss information represents information used to optimize the ranking ability of product recommendations.
[0201] A label classification module is used to classify multiple cigarette context representation information to obtain predicted cigarette labels and real cigarette labels;
[0202] The cross entropy loss information determination module is used to determine the cross entropy loss information based on the predicted cigarette label and the real cigarette label; wherein the cross entropy loss information represents information used to optimize the classification task of consumer characteristics and cigarette characteristics.
[0203] The target loss information determination module is used to integrate the ranking loss information and the cross entropy loss information to obtain the target loss information.
[0204] The product adjustment module is used to adjust the recommended products according to the target loss information.
[0205] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0206] The recommended device of the product in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0207] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A product recommendation method, characterized in that: The method comprises: Perform multiple rounds of feature retrieval on the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette context representation information; wherein the multiple cigarette context representation information is used to represent the cigarette feature information and the target consumer feature information obtained through multiple single-round feature retrievals; Perform cigarette feature extraction on the multiple cigarette context representation information to obtain multiple first feature information, and perform consumer feature extraction on the multiple first feature information to obtain multiple second feature information; wherein the multiple first feature information is used to characterize the feature information inherent in multiple single-round retrieved cigarette commodities for satisfying the preferences of the target consumers; the multiple second feature information is used to characterize the cigarette preference feature information of the target consumers through multiple single-round retrievals; Determine similarities between the plurality of first feature information and the plurality of second feature information respectively to obtain a plurality of feature similarities; Recommend products to the target consumers based on the multiple feature similarities.
2. The method according to claim 1, characterized in that The acquired historical cigarette purchase information of the target consumer is subjected to multiple rounds of feature retrieval to obtain multiple cigarette context representation information, including: Screening the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette products corresponding to the consumer preference information of the current search round; wherein the consumer preference information represents the target consumer's preference information for cigarette products; The candidate cigarette pool is updated according to the multiple cigarette products to obtain a target candidate cigarette pool; wherein the candidate cigarette pool represents a container pool for storing cigarette products retrieved in each round; Multiple rounds of feature retrieval are performed on the target candidate cigarette pool to obtain the multiple cigarette context representation information.
3. The method according to claim 1 or 2, characterized in that: The step of extracting cigarette features from the plurality of cigarette context representation information to obtain a plurality of first feature information, and extracting consumer features from the plurality of first feature information to obtain a plurality of second feature information includes: Extract cigarette features from the plurality of cigarette context representation information based on a cigarette commodity feature extraction algorithm to obtain the plurality of first feature information; The plurality of first feature information are subjected to consumer feature extraction based on a cigarette consumer feature extraction algorithm to obtain the plurality of second feature information.
4. The method according to claim 3, characterized in that The step of extracting cigarette features from the plurality of cigarette context representation information based on a cigarette commodity feature extraction algorithm to obtain the plurality of first feature information includes: Encoding the plurality of cigarette context representation information to obtain a plurality of encoding results; Performing dimension conversion on the multiple encoding results to obtain multiple dimension conversion results; Performing spectrum modulation on the multiple dimensional conversion results to obtain multiple spectrum modulation results; Performing regularization processing on the multiple spectrum modulation results to obtain multiple regularization processing results; Perform cigarette feature extraction on the acquired cigarette purchase sequence to obtain a cigarette extraction result; The plurality of regularization processing results and the cigarette extraction result are fused to obtain the plurality of first feature information.
5. The method according to claim 3, characterized in that: The extracting consumer characteristics of the plurality of first characteristic information based on the cigarette consumer characteristic extraction algorithm to obtain the plurality of second characteristic information includes: Based on a multi-scale attention mechanism, the plurality of first feature information are screened to obtain a plurality of first extraction results; Performing consumer preference feature extraction on the plurality of first extraction results to obtain a plurality of second extraction results; The plurality of first extraction results and the plurality of second extraction results are integrated to obtain the plurality of second feature information.
6. The method according to claim 1 or 2, characterized in that: The respectively determining similarities between the plurality of first feature information and the plurality of second feature information to obtain a plurality of feature similarities comprises: Acquire a plurality of first feature vectors from the plurality of first feature information; acquire a plurality of second feature vectors from the plurality of second feature information; The plurality of feature similarities are obtained according to inner products between the plurality of first feature vectors and the plurality of second feature vectors.
7. The method according to claim 1 or 2, characterized in that: The recommending products to the target consumer according to the plurality of feature similarities comprises: Among the multiple feature similarities, select multiple target feature similarities that are greater than or equal to a preset value; Recommending multiple products corresponding to the multiple target feature similarities to the target consumers.
8. The method according to claim 1 or 2, characterized in that: After recommending products to the target consumer based on the multiple feature similarities, the method further includes: Based on the first encoder, the first cigarette preference feature of the target consumer is predicted according to the multiple cigarette context representation information to obtain a first prediction result; wherein the first encoder indicates that the prediction of the previous item is performed based on the future interaction history of the target consumer; and the first cigarette preference feature indicates the cigarette preference feature of the previous item; Based on the second encoder, the second cigarette preference feature of the target consumer is predicted according to the multiple cigarette context representation information to obtain a second prediction result; wherein the second encoder indicates that the prediction of the next item is performed based on the past interaction history of the target consumer; and the second cigarette preference feature indicates the cigarette preference feature of the next item; Generating ranking loss information according to the first prediction result and the second prediction result; wherein the ranking loss information represents information for optimizing the ranking ability of the recommendation for the product; Classifying the plurality of cigarette context representation information to obtain predicted cigarette labels and real cigarette labels; Determining cross entropy loss information according to the predicted cigarette label and the real cigarette label; wherein the cross entropy loss information represents information for optimizing the classification task of consumer characteristics and cigarette characteristics; Integrate the ranking loss information and the cross entropy loss information to obtain target loss information; The recommended products are adjusted according to the target loss information.
9. A product recommendation device, characterized in that: The device comprises: A cigarette context representation information determination module is used to perform multiple rounds of feature retrieval on the acquired historical cigarette purchase information of the target consumer to obtain multiple cigarette context representation information; wherein the multiple cigarette context representation information is used to represent the cigarette feature information and target consumer feature information obtained through multiple single-round feature retrievals; A feature extraction module, used to perform cigarette feature extraction on the multiple cigarette context representation information to obtain multiple first feature information, and perform consumer feature extraction on the multiple first feature information to obtain multiple second feature information; wherein the multiple first feature information is used to characterize the feature information inherent in multiple single-round retrieved cigarette commodities for satisfying the preferences of the target consumers; the multiple second feature information is used to characterize the cigarette preference feature information of the target consumers through multiple single-round retrievals; A feature similarity determination module, used to respectively determine the similarities between the plurality of first feature information and the plurality of second feature information to obtain a plurality of feature similarities; The product recommendation module is used to recommend products to the target consumers based on the multiple feature similarities.