Flower commodity recommendation method and system based on user data

By constructing a browsing path dataset of flower product pages, extracting high-retention image area features and text label features, and combining them with the Transformer model to optimize user preferences, the problems of cold start and inaccurate recommendations in the flower recommendation system were solved, and efficient matching of personalized recommendations was achieved.

CN120807100APending Publication Date: 2025-10-17GUANGZHOU HUATUOBANG INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510961061.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-12
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing flower product recommendation systems have difficulty identifying users' focus on local image areas of products, resulting in recommendation results that are difficult to accurately meet users' aesthetic or logistics needs. In addition, traditional methods have prominent cold start problems in flower e-commerce and the recommendation effect is unstable.

Method used

By collecting users' browsing behavior data on flower product pages, building a browsing path dataset, locating high-retention image areas, extracting image features and text label features, generating a fused feature vector, and utilizing the user preference model of the Transformer architecture to optimize sample feature distribution, automatically extract user preferences, and perform recommendation matching.

Benefits of technology

It achieves precise adaptation of flower product recommendations, improves recommendation accuracy and efficiency, can identify user visual preferences and logistics needs, and solves the cold start problem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807100A_ABST
    Figure CN120807100A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of flower commodity recommendation, in particular to a flower commodity recommendation method and system based on user data, and the method comprises the steps: collecting the behavior data of sliding, staying, clicking and the like of a user on a flower commodity page, constructing a browsing path data set, positioning a high-staying region in an image, and extracting the image features of bud intensity, color distribution and the like. And combining the commodity description text to extract label information, and fusing the label information with the image features to generate fusion feature vectors of the flower commodities. And marking the fusion feature vector of the flower commodity which is not purchased after the user browses as a negative sample, marking the fusion feature vector of the flower commodity which is purchased as a positive sample, optimizing sample features in combination with a jump-out behavior, inputting a user preference model, extracting potential interest features of the user, and outputting a user preference vector. The system carries out matching and sorting on the basis of the preference vector and the to-be-recommended commodities, realizes accurate recommendation of user aesthetic and logistics preferences, and improves the recommendation accuracy and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of flower commodity recommendation, and in particular to a flower commodity recommendation method and system based on user data. BACKGROUND

[0002] Flower commodities are one of the important categories of online retail. Compared with traditional commodities, flower commodities have strong perceptual attributes, and users rely more on visual perception, delivery timeliness and maintenance feasibility during the purchase decision-making process. Existing recommendation systems are mainly based on collaborative filtering, content matching or rule sorting strategies. The collaborative filtering method relies on the coincidence of user historical behavior, but in the flower e-commerce, user purchase behavior has the characteristics of low frequency and high perceptual, which leads to the prominent cold start problem and unstable recommendation effect. Although the content-based recommendation method can use product description and image information for similarity matching, it often ignores the interest characteristics implied in the user's page staying, interaction and jumping out behaviors.

[0003] In addition, traditional recommendation strategies are difficult to identify the user's focus on the local image area of the commodity, which leads to the difficulty of accurately fitting the user's aesthetic or logistics demand in the recommended result. Especially in the flower category, users pay more attention to the details such as bud color, density, delivery timeliness, and whether it is easy to grow, and relying solely on the global features or static text tags of the commodity cannot effectively depict user preferences, thereby leading to low recommendation accuracy and low recommendation efficiency. SUMMARY

[0004] To solve the above problems, the present application provides a flower commodity recommendation method and system based on user data.

[0005] To achieve the above purpose, the technical scheme adopted by the present application is: A flower commodity recommendation method based on user data, comprising the following steps: S1, based on the user's browsing behavior in the flower commodity page, collecting user behavior data, and constructing a user browsing path data set according to the user behavior data; S2, based on the browsing path data set, positioning the high-stay image area of the user in each flower commodity page, and performing image feature extraction processing on the high-stay image area to obtain a flower feature vector containing several flower feature dimensions; S3, based on the flower commodity description text in the high-stay image area, extracting the cultivability, survival days, and delivery timeliness, constructing a label feature vector, and splicing and fusing the label feature vector and the flower feature vector to generate a fusion feature vector corresponding to the flower commodity; S4, mark the flower commodity fusion feature vector browsed by the user but not purchased as a negative sample, mark the flower commodity fusion feature vector purchased after browsing as a positive sample, obtain a positive and negative sample set, and input the pre-trained user preference model for processing to output a user preference vector; S5, based on the user preference vector and the flower commodity to be recommended, calculate the matching degree to obtain a recommendation matching degree ranking result and perform flower commodity recommendation.

[0006] Further, the user behavior data includes page dwell time, sliding track, click position, shopping cart addition state and purchase result.

[0007] Further, the S1 includes: Based on the user entering the flower commodity page to leaving the page or completing the purchase process, the start and end time of the user staying on each flower commodity page is recorded in real time to obtain page dwell time data; Based on the screen interaction track of the user on the flower commodity page, the path of the user sliding the screen and the coordinates of the screen click are collected to obtain user sliding track data and click position data; Monitor the add-to-cart action triggered by the user during browsing and whether the payment purchase action is completed, and record it as the add-to-cart state and purchase result; Integrate the page dwell time data, user sliding track data, click position data, add-to-cart state and purchase result to generate a user browsing path data set.

