Agricultural product purchase behavior prediction method and system based on graph neural network

By introducing multi-scale variational graph autoencoder and sub-graph segmentation strategies in the prediction of agricultural product purchase behavior, the shortcomings in the prior art in capturing graph structural features and efficient training are solved, and more efficient and accurate prediction results are achieved.

CN119579236APending Publication Date: 2025-03-07TIANJIN AGRICULTURE COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411799803.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing agricultural product purchasing behavior prediction method based on graph neural network is not comprehensive enough in capturing the local and global structural characteristics of the graph, and is directly trained on large-scale graphs, resulting in excessive computing and storage requirements and low training efficiency.

Method used

A multi-scale variational graph autoencoder is introduced. By combining sub-graph information at different scales, the local and global structural features of the graph are captured, and the sub-graph segmentation strategy is adopted to divide the large-scale graph data into several sub-graphs, reducing computing and storage requirements and accelerating the training process.

Benefits of technology

Improve the richness and diversity of node representations, improve the accuracy of prediction, reduce noise and redundant information, reduce computing and storage requirements, and accelerate the training process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579236A_ABST
    Figure CN119579236A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing and artificial intelligence, in particular to an agricultural product purchase behavior prediction method and system based on a graph neural network. According to the technical scheme, the agricultural product purchase behavior prediction method and system based on the graph neural network comprise the agricultural product purchase behavior prediction method based on the graph neural network; compared with a traditional agricultural product purchase behavior prediction method based on a graph neural network, the method adopts a traditional graph neural network model to carry out feature extraction and relation modeling, and generally, training is directly carried out on a large-scale graph, so that the calculation and storage requirements are too high, the training efficiency is low, and the prediction efficiency is high. According to the agricultural product purchase behavior prediction method based on the graph neural network, a multi-scale variational graph auto-encoder is introduced, local and global structure features of the graph can be captured more comprehensively, node representation richness and diversity are improved, prediction accuracy is improved, calculation and storage requirements are reduced through a static sub-graph segmentation method, and the prediction efficiency is improved. And the training process is accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing and artificial intelligence, and in particular to a method and system for predicting agricultural product purchasing behavior based on a graph neural network. Background Art

[0002] With the rapid development of e-commerce, agricultural products e-commerce has become an important force in promoting agricultural modernization. However, there are many types of agricultural products and diverse consumer demands. How to accurately predict consumer purchasing behavior and provide personalized recommendation services for e-commerce platforms has become an urgent problem to be solved.

[0003] Existing methods for predicting agricultural product purchasing behavior based on graph neural networks use traditional graph neural network models for feature extraction and relationship modeling, but they may not be comprehensive enough in capturing the local and global structural features of the graph. At the same time, they are generally trained directly on large-scale graphs, resulting in excessively high computing and storage requirements and low training efficiency.

[0004] In view of the problem that the existing agricultural product purchasing behavior prediction methods based on graph neural networks are generally trained directly on large-scale graphs, resulting in excessively high computing and storage requirements and low training efficiency, this agricultural product purchasing behavior prediction method based on graph neural networks introduces a multi-scale variational graph autoencoder. By combining sub-graph information of different scales, it can more comprehensively capture the local and global structural features of the graph, improve the richness and diversity of node representation, and thus improve the accuracy of prediction. At the same time, a sub-graph segmentation strategy is adopted to divide large-scale graph data into several sub-graphs, which reduces noise and redundant information and improves the quality of graph representation. Through the static sub-graph segmentation method, the computing and storage requirements are reduced and the training process is accelerated. Summary of the invention

[0005] In order to overcome the problems of existing graph neural network-based agricultural product purchasing behavior prediction methods, traditional graph neural network models are used for feature extraction and relationship modeling. However, they may not be comprehensive enough in capturing the local and global structural features of the graph. At the same time, they are generally trained directly on large-scale graphs, resulting in excessive computing and storage requirements and low training efficiency.

[0006] The technical solution of the present invention is: a method and system for predicting agricultural product purchasing behavior based on graph neural network, comprising the following steps:

[0007] S11: First, data related to agricultural product purchasing behavior is collected and preprocessed;

[0008] S12: Convert the preprocessed data into a graph structure;

[0009] S13: Randomly split the graph data to speed up the training process;

[0010] S14: Training the variational graph autoencoder in multiple dimensions;

[0011] S15: Use the trained model to predict links and purchase behavior.

[0012] Preferably, the data collection and preprocessing process includes the following steps:

[0013] S21: Collect data related to agricultural product purchasing behavior, including but not limited to user purchase history, product information, user characteristics and other related information;

[0014] S22: Preprocess the collected data, including using mean filling, interpolation or deleting records with more missing values ​​to handle missing values, standardizing or normalizing numerical data to normalize data, and deleting duplicate records to deduplicate data.

[0015] Preferably, when constructing the graph, the following steps are included:

[0016] S31: Convert the preprocessed data into a graph structure, construct a user-product graph, use an adjacency list, adjacency matrix or graph database to initialize an empty graph, add user and product nodes to the graph, and each node contains its unique identifier and attributes;

[0017] S32: Mark in the graph that each user and each product is a node in the graph;

[0018] S33: The purchase behavior between the user and the product is taken as an edge, and the weight of the edge can represent the purchase frequency or rating;

[0019] S34: quantize the features of users and products to form a node feature matrix;

[0020] S35: Construct an adjacency matrix to represent the relationship between users and products.

[0021] Preferably, when performing sub-graph segmentation, the following steps are included:

[0022] S41: Determine the appropriate number of subgraphs through experiments, balancing computing resources and model accuracy;

[0023] S42: Use static subgraph segmentation methods, such as random edge-level partitioning algorithms, to divide large-scale graph data into several subgraphs to reduce computing and storage requirements and speed up the training process.

[0024] Preferably, when performing variational graph autoencoder training, the following steps are included:

[0025] S51: Use a multi-scale variational graph autoencoder to train the segmented sub-graphs;

[0026] S52: The encoder uses a graph attention network to encode the input subgraph into a low-dimensional potential representation, and the decoder reconstructs the subgraph according to the potential representation and calculates the reconstruction error;

[0027] S53: Combine sub-graph information of different scales to capture local and global structural features of the graph;

[0028] S54: Combine subgraph information of different scales to improve the richness and diversity of node representation.

[0029] The structure of the encoder is as follows: m =GAT μ (X m ,A m ),logσ m =GAT σ (X m ,A m ), where μ m and σ m Denote the potential representation Z m The encoder outputs the latent representation Z of each sub-graph m , assuming These representations capture the global and local structural features of the subgraphs, providing rich contextual information for the link prediction task.

[0030] Decoder: Design a decoder to decode the aggregated node feature vector into a probability vector of purchase behavior. The decoder can use an inner product decoder to map the node feature vector to a specific purchase probability. The decoder formula is as follows: Among them, σ is the sigmoid activation function, this operation will potentially represent Z m Mapped to a symmetric adjacency matrix Its elements represent the connection probability between nodes, that is, the probability of purchase.

[0031] Preferably, when performing model training evaluation and purchase behavior prediction, the following steps are included:

[0032] S61: Use the cross entropy loss function to train the entire graph neural network model, update the model parameters through the back propagation algorithm, and optimize the prediction performance;

[0033] S62: Use AUC and precision indicators to evaluate the prediction performance of the model to ensure the accuracy and reliability of the model;

[0034] S63: Based on the trained model, predict the agricultural product purchase behavior that has not occurred;

[0035] S64: Input the agricultural products and consumer information to be predicted, construct the corresponding graph structure, use the trained graph neural network model to process and output the purchase probability of each consumer for each agricultural product;

[0036] S65: Based on these purchase probabilities, the e-commerce platform makes accurate product recommendations and formulates marketing strategies, and generates a recommendation list.

[0037] A system for predicting agricultural product purchasing behavior based on graph neural network, including the following modules:

[0038] Data collection module: collects data related to agricultural product purchasing behavior, including but not limited to user purchase history, product information, user characteristics, etc., to provide basic data support for subsequent steps;

[0039] Graph construction module: used to convert the data into a graph structure;

[0040] Subgraph segmentation module: It performs subgraph segmentation on large-scale graph data to reduce noise and redundant information, improve the quality of graph representation, reduce computing and storage requirements, and accelerate the training process;

[0041] Multi-scale variational graph autoencoder module: used to train segmented subgraphs;

[0042] Link prediction module: used to perform link prediction using the trained model.

[0043] Preferably, the graph construction module is used to convert the collected data into a graph structure and construct a user-product graph, in which each user and each product serves as a node in the graph, and the purchase behavior between the user and the product serves as an edge, to facilitate subsequent graph neural network processing.

[0044] Preferably, the multi-scale variational graph autoencoder module is used to train the segmented sub-graphs using a multi-scale variational graph autoencoder to capture the local and global structural features of the graph, improve the richness and diversity of node representations, and provide accurate potential representations for link prediction.

[0045] Preferably, the link prediction module is used to use the trained multi-scale variational graph autoencoder model to conduct in-depth analysis of the potential relationship between users and agricultural products and predict users' possible future purchasing behavior. Through link prediction, the system can more accurately identify users' interests and preferences for products, thereby providing users with more accurate product recommendations. At the same time, as user purchase data continues to accumulate, the link prediction module can regularly update the graph structure and features, and retrain the graph neural network model to improve prediction accuracy and generalization ability.

[0046] Beneficial effects of the present invention:

[0047] 1. Compared with the traditional agricultural product purchasing behavior prediction method based on graph neural network, the traditional graph neural network model is used for feature extraction and relationship modeling, but it may not be comprehensive enough in capturing the local and global structural features of the graph. At the same time, it is generally trained directly on large-scale graphs, resulting in excessive computing and storage requirements and low training efficiency. This agricultural product purchasing behavior prediction method based on graph neural network introduces a multi-scale variational graph autoencoder. By combining subgraph information of different scales, it can more comprehensively capture the local and global structural features of the graph, improve the richness and diversity of node representation, and thus improve the accuracy of prediction. At the same time, a subgraph segmentation strategy is adopted to divide large-scale graph data into several subgraphs, which reduces noise and redundant information and improves the quality of graph representation. Through the static subgraph segmentation method, the computing and storage requirements are reduced and the training process is accelerated;

[0048] 2. The graph attention neural network is used to learn the complex characteristics of agricultural products and users, which improves the accuracy and stability of predictions. It can capture the complex relationships between agricultural products and users and integrate these relationships into the prediction model, thereby improving the accuracy and stability of predictions. At the same time, the variational graph autoencoder is used as the basic model, combined with the graph attention network, to fully mine the information in the historical purchase data, realize the end-to-end training and prediction process, make full use of external influencing factors, integrate them into the graph structure as constraints, and enhance the sensitivity of the prediction model to the changing trend and fluctuation range of purchasing behavior. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 What is shown is a main flow chart of a method and system for predicting agricultural product purchasing behavior based on a graph neural network of the present invention;

[0050] Figure 2 What is shown is a flowchart of a method and system for predicting agricultural product purchase behavior based on a graph neural network of the present invention and predicting a user's unpurchased goods;

[0051] Figure 3 What is shown is a method for predicting agricultural product purchase behavior based on graph neural network and a schematic diagram of the system diagram construction process of the present invention;

[0052] Figure 4 What is presented is a method for predicting agricultural product purchasing behavior based on graph neural network and a schematic diagram of the system variational graph autoencoder training process of the present invention.

