A method, device, equipment and medium for predicting cigarette demand based on clustering

By clustering the merchant location, sales time and sales quantity density, the problem of ignoring the impact of sales time in the existing technology is solved, and the sales area heat analysis is realized in time and space, thereby accurately predicting cigarette demand and improving supply stability.

CN118485467BActive Publication Date: 2025-03-11GUANGDONG TOBACCO ZHONGSHAN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410500581.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2025-03-11
Estimated Expiration
2044-04-24

AI Technical Summary

Technical Problem

When existing cigarette demand forecasting schemes are clustered in space, the impact of sales time is ignored, resulting in a deviation between the real market demand and the predicted demand.

Method used

By density clustering of the data sets composed of merchant location, sales time and sales quantity, the sales area heat analysis in time and space is realized, and the collection of merchants with high sales popularity is determined, and future cigarette demand is predicted based on this.

Benefits of technology

It improves the accuracy of clustering results and can more accurately predict the future cigarette demand of merchants with high sales popularity, thereby improving the stability of cigarette product supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118485467B_ABST
    Figure CN118485467B_ABST
Patent Text Reader

Abstract

The present application relates to a clustering-based cigarette demand prediction method, device, equipment and medium. The method includes determining the location, sales time and sales quantity of merchants selling cigarette products within a preset time range, performing density clustering on a data set consisting of the merchant location, sales time and sales quantity, determining a merchant set with high sales popularity based on the clustering results, and predicting the merchant's future cigarette demand based on the sales time and sales quantity of the merchants in the merchant set. The method proposes to perform density clustering on a data set consisting of the merchant location, sales time and sales quantity, realizes the heat analysis of the sales area in time and space, can improve the accuracy of the merchants with high sales popularity obtained by clustering, and then realizes the prediction of the future cigarette demand of merchants with high sales popularity, and improves the stability of the overall supply of cigarette products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of big data analysis technology, and in particular to a clustering-based cigarette demand prediction method, device, equipment and medium. Background Art

[0002] Cigarette commodity market demand forecasting is an important part of tobacco companies' marketing activities. In the process of tobacco sales, due to the large amount of tobacco sales data and the complexity of the data, and the sales behavior is not only limited by space but also by time, there is a certain deviation from the actual market demand in the formulation of sales plans. Existing demand forecasting plans mostly use the K-means clustering algorithm to cluster the sales data of merchants in different locations to determine the merchants in areas with relatively high sales popularity, and then distribute cigarette products. However, the current plans ignore the impact of sales time on demand analysis. Summary of the invention

[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0004] The main purpose of the embodiments of the present invention is to propose a clustering-based cigarette demand prediction method, device, equipment and medium, which realizes the heat analysis of the sales area in time and space by density clustering the data set consisting of merchant location, sales time and sales quantity, and then accurately determines the merchants with higher sales heat based on the clustering results, thereby predicting the future cigarette demand of merchants with higher sales heat.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present invention provides a clustering-based cigarette demand prediction method, the clustering-based cigarette demand prediction method comprising:

[0006] Determine the location, sales time and sales volume of merchants selling cigarette products within a preset time range;

[0007] Performing density clustering on a data set consisting of the merchant location, sales time, and sales quantity;

[0008] Determine the set of merchants with higher sales popularity based on the clustering results;

[0009] Predict the future cigarette demand of the merchants in the merchant set based on the sales time and sales quantity of the merchants.

[0010] The embodiment of the present application provides a clustering-based cigarette demand prediction method, which proposes density clustering of a data set consisting of merchant location, sales time and sales quantity, and realizes heat analysis of sales areas in time and space. It can improve the accuracy of clustering to obtain merchants with higher sales popularity, and then predict the future cigarette demand for merchants with higher sales popularity, thereby improving the stability of the overall supply of cigarette products.

[0011] In some embodiments of the present application, the step of performing density clustering on the data set consisting of the merchant locations and sales time includes:

