Agricultural product recommendation method and system based on user attention degree
By constructing user attention feature vectors and performing clustering, the problem of not considering changes in user attention in existing technologies is solved, and more accurate agricultural product recommendations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 中国农垦经济发展中心(农业农村部南亚热带作物中心)
- Filing Date
- 2025-06-25
- Publication Date
- 2026-06-12
AI Technical Summary
Existing e-commerce platforms for agricultural products fail to effectively consider changes in users' attention to agricultural products during use, resulting in low recommendation accuracy.
By acquiring behavioral data from target users and other users, a user attention feature vector is constructed, users are clustered, target clusters are selected, and agricultural products are recommended based on these clusters.
It improves the accuracy of agricultural product recommendations, adapts to changes in user interests, uncovers users' true interests, and enhances the accuracy of recommendations.
Smart Images

Figure CN120746674B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of big data analysis technology, specifically relating to a method and system for recommending agricultural products based on user attention. Background Technology
[0002] In recent years, my country's economy and science and technology have developed and improved rapidly, accumulating abundant material conditions and technological foundations for the realization of agricultural modernization. At the same time, driven by the new generation of information technologies such as big data, the Internet of Things, cloud computing, and artificial intelligence, "Internet + agriculture" has gradually been applied to people's daily lives and is becoming a new driving force for the transformation and upgrading of my country's agricultural industry.
[0003] Currently, with the increasing power of the internet, competition in the agricultural e-commerce market is becoming increasingly fierce. How to help users find suitable products from a large amount of product information has become a research hotspot in agricultural product marketing. In practice, most agricultural e-commerce platforms use collaborative filtering algorithms to recommend agricultural products to users. However, existing recommendation methods usually only focus on user ratings (i.e., user behavior towards agricultural products) and do not consider changes in user attention to agricultural products during platform use (i.e., changes in user interest in agricultural products). Therefore, the accuracy of agricultural product recommendations is not high, and it is impossible to recommend agricultural products that users prefer. Based on this, how to provide a method for recommending agricultural products with high accuracy has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for recommending agricultural products based on user attention, in order to solve the problem that the existing technology does not take into account the changes in users' attention to agricultural products during use, resulting in low recommendation accuracy.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] Firstly, a method for recommending agricultural products based on user attention is provided, including:
[0007] Acquire a first user behavior dataset of the target user on a specified platform and a second user behavior dataset of several specified users on the specified platform. The first user behavior dataset contains data on the target user's operational behavior on various agricultural products on the specified platform, and the several specified users are all users on the specified platform except for the target user.
[0008] Based on the first user behavior dataset, the first level of attention of the target user to each agricultural product within a specified time period is determined, and based on the second user behavior dataset of each specified user, the second level of attention of each specified user to each agricultural product within a specified time period is determined, wherein the specified time period is the behavior time period corresponding to the first user behavior dataset.
[0009] Using the first user behavior dataset and the target user's first attention to each agricultural product, a first behavior feature vector of the target user is constructed; and using the second user behavior dataset of each specified user and the second attention of each specified user to each agricultural product, a second behavior feature vector of each specified user is constructed.
[0010] Based on the first behavioral feature vector and each of the second behavioral feature vectors, clustering is performed on the target user and each specified user to obtain multiple user clusters;
[0011] Target clusters are selected from multiple user clusters, and agricultural products that each user in the target cluster is interested in are obtained, so as to form a set of agricultural products to be recommended using the agricultural products that each user in the target cluster is interested in. The target cluster is a user cluster that contains the target user among the multiple user clusters.
[0012] Based on the set of agricultural products to be recommended, agricultural products are recommended to the target user.
[0013] Based on the above-disclosed content, this invention first obtains a first user behavior dataset of the target user on a specified platform, and a second user behavior dataset of each specified user (i.e., users on the specified platform excluding the target user); then, based on the first user behavior dataset, it determines the target user's first level of attention to each agricultural product within a specified time period, and based on the second user behavior dataset of each specified user, it determines the second level of attention each specified user has to each agricultural product; thus, this step is equivalent to quantifying the user's interest preference for different agricultural products based on user behavior data (i.e., the greater the interest in a certain agricultural product, the higher the level of attention); subsequently, this interest preference can be... The process of recommending agricultural products involves several steps. First, based on the target user and other designated users' attention to each agricultural product and their corresponding behavioral data, behavioral feature vectors are constructed. Then, based on these behavioral feature vectors, user clustering is performed to identify multiple users belonging to the same category as the target user. These clustered users are then grouped into user clusters. This process effectively filters out users with similar preferences to the target user. Finally, a set of agricultural products to be recommended is created using the agricultural products followed by each user in this user cluster. Based on this set, agricultural product recommendations can be made to the target user.
[0014] Through the above design, this invention incorporates user attention to agricultural products into the recommendation process and utilizes attention and user behavior data to construct a behavioral feature vector that reflects user preferences. Then, based on the user behavioral feature vector, user clusters are obtained. Finally, agricultural product recommendations are made based on the agricultural products followed by each user in the user cluster. Based on this, this invention uses attention to reflect changes in user interest in agricultural products and incorporates this into the recommendation process. Therefore, compared to traditional technologies, this invention can adapt to changes in user interests and better uncover user interests, thus improving the accuracy of recommendations and making it highly suitable for large-scale application and promotion.
[0015] In one possible design, any operation behavior data in the first user behavior dataset includes: operation start time and operation end time;
[0016] Based on the first user behavior dataset, the primary attention level of target users towards each agricultural product within a specified time period is determined, including:
[0017] For any agricultural product, the target user's operation behavior data on the agricultural product is filtered from the first user behavior dataset, and the total operation time, number of operations, earliest operation start time and latest operation start time of the target user on the agricultural product are determined using the filtered operation behavior data.
[0018] Based on the earliest operation start time and the latest operation start time, the target user's first initial attention level to any agricultural product based on the access time is calculated;
[0019] Based on the total operation time and the number of operations, the target user's second initial attention level to any agricultural product based on the operation frequency is calculated;
[0020] Using the first initial attention level and the second initial attention level, the first attention level of the target user to any agricultural product within a specified time period is determined.
[0021] In one possible design, based on the earliest operation start time and the latest operation start time, the target user's initial attention level to any agricultural product based on access time is calculated, including:
[0022] Obtain the time interval of the target user's use of the specified platform;
[0023] Based on the earliest start time and the latest start time, the time interval for the target user's attention to any agricultural product is determined;
[0024] Based on the usage time interval and the attention time interval, the first initial attention level is calculated according to the following formula (1);
[0025]
[0026] In the above formula (1), g1 represents the first initial attention level, t1 represents the attention time interval, t2 represents the usage time interval, and γ represents the weight coefficient.
[0027] In one possible design, based on the total operation duration and the number of operations, a second initial level of attention from the target user to any agricultural product based on operation frequency is calculated, including:
[0028] Using the first user behavior dataset, the total number of times the target user paid attention to agricultural products and the total duration of their attention were determined.
[0029] Based on the total operation time, the duration of the target user's attention to any agricultural product is determined, and based on the number of operations, the number of times the target user's attention to any agricultural product is determined.
[0030] Based on the total number of times the agricultural product is viewed, the total duration of the agricultural product is viewed, the duration of the view and the number of views, the second initial level of attention is calculated according to the following formula (2);
[0031]
[0032] In the above formula (2), g2 represents the second initial attention level, c1 represents the number of attentions, c2 represents the total number of attentions to the agricultural product, t3 represents the attention duration, and t4 represents the total attention duration to the agricultural product;
[0033] Accordingly, determining the target user's first level of attention to any agricultural product within a specified time period using the first initial attention level and the second initial attention level includes:
[0034] The product of the first initial attention and the second initial attention is taken as the first attention of the target user to any agricultural product within the specified time period.
[0035] In one possible design, any operation behavior data in the first user behavior dataset includes operation start time, operation end time, operation behavior type, and agricultural product name, wherein the operation behavior type includes browsing behavior and evaluation behavior;
[0036] Specifically, by utilizing the first user behavior dataset and the target user's initial attention level to each agricultural product, a first behavioral feature vector of the target user is constructed, including:
[0037] For any agricultural product, filter out the target user's operation behavior data on the agricultural product from the first user behavior dataset, and determine whether there is any evaluation behavior in the filtered operation behavior data;
[0038] If it is determined that there is no evaluation behavior in the filtered operation behavior data, then it is determined whether there is browsing behavior in the filtered operation behavior data.
[0039] If it is determined that browsing behavior exists in the filtered operation behavior data, the operation duration of each target data is determined based on the operation start time and operation end time in each target data in the target dataset. The target data in the target dataset refers to the operation behavior data in the filtered operation behavior data that contains browsing behavior.
[0040] Determine whether any of the determined operation durations falls within a preset duration range;
[0041] If yes, then set the target user's behavior feature value for any agricultural product to 1; otherwise, set the target user's behavior feature value for any agricultural product to 0. After traversing all the operation behavior data corresponding to all agricultural products, the target user's behavior feature value for each agricultural product is obtained.
[0042] Based on the target user's initial attention to each agricultural product and the target user's behavioral feature value for each agricultural product, a first behavioral feature vector of the target user is constructed.
[0043] In one possible design, based on the first behavioral feature vector and each of the second behavioral feature vectors, clustering is performed on the target user and each specified user to obtain multiple user clusters, including:
[0044] Based on the first behavioral feature vector and each of the second behavioral feature vectors, the similarity between the target user and each specified user is determined, and based on the similarity between the target user and each specified user, initial clustering processing is performed on the target user and each specified user to obtain multiple initial user clusters;
[0045] Calculate the clustering accuracy of each initial user cluster, and sort the multiple initial user clusters in descending order of clustering accuracy to obtain a sorted sequence;
[0046] Select the first k initial user clusters from the sorted sequence as the baseline user clusters, where k is an integer greater than 1;
[0047] Obtain the user set to be partitioned, wherein the user set to be partitioned contains users from all initial user clusters in the sorting sequence, excluding the baseline user cluster;
[0048] For the i-th user in the user set to be partitioned, calculate the membership degree between the i-th user and each baseline user cluster;
[0049] The i-th user is assigned to the baseline user cluster with the highest membership degree;
[0050] Increment i by 1 and recalculate the membership degree between the i-th user and each baseline user cluster until i equals n. This completes the partitioning of all users in the user set to be partitioned, resulting in multiple user clusters. The initial value of i is 1, and n is the total number of users in the user set to be partitioned.
[0051] In one possible design, the clustering accuracy for each initial user cluster is calculated, including:
[0052] For any initial user cluster among multiple initial user clusters, calculate the similarity between the j-th user in the j-th initial user cluster and each of the other users in the j-th initial user cluster.
[0053] A first average similarity is determined based on the similarity between the j-th user in any initial user cluster and each of the other users in any initial user cluster.
[0054] Calculate the similarity between the j-th user and each target cluster, wherein the similarity between the j-th user and any target cluster is the average of the similarity between the j-th user and each user in any target cluster, and each target cluster is the initial user cluster other than any initial user cluster among the plurality of initial user clusters;
[0055] Based on the first average similarity and the similarity between the j-th user and each target cluster, the clustering accuracy of the j-th user relative to any initial user cluster is calculated.
[0056] Increment j by 1 and recalculate the similarity between the j-th user in any initial user cluster and all other users in any initial user cluster until j equals M. Then obtain the clustering accuracy of each user relative to any initial user cluster, where the initial value of j is 1 and M is the total number of users in any initial user cluster.
[0057] The clustering accuracy of any initial user cluster is determined based on the clustering accuracy of each user relative to any initial user cluster.
[0058] Secondly, a user-focused agricultural product recommendation system is provided, including:
[0059] The data acquisition unit is used to acquire a first user behavior dataset of the target user on a designated platform and a second user behavior dataset of several designated users on the designated platform. The first user behavior dataset contains data on the target user's operational behavior on various agricultural products on the designated platform, and the several designated users are all users on the designated platform except for the target user.
[0060] The attention calculation unit is used to determine the first attention of the target user to each agricultural product within a specified time period based on the first user behavior dataset, and to determine the second attention of each specified user to each agricultural product within a specified time period based on the second user behavior dataset of each specified user, wherein the specified time period is the behavior time period corresponding to the first user behavior dataset.
[0061] The feature construction unit is used to construct a first behavioral feature vector of the target user using the first user behavior dataset and the first attention of the target user to each agricultural product, and to construct a second behavioral feature vector of each specified user using the second user behavior dataset of each specified user and the second attention of each specified user to each agricultural product.
[0062] A clustering unit is used to perform clustering processing on the target user and each specified user based on the first behavioral feature vector and each second behavioral feature vector to obtain multiple user clusters;
[0063] The recommendation unit is used to filter out target clusters from multiple user clusters and obtain the agricultural products that each user in the target cluster is interested in, so as to form a set of agricultural products to be recommended using the agricultural products that each user in the target cluster is interested in. The target cluster is a user cluster that contains the target user among the multiple user clusters.
[0064] The recommendation unit is also used to recommend agricultural products to the target user based on the set of agricultural products to be recommended.
[0065] Thirdly, a device for recommending agricultural products based on user attention is provided. Taking the device as an electronic device as an example, it includes a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the method for recommending agricultural products based on user attention as described in the first aspect or any possible design of the first aspect.
[0066] Fourthly, a storage medium is provided, on which instructions are stored, which, when executed on a computer, perform the user-focused agricultural product recommendation method as described in the first aspect or any possible design of the first aspect.
[0067] Fifthly, a computer program product containing instructions is provided, which, when executed on a computer, cause the computer to perform the user-focused agricultural product recommendation method as described in the first aspect or any possible design of the first aspect.
[0068] Beneficial effects:
[0069] (1) In the recommendation process, this invention introduces the user's attention to agricultural products and uses the attention and user behavior data to construct a behavioral feature vector that reflects the user's preferences. Then, based on the user's behavioral feature vector, user clusters are obtained. Finally, agricultural products can be recommended to users based on the agricultural products that each user in the user cluster is interested in. Based on this, this invention uses attention to reflect changes in user interest in agricultural products and introduces it into the recommendation process. Therefore, compared with traditional technology, this invention can adapt to changes in user interest and better discover user interests, thus improving the accuracy of recommendations and making it very suitable for large-scale application and promotion. Attached Figure Description
[0070] Figure 1 A flowchart illustrating the steps of the agricultural product recommendation method based on user attention provided in an embodiment of the present invention;
[0071] Figure 2 A schematic diagram of the structure of an agricultural product recommendation system based on user attention provided in an embodiment of the present invention;
[0072] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0073] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0074] It should be understood that although the terms first, second, etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, without departing from the scope of the exemplary embodiments of the invention.
[0075] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.
[0076] Example:
[0077] See Figure 1 As shown, the agricultural product recommendation method based on user attention provided in this embodiment determines the target user's attention to agricultural products based on user behavior during the recommendation process. It then constructs a behavioral feature vector reflecting user preferences using the attention and target user behavior data. Next, based on the user's behavioral feature vector, user clustering is performed to obtain clusters of multiple users with the same or similar preferences. Finally, agricultural product recommendations for the target user are made based on the agricultural products followed by each user in the user cluster. Therefore, this method uses attention to reflect changes in user interest in agricultural products and incorporates this into the recommendation process. Based on this, compared to traditional technologies, this method can adapt to changes in user interests and better uncover user interests, thus improving the accuracy of recommendations and making it very suitable for large-scale application and promotion. For example, this method can, but is not limited to, running on an e-commerce server. It is understood that the aforementioned execution entity does not constitute a limitation on the embodiments of this application. Accordingly, the operation steps of this method can, but are not limited to, the steps S1 to S6 below.
[0078] S1. Obtain a first user behavior dataset of the target user on a designated platform and a second user behavior dataset of several designated users on the designated platform. The first user behavior dataset contains operational behavior data of the target user on various agricultural products on the designated platform, and the several designated users are all users on the designated platform excluding the target user. In this embodiment, any operational behavior data in the first user behavior dataset may include, but is not limited to, the operation start time (e.g., the entry time of the agricultural product page), the operation end time (the exit time of the agricultural product page), the operation behavior type, and the agricultural product name. Optionally, the operation behavior type may include, but is not limited to, browsing behavior and evaluation behavior, and the evaluation behavior is used to characterize the target user's preference behavior for agricultural products, such as collecting, purchasing, adding to cart, and following. Furthermore, the designated platform may be, but is not limited to, an agricultural e-commerce platform. Of course, the information contained in the second user behavior dataset of any designated user is the same as that in the first user behavior dataset, and will not be elaborated further here.
[0079] After obtaining the behavioral data of the target user and the behavioral data of each user on the designated platform other than the target user, the attention to agricultural products can be calculated based on their respective behavioral data; specifically, the calculation process of attention can be, but is not limited to, as shown in step S2 below.
[0080] S2. Based on the first user behavior dataset, determine the target user's first level of attention to each agricultural product within a specified time period, and based on the second user behavior dataset of each specified user, determine the second level of attention of each specified user to each agricultural product within a specified time period. The specified time period is the behavior time period corresponding to the first user behavior dataset. In specific applications, the specified time period is the behavior generation time period corresponding to the first user behavior dataset. For example, if the first user behavior dataset collects the target user's behavior data from 10:00 AM on January 2, 2024 to 10:00 AM on January 6, 2024, then the specified time period is from 10:00 AM on January 2, 2024 to 10:00 AM on January 6, 2024. Of course, the process of determining the specified time period is the same when the behavior generation time periods are different, and will not be elaborated further here.
[0081] Optionally, this embodiment calculates the user's attention to agricultural products from two dimensions: time and frequency. Meanwhile, since the calculation principle of the target user's attention to each agricultural product and each designated user's attention to each agricultural product is the same, the following uses the target user's first attention to any agricultural product as an example for specific explanation. The process can be, but is not limited to, the steps S21 to S24 below.
[0082] S21. For any agricultural product, the target user's operation behavior data for that agricultural product is filtered from the first user behavior dataset. Using the filtered operation behavior data, the total operation duration, number of operations, earliest start time, and latest start time of the target user's operation on that agricultural product are determined. In this embodiment, since it has been explained that any operation behavior data includes an operation start time and an operation end time, the operation duration of each operation behavior data can be obtained based on the operation start time and operation end time in each operation behavior data corresponding to any agricultural product. Then, the sum is calculated to obtain the total operation duration of the target user for that agricultural product. Similarly, the earliest operation time is the operation start time with the longest time remaining until the current time among the operation start times in the operation behavior data corresponding to that agricultural product, while the latest operation start time is the operation start time with the shortest time remaining until the current time. Furthermore, the number of operation behavior data entries corresponding to any agricultural product is taken as the number of operations performed by the target user on that agricultural product.
[0083] After obtaining the aforementioned information, the initial attention in the two dimensions of time and frequency can be calculated based on the aforementioned information. The process can be, but is not limited to, the steps S22 and S23 below.
[0084] S22. Based on the earliest operation start time and the latest operation start time, calculate the target user's first initial attention level to any agricultural product based on the access time. In this embodiment, the time difference of accessing products reflects the user's interest changes to a certain extent. Generally speaking, the more likely the agricultural product recently accessed by the user is a product that the target user is interested in, the higher the target user's attention level, and the greater its influence on the target user's recommendation. On the other hand, products accessed earlier have a smaller impact on the current recommendation. Therefore, by calculating the first initial attention level from the dimension of access time interval, the user's interest in agricultural products can be reflected over time.
[0085] Specifically, for example, but not limited to, the following steps S22a to S22c can be used to calculate the first initial attention based on the access time.
[0086] S22a. Obtain the time interval of the target user's use of the designated platform; In this embodiment, the time interval between two consecutive visits of the target user to the designated platform can be crawled, and then sampled multiple times and the average value is taken as the aforementioned time interval; After obtaining the time interval of the target user's use of the designated platform, it is also necessary to calculate the time interval of the target user's attention to any of the aforementioned agricultural products, and the process is shown in step S22b below.
[0087] S22b. Determine the attention interval of the target user for any agricultural product based on the earliest operation start time and the latest operation start time; in this embodiment, the duration between the earliest operation start time and the latest operation start time is the attention interval; at the same time, if there is only one operation behavior data for any agricultural product within a specified time period, then the operation start time in that operation behavior data is taken as the latest operation start time; then, obtain the first access time of the target user for any agricultural product on the specified platform, and take that first access time as the earliest operation start time.
[0088] After obtaining the attention time interval, the first initial attention based on the access time can be calculated by combining the aforementioned usage time interval. The calculation process is shown in step S22c below.
[0089] S22c. Based on the usage time interval and the attention time interval, and according to the following formula (1), the first initial attention level is calculated.
[0090]
[0091] In the above formula (1), g1 represents the first initial attention level, t1 represents the attention time interval, t2 represents the usage time interval, and γ represents the weight coefficient. In this embodiment, the value range of the weight coefficient is [0, 1], and in this embodiment, it is preferably 0.3. Of course, the value of the weight coefficient can be specifically set according to actual use, and is not limited to the above example.
[0092] Therefore, through the aforementioned steps S22a to S22c, the target user's first initial attention level to any of the aforementioned agricultural products based on the access time can be calculated; then, based on the aforementioned total operation time and number of operations, the second initial attention level based on the access frequency can be calculated, and the process can be, but is not limited to, as shown in step S23 below.
[0093] S23. Based on the total operation time and the number of operations, calculate the target user's second initial attention level to any agricultural product based on the operation frequency. In this embodiment, the more times the target user browses the agricultural product, the greater the target user's preference for the product, and the higher their attention level. At the same time, the browsing time of the target user for the product can also reflect the target user's interest in the product. Therefore, the second initial attention level can be calculated based on the aforementioned frequency and time, and the process can be, but is not limited to, the steps S23a to S23c below.
[0094] S23a. Using the first user behavior dataset, determine the total number of times the target user pays attention to agricultural products and the total duration of attention to agricultural products; in this embodiment, the total number of operation behavior data in the first user behavior dataset is the total number of times agricultural products are paid attention to; and the sum of the operation duration of all operation behavior data in the first user behavior dataset is the total duration of attention to agricultural products; meanwhile, the calculation process of operation duration can be referred to the aforementioned step S21, and its principle will not be repeated.
[0095] After obtaining the total number of times the target user pays attention to agricultural products and the total duration of attention to agricultural products, it is also necessary to determine the duration and number of times the target user pays attention to any of the aforementioned agricultural products, so as to calculate the second initial attention level based on this. The process of determining the duration and number of times the target user pays attention to any of the aforementioned agricultural products may be, but is not limited to, as shown in step S23b below.
[0096] S23b. Based on the total operation time, determine the target user's attention duration for any agricultural product, and based on the number of operations, determine the target user's attention count for any agricultural product. In specific implementation, the target user's total operation time for any agricultural product is taken as the attention duration for that agricultural product; similarly, the number of operations on that agricultural product is taken as the attention count. After obtaining the target user's attention count and attention duration for any agricultural product, the second initial attention level based on access frequency can be calculated by combining the total number of agricultural product attention counts and the total attention duration of agricultural products in step S23a. The calculation process is shown in step S23c below.
[0097] S23c. Based on the total number of times the agricultural product is viewed, the total duration of the agricultural product is viewed, the duration of the view and the number of views, the second initial level of attention is calculated according to the following formula (2).
[0098]
[0099] In the above formula (2), g2 represents the second initial attention level, c1 represents the number of attentions, c2 represents the total number of attentions to the agricultural product, t3 represents the attention duration, and t4 represents the total attention duration to the agricultural product.
[0100] Based on the aforementioned steps S23a to S23c, the target user's second initial attention level to any of the agricultural products based on the frequency of operation can be calculated; then, combined with the aforementioned first initial attention level, the target user's first attention level to any of the agricultural products can be calculated; wherein, the calculation process of the first attention level is as shown in step S24 below.
[0101] S24. Using the first initial attention and the second initial attention, determine the target user's first attention to any agricultural product within a specified time period; in specific implementation, for example, but not limited to, the product of the first initial attention and the second initial attention can be used as the target user's first attention to any agricultural product within a specified time period.
[0102] Through the aforementioned steps S21 to S24, the target user's first level of attention to any one of the agricultural products can be calculated. Then, using the same principle, the target user's first level of attention to each of the other agricultural products, and the second level of attention to each agricultural product by each designated user can be calculated. Then, the behavioral feature vectors of the target user and the designated users can be combined to generate their respective behavioral feature vectors, so as to identify users with the same or similar preferences as the target user based on the behavioral feature vectors. The process of constructing the behavioral feature vectors can be, but is not limited to, the process shown in step S3 below.
[0103] S3. Using the first user behavior dataset and the target user's first level of attention to each agricultural product, construct the first behavioral feature vector of the target user; and using the second user behavior dataset of each specified user and the second level of attention to each agricultural product of each specified user, construct the second behavioral feature vector of each specified user. In specific applications, this embodiment determines the behavioral feature values of the target user and each specified user for each agricultural product based on the operation behavior types in the first user behavior dataset and the second user behavior dataset; then, it combines their respective levels of attention to construct the corresponding behavioral feature vectors. Specifically, this embodiment takes the target user's operation behavior data for any agricultural product as an example for detailed explanation, and the process can be, but is not limited to, the steps S31 to S36 below.
[0104] S31. For any agricultural product, filter the target user's operation behavior data on the agricultural product from the first user behavior dataset, and determine whether there is any evaluation behavior in the filtered operation behavior data; in this embodiment, it is to determine whether there is any collection behavior, purchase behavior, add to cart behavior and / or follow behavior in the operation behavior data of any agricultural product; wherein, if one or more of the above four behaviors exist, it indicates that the target user has a clear interest in the agricultural product and has a high level of attention; otherwise, it is necessary to determine whether there is any browsing behavior, so as to determine whether the target user has a latent interest in the aforementioned agricultural product based on whether there is any browsing behavior; optionally, the above judgment process may be, but is not limited to, as shown in the following steps S32 to S34.
[0105] S32. If it is determined that there is no evaluation behavior in the filtered operation behavior data, then it is determined whether there is browsing behavior in the filtered operation behavior data. In this embodiment, if there is evaluation behavior, the behavioral feature value of the target user for any agricultural product can be directly set to 1; otherwise, it is necessary to determine whether there is browsing behavior. If there is no browsing behavior, it can be directly determined that the target user is not interested in any agricultural product, and the attention level is 0. Therefore, the behavioral feature value of the target user for any agricultural product can be directly set to 0. Conversely, if there is browsing behavior, it is necessary to determine whether the target user has any latent interest in the aforementioned agricultural product based on the browsing time. The process is shown in step S33 below.
[0106] S33. If browsing behavior is found in the filtered operation behavior data, the operation duration of each target data is determined based on the operation start time and operation end time of each target data in the target dataset. The target data in the target dataset refers to the filtered operation behavior data that contains browsing behavior. In practice, if the target user stays on the agricultural product page for too short a time, it may be due to accidental clicks or exiting the page because a certain indicator of the product does not meet their needs. Therefore, even if there is corresponding browsing behavior, it does not guarantee that the target user is interested in the agricultural product. Similarly, if the browsing time is too long, it may be because the target user opened the page but forgot to close it midway. Therefore, it also does not indicate that the user is interested in the agricultural product. Based on this, it is necessary to determine whether the target user has any latent interest in any of the aforementioned agricultural products based on the operation time. Specifically, the determination process is shown in step S34 below.
[0107] S34. Determine whether any of the determined operation durations falls within a preset duration range. In this embodiment, the preset time range can be specifically set according to actual use and is not specifically limited here. If there is an operation duration within the preset duration range, it indicates that the target user has a latent interest in any agricultural product. In this case, the behavioral feature value of the target user for any agricultural product can be set to 1. Otherwise, there is no latent interest, and the behavioral feature value can be directly set to 0. The aforementioned process is shown in step S35 below.
[0108] S35. If yes, then set the target user's behavioral feature value for any agricultural product to 1; otherwise, set the target user's behavioral feature value for any agricultural product to 0, and obtain the target user's behavioral feature value for each agricultural product after traversing all the operation behavior data corresponding to all agricultural products.
[0109] Based on the aforementioned steps S31 to S35, the behavioral feature value of the target user for any of the aforementioned agricultural products can be obtained. Then, using the same principle, the behavioral feature value of the target user for each agricultural product can be obtained. Finally, the aforementioned behavioral feature values and the first level of attention can be combined to construct the first behavioral feature vector of the target user. The specific construction process of the first behavioral feature vector can be, but is not limited to, the following step S36.
[0110] S36. Based on the target user's first attention level to each agricultural product and the target user's behavioral feature value for each agricultural product, a first behavioral feature vector of the target user is constructed. In this embodiment, by multiplying the behavioral feature value of any agricultural product by the corresponding first attention level, the actual behavioral feature value of the target user for any agricultural product can be obtained. Then, by using each actual behavioral feature value, a first behavioral feature vector (which is a row vector) can be constructed.
[0111] Through the aforementioned steps S31 to S36, the first behavioral feature vector of the target user can be constructed; based on this, the second behavioral feature vector of each specified user can be constructed using the same principle; then, the specified user most similar to the target user can be determined according to the first behavioral feature vector and each second behavioral feature vector; wherein, the process of determining the specified user most similar to the target user can be, but is not limited to, as shown in step S4 below.
[0112] S4. Based on the first behavioral feature vector and each of the second behavioral feature vectors, clustering is performed on the target user and each designated user to obtain multiple user clusters. In specific implementation, this embodiment uses user similarity to perform user clustering, thereby taking each user in the obtained user cluster containing the target user as the user most similar to the target user. The aforementioned clustering process may, but is not limited to, adopt the steps S41 to S47 shown below.
[0113] S41. Based on the first behavioral feature vector and each of the second behavioral feature vectors, determine the similarity between the target user and each specified user, and based on the similarity between the target user and each specified user, perform initial clustering processing on the target user and each specified user to obtain multiple initial user clusters. In specific applications, the Euclidean distance between the target user and each specified user can be calculated using the first behavioral feature vector and each of the second behavioral feature vectors, and then the Euclidean distance can be used as the similarity between the target user and each specified user. Alternatively, for example, but not limited to, based on the similarity between the target user and each specified user, the nearest neighbor propagation clustering algorithm can be used to perform initial clustering processing on the aforementioned users to obtain multiple initial user clusters. Of course, the nearest neighbor propagation clustering algorithm is a commonly used algorithm for user clustering, and its principle will not be elaborated further.
[0114] After obtaining multiple initial user clusters, in order to further improve the clustering accuracy, this embodiment determines a baseline user cluster based on the clustering accuracy of each initial user cluster. Then, users who are not in the baseline user cluster are subjected to secondary clustering. Finally, the clusters obtained after secondary clustering can be used as user clusters. Specifically, the secondary clustering process can be, but is not limited to, the steps S42 to S47 below.
[0115] S42. Calculate the clustering accuracy of each initial user cluster, and sort the multiple initial user clusters in descending order of clustering accuracy to obtain a sorting sequence; in specific applications, take any initial user cluster as an example to illustrate the calculation process of clustering accuracy, and the process may be, but is not limited to, the steps S42a to S42f below.
[0116] S42a. For any initial user cluster among multiple initial user clusters, calculate the similarity between the j-th user in the initial user cluster and the other users in the initial user cluster. In this embodiment, the behavioral feature vector of each user in the initial user cluster has been constructed in the aforementioned step S3. Therefore, the similarity between the j-th user and the other users in the initial user cluster can be calculated based on the behavioral feature vector. After calculating the similarity between the j-th user and the other users, a first average similarity can be obtained based on the calculated multiple similarities, as shown in step S42b below.
[0117] S42b. Based on the similarity between the j-th user in any initial user cluster and all other users in any initial user cluster, determine the first average similarity. In this embodiment, assuming that 5 similarities are calculated in step S42a, then the average of the 5 similarities is taken as the first average similarity.
[0118] After obtaining the first average similarity, the similarity between the j-th user and each of the other initial user clusters can be calculated so that the example accuracy of the j-th user relative to any of the aforementioned initial user clusters can be calculated based on the similarity between the j-th user and each of the other initial user clusters; wherein the aforementioned calculation process is as shown in steps S42c-S42d below.
[0119] S42c. Calculate the similarity between the j-th user and each target cluster, wherein the similarity between the j-th user and any target cluster is the average of the similarities between the j-th user and each user in the target cluster, and each target cluster is an initial user cluster other than the initial user cluster among the plurality of initial user clusters; in specific applications, for any target cluster, the similarity between the j-th user and each user in the target cluster is first calculated, and then the average is taken to obtain the similarity between the j-th user and the target cluster; of course, the similarity calculation process between the j-th user and other target clusters is also the same, and the principle will not be elaborated here.
[0120] After obtaining the similarity between the j-th user and each target cluster, the clustering accuracy of the j-th user relative to any initial user cluster can be calculated by combining the aforementioned first average similarity. The calculation process can be, but is not limited to, the following step S42d.
[0121] S42d. Based on the first average similarity and the similarity between the j-th user and each target cluster, calculate the clustering accuracy of the j-th user relative to any initial user cluster; in specific implementation, for example, but not limited to, selecting the minimum similarity from the similarity between the j-th user and each target cluster; then based on the first average similarity and the minimum similarity, and according to the following formula (3), calculate the clustering accuracy of the j-th user relative to any initial user cluster.
[0122]
[0123] In the above formula (3), s j s represents the clustering accuracy of the j-th user relative to any initial user cluster. min Let s' represent the minimum similarity. j This represents the first average similarity.
[0124] Thus, using the aforementioned formula (3), the clustering accuracy of the j-th user relative to any initial user cluster can be calculated; then, using the same principle, the clustering accuracy of each of the remaining users in any initial user cluster relative to any initial user cluster can be calculated; finally, the clustering accuracy of any initial user cluster can be derived based on the clustering accuracy of each user in any initial user cluster relative to that initial user cluster; specifically, the iterative calculation process is shown in step S42e below.
[0125] S42e. Increment j by 1 and recalculate the similarity between the j-th user in any initial user cluster and all other users in any initial user cluster until j equals M. Then, obtain the clustering accuracy of each user relative to any initial user cluster, where the initial value of j is 1 and M is the total number of users in any initial user cluster. In specific implementation, after obtaining the clustering accuracy of each user in any initial user cluster relative to that cluster, the clustering accuracy of any initial user cluster can be calculated based on this, as shown in step S42f below.
[0126] S42f. Determine the clustering accuracy of any initial user cluster based on the clustering accuracy of each user relative to the cluster. In this embodiment, the average value of the clustering accuracy of each user in any initial user cluster relative to the cluster can be used as the clustering accuracy of the initial user cluster, but is not limited to.
[0127] Therefore, through the aforementioned steps S42a to S42f, the clustering accuracy of each initial user cluster can be calculated. Then, based on the clustering accuracy of each initial user cluster, a baseline user cluster can be determined from multiple initial user clusters. The process of determining the baseline user cluster is shown in step S43 below.
[0128] S43. Select the first k initial user clusters from the sorted sequence as the base user clusters, where k is an integer greater than 1; in this embodiment, k is 3 for example; of course, it can also be set according to actual use, and is not limited to the above example.
[0129] After obtaining the baseline user cluster, secondary clustering can be performed on the users in each of the other initial user clusters. The process can be, but is not limited to, the steps S44 to S47 below.
[0130] S44. Obtain the user set to be partitioned, wherein the user set to be partitioned contains users from all initial user clusters in the sorting sequence except for the baseline user cluster; in this embodiment, assuming there are 5 initial user clusters, then the user set to be partitioned is formed by using the users from the 4th and 5th ranked initial user clusters; of course, when the number of initial user clusters and the value of k are different, the process of obtaining the user set to be partitioned is the same as the previous example, and will not be repeated here.
[0131] After obtaining the user set to be partitioned, the membership degree of each user relative to each baseline user cluster can be calculated, and based on this, a secondary clustering of each user in the user set to be partitioned can be performed, as shown in steps S45 to S47 below.
[0132] S45. For the i-th user in the user set to be divided, calculate the membership degree between the i-th user and each benchmark user cluster. In specific implementation, the following uses any benchmark user cluster as an example to illustrate the calculation process of membership degree, which may include, but is not limited to: (1) For any benchmark user cluster, first classify the i-th user into any benchmark user cluster; (2) Calculate the similarity between the i-th user and each benchmark user in the aforementioned benchmark user cluster, and take the average value to obtain the second average similarity; (3) Calculate the similarity between the i-th user and each benchmark user cluster; (4) Based on the second average similarity and the similarity between the i-th user and each benchmark user cluster, calculate the membership degree between the i-th user and the aforementioned benchmark user cluster. Specifically, the calculation process in step (3) can be referred to step S42c, while the calculation in step (4) can use the aforementioned formula (3), the principle of which will not be repeated.
[0133] Thus, through the aforementioned step S45, the membership degree between the i-th user and each baseline user cluster can be calculated; then, the i-th user can be divided according to the membership degree, as shown in step S46 below.
[0134] S46. Assign the i-th user to the baseline user cluster with the highest membership degree.
[0135] After the i-th user is partitioned, the same principle can be used to partition the remaining users in the user set to be partitioned. The cyclic partitioning process can be, but is not limited to, the steps shown in step S47 below.
[0136] S47. Increment i by 1 and recalculate the membership degree between the i-th user and each baseline user cluster until i equals n. Complete the partitioning of all users in the user set to be partitioned to obtain multiple user clusters. The initial value of i is 1, and n is the total number of users in the user set to be partitioned.
[0137] Through the aforementioned steps, each user in the user set to be segmented can be assigned to a baseline user cluster. After the segmentation is completed, multiple new baseline user clusters can be obtained. Finally, these multiple new baseline user clusters can be used as user clusters. After obtaining the user clusters, the users in the user clusters containing the target user can be considered as users with the same or similar preferences as the target user. Based on this, agricultural products for the target user can be recommended based on the agricultural products that each user in the user clusters containing the target user has paid attention to. The agricultural product recommendation process is shown in steps S5 and S6 below.
[0138] S5. Select a target cluster from multiple user clusters and obtain the agricultural products that each user in the target cluster is interested in, so as to form a set of agricultural products to be recommended using the agricultural products that each user in the target cluster is interested in. The target cluster is a user cluster that contains the target user among the multiple user clusters. In specific applications, each user in the target cluster represents a user who has the same preference for agricultural products as the target user. Therefore, the agricultural products that each user in the target cluster is interested in can be used to form a set of agricultural products to be recommended, and agricultural products can be recommended based on this.
[0139] Specifically, based on the behavioral feature vectors of each user in the target cluster, agricultural products with a behavioral feature value of 1 can be identified. These agricultural products with a behavioral feature value of 1 are then considered as agricultural products of interest to the target users. Next, the number of times each agricultural product among those of interest to the target users is followed is counted, and they are sorted from highest to lowest according to the number of follows, thus obtaining the set of products to be recommended. For example, suppose the agricultural products of interest to users in the target cluster are: corn, rice, loofah, and bitter melon. Specifically, 5 users in the target cluster have a behavioral feature value of 1 for corn (i.e., 5 follows for corn), 4 users have a behavioral feature value of 1 for rice (i.e., 4 follows for rice), 2 users have a behavioral feature value of 1 for bitter melon, and 1 user has a behavioral feature value of 1 for loofah. Therefore, the set of agricultural products to be recommended would be: corn, rice, bitter melon, and loofah. Of course, the above example is only illustrative. When the agricultural products of interest to the target users and the number of follows are different, the process of obtaining the agricultural products to be recommended is the same as the previous example, and will not be repeated here.
[0140] After obtaining the set of agricultural products to be recommended to the target users, product recommendations can be made based on this, and the process can be, but is not limited to, the steps shown in S6 below.
[0141] S6. Based on the set of agricultural products to be recommended, recommend agricultural products to the target user; in this embodiment, for example, but not limited to, recommending the top 3 or top 5 agricultural products in the set of agricultural products to be recommended to the target user; wherein, the recommendation method may be, but not limited to, displaying on the homepage of a designated platform; of course, other methods may also be used, which are not specifically limited here.
[0142] Therefore, through the user-focused agricultural product recommendation method described in detail in steps S1 to S6 above, this invention determines the target user's focus on agricultural products based on user behavior during the recommendation process, and constructs a behavioral feature vector that reflects user preferences using the focus and the target user's behavioral data. Then, based on the user's behavioral feature vector, user clustering is performed to obtain clusters composed of multiple users with the same or similar preferences. Finally, agricultural product recommendations for the target user can be made based on the agricultural products focused on by each user in the user cluster. Thus, this invention uses focus to reflect changes in user interest in agricultural products and incorporates it into the recommendation process. Based on this, compared with traditional technologies, this invention can adapt to changes in user interests and better uncover user interests, thereby improving the accuracy of recommendations and making it very suitable for large-scale application and promotion.
[0143] like Figure 2 As shown, the second aspect of this embodiment provides a hardware system for implementing the agricultural product recommendation method based on user attention described in the first aspect of the embodiment, comprising:
[0144] The data acquisition unit is used to acquire a first user behavior dataset of the target user on a designated platform and a second user behavior dataset of several designated users on the designated platform. The first user behavior dataset contains operational behavior data of the target user on various agricultural products on the designated platform, and the several designated users are all users on the designated platform except for the target user.
[0145] The attention calculation unit is used to determine the first attention of the target user to each agricultural product within a specified time period based on the first user behavior dataset, and to determine the second attention of each specified user to each agricultural product within a specified time period based on the second user behavior dataset of each specified user, wherein the specified time period is the behavior time period corresponding to the first user behavior dataset.
[0146] The feature construction unit is used to construct a first behavioral feature vector of the target user using the first user behavior dataset and the target user's first attention to each agricultural product, and to construct a second behavioral feature vector of each specified user using the second user behavior dataset of each specified user and the second attention to each agricultural product of each specified user.
[0147] The clustering unit is used to perform clustering processing on the target user and each specified user based on the first behavioral feature vector and each second behavioral feature vector to obtain multiple user clusters.
[0148] The recommendation unit is used to filter out target clusters from multiple user clusters and obtain the agricultural products that each user in the target cluster is interested in, so as to form a set of agricultural products to be recommended using the agricultural products that each user in the target cluster is interested in. The target cluster is a user cluster that contains the target user among the multiple user clusters.
[0149] The recommendation unit is also used to recommend agricultural products to the target user based on the set of agricultural products to be recommended.
[0150] The working process, working details and technical effects of the device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0151] like Figure 3 As shown, the third aspect of this embodiment provides an agricultural product recommendation device based on user attention. Taking the device as an electronic device as an example, it includes: a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the agricultural product recommendation method based on user attention as described in the first aspect of the embodiment.
[0152] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0153] In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. For example, the processor may not be limited to microprocessors of the STM32F105 series, reduced instruction set computer (RISC) microprocessors, x86 architecture processors, or processors with integrated neural network processing units (NPUs). The transceiver may be, but is not limited to, a Wi-Fi transceiver, a Bluetooth transceiver, a General Packet Radio Service (GPRS) transceiver, a ZigBee (a low-power LAN protocol based on the IEEE 802.15.4 standard) transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. Furthermore, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.
[0154] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0155] The fourth aspect of this embodiment provides a storage medium for storing instructions containing the agricultural product recommendation method based on user attention as described in the first aspect of the embodiment. That is, the storage medium stores instructions that, when executed on a computer, perform the agricultural product recommendation method based on user attention as described in the first aspect of the embodiment.
[0156] The storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0157] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0158] The fifth aspect of this embodiment provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the agricultural product recommendation method based on user attention as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0159] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for recommending agricultural products based on user interest, characterized by, include: Acquire a first user behavior dataset of the target user on a specified platform and a second user behavior dataset of several specified users on the specified platform. The first user behavior dataset contains data on the target user's operational behavior on various agricultural products on the specified platform, and the several specified users are all users on the specified platform except for the target user. Based on the first user behavior dataset, the first level of attention of the target user to each agricultural product within a specified time period is determined, and based on the second user behavior dataset of each specified user, the second level of attention of each specified user to each agricultural product within a specified time period is determined, wherein the specified time period is the behavior time period corresponding to the first user behavior dataset. Using the first user behavior dataset and the target user's first attention to each agricultural product, a first behavior feature vector of the target user is constructed; and using the second user behavior dataset of each specified user and the second attention of each specified user to each agricultural product, a second behavior feature vector of each specified user is constructed. Based on the first behavioral feature vector and each of the second behavioral feature vectors, clustering is performed on the target user and each specified user to obtain multiple user clusters; Target clusters are selected from multiple user clusters, and agricultural products that each user in the target cluster is interested in are obtained, so as to form a set of agricultural products to be recommended using the agricultural products that each user in the target cluster is interested in. The target cluster is a user cluster that contains the target user among the multiple user clusters. Based on the set of agricultural products to be recommended, agricultural products are recommended to the target users; Based on the first behavioral feature vector and each of the second behavioral feature vectors, clustering is performed on the target user and each specified user to obtain multiple user clusters, including: Based on the first behavioral feature vector and each of the second behavioral feature vectors, the similarity between the target user and each specified user is determined, and based on the similarity between the target user and each specified user, initial clustering processing is performed on the target user and each specified user to obtain multiple initial user clusters; Calculate the clustering accuracy of each initial user cluster, and sort the multiple initial user clusters in descending order of clustering accuracy to obtain a sorted sequence; Select the first k initial user clusters from the sorted sequence as the baseline user clusters, where k is an integer greater than 1; Obtain the user set to be partitioned, wherein the user set to be partitioned contains users from all initial user clusters in the sorting sequence, excluding the baseline user cluster; For the i-th user in the user set to be partitioned, calculate the membership degree between the i-th user and each baseline user cluster; The i-th user is assigned to the baseline user cluster with the highest membership degree; Increment i by 1 and recalculate the membership degree between the i-th user and each baseline user cluster until i equals n. Then, complete the partitioning of all users in the user set to be partitioned to obtain multiple user clusters. The initial value of i is 1, and n is the total number of users in the user set to be partitioned. The calculation process for the membership degree between the i-th user and any baseline user cluster is as follows: (1) For any benchmark user cluster, the i-th user is first assigned to that benchmark user cluster; (2) The similarity between the i-th user and each benchmark user in the aforementioned benchmark user cluster is calculated, and the average value is taken to obtain the second average similarity; (3) The similarity between the i-th user and each benchmark user cluster is calculated; (4) Based on the second average similarity and the similarity between the i-th user and each benchmark user cluster, the membership degree between the i-th user and the aforementioned benchmark user cluster is calculated; Calculate the clustering accuracy for each initial user cluster, including: For any initial user cluster among multiple initial user clusters, calculate the similarity between the j-th user in the j-th initial user cluster and each of the other users in the j-th initial user cluster. A first average similarity is determined based on the similarity between the j-th user in any initial user cluster and each of the other users in any initial user cluster. Calculate the similarity between the j-th user and each target cluster, wherein the similarity between the j-th user and any target cluster is the average of the similarity between the j-th user and each user in any target cluster, and each target cluster is the initial user cluster other than any initial user cluster among the plurality of initial user clusters; Based on the first average similarity and the similarity between the j-th user and each target cluster, the clustering accuracy of the j-th user relative to any initial user cluster is calculated. Increment j by 1 and recalculate the similarity between the j-th user in any initial user cluster and all other users in any initial user cluster until j equals M. Then obtain the clustering accuracy of each user relative to any initial user cluster, where the initial value of j is 1 and M is the total number of users in any initial user cluster. The clustering accuracy of any initial user cluster is determined based on the clustering accuracy of each user relative to any initial user cluster.
2. The method of claim 1, wherein, Any operation behavior data in the first user behavior dataset includes: operation start time and operation end time; Based on the first user behavior dataset, the primary level of attention that target users showed to each agricultural product within a specified time period was determined, including: For any agricultural product, the target user's operation behavior data on the agricultural product is filtered from the first user behavior dataset, and the total operation time, number of operations, earliest operation start time and latest operation start time of the target user on the agricultural product are determined using the filtered operation behavior data. Based on the earliest operation start time and the latest operation start time, the target user's first initial attention level to any agricultural product based on the access time is calculated; Based on the total operation time and the number of operations, the target user's second initial attention level to any agricultural product based on the operation frequency is calculated; Using the first initial attention level and the second initial attention level, the first attention level of the target user to any agricultural product within a specified time period is determined.
3. The method of claim 2, wherein, Based on the earliest operation start time and the latest operation start time, the target user's initial attention level to any agricultural product based on access time is calculated, including: Obtain the time interval of the target user's use of the specified platform; Based on the earliest start time and the latest start time, the time interval for the target user's attention to any agricultural product is determined; Based on the usage time interval and the attention time interval, the first initial attention level is calculated according to the following formula (1); (1) In the above formula (1), denotes the first initial attention degree, denotes the attention time interval, denotes the use time interval, denotes a weight coefficient.
4. The method according to claim 2, characterized in that, Based on the total operation time and the number of operations, the target user's second initial attention level to any agricultural product based on operation frequency is calculated, including: Using the first user behavior dataset, the total number of times the target user paid attention to agricultural products and the total duration of their attention were determined. Based on the total operation time, the duration of the target user's attention to any agricultural product is determined, and based on the number of operations, the number of times the target user's attention to any agricultural product is determined. Based on the total number of times the agricultural product is viewed, the total duration of the agricultural product is viewed, the duration of the view and the number of views, the second initial level of attention is calculated according to the following formula (2); (2) In the above formula (2), This indicates the second initial level of attention. This indicates the number of times the user has shown interest. This indicates the total number of times the agricultural product has received attention. This indicates the duration of attention. This indicates the total viewing time for the agricultural products mentioned; Accordingly, determining the target user's first level of attention to any agricultural product within a specified time period using the first initial attention level and the second initial attention level includes: The product of the first initial attention and the second initial attention is taken as the first attention of the target user to any agricultural product within the specified time period.
5. The method according to claim 1, characterized in that, Any operation behavior data in the first user behavior dataset includes operation start time, operation end time, operation behavior type, and agricultural product name, wherein the operation behavior type includes browsing behavior and evaluation behavior; Specifically, by utilizing the first user behavior dataset and the target user's initial attention level to each agricultural product, a first behavioral feature vector of the target user is constructed, including: For any agricultural product, filter out the target user's operation behavior data on the agricultural product from the first user behavior dataset, and determine whether there is any evaluation behavior in the filtered operation behavior data; If it is determined that there is no evaluation behavior in the filtered operation behavior data, then it is determined whether there is browsing behavior in the filtered operation behavior data. If it is determined that browsing behavior exists in the filtered operation behavior data, the operation duration of each target data is determined based on the operation start time and operation end time in each target data in the target dataset. The target data in the target dataset refers to the operation behavior data in the filtered operation behavior data that contains browsing behavior. Determine whether any of the determined operation durations falls within a preset duration range; If yes, then set the target user's behavior feature value for any agricultural product to 1; otherwise, set the target user's behavior feature value for any agricultural product to 0. After traversing all the operation behavior data corresponding to all agricultural products, the target user's behavior feature value for each agricultural product is obtained. Based on the target user's initial attention to each agricultural product and the target user's behavioral feature value for each agricultural product, a first behavioral feature vector of the target user is constructed.
6. An agricultural product recommendation system based on user attention, characterized in that, The system is used to execute the agricultural product recommendation method based on user attention as described in any one of claims 1 to 5, wherein the system comprises: The data acquisition unit is used to acquire a first user behavior dataset of the target user on a designated platform and a second user behavior dataset of several designated users on the designated platform. The first user behavior dataset contains data on the target user's operational behavior on various agricultural products on the designated platform, and the several designated users are all users on the designated platform except for the target user. The attention calculation unit is used to determine the first attention of the target user to each agricultural product within a specified time period based on the first user behavior dataset, and to determine the second attention of each specified user to each agricultural product within a specified time period based on the second user behavior dataset of each specified user, wherein the specified time period is the behavior time period corresponding to the first user behavior dataset. The feature construction unit is used to construct a first behavioral feature vector of the target user using the first user behavior dataset and the first attention of the target user to each agricultural product, and to construct a second behavioral feature vector of each specified user using the second user behavior dataset of each specified user and the second attention of each specified user to each agricultural product. A clustering unit is used to perform clustering processing on the target user and each specified user based on the first behavioral feature vector and each second behavioral feature vector to obtain multiple user clusters; The recommendation unit is used to filter out target clusters from multiple user clusters and obtain the agricultural products that each user in the target cluster is interested in, so as to form a set of agricultural products to be recommended using the agricultural products that each user in the target cluster is interested in. The target cluster is a user cluster that contains the target user among the multiple user clusters. The recommendation unit is also used to recommend agricultural products to the target user based on the set of agricultural products to be recommended.
7. An electronic device, characterized in that, include: A memory, a processor, and a transceiver are sequentially connected in communication, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer programs and execute the agricultural product recommendation method based on user attention as described in any one of claims 1 to 5.
8. A computer program product containing instructions, characterized in that, When the instructions are executed on a computer, the computer performs the agricultural product recommendation method based on user attention as described in any one of claims 1 to 5.