Method, system, device and medium for dynamic modeling of supply and demand of food delivery platform based on machine learning
By constructing a graph neural network to process store and regional information, the problem of not being able to capture regional dishes in the supply and demand model of the takeaway platform is solved, and accurate prediction and decision-making support for new stores are achieved.
Patent Information
- Application Number
- CN202510855489.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-25
AI Technical Summary
The existing supply and demand model of takeaway platform cannot effectively capture the demand for dishes in various regions after the store joins, and the traditional model ignores network effects and regional market differences.
A variational autoencoder is used to process the information of the store and the area, build a graph neural network, consider the relationship between the store and the area, and predict the demand for dishes in the area of the new store.
Through the graph neural network, predict the dishes demand of new stores, provide accurate decision-making support, optimize store invitation strategies, and improve platform efficiency.
Smart Images

Figure CN120374236B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and system, device, and medium for dynamic modeling of supply and demand of a food delivery platform based on machine learning. Background Art
[0002] On a food delivery platform, it is necessary to predict the supply and demand relationship between stores acting as suppliers and one or more regions acting as demanders. The supply and demand models constructed in related technologies mainly fall into the following two categories:
[0003] 1) Economic models. These models are generally computationally slow, relatively simple, and limited in flexibility. They typically only apply to a specific region, such as the overall supply and demand relationship in Beijing, and assume that all merchants (i.e., stores) can deliver to all buyers (i.e., regions). These models cannot capture regional markets, such as food delivery platforms, where a particular store only covers a limited area.
[0004] 2) Traditional machine learning models: Currently, this model only evaluates each store individually and ignores network effects, such as the impact of newly introduced stores.
[0005] Therefore, how to effectively capture the supply and demand dynamics of the food delivery platform and evaluate the demand for dishes in various regions after new stores join the food delivery platform has become a technical problem that needs to be solved urgently. Summary of the Invention
[0006] In view of the above problems, this application is proposed to provide a method, system, device, and medium for dynamically modeling the supply and demand of a food delivery platform based on machine learning that overcomes or at least partially solves the above problems. The technical solution is as follows:
[0007] First, a method for modeling the supply and demand dynamics of a food delivery platform based on machine learning is provided, including:
[0008] Obtaining dish information for each of a plurality of existing stores on the food delivery platform as suppliers, obtaining at least one preset area as a demander to which the dishes of each of the existing stores can be delivered, and obtaining historical dish demand data for each of the at least one preset area;
[0009] Using a variational autoencoder to process the dish information of each existing store and extract the key dish information of each existing store, and using a variational autoencoder to process the historical dish demand data of each preset area and extract the key dish demand data of each preset area;
[0010] Using the existing stores and the preset areas as nodes and the relationships between the existing stores and the preset areas as edges, an initial graph neural network for the store areas is constructed;
[0011] The initial graph neural network is trained using the key information of dishes in each existing store and the historical key demand data of dishes in each preset area as node features, and the delivery relationship between each existing store and each preset area, the association relationship between each existing store, and the association relationship between each preset area as edge features to obtain a trained graph neural network;
[0012] For one or more new stores on the food delivery platform, the trained graph neural network is used to predict the dish demand results of any new store in any preset area.
[0013] Secondly, a machine learning-based dynamic modeling system for food delivery platform supply and demand is provided, including:
[0014] an acquisition unit, configured to acquire dish information of each of a plurality of existing stores as suppliers on the food delivery platform, acquire at least one preset area as a demander to which the dishes of each of the existing stores can be delivered, and acquire historical dish demand data of each of the at least one preset area;
[0015] a processing unit, configured to process the dish information of each existing store using a variational autoencoder to extract key dish information of each existing store, and to process the historical dish demand data of each preset area using a variational autoencoder to extract key dish demand data of each preset area;
[0016] A construction unit, configured to construct an initial graph neural network of store areas by using the existing stores and the preset areas as nodes and the relationships between the existing stores and the preset areas as edges;
[0017] a training unit, configured to train the initial graph neural network using the key information of dishes of each existing store and the historical key demand data of dishes in each preset area as node features, and using the delivery relationship between each existing store and each preset area, the association relationship between each existing store, and the association relationship between each preset area as edge features, to obtain a trained graph neural network;
[0018] The prediction unit is used to use the trained graph neural network to predict the dish demand results of one or more new stores on the food delivery platform in any preset area.
[0019] In a third aspect, an electronic device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned methods for dynamic modeling of supply and demand of a food delivery platform based on machine learning.
[0020] In a fourth aspect, a storage medium is provided, which stores a computer program, wherein the computer program is configured to execute any of the above-mentioned machine learning-based food delivery platform supply and demand dynamic modeling methods during runtime.
[0021] By means of the above-mentioned technical solution, the embodiment of the present application provides a method and system, device and medium for dynamic modeling of supply and demand of a takeaway platform based on machine learning. The method uses a graph neural network to characterize the relationship between supply and demand in the takeaway market according to the characteristics of the cross-connections between stores and regions on the takeaway platform. In the characterization process, not only the characteristics of the stores and the characteristics of the regions are considered, but also the distribution relationship between stores and regions, the association relationship between stores and stores, and the association relationship between regions and stores are considered. In order to better consider the association relationship between stores, the present embodiment innovatively utilizes the store's dish information, and uses a variational autoencoder to reduce the dimension of the dish information while extracting key dish information. The present embodiment can evaluate the dish demand situation in each region after the new store joins the takeaway platform by predicting the dish demand results of any new store in any preset area, thereby providing decision support for the takeaway platform to give priority invitation to potential stores. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.
[0023] Figure 1 A flow chart of a method for dynamic modeling of supply and demand of a food delivery platform based on machine learning provided in an embodiment of the present application is shown;
[0024] Figure 2 A schematic diagram of a dynamic modeling framework for supply and demand of a food delivery platform based on machine learning is shown in an embodiment of the present application;
[0025] Figure 3 A structural diagram of a takeaway platform supply and demand dynamic modeling system based on machine learning provided in an embodiment of the present application is shown;
[0026] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] The following describes exemplary embodiments of the present application in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0028] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that such usage is interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "including" and its variations are to be interpreted as open-ended terms meaning "including but not limited to."
[0029] In order to solve the above technical problems, the embodiment of the present application provides a method for dynamic modeling of supply and demand of a takeaway platform based on machine learning, such as Figure 1 As shown, the method for dynamic modeling of supply and demand of a takeaway platform based on machine learning may include the following steps S101 to S105:
[0030] Step S101: obtain dish information of each of the multiple existing stores on the food delivery platform as suppliers, obtain at least one preset area as a demander to which the dishes of each existing store can be delivered, and obtain historical dish demand data of each preset area in at least one preset area.
[0031] For example, suppose there are 1,000 existing stores on the food delivery platform, namely existing store 1, existing store 2, existing store 3...existing store 1,000, and each existing store has its own dish information; a universal dish template can be used here, which is assumed to include 1,600 dishes, namely dish 1, dish 2, dish 3...dish 1600; for existing store 1, use the universal dish template, if existing store 1 has dish 1 in the universal dish template, then set the value of dish 1 to "1", if existing store 1 does not have dish 1 in the universal dish template, then set the value of dish 1 to "0"; similarly, if existing store 1 has dish 2 in the universal dish template, then set the value of dish 2 to "1", if existing store 1 does not have dish 2 in the universal dish template, then set the value of dish 2 to "0", and so on, to obtain the dish information of existing store 1.
[0032] For the existing store 2, use the universal dish template. If the existing store 2 has dish 1 in the universal dish template, set the value of dish 1 to "1"; if the existing store 2 does not have dish 1 in the universal dish template, set the value of dish 1 to "0"; similarly, if the existing store 2 has dish 2 in the universal dish template, set the value of dish 2 to "1"; if the existing store 2 does not have dish 2 in the universal dish template, set the value of dish 2 to "0", and so on. The dish information of the existing store 2 can be obtained.
[0033] By analogy with existing store 1 and existing store 2, the dish information of each of the 1000 existing stores can be obtained. Here, it should be noted that the above examples are only illustrative and do not limit this embodiment.
[0034] In addition, it is assumed that the dishes of the existing store 1 can be delivered to the preset area A1 as the demand side, the dishes of the existing store 2 can be delivered to the preset areas A1 and A2 as the demand side, and the dishes of the existing store 3 can be delivered to the preset areas A3 and A4 as the demand side, and so on. Here, it is possible to determine whether the dishes of the store can be delivered to an area by calculating the distance between the store and the area. If the distance between the store and the area is less than or equal to the preset threshold, it is determined that the dishes of the store can be delivered to the area; if the distance between the store and the area is greater than the preset threshold, it is determined that the dishes of the store cannot be delivered to the area. In addition, it is also possible to determine whether the dishes of the store can be delivered to an area based on the pre-set settings. If the store and the area are pre-set to have a delivery relationship, it is determined that the dishes of the store can be delivered to the area; if the store and the area are pre-set to not have a delivery relationship, it is determined that the dishes of the store cannot be delivered to the area. It should be noted that the examples here are only illustrative and do not limit this embodiment.
[0035] In step S102, a variational autoencoder is used to process the dish information of each existing store, extract the key dish information of each existing store, and a variational autoencoder is used to process the historical dish demand data of each preset area, extract the key dish demand data of each preset area.
[0036] In this step, the variational autoencoder, or VAE (Variational Auto Encoder), is a generative model used to learn the potential representation of data.
[0037] In step S103, each existing store and each preset area is used as a node, and the relationship between each existing store and each preset area is used as an edge to construct an initial graph neural network of the store area.
[0038] In step S104, the key information of dishes in each existing store and the historical key demand data of dishes in each preset area are used as node features, and the distribution relationship between each existing store and each preset area, the association relationship between each existing store, and the association relationship between each preset area are used as edge features to train the initial graph neural network and obtain a trained graph neural network.
[0039] Step S105: For one or more newly added stores on the food delivery platform, the trained graph neural network is used to predict the dish demand results of any newly added store in any preset area.
[0040] In this embodiment, based on the characteristics of cross-connections between stores and regions on the food delivery platform, a graph neural network is used to characterize the relationship between supply and demand in the food delivery market. In the characterization process, not only the characteristics of the stores and the characteristics of the regions are considered, but also the distribution relationship between stores and regions, the association relationship between stores, and the association relationship between regions and stores. In order to better consider the association relationship between stores, this embodiment innovatively utilizes the store's dish information, and uses a variational autoencoder to reduce the dimension of the dish information while extracting key dish information. By predicting the dish demand results of any new store in any preset area, this embodiment can evaluate the dish demand situation in various regions after the new store joins the food delivery platform, thereby providing decision support for the food delivery platform to give priority invitation to potential stores.
[0041] In an embodiment of the present application, a possible implementation method is provided. In step S105 above, for one or more newly added stores on the food delivery platform, the trained graph neural network is used to predict the dish demand results of any newly added store in any preset area. Specifically, the following steps S105-1 to S105-6 may be included:
[0042] Step S105-1, obtaining multiple set historical time periods.
[0043] For example, the plurality of historical time periods are 27 historical time periods, namely historical time period 1, historical time period 2, ..., historical time period 27. It should be noted that the examples herein are merely illustrative and do not limit this embodiment.
[0044] Step S105-2, for each of the multiple historical time periods, obtain the dish information of each of the multiple existing stores on the takeaway platform as suppliers within the historical time period, obtain at least one preset area as a demander to which the dishes of each existing store can be delivered within the historical time period, and obtain historical dish demand data of each preset area within the at least one preset area within the historical time period.
[0045] Taking historical time period 1 as an example, it is possible to obtain the dish information of each of the multiple existing stores on the takeaway platform as suppliers within the historical time period 1, obtain at least one preset area as the demander to which the dishes of each existing store can be delivered within the historical time period 1, and obtain the historical dish demand data of each preset area within at least one preset area within the historical time period 1.
[0046] Taking historical time period 2 as an example, it is possible to obtain the dish information of each of the multiple existing stores on the takeaway platform as suppliers within the historical time period 2, obtain at least one preset area as the demander to which the dishes of each existing store within the historical time period 2 can be delivered, and obtain the historical dish demand data of each preset area within at least one preset area within the historical time period 2.
[0047] By analogy, taking historical time period 27 as an example, it is possible to obtain the dish information of each of the multiple existing stores on the takeaway platform as suppliers within the historical time period 27, obtain at least one preset area as the demander to which the dishes of each existing store within the historical time period 27 can be delivered, and obtain the historical dish demand data of each preset area within at least one preset area within the historical time period 27.
[0048] Step S105-3, use a variational autoencoder to process the dish information of each existing store within the historical time period, extract the key dish information of each existing store within the historical time period, and use a variational autoencoder to process the historical dish demand data of each preset area within the historical time period, and extract the historical dish key demand data of each preset area within the historical time period.
[0049] Step S105-4, input the key information of dishes of each existing store in the historical time period and the key demand data of historical dishes of each preset area in the historical time period into the trained graph neural network, and output the graph feature vector of each existing store in the historical time period and the graph feature vector of each preset area, wherein the graph feature vector of each existing store contains the associated store information, the preset area information with the delivery relationship, and the historical dish demand results in each preset area with the delivery relationship; the graph feature vector of each preset area contains the associated area information, the store information with the delivery relationship, and the historical dish demand results in each existing store with the delivery relationship.
[0050] Step S105-5: Using the graph feature vectors of each existing store in each historical time period and the graph feature vectors of each preset area, the initial regional dish demand prediction model is trained to obtain a trained regional dish demand prediction model.
[0051] In this step, we can build an initial regional food demand prediction model based on MLP (Multi Layer Perceptron) and GRU (Gated Recurrent Unit). The MLP here is a feedforward neural network composed of multiple fully connected layers, and the GRU is a recurrent neural network used to process time series data and can capture the characteristics of dynamic changes over time.
[0052] Step S105-6, for one or more newly added stores on the food delivery platform, the dish information of the one or more newly added stores, the dish information of each of the multiple existing stores on the food delivery platform as suppliers, at least one preset area as the demander to which the dishes of each existing store can be delivered, and the historical dish demand data of each preset area in at least one preset area are sequentially passed through a variational autoencoder, a trained graph neural network, and a trained regional dish demand prediction model to output the dish demand result of any newly added store in any preset area.
[0053] In this step, the trained graph neural network can evaluate the impact of one or more new stores on the food delivery platform after entering the network; the dish information of one or more new stores, the dish information of each of the multiple existing stores on the food delivery platform as suppliers, at least one preset area as the demand side to which the dishes of each existing store can be delivered, and the historical dish demand data of each preset area in at least one preset area are sequentially passed through the variational autoencoder, the trained graph neural network, and the trained regional dish demand prediction model. The dish demand results of any new store in any preset area can be output, and the dish demand results of each existing store in any preset area can also be output, that is, the dish demand results of each existing store in any preset area can be predicted, so as to analyze the impact of one or more new stores on each existing store, provide the food delivery platform with more accurate store invitation priority ranking, and then provide decision support for the food delivery platform to give priority to the invitation of potential stores.
[0054] See also Figure 2 The region's x-vector includes historical dish demand data (such as historical dish sales data and historical dish quantity data), as well as information such as the region name, address, and regional characteristics. The store's z-vector includes dish information, as well as information such as the store name and address. It should be noted that the four small squares corresponding to the x-vector and the five small squares corresponding to the z-vector are merely illustrative and do not limit this embodiment.
[0055] A variational autoencoder (VAE) is used to process the menu information of each existing store and extract key information about each dish. The VAE is also used to process historical menu demand data for each pre-set area and extract key information about each dish. The VAE performs dimensionality reduction and compression while ensuring that the extracted dimensions closely replicate the information of the input variables. This means that the decoder can restore the information of the input variables as closely as possible. The loss of the VAE is incorporated into the loss of the subsequent initial graph neural network training.
[0056] Taking each existing store and each preset area as a node, and the relationship between each existing store and each preset area as an edge, an initial graph neural network for the store area is constructed; taking the key information of the dishes of each existing store and the historical key demand data of the dishes of each preset area as node features, and taking the distribution relationship between each existing store and each preset area, the association relationship between each existing store, and the association relationship between each preset area as edge features, the initial graph neural network is trained to obtain a trained graph neural network.
[0057] For each of multiple historical time periods, the key information of dishes of each existing store in the historical time period and the key demand data of historical dishes of each preset area in the historical time period are input into the trained graph neural network, and the graph feature vector of each existing store in the historical time period and the graph feature vector of each preset area are output, wherein the graph feature vector z' of each existing store includes the associated store information, the preset area information with the delivery relationship, and the historical dish demand results in each preset area with the delivery relationship; the graph feature vector x' of each preset area includes the associated area information, the store information with the delivery relationship, and the historical dish demand results in each existing store with the delivery relationship.
[0058] Combine the graph feature vectors z' for each existing store and x' for each pre-set region into w, and train the initial regional dish demand forecasting model to obtain a trained regional dish demand forecasting model. This initial regional dish demand forecasting model can be built using an MLP and GRU. The MLP is a feedforward neural network composed of multiple fully connected layers, while the GRU is a recurrent neural network designed for processing time series data, capable of capturing dynamic temporal features.
[0059] For one or more new stores on the food delivery platform, the dish information of the one or more new stores, the dish information of each of the multiple existing stores on the food delivery platform as suppliers, at least one preset area as the demand side to which the dishes of each existing store can be delivered, and the historical dish demand data of each preset area in at least one preset area are sequentially processed by a variational autoencoder, a trained graph neural network, and a trained regional dish demand prediction model to output the dish demand results of any new store in any preset area, and the dish demand results of each existing store in any preset area can also be output, that is, the dish demand results of each existing store in any preset area can be predicted, so as to analyze the impact of one or more new stores on each existing store, provide the food delivery platform with more accurate store invitation priority ranking, and further provide decision support for the food delivery platform to give priority to invitations to potential stores.
[0060] In the embodiment of the present application, a possible implementation method is provided. In step S102 above, the dish information of each existing store is represented as a 1×n dimensional vector. Then, a variational autoencoder is used to process the dish information of each existing store to extract the key dish information of each existing store. Specifically, the following steps S102-1 may be included:
[0061] In step S102-1, a variational autoencoder is used to compress the 1×n-dimensional vector of the dish information of each existing store to obtain the key information of the dish of each existing store. The key information of the dish of each existing store is represented as a 1×m-dimensional vector, where n and m are both positive integers, and m is less than n.
[0062] In an embodiment of the present application, a possible implementation method is provided. In step S102 above, the historical dish demand data of each preset area is represented as a 1×n dimensional vector. Then, a variational autoencoder is used to process the historical dish demand data of each preset area to extract the key historical dish demand data of each preset area. Specifically, the following steps S102-2 may be included:
[0063] Step S102-2: Use a variational autoencoder to compress the 1×n-dimensional vector historical dish demand data of each preset area to obtain the historical dish key demand data of each preset area. The historical dish key demand data of each preset area is represented as a 1×m-dimensional vector.
[0064] In this embodiment, the variational autoencoder can perform dimensionality reduction and compression while ensuring that the extracted dimensions restore the input variable information as much as possible. In other words, the decoder can restore the input variable information as much as possible. The loss of the variational autoencoder is added to the loss of the subsequent initial graph neural network training.
[0065] Furthermore, the use of variational autoencoders can leverage dish information to provide menu adjustment recommendations for existing stores. This more efficient approach eliminates the need to sequentially calculate the suitability of all standard dishes for a particular store. Instead, it selects the appropriate dimensions to add dishes, significantly reducing the computational effort. Appropriate menu modifications can significantly increase store revenue, enhance store loyalty, and generate additional revenue for the platform.
[0066] For example, the variational autoencoder can compress the input dish information. For example, a 1600-dimensional vector can be compressed to 100 dimensions, and then subsequently input into the graph neural network for prediction.
[0067] For the compressed 100 dimensions, we can convert them into dishes to see their actual meaning. Some of them are "hamburgers", "rice bowls", "braised meats", "milk teas", etc. This classification is very meaningful because most stores sell many types of dishes at the same time.
[0068] In the past, when helping stores adjust their menus, it was necessary to evaluate more than 1,600 dishes for each store in turn, which required a lot of computation. With the solution of this embodiment, the 100 compressed dimensions can be adjusted in turn to see which dimension can better increase the demand for the store's dishes. For the appropriate dimension, the first 100 dishes can be tried in turn to see which dish can bring better recipe demand. 100 plus 100 is a total of 200 attempts, which is much less than 1,600 attempts, saving a lot of computation.
[0069] In an embodiment of the present application, a possible implementation method is provided. When training the initial graph neural network, step S104 above may further include the following steps S104-1 to S104-4:
[0070] Step S104-1, determining the delivery relationship between each existing store and each preset area based on at least one preset area as a demand side to which the dishes of each existing store can be delivered;
[0071] Step S104-2: Determine the first-order and second-order neighbors of each existing store based on the delivery relationship between each existing store and each preset area. Each existing store's first-order neighbors are the one or more preset areas to which the store's dishes can be delivered, and the store's second-order neighbors are other existing stores, other than the existing store, that have a delivery relationship with the one or more preset areas.
[0072] Step S104-3: Determine the first-order neighbors and second-order neighbors of each preset area based on the delivery relationships between each existing store and each preset area. The first-order neighbors of each preset area are one or more existing stores that have a delivery relationship with the preset area, and the second-order neighbors of the preset area are other preset areas other than the preset area to which dishes from the one or more existing stores can be delivered.
[0073] Step S104-4, based on the first-order neighbors and second-order neighbors of each existing store and the first-order neighbors and second-order neighbors of each preset area, determine the association relationship between each existing store and the association relationship between each preset area; wherein, the association relationship between each existing store includes a competitive relationship and / or a complementary relationship; the association relationship between each preset area includes a competitive relationship and / or a complementary relationship.
[0074] When training the initial graph neural network, this embodiment can effectively learn the representation of each node by aggregating the information of neighboring nodes. Taking into account various factors such as competitive relationships, complementary relationships, or geographical proximity, the model can comprehensively consider different types of relationships through a multi-layer message passing mechanism, thereby more accurately predicting the demand for dishes in stores in each preset area.
[0075] It should be noted that the order of execution of the steps in the above embodiments does not necessarily imply a specific order of execution. The order of execution of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In practical applications, all possible implementation methods described above can be combined in any manner to form possible embodiments of the present application, and will not be described in detail here.
[0076] Based on the machine learning-based dynamic modeling method for food delivery platform supply and demand provided in the above embodiments, and based on the same inventive concept, the embodiments of the present application also provide a machine learning-based dynamic modeling system for food delivery platform supply and demand.
[0077] Figure 3 This is a structural diagram of the takeaway platform supply and demand dynamic modeling system based on machine learning provided in the embodiment of this application. Figure 3 As shown, the food delivery platform supply and demand dynamic modeling system based on machine learning can specifically include an acquisition unit 310, a processing unit 320, a construction unit 330, a training unit 340 and a prediction unit 350.
[0078] An acquisition unit 310 is configured to acquire dish information for each of a plurality of existing stores serving as suppliers on the food delivery platform, acquire at least one preset area serving as a demander to which the dishes from each of the existing stores can be delivered, and acquire historical dish demand data for each of the at least one preset area.
[0079] Processing unit 320 is configured to process the dish information of each existing store using a variational autoencoder to extract key dish information of each existing store, and to process the historical dish demand data of each preset area using a variational autoencoder to extract key dish demand data of each preset area;
[0080] A construction unit 330 is configured to construct an initial graph neural network of store areas by using the existing stores and the preset areas as nodes and the relationships between the existing stores and the preset areas as edges;
[0081] A training unit 340 is configured to train the initial graph neural network using the key information of dishes in each existing store and the historical key demand data of dishes in each preset area as node features, and using the delivery relationship between each existing store and each preset area, the association relationship between each existing store, and the association relationship between each preset area as edge features to obtain a trained graph neural network.
[0082] The prediction unit 350 is used to use the trained graph neural network to predict the dish demand results of any one or more new stores on the food delivery platform in any preset area.
[0083] A possible implementation is provided in an embodiment of the present application, wherein the prediction unit 350 is further configured to:
[0084] Get multiple historical time periods that you set;
[0085] For each of the multiple historical time periods, obtaining dish information of each of the multiple existing stores on the food delivery platform as suppliers during the historical time period, obtaining at least one preset area as a demander to which the dishes of each of the existing stores can be delivered during the historical time period, and obtaining historical dish demand data for each of the at least one preset area during the historical time period;
[0086] Using a variational autoencoder to process the dish information of each existing store in the historical time period, extracting the key information of the dishes of each existing store in the historical time period, and using a variational autoencoder to process the historical dish demand data of each preset area in the historical time period, extracting the key demand data of historical dishes of each preset area in the historical time period;
[0087] The key information of dishes of each existing store in the historical time period and the key historical dish demand data of each preset area in the historical time period are input into the trained graph neural network, and the graph feature vector of each existing store in the historical time period and the graph feature vector of each preset area are output, wherein the graph feature vector of each existing store includes associated store information, information of preset areas with delivery relationships, and historical dish demand results in each preset area with delivery relationships; the graph feature vector of each preset area includes associated area information, store information with delivery relationships, and historical dish demand results in each existing store with delivery relationships;
[0088] Using the graph feature vectors of the existing stores and the graph feature vectors of the preset areas in the various historical time periods, an initial regional dish demand prediction model is trained to obtain a trained regional dish demand prediction model;
[0089] For one or more newly added stores on the food delivery platform, the dish information of the one or more newly added stores, the dish information of each of the multiple existing stores on the food delivery platform as suppliers, at least one preset area as a demander to which the dishes of each existing store can be delivered, and the historical dish demand data of each preset area in the at least one preset area are sequentially passed through a variational autoencoder, the trained graph neural network, and the trained regional dish demand prediction model to output the dish demand result of any newly added store in any preset area.
[0090] In an embodiment of the present application, a possible implementation method is provided, in which the dish information of each existing store is represented as a 1×n dimensional vector, and the processing unit 320 is further configured to:
[0091] A variational autoencoder is used to compress the 1×n-dimensional vector of the dish information of each existing store to obtain the key information of the dishes of each existing store. The key information of the dishes of each existing store is represented as a 1×m-dimensional vector, where n and m are both positive integers, and m is less than n.
[0092] An embodiment of the present application provides a possible implementation method, wherein the historical dish demand data of each preset area is represented as a 1×n dimensional vector, and the processing unit 320 is further configured to:
[0093] A variational autoencoder is used to compress the 1×n-dimensional vector historical dish demand data of each preset area to obtain the historical dish key demand data of each preset area, and the historical dish key demand data of each preset area is represented as a 1×m-dimensional vector.
[0094] An embodiment of the present application provides a possible implementation method, wherein the training unit 340 is further configured to:
[0095] Determining a delivery relationship between each existing store and each preset area based on at least one preset area as a demand side to which the dishes of each existing store can be delivered;
[0096] Determining first-order neighbors and second-order neighbors of each existing store based on the delivery relationship between each existing store and each preset area; wherein the first-order neighbors of each existing store are one or more preset areas to which dishes from the existing store can be delivered, and the second-order neighbors of the existing store are other existing stores other than the existing store that have a delivery relationship with the one or more preset areas;
[0097] Determining first-order neighbors and second-order neighbors of each preset area based on the delivery relationship between each existing store and each preset area; wherein the first-order neighbors of each preset area are one or more existing stores that have a delivery relationship with the preset area, and the second-order neighbors of the preset area are other preset areas other than the preset area to which dishes from the one or more existing stores can be delivered;
[0098] Based on the first-order neighbors and second-order neighbors of each existing store and the first-order neighbors and second-order neighbors of each preset area, the association relationship between the existing stores and the association relationship between the preset areas are determined; wherein the association relationship between the existing stores includes a competitive relationship and / or a complementary relationship; the association relationship between the preset areas includes a competitive relationship and / or a complementary relationship.
[0099] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for dynamic modeling of supply and demand of a takeaway platform based on machine learning of any of the above embodiments.
[0100] In an exemplary embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4 The electronic device 400 shown includes a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, for example, via a bus 402. Optionally, the electronic device 400 may further include a transceiver 404. It should be noted that in actual applications, the number of transceivers 404 is not limited to one, and the structure of the electronic device 400 does not constitute a limitation on the embodiments of the present application.
[0101] Processor 401 may be a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor.
[0102] Bus 402 may include a path for transmitting information between the above components. Bus 402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0103] The memory 403 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0104] The memory 403 is used to store computer program codes for executing the solution of the present application, and the execution is controlled by the processor 401. The processor 401 is used to execute the computer program codes stored in the memory 403 to implement the contents shown in the above method embodiment.
[0105] Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0106] Based on the same inventive concept, an embodiment of the present application also provides a storage medium, which stores a computer program, wherein the computer program is configured to execute any one of the above-mentioned embodiments of the method for dynamic modeling of supply and demand of a takeaway platform based on machine learning when running.
[0107] Those skilled in the art will clearly understand that the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they will not be further described here.
[0108] Those skilled in the art will understand that the technical solution of the present application, in essence, or in whole or in part, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of program instructions that cause an electronic device (such as a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application when the program instructions are executed. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0109] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware related to program instructions (such as electronic devices such as personal computers, servers, or network devices), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of an electronic device, the electronic device executes all or part of the steps of the methods described in the various embodiments of the present application.
[0110] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that, within the spirit and principles of the present application, they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate from the protection scope of the present application.
Claims
1. A method for dynamic modeling of supply and demand of a food delivery platform based on machine learning, characterized in that: include: Obtaining dish information for each of a plurality of existing stores on the food delivery platform as suppliers, obtaining at least one preset area as a demander to which the dishes of each of the existing stores can be delivered, and obtaining historical dish demand data for each of the at least one preset area; Using a variational autoencoder to process the dish information of each existing store and extract the key dish information of each existing store, and using a variational autoencoder to process the historical dish demand data of each preset area and extract the key dish demand data of each preset area; Using the existing stores and the preset areas as nodes and the relationships between the existing stores and the preset areas as edges, an initial graph neural network for the store areas is constructed; The initial graph neural network is trained using the key information of dishes in each existing store and the historical key demand data of dishes in each preset area as node features, and the delivery relationship between each existing store and each preset area, the association relationship between each existing store, and the association relationship between each preset area as edge features to obtain a trained graph neural network; For one or more new stores on the food delivery platform, the trained graph neural network is used to predict the dish demand results of any new store in any preset area.
2. The method according to claim 1, characterized in that For one or more newly added stores on the food delivery platform, the trained graph neural network is used to predict the dish demand results of any newly added store in any preset area, including: Get multiple historical time periods that you set; For each of the multiple historical time periods, obtaining dish information of each of the multiple existing stores on the food delivery platform as suppliers during the historical time period, obtaining at least one preset area as a demander to which the dishes of each of the existing stores can be delivered during the historical time period, and obtaining historical dish demand data for each of the at least one preset area during the historical time period; Using a variational autoencoder to process the dish information of each existing store in the historical time period, extracting the key information of the dishes of each existing store in the historical time period, and using a variational autoencoder to process the historical dish demand data of each preset area in the historical time period, extracting the key demand data of historical dishes of each preset area in the historical time period; The key information of dishes of each existing store in the historical time period and the key historical dish demand data of each preset area in the historical time period are input into the trained graph neural network, and the graph feature vector of each existing store in the historical time period and the graph feature vector of each preset area are output, wherein the graph feature vector of each existing store includes associated store information, information of preset areas with delivery relationships, and historical dish demand results in each preset area with delivery relationships; the graph feature vector of each preset area includes associated area information, store information with delivery relationships, and historical dish demand results in each existing store with delivery relationships; Using the graph feature vectors of the existing stores and the graph feature vectors of the preset areas in the various historical time periods, an initial regional dish demand prediction model is trained to obtain a trained regional dish demand prediction model; For one or more newly added stores on the food delivery platform, the dish information of the one or more newly added stores, the dish information of each of the multiple existing stores on the food delivery platform as suppliers, at least one preset area as a demander to which the dishes of each existing store can be delivered, and the historical dish demand data of each preset area in the at least one preset area are sequentially passed through a variational autoencoder, the trained graph neural network, and the trained regional dish demand prediction model to output the dish demand result of any newly added store in any preset area.
3. The method according to claim 1, characterized in that The dish information of each existing store is represented as a 1×n dimensional vector. The dish information of each existing store is processed using a variational autoencoder to extract key dish information of each existing store, including: A variational autoencoder is used to compress the 1×n-dimensional vector of the dish information of each existing store to obtain the key information of the dishes of each existing store. The key information of the dishes of each existing store is represented as a 1×m-dimensional vector, where n and m are both positive integers, and m is less than n.
4. The method according to claim 3, characterized in that The historical dish demand data of each preset area is represented as a 1×n dimensional vector. The historical dish demand data of each preset area is processed using a variational autoencoder to extract the key historical dish demand data of each preset area, including: A variational autoencoder is used to compress the 1×n-dimensional vector historical dish demand data of each preset area to obtain the historical dish key demand data of each preset area, and the historical dish key demand data of each preset area is represented as a 1×m-dimensional vector.
5. The method according to claim 1, wherein Also includes: Determining a delivery relationship between each existing store and each preset area based on at least one preset area as a demand side to which the dishes of each existing store can be delivered; Determining first-order neighbors and second-order neighbors of each existing store based on the delivery relationship between each existing store and each preset area; wherein the first-order neighbors of each existing store are one or more preset areas to which dishes from the existing store can be delivered, and the second-order neighbors of the existing store are other existing stores other than the existing store that have a delivery relationship with the one or more preset areas; Determining first-order neighbors and second-order neighbors of each preset area based on the delivery relationship between each existing store and each preset area; wherein the first-order neighbors of each preset area are one or more existing stores that have a delivery relationship with the preset area, and the second-order neighbors of the preset area are other preset areas other than the preset area to which dishes from the one or more existing stores can be delivered; Based on the first-order neighbors and second-order neighbors of each existing store and the first-order neighbors and second-order neighbors of each preset area, the association relationship between the existing stores and the association relationship between the preset areas are determined; wherein the association relationship between the existing stores includes a competitive relationship and / or a complementary relationship; the association relationship between the preset areas includes a competitive relationship and / or a complementary relationship.
6. A food delivery platform supply and demand dynamic modeling system based on machine learning, characterized by: include: an acquisition unit, configured to acquire dish information of each of a plurality of existing stores as suppliers on the food delivery platform, acquire at least one preset area as a demander to which the dishes of each of the existing stores can be delivered, and acquire historical dish demand data of each of the at least one preset area; a processing unit, configured to process the dish information of each existing store using a variational autoencoder to extract key dish information of each existing store, and to process the historical dish demand data of each preset area using a variational autoencoder to extract key dish demand data of each preset area; A construction unit, configured to construct an initial graph neural network of store areas by using the existing stores and the preset areas as nodes and the relationships between the existing stores and the preset areas as edges; a training unit, configured to train the initial graph neural network using the key information of dishes of each existing store and the historical key demand data of dishes in each preset area as node features, and using the delivery relationship between each existing store and each preset area, the association relationship between each existing store, and the association relationship between each preset area as edge features, to obtain a trained graph neural network; The prediction unit is used to use the trained graph neural network to predict the dish demand results of one or more new stores on the food delivery platform in any preset area.
7. The system according to claim 6, characterized in that The prediction unit is further configured to: Get multiple historical time periods that you set; For each of the multiple historical time periods, obtaining dish information of each of the multiple existing stores on the food delivery platform as suppliers during the historical time period, obtaining at least one preset area as a demander to which the dishes of each of the existing stores can be delivered during the historical time period, and obtaining historical dish demand data for each of the at least one preset area during the historical time period; Using a variational autoencoder to process the dish information of each existing store in the historical time period, extracting the key information of the dishes of each existing store in the historical time period, and using a variational autoencoder to process the historical dish demand data of each preset area in the historical time period, extracting the key demand data of historical dishes of each preset area in the historical time period; The key information of dishes of each existing store in the historical time period and the key historical dish demand data of each preset area in the historical time period are input into the trained graph neural network, and the graph feature vector of each existing store in the historical time period and the graph feature vector of each preset area are output, wherein the graph feature vector of each existing store includes associated store information, information of preset areas with delivery relationships, and historical dish demand results in each preset area with delivery relationships; the graph feature vector of each preset area includes associated area information, store information with delivery relationships, and historical dish demand results in each existing store with delivery relationships; Using the graph feature vectors of the existing stores and the graph feature vectors of the preset areas in the various historical time periods, an initial regional dish demand prediction model is trained to obtain a trained regional dish demand prediction model; For one or more newly added stores on the food delivery platform, the dish information of the one or more newly added stores, the dish information of each of the multiple existing stores on the food delivery platform as suppliers, at least one preset area as a demander to which the dishes of each existing store can be delivered, and the historical dish demand data of each preset area in the at least one preset area are sequentially passed through a variational autoencoder, the trained graph neural network, and the trained regional dish demand prediction model to output the dish demand result of any newly added store in any preset area.
8. The system according to claim 6, wherein: The dish information of each existing store is represented as a 1×n dimensional vector, and the processing unit is further used to: A variational autoencoder is used to compress the 1×n-dimensional vector of the dish information of each existing store to obtain the key information of the dishes of each existing store. The key information of the dishes of each existing store is represented as a 1×m-dimensional vector, where n and m are both positive integers, and m is less than n.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for dynamic modeling of supply and demand of a food delivery platform based on machine learning as described in any one of claims 1 to 5.
10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method for dynamic modeling of supply and demand of a food delivery platform based on machine learning according to any one of claims 1 to 5 when running.
Citation Information
Patent Citations
Shop sales effect prediction method and device based on multiple features
CN114239947A
Prediction model training method and device, medium and computer equipment
CN116029447A