CN111401409A - Commodity brand feature acquisition method, sales volume prediction method, device and electronic equipment - Google Patents
Commodity brand feature acquisition method, sales volume prediction method, device and electronic equipment Download PDFInfo
- Publication number
- CN111401409A CN111401409A CN202010122140.1A CN202010122140A CN111401409A CN 111401409 A CN111401409 A CN 111401409A CN 202010122140 A CN202010122140 A CN 202010122140A CN 111401409 A CN111401409 A CN 111401409A
- Authority
- CN
- China
- Prior art keywords
- brand
- sentence
- commodity
- vector
- character string
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
- G06Q30/0202—Market predictions or forecasting for commercial activities
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Finance (AREA)
- Development Economics (AREA)
- Accounting & Taxation (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Entrepreneurship & Innovation (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Game Theory and Decision Science (AREA)
- Economics (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application relates to a commodity brand feature obtaining method, a commodity brand feature predicting method, a commodity brand feature obtaining device and electronic equipment, and belongs to the technical field of artificial intelligence. The method comprises the following steps: acquiring historical daily average sales volume sequences corresponding to a plurality of commodity brands including a target commodity brand; converting the historical daily average sales volume sequence corresponding to each commodity brand into sentence character strings; forming a matrix array based on all sentence character strings, wherein each row in the matrix array corresponds to one sentence character string; converting each sentence character string in the matrix array into a corresponding sentence vector based on the word vector model to obtain a semantic vector matrix; and clustering each sentence vector in the semantic vector matrix to obtain a label corresponding to the class of the clustered target commodity brand, wherein the label is a brand feature corresponding to the target commodity brand. High-dimensional sparse feature matrixes brought by single-hot coding are avoided, so that time and space required by sales prediction model training are reduced, and prediction accuracy is improved.
Description
Technical Field
The application belongs to the technical field of artificial intelligence, and particularly relates to a commodity brand feature obtaining method, a sales predicting method, a device and electronic equipment.
Background
For markets and supermarkets, accurate commodity sales volume prediction can help the marketers to make benefit-maximizing supply and replenishment strategies, so that turnover rate is improved, and stock shortage rate is reduced. In the industry, the category features are generally subjected to one-hot coding by constructing features such as geographical positions of stores, passenger flow volumes and related attributes of commodities, specifically, numerical features are generally subjected to sliding windows with different periods, and then the future sales volume of the commodities is predicted by using an integrated tree model.
However, the number of discrete features related to the commodity attributes, such as commodity types and brand information, is large, once the unique hot coding is performed, thousands of high-dimensional and sparse feature dimensions are directly brought to the integrated tree model, so that each feature dimension newly generated by the unique hot coding has to be traversed when the nodes are split, this brings more overhead, both for the memory space and time required for training, and in addition, the newly generated features after unique hot coding become mutually independent, each feature has only two values of 0 or 1, which means that a one-vs-rest segmentation mode is adopted during the splitting, when the feature dimension is high, the data on each category is less, the splitting is unbalanced, the gain that it can bring to the model is also reduced sharply, so the model will prefer those features that have not been processed by one-hot encoding.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method for acquiring brand features of a commodity, a method for predicting sales volume, a device for predicting sales volume, and an electronic device, so as to solve the problem that an additional time overhead is required when training a sales volume prediction model due to a high-dimensional sparse feature matrix, which is brought when a unique hot code is adopted to acquire discrete features related to attributes of the commodity at present.
The embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a method for obtaining brand features of a commodity, including: acquiring historical daily average sales volume sequences corresponding to a plurality of commodity brands including a target commodity brand; converting the historical daily average sales volume sequence corresponding to each commodity brand into sentence character strings; forming a matrix array based on all sentence character strings, wherein each row in the matrix array corresponds to one sentence character string; converting each sentence character string in the matrix array into a corresponding sentence vector based on a word vector model to obtain a semantic vector matrix; clustering each sentence vector in the semantic vector matrix to obtain a label corresponding to the class of the target commodity brand after clustering, wherein the label is a brand feature corresponding to the target commodity brand. In the embodiment of the application, the continuous variable characteristic sequence with high commodity brand characteristic correlation-the commodity brand historical daily average sales volume sequence is used as a vector representation of each commodity brand, and is converted into sentence character strings, then a matrix array is formed based on all sentence character strings, each sentence character string in the matrix array is converted into a corresponding sentence vector through a word vector model to obtain a semantic vector matrix, then the sentence vectors after conversion are clustered, and the result labels after clustering are endowed to the commodity brands of the corresponding sequences to become new characteristic values of brand characteristics, so that the situation that thousands of brands are subjected to unique hot coding directly is avoided, therefore, a high-dimensional sparse characteristic matrix caused by single-hot coding is avoided, the time and the space required by the sales prediction model during training are reduced, and the prediction precision is improved.
With reference to one possible implementation manner of the embodiment of the first aspect, converting each sentence character string in the matrix array into a corresponding sentence vector based on a word vector model includes: and converting each sentence character string in the matrix array into a corresponding sentence vector based on a doc2vector model. In the embodiment of the application, the doc2vector model can be used for directly learning the sentence vector corresponding to each sentence character string in the matrix array from the semantic context, so that the conversion efficiency is improved.
With reference to one possible implementation manner of the embodiment of the first aspect, converting each sentence character string in the matrix array into a corresponding sentence vector based on a word vector model includes: for each sentence character string in the matrix array, converting each word in the sentence character string into a corresponding word vector based on a word2vector model; and obtaining a sentence vector corresponding to the sentence character string based on the word vector corresponding to each word in the sentence character string. In the embodiment of the application, for each sentence character string in the matrix array, each word in the sentence character string is converted into a corresponding word vector by using a word2vector model, and the sentence vector corresponding to the sentence character string can be obtained based on the word vector corresponding to each word in the sentence character string, so that the flexibility and feasibility of the scheme are enriched.
With reference to one possible implementation manner of the embodiment of the first aspect, before obtaining the historical daily average sales volume sequence corresponding to each of the multiple commodity brands including the target commodity brand, the method further includes: and obtaining a historical daily average sales volume sequence corresponding to each commodity brand based on the historical sales volume data of each commodity brand. In the embodiment of the application, the historical daily average sales volume sequence corresponding to each commodity brand is obtained in advance based on the historical sales volume data of each commodity brand, so that the brand characteristics of the target commodity brand can be conveniently obtained in the subsequent process.
In a second aspect, an embodiment of the present application further provides a sales prediction method, including: obtaining relevant characteristics of a commodity to be predicted, wherein the relevant characteristics comprise brand characteristics and other numerical characteristics; splicing the brand features and the other numerical features to obtain target features; and inputting the target characteristics into a sales prediction model trained in advance to predict the sales of the brand of the commodity to be predicted. In the embodiment of the application, a commodity brand historical daily average sales volume sequence is used as a vector representation of each commodity brand, the vector representation is converted into sentence character strings, then a matrix array is formed based on all the sentence character strings, each sentence character string in the matrix array is converted into a corresponding sentence vector through a word vector model to obtain a semantic vector matrix, then the converted sentence vectors are clustered, the clustered result labels are endowed to the commodity brands of the corresponding sequence to become new feature values of brand features, and the situation that thousands of brands are subjected to unique hot coding directly is avoided, so that a high-dimensional sparse feature matrix caused by the unique hot coding is avoided, the time and space required by the sales volume prediction model during training are reduced, the prediction accuracy of the sales volume is improved, meanwhile, other numerical features are combined, and the sales volume of the commodity is predicted based on the target features obtained by splicing the other numerical features and the obtained brand features, the reliability of the prediction result is ensured, and the prediction error caused by single dimensionality is avoided.
In combination with one possible implementation manner of the embodiment of the second aspect, the remaining numerical features include: the commodity brand to be predicted comprises at least 2 and more than 2 characteristics of daily average sales volume sequence, weather conditions, passenger flow volume, holiday conditions and geographical positions in a preset time period. In the embodiment of the application, when the commodity sales volume is predicted, besides the commodity characteristics, at least 2 or more characteristics of a daily average sales volume sequence, a weather condition, a passenger flow volume, a holiday condition and a geographical position of a commodity brand to be predicted in a preset time period are obtained, so that the reliability of a prediction result is ensured.
In a third aspect, an embodiment of the present application further provides a device for acquiring brand features of a commodity, including: the device comprises an acquisition module, a first conversion module, a composition module, a second conversion module and a clustering module; the acquisition module is used for acquiring historical daily average sales volume sequences corresponding to a plurality of commodity brands including a target commodity brand; the first conversion module is used for converting the historical daily average sales volume sequence corresponding to each commodity brand into a sentence character string; the sentence string generating module is used for generating a sentence string according to the sentence strings; the second conversion module is used for converting each sentence character string in the matrix array into a corresponding sentence vector based on the word vector model to obtain a semantic vector matrix; and the clustering module is used for clustering each sentence vector in the semantic vector matrix to obtain a label corresponding to the class of the clustered target commodity brand, wherein the label is a brand feature corresponding to the target commodity brand.
In a fourth aspect, an embodiment of the present application further provides a sales prediction apparatus, including: the device comprises an acquisition module, a splicing module and a prediction module; the system comprises an acquisition module, a prediction module and a prediction module, wherein the acquisition module is used for acquiring relevant characteristics of a commodity to be predicted, and the relevant characteristics comprise brand characteristics and other numerical characteristics; the splicing module is used for splicing the brand characteristics and the other numerical characteristics to obtain target characteristics; and the prediction module is used for inputting the target characteristics into a sales prediction model trained in advance so as to predict the sales of the brand of the commodity to be predicted.
In a fifth aspect, an embodiment of the present application further provides an electronic device, including: a memory and a processor, the processor coupled to the memory; the memory is used for storing programs; the processor is configured to invoke a program stored in the memory to perform the method according to the foregoing first aspect embodiment and/or any possible implementation manner in combination with the first aspect embodiment, or to perform the method according to the foregoing second aspect embodiment and/or any possible implementation manner in combination with the second aspect embodiment.
In a sixth aspect, this embodiment of the present application further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the foregoing first aspect embodiment and/or the method provided in connection with any one of the possible implementations of the first aspect embodiment, or performs the foregoing second aspect embodiment and/or the method provided in connection with one of the possible implementations of the second aspect embodiment.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. The foregoing and other objects, features and advantages of the application will be apparent from the accompanying drawings. Like reference numerals refer to like parts throughout the drawings. The drawings are not intended to be to scale as practical, emphasis instead being placed upon illustrating the subject matter of the present application.
Fig. 1 shows a flowchart of a method for acquiring brand features of a commodity according to an embodiment of the present application.
Fig. 2 shows a schematic flowchart of training a doc2vector algorithm provided in an embodiment of the present application.
Fig. 3 is a flowchart illustrating a sales prediction method according to an embodiment of the present application.
Fig. 4 shows a module schematic diagram of an article brand feature acquisition device provided by an embodiment of the present application.
Fig. 5 shows a block diagram of a sales prediction apparatus according to an embodiment of the present application.
Fig. 6 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, relational terms such as "first," "second," and the like may be used solely in the description herein to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Further, the term "and/or" in the present application is only one kind of association relationship describing the associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The problem that additional time overhead is needed when an integrated tree model is trained due to a high-dimensional sparse feature matrix caused when discrete features related to commodity attributes are obtained by adopting one-hot coding at present is solved. The embodiment of the application provides a commodity brand feature obtaining method to improve the problem, so that a high-dimensional sparse feature matrix brought by single hot coding is avoided, the expenditure of a sales forecasting model (such as an ensemble tree model) during training is reduced, brand features can be better utilized by the model, and the forecasting precision of model forecasting can be further improved. The method for acquiring brand features of a commodity provided by the embodiment of the present application will be described with reference to fig. 1.
Step S101: and acquiring a historical daily average sales volume sequence corresponding to each of a plurality of commodity brands including the target commodity brand.
When some target commodity brand characteristics need to be obtained so as to predict the sales volume of the target commodity, a historical daily average sales volume sequence corresponding to each of a plurality of commodity brands including the target commodity brand is obtained and is used as a vector representation of each commodity brand. For convenience of understanding, only the historical daily average sales volume sequence corresponding to 5 commodity brands is taken as an example, and assuming that the daily average sales volume of the past 15 days is taken as an example, for the commodity brand a, the historical daily average sales volume sequence corresponding to the commodity brand a hasThen for brand B, there is a corresponding historical daily average sales sequenceThen for the product brand C, there is a corresponding historical daily average sales volume sequenceThen for brand D, there is a corresponding historical daily average sales sequenceThen for brand E, there is a historical daily average sales sequence corresponding to brand E
The obtaining of the historical daily average sales volume sequence corresponding to each commodity brand may be based on historical sales volume data of each commodity brand to obtain the historical daily average sales volume sequence corresponding to each commodity brand. That is, before obtaining the historical daily average sales volume sequence corresponding to each of the plurality of product brands including the target product brand, the historical daily average sales volume sequence corresponding to each of the product brands is obtained based on the historical sales volume data of each of the product brands.
It should be noted that the number of actually acquired brand names is greater than 5, and the number of brand names illustrated here is merely an example for easy understanding; the period of the historical daily average sales is not limited to 15 days, and may be other periods such as 20 days, one month, and the like.
Step S102: and converting the historical daily average sales volume sequence corresponding to each commodity brand into a sentence character string.
And after the historical daily average sales volume sequence corresponding to each of a plurality of commodity brands including the target commodity brand is obtained, converting the historical daily average sales volume sequence corresponding to each commodity brand into a sentence character string s. For example, the historical daily average sales sequence corresponding to the brand AConverted into sentence character string, thenI.e. eachSeparated by spaces. The historical daily average sales volume sequences corresponding to the rest of the commodity brands are converted into sentence character strings and the like, and the examples are not repeated.
Step S103: a matrix array is formed based on all sentence strings, and each row in the matrix array corresponds to one sentence string.
After converting the historical daily average sales volume sequence corresponding to each commodity brand into sentence character strings, a matrix array Q is formed based on all the sentence character strings s, and each row in the matrix array Q corresponds to one sentence character string s. Taking the above 5 brand names a, B, C, D, and E as examples, the matrix array formed by sentence strings s corresponding to the brand names is a matrix array Q of 5 × 15.
Step S104: and converting each sentence character string in the matrix array into a corresponding sentence vector based on a word vector model to obtain a semantic vector matrix.
After the matrix array Q is obtained, each sentence character string s in the matrix array Q is converted into a corresponding sentence vector W based on a word vector model, and a semantic vector matrix W is obtained.
As an embodiment, each sentence character string s in the matrix array Q may be converted into a corresponding sentence vector w based on the doc2vector model. Wherein the doc2 reporter model can learn each s (sentence string) and each one directly from the semantic contextThe vector representation of the self, namely, the maximization of the logarithmic paraphrase function (1), the formula (1) is that under the condition that the context of the target word and the sentence are known, the parameter is learned through the doc2vector algorithm to maximize the conditional probability of all training data,in factIn the algorithm of the international doc2vector, each sentence s and each unique word in training dataAll have independent id, the algorithm firstly selects a target word and a sliding window size t, then generates a training data by taking the target word as the center and the sliding window size t as the range, and then generates a training data by taking the target word and the sliding window size t as the rangeMapping id corresponding to current sentence s into an initial vector (generally, one hot and s is transformed with target word of the same sentence, which can be trained all the time, namely embedding the semantic of the whole sentence into s corresponding vector), combining each one hot vector with hidden layer parameters to obtain respective hidden layer vector (after the training is finished, combining the vector of one hot with the parameters to obtain final sentence vector and word vector), directly splicing or adding all the obtained hidden layer vectors to average, performing full connection operation on the vectors to generate a vector with the same size and length as the vocabulary table, then performing softmax (activation function), completing one-time forward feedback, when conducting reversely, updating parameters layer by layer in a chain manner by predicting loss and derivation generated by target word, until hidden layer parameters are updated, the method completes a training process, the algorithm maximizes the logarithmic interpretation function (1) by continuously adjusting parameters, namely, knowing the context and the current sentence, and making the model most possibly predict the target word, after multiple iterations, finally each s will obtain its own corresponding semantic vector W, and a new semantic vector matrix W is obtained from all W, which is the requirement of the current step, and the specific training process can refer to FIG. 2 (the size of the sliding window is 1). Wherein, the maximum logarithmic likelihood function is as follows:
Isa list of indices for all strings in s, and t is the sliding window size.
As another embodiment, for each sentence string s in the matrix array Q, each word in the sentence string s may be converted into a corresponding word vector based on the word2vector model; then, based on the word vector corresponding to each word in the sentence character string, a sentence vector w corresponding to the sentence character string is obtained, that is, an average value of the word vectors corresponding to all the words in the sentence character string is obtained and used as the sentence vector w corresponding to the sentence character string.
Step S105: clustering each sentence vector in the semantic vector matrix to obtain a label corresponding to the class of the target commodity brand after clustering, wherein the label is a brand feature corresponding to the target commodity brand.
After each sentence character string s in the matrix array Q is converted into a corresponding sentence vector W based on a word vector model to obtain a semantic vector matrix W, clustering is carried out on each sentence vector W in the semantic vector matrix W to obtain a label corresponding to the type of the clustered target commodity brand, wherein the label is the brand characteristic corresponding to the target commodity brand. Clustering can be performed based on a clustering algorithm, such as a dbscan algorithm, the minimum cluster density and the minimum radius are defined for the dbscan algorithm during clustering, the number of clustering centers is not required to be specified, and finally a series of clusters c ═ (c ═ is obtained1,c2...cn) And n is much smaller than m (m is a brand feature dimension after one-hot coding).
In the embodiment of the application, the continuous variable characteristic sequence with high commodity brand characteristic correlation-the commodity brand historical daily average sales volume sequence is used as a vector representation of each commodity brand, and converts it into sentence strings s, forms a matrix array Q based on all sentence strings s, and each sentence character string in the matrix array Q is converted into a corresponding sentence vector through a word vector model (doc2vector) to obtain a semantic vector matrix W, then a dbscan algorithm is used, the sentence vectors after conversion are clustered, then the result labels after clustering are endowed to the commodity brands of the corresponding sequences to become new characteristic values of brand characteristics, so that the situation that thousands of brands are subjected to unique hot coding directly is avoided, thereby avoiding the high-dimensional sparse feature moments brought by adopting the one-hot coding, reducing the time and space required by the training of a sales prediction model (such as an ensemble tree model) and improving the prediction precision of the sales prediction model.
The embodiment of the present application further provides a method for predicting sales, and the method for predicting sales provided by the embodiment of the present application will be described below with reference to fig. 3.
Step S201: and acquiring related characteristics of the commodity to be predicted, wherein the related characteristics comprise brand characteristics and other numerical characteristics.
The obtained brand features among the relevant features of the commodity to be predicted are brand features obtained by the above-described method (the commodity brand feature obtaining method shown in fig. 1). The other numerical characteristics are other numerical characteristics which influence the commodity sales amount except the brand characteristics, and the other numerical characteristics comprise: the commodity brand to be predicted comprises at least 2 and more than 2 characteristics of daily average sales volume sequence, weather conditions, passenger flow volume, holiday conditions and geographical positions in a preset time period. The average daily sales sequence over the preset time period may be the average daily sales sequence over the past 15 days, it being understood that the preset time period may be 10 days, 20 days, 25 days, one month, etc. In addition, the remaining numerical characteristics may also be the average value, the maximum value, the minimum value and the like of sales of the commodity in a preset time period, such as the past fourteen days.
Step S202: and splicing the brand characteristics and the other numerical characteristics to obtain target characteristics.
After the relevant characteristics of the commodity to be predicted, namely the brand characteristics and the other numerical characteristics of the commodity to be predicted are obtained, the brand characteristics and the other numerical characteristics are spliced to obtain the target characteristics.
Step S203: and inputting the target characteristics into a sales prediction model trained in advance to predict the sales of the brand of the commodity to be predicted.
After the brand features and the other numerical features are spliced to obtain target features, the spliced target features are input into a sales prediction model (such as an integrated tree model) which is trained in advance to predict the sales of the brand of the commodity to be predicted. The process of training the sales prediction model is well known to those skilled in the art and will not be described here, but of course, the previously trained sales prediction model used in the embodiment of the present application may be a model trained by a third party. It should be noted that the sales prediction model is not limited to the ensemble tree model, and may be a common neural network model, such as a BP neural network model.
The embodiment of the present application further provides a device 100 for acquiring brand features of goods, as shown in fig. 4. The brand feature acquisition apparatus 100 for merchandise includes: an obtaining module 110, a first converting module 120, a composing module 130, a second converting module 140, and a clustering module 150.
The obtaining module 110 is configured to obtain a historical daily average sales volume sequence corresponding to each of a plurality of commodity brands including a target commodity brand.
A first conversion module 120, configured to convert the historical daily average sales volume sequence corresponding to each brand of goods into a sentence string.
A composition module 130, configured to compose a matrix array based on all sentence strings, where each row in the matrix array corresponds to a sentence string.
The second conversion module 140 is configured to convert each sentence character string in the matrix array into a corresponding sentence vector based on the word vector model, so as to obtain a semantic vector matrix. Optionally, the second conversion module 140 is configured to convert each sentence character string in the matrix array into a corresponding sentence vector based on the doc2vector model. Optionally, the second conversion module 140 is configured to, for each sentence character string in the matrix array, convert each word in the sentence character string into a corresponding word vector based on a word2vector model; and obtaining a sentence vector corresponding to the sentence character string based on the word vector corresponding to each word in the sentence character string.
And the clustering module 150 is configured to cluster each sentence vector in the semantic vector matrix to obtain a label corresponding to the class of the clustered target commodity brand, where the label is a brand feature corresponding to the target commodity brand.
Optionally, the brand name feature acquiring apparatus 100 further includes: an obtaining module, configured to obtain a historical daily average sales volume sequence corresponding to each of the plurality of product brands based on historical sales volume data of each of the product brands before the obtaining module 110 obtains the historical daily average sales volume sequence corresponding to each of the plurality of product brands including the target product brand.
The commodity brand feature obtaining apparatus 100 provided in the embodiment of the present application has the same implementation principle and the same technical effect as those of the foregoing method embodiments, and for the sake of brief description, reference may be made to corresponding contents in the foregoing method embodiments for parts of embodiments that are not mentioned in the present application.
The embodiment of the present application further provides a sales prediction apparatus 200, as shown in fig. 5. The sales prediction apparatus 200 includes: an acquisition module 210, a stitching module 220, and a prediction module 230.
The obtaining module 210 is configured to obtain relevant features of the to-be-predicted product, where the relevant features include a brand feature and other numerical features.
And a splicing module 220, configured to splice the brand feature and the other numerical features to obtain a target feature.
And the prediction module 230 is configured to input the target feature into a sales prediction model trained in advance to predict sales of the to-be-predicted commodity brand.
Wherein the remaining numerical characteristics include: the commodity brand to be predicted comprises at least 2 and more than 2 characteristics of daily average sales volume sequence, weather conditions, passenger flow volume, holiday conditions and geographical positions in a preset time period.
The implementation principle and the resulting technical effect of the sales prediction apparatus 200 provided in the embodiment of the present application are the same as those of the foregoing method embodiments, and for the sake of brief description, no mention is made in the apparatus embodiment, and reference may be made to the corresponding contents in the foregoing method embodiments.
As shown in fig. 6, fig. 6 shows a block diagram of an electronic device 300 according to an embodiment of the present application. The electronic device 300 includes: a transceiver 310, a memory 320, a communication bus 330, and a processor 340.
The elements of the transceiver 310, the memory 320 and the processor 340 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components may be electrically coupled to each other via one or more communication buses 330 or signal lines. The transceiver 310 is used for transceiving data. The memory 320 is used for storing a computer program, such as a software functional module shown in fig. 4 or fig. 5, that is, the brand name feature acquisition apparatus 100 shown in fig. 4 or the sales prediction apparatus 200 shown in fig. 5. The brand name feature acquiring apparatus 100 includes at least one software function module, which may be stored in the memory 320 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device 300. The processor 340 is configured to execute an executable module stored in the memory 320, such as a software function module or a computer program included in the merchandise brand feature acquisition apparatus 100 or the sales amount prediction apparatus 200. For example, when the processor 340 executes the brand name feature obtaining apparatus 100, the processor 340 is configured to obtain a historical daily average sales volume sequence corresponding to each of a plurality of brand names including the target brand name; converting the historical daily average sales volume sequence corresponding to each commodity brand into sentence character strings; forming a matrix array based on all sentence character strings, wherein each row in the matrix array corresponds to one sentence character string; converting each sentence character string in the matrix array into a corresponding sentence vector based on a word vector model to obtain a semantic vector matrix; clustering each sentence vector in the semantic vector matrix to obtain a label corresponding to the class of the target commodity brand after clustering, wherein the label is a brand feature corresponding to the target commodity brand. For another example, when the processor 340 executes the sales predicting apparatus 200, the processor 340 is configured to obtain relevant features of the product to be predicted, where the relevant features include a brand feature and other numerical features; splicing the brand features and the other numerical features to obtain target features; and inputting the target characteristics into a sales prediction model trained in advance to predict the sales of the brand of the commodity to be predicted.
The Memory 320 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The electronic device 300 includes, but is not limited to, a computer, a personal computer, and the like.
The present embodiment also provides a non-volatile computer-readable storage medium (hereinafter, referred to as a storage medium), where the storage medium stores a computer program, and the computer program is executed by the computer, such as the electronic device 300, to execute the sales prediction method or the sales prediction method described above.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a notebook computer, a server, or an electronic device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A method for acquiring brand features of commodities is characterized by comprising the following steps:
acquiring historical daily average sales volume sequences corresponding to a plurality of commodity brands including a target commodity brand;
converting the historical daily average sales volume sequence corresponding to each commodity brand into sentence character strings;
forming a matrix array based on all sentence character strings, wherein each row in the matrix array corresponds to one sentence character string;
converting each sentence character string in the matrix array into a corresponding sentence vector based on a word vector model to obtain a semantic vector matrix;
clustering each sentence vector in the semantic vector matrix to obtain a label corresponding to the class of the target commodity brand after clustering, wherein the label is a brand feature corresponding to the target commodity brand.
2. The method of claim 1, wherein converting each sentence string in the matrix array to a corresponding sentence vector based on a word vector model comprises:
and converting each sentence character string in the matrix array into a corresponding sentence vector based on a doc2vector model.
3. The method of claim 1, wherein converting each sentence string in the matrix array to a corresponding sentence vector based on a word vector model comprises:
for each sentence character string in the matrix array, converting each word in the sentence character string into a corresponding word vector based on a word2vector model;
and obtaining a sentence vector corresponding to the sentence character string based on the word vector corresponding to each word in the sentence character string.
4. The method of claim 1, wherein prior to obtaining the historical sequence of average daily sales for each of the plurality of brands of merchandise, including the target brand of merchandise, the method further comprises:
and obtaining a historical daily average sales volume sequence corresponding to each commodity brand based on the historical sales volume data of each commodity brand.
5. A sales prediction method, comprising:
obtaining relevant features of a commodity to be predicted, wherein the relevant features comprise brand features obtained by the method according to any one of claims 1-4 and the rest of numerical features;
splicing the brand features and the other numerical features to obtain target features;
and inputting the target characteristics into a sales prediction model trained in advance to predict the sales of the brand of the commodity to be predicted.
6. The method of claim 5, wherein the remaining numerical characteristics comprise: the commodity brand to be predicted comprises at least 2 and more than 2 characteristics of daily average sales volume sequence, weather conditions, passenger flow volume, holiday conditions and geographical positions in a preset time period.
7. An article brand feature acquisition apparatus, comprising:
the acquisition module is used for acquiring historical daily average sales volume sequences corresponding to a plurality of commodity brands including a target commodity brand;
the first conversion module is used for converting the historical daily average sales volume sequence corresponding to each commodity brand into a sentence character string;
the sentence string generating module is used for generating a sentence string according to the sentence strings;
the second conversion module is used for converting each sentence character string in the matrix array into a corresponding sentence vector based on the word vector model to obtain a semantic vector matrix;
and the clustering module is used for clustering each sentence vector in the semantic vector matrix to obtain a label corresponding to the class of the clustered target commodity brand, wherein the label is a brand feature corresponding to the target commodity brand.
8. A sales prediction apparatus, comprising:
an acquisition module for acquiring relevant features of a commodity to be predicted, wherein the relevant features comprise a brand feature obtained by the method of any one of claims 1-4 and the rest of numerical features;
the splicing module is used for splicing the brand characteristics and the other numerical characteristics to obtain target characteristics;
and the prediction module is used for inputting the target characteristics into a sales prediction model trained in advance so as to predict the sales of the brand of the commodity to be predicted.
9. An electronic device, comprising:
a memory and a processor, the processor coupled to the memory;
the memory is used for storing programs;
the processor for invoking a program stored in the memory to perform the method of any one of claims 1-4 or to perform the method of claim 5 or 6.
10. A storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any one of claims 1-4 or the method of claim 5 or 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010122140.1A CN111401409B (en) | 2020-02-28 | 2020-02-28 | Commodity brand feature acquisition method, sales volume prediction method, device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010122140.1A CN111401409B (en) | 2020-02-28 | 2020-02-28 | Commodity brand feature acquisition method, sales volume prediction method, device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111401409A true CN111401409A (en) | 2020-07-10 |
CN111401409B CN111401409B (en) | 2023-04-18 |
Family
ID=71435978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010122140.1A Active CN111401409B (en) | 2020-02-28 | 2020-02-28 | Commodity brand feature acquisition method, sales volume prediction method, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111401409B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112686713A (en) * | 2021-01-21 | 2021-04-20 | 海澜智云科技有限公司 | Clothing sales prediction method, system and equipment based on artificial intelligence |
CN113724055A (en) * | 2021-09-14 | 2021-11-30 | 京东科技信息技术有限公司 | Commodity attribute mining method and device |
CN113887241A (en) * | 2021-10-18 | 2022-01-04 | 浙江香侬慧语科技有限责任公司 | Semantic role labeling method, device and medium based on machine reading understanding |
CN114119081A (en) * | 2021-11-15 | 2022-03-01 | 北京京东尚科信息技术有限公司 | Object prediction model training method and device, electronic equipment and storage medium |
CN114757700A (en) * | 2022-04-12 | 2022-07-15 | 北京京东尚科信息技术有限公司 | Article sales prediction model training method, article sales prediction method and apparatus |
TWI828426B (en) * | 2022-11-16 | 2024-01-01 | 精誠資訊股份有限公司 | An e-commerce auxiliary system that uses multi-oriented product search information to conduct sales forecasts |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060053045A1 (en) * | 2004-09-03 | 2006-03-09 | Danielson Nathan A | System and method for targeted marketing to scientific researchers |
US20130054469A1 (en) * | 2011-08-26 | 2013-02-28 | Sarvatra Technologies Pvt Ltd. | Computer implemented multi-level transaction authorization banking support system and method thereof |
JP2015041121A (en) * | 2013-08-20 | 2015-03-02 | 株式会社日立製作所 | Sales forecast system and sales forecast method |
CN105956699A (en) * | 2016-04-29 | 2016-09-21 | 连云港天马网络发展有限公司 | Commodity classification and delivery and sales prediction method based on e-commerce sales data |
CN106408217A (en) * | 2016-11-10 | 2017-02-15 | 北京京东金融科技控股有限公司 | Product life cycle identification method and device |
CN107507028A (en) * | 2017-08-16 | 2017-12-22 | 北京京东尚科信息技术有限公司 | User preference determines method, apparatus, equipment and storage medium |
US20180060886A1 (en) * | 2016-08-30 | 2018-03-01 | International Business Machines Corporation | Market share prediction with shifting consumer preference |
CN108932648A (en) * | 2017-07-24 | 2018-12-04 | 上海宏原信息科技有限公司 | A kind of method and apparatus for predicting its model of item property data and training |
CN109409964A (en) * | 2018-11-27 | 2019-03-01 | 口碑(上海)信息技术有限公司 | The recognition methods of Premium Brands and device |
CN110599234A (en) * | 2019-08-13 | 2019-12-20 | 广东工业大学 | Product sales prediction method |
-
2020
- 2020-02-28 CN CN202010122140.1A patent/CN111401409B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060053045A1 (en) * | 2004-09-03 | 2006-03-09 | Danielson Nathan A | System and method for targeted marketing to scientific researchers |
US20130054469A1 (en) * | 2011-08-26 | 2013-02-28 | Sarvatra Technologies Pvt Ltd. | Computer implemented multi-level transaction authorization banking support system and method thereof |
JP2015041121A (en) * | 2013-08-20 | 2015-03-02 | 株式会社日立製作所 | Sales forecast system and sales forecast method |
CN105956699A (en) * | 2016-04-29 | 2016-09-21 | 连云港天马网络发展有限公司 | Commodity classification and delivery and sales prediction method based on e-commerce sales data |
US20180060886A1 (en) * | 2016-08-30 | 2018-03-01 | International Business Machines Corporation | Market share prediction with shifting consumer preference |
CN106408217A (en) * | 2016-11-10 | 2017-02-15 | 北京京东金融科技控股有限公司 | Product life cycle identification method and device |
CN108932648A (en) * | 2017-07-24 | 2018-12-04 | 上海宏原信息科技有限公司 | A kind of method and apparatus for predicting its model of item property data and training |
CN107507028A (en) * | 2017-08-16 | 2017-12-22 | 北京京东尚科信息技术有限公司 | User preference determines method, apparatus, equipment and storage medium |
CN109409964A (en) * | 2018-11-27 | 2019-03-01 | 口碑(上海)信息技术有限公司 | The recognition methods of Premium Brands and device |
CN110599234A (en) * | 2019-08-13 | 2019-12-20 | 广东工业大学 | Product sales prediction method |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112686713A (en) * | 2021-01-21 | 2021-04-20 | 海澜智云科技有限公司 | Clothing sales prediction method, system and equipment based on artificial intelligence |
CN113724055A (en) * | 2021-09-14 | 2021-11-30 | 京东科技信息技术有限公司 | Commodity attribute mining method and device |
CN113724055B (en) * | 2021-09-14 | 2024-04-09 | 京东科技信息技术有限公司 | Commodity attribute mining method and device |
CN113887241A (en) * | 2021-10-18 | 2022-01-04 | 浙江香侬慧语科技有限责任公司 | Semantic role labeling method, device and medium based on machine reading understanding |
CN114119081A (en) * | 2021-11-15 | 2022-03-01 | 北京京东尚科信息技术有限公司 | Object prediction model training method and device, electronic equipment and storage medium |
CN114757700A (en) * | 2022-04-12 | 2022-07-15 | 北京京东尚科信息技术有限公司 | Article sales prediction model training method, article sales prediction method and apparatus |
TWI828426B (en) * | 2022-11-16 | 2024-01-01 | 精誠資訊股份有限公司 | An e-commerce auxiliary system that uses multi-oriented product search information to conduct sales forecasts |
Also Published As
Publication number | Publication date |
---|---|
CN111401409B (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111401409B (en) | Commodity brand feature acquisition method, sales volume prediction method, device and electronic equipment | |
US11770571B2 (en) | Matrix completion and recommendation provision with deep learning | |
Evermann et al. | Predicting process behaviour using deep learning | |
US20180158078A1 (en) | Computer device and method for predicting market demand of commodities | |
Aiello et al. | Machine Learning with R and H2O | |
US11928616B2 (en) | Method and system for hierarchical forecasting | |
US20190266474A1 (en) | Systems And Method For Character Sequence Recognition | |
CN112070577A (en) | Commodity recommendation method, system, equipment and medium | |
CN111831901A (en) | Data processing method, device, equipment and storage medium | |
CN111177579A (en) | Integrated diversity enhanced ultra-deep factorization machine model and construction method and application thereof | |
CN113763019A (en) | User information management method and device | |
CN113256007A (en) | Multi-mode-oriented new product sales forecasting method and device | |
CN113033090A (en) | Push model training method, data push device and storage medium | |
CN112906361A (en) | Text data labeling method and device, electronic equipment and storage medium | |
CN115344698A (en) | Label processing method, label processing device, computer equipment, storage medium and program product | |
CN114556367A (en) | Interpretable table data learning using sequence sparse attention | |
CN110275953B (en) | Personality classification method and apparatus | |
CN113591881B (en) | Intention recognition method and device based on model fusion, electronic equipment and medium | |
Mostofi et al. | Real-estate price prediction with deep neural network and principal component analysis | |
CN113779380A (en) | Cross-domain recommendation method, device and equipment, and content recommendation method, device and equipment | |
US11599797B2 (en) | Optimization of neural network in equivalent class space | |
Huynh et al. | Causal inference in econometrics | |
CN115374284A (en) | Data mining method and server based on artificial intelligence | |
CN115762667A (en) | Chemical reaction type identification method and device and computer equipment | |
CN115659005A (en) | Product pushing method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |