Agricultural product recommendation method and system based on user attention
By calculating users' attention to agricultural products and clustering them, the problem of existing technologies not considering changes in user interests is solved, and more accurate agricultural product recommendations are achieved.
Patent Information
- Application Number
- CN202510862791.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-06-25
AI Technical Summary
The existing recommendation methods of agricultural products e-commerce platforms do not take into account the changes in users' attention to agricultural products during use, resulting in low recommendation accuracy.
By obtaining the behavioral data of target users and other users, calculating the users' attention to agricultural products, constructing behavioral feature vectors, performing user clustering, screening out target clusters, and recommending agricultural products based on the clusters.
It improves the accuracy of agricultural product recommendations, can adapt to changes in user interests, and uncover users' true preferences.
Smart Images

Figure CN120746674A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of big data analysis, and in particular relates to a method and system for recommending agricultural products based on user attention. Background Art
[0002] In recent years, my country's economic and technological levels have developed and improved rapidly, accumulating rich material conditions and technical foundations for the realization of agricultural modernization; at the same time, driven by the new generation of information technology represented by big data, the Internet of Things, cloud computing, artificial intelligence, etc., "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] At present, with the increasing power of the Internet, the competition in the agricultural products e-commerce market is also intensifying. How to enable users to find products suitable for themselves from a large amount of product information has become a research hotspot in current agricultural products marketing. In actual use, most agricultural products e-commerce platforms use collaborative filtering algorithms to recommend agricultural products to users. However, existing recommendation methods usually only focus on user ratings (that is, users' behavior towards agricultural products), but do not take into account the changes in users' attention to agricultural products during the use of the platform (that is, they do not take into account the changes in users' interest in agricultural products). Therefore, the accuracy of agricultural product recommendations to users is not high, and it is impossible to recommend preferred agricultural products to users. Based on this, how to provide an agricultural product recommendation method with high recommendation accuracy has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and system for recommending agricultural products based on user attention, so as to solve the problem that the existing technology does not take into account the changes in user attention to agricultural products during use, resulting in low recommendation accuracy.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] First, a method for recommending agricultural products based on user attention is provided, comprising:
[0007] Obtaining a first user behavior dataset of a target user on a designated platform and a second user behavior dataset of several designated users on the designated platform, wherein the first user behavior dataset includes 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;
[0008] Determining, based on the first user behavior data set, a first degree of attention of the target user to each agricultural product within a specified time period; and determining, based on the second user behavior data set of each designated user, a second degree of attention of each designated user to each agricultural product within a specified time period, wherein the specified time period is a behavior time period corresponding to the first user behavior data set;
[0009] constructing a first behavior feature vector of the target user using the first user behavior dataset and the first attention level of the target user for each agricultural product, and constructing a second behavior feature vector of each designated user using the second user behavior dataset of each designated user and the second attention level of each designated user for each agricultural product;
[0010] performing clustering processing on the target user and each designated user based on the first behavior feature vector and each second behavior feature vector to obtain a plurality of user clusters;
[0011] Filtering a target cluster from a plurality of user clusters, and obtaining agricultural products that are of interest to each user in the target cluster, so as to form a set of agricultural products to be recommended using the agricultural products that are of interest to each user in the target cluster, wherein the target cluster is a user cluster among the plurality of user clusters that includes the target user;
[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, the present invention first obtains a first user behavior data set of the target user on the designated platform, and a second user behavior data set of each designated user (i.e., users on the designated platform excluding the target user); then, based on the first user behavior data set, the first attention of the target user to each agricultural product within a specified time period is determined, and based on the second user behavior data set of each designated user, the second attention of each designated user to each agricultural product is determined; in this way, this step is equivalent to quantifying the user's interest preference for different agricultural products based on the user's behavior data (i.e., the greater the interest in a certain agricultural product, the higher its attention); then, this interest preference can be introduced The method involves the recommendation process of agricultural products, thereby completing the precise agricultural product recommendation for users; specifically, first, based on the target user and each designated user's attention to each agricultural product and the corresponding behavioral data, respective behavioral feature vectors are constructed; then, based on the constructed behavioral feature vectors, users are clustered to obtain multiple users belonging to the same category as the target user, and the multiple users obtained by clustering are used to form a user cluster; based on this, the aforementioned steps are equivalent to screening out users with the same preferences as the target user; finally, the agricultural products that each user in the user cluster pays attention to are used to form a set of agricultural products to be recommended, and based on the set of agricultural products to be recommended, the agricultural product recommendation for the target user can be completed.
[0014] Through the above design, the present invention introduces the user's attention to agricultural products in the recommendation process, and uses the attention and user behavior data to construct a behavioral feature vector that can reflect the user's preference; then, according to the user's behavioral feature vector, the user is clustered to obtain user clusters; finally, the user's agricultural products can be recommended according to the agricultural products that each user in the user cluster pays attention to; based on this, the present invention uses attention to reflect the changes in user interest in agricultural products, and introduces it into the recommendation process. Therefore, compared with traditional technologies, the present invention can adapt to changes in user interests and can better explore user interests, thereby improving the accuracy of recommendations and being very suitable for large-scale application and promotion.
[0015] In a possible design, any operation behavior data in the first user behavior data set includes: operation start time and operation end time;
[0016] Determining the target user's first level of interest in each agricultural product within a specified time period based on the first user behavior data set includes:
[0017] For any agricultural product, filtering the target user's operation behavior data on the agricultural product from the first user behavior data set, and using the filtered operation behavior data to determine the target user's total operation duration, number of operations, earliest operation start time, and latest operation start time on the agricultural product;
[0018] Calculating a first initial attention degree of the target user to the any agricultural product based on access time according to the earliest operation start time and the latest operation start time;
[0019] calculating, based on the total operation duration and the number of operations, a second initial attention degree of the target user to the any agricultural product based on the operation frequency;
[0020] The first initial attention level and the second initial attention level are used to determine the first attention level of the target user for the any agricultural product within a specified time period.
[0021] In a possible design, calculating the target user's first initial attention to the agricultural product based on access time according to the earliest operation start time and the latest operation start time includes:
[0022] Obtaining a time interval for the target user to use the designated platform;
[0023] Determining the target user's attention time interval for the any agricultural product according to the earliest operation start time and the latest operation start time;
[0024] Based on the usage time interval and the attention time interval, and according to the following formula (1), the first initial attention degree is calculated;
[0025]
[0026] In the above formula (1), g1 represents the first initial attention degree, t1 represents the attention time interval, t2 represents the usage time interval, and γ represents the weight coefficient.
[0027] In a possible design, calculating the second initial attention of the target user to the any agricultural product based on the operation frequency according to the total operation duration and the number of operations includes:
[0028] Using the first user behavior dataset, determining the total number of times the target user pays attention to agricultural products and the total duration of their attention to agricultural products;
[0029] Determining the duration of the target user's attention to the agricultural product based on the total operation duration, and determining the number of times the target user has paid attention to the agricultural product based on the number of operations;
[0030] Based on the total number of times the agricultural product is paid attention to, the total duration of the attention to the agricultural product, the duration of the attention and the number of times of attention, and according to the following formula (2), the second initial attention degree is calculated;
[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 first attention degree of the target user to the any agricultural product within a specified time period by using the first initial attention degree and the second initial attention degree includes:
[0034] The product of the first initial attention degree and the second initial attention degree is used as the first attention degree of the target user to the any agricultural product within a specified time period.
[0035] In a possible design, any operation behavior data in the first user behavior data set 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] The first user behavior dataset and the first attention level of the target user to each agricultural product are used to construct a first behavior feature vector of the target user, including:
[0037] For any agricultural product, filtering the target user's operation behavior data on the agricultural product from the first user behavior data set, and determining 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, determining the operation duration of each target data item based on the operation start time and operation end time in each target data item in the target data set, wherein the target data in the target data set is the operation behavior data that contains browsing behavior in the filtered operation behavior data;
[0040] Determining whether any of the determined multiple operation durations is within a preset duration range;
[0041] If yes, the target user's behavior characteristic value for any of the agricultural products is set to 1; otherwise, the target user's behavior characteristic value for any of the agricultural products is set to 0, and after traversing all the operation behavior data corresponding to all agricultural products, the target user's behavior characteristic value for each agricultural product is obtained;
[0042] A first behavior feature vector of the target user is constructed based on the first attention degree of the target user to each agricultural product and the behavior feature value of the target user to each agricultural product.
[0043] In one possible design, based on the first behavior feature vector and each second behavior feature vector, the target user and each designated user are clustered to obtain multiple user clusters, including:
[0044] Determining the similarity between the target user and each designated user based on the first behavior feature vector and each second behavior feature vector, and performing initial clustering processing on the target user and each designated user based on the similarity between the target user and each designated user to obtain a plurality of 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 benchmark user clusters, where k is an integer greater than 1;
[0047] Acquire a user set to be divided, wherein the user set to be divided includes users in all initial user clusters in the sorting sequence except the reference user cluster;
[0048] For the i-th user in the user set to be divided, calculate the membership between the i-th user and each benchmark user cluster;
[0049] Classify the i-th user into the benchmark user cluster with the largest membership;
[0050] Increment i by 1 and recalculate the membership between the i-th user and each benchmark user cluster until i equals n. This completes the division of all users in the user set to be divided to obtain multiple user clusters, where the initial value of i is 1 and n is the total number of users in the user set to be divided.
[0051] In one possible design, the clustering accuracy of each initial user cluster is calculated, including:
[0052] For any initial user cluster among the multiple initial user clusters, calculating the similarity between the j-th user in the initial user cluster and the remaining users in the initial user cluster;
[0053] Determining a first average similarity based on similarities between the j-th user in any of the initial user clusters and the remaining users in any of the initial user clusters;
[0054] Calculating 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 any target cluster, and each target cluster is an initial user cluster in the multiple initial user clusters excluding the any initial user cluster;
[0055] Calculating the clustering accuracy of the j-th user relative to any of the initial user clusters based on the first average similarity and the similarities between the j-th user and each target cluster;
[0056] Increment j by 1 and recalculate the similarity between the jth user in any of the initial user clusters and the remaining users in any of the initial user clusters until j equals M, and then obtain the clustering accuracy of each user relative to any of the initial user clusters, where the initial value of j is 1 and M is the total number of users in any of the initial user clusters;
[0057] The clustering accuracy of any of the initial user clusters is determined according to the clustering accuracy of each user relative to any of the initial user clusters.
[0058] Secondly, a user attention-based agricultural product recommendation system is provided, including:
[0059] a data acquisition unit, configured to acquire a first user behavior dataset of a target user on a designated platform and a second user behavior dataset of a plurality of designated users on the designated platform, wherein the first user behavior dataset includes operation behavior data of the target user on various agricultural products on the designated platform, and the plurality of designated users are all users on the designated platform excluding the target user;
[0060] an attention calculation unit, configured to determine a first attention degree of a target user for each agricultural product within a specified time period based on the first user behavior data set, and to determine a second attention degree of each designated user for each agricultural product within a specified time period based on the second user behavior data set of each designated user, wherein the specified time period is a behavior time period corresponding to the first user behavior data set;
[0061] a feature construction unit, configured to construct a first behavior feature vector of the target user using the first user behavior dataset and the first attention level of the target user for each agricultural product, and to construct a second behavior feature vector of each designated user using the second user behavior dataset of each designated user and the second attention level of each designated user for each agricultural product;
[0062] a clustering unit, configured to perform clustering processing on the target user and each designated user based on the first behavior feature vector and each second behavior feature vector to obtain a plurality of user clusters;
[0063] a recommendation unit, configured to filter out a target cluster from a plurality of user clusters and obtain agricultural products that are of interest to each user in the target cluster, so as to form a set of agricultural products to be recommended using the agricultural products that are of interest to each user in the target cluster, wherein the target cluster is a user cluster among the plurality of user clusters that includes the target user;
[0064] The recommendation unit is further configured to recommend agricultural products to the target user based on the set of agricultural products to be recommended.
[0065] In the third aspect, a device for recommending agricultural products based on user attention is provided. Taking the device as an electronic device as an example, the device includes a memory, a processor and a transceiver that are communicatively connected in sequence, 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 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] In a fourth aspect, a storage medium is provided, on which instructions are stored. When the instructions are run on a computer, the agricultural product recommendation method based on user attention is executed as described in the first aspect or any possible design of the first aspect.
[0067] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, causes the computer to execute the agricultural product recommendation method based on user attention as described in the first aspect or any possible design of the first aspect.
[0068] Beneficial effects:
[0069] (1) In the recommendation process, the present invention introduces the user's attention to agricultural products, and uses the attention and user behavior data to construct a behavioral feature vector that can reflect the user's preference; then, based on the user's behavioral feature vector, the user is clustered to obtain user clusters; finally, the user's agricultural products can be recommended based on the agricultural products that each user in the user cluster pays attention to; based on this, the present invention uses attention to reflect the changes in user interest in agricultural products and introduces it into the recommendation process. Therefore, compared with traditional technologies, the present invention can adapt to changes in user interests and can better explore user interests, thereby improving the accuracy of recommendations and being very suitable for large-scale application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 A schematic diagram of the steps of a method for recommending agricultural products based on user attention provided by 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 by an embodiment of the present invention;
[0072] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0073] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be briefly introduced below in conjunction with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the 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 work. It should be noted that the description of these embodiments is used to help 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 elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element without departing from the scope of the exemplary embodiments of the present invention.
[0075] It should be understood that the term "and / or" that may appear in this document is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may indicate three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this document describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B may indicate two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0076] Example:
[0077] See also Figure 1 As shown, the agricultural product recommendation method based on user attention provided by this embodiment determines the target user's attention to agricultural products based on user behavior during the recommendation process, and uses the attention and target user's behavior data to construct a behavioral feature vector that can reflect the user's preference; then, based on the user's behavior feature vector, the user is clustered to obtain a cluster composed of multiple users with the same or similar preferences; finally, the agricultural products of the target user can be recommended based on the agricultural products that each user in the user cluster pays attention to; thus, the method uses attention to reflect the changes in user interest in agricultural products and introduces it into the recommendation process; based on this, compared with traditional technologies, the method can adapt to changes in user interests and can better explore user interests, thereby improving the accuracy of recommendations and being very suitable for large-scale application and promotion; among them, for example, the method can be but not limited to running on the e-commerce server side. It can be understood that the aforementioned execution subject does not constitute a limitation on the embodiments of the present application. Accordingly, the running steps of the method can be but not limited to the following steps S1 to S6.
[0078] S1. Obtain a first user behavior dataset of a target user on a designated platform and a second user behavior dataset of several designated users on the designated platform, wherein the first user behavior dataset contains the target user's operation behavior data on various agricultural products on the designated platform, and the several designated users are all users on the designated platform except the target user; in this embodiment, for example, any operation behavior data in the first user behavior dataset may include but is not limited to the operation start time (such as 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 collection behavior, purchase behavior, adding to shopping cart behavior and attention behavior of agricultural products; further, for example, the designated platform may be but is not limited to an agricultural product 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 here.
[0079] After obtaining the behavioral data of the target user and the behavioral data of each user on the designated platform excluding the target user, the attention paid to the agricultural products can be calculated based on their respective behavioral data; specifically, the attention calculation process can be, but is not limited to, as shown in the following step S2.
[0080] S2. Determine the first attention level of the target user to each agricultural product within the specified time period based on the first user behavior data set, and determine the second attention level of each designated user to each agricultural product within the specified time period based on the second user behavior data set of each designated user, wherein the specified time period is the behavior time period corresponding to the first user behavior data set; in specific applications, the specified time period is the behavior generation time period corresponding to the first user behavior data set; for example, if the first user behavior data set collects the behavior data of the target user from 10:00 on January 2, 2024 to 10:00 on January 6, 2024, then the specified time period is from 10:00 on January 2, 2024 to 10:00 on January 6, 2024; of course, when the behavior generation time period is different, the process of determining the specified time period is the same, which will not be repeated here.
[0081] Optionally, this embodiment calculates the user's attention to agricultural products from two dimensions: time and frequency. At the same time, since the calculation principle of the target user and each designated user's attention to each agricultural product is the same, the following takes the target user's first attention to any agricultural product as an example for specific explanation, and the process can be but is not limited to the following steps S21 to S24.
[0082] S21. For any agricultural product, the operation behavior data of the target user on the any agricultural product is filtered out from the first user behavior data set, and the filtered operation behavior data is used to determine the total operation duration, number of operations, earliest operation start time and latest operation start time of the target user on the any agricultural product; in this embodiment, since it has been explained above that any operation behavior data includes an operation start time and an operation end time, then, based on the operation start time and operation end time in each operation behavior data corresponding to any agricultural product, the operation duration of each operation behavior data can be obtained, and then, the total operation duration of the target user on the any agricultural product can be obtained by taking the sum; similarly, the earliest operation time is the operation start time with the longest time distance from the current moment among the operation start times in the operation behavior data corresponding to the any agricultural product, and the latest operation start time is the operation start time with the shortest time distance from the current moment; in addition, the number of operation behavior data corresponding to the aforementioned any agricultural product is used as the number of operations of the target user on the any 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, as shown in the following steps S22 and S23.
[0084] S22. Calculate the first initial attention of the target user to any of the agricultural products based on the access time based on the earliest operation start time and the latest operation start time; in this embodiment, the time difference in accessing the products reflects the change of interest to a certain extent. Generally speaking, the greater the possibility that the agricultural products recently accessed by the user are the products that the target user is interested in, the higher the target user's attention, and the greater the impact on the recommendation of the target user, while the products accessed earlier have less impact on the current recommendation; therefore, by calculating the first initial attention from the dimension of the access time interval, the change in the user's interest in the agricultural products over time can be reflected.
[0085] Specifically, for example but not limited to, the following steps S22a to S22c may be used to calculate the first initial attention degree based on the access time.
[0086] S22a. Obtain the target user's usage time interval for the designated platform. In this embodiment, the time interval between two consecutive entries of the target user into the designated platform may be crawled, and then multiple samples are taken and the average is taken as the aforementioned usage time interval. After obtaining the target user's usage time interval for the designated platform, it is also necessary to calculate the target user's attention time interval for any of the aforementioned agricultural products. The process is shown in the following step S22b.
[0087] S22b. Determine the time interval of the target user's attention to any of the agricultural products 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 time interval; at the same time, if there is only one piece of operation behavior data for any of the agricultural products within the specified time period, then the operation start time in the operation behavior data is used as the latest operation start time; then, obtain the first visit time of the target user to any of the agricultural products on the specified platform, and use the first visit time as the earliest operation start time.
[0088] After obtaining the attention time interval, the first initial attention degree based on the access time can be calculated in combination with the aforementioned usage time interval. The calculation process is shown in the following step S22c.
[0089] S22c. Based on the usage time interval and the attention time interval, and in accordance with the following formula (1), calculate the first initial attention degree.
[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], among which the preferred value in this embodiment is 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 first initial attention of the target user to any of the aforementioned agricultural products based on the access time can be calculated; then, the second initial attention based on the access frequency can be calculated based on the aforementioned total operation duration and number of operations. The process can be but is not limited to as shown in the following step S23.
[0093] S23. Calculate the second initial attention of the target user to any one of the agricultural products based on the operation frequency according to the total operation duration and the number of operations. In this embodiment, the more times the target user browses the agricultural products, the greater the target user's preference for the product and the higher the attention. At the same time, the target user's browsing time for the product can also reflect the target user's interest in the product. Therefore, the second initial attention can be calculated based on the aforementioned frequency and time, and the process can be, but is not limited to, as shown in the following steps S23a to S23c.
[0094] S23a. Using the first user behavior data set, determine the total number of times the target user pays attention to agricultural products and the total duration of their attention to agricultural products. In this embodiment, the total number of operation behavior data in the first user behavior data set is the total number of times the target user pays attention to agricultural products. The sum of the operation durations of all operation behavior data in the first user behavior data set is the total duration of their attention to agricultural products. At the same time, the calculation process of the operation duration can be referred to the aforementioned step S21, and its principle will not be repeated here.
[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 subsequently calculate the second initial attention level based on this; wherein, the process of determining the duration and number of times the target user pays attention to any of the aforementioned agricultural products can be, but is not limited to, as shown in the following step S23b.
[0096] S23b. Determine the target user's attention duration on any agricultural product based on the total operation duration, and determine the number of times the target user pays attention to any agricultural product based on the number of operations; in specific implementation, the total operation duration of the target user on any agricultural product is used as the target user's attention duration on the agricultural product; similarly, the number of operations on the agricultural product is used as the number of attentions; and after obtaining the number of times and the duration of the target user's attention to the agricultural product, the second initial attention degree based on the access frequency can be calculated in combination with the total number of attentions to the agricultural product and the total duration of the attention to the agricultural product in step S23a; wherein, the calculation process is shown in the following step S23c.
[0097] S23c. Based on the total number of times the agricultural product is paid attention to, the total duration of attention to the agricultural product, the duration of attention and the number of times of attention, and in accordance with the following formula (2), calculate the second initial attention degree.
[0098]
[0099] In the above formula (2), g2 represents the second initial attention degree, 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 second initial attention of the target user to any of the aforementioned agricultural products based on the operation frequency can be calculated; then, combined with the aforementioned first initial attention, the first attention of the target user to any of the aforementioned agricultural products can be calculated; wherein, the calculation process of the first attention is shown in the following step S24.
[0101] S24. Utilize the first initial attention and the second initial attention to determine the first attention of the target user to any one of the agricultural products within the 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 first attention of the target user to any one of the agricultural products within the specified time period.
[0102] In this way, through the aforementioned steps S21 to S24, the first attention of the target user to any of the agricultural products can be calculated; then, using the same principle, the first attention of the target user to the remaining agricultural products, as well as the second attention of each designated user to each agricultural product, can be calculated; then, the behavioral data of the target user and the designated user can be combined to generate their respective behavioral feature vectors, so that users with the same or similar preferences as the target user can be determined based on the behavioral feature vectors; wherein, the construction process of the behavioral feature vector can be but is not limited to as shown in the following step S3.
[0103] S3. Utilize the first user behavior data set and the first attention of the target user to each agricultural product to construct the first behavior feature vector of the target user, and utilize the second user behavior data set of each designated user and the second attention of each designated user to each agricultural product to construct the second behavior feature vector of each designated user; in specific application, this embodiment determines the behavior feature value of the target user and each designated user for each agricultural product based on the operation behavior type in the first user behavior data set and the second user behavior data set; and then, combines their respective attention to construct the corresponding behavior feature vector; specifically, this embodiment takes the operation behavior data of the target user for any agricultural product as an example for specific explanation, and the process can be but is not limited to the following steps S31 to S36.
[0104] S31. For any agricultural product, the operation behavior data of the target user on the any agricultural product is filtered out from the first user behavior data set, and it is determined whether there is any evaluation behavior in the filtered operation behavior data; in this embodiment, it is determined whether there is any collection behavior, purchase behavior, adding to purchase cart behavior and / or attention behavior in the operation behavior data of any agricultural product; among them, if one or more of the aforementioned four behaviors exist, it means that the target user has a clear interest in the any agricultural product and has a high degree of attention; otherwise, it is necessary to determine whether there is any browsing behavior, so as to determine whether the target user has an implicit interest in the any agricultural product based on whether there is any browsing behavior; optionally, the aforementioned judgment process may be but is not limited to 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 determine whether there is browsing behavior in the filtered operation behavior data; in this embodiment, if there is evaluation behavior, the behavior characteristic value of the target user for any of the agricultural products 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 of the agricultural products, and the attention level is 0; therefore, the behavior characteristic value of the target user for any of the agricultural products can be directly set to 0; conversely, if there is browsing behavior, it is necessary to determine whether the target user has an implicit interest in any of the aforementioned agricultural products based on the browsing time, and the process is shown in the following step S33.
[0106] S33. 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 data set, wherein the target data in the target data set is the operation behavior data in which browsing behavior exists in the filtered operation behavior data; in specific implementation, the target user stays on the agricultural product page for too short a time, which may be due to accidental clicks or finding that a certain indicator of the product does not meet his or her own needs and exits the page, so even if there is corresponding browsing behavior, it cannot be guaranteed that the target user is interested in the agricultural product; similarly, if the browsing time is too long, it may be that the target user opens the page and forgets to close it because he or she leaves halfway, so it cannot be said that the user is interested in the agricultural product; based on this, it is necessary to judge whether the target user has an implicit interest in any of the aforementioned agricultural products based on the operation time; specifically, the judgment process is shown in the following step S34.
[0107] S34. Determine whether there is any operation duration within the preset time range among the multiple determined operation durations; in this embodiment, the preset time range can be specifically set according to actual use and is not specifically limited here; wherein, if there is an operation duration within the preset time range, it means that the target user has an implicit interest in any agricultural product. At this time, the behavioral characteristic value of the target user for the said any agricultural product can be set to 1; otherwise, there is no implicit interest, and the behavioral characteristic value can be directly set to 0; wherein, the above process is shown in the following step S35.
[0108] S35. If so, the target user's behavior characteristic value for any of the agricultural products is set to 1; otherwise, the target user's behavior characteristic value for any of the agricultural products is set to 0, and after traversing the operation behavior data corresponding to all agricultural products, the target user's behavior characteristic value for each agricultural product is obtained.
[0109] Based on the aforementioned steps S31 to S35, the behavioral characteristic value of the target user for any of the aforementioned agricultural products can be obtained, and then, using the same principle, the behavioral characteristic value of the target user for each agricultural product can be obtained; finally, the aforementioned behavioral characteristic value and the first attention level can be combined to construct the first behavioral characteristic vector of the target user; wherein, the specific construction process of the first behavioral characteristic vector can be but is not limited to as shown in the following step S36.
[0110] S36. Based on the first attention level of the target user for each agricultural product and the behavioral characteristic value of the target user for each agricultural product, a first behavioral characteristic vector of the target user is constructed; in this embodiment, the behavioral characteristic value of any agricultural product is multiplied by the corresponding first attention level to obtain the actual behavioral characteristic value of the target user for any agricultural product, and then, each actual behavioral characteristic value is used to construct a first behavioral characteristic vector (the first behavioral characteristic vector is a row vector).
[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 designated user can be constructed using the same principle; then, the designated user most similar to the target user can be determined based on the first behavioral feature vector and each second behavioral feature vector; wherein, the process of determining the designated user most similar to the target user can be, but is not limited to, as shown in the following step S4.
[0112] S4. Based on the first behavioral feature vector and each second behavioral feature vector, the target user and each designated user are clustered to obtain multiple user clusters; in specific implementation, this embodiment clusters users by user similarity, so that each user in the obtained user cluster including the target user is regarded as the user most similar to the target user; wherein the aforementioned clustering process can be, but is not limited to, the following steps S41 to S47.
[0113] S41. Based on the first behavioral feature vector and each second behavioral feature vector, determine the similarity between the target user and each designated user, and based on the similarity between the target user and each designated user, perform initial clustering processing on the target user and each designated user to obtain multiple initial user clusters; in specific applications, the first behavioral feature vector and each second behavioral feature vector can be used to calculate the Euclidean distance between the target user and each designated user, and then use the Euclidean distance as the similarity between the target user and each designated user; at the same time, for example, but not limited to, based on the similarity between the target user and each designated user, and using the proximity propagation clustering algorithm, perform initial clustering processing on the aforementioned users, thereby obtaining multiple initial user clusters; of course, the proximity propagation clustering algorithm is a commonly used algorithm for user clustering, and its principle will not be repeated here.
[0114] After obtaining multiple initial user clusters, in order to further improve the accuracy of clustering, this embodiment determines a baseline user cluster based on the clustering accuracy of each initial user cluster, and then performs secondary clustering on users who are not in the baseline user cluster; finally, the cluster obtained through secondary clustering can be used as the user cluster; specifically, the secondary clustering process can be but is not limited to the following steps S42 to S47.
[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 sorted sequence; in specific applications, take any initial user cluster as an example to illustrate the calculation process of clustering accuracy, and the process can be but is not limited to the following steps S42a to S42f.
[0116] S42a. For any initial user cluster among the multiple initial user clusters, calculate the similarity between the j-th user in the any initial user cluster and the remaining users in the any initial user cluster; in this embodiment, the behavioral feature vector of each user in any initial user cluster has been constructed in the aforementioned step S3, and therefore, the similarity between the j-th user and the remaining users in the any initial user cluster can be calculated based on the behavioral feature vector; and after calculating the similarity between the j-th user and the remaining users, a first average similarity can be obtained based on the calculated multiple similarities, and the process is shown in the following step S42b.
[0117] S42b. Determine a first average similarity based on the similarity between the j-th user in any of the initial user clusters and the remaining users in any of the initial user clusters; in this embodiment, assuming that 5 similarities are calculated in step S42a, the average of the 5 similarities is calculated as the first average similarity.
[0118] After obtaining the first average similarity, the similarity between the j-th user and the remaining 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 the remaining initial user clusters; wherein the aforementioned calculation process is shown in the following steps S42c-S42d.
[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 any target cluster, and each target cluster is an initial user cluster excluding any initial user cluster from the multiple initial user clusters; in specific applications, for any target cluster, first calculate the similarity between the j-th user and each user in the any target cluster, and then take the average to obtain the similarity between the j-th user and the any target cluster; of course, the similarity calculation process between it and other target clusters is the same, and its principle will not be repeated.
[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 of the initial user clusters can be calculated in combination with the aforementioned first average similarity. The calculation process can be, but is not limited to, as shown in 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 of the initial user clusters; in specific implementation, for example, but not limited to, select the minimum similarity from the similarities between the j-th user and each target cluster; then, based on the first average similarity and the minimum similarity, and in accordance with the following formula (3), calculate the clustering accuracy of the j-th user relative to any of the initial user clusters.
[0122]
[0123] In the above formula (3), s j represents the clustering accuracy of the jth user relative to any of the initial user clusters, s min Represents the minimum similarity, s′ j represents the first average similarity.
[0124] In this way, through the aforementioned formula (3), the clustering accuracy of the j-th user relative to any of the aforementioned initial user clusters can be calculated; then, using the same principle, the clustering accuracy of the remaining users in any of the aforementioned initial user clusters relative to any of the initial user clusters can be calculated; finally, the clustering accuracy of any of the initial user clusters can be obtained based on the clustering accuracy of each user in any of the initial user clusters relative to the initial user cluster; specifically, the cyclic calculation process is shown in the following step S42e.
[0125] S42e. Add 1 to j and recalculate the similarity between the j-th user in any of the initial user clusters and the remaining users in any of the initial user clusters until j is equal to M, and obtain the clustering accuracy of each user relative to any of the initial user clusters, wherein the initial value of j is 1, and M is the total number of users in any of the initial user clusters; in specific implementation, after obtaining the clustering accuracy of each user in any of the aforementioned initial user clusters relative to the cluster, the clustering accuracy of any of the initial user clusters can be calculated based on this, and the process is shown in the following step S42f.
[0126] S42f. Determine the clustering accuracy of any initial user cluster based on the clustering accuracy of each user relative to any initial user cluster. In this embodiment, the average value of the clustering accuracy of each user in any initial user cluster relative to the cluster may be used as the clustering accuracy of the initial user cluster, but is not limited to the average value.
[0127] Therefore, through the aforementioned steps S42a to S42f, the clustering accuracy of each initial user cluster can be calculated, and then, based on the clustering accuracy of each initial user cluster, a baseline user cluster can be determined from multiple initial user clusters; wherein, the process of determining the baseline user cluster is shown in the following step S43.
[0128] S43. Select the first k initial user clusters from the sorted sequence as the benchmark user clusters, where k is an integer greater than 1. In this embodiment, the value of k is 3. Of course, it can also be specifically set according to actual use and is not limited to the above example.
[0129] After obtaining the benchmark user cluster, a secondary clustering process may be performed on the users in the remaining initial user clusters in the multiple initial user clusters. The process may be, but is not limited to, steps S44 to S47 as shown below.
[0130] S44. Obtain a user set to be divided, wherein the user set to be divided includes users in all initial user clusters in the sorted sequence except the reference user cluster. In this embodiment, assuming that there are five initial user clusters, the user set to be divided is composed of users in the 4th and 5th 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 divided is the same as in the above example and will not be repeated here.
[0131] After obtaining the user set to be divided, the membership degree of each user relative to each benchmark user cluster can be calculated, and based on this, secondary clustering of each user in the user set to be divided can be performed. The process is shown in the following steps S45 to S47.
[0132] S45. For the i-th user in the user set to be divided, calculate the membership between the i-th user and each benchmark user cluster; in specific implementation, the following takes any benchmark user cluster as an example to illustrate the calculation process of the membership, which may include but is not limited to: (1) for any benchmark user cluster, first divide the i-th user into the any benchmark user cluster; (2) calculate the similarity between the i-th user and each benchmark user in any of the aforementioned benchmark user clusters, and take the average to obtain a 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 between the i-th user and any of the aforementioned benchmark user clusters; specifically, the calculation process in step (3) can refer to step S42c, and the calculation in step (4) can use the aforementioned formula (3), and its principle will not be repeated.
[0133] Thus, through the aforementioned step S45, the membership between the i-th user and each benchmark user cluster can be calculated; then, the i-th user can be divided according to the membership, and the process is shown in the following step S46.
[0134] S46. Classify the i-th user into the benchmark user cluster with the largest membership.
[0135] After the division of the i-th user is completed, the division of the remaining users in the user set to be divided can be carried out using the same principle, wherein the cyclic division process can be but is not limited to the following step S47.
[0136] S47. Increment i by 1 and recalculate the degree of membership between the i-th user and each benchmark user cluster until i equals n, completing the division of all users in the user set to be divided to obtain multiple user clusters, where the initial value of i is 1 and n is the total number of users in the user set to be divided.
[0137] Through the above steps, each user in the user set to be divided can be divided into a benchmark user cluster, and after the division is completed, multiple new benchmark user clusters can be obtained; finally, the multiple new benchmark user clusters can be used as user clusters; and after obtaining the user clusters, the users in the user cluster containing the target user can be regarded as users with the same or similar preferences as the target user. Based on this, the agricultural products of the target user can be recommended based on the agricultural products that each user in the user cluster containing the target user pays attention to; wherein, the agricultural product recommendation process is shown in the following steps S5 and S6.
[0138] S5. Filter out 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 use the agricultural products that each user in the target cluster is interested in to form a set of agricultural products to be recommended, wherein the target cluster is a user cluster that includes the target user in the multiple user clusters; in specific applications, each user in the target cluster is represented as a user who has the same agricultural product preference 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 based on this, agricultural product recommendations can be made.
[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 determined, so that the agricultural products with a behavioral feature value of 1 are used as the agricultural products that the target user is interested in; then, the number of times the target user pays attention to each agricultural product in the agricultural products that the target user is interested in is counted, and the products are sorted from high to low according to the number of attentions, so as to obtain a set of products to be recommended; specifically, assuming that the agricultural products that each user in the target cluster is interested in are: corn, rice, loofah, and bitter melon; among them, 5 users in the target cluster have a behavioral feature value of 1 for corn (i.e., the number of times corn is paid attention to is 5), 4 users have a behavioral feature value of 1 for rice (i.e., the number of times rice is paid attention to is 4), 2 users have a behavioral feature value of 1 for bitter melon, and 1 user has a behavioral feature value of 1 for loofah, then, the set of agricultural products to be recommended is: corn, rice, bitter melon, and loofah; of course, the above examples are only for illustration, and when the agricultural products that the target user is interested in and the number of times they pay attention are different, the process of obtaining the agricultural products to be recommended is the same as the above examples, and will not be repeated here.
[0140] After obtaining the target user's agricultural product set to be recommended, product recommendations can be made based on the set, and the process can be but not limited to the following step S6.
[0141] S6. Based on the set of agricultural products to be recommended, recommend agricultural products to the target user. In this embodiment, for example, the top three or top five agricultural products in the set of agricultural products to be recommended may be recommended to the target user, but is not limited to. The recommendation method may be, but is not limited to, displaying on the homepage of a designated platform. Of course, other methods are also possible and are not specifically limited here.
[0142] Therefore, through the agricultural product recommendation method based on user attention described in detail in the aforementioned steps S1 to S6, the present invention determines the target user's attention to agricultural products based on user behavior during the recommendation process, and uses the attention and target user's behavior data to construct a behavioral feature vector that can reflect the user's preference; then, based on the user's behavior feature vector, the user is clustered to obtain a cluster composed of multiple users with the same or similar preferences; finally, the agricultural products of the target user can be recommended based on the agricultural products that each user in the user cluster pays attention to; thus, the present invention uses attention to reflect the changes in user interest in agricultural products and introduces it into the recommendation process; based on this, compared with traditional technologies, the present invention can adapt to changes in user interests and can better explore user interests, thereby improving the accuracy of recommendations and being 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, including:
[0144] A data acquisition unit is used to obtain a first user behavior data set of a target user on a specified platform and a second user behavior data set of several specified users on the specified platform, wherein the first user behavior data set contains the target user's operation behavior data on various agricultural products on the specified platform, and the several specified users are all users on the specified platform except the target user.
[0145] An 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 data set, and to determine the second attention of each designated user to each agricultural product within a specified time period based on the second user behavior data set of each designated user, wherein the specified time period is the behavior time period corresponding to the first user behavior data set.
[0146] The feature construction unit is used to use the first user behavior data set and the first attention of the target user to each agricultural product to construct the first behavior feature vector of the target user, and to use the second user behavior data set of each designated user and the second attention of each designated user to each agricultural product to construct the second behavior feature vector of each designated user.
[0147] A clustering unit is configured to perform clustering processing on the target user and each designated user based on the first behavior feature vector and each second behavior feature vector to obtain a plurality of user clusters.
[0148] The recommendation unit is used to filter out 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 use the agricultural products that each user in the target cluster is interested in to form a set of agricultural products to be recommended, wherein the target cluster is a user cluster among the multiple user clusters that includes the target user.
[0149] The recommendation unit is further configured 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 described in detail 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 communicatively connected in sequence, 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 program and execute the agricultural product recommendation method based on user attention as described in the first aspect of the embodiment.
[0152] For example, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in first-out memory (FIFO), and / or first-in last-out memory (FILO); specifically, the processor may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor may be implemented in at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Furthermore, the processor may include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); and the coprocessor is a low-power processor for processing data in a standby state.
[0153] In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. For example, the processor may be, but is not limited to, a microprocessor of the STM32F105 series, a reduced instruction set computer (RISC) microprocessor, an X86 architecture processor, or a processor with an integrated embedded neural network processing unit (NPU); the transceiver may be, but is not limited to, a wireless fidelity (WIFI) wireless transceiver, a Bluetooth wireless transceiver, a general packet radio service technology (GPRS) wireless transceiver, a ZigBee protocol (a low-power local area network protocol based on the IEEE802.15.4 standard, ZigBee) wireless transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. In addition, 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 described in detail here.
[0155] The fourth aspect of this embodiment provides a storage medium that stores instructions for 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, and when the instructions are run on a computer, the agricultural product recommendation method based on user attention as described in the first aspect of the embodiment is executed.
[0156] The storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash drive and / or a memory stick, and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[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 described in detail here.
[0158] The fifth aspect of this embodiment provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute 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 only 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 shall be included in the scope of protection of the present invention.
Claims
1. A method for recommending agricultural products based on user attention, characterized in that: include: Obtaining a first user behavior dataset of a target user on a designated platform and a second user behavior dataset of several designated users on the designated platform, wherein the first user behavior dataset includes 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; Determining, based on the first user behavior data set, a first degree of attention of the target user to each agricultural product within a specified time period; and determining, based on the second user behavior data set of each designated user, a second degree of attention of each designated user to each agricultural product within a specified time period, wherein the specified time period is a behavior time period corresponding to the first user behavior data set; constructing a first behavior feature vector of the target user using the first user behavior dataset and the first attention level of the target user for each agricultural product, and constructing a second behavior feature vector of each designated user using the second user behavior dataset of each designated user and the second attention level of each designated user for each agricultural product; performing clustering processing on the target user and each designated user based on the first behavior feature vector and each second behavior feature vector to obtain a plurality of user clusters; Filtering a target cluster from a plurality of user clusters, and obtaining agricultural products that are of interest to each user in the target cluster, so as to form a set of agricultural products to be recommended using the agricultural products that are of interest to each user in the target cluster, wherein the target cluster is a user cluster among the plurality of user clusters that includes the target user; Based on the set of agricultural products to be recommended, agricultural products are recommended to the target user.
2. The method according to claim 1, characterized in that Any operation behavior data in the first user behavior data set includes: operation start time and operation end time; Determining the target user's first level of interest in each agricultural product within a specified time period based on the first user behavior data set includes: For any agricultural product, filtering the target user's operation behavior data on the agricultural product from the first user behavior data set, and using the filtered operation behavior data to determine the target user's total operation duration, number of operations, earliest operation start time, and latest operation start time on the agricultural product; Calculating a first initial attention degree of the target user to the any agricultural product based on access time according to the earliest operation start time and the latest operation start time; calculating, based on the total operation duration and the number of operations, a second initial attention degree of the target user to the any agricultural product based on the operation frequency; The first initial attention level and the second initial attention level are used to determine the first attention level of the target user for the any agricultural product within a specified time period.
3. The method according to claim 2, characterized in that Calculating, based on the earliest operation start time and the latest operation start time, a first initial attention degree of the target user to the any agricultural product based on access time, including: Obtaining a time interval for the target user to use the designated platform; Determining the target user's attention time interval for the any agricultural product according to the earliest operation start time and the latest operation start time; Based on the usage time interval and the attention time interval, and according to the following formula (1), the first initial attention degree is calculated; In the above formula (1), g1 represents the first initial attention degree, t1 represents the attention time interval, t2 represents the usage time interval, and γ represents the weight coefficient.
4. The method according to claim 2, characterized in that Calculating, based on the total operation duration and the number of operations, a second initial attention degree of the target user to the any agricultural product based on the operation frequency, including: Using the first user behavior dataset, determining the total number of times the target user pays attention to agricultural products and the total duration of their attention to agricultural products; Determining the duration of the target user's attention to the agricultural product based on the total operation duration, and determining the number of times the target user has paid attention to the agricultural product based on the number of operations; Based on the total number of times the agricultural product is paid attention to, the total duration of the attention to the agricultural product, the duration of the attention and the number of times of attention, and according to the following formula (2), the second initial attention degree is calculated; 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; Accordingly, determining the first attention degree of the target user to the any agricultural product within a specified time period by using the first initial attention degree and the second initial attention degree includes: The product of the first initial attention degree and the second initial attention degree is used as the first attention degree of the target user to the any agricultural product within a specified time period.
5. The method according to claim 1, wherein Any operation behavior data in the first user behavior data set 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; The first user behavior dataset and the first attention level of the target user to each agricultural product are used to construct a first behavior feature vector of the target user, including: For any agricultural product, filtering the target user's operation behavior data on the agricultural product from the first user behavior data set, and determining 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, determining the operation duration of each target data item based on the operation start time and operation end time in each target data item in the target data set, wherein the target data in the target data set is the operation behavior data that contains browsing behavior in the filtered operation behavior data; Determining whether any of the determined multiple operation durations is within a preset duration range; If yes, the target user's behavior characteristic value for any of the agricultural products is set to 1; otherwise, the target user's behavior characteristic value for any of the agricultural products is set to 0, and after traversing all the operation behavior data corresponding to all agricultural products, the target user's behavior characteristic value for each agricultural product is obtained; A first behavior feature vector of the target user is constructed based on the first attention degree of the target user to each agricultural product and the behavior feature value of the target user to each agricultural product.
6. The method according to claim 1, characterized in that Based on the first behavior feature vector and each second behavior feature vector, clustering processing is performed on the target user and each designated user to obtain multiple user clusters, including: Determining the similarity between the target user and each designated user based on the first behavior feature vector and each second behavior feature vector, and performing initial clustering processing on the target user and each designated user based on the similarity between the target user and each designated user to obtain a plurality of 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 benchmark user clusters, where k is an integer greater than 1; Acquire a user set to be divided, wherein the user set to be divided includes users in all initial user clusters in the sorting sequence except the reference user cluster; For the i-th user in the user set to be divided, calculate the membership between the i-th user and each benchmark user cluster; Classify the i-th user into the benchmark user cluster with the largest membership; Increment i by 1 and recalculate the membership between the i-th user and each benchmark user cluster until i equals n. This completes the division of all users in the user set to be divided to obtain multiple user clusters, where the initial value of i is 1 and n is the total number of users in the user set to be divided.
7. The method according to claim 6, characterized in that Calculate the clustering accuracy of each initial user cluster, including: For any initial user cluster among the multiple initial user clusters, calculating the similarity between the j-th user in the initial user cluster and the remaining users in the initial user cluster; Determining a first average similarity based on similarities between the j-th user in any of the initial user clusters and the remaining users in any of the initial user clusters; Calculating 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 any target cluster, and each target cluster is an initial user cluster in the multiple initial user clusters excluding the any initial user cluster; Calculating the clustering accuracy of the j-th user relative to any of the initial user clusters based on the first average similarity and the similarities between the j-th user and each target cluster; Increment j by 1 and recalculate the similarity between the jth user in any of the initial user clusters and the remaining users in any of the initial user clusters until j equals M, and then obtain the clustering accuracy of each user relative to any of the initial user clusters, where the initial value of j is 1 and M is the total number of users in any of the initial user clusters; The clustering accuracy of any of the initial user clusters is determined according to the clustering accuracy of each user relative to any of the initial user clusters.
8. An agricultural product recommendation system based on user attention, characterized in that: include: a data acquisition unit, configured to acquire a first user behavior dataset of a target user on a designated platform and a second user behavior dataset of a plurality of designated users on the designated platform, wherein the first user behavior dataset includes operation behavior data of the target user on various agricultural products on the designated platform, and the plurality of designated users are all users on the designated platform excluding the target user; an attention calculation unit, configured to determine a first attention degree of a target user for each agricultural product within a specified time period based on the first user behavior data set, and to determine a second attention degree of each designated user for each agricultural product within a specified time period based on the second user behavior data set of each designated user, wherein the specified time period is a behavior time period corresponding to the first user behavior data set; a feature construction unit, configured to construct a first behavior feature vector of the target user using the first user behavior dataset and the first attention level of the target user for each agricultural product, and to construct a second behavior feature vector of each designated user using the second user behavior dataset of each designated user and the second attention level of each designated user for each agricultural product; a clustering unit, configured to perform clustering processing on the target user and each designated user based on the first behavior feature vector and each second behavior feature vector to obtain a plurality of user clusters; a recommendation unit, configured to filter out a target cluster from a plurality of user clusters and obtain agricultural products that are of interest to each user in the target cluster, so as to form a set of agricultural products to be recommended using the agricultural products that are of interest to each user in the target cluster, wherein the target cluster is a user cluster among the plurality of user clusters that includes the target user; The recommendation unit is further configured to recommend agricultural products to the target user based on the set of agricultural products to be recommended.
9. An electronic device, characterized in that: include: A memory, a processor, and a transceiver that are communicatively connected in sequence, wherein 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 any one of claims 1 to 7.
10. A computer program product comprising instructions, characterized in that When the instructions are executed on a computer, the computer is caused to execute the agricultural product recommendation method based on user attention as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Marketing method and system based on customer clustering
CN109615426A
User dynamic classification-based e-commerce platform commodity recommendation method and system
CN111709812A
Portrait clustering method and device and electronic equipment
CN114611628A
Knowledge clustering method and device, computer equipment and storage medium
CN115422360A
User activeness determination method and device and electronic equipment
CN116361549A