CN111401409B - 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 PDF

Info

Publication number
CN111401409B
CN111401409B CN202010122140.1A CN202010122140A CN111401409B CN 111401409 B CN111401409 B CN 111401409B CN 202010122140 A CN202010122140 A CN 202010122140A CN 111401409 B CN111401409 B CN 111401409B
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.)
Active
Application number
CN202010122140.1A
Other languages
Chinese (zh)
Other versions
CN111401409A (en
Inventor
黄泽
王梦秋
胡太祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Innovation Qizhi Qingdao Technology Co ltd
Original Assignee
Innovation Qizhi Qingdao Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Innovation Qizhi Qingdao Technology Co ltd filed Critical Innovation Qizhi Qingdao Technology Co ltd
Priority to CN202010122140.1A priority Critical patent/CN111401409B/en
Publication of CN111401409A publication Critical patent/CN111401409A/en
Application granted granted Critical
Publication of CN111401409B publication Critical patent/CN111401409B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information 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

Commodity brand feature acquisition method, sales volume prediction method, device and electronic equipment
Technical Field
The application belongs to the technical field of artificial intelligence, and particularly relates to a commodity brand feature obtaining method, a commodity brand feature sales predicting method, a commodity brand sales predicting device and electronic equipment.
Background
For markets and supermarkets, accurate commodity sales prediction can help the supermarkets to make a supply and replenishment strategy with maximized benefits, so that the turnover rate is increased, and the 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, once the one-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 one-hot coding has to be traversed when the node is split, which brings higher overhead to both memory space and time required during training, in addition, the newly generated features after the one-hot coding become mutually independent, and each feature has only 0 or 1 value, which means that a one-vs-rest splitting mode is adopted during splitting, when the feature dimensions are high, data on each category is less, splitting is unbalanced, and gain brought to the model is also sharply reduced, so that the model is more prone to select features which are not subjected to the one-hot coding.
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 acquiring 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, a continuous variable characteristic sequence with high commodity brand characteristic correlation-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, a semantic vector matrix is obtained, the converted sentence vectors are clustered, the clustered result labels are endowed to the commodity brands of the corresponding sequence to form new characteristic values of brand characteristics, and thousands of brands are prevented from being directly subjected to unique hot coding, so that a high-dimensional sparse characteristic matrix caused by the unique hot coding is avoided, the required time and space during the training of a sales volume prediction model are reduced, and the prediction accuracy of the sales volume prediction model 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 sentence string is converted into a sentence string, a matrix array is formed based on all the sentence strings, each sentence string in the matrix array is converted into a corresponding sentence vector through a word vector model, a semantic vector matrix is obtained, the converted sentence vectors are clustered, the commodity brands of the corresponding sequences are endowed with clustered result labels, new feature values of brand features are obtained, 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, the rest of numerical features are combined, the sales volume of the commodity is predicted based on the target features obtained by splicing the rest of numerical features and the obtained brand features, the reliability of a prediction result is guaranteed, and the prediction error caused by the single dimension is avoided.
In combination with a 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 sentence character strings; 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, an 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 method provided by the foregoing first aspect and/or any one of the possible implementations in combination with the first aspect, or performs the method provided by the foregoing second aspect and/or any one of the possible implementations in combination with the second aspect.
Additional features and advantages of the present 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 present 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 shows a schematic flowchart of a sales prediction method provided in 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 or 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 phrases "comprising a," "...," or "comprising" does not exclude the presence of additional like 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, so that the problem is solved, a high-dimensional sparse feature matrix caused by single-hot coding is avoided, the overhead 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 historical daily average sales volume sequences corresponding to a plurality of commodity brands including the target commodity brand.
When certain 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 has
Figure BDA0002395028670000071
Then for brand B, there is a corresponding historical daily average sales sequence
Figure BDA0002395028670000072
Then for the product brand C, there is a corresponding historical daily average sales volume sequence
Figure BDA0002395028670000073
Then for brand D, there is a corresponding historical daily average sales sequence
Figure BDA0002395028670000074
Then for brand E, there is a historical daily average sales sequence corresponding to brand E
Figure BDA0002395028670000075
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 A
Figure BDA0002395028670000081
Conversion into a sentence string having >>
Figure BDA0002395028670000082
I.e. each>
Figure BDA0002395028670000083
Separated by empty spaces. The historical daily average sales volume sequences corresponding to the rest of the commodity brands are converted into sentence character strings, and the sentence character strings are similar to the historical daily average sales volume sequences, and are not illustrated.
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 brands a, B, C, D, and E as examples, the matrix array formed by sentence strings s corresponding to the brands 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 context
Figure BDA0002395028670000084
The vector representation of the self, namely, the logarithmic paraphrase function (1) is maximized, the formula (1) is that in the condition that the context of the target word and the sentence are known, the parameter is learned by the doc2vector algorithm to maximize the conditional probability of all the training data, and the judgment is carried out>
Figure BDA0002395028670000091
In the actual doc2vector algorithm, each sentence s and each unique word ≦ in the training data>
Figure BDA0002395028670000092
There will be a single id, the algorithm will first select a target word and a sliding window size t, then generate a training data with the target word as the center and the sliding window size t as the range, and then pick the ^ or ^ in the sliding window range>
Figure BDA0002395028670000093
And the id corresponding to the current sentence s is mapped into an initial vector (generally, one hot and s is transformed along with the target words of the same sentence)The method includes the steps of training all the times, namely embedding the semantics of the whole sentence into s corresponding vectors, combining the one hot vectors with hidden layer parameters to obtain hidden layer vectors (after the training completion parameters are fixed, combining the one hot vectors with the parameters to obtain final sentence vectors and word vectors), 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 a vocabulary table, and performing softmax (activation function), so that forward feedback is completed once, and when conducting in the reverse direction, the parameters are updated layer by layer in a most possible chain-type mode through predicting loss and derivation generated by target words, until the hidden layer parameters are updated, so that a training process is completed, the algorithm continuously adjusts the parameters to maximize a logarithmic natural function (1), namely, the context and the current sentence are known, so that the model predicts the target words, and after multiple iterations, each s obtains the semantic vector corresponding to the s, namely, all the semantic vector is obtained by a new semantic solving rule, namely, a sliding window vector W2 is obtained by a reference window process (W2). Wherein, the maximum logarithmic likelihood function is as follows:
Figure BDA0002395028670000094
I s a 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 need to be defined for the dbscan algorithm during clustering, the number of clustering centers does not need to be specified, and finally a series of clusters c = (c =) (c is obtained 1 ,c 2 ...c n ) And n is much smaller than m (m is a brand feature dimension after one-hot coding).
In the embodiment of the application, a continuous variable characteristic sequence with high commodity brand characteristic correlation, namely a 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 s, a matrix array Q is formed based on all the sentence character strings s, each sentence character string in the matrix array Q is converted into a corresponding sentence vector through a word vector model (doc 2 vector), a semantic vector matrix W is obtained, then a dbscan algorithm is used for clustering the converted sentence vectors, a clustered result label is endowed to the commodity brand of a corresponding sequence to form a new characteristic value of brand characteristics, thousands of brands are prevented from being subjected to unique hot coding directly, high-dimensional characteristic moments caused by the unique hot coding are avoided, and the needed sparse time and space during training of a sales volume prediction model (such as an ensemble tree model) are reduced and the prediction accuracy is improved.
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 features and the other numerical features to obtain target features.
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 volume prediction model trained in advance to predict the sales volume of the to-be-predicted commodity brand.
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 application further provides a device 100 for acquiring the brand characteristics of the commodities, 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 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 merchandise brand feature obtaining 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 acquiring apparatus 100 provided in the embodiment of the present application has the same implementation principle and the same technical effects as those of the foregoing method embodiments, and for brevity, reference may be made to corresponding contents in the foregoing method embodiments where no part of the apparatus embodiments is mentioned.
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.
The predicting module 230 is configured to input the target feature into a sales predicting 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 directly or indirectly electrically connected to each other 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 executable modules stored in the memory 320, such as software functional modules or computer programs included in the product brand feature acquiring apparatus 100 or the sales predicting apparatus 200. For example, when the processor 340 executes the apparatus 100 for acquiring brand characteristics of commodities, the processor 340 is configured to acquire a historical daily average sales sequence corresponding to each of a plurality of brands of commodities including a target brand of commodity; 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 to-be-predicted commodity, 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.
Processor 340 may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 340 may be any conventional processor or 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 several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. 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 think 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 into 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 into 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 respectively 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 generating module is used for generating a sentence character string according to the sentence character 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:
the processor is connected with 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.
CN202010122140.1A 2020-02-28 2020-02-28 Commodity brand feature acquisition method, sales volume prediction method, device and electronic equipment Active CN111401409B (en)

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 CN111401409A (en) 2020-07-10
CN111401409B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
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
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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
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
WO2013030847A1 (en) * 2011-08-26 2013-03-07 Sarvatra Technologies Pvt. Ltd. A computer implemented multi-level transaction authorization banking support system and method thereof
US20180060886A1 (en) * 2016-08-30 2018-03-01 International Business Machines Corporation Market share prediction with shifting consumer preference

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Also Published As

Publication number Publication date
CN111401409A (en) 2020-07-10

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
CN108197132B (en) Graph database-based electric power asset portrait construction method and device
US20230102337A1 (en) Method and apparatus for training recommendation model, computer device, and storage medium
US20180158078A1 (en) Computer device and method for predicting market demand of commodities
US8645291B2 (en) Encoding of data for processing in a spatial and temporal memory system
US20130054496A1 (en) Assessing performance in a spatial and temporal memory system
US11928616B2 (en) Method and system for hierarchical forecasting
CN112256886B (en) Probability calculation method and device in atlas, computer equipment and storage medium
US20190266474A1 (en) Systems And Method For Character Sequence Recognition
CN111581923A (en) Method, device and equipment for generating file and computer readable storage medium
CN111831901A (en) Data processing method, device, equipment and storage medium
CN110275953B (en) Personality classification method and apparatus
Mostofi et al. Real-estate price prediction with deep neural network and principal component analysis
CN113656690A (en) Product recommendation method and device, electronic equipment and readable storage medium
Huynh et al. Causal inference in econometrics
US20200175072A1 (en) Complex modeling computational engine optimized to reduce redundant calculations
CN116340635A (en) Article recommendation method, model training method, device and equipment
CN115374284A (en) Data mining method and server based on artificial intelligence
US11829379B2 (en) Methods and systems of a matching platform for entitites
CN115049458A (en) Commodity pushing method and device based on user crowd modeling, medium and equipment
CN114429384A (en) Intelligent product recommendation method and system based on e-commerce platform
CN113570204A (en) User behavior prediction method, system and computer equipment
CN113762992A (en) Method and device for processing data
US11966405B1 (en) Inferring brand similarities using graph neural networks and selection prediction

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