[0012] The DBSCAN density clustering algorithm is used to perform density clustering on the data set consisting of the merchant locations and sales time.

[0013] In some embodiments of the present application, predicting the future cigarette demand of the merchant according to the sales time and sales quantity of the merchant in the merchant set includes:

[0014] Determine the types of cigarette products sold by the merchant and their corresponding sales time and sales quantity, calculate the historical sales data features corresponding to each type of the cigarette product according to the sales time and sales quantity corresponding to the type of the cigarette product, and form a historical sales data feature matrix of the merchant according to the historical sales data features of all types of the cigarette products sold by the merchant;

[0015] An undirected graph is generated with the historical sales data feature matrix as a node set and the interaction coefficient matrix as an edge set; the interaction coefficient matrix refers to a matrix composed of interaction coefficients between different historical sales data features, the interaction coefficient range is [0,1], and the interaction coefficient is used to characterize the interaction relationship between different historical sales data features;

[0016] Perform graph convolution on the undirected graph to obtain a feature representation of the graph convolution, and predict the merchant's future cigarette demand based on the feature representation of the graph convolution.

[0017] In some embodiments of the present application, the interaction coefficient matrix is ​​generated in the following manner:

[0018] Randomly obtain high-dimensional feature vectors that conform to Gaussian distribution;

[0019] Using FCN to extract a three-dimensional feature representation of the high-dimensional feature vector;

[0020] The three-dimensional feature representation is upsampled to obtain an interaction coefficient matrix with a channel number of 1 and a length and width corresponding to the historical sales data feature matrix.

[0021] In some embodiments of the present application, the expression of the graph convolution includes:

[0022] F=GCN(CXW)

[0023]

[0024] Wherein, F represents the feature representation of the graph convolution, GCN() represents the graph convolution function, C represents the normalized Y matrix, and Y represents the interaction coefficient matrix. represents the degree matrix of the interaction coefficient matrix, X represents the historical sales data feature matrix, and W represents the learnable weight parameter.

[0025] In some embodiments of the present application, predicting the merchant's future cigarette demand based on the feature representation of the graph convolution includes:

[0026] The feature representation of the graph convolution is input into a preset recurrent neural network to obtain the merchant's future cigarette demand output by the recurrent neural network.

[0027] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present invention provides a clustering-based cigarette demand prediction device, the clustering-based cigarette demand prediction device comprising:

[0028] A data acquisition unit, used to determine the location, sales time and sales quantity of merchants selling cigarette products within a preset time range;

[0029] A clustering unit, used for performing density clustering on a data set consisting of the merchant location, sales time and sales quantity;

[0030] A merchant determination unit, used to determine a set of merchants with high sales popularity according to the clustering results;

[0031] The demand forecasting unit is used to forecast the future cigarette demand of the merchants in the merchant set according to the sales time and sales quantity of the merchants.

[0032] In some embodiments of the present application, the demand forecasting unit includes:

[0033] a time series data calculation unit, for determining the types of cigarette products sold by the merchant and their corresponding sales time and sales quantity, calculating the historical sales data features corresponding to each type of the cigarette product according to the sales time and sales quantity corresponding to the cigarette product, and forming a historical sales data feature matrix of the merchant according to the historical sales data features of all types of the cigarette products sold by the merchant;

[0034] An interaction graph calculation unit, used to generate an undirected graph using the historical sales data feature matrix as a node set and the interaction coefficient matrix as an edge set; the interaction coefficient matrix refers to a matrix composed of interaction coefficients between different historical sales data features, the interaction coefficient range is [0,1], and the interaction coefficient is used to characterize the interaction relationship between different historical sales data features;

[0035] The demand calculation unit is used to perform graph convolution on the undirected graph to obtain a feature representation of the graph convolution, and predict the merchant's future cigarette demand based on the feature representation of the graph convolution.