[0008] Further, the S2 includes the following steps: Based on the user page dwell time data recorded in the browsing path data set, determine the image area with the longest dwell time in each flower commodity page, and obtain high dwell image area position data; Based on the high dwell image area position data, pre-process the flower commodity image, including region interception and normalization processing, to generate standard format image area data; Input the standard format image area data into the pre-trained image feature extraction network for feature extraction processing to output a flower feature vector including flower bud density, color distribution, flower size, flowering stage, branch length and thickness.

[0009] Further, the image feature extraction network is trained by the following steps: Based on the flower commodity image sample library, label the flower bud density, color distribution, flower size, flowering stage, branch length and thickness feature dimensions corresponding to each image area, and construct an image feature training data set with supervised labels; Input the image region data in the image feature training data set into a convolutional neural network for spatial feature extraction to obtain a spatial feature vector of the image region; Input the spatial feature vector into a fully connected layer, map it to a corresponding flower feature dimension, and output a flower feature prediction label; Based on the error between the flower feature prediction label and the supervised label, a loss function is constructed, and the model parameters are optimized using the gradient descent algorithm to complete the training of the image feature extraction network.

[0010] Further, the S3 comprises the following steps: Based on the flower commodity description text in the high-stay image region, the text analysis model extracts the survivability, survival days, and delivery timeliness label information to obtain structured label data; Feature encoding processing is performed on the structured label data to obtain a label feature vector; The label feature vector and the flower feature vector are spliced in head-to-tail order to obtain a fusion feature vector.

[0011] Further, the S4 comprises the following steps: S41, based on the join shopping cart state and purchase result recorded in the browsing path data set, filter the flower commodities that the user browses but does not purchase, mark the corresponding fusion feature vector as a negative sample, filter the flower commodities that the user browses and completes purchase, mark the corresponding fusion feature vector as a positive sample, and construct an initial positive and negative sample set; S42, based on the initial positive and negative sample set, extract the user page exit position data corresponding to the negative sample, and perform statistical analysis on the exit position data to determine the sensitive feature dimension and its feature threshold value that cause the user to exit; S43, based on the sensitive feature dimension and feature threshold value, feature weighting adjustment is performed on the negative sample fusion feature vector to obtain a weighted negative sample fusion feature vector, and the weighted negative sample fusion feature vector is combined with the positive sample fusion feature vector to form a weighted positive and negative sample set; S44, based on the positive and negative sample set, input the pre-trained user preference model, extract the initial feature representation of the user preference through feature comparison learning, and perform feature mapping and normalization processing to output a user preference vector.

[0012] Further, the user preference model is a Transformer architecture.

[0013] Further, the user preference model is trained by the following steps: Based on the marked positive and negative samples in the browsing history of a plurality of users, a training sample set is constructed, and the fusion feature vector of each flower commodity and its positive and negative labels are combined to form a supervised sample pair; The fusion feature vector is input as an input sequence into a Transformer network comprising several layers of encoders, the sequence information of the fusion feature sequence is processed based on position encoding embedding, and the preference expression of the user for each feature dimension is extracted through a self-attention mechanism to obtain a user interest feature representation; Based on the user interest feature representation, linear mapping and normalization processing are performed to generate a corresponding user preference vector; Based on the cross-entropy loss between the user preference vector and the corresponding supervision label, the model error is calculated, and the parameters in the Transformer structure are optimized through back propagation and gradient descent to complete the training of the user preference model.

[0014] A flower commodity recommendation system based on user data is applied to any one of the flower commodity recommendation methods based on user data, comprising: A user data acquisition module is configured to acquire user behavior data based on the user's browsing behavior in the flower commodity page, and construct a user browsing path data set according to the behavior data; A flower image analysis module is configured to locate the high-stay image area of the user in each flower commodity page based on the browsing path data set, and perform image feature extraction processing on the high-stay image area to obtain a flower feature vector comprising several flower feature dimensions; A feature fusion module is configured to extract the label feature vector based on the flower commodity description text in the high-stay image area, and to splice and fuse the label feature vector and the flower feature vector to generate a fusion feature vector of the corresponding flower commodity; A preference prediction module is configured to mark the flower commodity fusion feature vector that the user browses but does not purchase as a negative sample, mark the flower commodity fusion feature vector that the user browses and purchases as a positive sample, obtain a positive and negative sample set, and input the pre-trained user preference model for processing to output a user preference vector; A flower commodity recommendation module is configured to calculate the matching degree between the user preference vector and the fusion feature vector of the flower commodity to be recommended, obtain a recommendation matching degree ranking result, and perform flower commodity recommendation.