[0053] Figure 5 The diagram shows a method for predicting agricultural product purchase behavior based on graph neural network and a schematic diagram of the system model training evaluation and purchase behavior prediction process of the present invention. DETAILED DESCRIPTION

[0054] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0055] See also Figure 1-Figure 5 The present invention provides an embodiment: a method and system for predicting agricultural product purchasing behavior based on a graph neural network, comprising the following steps:

[0056] S11: First, data related to agricultural product purchasing behavior is collected and preprocessed;

[0057] S12: Convert the preprocessed data into a graph structure;

[0058] S13: Randomly split the graph data to speed up the training process;

[0059] S14: Training the variational graph autoencoder in multiple dimensions;

[0060] S15: Use the trained model to predict links and purchase behavior.

[0061] Preferably, the data collection and preprocessing process includes the following steps:

[0062] S21: Collect data related to agricultural product purchasing behavior, including but not limited to user purchase history, product information, user characteristics and other related information;

[0063] S22: Preprocess the collected data, including using mean filling, interpolation or deleting records with more missing values ​​to handle missing values, standardizing or normalizing numerical data to normalize data, and deleting duplicate records to deduplicate data.

[0064] Preferably, when constructing the graph, the following steps are included:

[0065] S31: Convert the preprocessed data into a graph structure, construct a user-product graph, use an adjacency list, adjacency matrix or graph database to initialize an empty graph, add user and product nodes to the graph, and each node contains its unique identifier and attributes;

[0066] S32: Mark in the graph that each user and each product is a node in the graph;

[0067] S33: The purchase behavior between the user and the product is taken as an edge, and the weight of the edge can represent the purchase frequency or rating;

[0068] S34: quantize the features of users and products to form a node feature matrix;

[0069] S35: Construct an adjacency matrix to represent the relationship between users and products.

[0070] Preferably, when performing sub-graph segmentation, the following steps are included:

[0071] S41: Determine the appropriate number of subgraphs through experiments, balancing computing resources and model accuracy;

[0072] S42: Use static subgraph segmentation methods, such as random edge-level partitioning algorithms, to divide large-scale graph data into several subgraphs to reduce computing and storage requirements and speed up the training process.

[0073] Preferably, when performing variational graph autoencoder training, the following steps are included:

[0074] S51: Use a multi-scale variational graph autoencoder to train the segmented sub-graphs;

[0075] S52: The encoder uses a graph attention network to encode the input subgraph into a low-dimensional potential representation, and the decoder reconstructs the subgraph according to the potential representation and calculates the reconstruction error;

[0076] S53: Combine sub-graph information of different scales to capture local and global structural features of the graph;

[0077] S54: Combine subgraph information of different scales to improve the richness and diversity of node representation.

[0078] The structure of the encoder is as follows: m =GAT μ (X m ,A m ),logσ m =GAT σ (X m ,A m ), where μ m and σ m Denote the potential representation Z m The encoder outputs the latent representation Z of each sub-graph m , assuming These representations capture the global and local structural features of the subgraphs, providing rich contextual information for the link prediction task.

[0079] Decoder: Design a decoder to decode the aggregated node feature vector into a probability vector of purchase behavior. The decoder can use an inner product decoder to map the node feature vector to a specific purchase probability. The decoder formula is as follows: Among them, σ is the sigmoid activation function, this operation will potentially represent Z m Mapped to a symmetric adjacency matrix Its elements represent the connection probability between nodes, that is, the probability of purchase.

[0080] Preferably, when performing model training evaluation and purchase behavior prediction, the following steps are included:

[0081] S61: Use the cross entropy loss function to train the entire graph neural network model, update the model parameters through the back propagation algorithm, and optimize the prediction performance;

[0082] S62: Use AUC and precision indicators to evaluate the prediction performance of the model to ensure the accuracy and reliability of the model;

[0083] S63: Based on the trained model, predict the agricultural product purchase behavior that has not occurred;