[0036] To achieve the above-mentioned purpose, the electronic device provided in the third aspect of an embodiment of the present invention includes: at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute a clustering-based cigarette demand prediction method of the above-mentioned first aspect.

[0037] To achieve the above objectives, the fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute a clustering-based cigarette demand prediction method of the first aspect.

[0038] It can be understood that the beneficial effects of the second to fourth aspects compared with the related art are the same as the beneficial effects of the first aspect compared with the related art. Please refer to the relevant description in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 It is a flowchart of a cigarette demand prediction method based on clustering provided in one embodiment of the present application;

[0041] Figure 2 yes Figure 1 Specific flow diagram of step S140;

[0042] Figure 3 yes Figure 2 Specific flow diagram of step S420;

[0043] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0047] Cigarette commodity market demand forecasting is an important part of tobacco companies' marketing activities. In the process of tobacco sales, due to the large amount of tobacco sales data and the complexity of the data, and the sales behavior is not only limited by space but also by time, there is a certain deviation from the actual market demand in the formulation of sales plans. For example, according to the urban area of ​​Chengdu, there are about 40,000 effective tobacco retailers in Chengdu, which are spread across commercial areas and large and small communities. Existing demand forecasting plans mostly use K-means clustering algorithms to cluster the sales data of merchants in different locations to determine merchants in relatively high sales areas, and then distribute cigarette products. However, the current plans ignore the impact of sales time on demand analysis.

[0048] To solve the above technical defects, refer to Figure 1 An embodiment of the present application provides a clustering-based cigarette demand prediction method, the method comprising steps S110-S140:

[0049] Step S110: Determine the location, sales time and sales quantity of merchants selling cigarette products within a preset time range.

[0050] Step S120: Density clustering is performed on the data set consisting of merchant locations, sales time, and sales quantity.

[0051] Step S130: Determine a set of merchants with higher sales popularity according to the clustering results.

[0052] Step S140: predicting the future cigarette demand of merchants in the merchant set according to the sales time and sales quantity of the merchants.

[0053] In step S110, a preset time range is determined, such as one week, including 168 hours. Statistics of cigarette sales by merchants within the preset time range are collected, such as the merchant's geographical location (longitude, latitude), sales time and sales quantity. The sales situation can be queried through the merchant's supply APP, such as a cigarette ordering platform.

[0054] Different from the prior art, step S120 performs density clustering on the data set consisting of merchant location, sales time and sales quantity, realizes the heat analysis of the sales area in time and space, obtains the sales flow of the area in time, and can analyze the thermal distribution of the regional flow in space, and then determines the merchants with higher sales heat based on the clustering results. It should be noted that the folium module in python software can be used to produce a heat map of the sales distribution of the regions represented by multiple clusters by density clustering.

[0055] In some instances, density clustering uses the DBSCAN clustering method. DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a representative density-based clustering algorithm. Unlike partitioning and hierarchical clustering methods, it defines a cluster as the largest set of density-connected points, can divide areas with sufficiently high density into clusters, and can find clusters of any shape in a noisy spatial database. Here is the following pseudo code:

[0056]

[0057] Table 1

[0058] The merchants in the merchant set obtained in step S130 are merchants with high sales popularity. The selection rules can be based on the threshold method. The threshold determination and the selected quantity are set based on experience. Here, it is necessary to predict the future sales volume for these merchants. Before making a prediction, the categories and quantities of cigarette products sold by these merchants, as well as the sales time, will be counted, and then predictions will be made based on these data. This type of prediction problem is a typical time series prediction problem, that is, judging future time series data by historical time series data. Since it contains different types of cigarette products sold by each merchant at different times, for example, the sales quantity of 35 different cigarette products per hour in 10 different merchants, the preset time range is one week, which means that there are a total of 350 time series, and each time series is 168 hours. Therefore, this is also a multi-time series prediction problem. Compared with the single time series prediction problem, there is a potential relationship between multiple time series (i.e., the interaction relationship between each other). Therefore, how to extract the potential relationship between time series and combine it with the original time series relationship for joint prediction has become a problem that urgently needs to be optimized.