[0015] The application has the beneficial effects that: the application firstly constructs a browsing path data set through the user's sliding, staying, clicking and other behaviors on the commodity page, and then identifies the high-stay area of the user in the image, and mines the visual preferences of the user such as the bud density and color distribution through the image feature extraction network; meanwhile, the structured label information such as the livability, survival days and delivery timeliness is extracted from the commodity description text, and is fused with the image features to form a unified commodity expression. Then, the commodities browsed by the user but not purchased are marked as negative samples, and the commodities purchased after browsing are marked as positive samples, the jumping behavior sensitive points in the browsing path are combined, the sample feature distribution is optimized, and the user preference model based on the Transformer architecture is input, the potential attention preference of the user to the multi-dimensional commodity features is automatically extracted, and the user preference vector used for recommendation matching is generated. Finally, the system can match the preference vector with the to-be-recommended commodities based on the matching degree, realize the accurate adaptation of the recommendation result to the user's aesthetic and logistics preference, and effectively improve the recommendation accuracy and efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0016] Fig. 1 FIG. 1 is a step flow chart of a flower commodity recommendation method based on user data in the application.

[0017] Fig. 2 FIG. 2 is a step flow chart of step S4 in the application. DETAILED DESCRIPTION

[0018] Referring to FIG. 1, Figs. 1-2 The application relates to a flower commodity recommendation method based on user data, which comprises the following steps: S1, collecting user behavior data based on the browsing behavior of the user in the flower commodity page, and constructing a browsing path data set of the user according to the user behavior data; S2, positioning the high-stay image area of the user in each flower commodity page based on the browsing path data set, and performing image feature extraction processing on the high-stay image area to obtain a flower feature vector containing several flower feature dimensions; S3, extracting the livability, survival days and delivery timeliness based on the flower commodity description text in the high-stay image area, constructing a label feature vector, and splicing and fusing the label feature vector and the flower feature vector to generate a fusion feature vector corresponding to the flower commodity; S4, marking the flower commodity fusion feature vector browsed by the user but not purchased as a negative sample, marking the flower commodity fusion feature vector browsed by the user and then purchased as a positive sample, obtaining a positive and negative sample set, and inputting a pre-trained user preference model for processing to output a user preference vector; S5, based on the user preference vector and the to-be-recommended flower product, a matching degree calculation is performed to obtain a recommendation matching degree ranking result and perform flower product recommendation.

[0019] It should be noted that the flower product includes green plants, potted plants and flowers. First, based on the user's browsing behavior in the flower product page, data is collected, for example, a user enters the butterfly orchid product page, slides to a certain flower bud close-up image for a long time, and clicks to view the delivery and maintenance instructions. The system integrates the dwell time, sliding track and click position into a browsing path data set to locate the high dwell image area. Subsequently, the image feature extraction module analyzes the area and extracts features such as flower bud density, color distribution, branch thickness, flowering state, etc. to form a flower feature vector. At the same time, label information such as survivability, survival days, and delivery timeliness is extracted from the description text of the product in which the image area is located, and is encoded into a label feature vector. After splicing with the image feature vector, a fusion feature vector is generated, which is a unified expression of the product. When the user completes the order of the long-lasting flower without purchasing the butterfly orchid, the system marks the fusion feature of the butterfly orchid as a negative sample and the long-lasting flower as a positive sample. By collecting a large number of similar behavior samples and combining with behavior differences such as jump-out positions, the sample feature weight distribution is optimized to construct a training set suitable for user preference modeling. The training set is input into the pre-trained Transformer model, and the model identifies the user's preference for image features and text labels through the attention mechanism in the encoding layer, and outputs a stable user preference vector. For example, it is identified that the user prefers green plants or flowering flowers with sparse flower buds, mild colors, and timely delivery. Finally, the user preference vector and the feature vector of the to-be-recommended flower product are executed for matching degree calculation to generate a recommendation ranking result and push it to the user interface. Specifically, the user preference vector is trained by the user's past browsing, clicking, jumping out and purchasing behavior, and comprehensively reflects the user's preferences in the flower product image visual features (such as flower bud density, color distribution, branch thickness) and text label features (such as survivability, survival days, and delivery timeliness). The to-be-recommended product, such as red palm, butterfly orchid, turtle back bamboo, and long-lasting flower, extracts only its static feature vector through a standardized image and text analysis process. This vector does not include user behavior factors and only expresses the inherent attributes of the product in each feature dimension. A matching degree algorithm such as cosine similarity is used to calculate the similarity between the user preference vector and the feature vector of each product to obtain a matching score. According to the matching score, the ranking is sorted, and a light exploration factor is introduced to enhance diversity control to construct a personalized recommendation result set. Finally, the ranking result is pushed to the user interface in real time.

[0020] Further, the user behavior data includes page dwell time, sliding track, click position, shopping cart addition state and purchase result.

[0021] In some embodiments, the user behavior data includes page dwell time, swipe trajectory, click position, shopping cart addition status, and purchase result. For example, when a user browses a Monstera deliciosa product page, the user has a long page dwell time, and there are multiple swipes and clicks on the specific leaf close-up area, and the user adds the product to the shopping cart but does not complete the payment before leaving the page.