[0084] S64: Input the agricultural products and consumer information to be predicted, construct the corresponding graph structure, use the trained graph neural network model to process and output the purchase probability of each consumer for each agricultural product;

[0085] S65: Based on these purchase probabilities, the e-commerce platform makes accurate product recommendations and formulates marketing strategies, and generates a recommendation list.

[0086] A system for predicting agricultural product purchasing behavior based on graph neural network, including the following modules:

[0087] Data collection module: collects data related to agricultural product purchasing behavior, including but not limited to user purchase history, product information, user characteristics, etc., to provide basic data support for subsequent steps;

[0088] Graph construction module: used to convert the data into a graph structure;

[0089] Subgraph segmentation module: It performs subgraph segmentation on large-scale graph data to reduce noise and redundant information, improve the quality of graph representation, reduce computing and storage requirements, and accelerate the training process;

[0090] Multi-scale variational graph autoencoder module: used to train segmented subgraphs;

[0091] Link prediction module: used to perform link prediction using the trained model.

[0092] Preferably, the graph construction module is used to convert the collected data into a graph structure and construct a user-product graph, in which each user and each product serves as a node in the graph, and the purchase behavior between the user and the product serves as an edge, to facilitate subsequent graph neural network processing.

[0093] Preferably, the multi-scale variational graph autoencoder module is used to train the segmented sub-graphs using a multi-scale variational graph autoencoder to capture the local and global structural features of the graph, improve the richness and diversity of node representations, and provide accurate potential representations for link prediction.

[0094] Preferably, the link prediction module is used to use the trained multi-scale variational graph autoencoder model to conduct in-depth analysis of the potential relationship between users and agricultural products and predict users' possible future purchasing behavior. Through link prediction, the system can more accurately identify users' interests and preferences for products, thereby providing users with more accurate product recommendations. At the same time, as user purchase data continues to accumulate, the link prediction module can regularly update the graph structure and features, and retrain the graph neural network model to improve prediction accuracy and generalization ability.

[0095] Example 1

[0096] The present invention provides a method and system for predicting agricultural product purchasing behavior based on graph neural network. The method aims to achieve accurate prediction of user agricultural product purchasing behavior through the combination of deep learning and graph theory. Figure 1 As shown, the implementation steps of this method will be described in detail below:

[0097] 1. First, the system collects the user's purchase history data, including key information such as user ID, purchased agricultural product ID, purchase time, etc. Then, these data are integrated and constructed into a user-product graph. In this graph, the user ID is used as a node, the agricultural product ID is used as an edge connecting the nodes, and the edge weight is set according to the quantity or frequency of the user's purchase of agricultural products.

[0098] 2. In order to process large-scale user-product graphs more efficiently, the system uses a specific sub-graph segmentation algorithm to divide the original graph into multiple sub-graphs. The number of sub-graphs is set according to actual needs to ensure that each sub-graph contains an appropriate amount of user and agricultural product data for subsequent processing.

[0099] 3. In each subgraph, the system extracts the initial features of each node to form an initial node feature matrix. These initial features include but are not limited to the user's historical purchase records, the attributes of agricultural products (such as type, price, origin, etc.), and other information.

[0100] 4. Next, the system uses the Graph Attention Network (GAT) to encode the node features of each subgraph. Through multiple iterative updates of the graph neural network, the system can extract the deep features of each node and form an encoded node feature matrix.

[0101] 5. Based on the encoded node feature matrix, the system uses the inner product decoder to predict the purchase probability of each node (i.e., user). The prediction result reflects the user's purchase possibility for each agricultural product (i.e., node).

[0102] 6. Based on the predicted purchase probability, the system sorts the purchase items of each user. The sorting result is the user's purchase behavior predicted by the system. Finally, the system generates a recommendation list based on the sorting result and presents the list to the user as a personalized agricultural product purchase recommendation.

[0103] Example 2

