The disclosure claims the benefits of priority to Chinese application number 201711473163.1, filed Dec. 29, 2017, which is incorporated herein by reference in its entirety.
In the digital age, the use of digital content provided on, for example, social media, selected media, and news apps have been extremely prominent. And it is expected that the market share for digital content (when compared to physical content such as newspapers) will continue to increase in the future. Accordingly, the volume of content may also continue to increase subsequently. To effectively convey information that meets the needs of the target audience, it is necessary to quickly make a large amount of diversified creative content for distribution.
The objective of embodiments of the present application is to provide a document generation method and apparatus, which can quickly generate content of a target product.
Embodiments of the disclosure provide a content generation method. The method may include: acquiring product description information; selecting, by using a deep neural network model component, a content phrase matched with the product description information, wherein the deep neural network model component is obtained by training according to a plurality of pieces of historical product description information and historical content of the historical product description information; and generating content corresponding to the product description information based on the selected content phrase.
Embodiments of the disclosure also provide a content generation apparatus. The apparatus may include: a memory storing a set of instructions; and at least one processor configured to execute the set of instructions to cause the apparatus to perform: acquiring product description information; selecting, by using a deep neural network model component, a content phrase matched with the product description information, wherein the deep neural network model component is obtained by training according to a plurality of pieces of historical product description information and historical content of the historical product description information; and generating content corresponding to the product description information based on the selected content phrase.
Embodiments of the disclosure further provide a non-transitory computer readable medium that stores a set of instructions that is executable by at least one processor of a computer system to cause the computer system to perform a content generation method. The method can include: acquiring product description information; selecting, by using a deep neural network model component, a content phrase matched with the product description information, wherein the deep neural network model component is obtained by training according to a plurality of pieces of historical product description information and historical content of the historical product description information; and generating content corresponding to the product description information based on the selected content phrase.
To describe the technical solutions in the embodiments of the present application or the prior art more clearly, the accompanying drawings required for describing the embodiments or the prior art are briefly introduced below. It is apparent that the accompanying drawings described in the following are merely some embodiments of the present application, and those of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.
In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present application. It is apparent that the described embodiments are merely some rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments derived by those of ordinary skill in the art without any creative effort shall all fall within the protection scope of the present application.
Based on the technical requirements similar to those described above, a content generation technology provided in the present application can eliminate the process of writing content manually. Based on a plurality of pairs of historical product description information and historical content, deep neural network learning can be carried out on the plurality of pairs of historical product description information and historical content to obtain a deep neural network model component by training. The deep neural network model component obtained by training can be used to construct content of product description information, which not only can quickly generate content of a product but also can ensure a degree of matching between the accuracy of the content and user requirements.
In some embodiments, a deep neural network model component can be used to carry out deep learning on a plurality of pieces of historical product description information and historical content of the historical product description information. Therefore, the deep neural network model component can be continually optimized to finally meet preset requirements (e.g., the value of a loss function is not greater than a preset threshold, etc.). As the historical product description information and the historical content of the historical product description information can contain certain requirements or rules, in some embodiments, the historical content can be used to generate a certain product access rate. In some embodiments, after content is displayed to users, some of the users may access product information associated with the content by, for example, clicking the content, adding it to favorite, generating transactions, and the like.
Table 1 below illustrates historical product description information and historical content corresponding to the historical product description information. As shown in Table 1, content of “Bedding that makes you love sleeping naked” is associated with product description information “Modern simplicity style, cotton, four-piece suit, cotton bedding, 1.8-m/1.5-m bed, cartoon 4-piece suit, bed sheets and quilt covers,” and content of “The sport suit that allows you to release your vitality” is associated with product description information of “Original design, 2017 spring, loose and round-collar long-sleeved hoody+asymmetrical trousers, sport suit, for ladies.” It is appreciated that, the above data of the product description information and historical content not only can be acquired from historical data of a platform, such as an e-commerce platform, but also can be provided according to human experience. Sources of the data are not limited in the present application.
By non-restrictively taking a Sequence to Sequence (seq2seq) model component in a deep neural network model component as an example, the process of carrying out deep learning on original product description information and historical content of the second product in Table 1 by using the seq2seq model component can be described as below. In some embodiments, deep learning can also be carried out on data by using a model component, such as a Pointer Network or a Pointer Generator. The model component used in embodiments of the application is not limited in the present application.
As shown in
As shown in
As shown in
In step S201, product description information can be acquired.
In step S203, a content phrase matched with the product description information can be selected by using a deep neural network model component. The deep neural network model component can be obtained by training according to a plurality of pieces of historical product description information and historical content of the historical product description information.
In step S205, content of the product description information is constructed and generated based on the selected content phrase.
In some embodiments, historical data can be trained by using a deep neural network model component (e.g., a seq2seq model component). The historical data can include a plurality of pieces of historical product description information and historical content of the historical product description information. In some embodiments, the historical product description information can include detailed product description information, title information, label information of the product, and the like. In an example, the historical content can include a historical content that is selected from massive historical data that has a relatively high recall rate. That is, after content constructed and generated for a certain piece of historical product description information is displayed, a relatively high user access rate is obtained. The user access rate can include, for example, a user click rate, a user collection rate, a user transaction rate, etc. In other embodiments, the historical content can include other content set according to human experience, which is not limited in the present application.
In some embodiments, the seq2seq model component can transform one sequence into another sequence. The sequence can be expressed with vectors. The sequence can include a plurality of product phrases in the product description information. The seq2seq model component can include an encoder element and a decoder element. The encoder element and the decoder element each can include a RNN. In the encoder element, an input sequence can be transformed into a fixed-length context semantic vector. Correspondingly, in the decoder element, the fixed-length context semantic vector can be used as input data of the decoder element to generate an output sequence. Based on the above theory, at least one product phrase can be extracted from the historical product description information, and at least one product phrase forms a historical product phrase sequence. In the process of forming the historical product phrase sequence, the phrase can be converted into a vector, and the vector of the product phrase forms the historical product phrase sequence.
As shown in
After generating a context vector c, the encoder sends the context vector c into a decoder element. As shown in
After the content is generated, the content can be displayed on a client terminal of Xiao M by using a graphics and text editing tool for content. As shown in
It should be noted that, after acquiring the content finally selected by the user Xiao M, the client terminal can feed back the content as historical data into the seq2seq model component for the seq2seq model component to further carry out deep learning. For example, Xiao M can finalize “Comfortable and elegant, goes with your high-end beauty” as the content of the dress. Then, in the process of training the seq2 seq model component, the encoder element can use “Y-brand 2017 new-style spring clothing, women's wear, Korean fashion, skinny and slim, silk one-piece dress, A-line skirt, large-sizes available” as historical product description information and “Comfortable and elegant, goes with your high-end beauty” as a historical content to carry out subsequent deep learning.
In some embodiment, as shown in
In some embodiments, after the context vector c is acquired, as shown in
According to the content generation method, deep learning can be carried out on a plurality of pieces of historical product description information and historical content of the historical product description information to construct a deep neural network model component. As such, the deep neural network model component can be directly used to quickly generate content of a target product. Therefore, embodiments of the present application can save resources and provide customized output based on the incoming sequence data. In addition, on one hand, for a user client terminal, the display of the content of the product can be accelerated; on the other hand, through deep learning of a large amount of historical data, the content acquired by using the deep neural network model component is more in line with the requirements of users, thus improving the users' sense of experience.
It can be known from the above that, in the encoding process, the historical product phrase sequence corresponding to the historical product description information can be transformed into a fixed-length context semantic vector. The context vector is obtained from the transformation of the hidden vector corresponding to the last phrase. Then, it can be considered that the context vector is highly correlated with the last phrase in the historical product phrase sequence but is little correlated with the previous phrases. In addition, in an actual decoding process, with constant output of the vectors of the content phrases, degrees of correlation between content phrase vectors and various product phrases in the historical product phrase sequence also change. In order to enable the seq2seq model component to focus more on finding useful information that is significantly related to current content phrase vectors and in the historical product phrase sequence, in some embodiments of the present application, an Attention mechanism can be further added to the seq2seq model component. In the Attention mechanism, at every step in the decoding process, the value of a degree of correlation between an output content vector and the vector of each product phrase in the historical product phrase sequence is calculated once. In this embodiment, when a degree of correlation between a vector of a certain product phrase and an output content vector is greater (that is, the value of the degree of correlation is greater), a weight value of the vector of the corresponding product phrase can be increased, so as to increase the attention to the product phrase. The weight value can be specifically embodied in the process of calculating a vector of a subsequent content phrase. As shown in
In some embodiments, some entity information in the product description information needs to be completely displayed in content, for example, product brand name, person name, place name, trademark, date and other information. For example, for the brand name Michael Kors, if the decoder outputs the content phrase “Michael” in the brand name in the process of generating content, a subsequent content phrase output by the decoder is “Kors” theoretically so as to ensure the integrity of the output brand name.
Based on this, in some embodiments of the present application, a Copying mechanism can be used so as to ensure the integrity of some fixed information in the above scenario. For example, in the Copying mechanism, whether a subsequent content phrase output by the decoder is generated by copying or can automatically be calculated, and this can be judged specifically based on a reuse probability and a generation probability. When the reuse probability is greater than the generation probability, it can be determined that the subsequent content phrase output is generated by copying. For example, with respect to the above example, when a subsequent content phrase of the content phrase “Michael” is calculated, it can be obtained that the reuse probability is greater than the generation probability, that is, it is possible to copy the subsequent product phrase “Kors” of “Michael” from the product description information to serve as the subsequent content phrase that is to be output by the decoder, so as to ensure the integrity of the output. In this embodiment, after the seq2seq model component is trained, the model component further needs to be tested. It can be found that a known input historical product phrase sequence and a known output historical content phrase sequence exist in the training process, but no known output sequence exists in the testing process. Such a phenomenon can lead to different parameter dependences in the decoding part of the training process and the decoding part of the testing process. In other words, in the training process, an input term in the decoding process is an expected output (e.g., a known output vector) of the previous output phrase, but also is a predicted output of the previous output phrase at the testing stage; this results in inconsistency of input dependence distributions in the training stage and the testing stage. Therefore, in some embodiments of the present application, the seq2seq model component can be trained by using an annealing training method. For example, in the process of annealing training by using Data as Demonstrator (DAD), an input term can be randomly selected to be an expected output or a predicted output of the previous term. This model is trained by using a phrase sequence corresponding to the historical content at the beginning. With the deepening of the training, the training probability of the phrase sequence corresponding to the historical content is gradually reduced, until the model finally does not need the phrase sequence corresponding to the historical content. Definitely, in other embodiments, the seq2seq model component can also be trained by using multiple annealing training methods such as XENT (cross entropy) and XENT to XENT to solve the problem of different parameter dependences in the decoding part of the training process and the decoding part of the testing process.
In some embodiments of the present application, the number of words in the generated content can further be limited. Specifically, in the process of training the seq2seq model component, a content end identifier, for example, an identifier <\EOS> can be set at the decoding part. If the length of the content is limited to 10 words, the content end identifier can be set at the position of the 10th word. After the content end identifier has been set, a distance between a current output vector and the content end identifier can be calculated in the decoding process to monitor in real time whether the number of words of the current content exceeds the limit.
By using a deep neural network, deep learning can be carried out not only on product titles, labels and historical content, but also on detailed product description information and historical content. The detailed product description information can include product brief introduction, product details, etc. In a specific processing procedure, the product brief introduction and the product details often include more information than product titles or labels. In an example, product description information of a decorative picture is “Brand: XX picture, Picture Number: three and more, Painting Material: canvas, Mounting Manner: framed, Frame Material: metal, Color Classification: A—Cercidiphyllum japonicum leaf, B—Sansevieria trifasciata Prain, C—Sansevieria trifasciata Prain, D—Drymoglossum subcordatum, E—Monstera leaf, F—phoenix tree leaf, G—Parathelypteris glanduligera, H—japanese banana leaf, I—silver-edged round-leaf araliaceae polyscias fruticosa, J—spruce leaf, Style: modern simplicity, Process: spraying, Combining Form: single price, Picture Form: planar, Pattern: plants and flowers, Size: 40*60 cm 50*70 cm 60*90 cm, Frame Type: shallow wooden aluminum alloy frame, black aluminum alloy frame, Article Number: 0739.” According to the statistics on historical user data, a historical content corresponding to the product description information of the decorative picture is set as “Minimalism style. Back to simplicity.” Then, deep learning can be carried out on the detailed product description information and the historical content in a manner the same as that in the aforesaid embodiments. It should be noted that, in the process of selecting phrases matched with the product description information, redundant information in the product description information can be removed, and keywords having actual meanings are extracted from the product description information, such as brand terms, material phrases and core terms. For example, phrases that can be extracted from the product description information of the decorative picture can include “three,” “canvas,” “framed,” “metal frame,” “spraying,” “planar,” “plants and flowers,” “aluminum alloy,” and the like.
In another aspect, the present application further provides a content generation apparatus.
Content generation apparatus 700 can also include a display 705 for displaying the content. When the instructions are executed, the processor can implement: acquiring product description information; selecting, by using a deep neural network model component, a content phrase matched with the product description information, wherein the deep neural network model component is obtained by training according to a plurality of pieces of historical product description information and historical content of the historical product description information; and constructing and generating content of the product description information based on the selected content phrase.
In some embodiments, the deep neural network model component can be configured to be obtained by: acquiring a plurality of pieces of historical product description information and historical content of the historical product description information; constructing a deep neural network model component, the deep neural network model component being provided with training parameters; and training the deep neural network model component by using corresponding relations between the plurality of pieces of historical product description information and the historical content respectively, and adjusting the training parameters until the deep neural network model component meets preset requirements.
In some embodiments, the step of training the deep neural network model component by using corresponding relations between the plurality of pieces of historical product description information and the historical content respectively can include: extracting at least one product phrase from the historical product description information to form a historical product phrase sequence; extracting at least one content phrase from the historical content to form a historical content phrase sequence; and adjusting the training parameters using the historical product phrase sequence as input data of the deep neural network model component and the historical content phrase sequence as output data of the deep neural network model component, until the deep neural network model component meets the preset requirements.
In some embodiments, the deep neural network model component can include one of the following: a seq2seq model component, and a seq2seq and Attention mechanism model component.
In some embodiments, the step of selecting, by using a deep neural network model component, a content phrase matched with the product description information can include: extracting at least one product phrase from the product description information, converting the product phrase into a product phrase vector, and forming a product phrase vector sequence corresponding to the product description information; and inputting the product phrase vector sequence into the deep neural network model component, and obtaining at least one content phrase by calculation according to the product phrase vector sequence and the training parameters.
In some embodiments, the step of inputting the product phrase vector sequence into the deep neural network model component, and obtaining at least one content phrase by calculation according to the product phrase vector sequence and the training parameters can include: obtaining a single content phrase vector by calculation according to the product phrase vector sequence and the training parameters; calculating the value of a degree of correlation between the content phrase vector and the product phrase vector respectively; and setting a weight value of the product phrase vector respectively according to the value of the degree of correlation, the weight value being used to calculate a subsequent content phrase vector.
In some embodiments, the seq2seq and Attention mechanism model component includes an encoder and a decoder, and the step of training the deep neural network model component by using corresponding relations between the plurality of pieces of historical product description information and the historical content respectively includes: acquiring an output phrase generated by the decoder and a historical product phrase matched with the output phrase; calculating a reuse probability and a generation probability of the output phrase; and using a subsequent phrase of the historical product phrase as a subsequent output phrase of the decoder when the reuse probability is greater than the generation probability.
In some embodiments, the step of constructing and generating content of the product description information based on the selected content phrase includes: inputting the selected content phrase into a language model for processing and generating content that conforms to a preset language rule.
In some embodiments, after the step of constructing and generating content of the product description information, the method further includes: displaying the content.
Some embodiments of the application further provide another content generation apparatus. The apparatus can include a processor and a memory configured to store processor executable instructions. When the instructions are executed, the processor implements: acquiring product description information; selecting, by using a deep neural network model component, a content phrase matched with the product description information, wherein the deep neural network model component is obtained by training according to a plurality of pieces of historical product description information and historical content of the historical product description information; and constructing and generating a plurality of content of the product description information based on the selected content phrase.
In some embodiments, after implementing the step of constructing and generating content of the product description information, the processor further implements the following steps: displaying content; acquiring a user's operational behavior on the content; and feeding back the operational behavior to the deep neural network model component for deep learning.
The present application provides operation steps of the method as described in the embodiments or flowchart. However, more or fewer operation steps can be included based on regular labor or without creative labor. A step order listed in the embodiments is merely one of multiple orders of executing the steps and does not represent a unique execution order. When performed in an actual apparatus or client terminal product, the steps can be performed according to the method order shown in the embodiments or accompanying drawing or performed in parallel (e.g., using parallel processors or in an environment of multi-thread processing).
It is appreciated that, in addition to implementing the controller by using pure computer readable program codes, the steps of the method can be logically programmed to enable the controller to implement the same function in the form of a logic gate, a switch, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller. Therefore, such a controller can be considered a hardware component, and apparatuses included therein and configured to implement various functions can also be considered structures inside the hardware component. Moreover, the apparatuses can further be configured to implement various functions and considered as both software modules for implementing the method and structures inside the hardware component.
The present application can be described in a common context of a computer executable instruction executed by a computer, for example, a program module. Generally, the program module includes a routine, a program, an object, an assembly, a data structure, a class, and the like for executing a specific task or implementing a specific abstract data type. The present application can also be implemented in a distributed computing environment, and in the distributed computer environment, a task is executed by using remote processing devices connected through a communications network. In the distributed computer environment, the program module can be located in a local and remote computer storage medium including a storage device.
From the description of the implementation methods above, those skilled in the art can understand that the present application can be implemented by software plus a necessary universal hardware platform. Based on such understanding, the technical solutions in the embodiments of the present application can essentially, or the portion contributing to the prior art, be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as a Read-Only Memory (ROM)/Random Access Memory (RAM), a magnetic disk, or an optical disc, and include several instructions that enable a computer device (which may be a personal computer, a mobile terminal, a server, a network device, etc.) to execute the method in the embodiments or certain portions of the embodiments of the present application.
The embodiments in the specification are described progressively, identical or similar parts of the embodiments may be obtained with reference to each other, and each embodiment emphasizes a different part than the other embodiments. The present application is applicable to various universal or dedicated computer system environments or configurations, such as, a personal computer, a server computer, a handheld device or a portable device, a tablet device, a multi-processor system, a microprocessor-based system, a set top box, a programmable electronic device, a network PC, a minicomputer, a mainframe computer, and a distributed computing environment including any of the above systems or devices.
Although the present application is described through embodiments, those of ordinary skill in the art should know that the present application has many variations and changes without departing from the spirit of the present application, and it is expected that the appended claims cover the variations and changes without departing from the spirit of the present application.
Number | Date | Country | Kind |
---|---|---|---|
201711473163.1 | Dec 2017 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
6266664 | Russell-Falla | Jul 2001 | B1 |
9619735 | Lineback | Apr 2017 | B1 |
10565498 | Zhiyanov | Feb 2020 | B1 |
11106690 | Dhillon | Aug 2021 | B1 |
20120215776 | Guha | Aug 2012 | A1 |
20150278341 | Shen | Oct 2015 | A1 |
20160323398 | Guo | Nov 2016 | A1 |
20170127016 | Yu | May 2017 | A1 |
20170162203 | Huang et al. | Jun 2017 | A1 |
20170323636 | Xiao | Nov 2017 | A1 |
20200356653 | Cho | Nov 2020 | A1 |
20210201351 | Nag | Jul 2021 | A1 |
Number | Date | Country |
---|---|---|
110998565 | Apr 2020 | CN |
WO-2013157603 | Oct 2013 | WO |
WO-2015039165 | Mar 2015 | WO |
WO 2019133545 | Jul 2019 | WO |
Entry |
---|
PCT International Search Report and Written Opinion dated Apr. 1, 2019, issued in corresponding International Application No. PCT/US18/67382 (9 pgs.). |
Number | Date | Country | |
---|---|---|---|
20190205750 A1 | Jul 2019 | US |