[0022] Further, the S1 comprises: Based on the user entering the flower product page to leaving the page or completing the purchase process, the start and end time of the user's stay on each flower product page is recorded in real time to obtain page dwell time data; Based on the user's screen interaction trajectory on the flower product page, the path of the user's screen swipe and the coordinates of the screen click are collected to obtain user swipe trajectory data and click position data; Monitor the user's "add to shopping cart" action triggered during browsing and whether the payment purchase action is completed, and record it as the "add to shopping cart" status and the purchase result; Integrate the page dwell time data, user swipe trajectory data, click position data, add to shopping cart status, and purchase result to generate a user's browsing path dataset.

[0023] In some embodiments, when a user accesses a flower product page (such as African Violet or Monstera deliciosa), the behavior data recording module is started, the user's entering and leaving time in the page is captured in real time based on front-end burying technology, and a timestamp sequence is constructed. By calculating the difference between the leaving time and the entering time, the dwell time data of the page is obtained, which is used to quantify the user's attention duration to the product content. By listening to the user's touch swipe events and click events in the product page, the start and end coordinates and path change sequence of the swipe are recorded, and the swipe trajectory features are extracted; at the same time, the coordinate position of the click event is collected, and the page DOM structure is mapped to locate which area of the product image the click occurs. This process generates swipe trajectory data and click position data as core indicators reflecting changes in user visual attention. In addition to interaction behavior, the system also synchronously monitors whether the user performs key purchase actions such as "add to shopping cart" or "complete payment", generates binary labels by recording the operation status, and constitutes the "add to shopping cart" status and the purchase result label. If the user browses the Butterfly Orchid product and clicks "add to shopping cart" but does not complete the payment, the status combination is coded as <1, 0>. The data of the above-mentioned multiple behavior data channels is uniformly mapped to the user session ID, the system constructs the user's behavior path sequence on different flower product pages (such as Red Palm, Succulent), and arranges and archives them in chronological order. The finally generated browsing path dataset is expressed in a structured form.

[0024] Further, the S2 comprises the following steps: Based on the user page stay time data recorded in the browsing path data set, determine the image area with the longest browsing stay time of the user in each flower commodity page, and obtain high stay image area position data; Based on the high stay image area position data, pre-process the flower commodity image, including region interception and normalization processing, to generate standard format image area data; Input the standard format image area data into the pre-trained image feature extraction network for feature extraction processing, and output the flower feature vector including flower bud density, color distribution, flower size, flowering stage, branch length and thickness.

[0025] In some embodiments, first, the page stay time data and click position data in the browsing path data set generated in step S1 are used to construct a behavior heat map of the user in each flower commodity page. The heat map adopts a two-dimensional grid division strategy to divide the page image into several sub-regions, and by counting the cumulative stay time and interaction frequency of the user in each region, the comprehensive attention score of each region is calculated. The system selects the region with the highest attention score as the high stay image area of the page, and records its position information in the image coordinate system to form structured high stay image area position data. Subsequently, the image processing module performs region interception operation on the flower commodity image according to the position data, i.e. extracts the local region image with the highest user attention from the complete image. In the interception process, a bilinear interpolation resampling method is used for normalization processing to uniformly adjust all region images to a specified resolution (such as 128x128 pixels) to facilitate the subsequent model to form a unified scale perception expression for different commodity images. The standard format image area data generated after processing is stored in tensor form and the mapping relationship with the original commodity page is preserved. Next, the system inputs the standard image area into the pre-trained image feature extraction network. The network adopts a deep convolutional neural network structure, combining multi-layer convolution operation and batch normalization mechanism to extract the spatial semantic features of the region image. The output of the last layer of the network is a fixed dimension feature vector, which expresses through multiple channels: flower bud density (such as density estimation of the number of flower buds per unit area); color distribution (extracting dominant color and saturation features based on HSV space); flower size (regressing the size of the flower crown boundary box through target detection); flowering stage (classified into stages such as bud, half-open, full-bloom); branch length and thickness (extracting the length and average width of the main stem). For example, if the user clicks on the flower bud image area in the butterfly orchid commodity page and stays for a significant amount of time, the system intercepts the region image, and after model analysis, outputs an image feature vector such as "high flower bud density, dominant color tone purple red, currently in the half-open stage". This vector will serve as the basis for the fusion of text label features in subsequent steps.

[0026] Further, the image feature extraction network is trained by the following steps: Based on the flower commodity image sample library, the corresponding bud density, color distribution, flower size, flowering stage, and branch length and thickness feature dimensions of each image region are labeled to construct an image feature training dataset with supervised labels; The image region data in the image feature training dataset is input into a convolutional neural network for spatial feature extraction to obtain a spatial feature vector of the image region; The spatial feature vector is input into a fully connected layer and mapped to the corresponding flower feature dimensions to output flower feature prediction labels; Based on the error between the flower feature prediction labels and the supervised labels, a loss function is constructed, and the model parameters are optimized using a gradient descent algorithm to complete the training of the image feature extraction network.

