CN110968775A - Training method of commodity attribute generation model, generation method, search method and system - Google Patents
Training method of commodity attribute generation model, generation method, search method and system Download PDFInfo
- Publication number
- CN110968775A CN110968775A CN201811159166.2A CN201811159166A CN110968775A CN 110968775 A CN110968775 A CN 110968775A CN 201811159166 A CN201811159166 A CN 201811159166A CN 110968775 A CN110968775 A CN 110968775A
- Authority
- CN
- China
- Prior art keywords
- commodity
- attribute
- training
- information
- generation model
- 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.)
- Pending
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/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0631—Item recommendations
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a training method of a commodity attribute generation model, a generation method and a search method and a system, wherein the training method comprises the following steps: the method comprises the steps of obtaining commodity information of a plurality of commodities, wherein the commodity information comprises texts and pictures; labeling attribute information of the plurality of commodities, wherein the attribute information comprises at least one attribute word; constructing a plurality of groups of training data, wherein each group of training data comprises commodity information and attribute information of the same commodity; and training the commodity attribute generation model according to the multiple groups of training data, wherein the commodity attribute generation model is used for generating attribute information according to commodity information. According to the invention, a commodity attribute generation model is trained based on deep learning, and further, based on the commodity attribute generation module, correct commodity attribute information can be automatically generated according to commodity information, more specifically, a commodity title and a commodity picture, so that the defect that the commodity title is written in an irregular manner in the current website can be overcome, and the search result is optimized.
Description
Technical Field
The invention relates to the technical field of internet, in particular to a training method of a commodity attribute generation model, a generation method and a search method and a system.
Background
With the continuous development of internet technology, online shopping has penetrated the aspects of people's lives. When shopping online, often, due to the irregular writing of the seller on the title of the commodity, the buyer encounters the situation that the search result does not meet the requirement when searching for the commodity by using the search term, which greatly affects the shopping experience of the buyer. For example, the search term is "september", the search result may be "fanciful dark-colored men doing gym shorts with september", and the search result actually points to the product but is a penta-pant, that is, since the seller mistakenly adds a penta-pant in the product title, the penta-pant is also displayed in the search result of the search term, which affects the shopping experience of the buyer.
Disclosure of Invention
The invention aims to overcome the defect of irregular writing of a commodity title in the prior art and provides a training method of a commodity attribute generation model and generation and search methods and systems.
The invention solves the technical problems through the following technical scheme:
a training method for a commodity attribute generation model is characterized by comprising the following steps:
the method comprises the steps of obtaining commodity information of a plurality of commodities, wherein the commodity information comprises texts and pictures;
labeling attribute information of the plurality of commodities, wherein the attribute information comprises at least one attribute word;
constructing a plurality of groups of training data, wherein each group of training data comprises commodity information and attribute information of the same commodity;
and training the commodity attribute generation model according to the multiple groups of training data, wherein the commodity attribute generation model is used for generating attribute information according to commodity information.
Preferably, the step of training the product attribute generation model according to the plurality of sets of training data includes:
the sets of training data are trained using an encoding-decoding model framework.
Preferably, the step of training the plurality of sets of training data using an encoding-decoding model framework comprises:
for each group of training data, performing word segmentation on the text to obtain a word segmentation sequence;
converting the word segmentation sequence into a word segmentation vector;
encoding the word segmentation vector to obtain an encoded vector;
extracting a feature vector of the picture;
and decoding according to the coding vector and the characteristic vector to obtain attribute information.
Preferably, before the decoding step according to the coding vector and the feature vector, the training method further comprises:
inputting the encoding vector and the feature vector into an attention model;
calculating attention distribution values of the coding vector and the feature vector at the current moment;
the decoding according to the encoding vector and the feature vector specifically includes:
decoding according to the attention distribution value at the current moment and the decoding participle obtained at the previous moment to obtain the decoding participle at the current moment;
wherein the decoding participles are attribute participles.
Preferably, the step of converting the word segmentation sequence into a word segmentation vector comprises:
converting the word segmentation sequence into a word segmentation vector by using a word2vec model;
the step of extracting the feature vector of the picture comprises the following steps:
and extracting the feature vector of the picture by using a resnet model.
Preferably, the step of converting the word segmentation sequence into a word segmentation vector by using a word2vec model includes:
pre-training the word2vec model by using external data;
the step of extracting the feature vector of the picture by using the resnet model comprises the following steps:
and pre-training the resnet model by utilizing imagenet data.
Preferably, the plurality of articles comprises:
the similarity between the text in the commodity information and the labeled attribute information is higher than a first threshold value;
and/or searching for commodities according to the search terms, and returning commodities with the click rate higher than a second threshold value in the search results.
An electronic device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor implements any one of the above training methods for a product property generation model when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of any one of the above methods for training a product property generation model.
A method for generating commodity attributes is characterized by comprising the following steps:
training the commodity attribute generation model by using any one of the training methods of the commodity attribute generation model;
acquiring commodity information of a commodity, wherein the commodity information comprises texts and pictures;
inputting the commodity information into the commodity attribute generation model;
and outputting the attribute information of the commodity.
Preferably, the attribute information includes at least one attribute word, and the step of outputting the attribute information includes:
selecting a preset number of attribute participles;
and outputting the selected attribute participles with the preset number.
An electronic device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor implements any one of the above-mentioned methods for generating an attribute of an article when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of any of the above-described methods for generating an attribute of an article.
A method for searching for a commodity, the method comprising:
generating attribute information by using any one of the commodity attribute generation methods;
inputting a search term;
searching the attribute information according to the search word;
and outputting the search result.
An electronic device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor implements the method for searching for the article when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method of searching for an article as described above.
A training system for a commodity attribute generation model, the training system comprising:
the system comprises a first acquisition module, a second acquisition module and a display module, wherein the first acquisition module is used for acquiring commodity information of a plurality of commodities, and the commodity information comprises texts and pictures;
the labeling module is used for labeling the attribute information of the commodities, and the attribute information comprises at least one attribute word;
the construction module is used for constructing a plurality of groups of training data, and each group of training data comprises commodity information and attribute information of the same commodity;
and the training module is used for training the commodity attribute generation model according to the plurality of groups of training data, and the commodity attribute generation model is used for generating attribute information according to commodity information.
Preferably, the training module is specifically configured to train the plurality of sets of training data using a coding-decoding model framework.
Preferably, the training module comprises:
the word segmentation unit is used for segmenting words of the text for each group of training data to obtain a word segmentation sequence;
the vector conversion unit is used for converting the word segmentation sequence into word segmentation vectors;
the text coding unit is used for coding the word segmentation vectors to obtain coding vectors;
the picture coding unit is used for extracting a feature vector of a picture;
and the decoding unit is used for decoding according to the coding vector and the characteristic vector to obtain the attribute information.
Preferably, the training module further comprises:
the attention unit is used for receiving the coding vector and the feature vector and calculating attention distribution values of the coding vector and the feature vector at the current moment;
the decoding unit is specifically used for decoding according to the attention distribution value at the current moment and the decoded participle obtained at the previous moment to obtain the decoded participle at the current moment;
wherein the decoding participles are attribute participles.
Preferably, the vector conversion unit converts the word segmentation sequence into a word segmentation vector by using a word2vec model;
the picture coding unit extracts a feature vector of a picture by using a resnet model.
Preferably, the word2vec model is obtained by using external data to train in advance, and the resnet model is obtained by using imagenet data to train in advance.
Preferably, the plurality of articles comprises:
the similarity between the text in the commodity information and the labeled attribute information is higher than a first threshold value;
and/or searching for commodities according to the search terms, and returning commodities with the click rate higher than a second threshold value in the search results.
A system for generating an attribute of a commodity, the system comprising:
the training system of any one of the commodity attribute generation models is used for training the commodity attribute generation model;
the second acquisition module is used for acquiring commodity information of commodities, wherein the commodity information comprises texts and pictures;
the commodity information input module is used for inputting the commodity information into the commodity attribute generation model;
and the attribute information output module is used for outputting the attribute information of the commodity.
Preferably, the attribute information includes at least one attribute word, and the attribute information output module includes:
the selecting unit is used for selecting attribute participles with preset quantity;
and the output unit is used for outputting the selected attribute participles with the preset number.
A search system for an article, the search system comprising:
the system for generating any one of the above commodity attributes, configured to generate attribute information;
the search word input module is used for inputting search words;
the searching module is used for searching the attribute information according to the searching words;
and the search result output module is used for outputting the search result.
The positive progress effects of the invention are as follows: according to the invention, a commodity attribute generation model is trained based on deep learning, and further, based on the commodity attribute generation module, correct commodity attribute information can be automatically generated according to commodity information, more specifically, a commodity title and a commodity picture, so that the defect that the commodity title is written in an irregular manner in the current website can be overcome, and the search result is optimized.
Drawings
Fig. 1 is a flowchart of a training method of a product attribute generation model according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of step S4 in the training method of the product property generation model according to embodiment 1 of the present invention.
Fig. 3 is a schematic diagram of a hardware structure of an electronic device according to embodiment 2 of the present invention.
Fig. 4 is a flowchart of a method for generating a product attribute according to embodiment 4 of the present invention.
Fig. 5 is a flowchart of a commodity searching method according to embodiment 7 of the present invention.
Fig. 6 is a schematic block diagram of a training system for a product attribute generation model according to embodiment 10 of the present invention.
Fig. 7 is a module diagram of a training module in the training system of the commodity attribute generation model according to embodiment 10 of the present invention.
Fig. 8 is a schematic block diagram of a product attribute generation system according to embodiment 11 of the present invention.
Fig. 9 is a block diagram of a search system for merchandise according to embodiment 12 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
The embodiment provides a training method of a commodity attribute generation model, and fig. 1 shows a flowchart of the embodiment. Referring to fig. 1, the training method of the present embodiment includes:
s1, acquiring commodity information of a plurality of commodities;
s2, labeling attribute information of a plurality of commodities;
s3, constructing a plurality of groups of training data;
and S4, training the commodity attribute generation model according to the multiple groups of training data.
In this embodiment, the merchandise information includes text and pictures, wherein the text may include, but is not limited to, a title of the merchandise, and the pictures may include, but is not limited to, a picture of a cover page showing the merchandise. The attribute information includes at least one attribute word that may be used to represent, but is not limited to, brand, genre, style of the good. Each set of training data includes commodity information and attribute information of the same commodity.
More specifically, in this embodiment, the multiple commodities may include a commodity in which the similarity between the text in the commodity information and the labeled attribute information is higher than a first threshold, where the first threshold may be set in a self-defined manner according to a specific application. For example, in the product displayed by the high-quality merchant in the shopping website, the high-quality merchant adds the product title without adding other attribute word segmentation by mistake, and the attribute information of the product can be obtained from the product title of the high-quality merchant.
In this embodiment, the plurality of commodities may further include commodities searched according to the search term, and commodities with click rates higher than a second threshold in the returned search results are obtained according to the click log, where the second threshold may be set in a self-defined manner according to a specific application. The search result with high click rate can be used for indicating that the search result meets the requirements of the user, namely, the search result can be indirectly indicated that other attribute participles are not mistakenly added in the commodity title of the search result.
For example, the commodity is divided into five pants, the commodity title of the divided five pants obtained in step S1 is "the five pants in fancy boy shorts man 2018 is trimmed in summer to display the thin leisure shorts man trousers, the color of the five pants is 31", and the commodity displayed by the obtained cover picture is divided into five pants. The attribute information marked in step S2 is "color of floral prince divided into five pants cartoons". The set of training data constructed in step S3 may include: the style male pants man 2018 can be used for slimming leisure pants male pants in summer, namely the fifth pants card color 31, the cover picture and the style male pants card color.
It should be understood that when the training data is constructed in step S3, it may further include cleaning the above commodity information, for example, case-unifying, converting the number words, model words, etc. into a preset format, setting the size of the pictures to a uniform size, etc.
In this way, a plurality of sets of training data are constructed, and further, in step S4, a product attribute generation model for generating attribute information from product information can be trained from the plurality of sets of constructed data, that is, accurate product attribute information can be automatically generated from a product title and a product picture based on the product attribute generation module.
In the present embodiment, the encoding-decoding model framework may be utilized to train the above-constructed multiple sets of training data, and specifically, referring to fig. 2, step S4 may include:
s41, performing word segmentation on the text to obtain a word segmentation sequence;
and S42, converting the word segmentation sequence into word segmentation vectors.
In the above step, the word segmentation sequence may be input into an embedding layer, and the word segmentation sequence may be converted into a word segmentation vector. More specifically, word sequences may be converted to word vectors using, but not limited to, the word2vec model. Due to the limitation of training data, unknown words are easy to encounter during word segmentation conversion, and furthermore, in the embodiment, the word2vec model can be trained in advance by further utilizing external data so as to optimize the processing of the unknown words.
And S43, coding the word vector to obtain a coded vector.
In this step, the above-mentioned word segmentation vectors may be sequentially input to an RNN layer (Recurrent neural network) to obtain a code vector. More specifically, in the present embodiment, the above-described word segmentation vectors may be sequentially input to 4-layer BI-LSTM (bidirectional LSTM, composed of Fwd LSTM (forward LSTM, features are input into the network from front to back in time series) and Bwd LSTM (backward LSTM, features are input into the network from back to front in time series), where LSTM (Long Short-Term Memory ) is a special RNN structure), to obtain the encoding vectors.
And S44, extracting the feature vector of the picture.
In this step, the feature vector of the picture can be extracted using, but not limited to, the resnet (depth residual network) model. In addition, because there are many resnet parameters and the training speed is slow, in this embodiment, the resnet model can be trained in advance by further using imagenet (the database with the largest image recognition in the world at present) data, so as to improve the training speed.
S45, inputting the coding vector and the feature vector into an attention model;
s46, calculating the attention distribution values of the coding vector and the feature vector at the current moment;
and S47, decoding according to the attention distribution value of the current moment and the decoded participle obtained at the previous moment to obtain the decoded participle at the current moment.
In the above steps, decoding may be performed according to the coding vector and the feature vector via, but not limited to, an LSTM layer and a softmax (generalization of logistic regression model to the multi-classification problem) model, so as to obtain the attribute information. More specifically, different attention distribution values may be automatically set for the coding vector and the feature vector based on the attention model, that is, different attentions may be automatically allocated to the text and the picture in the commodity information, so that the text and the picture in the commodity information are better utilized, and better attribute information can be generated, where the decoded participle obtained in step S48 is an attribute participle in the attribute information.
In this embodiment, a commodity attribute generation model is trained based on deep learning, and then based on the commodity attribute generation module, correct commodity attribute information can be automatically generated according to commodity information, more specifically, according to a commodity title and a commodity picture, so that the defect that the commodity title is written irregularly in a current website can be overcome.
Example 2
The present embodiment provides an electronic device, which may be represented in the form of a computing device (for example, may be a server device), and includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor may implement the training method of the product attribute generation model provided in embodiment 1 when executing the computer program.
Fig. 3 shows a schematic diagram of a hardware structure of the present embodiment, and as shown in fig. 3, the electronic device 9 specifically includes:
at least one processor 91, at least one memory 92, and a bus 93 for connecting the various system components (including the processor 91 and the memory 92), wherein:
the bus 93 includes a data bus, an address bus, and a control bus.
The processor 91 executes various functional applications and data processing, such as a training method of the product attribute generation model provided in embodiment 1 of the present invention, by executing the computer program stored in the memory 92.
The electronic device 9 may further communicate with one or more external devices 94 (e.g., a keyboard, a pointing device, etc.). Such communication may be through an input/output (I/O) interface 95. Also, the electronic device 9 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 96. The network adapter 96 communicates with the other modules of the electronic device 9 via the bus 93. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 9, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module, according to embodiments of the application. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 3
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps of the training method of the product property generation model provided in embodiment 1.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code for causing a terminal device to execute the steps of the training method for implementing the commodity attribute generation model in embodiment 1 when the program product runs on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
Example 4
The present embodiment provides a method for generating a commodity attribute, and fig. 4 shows a flowchart of the present embodiment. Referring to fig. 4, the generation method of the present embodiment includes:
s101, training a commodity attribute generation model;
s102, acquiring commodity information of commodities;
s103, inputting the commodity information into a commodity attribute generation model;
and S104, outputting the attribute information of the commodity.
Specifically, step S101 is to train the product attribute generation model by using the training method of the product attribute generation model provided in embodiment 1, and further, after inputting the product information acquired in step S102 into the product attribute generation model, the attribute information of the product can be output, where in this embodiment, the product information includes text and pictures.
In order to simplify the attribute information, in this embodiment, a preset number of attribute participles may be selected, and the selected preset number of attribute participles are output in step S104. Specifically, a preset number of attribute participles having the highest degree of correlation with the commodity may be selected using a beam-search algorithm.
Based on the product attribute generation model obtained by the training method in embodiment 1, this embodiment can automatically generate correct product attribute information according to the text and the picture of each product in the website, so as to overcome the defect that the title of the product is written irregularly in the current website.
Example 5
The present embodiment provides an electronic device, which may be represented in the form of a computing device (for example, may be a server device), and includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor may implement the method for generating the commodity attribute provided in embodiment 4 when executing the computer program.
Example 6
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps of the generation method of the article attribute provided in embodiment 4.
Example 7
The present embodiment provides a method for searching for a commodity, and fig. 5 shows a flowchart of the present embodiment. Referring to fig. 5, the search method of the present embodiment includes:
s201, generating attribute information;
s202, inputting a search word;
s203, searching attribute information according to the search terms;
and S204, outputting the search result.
Specifically, step S201 generates attribute information of each item in the web site using the item attribute generation method provided in embodiment 4, so that based on the search word input in step S202, step S203 searches among a large amount of attribute information generated in step S201, and outputs a search result of the attribute information generated based on the pair of search words in step S204.
The correct commodity attribute of the commodity is generated based on the generation method in the embodiment 4, and the search result is optimized in the embodiment, so that the user can obtain the correct search result when searching according to the search term, and the commodity which is actually irrelevant to the search term due to the wrong information added by the seller in the commodity title is prevented from appearing in the search result, and the user experience is improved. In addition, the writing of the seller to the commodity information can be standardized, so that effective commodity information can be obtained.
Example 8
The present embodiment provides an electronic device, which may be represented in the form of a computing device (for example, may be a server device), and includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for searching for an article provided in embodiment 7.
Example 9
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps of the search method for an article provided in embodiment 7.
Example 10
The embodiment provides a training system for a commodity attribute generation model, and fig. 6 shows a module diagram of the embodiment. Referring to fig. 6, the training system 1 of the present embodiment includes:
a first obtaining module 11, configured to obtain commodity information of a plurality of commodities;
the labeling module 12 is used for labeling the attribute information of a plurality of commodities;
a construction module 13 for constructing a plurality of sets of training data;
and the training module 14 is used for training the commodity attribute generation model according to the multiple groups of training data.
In this embodiment, the merchandise information includes text and pictures, wherein the text may include, but is not limited to, a title of the merchandise, and the pictures may include, but is not limited to, a picture of a cover page showing the merchandise. The attribute information includes at least one attribute word that may be used to represent, but is not limited to, brand, genre, style of the good. Each set of training data includes commodity information and attribute information of the same commodity.
More specifically, in this embodiment, the multiple commodities may include a commodity in which the similarity between the text in the commodity information and the labeled attribute information is higher than a first threshold, where the first threshold may be set in a self-defined manner according to a specific application. For example, in the product displayed by the high-quality merchant in the shopping website, the high-quality merchant adds the product title without adding other attribute word segmentation by mistake, and the attribute information of the product can be obtained from the product title of the high-quality merchant.
In this embodiment, the plurality of commodities may further include commodities searched according to the search term, and commodities with click rates higher than a second threshold in the returned search results are obtained according to the click log, where the second threshold may be set in a self-defined manner according to a specific application. The search result with high click rate can be used for indicating that the search result meets the requirements of the user, namely, the search result can be indirectly indicated that other attribute participles are not mistakenly added in the commodity title of the search result.
For example, the commodity is divided into five pants, the commodity title of the divided five pants acquired by the first acquisition module 11 is "the five pants in the fancy boy shorts male 2018 are trimmed in summer to display the thin leisure shorts male pants in the five pants card with the color of 31", and the commodity displayed by the acquired cover picture is divided into five pants. The attribute information marked by the marking module 12 is 'the color of the floral prince divided into five pants card'. The set of training data constructed by the construction module 13 may include: the style male pants man 2018 can be used for slimming leisure pants male pants in summer, namely the fifth pants card color 31, the cover picture and the style male pants card color.
It should be understood that when the construction module 13 constructs the training data, it may also include cleaning the above commodity information, for example, unifying case, converting the number words, model words, etc. into a preset format, setting the size of the pictures to a unified size, etc.
In this way, a plurality of sets of training data are constructed, and the training module 14 can train a product attribute generation model for generating attribute information from product information according to the plurality of sets of constructed data, that is, based on the product attribute generation module, it is possible to automatically generate correct product attribute information from a product title and a product picture.
In the present embodiment, the training module 14 may utilize, but is not limited to, an encoding-decoding model framework to train the above-constructed multiple sets of training data, and specifically, referring to fig. 7, the training module 14 may include:
a word segmentation unit 141, configured to perform word segmentation on the text for each set of training data to obtain a word segmentation sequence;
and a vector conversion unit 142, configured to convert the word segmentation sequence into a word segmentation vector.
Specifically, the vector conversion unit 142 may include an embedding layer for converting the word segmentation sequence into a word segmentation vector. More specifically, the vector conversion unit 142 may include, but is not limited to, a word2vec model for converting a sequence of participles into a participle vector. Due to the limitation of training data, unknown words are easy to encounter during word segmentation conversion, and furthermore, in the embodiment, the word2vec model can be trained in advance by further utilizing external data so as to optimize the processing of the unknown words.
And the text encoding unit 143 is configured to encode the word segmentation vector to obtain an encoded vector.
Specifically, the text encoding unit 143 may sequentially input the above-described word segmentation vectors to an RNN layer (recurrent neural Network) to acquire an encoding vector. More specifically, in the present embodiment, the text encoding unit 143 may sequentially input the above-described word segmentation vectors into 4-layer BI-LSTM (bidirectional LSTM, composed of Fwd LSTM (forward LSTM, features are input into the network from front to back in time series) and Bwd LSTM (backward LSTM, features are input into the network from back to front in time series), where LSTM (Long Short-Term Memory ) is a special RNN structure, to obtain the encoding vectors.
And a picture encoding unit 144, configured to extract a feature vector of the picture.
Specifically, the picture encoding unit 144 may extract a feature vector of the picture using, but not limited to, a resnet (depth residual network) model. In addition, because there are many resnet parameters and the training speed is slow, in this embodiment, the resnet model can be trained in advance by further using imagenet (the database with the largest image recognition in the world at present) data, so as to improve the training speed.
An attention unit 145, configured to receive the encoded vector and the feature vector, and calculate an attention distribution value of the encoded vector and the feature vector at the current time;
and a decoding unit 146, configured to decode according to the attention distribution value at the current time and the decoded participle obtained at the previous time, so as to obtain the decoded participle at the current time.
In this embodiment, the decoding unit 146 may perform decoding according to the encoding vector and the feature vector via, but not limited to, an LSTM layer and a softmax (generalization of logistic regression model to multi-classification problem) model, so as to obtain the attribute information. More specifically, the decoding unit 146 may automatically set different attention distribution values for the coding vector and the feature vector based on the attention unit 145, that is, may automatically allocate different attentions to the text and the picture in the commodity information, so that the text and the picture in the commodity information are better utilized, and better attribute information can be generated, where the decoded word obtained by the decoding unit 146 is an attribute word in the attribute information.
In this embodiment, a commodity attribute generation model is trained based on deep learning, and then based on the commodity attribute generation module, correct commodity attribute information can be automatically generated according to commodity information, more specifically, a commodity title and a commodity picture, so that the defect that the commodity title is written irregularly in a current website can be overcome.
Example 11
The present embodiment provides a system for generating a commodity attribute, and fig. 8 shows a module diagram of the present embodiment. Referring to fig. 8, the generation system 2 of the present embodiment includes:
the training system 1 of the product attribute generation model in embodiment 10 is used to train a product attribute generation model;
a second obtaining module 21, configured to obtain commodity information of a commodity;
a commodity information input module 22 for inputting commodity information into the commodity attribute generation model;
and an attribute information output module 23 for outputting the attribute information of the product.
Specifically, the training system 1 provided in embodiment 1 is configured to train a product attribute generation model, and after inputting the product information acquired by the second acquisition module 21 into the product attribute generation model, the attribute information output module 23 is capable of outputting the attribute information of the product, where in this embodiment, the product information includes a text and a picture.
In order to simplify the attribute information, in this embodiment, the attribute information output module 23 may select a preset number of attribute participles, and output the selected preset number of attribute participles. Specifically, the attribute information output module 23 may select a preset number of attribute participles having the highest degree of correlation with the commodity using a beam-search algorithm.
Based on the product attribute generation model obtained by the training system in embodiment 10, this embodiment can automatically generate correct product attribute information according to the text and the picture of each product in the website, so as to overcome the defect that the title of the product is written irregularly in the current website.
Example 12
The present embodiment provides a search system for goods, and fig. 9 shows a block diagram of the present embodiment. Referring to fig. 9, the search system 3 of the present embodiment includes:
the product attribute generation system 2 in embodiment 11 for generating attribute information;
a search term input module 31 for inputting a search term;
a search module 32 for searching the attribute information according to the search word;
and a search result output module 33, configured to output a search result.
Specifically, the generation system 2 provided in embodiment 11 generates attribute information of each commodity in a web site, so that the search module 32 searches a large amount of attribute information generated by the generation system 2 based on a search word input by the search word input module 31, and outputs a search result based on the attribute information generated by the search word pair by the search result output module 33.
The generation system in the embodiment 11 is used to generate the correct commodity attribute of the commodity, and the embodiment optimizes the search result, so that the user can obtain the correct search result when searching according to the search term, and the commodity which is actually irrelevant to the search term due to the wrong information added by the seller in the commodity title does not appear in the search result, thereby improving the user experience. In addition, the writing of the seller to the commodity information can be standardized, so that effective commodity information can be obtained.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.
Claims (26)
1. A training method for a commodity attribute generation model is characterized by comprising the following steps:
the method comprises the steps of obtaining commodity information of a plurality of commodities, wherein the commodity information comprises texts and pictures;
labeling attribute information of the plurality of commodities, wherein the attribute information comprises at least one attribute word;
constructing a plurality of groups of training data, wherein each group of training data comprises commodity information and attribute information of the same commodity;
and training the commodity attribute generation model according to the multiple groups of training data, wherein the commodity attribute generation model is used for generating attribute information according to commodity information.
2. The method of training a product property generation model according to claim 1, wherein the step of training a product property generation model based on the plurality of sets of training data comprises:
the sets of training data are trained using an encoding-decoding model framework.
3. The training method of the commodity attribute generation model according to claim 2, wherein the step of training the plurality of sets of training data using the encode-decode model framework includes:
for each group of training data, performing word segmentation on the text to obtain a word segmentation sequence;
converting the word segmentation sequence into a word segmentation vector;
encoding the word segmentation vector to obtain an encoded vector;
extracting a feature vector of the picture;
and decoding according to the coding vector and the characteristic vector to obtain attribute information.
4. A training method of a commodity attribute generation model according to claim 3, wherein before the step of decoding based on the code vector and the feature vector, the training method further comprises:
inputting the encoding vector and the feature vector into an attention model;
calculating attention distribution values of the coding vector and the feature vector at the current moment;
the decoding according to the encoding vector and the feature vector specifically includes:
decoding according to the attention distribution value at the current moment and the decoding participle obtained at the previous moment to obtain the decoding participle at the current moment;
wherein the decoding participles are attribute participles.
5. The training method of the commodity attribute generation model according to claim 3, wherein the step of converting the word segmentation sequence into a word segmentation vector comprises:
converting the word segmentation sequence into a word segmentation vector by using a word2vec model;
the step of extracting the feature vector of the picture comprises the following steps:
and extracting the feature vector of the picture by using a resnet model.
6. The training method of the commodity attribute generation model according to claim 5, wherein the step of converting the word segmentation sequence into word segmentation vectors by using a word2vec model comprises:
pre-training the word2vec model by using external data;
the step of extracting the feature vector of the picture by using the resnet model comprises the following steps:
and pre-training the resnet model by utilizing imagenet data.
7. A training method for a commodity attribute generation model according to claim 1, wherein the plurality of commodities include:
the similarity between the text in the commodity information and the labeled attribute information is higher than a first threshold value;
and/or searching for commodities according to the search terms, and returning commodities with the click rate higher than a second threshold value in the search results.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the training method of the merchandise attribute generation model according to any one of claims 1-7 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the training method of the merchandise property generation model according to any one of claims 1-7.
10. A method for generating an attribute of a commodity, the method comprising:
training a commodity attribute generation model using a training method of the commodity attribute generation model according to any one of claims 1 to 7;
acquiring commodity information of a commodity, wherein the commodity information comprises texts and pictures;
inputting the commodity information into the commodity attribute generation model;
and outputting the attribute information of the commodity.
11. The method of generating an attribute of a commodity according to claim 10, wherein the attribute information includes at least one attribute word, and the step of outputting the attribute information includes:
selecting a preset number of attribute participles;
and outputting the selected attribute participles with the preset number.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of generating an attribute of a good according to claim 10 or 11 when executing the computer program.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of generating an attribute of an item of claim 10 or 11.
14. A method for searching for a commodity, the method comprising:
generating attribute information by using the generation method of the article attribute according to claim 10 or 11;
inputting a search term;
searching the attribute information according to the search word;
and outputting the search result.
15. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of searching for an item of claim 14 when executing the computer program.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of searching for an article of manufacture according to claim 14.
17. A training system for a commodity attribute generation model, the training system comprising:
the system comprises a first acquisition module, a second acquisition module and a display module, wherein the first acquisition module is used for acquiring commodity information of a plurality of commodities, and the commodity information comprises texts and pictures;
the labeling module is used for labeling the attribute information of the commodities, and the attribute information comprises at least one attribute word;
the construction module is used for constructing a plurality of groups of training data, and each group of training data comprises commodity information and attribute information of the same commodity;
and the training module is used for training the commodity attribute generation model according to the plurality of groups of training data, and the commodity attribute generation model is used for generating attribute information according to commodity information.
18. The training system for the commodity attribute generation model of claim 17, wherein the training module is specifically configured to train the plurality of sets of training data using a code-decode model framework.
19. The training system for the commodity property generation model according to claim 17, wherein said training module comprises:
the word segmentation unit is used for segmenting words of the text for each group of training data to obtain a word segmentation sequence;
the vector conversion unit is used for converting the word segmentation sequence into word segmentation vectors;
the text coding unit is used for coding the word segmentation vectors to obtain coding vectors;
the picture coding unit is used for extracting a feature vector of a picture;
and the decoding unit is used for decoding according to the coding vector and the characteristic vector to obtain the attribute information.
20. The training system for the commodity property generation model of claim 19, wherein said training module further comprises:
the attention unit is used for receiving the coding vector and the feature vector and calculating attention distribution values of the coding vector and the feature vector at the current moment;
the decoding unit is specifically used for decoding according to the attention distribution value at the current moment and the decoded participle obtained at the previous moment to obtain the decoded participle at the current moment;
wherein the decoding participles are attribute participles.
21. The training system of the commodity attribute generation model according to claim 19, wherein the vector conversion unit converts the word segmentation sequence into a word segmentation vector using a word2vec model;
the picture coding unit extracts a feature vector of a picture by using a resnet model.
22. The training system of commodity attribute generation model according to claim 21, wherein the word2vec model is pre-trained using external data, and the resnet model is pre-trained using imagenet data.
23. The system for training a commodity attribute generation model according to claim 17, wherein the plurality of commodities includes:
the similarity between the text in the commodity information and the labeled attribute information is higher than a first threshold value;
and/or searching for commodities according to the search terms, and returning commodities with the click rate higher than a second threshold value in the search results.
24. A system for generating an attribute of a commodity, the system comprising:
a training system for a commodity attribute generation model according to any one of claims 17 to 23, for training a commodity attribute generation model;
the second acquisition module is used for acquiring commodity information of commodities, wherein the commodity information comprises texts and pictures;
the commodity information input module is used for inputting the commodity information into the commodity attribute generation model;
and the attribute information output module is used for outputting the attribute information of the commodity.
25. The system for generating an attribute of a commodity according to claim 24, wherein the attribute information includes at least one attribute word, and the attribute information output module includes:
the selecting unit is used for selecting attribute participles with preset quantity;
and the output unit is used for outputting the selected attribute participles with the preset number.
26. A search system for an article, the search system comprising:
a generation system of an attribute of a commodity according to claim 24 or 25, for generating attribute information;
the search word input module is used for inputting search words;
the searching module is used for searching the attribute information according to the searching words;
and the search result output module is used for outputting the search result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811159166.2A CN110968775A (en) | 2018-09-30 | 2018-09-30 | Training method of commodity attribute generation model, generation method, search method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811159166.2A CN110968775A (en) | 2018-09-30 | 2018-09-30 | Training method of commodity attribute generation model, generation method, search method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110968775A true CN110968775A (en) | 2020-04-07 |
Family
ID=70028836
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811159166.2A Pending CN110968775A (en) | 2018-09-30 | 2018-09-30 | Training method of commodity attribute generation model, generation method, search method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110968775A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112035660A (en) * | 2020-08-14 | 2020-12-04 | 海尔优家智能科技(北京)有限公司 | Object class determination method and device based on network model |
CN112508654A (en) * | 2020-12-16 | 2021-03-16 | 平安养老保险股份有限公司 | Product information recommendation method and device, computer equipment and storage medium |
CN112686704A (en) * | 2020-12-31 | 2021-04-20 | 无锡软美信息科技有限公司 | Shopping guiding method and system |
CN113378552A (en) * | 2021-07-06 | 2021-09-10 | 焦点科技股份有限公司 | Commodity title generation method based on multi-mode GPT2 model |
CN113393289A (en) * | 2021-05-27 | 2021-09-14 | 阿里巴巴新加坡控股有限公司 | Method and device for processing commodity object information and modifying title |
CN113570427A (en) * | 2021-07-22 | 2021-10-29 | 上海普洛斯普新数字科技有限公司 | System for extracting and identifying on-line or system commodity characteristic information |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107330752A (en) * | 2017-05-31 | 2017-11-07 | 北京京东尚科信息技术有限公司 | The method and apparatus for recognizing brand word |
CN107679119A (en) * | 2017-09-19 | 2018-02-09 | 北京京东尚科信息技术有限公司 | The method and apparatus for generating brand derivative words |
CN107705066A (en) * | 2017-09-15 | 2018-02-16 | 广州唯品会研究院有限公司 | Information input method and electronic equipment during a kind of commodity storage |
CN107729900A (en) * | 2017-09-15 | 2018-02-23 | 广州唯品会研究院有限公司 | It is a kind of that the method and apparatus for completing typing information completion is extracted using picture attribute |
CN108153913A (en) * | 2018-01-24 | 2018-06-12 | 北京神州泰岳软件股份有限公司 | Return information generates training method, return information generation method and the device of model |
-
2018
- 2018-09-30 CN CN201811159166.2A patent/CN110968775A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107330752A (en) * | 2017-05-31 | 2017-11-07 | 北京京东尚科信息技术有限公司 | The method and apparatus for recognizing brand word |
CN107705066A (en) * | 2017-09-15 | 2018-02-16 | 广州唯品会研究院有限公司 | Information input method and electronic equipment during a kind of commodity storage |
CN107729900A (en) * | 2017-09-15 | 2018-02-23 | 广州唯品会研究院有限公司 | It is a kind of that the method and apparatus for completing typing information completion is extracted using picture attribute |
CN107679119A (en) * | 2017-09-19 | 2018-02-09 | 北京京东尚科信息技术有限公司 | The method and apparatus for generating brand derivative words |
CN108153913A (en) * | 2018-01-24 | 2018-06-12 | 北京神州泰岳软件股份有限公司 | Return information generates training method, return information generation method and the device of model |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112035660A (en) * | 2020-08-14 | 2020-12-04 | 海尔优家智能科技(北京)有限公司 | Object class determination method and device based on network model |
CN112508654A (en) * | 2020-12-16 | 2021-03-16 | 平安养老保险股份有限公司 | Product information recommendation method and device, computer equipment and storage medium |
CN112686704A (en) * | 2020-12-31 | 2021-04-20 | 无锡软美信息科技有限公司 | Shopping guiding method and system |
CN112686704B (en) * | 2020-12-31 | 2022-05-17 | 上海识致信息科技有限责任公司 | Shopping guiding method and system |
CN113393289A (en) * | 2021-05-27 | 2021-09-14 | 阿里巴巴新加坡控股有限公司 | Method and device for processing commodity object information and modifying title |
CN113378552A (en) * | 2021-07-06 | 2021-09-10 | 焦点科技股份有限公司 | Commodity title generation method based on multi-mode GPT2 model |
CN113378552B (en) * | 2021-07-06 | 2024-04-19 | 焦点科技股份有限公司 | Commodity title generation method based on multi-mode GPT2 model |
CN113570427A (en) * | 2021-07-22 | 2021-10-29 | 上海普洛斯普新数字科技有限公司 | System for extracting and identifying on-line or system commodity characteristic information |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110968775A (en) | Training method of commodity attribute generation model, generation method, search method and system | |
CN106599226B (en) | Content recommendation method and content recommendation system | |
US11657230B2 (en) | Referring image segmentation | |
CN108446374B (en) | User's Intention Anticipation method, apparatus, electronic equipment, storage medium | |
CN109062893B (en) | Commodity name identification method based on full-text attention mechanism | |
US20180336193A1 (en) | Artificial Intelligence Based Method and Apparatus for Generating Article | |
CN109376222B (en) | Question-answer matching degree calculation method, question-answer automatic matching method and device | |
CN110019793A (en) | A kind of text semantic coding method and device | |
CN110083729B (en) | Image searching method and system | |
CN110781394A (en) | Personalized commodity description generation method based on multi-source crowd-sourcing data | |
CN111414561B (en) | Method and device for presenting information | |
CN114445201A (en) | Combined commodity retrieval method and system based on multi-mode pre-training model | |
CN110188158B (en) | Keyword and topic label generation method, device, medium and electronic equipment | |
CN113705313A (en) | Text recognition method, device, equipment and medium | |
CN111325571A (en) | Method, device and system for automatically generating commodity comment labels for multitask learning | |
CN112632227B (en) | Resume matching method, device, electronic equipment, storage medium and program product | |
CN115062134B (en) | Knowledge question-answering model training and knowledge question-answering method, device and computer equipment | |
CN112199502B (en) | Verse generation method and device based on emotion, electronic equipment and storage medium | |
CN111897954A (en) | User comment aspect mining system, method and storage medium | |
CN114706987B (en) | Text category prediction method, device, equipment, storage medium and program product | |
CN116797280A (en) | Advertisement document generation method and device, equipment and medium thereof | |
CN113779186A (en) | Text generation method and device | |
CN113704509B (en) | Multimedia recommendation method and device, electronic equipment and storage medium | |
CN117271759A (en) | Text abstract generation model training method, text abstract generation method and device | |
CN114861601A (en) | Event joint extraction method based on rotary coding 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 |