[0059] Reference Figure 2 In some embodiments of the present application, step S140 includes:

[0060] Step S410, determine the types of cigarette products sold by the merchant and their corresponding sales time and sales quantity, calculate the historical sales data characteristics corresponding to each cigarette product according to the sales time and sales quantity corresponding to the cigarette product, and form the merchant's historical sales data characteristic matrix based on the historical sales data characteristics of all types of cigarette products sold by the merchant.

[0061] Step S420, generate an undirected graph with the historical sales data feature matrix as the node set and the interaction coefficient matrix as the edge set; the interaction coefficient matrix refers to a matrix composed of interaction coefficients between different historical sales data features, the interaction coefficient range is [0,1], and the interaction coefficient is used to characterize the interaction relationship between different historical sales data features.

[0062] Step S430: perform graph convolution on the undirected graph to obtain a feature representation of the graph convolution, and predict the merchant's future cigarette demand based on the feature representation of the graph convolution.

[0063] In step S140, it is assumed that there are 350 historical sales data features (time series features): T1, T2, T3..., T 350 , the preset time range is 168 hours. This embodiment needs to predict the sales data of the 169th hour. Each historical sales data feature includes the sales quantity and type of cigarette products. A sliding window (length is s) is used to collect feature vectors to obtain the historical sales data feature matrix:

[0064]

[0065] in, etc. are all historical sales data features, which are collected through a sliding window of length s.

[0066] In step S420, after obtaining the historical sales data feature matrix composed of time series features, in order to further obtain the potential relationship therein, it is necessary to construct an interaction coefficient matrix corresponding to the historical sales data feature matrix, and each interaction coefficient of the interaction coefficient matrix represents the potential relationship between the corresponding historical sales data features.

[0067] Reference Figure 3 In some embodiments, the interaction coefficient matrix constructed in step S420 is:

[0068] Step S421: randomly obtain a high-dimensional feature vector that conforms to the Gaussian distribution.

[0069] Step S422: Use FCN to extract the three-dimensional feature representation of the high-dimensional feature vector.

[0070] Step S423: upsample the three-dimensional feature representation to obtain an interaction coefficient matrix corresponding to the historical sales data feature matrix.

[0071] In this embodiment, in order to obtain the interaction coefficient, this embodiment first extracts a random noise vector (high-dimensional feature vector) that conforms to the acquisition Gaussian distribution, and then extracts a three-dimensional feature representation of the high-dimensional feature vector through FCN. FCN refers to a fully connected neural network. In a fully connected neural network, neurons (or nodes) are organized into multiple layers. The neurons in each layer are all connected to the neurons in the previous and next layers, but there is no connection between neurons in the same layer. Data is propagated unidirectionally from the input layer to the output layer in the network. This embodiment uses a fully connected neural network to convert the high-dimensional feature vector into a three-dimensional feature representation, that is, a feature vector including the number of channels, height and width. Then the three-dimensional feature representation is upsampled. Upsampling refers to enlarging the low-resolution features to the original resolution. Common upsampling methods include bilinear interpolation, nearest neighbor interpolation and deconvolution. Here, deconvolution can be used to convert the feature representation of step S422 into a three-dimensional feature representation with a channel number of 1 and a width and length that are the same as the number of historical sales data features, such as a three-dimensional feature representation of 350×350×1. This embodiment introduces a high-dimensional feature vector that conforms to the Gaussian distribution, and then implements three-dimensional feature representation through a fully connected neural network. Finally, upsampling is performed, and the obtained feature matrix is ​​used as the interaction coefficient matrix corresponding to the feature matrix of historical sales data.