[0027] Specifically, first, an image feature training dataset is constructed. The system selects a large number of representative product pictures from a flower product image sample library, covering green plants and flowering varieties such as butterfly orchids, tortoise-back bamboos, long-flowering plants, African violets, and succulents. For each image, the target area is labeled manually or semi-automatically on the image, and each area is assigned a corresponding six-dimensional feature label, including: bud density (such as the number of buds per unit area interval); color distribution (such as the main color category and color saturation interval); flower size (such as small, medium, and large); flowering stage (such as budding, half-open, and full bloom); branch length and thickness (estimated by pixel length and average width). The data format of each image region sample is <region image tensor, six-dimensional label vector>, forming a supervised training set. Next, each image region sample in the training set is input into a deep convolutional neural network (ResNet18 or EfficientNet-B0). The convolutional layer performs spatial perception operations on the input image through multiple convolution kernels, extracts texture, color, and structure information at different levels, and compresses redundant features through the pooling layer to output a fixed-dimensional spatial feature vector. To enhance the model's ability to express flower texture details, a multi-scale feature fusion structure is introduced to connect and fuse the intermediate outputs of different depth convolution layers, improving the ability to distinguish bud density and petal structure. In the classification regression module, the spatial feature vector is input into multiple parallel fully connected layer branches, each corresponding to a flower feature dimension, and outputting the predicted value of that dimension. For example, for the color distribution branch, a Softmax classifier is used to predict the main color category; for continuous features such as flower size and branch length, a Sigmoid-activated regression output is used. All output values are combined to form the model's predicted label. To achieve end-to-end training, the system constructs a loss function based on the model's output and supervised labels. The classification dimension uses a cross-entropy loss function, and the continuous numerical dimension uses a mean square error (MSE) loss function. The total loss is the weighted sum of the six-dimensional feature dimension losses, and the Adam optimizer is used for gradient descent iterative training, constantly updating the weight parameters of the convolutional and fully connected layers through the backpropagation mechanism. For example, for a butterfly orchid image labeled as "high-density buds, red dominant color, full bloom," the model should be able to accurately output feature prediction results such as "bud density = high, color = red, stage = full bloom," enabling effective semantic modeling of user-focused image regions in actual deployment.

[0028] Further, the S3 includes the following steps: Based on the flower product description text in the high-stay image area, the text analysis model extracts the cultivability, survival days, and delivery timeliness label information to obtain structured label data; Perform feature encoding processing on the structured label data to obtain a label feature vector; The label feature vector is spliced with the flower feature vector in a head-to-tail order to obtain a fusion feature vector.

[0029] In some embodiments, the commodity text information corresponding to the high-stay image area is first parsed. Taking typical varieties such as butterfly orchid, long-flowering plant, African violet, etc. as examples, the commodity description usually contains maintenance suggestions, flowering duration, suitable environment, delivery instructions and other contents. By introducing a pre-trained text parsing model (such as a classification extraction network based on BERT fine-tuning), the system can accurately identify and extract the following three core label dimensions from the text: livability: based on keyword matching and syntax analysis, it is determined whether the variety is suitable for beginners, the strength of environmental adaptability, etc. such as “easy to maintain”, “shade tolerant”, “beginner friendly”; survival days: extract the flowering length or survival cycle information from the description, such as “flowering for 30 days”, “high survival rate”; delivery timeliness: identify delivery-related commitments, such as “same-day delivery”, “next-day delivery”, “48-hour delivery”. The above label information is converted into a structured form after extraction, such as <livability=high, survival days=30, delivery timeliness=1 day>. In order to enable the label information to participate in model training together with the image feature vector, the structured label needs to be numerically encoded. Specifically: discrete labels (such as livability level, delivery speed) use one-hot encoding; continuous labels (such as survival days) perform normalization to map their value range to [0, 1]; all encoding results are arranged in a predetermined order to form a fixed-length label feature vector. Subsequently, the label feature vector is spliced with the flower image feature vector obtained in the previous step in a head-to-tail manner to construct a fusion feature vector in a unified dimension space, which represents the comprehensive features of the flower commodity in the visual and attribute dimensions. For example, when a user is browsing a page of a succulent plant, the image feature vector corresponding to the high-stay area is [0.72, 0.35, 0.61, 0.45, 0.29, 0.33], the extracted structured label is <easy to live, 60-day flowering, next-day delivery>, and the encoded label feature vector is [1, 0, 0, 0.86, 0.5]. The final splicing is a fusion feature vector [0.72,..., 0.33, 1, 0, 0, 0.86, 0.5].

[0030] Further, the S4 comprises the following steps: S41, based on the joining shopping cart state and purchase result recorded in the browsing path data set, screening the flower commodities browsed by the user but not purchased, marking the corresponding fusion feature vector as a negative sample, screening the flower commodities purchased after browsing by the user, marking the corresponding fusion feature vector as a positive sample, and constructing an initial positive and negative sample set; S42, based on the initial positive and negative sample set, extracting the user page jump position data corresponding to the negative sample, and statistically analyzing the jump position data to determine the sensitive feature dimension and its feature threshold value that cause the user to jump out; S43, based on the sensitive feature dimension and feature threshold value, the feature of the negative sample fusion feature vector is adjusted, and the weighted negative sample fusion feature vector is obtained, and the positive sample fusion feature vector is constructed into a weighted positive and negative sample set; S44, based on the positive and negative sample set, input the pre-trained user preference model, extract the initial feature representation of user preference through feature comparison learning, and perform feature mapping and normalization processing, output the user preference vector.