[0104] The present invention provides a method and system for predicting agricultural product purchasing behavior based on graph neural network. The flowchart of predicting users' unpurchased goods in Example 2 is described in detail below. Figure 2 As shown:

[0105] Predict the user's purchase behavior for unpurchased goods, take the agricultural products that the user has not purchased as the goods to be predicted, add them to the graph structure as new nodes, extract features for the new nodes, such as price, origin, type, etc., input the updated graph structure and features into the trained graph neural network model for prediction, and the model will output the probability of the user purchasing each unpurchased commodity. According to the purchase probability output by the model, decision support is provided for agricultural product sellers. For example, sellers can adjust inventory and formulate promotion strategies according to the prediction results to better meet user needs. As user purchase data continues to accumulate, the graph structure and features can be updated regularly, and the graph neural network model can be retrained to improve prediction accuracy and generalization ability. Through the flowchart of Example 2, the present invention can realize the prediction of user's purchase behavior of unpurchased agricultural products, provide strong decision support for agricultural product sellers, and at the same time, by regularly updating and optimizing the model, the accuracy and practicality of the prediction results can be ensured.

[0106] Example 3

[0107] The present invention provides a storage medium on which a computer program is stored. When the program is executed by a processor, a method for predicting agricultural product purchasing behavior based on a graph neural network is implemented.

[0108] On another aspect, the present invention also provides a terminal, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes a method for predicting agricultural product purchasing behavior based on a graph neural network.

[0109] The processor is the core component of the terminal, responsible for performing various computing and control tasks. Depending on different needs, the processor can be a general-purpose processor, such as a central processing unit or a network processor. These processors have high computing power and are suitable for processing complex data and algorithms. In addition, the processor can also be a digital signal processor for processing signal and image data.

[0110] In some applications with high performance requirements, application-specific integrated circuits and field-programmable gate arrays can also be used as processors. ASICs have the characteristics of efficient processing capabilities and low power consumption, and are suitable for large-scale data processing. FPGAs are highly programmable and can be customized according to specific needs. They are suitable for application scenarios that require high flexibility. In addition, processors can also include other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components to meet different application requirements.

[0111] Memory is another key component of the terminal, which is used to store computer programs and various data. The memory can be random access memory, read-only memory, flash memory, etc. Computer programs are usually stored in non-volatile memory, such as flash memory, to ensure that the data is not lost after the terminal is powered off, while working data and temporary data are stored in volatile memory, such as RAM, so that the processor can quickly access and process the data.

[0112] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of those skilled in the art without departing from the spirit of the present invention.

Claims

1. A method for predicting agricultural product purchasing behavior based on graph neural network; characterized by: The following steps are included: S11: First, data related to agricultural product purchasing behavior is collected and preprocessed; S12: Convert the preprocessed data into a graph structure; S13: Randomly split the graph data to speed up the training process; S14: Training the variational graph autoencoder in multiple dimensions; S15: Use the trained model to predict links and purchase behavior.

2. The method for predicting agricultural product purchasing behavior based on graph neural network according to claim 1, characterized in that: The following steps are included in data collection and preprocessing: S21: Collect data related to agricultural product purchasing behavior, including but not limited to user purchase history, product information, user characteristics and other related information; S22: Preprocess the collected data, including using mean filling, interpolation or deleting records with more missing values ​​to handle missing values, standardizing or normalizing numerical data to normalize data, and deleting duplicate records to deduplicate data.

3. The method for predicting agricultural product purchasing behavior based on graph neural network according to claim 1, characterized in that: When constructing a graph, the following steps are included: S31: Convert the preprocessed data into a graph structure, construct a user-product graph, use an adjacency list, adjacency matrix or graph database to initialize an empty graph, add user and product nodes to the graph, and each node contains its unique identifier and attributes; S32: Mark in the graph that each user and each product is a node in the graph; S33: The purchase behavior between the user and the product is taken as an edge, and the weight of the edge can represent the purchase frequency or rating; S34: quantize the features of users and products to form a node feature matrix; S35: Construct an adjacency matrix to represent the relationship between users and products.