[0072] In some embodiments, in step S430, an undirected graph is first constructed.<V,E> In the above example, V is a non-empty set called a node set, E is a set of unordered tuples consisting of elements in V called an edge set, the nodes in the node set are represented by the historical sales data features in the historical sales data feature matrix, and the edge set is represented by the interaction coefficients in the interaction coefficient matrix. Then graph convolution is a deep learning method based on graph structure, which can perform convolution operations on graphs to achieve feature extraction and classification of graph data. Unlike traditional convolutional neural networks, graph convolution not only considers the characteristics of the nodes themselves, but also the relationship between the nodes and their neighboring nodes. In graph convolution, the feature vector of each node is convolved with the feature vectors of its neighboring nodes to obtain a new node feature vector. In this way, through multi-layer graph convolution operations, high-level features of graph data can be gradually extracted to achieve tasks such as classification, clustering, and prediction of graph data. The basic operations of graph convolution include:

[0073] Convolution operation: The core operation of graph convolution is the convolution operation. For each node, the feature vectors of its neighboring nodes are weighted averaged to obtain a new feature vector for the node.

[0074] Activation function: Use the ReLU function after the convolution operation.

[0075] Pooling operation: Pooling operation is used to reduce the dimension of feature vector.

[0076] Output layer: Map the feature vector to the output space through a fully connected layer to obtain the graph convolution result.

[0077] In some embodiments, the graph convolutional neural network is represented as:

[0078] F=GCN(CXW)

[0079]

[0080] Among them, F represents the feature representation of graph convolution, GCN() represents the graph convolution function, C represents the normalized Y matrix, and Y represents the interaction coefficient matrix. represents the degree matrix of the interaction coefficient matrix, X represents the historical sales data feature matrix, and W represents the learnable weight parameter, which is adjusted through continuous training. The core of the above formula is: according to the size of the correlation represented by the edges between the nodes in the undirected graph, the historical sales data features in the interaction coefficient matrix and the historical sales data feature matrix are weighted and fused to generate a new feature vector representation, that is, the deep fusion of the interaction relationship and the historical sales data features can explore the potential interaction relationship between the historical sales data features and improve the accuracy of the prediction.

[0081] In some embodiments, predicting the merchant's future cigarette demand based on the feature representation of the graph convolution in step S400 includes:

[0082] The feature representation of the graph convolution is input into the preset recurrent neural network to obtain the merchant’s future cigarette demand output by the recurrent neural network.

[0083] A recurrent neural network is a type of recurrent neural network that takes sequence data as input, recursively in the direction of sequence evolution, and all nodes are connected in a chain. The sales data at time t+1 is predicted through the recurrent neural network.

[0084] This application mainly includes two aspects of improvement:

[0085] The first improvement:

[0086] At present, in the clustering process of merchants with high popularity, statistics are collected on the merchant's geographical location, sales volume, cigarette sales type, etc., without considering the sales time. This embodiment proposes to perform density clustering on the data set consisting of merchant location, sales time and sales volume, thereby realizing heat analysis of sales areas in time and space, and being able to improve the accuracy of clustering to obtain merchants with high sales popularity, thereby realizing the prediction of future cigarette demand for merchants with high sales popularity, and improving the stability of the overall supply of cigarette products.

[0087] The second improvement:

[0088] At present, after obtaining the data of popular merchants and their sales, the prediction of merchants' future sales (equivalent to future demand) does not consider the potential interaction relationship between historical data. This embodiment introduces a high-dimensional feature vector that conforms to the Gaussian distribution, and then realizes the three-dimensional feature representation through a fully connected neural network, performs upsampling, and obtains a feature matrix as the interaction coefficient matrix corresponding to the feature matrix of historical sales data. Then, an undirected graph is constructed in which nodes are represented by historical sales data features and edges are represented by interaction coefficients in the interaction coefficient matrix. Then, according to the size of the correlation represented by the edges between the nodes in the undirected graph, the interaction coefficient matrix and the historical sales data features in the feature matrix of historical sales data are weighted and fused to generate a new feature vector representation. Finally, the feature representation of the graph convolution is input into a preset recurrent neural network, and the sales data at time t+1 is predicted through the recurrent neural network. This embodiment extracts the potential relationship between multiple historical sales data features, and combines it with the original temporal relationship between multiple historical sales data features for joint prediction, which can improve the prediction accuracy.