[0031] Specifically, for the user's browsing behavior in the flower commodity page, the system first screens the user's browsing but not purchased commodity and marks the corresponding fusion feature vector as negative sample, and the vector corresponding to the commodity purchased after browsing is marked as positive sample, to construct an initial positive and negative sample set. In step S42, the page jump position data corresponding to the negative sample is further extracted, and the feature distribution of the page where the user jumps out is statistically analyzed to identify the sensitive feature dimension that triggers the jump behavior. For example, when a large number of users jump out of a certain butterfly orchid commodity page, it is found that the "delivery timeliness" is 5 days and the "survival ability score" is medium-low, then the system determines that "delivery timeliness" and "survival ability" are the highly sensitive features in the current user's decision-making. Enter step S43, the system takes these sensitive dimensions as the key attention index, and performs enhancement operation on the corresponding features in the negative sample fusion feature vector, such as through feature weight amplification, numerical strengthening, etc., to strengthen the influence of these dimensions on the final model expression when constructing the preference vector. Such processing logic not only retains the hesitation information of the user who does not purchase, but also helps the model to identify the potential preference features that the user has paid attention to but has concerns. For example, for tortoise-back bamboo, if the jump-out commodities in the negative sample set generally have the feature of "branch thickness", while the positive sample set has "branch thickness", the system will take "branch thickness" as one of the user's interest dimensions, retain and strengthen its expression strength in preference reasoning, so that the finally output user preference vector more accurately reflects the real attention and subtle preference of the user to the feature attributes. Finally, in step S44, the above adjusted positive and negative sample features are input into the user preference model, the model aggregates the attention tendency of the user in different feature dimensions through the self-attention mechanism, and outputs the preference vector of the current user as the input basis for the recommendation system to match the recommended commodities. The preference vector is dynamically inferred during execution, without the need for retraining, and has real-time responsiveness and user behavior sensitivity, which is suitable for the recommendation task of typical green plant commodities such as butterfly orchid, succulent plant, long-flower, red palm, etc.

[0032] Further, the user preference model is a Transformer architecture.

[0033] It should be noted that the reason for using the Transformer architecture as the user preference model is its unique self-attention mechanism and global modeling capability. The features involved in the flower commodity include image features (such as bud density, color distribution, flowering stage, etc.) and text label features (such as survivability, survival time, and delivery timeliness, etc.). There is a nonlinear dependence and combination preference between these feature dimensions. Traditional feedforward neural networks or collaborative filtering methods are difficult to effectively capture the association between these dimensions. Transformer can model self-attention for the entire fused feature vector sequence, dynamically calculate the mutual influence between different feature dimensions, and accurately identify the explicit and implicit associations of user preferences. The purchase frequency of flower commodities is low, the user behavior is sparse, and the preference is personalized (for example, preference for a certain flower color or bud shape). Transformer is good at identifying global patterns in sparse samples and can mine the preference features exhibited by users in a small amount of behavior data. For example, a user may have only browsed three succulents, but Transformer can find that the user pays more attention to the "branch thickness + easy-to-grow" combination feature through an efficient attention allocation mechanism, and automatically establish a preference model. Compared with traditional sequence models such as RNN, Transformer does not rely on time sequence modeling and does not have the problem of long dependence information decay, and is suitable for processing non-linear jumps, irregular sequences, and other situations in user browsing behavior. For example, a user first browses a turtle back bamboo, then jumps to a red palm, and finally returns to a butterfly orchid. Transformer can still capture the distribution of its preference focus through the attention mechanism and generate a stable user preference vector.

[0034] Further, the user preference model is trained by the following steps: Based on the positive and negative samples marked in the browsing history of a plurality of users, a training sample set is constructed, and the fused feature vector of each flower commodity is combined with its positive and negative labels to form a supervised sample pair; The fused feature vector is input into a Transformer network containing a plurality of layers of encoders as an input sequence, the sequence information of the fused feature sequence is processed based on position encoding embedding, and the preference expression of the user for each feature dimension is extracted through a self-attention mechanism to obtain a user interest feature representation; Based on the user interest feature representation, linear mapping and normalization processing are performed to generate a corresponding user preference vector; Based on the cross-entropy loss between the user preference vector and the corresponding supervised label, the model error is calculated, and the parameters in the Transformer structure are optimized through back propagation and gradient descent to complete the training of the user preference model.