4. The method for predicting agricultural product purchasing behavior based on graph neural network according to claim 1, characterized in that: When performing sub-graph segmentation, the following steps are included: S41: Determine the appropriate number of subgraphs through experiments, balancing computing resources and model accuracy; S42: Use static subgraph segmentation methods, such as random edge-level partitioning algorithms, to divide large-scale graph data into several subgraphs to reduce computing and storage requirements and speed up the training process.

5. The method for predicting agricultural product purchasing behavior based on graph neural network according to claim 1, characterized in that: When training a variational graph autoencoder, the following steps are included: S51: Use a multi-scale variational graph autoencoder to train the segmented sub-graphs; S52: The encoder uses a graph attention network to encode the input subgraph into a low-dimensional potential representation, and the decoder reconstructs the subgraph according to the potential representation and calculates the reconstruction error; S53: Combine sub-graph information of different scales to capture local and global structural features of the graph; S54: Combine subgraph information of different scales to improve the richness and diversity of node representation.

6. The method for predicting agricultural product purchasing behavior based on graph neural network according to claim 1, characterized in that: When conducting model training evaluation and purchasing behavior prediction, the following steps are included: S61: Use the cross entropy loss function to train the entire graph neural network model, update the model parameters through the back propagation algorithm, and optimize the prediction performance; S62: Use AUC and precision indicators to evaluate the prediction performance of the model to ensure the accuracy and reliability of the model; S63: Based on the trained model, predict the agricultural product purchase behavior that has not occurred; S64: Input the agricultural products and consumer information to be predicted, construct the corresponding graph structure, use the trained graph neural network model to process and output the purchase probability of each consumer for each agricultural product; S65: Based on these purchase probabilities, the e-commerce platform makes accurate product recommendations and formulates marketing strategies, and generates a recommendation list.

7. A method for predicting agricultural product purchasing behavior based on graph neural network according to claims 1-6, characterized in that: A system for predicting agricultural product purchasing behavior based on graph neural network, including the following modules: Data collection module: collects data related to agricultural product purchasing behavior, including but not limited to user purchase history, product information, user characteristics, etc., to provide basic data support for subsequent steps; Graph construction module: used to convert the data into a graph structure; Subgraph segmentation module: It performs subgraph segmentation on large-scale graph data to reduce noise and redundant information, improve the quality of graph representation, reduce computing and storage requirements, and accelerate the training process; Multi-scale variational graph autoencoder module: used to train segmented subgraphs; Link prediction module: used to perform link prediction using the trained model.

8. The agricultural product purchasing behavior prediction system based on graph neural network according to claim 7 is characterized by: The graph construction module is used to convert the collected data into a graph structure and construct a user-product graph, in which each user and each product is a node in the graph, and the purchase behavior between users and products is an edge, to facilitate subsequent graph neural network processing.

9. The agricultural product purchasing behavior prediction system based on graph neural network according to claim 8 is characterized by: The multi-scale variational graph autoencoder module is used to train the segmented sub-graphs using a multi-scale variational graph autoencoder to capture the local and global structural features of the graph, improve the richness and diversity of node representation, and provide accurate potential representation for link prediction.

10. The agricultural product purchasing behavior prediction system based on graph neural network according to claim 9, characterized in that: The link prediction module is used to use the trained multi-scale variational graph autoencoder model to conduct in-depth analysis of the potential relationship between users and agricultural products and predict users' possible future purchasing behavior. Through link prediction, the system can more accurately identify users' interests and preferences for products, thereby providing users with more accurate product recommendations. At the same time, as user purchase data continues to accumulate, the link prediction module can regularly update the graph structure and features, and retrain the graph neural network model to improve prediction accuracy and generalization ability.