[0089] An embodiment of the present application provides a clustering-based cigarette demand prediction device, and the clustering-based cigarette demand prediction device includes:

[0090] The data acquisition unit is used to determine the location, sales time and sales quantity of merchants selling cigarette products within a preset time range.

[0091] Clustering unit, used to perform density clustering on a data set consisting of merchant locations, sales time, and sales quantity.

[0092] The merchant determination unit is used to determine a set of merchants with higher sales popularity according to the clustering results.

[0093] The demand forecasting unit is used to forecast the future cigarette demand of merchants according to the sales time and sales quantity of merchants in the merchant set.

[0094] In some embodiments of the present application, the demand forecasting unit includes:

[0095] The time series data calculation unit is used to determine the types of cigarette products sold by the merchant and their corresponding sales time and sales quantity, calculate the historical sales data characteristics corresponding to each cigarette product according to the sales time and sales quantity corresponding to the cigarette product, and form the merchant's historical sales data characteristic matrix based on the historical sales data characteristics of all types of cigarette products sold by the merchant.

[0096] The interaction graph calculation unit is used to generate an undirected graph using the historical sales data feature matrix as a node set and the interaction coefficient matrix as an edge set; the interaction coefficient matrix refers to a matrix composed of interaction coefficients between different historical sales data features, and the interaction coefficient range is [0,1]. The interaction coefficient is used to characterize the interaction relationship between different historical sales data features.

[0097] The demand calculation unit is used to perform graph convolution on the undirected graph to obtain the feature representation of the graph convolution, and predict the merchant's future cigarette demand based on the feature representation of the graph convolution.

[0098] It should be noted that the clustering-based cigarette demand prediction device provided in this embodiment and the above-mentioned clustering-based cigarette demand prediction method are based on the same inventive concept, so the relevant contents of the above-mentioned clustering-based cigarette demand prediction method are also applicable to the contents of the clustering-based cigarette demand prediction device, and therefore, they will not be repeated here.

[0099] like Figure 4 The embodiment of the present application further provides an electronic device, the electronic device comprising:

[0100] at least one memory;

[0101] at least one processor;

[0102] at least one program;

[0103] The programs are stored in the memory, and the processor executes at least one program to implement the clustering-based cigarette demand prediction method described above in the present disclosure.

[0104] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, etc.

[0105] The electronic device according to the embodiment of the present application is described in detail below.

[0106] The processor 1600 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0107] The memory 1700 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 can store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the program code is stored in the memory 1700, and the processor 1600 calls and executes the clustering-based cigarette demand prediction method of the embodiment of the present invention.

[0108] Input / output interface 1800, used to implement information input and output;

[0109] The communication interface 1900 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0110] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );

[0111] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .

[0112] An embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned clustering-based cigarette demand prediction method.

[0113] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0114] The embodiments described in the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.

[0115] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present invention and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0116] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0117] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0118] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0119] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0120] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store programs.

[0124] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.

[0125] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.

Claims

