| In recent years,e-commerce activities have penetrated into all aspects of people’s daily lives.However,currently,people are still accustomed to purchasing fresh vegetables and meat at vegetable markets or large supermarkets every day;In recent two years,the epidemic caused by the novel coronavirus pneumonia virus has also led to a greater impact on people’s offline shopping activities.In such an environment,e-commerce for agricultural products has received great attention and ushered in new development opportunities.On the other hand,due to special factors such as the timeliness and regionality of agricultural products,traditional recommendation algorithms cannot be fully applicable to the recommendation of agricultural products,and often cannot recommend the agricultural products that users are truly interested in.In response to the above issues,this article proposes an agricultural product recommendation model that integrates spatiotemporal factors,and based on this model,designs and implements an agricultural product e-commerce website based on a We Chat mini program.The recommendation model first incorporates the timeliness factors of agricultural products,user purchase time factors,and spatial location factors of user receipts into the recommendation algorithm,and constructs a collaborative recommendation algorithm that integrates spatiotemporal factors.Then,the agricultural product collaborative recommendation algorithm that integrates spatiotemporal factors was combined with a deep neural network to construct agricultural product recommendation models that integrate spatiotemporal factors.Experiments have shown that the model has good recommendation accuracy.In addition,this system adopts a distributed self-organizing database cluster architecture to address the problem of high traffic on e-commerce websites,which can ensure the stability of data storage.The main research content of this article is as follows:1.Designed and implemented an agricultural product recommendation model that integrates spatiotemporal factors.Firstly,the construction rules of the user agricultural product scoring table were introduced,including scoring principles and blank value filling rules.Secondly,the design process of an agricultural product recommendation algorithm that integrates spatiotemporal factors was introduced in detail;This recommendation algorithm integrates time decay factors,seasonal factors,and spatial distance factors into traditional collaborative recommendation algorithms,and modifies the user agricultural product rating calculation formula to recommend the top 16 agricultural products to users.Then,the purchase frequency,purchase quantity,post purchase evaluation,and browsing time are used as inputs to the deep neural network.The recommendation values of the first 16 agricultural products of the collaborative recommendation algorithm are weighted and summed with the 16 dimensional hidden feature vectors of the fourth hidden layer of the deep neural network.After being activated by the sigmoid function,they are sent to the next hidden layer to complete the fusion of the collaborative recommendation algorithm and the deep neural network.The final output is 6 recommended agricultural products.Finally,this article compares the accuracy of this algorithm with traditional recommendation algorithms and deep learning based recommendation algorithms,and analyzes the comparison results.2.In response to the high data throughput of the e-commerce system in this article,a database architecture combining Redis in memory real-time database and My SQL persistent database is adopted,and a distributed self-organizing Redis database cluster node management strategy and data update mechanism are proposed,which can effectively accelerate the efficiency of system data access.This strategy does not set up a database management node,but rather the business server uses UDP packets to request the load of Redis nodes.Each Redis node independently calculates its own load,and then returns the load to the business server,which selects the appropriate Redis node to access the data.In addition,in terms of Redis data updates,the system adopts a data update strategy that combines timed and lazy updates.Lazy updates can avoid resource consumption of data updates,and timed updates can ensure data hit rates,making system data updates balance system load and data hit rates.3.Based on the above algorithms and strategies,a certain agricultural product e-commerce system has been implemented.Based on the analysis of agricultural product e-commerce,the entire system was designed;Then,based on the We Chat mini program,the system was coded,implemented,and rigorously tested.Experiments have shown that this system can accurately recommend agricultural products to consumers. |