[0035] In some embodiments, a training sample set is first constructed based on historical behavior data. Each sample consists of a fused product feature vector and its corresponding positive and negative sample labels. Positive samples correspond to products that users have purchased after browsing, such as brightly colored, long-lived butterfly orchids. Negative samples are products that users have not purchased after browsing, such as short-stay long-flowering plants. This sample set covers different types of flower products such as green plants (e.g. turtle-back bamboo, succulents), potted plants (e.g. red palm, long-flowering plants) and fresh flowers (e.g. African violet). Subsequently, the system inputs the fused feature vector sequence into a Transformer network containing multiple layers of encoders. In order to preserve the position information of the sample in the sequence, the fused features are first added to the sequential information through a position encoding embedding module. Then, the model uses a self-attention mechanism to weight the different feature dimensions (such as color, bud density, easy-to-live activity, etc.) in the sequence, automatically mining the response weight of the user to a specific dimension, and extracting its explicit and implicit interest patterns. Then, the user interest feature representation output by the Transformer is input into a linear mapping layer, and feature normalization processing is performed to obtain a fixed-length and comparable user preference vector. This vector can reflect the user's overall preference for different combinations of flower features, such as the combination of "color + high livability + short time-to-live delivery". Finally, the training process takes the cross-entropy loss function as the optimization objective, calculates the classification error between the user preference vector and the true label. The system updates the weight parameters of each layer in the Transformer through the back propagation mechanism, and uses the gradient descent algorithm to minimize the overall loss value, thereby improving the generalization ability and matching accuracy of the model. After multiple iterations, the Transformer model can accurately generate a user preference vector reflecting individual aesthetics and functional needs, which can be used for matching and sorting in the subsequent recommendation stage.

[0036] The application also includes a flower product recommendation system based on user data, which is applied to any of the flower product recommendation methods based on user data described above, comprising: a user data acquisition module for acquiring user behavior data based on user browsing behavior in the flower product page, and constructing a user browsing path data set according to the behavior data; a flower image analysis module for locating the high-stay image area of the user in each flower product page based on the browsing path data set, and performing image feature extraction processing on the high-stay image area to obtain a flower feature vector containing several flower feature dimensions; a feature fusion module for extracting livability, survival time, and delivery timeliness based on the flower product description text in the high-stay image area, constructing a label feature vector, and splicing and fusing the label feature vector with the flower feature vector to generate a fused feature vector corresponding to the flower product; The preference prediction module is configured to mark the fusion feature vector of the flower commodity browsed by the user but not purchased as a negative sample, mark the fusion feature vector of the flower commodity purchased by the user after browsing as a positive sample, obtain a positive and negative sample set, and input the pre-trained user preference model for processing, and output a user preference vector; The flower commodity recommendation module is configured to perform matching degree calculation based on the user preference vector and the fusion feature vector of the flower commodity to be recommended, obtain a recommendation matching degree ranking result, and perform flower commodity recommendation.

[0037] The above embodiments only describe the preferred embodiments of the present application, and do not limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements to the technical solutions of the present application made by ordinary engineering technicians in the art shall fall within the protection scope determined by the claims of the present application.

Claims

1. A flower commodity recommendation method based on user data, characterized in that: The following steps are involved: S1. Based on the user's browsing behavior on the flower product page, collect user behavior data, and construct the user's browsing path dataset based on the user behavior data; S2. Based on the browsing path dataset, locate the image regions where users frequently stay on each flower product page, and perform image feature extraction on the image regions where users frequently stay, to obtain a flower feature vector containing several flower feature dimensions; S3. Extracting the viability, survival days, and delivery timeliness of the flower products from the high-retention image region based on the flower product description text, constructing a label feature vector, and concatenating and fusing the label feature vector with the flower feature vector to generate a fused feature vector for the corresponding flower product; S4. Mark the fused feature vectors of flower products that the user browsed but did not purchase as negative samples, and mark the fused feature vectors of flower products that the user browsed and purchased as positive samples, thereby obtaining a positive and negative sample set. The set is then input into a pre-trained user preference model for processing, and a user preference vector is output. S5. Calculate the matching degree between the user preference vector and the flower product to be recommended, obtain a recommendation matching degree ranking result, and perform flower product recommendation.

2. The flower commodity recommendation method based on user data according to claim 1, characterized in that: The user behavior data includes page dwell time, sliding trajectory, click location, add to cart status and purchase results.

3. The flower commodity recommendation method based on user data according to claim 2, characterized in that: Said S1 comprises: Based on the process from when users enter the flower product page to when they leave the page or complete the purchase, the start and end time of users' stay on each flower product page is recorded in real time to obtain page stay time data; Based on the user's screen interaction trajectory on the flower product page, the user's screen sliding path and the coordinates of the screen clicks are collected to obtain the user's sliding trajectory data and click location data; Monitor the user's actions of adding items to the shopping cart during browsing and whether the user completes the payment process, and record the status of adding items to the shopping cart and the purchase results; The page dwell time data, user sliding trajectory data, click location data, add to cart status and purchase results are integrated to generate a user browsing path data set.

4. The flower commodity recommendation method based on user data according to claim 1, characterized in that: The S2 comprises the following steps: Based on the user page dwell time data recorded in the browsing path data set, determining the image area where the user browses the longest dwell time on each flower product page, and obtaining high dwell time image area position data; Based on the high-stay image area position data, preprocessing is performed on the flower commodity image, including area interception and normalization processing, to generate image area data in a standard format; The image region data in the standard format is input into a pre-trained image feature extraction network for feature extraction processing, and a flower feature vector including bud density, color distribution, flower size, flowering stage, and branch length and thickness is output.