1. A clustering-based cigarette demand prediction method, characterized in that: The clustering-based cigarette demand prediction method comprises: Determine the location, sales time and sales quantity of merchants selling tobacco products within a preset time range; Density clustering is performed on a data set consisting of the merchant location, sales time, and sales quantity; the density clustering is performed on a data set consisting of the merchant location, sales time, and sales quantity, including: Using the DBSCAN density clustering algorithm to perform density clustering on the data set consisting of the merchant location, sales time and sales quantity; Determine the set of merchants with higher sales popularity based on the clustering results; Predicting the future cigarette demand of the merchant according to the sales time and sales quantity of the merchant in the merchant set; predicting the future cigarette demand of the merchant according to the sales time and sales quantity of the merchant in the merchant set includes: Determine the types of cigarette products sold by the merchant and their corresponding sales time and sales quantity, calculate the historical sales data features corresponding to each type of the cigarette product according to the sales time and sales quantity corresponding to the type of the cigarette product, and form a historical sales data feature matrix of the merchant according to the historical sales data features of all types of the cigarette products sold by the merchant; An undirected graph is generated with the historical sales data feature matrix as a node set and the interaction coefficient matrix as an edge set; the interaction coefficient matrix refers to a matrix composed of interaction coefficients between different historical sales data features, the interaction coefficient range is [0,1], and the interaction coefficient is used to characterize the interaction relationship between different historical sales data features; the interaction coefficient matrix is ​​generated in the following manner: Randomly obtain a high-dimensional feature vector that conforms to the Gaussian distribution; use FCN to extract a three-dimensional feature representation of the high-dimensional feature vector; upsample the three-dimensional feature representation to obtain an interaction coefficient matrix with a channel number of 1 and a length and width corresponding to the feature matrix of the historical sales data; Perform graph convolution on the undirected graph to obtain a feature representation of the graph convolution, and predict the merchant's future cigarette demand based on the feature representation of the graph convolution.

2. The clustering-based cigarette demand prediction method according to claim 1, characterized in that: The predicting of the merchant's future cigarette demand based on the feature representation of the graph convolution includes: The feature representation of the graph convolution is input into a preset recurrent neural network to obtain the merchant's future cigarette demand output by the recurrent neural network.

3. A cigarette demand prediction device based on clustering, characterized in that: The clustering-based cigarette demand prediction device comprises: A data acquisition unit, used to determine the location, sales time and sales quantity of merchants selling cigarette products within a preset time range; A clustering unit is used to perform density clustering on the data set consisting of the merchant location, sales time and sales quantity; the density clustering on the data set consisting of the merchant location, sales time and sales quantity includes: Using the DBSCAN density clustering algorithm to perform density clustering on the data set consisting of the merchant location, sales time and sales quantity; A merchant determination unit, used to determine a set of merchants with high sales popularity according to the clustering results; A demand forecasting unit is used to forecast the future cigarette demand of the merchants in the merchant set according to the sales time and sales quantity of the merchants in the merchant set; the forecasting of the future cigarette demand of the merchants according to the sales time and sales quantity of the merchants in the merchant set includes: Determine the types of cigarette products sold by the merchant and their corresponding sales time and sales quantity, calculate the historical sales data features corresponding to each type of the cigarette product according to the sales time and sales quantity corresponding to the type of the cigarette product, and form a historical sales data feature matrix of the merchant according to the historical sales data features of all types of the cigarette products sold by the merchant; An undirected graph is generated with the historical sales data feature matrix as a node set and the interaction coefficient matrix as an edge set; the interaction coefficient matrix refers to a matrix composed of interaction coefficients between different historical sales data features, the interaction coefficient range is [0,1], and the interaction coefficient is used to characterize the interaction relationship between different historical sales data features; the interaction coefficient matrix is ​​generated in the following manner: Randomly obtain a high-dimensional feature vector that conforms to the Gaussian distribution; use FCN to extract a three-dimensional feature representation of the high-dimensional feature vector; upsample the three-dimensional feature representation to obtain an interaction coefficient matrix with a channel number of 1 and a length and width corresponding to the feature matrix of the historical sales data; Perform graph convolution on the undirected graph to obtain a feature representation of the graph convolution, and predict the merchant's future cigarette demand based on the feature representation of the graph convolution.

4. An electronic device, characterized in that: include: at least one control processor and a memory for communicatively coupling with the at least one control processor; The memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the clustering-based cigarette demand prediction method according to any one of claims 1 to 2.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the clustering-based cigarette demand prediction method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Tobacco big data prediction method and system

    CN114445155A

  • Automobile accessory quick-wear part store purchase recommendation method under big data scene

    CN116308477A