5. The flower commodity recommendation method based on user data according to claim 4, characterized in that: The image feature extraction network is trained by the following steps: Based on a sample library of flower product images, we annotate each image region with the corresponding bud density, color distribution, flower size, flowering stage, and branch length and thickness feature dimensions to construct a supervised labeled image feature training dataset. Inputting the image region data in the image feature training data set into a convolutional neural network to extract spatial features and obtain a spatial feature vector of the image region; Input the spatial feature vector into the fully connected layer, map it to the corresponding flower feature dimension, and output the flower feature prediction label; Based on the error between the flower feature prediction label and the supervision label, a loss function is constructed, and the gradient descent algorithm is used to optimize the model parameters to complete the training of the image feature extraction network.

6. The flower commodity recommendation method based on user data according to claim 1, characterized in that: The S3 includes the following steps: Based on the flower product description text in the high-retention image area, extracting label information such as viability, survival days, and delivery timeliness through a text parsing model to obtain structured label data; Performing feature encoding processing on the structured label data to obtain a label feature vector; The label feature vector and the flower feature vector are concatenated in head-to-tail order to obtain a fused feature vector.

7. The flower commodity recommendation method based on user data according to claim 1, characterized in that: The S4 comprises the following steps: S41. Based on the add-to-cart status and purchase results recorded in the browsing path dataset, filter the flower products that the user browsed but did not purchase, mark the corresponding fused feature vectors as negative samples, filter the flower products that the user browsed and purchased, mark the corresponding fused feature vectors as positive samples, and construct an initial positive and negative sample set. S42. Based on the initial positive and negative sample sets, extract the user page bounce location data corresponding to the negative samples, and perform statistical analysis on the bounce location data to determine the sensitive feature dimensions and feature thresholds that cause user page bounces; S43, based on the sensitive feature dimension and feature threshold, perform feature weighting adjustment on the negative sample fusion feature vector to obtain a weighted negative sample fusion feature vector, and form a weighted positive and negative sample set with the positive sample fusion feature vector; S44. Based on the positive and negative sample sets, a pre-trained user preference model is input, an initial feature representation of the user preference is extracted through feature contrast learning, and feature mapping and normalization processing are performed to output a user preference vector.

8. The flower commodity recommendation method based on user data according to claim 7, characterized in that: The user preference model is a Transformer architecture.

9. The method for recommending flower products based on user data according to claim 8, characterized in that: The user preference model is trained by the following steps: Based on the positive and negative samples marked in the browsing history of several users, a training sample set is constructed. The fused feature vector of each flower product is combined with its positive and negative labels to form a supervised sample pair. The fused feature vector is used as an input sequence and fed into a Transformer network containing several layers of encoders. The sequential information of the fused feature sequence is processed based on positional encoding embedding, and the user's preference expression for each feature dimension is extracted through a self-attention mechanism to obtain the user's interest feature representation; Based on the user interest feature representation, performing linear mapping and normalization processing to generate a corresponding user preference vector; Based on the cross entropy loss between the user preference vector and the corresponding supervision label, the model error is calculated, and the parameters in the Transformer structure are optimized through back propagation and gradient descent to complete the training of the user preference model.

10. A flower commodity recommendation system based on user data, applied to the flower commodity recommendation method based on user data according to any one of claims 1 to 9, characterized in that: include: A user data collection module is used to collect user behavior data based on the user's browsing behavior on the flower product page, and to construct a user browsing path data set based on the behavior data; a flower image parsing module for locating, based on the browsing path dataset, image regions where users frequently stay on each flower product page, and performing image feature extraction processing on the image regions where users frequently stay, to obtain a flower feature vector containing a plurality of flower feature dimensions; A feature fusion module is configured to extract the viability, survival days, and delivery timeliness of the flower products based on the flower product description text in the high-retention image area, construct a label feature vector, and concatenate and fuse the label feature vector with the flower feature vector to generate a fused feature vector for the corresponding flower product; The preference prediction module is used to mark the fused feature vectors of flower products that the user browsed but did not purchase as negative samples, and mark the fused feature vectors of flower products that the user browsed and purchased as positive samples. The resulting positive and negative sample sets are input into the pre-trained user preference model for processing and output the user preference vector. The flower product recommendation module is used to calculate the matching degree based on the user preference vector and the fusion feature vector of the flower product to be recommended, obtain the recommendation matching degree ranking result and perform flower product recommendation.

Citation Information

Patent Citations

  • Personalized garment recommending method based on garment image and label text double-mode content analysis

    CN107679960A

  • Commodity recommendation method and system

    CN110428295A

  • Commodity recommendation method, system and device and readable medium

    CN115860870A

  • Multi-modal commodity recommendation system based on comparative learning and model reinforcement learning

    CN117350812A

  • E-commerce platform personalized clothing recommendation method and system based on artificial intelligence

    CN118628214A