Abstract generation method and device, computer readable storage medium, and electronic device

By calculating the phrase importance score and the readability score of the candidate summary, a highly readable product summary containing important selling points is generated, which solves the problem of poor readability of the summary caused by inconsistent selling point phrases in the existing technology and improves the accuracy of the summary Spend.

CN113626581BActive Publication Date: 2024-09-20BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010377617.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-07
Publication Date
2024-09-20
Estimated Expiration
2040-05-07

AI Technical Summary

Technical Problem

In existing product summary generation methods, selling point phrases may be too uncommon or inconsistent with the context of the summary, resulting in poor readability of the generated summary, thereby reducing accuracy.

Method used

By calculating the importance score of phrases in the original description text, ranking candidate phrases, and using bidirectional recurrent neural networks and single-term recurrent neural networks to generate candidate summaries, combined with grid beam search algorithms to insert candidate phrases, and calculate the readability score of candidate summaries , and finally select the summary with the highest overall score.

Benefits of technology

It improves the readability and accuracy of generated summaries, avoids the problem of uncommon or inconsistent selling point phrases, and ensures that the summary contains both important selling points and high readability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113626581B
    Figure CN113626581B
Patent Text Reader

Abstract

The embodiment of the present invention relates to a summary generation method and device, a computer-readable storage medium, and an electronic device, and relates to natural language processing technology. The method includes: calculating the importance score of each phrase according to the height value and weight value of multiple phrases included in the original description text of the target object; sorting each phrase according to each importance score, and determining multiple candidate phrases from each phrase according to the sorting result; calculating the candidate summary of the target object according to each candidate phrase and the original description text, and calculating the readability score of each candidate summary according to the perplexity of each candidate phrase in each candidate summary; calculating the overall score of each candidate summary according to the readability score of each candidate summary and the importance score of the candidate phrase included in the candidate summary, and taking the candidate summary with the highest overall score as the target summary of the target object. The embodiment of the present invention improves the accuracy of the target summary.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Automatic product summary generation is a task that uses natural language generation technology to automatically generate short summaries based on the detailed text description of the product. The detailed text description of the product will contain many selling point phrases, which have a strong marketing effect. If these selling points appear in the generated product summary, the quality of the summary will be improved.

[0003] In the existing product summary generation scheme, restricted decoding is mainly used to force the text automatically generated by the model to contain specified phrases. With the help of restricted decoding, the specified selling points can appear in the product summary.

[0004] However, the above scheme has the following defects: for a certain product, some selling point phrases may be too obscure or inconsistent with the summary context, resulting in the inability to be naturally integrated into the generated summary, which will make the final generated summary less readable and further lead to lower accuracy of the generated summary.

[0005] Therefore, it is necessary to provide a new summary generation method and device.

[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention

[0007] The object of the present invention is to provide a summary generation method, a summary generation device, a computer-readable storage medium and an electronic device, thereby overcoming the problem of low accuracy of the generated summary caused by the limitations and defects of the related art at least to a certain extent.

[0008] According to one aspect of the present disclosure, a method for generating a summary is provided, comprising:

[0009] Calculate the importance score of each phrase according to the height values ​​and weight values ​​of multiple phrases included in the original description text of the target object;

[0010] Sorting the phrases according to the importance scores, and determining a plurality of candidate phrases from the phrases according to the sorting results;

[0011] Calculating a candidate summary of the target object according to each of the candidate phrases and the original description text, and calculating a readability score of each of the candidate summaries according to the perplexity of each of the candidate phrases in the candidate summaries;

[0012] According to the readability scores of the candidate summaries and the importance scores of the candidate phrases included in the candidate summaries, the overall scores of the candidate summaries are calculated, and the candidate summaries with the highest overall scores are used as the target summaries of the target objects.

[0013] In an exemplary embodiment of the present disclosure, the summary generation method further includes:

[0014] The height value and weight value of each of the phrases in the original description text are calculated.

[0015] In an exemplary embodiment of the present disclosure, calculating the height value and weight value of each phrase in the original description text includes:

[0016] Calculate the height value of each phrase in the original description text according to the text size of each phrase in the original description text;

[0017] The weight value of each of the phrases in the original description text is calculated according to the number of times each of the phrases appears in the original description text, the total number of the phrases, and the number of times each of the phrases appears in all the phrases.

[0018] In an exemplary embodiment of the present disclosure, calculating the candidate summary of the target object according to each of the candidate phrases and the original description text includes:

[0019] Encoding the original description text using an encoder in a summary generation model to generate a hidden layer sequence; wherein the encoder is a bidirectional recurrent neural network;

[0020] Decoding the hidden layer sequence using a decoder in the summary generation model to generate multiple word sequences; wherein the decoder is a single recurrent neural network;

[0021] Based on the grid beam search algorithm, each candidate phrase is inserted into the word sequence according to the contextual relationship between each word sequence and each candidate phrase, so as to obtain a candidate summary of the target object; wherein each candidate summary of the target object includes one candidate phrase.

[0022] In an exemplary embodiment of the present disclosure, after calculating the candidate summary of the target object according to each of the candidate phrases and the original description text, the summary generation method further includes:

[0023] The perplexity of each of the candidate phrases in each of the candidate summaries is calculated.

[0024] In an exemplary embodiment of the present disclosure, calculating the perplexity of each candidate phrase in each candidate summary includes:

[0025] Determining, according to the position of each candidate phrase in each candidate summary, a preposition and a postposition corresponding to each candidate phrase in each candidate summary;

[0026] Calculating the preposition probability of each candidate phrase appearing after each preposition appears, and the postposition probability of each postposition appearing after each candidate phrase appears;

[0027] According to the preceding probabilities and the following probabilities, the preceding perplexity and the following perplexity of each candidate phrase in each candidate summary are calculated.

[0028] In an exemplary embodiment of the present disclosure, calculating the readability score of each candidate summary according to the perplexity of each candidate phrase in each candidate summary includes:

[0029] Calculate the readability score of each candidate summary according to the pre-perplexity and post-perplexity of each candidate phrase in each candidate summary;

[0030] The readability score of each candidate summary is negatively correlated with the pre-perplexity and post-perplexity of each candidate phrase in each candidate summary.

[0031] According to one aspect of the present disclosure, there is provided a summary generating device, comprising:

[0032] A first calculation module, configured to calculate the importance score of each phrase according to the height values ​​and weight values ​​of multiple phrases included in the original description text of the target object;

[0033] A candidate phrase determination module, used to sort the phrases according to the importance scores, and determine a plurality of candidate phrases from the phrases according to the sorting results;

[0034] A second calculation module is used to calculate a candidate summary of the target object according to each candidate phrase and the original description text, and calculate a readability score of each candidate summary according to the perplexity of each candidate phrase in each candidate summary;

[0035] The third calculation module is used to calculate the overall score of each candidate summary according to the readability score of each candidate summary and the importance score of the candidate phrase included in the candidate summary, and use the candidate summary with the highest overall score as the target summary of the target object.

[0036] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for generating a summary described in any one of the above is implemented.

[0037] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0038] Processor; and

[0039] A memory, configured to store executable instructions of the processor;

[0040] The processor is configured to execute any one of the above-mentioned summary generation methods by executing the executable instructions.

[0041] An embodiment of the present invention provides a summary generation method. On the one hand, the importance score of each phrase is calculated according to the height value and weight value of each phrase in the original description text, and each phrase is sorted according to each importance score, and multiple candidate phrases are determined from each phrase according to the sorting result; then, a candidate summary of the target object is calculated according to each candidate phrase and the original description text, and the readability score of each candidate summary is calculated according to the perplexity of each candidate phrase in each candidate summary; finally, the overall score of each candidate summary is calculated according to the readability score of each candidate summary and the importance score of the candidate phrase included in the candidate summary, and the overall score is calculated. The candidate summary with the highest body score is used as the target summary of the target object, so that the target summary takes into account the readability and the importance of the candidate phrases at the same time, thereby improving the accuracy of the target summary; on the other hand, it solves the problem in the prior art that some selling point phrases may be too unfamiliar or inconsistent with the summary context, resulting in the inability to be naturally integrated into the generated summary, which will make the readability of the final generated summary poor, and then lead to low accuracy of the generated summary, thereby improving the readability of the target summary; on the other hand, since the candidate phrases are selected from the original description text, the problem of unfamiliarity or inconsistency with the summary context is avoided.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification are used to explain the principles of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0044] Figure 1 The following schematically shows a flowchart of a method for generating a summary according to an exemplary embodiment of the present invention.

[0045] Figure 2 An exemplary diagram of a decoder according to an exemplary embodiment of the present invention is schematically shown.

[0046] Figure 3 An exemplary diagram of an encoder according to an exemplary embodiment of the present invention is schematically shown.

[0047] Figure 4 A flowchart of a method for calculating a candidate summary of the target object according to the candidate phrases and the original description text according to an exemplary embodiment of the present invention is schematically shown.

[0048] Figure 5 A flowchart of a method for calculating the perplexity of each candidate phrase in each candidate summary according to an exemplary embodiment of the present invention is schematically shown.

[0049] Figure 6 The flowchart schematically shows another summary generation method according to an exemplary embodiment of the present invention.

[0050] Figure 7 A block diagram of a summary generating device according to an exemplary embodiment of the present invention is schematically shown.

[0051] Figure 8 An electronic device for implementing the above summary generation method according to an exemplary embodiment of the present invention is schematically shown. DETAILED DESCRIPTION

[0052] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present invention will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solutions of the present invention may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present invention.

[0053] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0054] Automatic product summary generation is a task that uses natural language generation technology to automatically generate short summaries based on the detailed text description of the product. The detailed text description of the product will contain many selling point phrases (one word or multiple words), which have a strong marketing effect. If these selling points appear in the generated product summary, it will improve the quality of the summary.

[0055] Constrained Decoding can force the model to automatically generate text containing specified phrases, and with the help of constrained decoding, the specified selling point can appear in the product summary. Constrained decoding technology is based on the Grid Beam Search algorithm.

[0056] Specifically, the automatic product summary generation model includes an encoder and a decoder. A detailed description of a product is input, and the encoder encodes it to generate a hidden sequence; the decoder uses the hidden sequence to generate the target summary word by word. During decoding, for each position in the decoding process, the grid beam search algorithm will force the insertion of the specified phrase and continue to generate the remaining words on this basis until a complete summary containing the specified phrase is generated. Finally, among all the candidate sentences containing the specified phrase, the sentence with the smallest perplexity is selected as the final result.

[0057] For example, the original output sentence is (a1, a2, a3, a4), where a is a word, and the specified phrase is (b1, b2), where b is a word. After restricted decoding, the output candidates are {(b1, b2, a1, a2, a3, a4), (a1, b1, b2, a2, a3, a4), (a1, a2, b1, b2, a3, a4), (a1, a2, a3, b1, b2, a4), (a1, a2, a3, a4, b1, b2)}. Among these candidates, the sentence with the smallest perplexity is selected as the final output summary.

[0058] However, the summary generation model based on traditional restricted decoding has the problem of poor readability. For a certain product, some selling point phrases may be too obscure or inconsistent with the summary context, resulting in the inability to be naturally integrated into the generated summary. If such selling point phrases are specified for restricted decoding, the readability of the generated summary will be very poor, which will reduce the marketing effect.

[0059] Based on this, the exemplary implementation of the present invention first provides a summary generation method, which can be run on a server, a server cluster or a cloud server, etc. Of course, those skilled in the art can also run the method of the present invention on other platforms as required, and this exemplary embodiment does not specifically limit this. Figure 1 As shown, the summary generation method may include the following steps:

[0060] Step S110: Calculate the importance score of each phrase according to the height values ​​and weight values ​​of multiple phrases included in the original description text of the target object.

[0061] Step S120: Sort the phrases according to the importance scores, and determine a plurality of candidate phrases from the phrases according to the sorting results.

[0062] Step S130: Calculate a candidate summary of the target object according to each of the candidate phrases and the original description text, and calculate a readability score of each of the candidate summaries according to the perplexity of each of the candidate phrases in the candidate summaries.

[0063] Step S140: Calculate the overall score of each candidate summary according to the readability score of each candidate summary and the importance score of the candidate phrase included in the candidate summary, and use the candidate summary with the highest overall score as the target summary of the target object.

[0064] In the above summary generation method, on the one hand, the importance score of each phrase is calculated according to the height value and weight value of each phrase in the original description text, and each phrase is sorted according to each importance score, and multiple candidate phrases are determined from each phrase according to the sorting result; then the candidate summary of the target object is calculated according to each candidate phrase and the original description text, and the readability score of each candidate summary is calculated according to the perplexity of each candidate phrase in each candidate summary; finally, the overall score of each candidate summary is calculated according to the readability score of each candidate summary and the importance score of the candidate phrase included in the candidate summary, and the candidate summary with the highest overall score is used as the target summary of the target object, so that the target summary takes into account both the readability and the importance of the candidate phrases, thereby improving the accuracy of the target summary; on the other hand, it solves the problem in the prior art that some selling point phrases may be too obscure or inconsistent with the context of the summary, resulting in the inability to be naturally integrated into the generated summary, which will make the readability of the final generated summary poor, thereby resulting in low accuracy of the generated summary, thereby improving the readability of the target summary; on the other hand, since the candidate phrases are selected from the original description text, the problem of obscurity or inconsistency with the context of the summary is avoided.

[0065] Hereinafter, each step included in the method for generating a summary according to an exemplary embodiment of the present invention will be explained and illustrated in detail with reference to the accompanying drawings.

[0066] First, the purpose of the invention of the exemplary embodiment of the present invention is explained and illustrated. The exemplary embodiment of the present invention proposes a method for automatically generating a product summary based on dynamic restricted decoding. The importance scores of the phrases in the detailed text description of the product are calculated based on the text height and TF-IDF, and the top five phrases in importance scores are selected as candidate selling points. The readability score of the candidate summary is calculated using the confusion before and after the candidate selling point in the generated summary. The final decoded selling point and product summary are dynamically selected based on the comprehensive importance score and readability score, so that the generated summary can contain important selling points and ensure high readability.

[0067] Next, the terms involved in the exemplary embodiments of the present invention are explained and illustrated.

[0068] TF-IDF: A commonly used weighting technique for information retrieval and data mining. TF means term frequency, and IDF means inverse document frequency. TF-IDF is obtained by multiplying TF and IDF. Specifically:

[0069]

[0070] One-way recurrent neural network: The so-called one-way recurrent neural network is actually a common recurrent neural network. The input at each time t is x t , the output is o t , the hidden state is s t .like Figure 2 As shown in the figure, the hidden layer state at time t is affected by the hidden layer state at time t-1, and the hidden layer state at time t will in turn affect the hidden layer state at time t+1, and so on. U, V, and W are the shared weights of each layer.

[0071] Bidirectional recurrent neural network: The structure of the bidirectional recurrent neural network at each moment can be as follows Figure 3 As shown, we can see that the forward and backward layers are connected to the output layer together, which contains 6 shared weights, namely the weights from the input to the forward layer and the backward layer, the weights from the hidden layer to the hidden layer of the forward layer and the backward layer, and the weights from the hidden layer to the output layer of the forward layer and the backward layer.

[0072] Specifically,

[0073] Among them, h t is the hidden vector of the forward layer, h' t is the hidden vector of the backward layer, o t is the output layer, w 1 、w 2 、w 3 、w4 、w 5 and w 6 where f(·) and g(·) are the shared weights of each layer respectively, and are specific neural networks, which may be bidirectional length-short memory networks.

[0074] Beam Search Algorithm is a heuristic graph search algorithm, usually used in the case of a large graph solution space. In order to reduce the space and time occupied by the search, some nodes with poor quality are cut off at each step of depth expansion, and some nodes with higher quality are retained. This reduces space consumption and improves time efficiency.

[0075] The search tree is built using a breadth-first strategy. At each level of the tree, the nodes are sorted according to the heuristic cost, and then only a predetermined number (Beam Width) of nodes are retained. Only these nodes continue to expand at the next level, and other nodes are pruned.

[0076] Hereinafter, step S110 to step S140 will be explained and illustrated.

[0077] In step S110 , the importance score of each phrase is calculated according to the height values ​​and weight values ​​of multiple phrases included in the original description text of the target object.

[0078] First, in this example embodiment, the original description text of the target object can be, for example, a detailed description of the product; for example, for a refrigerator of brand XX, its detailed description can include: brand name, main body, function, specification, characteristics, parameters and other attributes, and the attribute value included in each attribute can be used as the above-mentioned phrases. For example, the phrases can include: silver, double doors, LED display, air cooling, compressor refrigeration, intelligent defrosting, frequency conversion, dual circulation, large capacity, odor-free and fresh-keeping, fine storage, computer temperature control, etc.

[0079] Secondly, in this example embodiment, in order to calculate the importance score of each phrase, it is also necessary to calculate the height value and weight value of each phrase. Specifically, it may include: calculating the height value and weight value of each phrase in the original description text. Among them, calculating the height value and weight value of each phrase in the original description text includes: first, calculating the height value of each phrase in the original description text according to the text size of each phrase in the original description text; secondly, calculating the weight value of each phrase in the original description text according to the number of times each phrase appears in the original description text, the total number of phrases and the number of times each phrase appears in all phrases.

[0080] For example, for the phrase xi For example, the corresponding height value h can be obtained according to the text size in the original description text. i ; It should be noted here that, since each phrase in the original description text exists in the form of a picture, the corresponding height value can be directly obtained according to the size of the text of the picture; of course, in order to highlight the selling points of each target object, the selling point phrases that need to be emphasized are displayed in bold and / or larger fonts, which also makes the height value of the phrase larger, which is consistent with the idea of ​​the exemplary embodiment of the present invention.

[0081] Furthermore, for phrase x i For example, the corresponding weight value d can be calculated as follows i :

[0082]

[0083] Among them, the phrase x i The number of documents is the number of times each phrase appears in all phrases.

[0084] Furthermore, after obtaining the above height values ​​and weight values, we can calculate the phrase x i The importance score of phrase x i Importance score i The calculation method can be as follows:

[0085] s i =h i *d i .

[0086] In step S120, the phrases are sorted according to the importance scores, and a plurality of candidate phrases are determined from the phrases according to the sorting results.

[0087] In this exemplary embodiment, when each phrase x is obtained i Importance score i Later, the phrases can be sorted according to the importance score, and then the phrases with the highest scores can be used as candidate phrases, that is, candidate selling points. In the present invention, in order to take into account both the amount of calculation and the accuracy of the calculation results, the top five phrases with the highest scores are selected as candidate phrases. For example, they are (b1, b2), (b3, b4), (b5, b6, b7), (b8, b9), (b10, b11, b12); wherein each b is a word. For example, b1 is air-cooled and b2 is frost-free, then (b1, b2) can be air-cooled and frost-free. Through this method, the candidate selling points corresponding to the target objects (commodities) can be calculated based on their differences, thereby improving the accuracy of the candidate selling points.

[0088] In step S130, a candidate summary of the target object is calculated according to each of the candidate phrases and the original description text, and a readability score of each of the candidate summaries is calculated according to the perplexity of each of the candidate phrases in the candidate summaries.

[0089] In this exemplary embodiment, first, a candidate summary of the target object is calculated based on each of the candidate phrases and the original description text. Figure 4 As shown, calculating the candidate summary of the target object according to each of the candidate phrases and the original description text may include steps S410 to S430. Among them:

[0090] In step S410, the original description text is encoded using an encoder in the summary generation model to generate a hidden layer sequence; wherein the encoder is a bidirectional recurrent neural network.

[0091] In step S420, the hidden layer sequence is decoded by using a decoder in the summary generation model to generate multiple word sequences; wherein the decoder is a single recurrent neural network;

[0092] In step S430, based on a grid beam search algorithm, each candidate phrase is inserted into the word sequence according to the contextual relationship between each word sequence and each candidate phrase, so as to obtain a candidate summary of the target object; wherein each candidate summary of the target object includes one candidate phrase.

[0093] Below, step S410-step S430 will be explained and illustrated. First, the encoder can be a bidirectional recurrent neural network, and the decoder can be a unidirectional recurrent neural network, which can be, for example, a long short-term memory network. Furthermore, after inputting a detailed description of the original description text of a product, the encoder can encode it to generate a hidden layer sequence; the decoder can use the hidden layer sequence to generate the target summary word by word. During decoding, for each position of the decoding process (each position outputs a word sequence), the grid beam search algorithm will force the insertion of candidate phrases and continue to generate the remaining word sequences on this basis until a complete summary containing the candidate phrases is generated. Specifically, each candidate abstract can be, for example: {(a1, b1, b2, a2, a3, a4), (a1, a2, a3, b3, b4, a4), (a1, a2, a3, a4, b5, b6, b7), (b8, b9, a1, a2, a3, a4), (a1, b10, b11, b12, a2, a3, a4)}, where each a is a word in the original abstract.

[0094] It should be further explained here that the encoder adopts a bidirectional recurrent neural network, which can improve the accuracy of the hidden layer sequence; the decoder adopts a unidirectional recurrent neural network, which facilitates the insertion of each candidate phrase, thereby improving the efficiency of candidate summary generation.

[0095] Furthermore, after obtaining the candidate summaries, in order to obtain the readability score of each candidate summaries, it is also necessary to calculate the perplexity of each candidate phrase. Specifically, the perplexity of each candidate phrase in each candidate summaries is calculated. Figure 5 As shown, calculating the perplexity of each candidate phrase in each candidate summary may include steps S510 to S530. Among them:

[0096] In step S510, the prepositions and postpositions corresponding to the candidate phrases in the candidate abstracts are determined according to the positions of the candidate phrases in the candidate abstracts.

[0097] In step S520, the preposition probability of each candidate phrase appearing after each preposition appears is calculated, and the postposition probability of each postposition appearing after each candidate phrase appears is calculated.

[0098] In step S530, the pre-position perplexity and post-position perplexity of each candidate phrase in each candidate summary are calculated according to each pre-position probability and post-position probability.

[0099] Below, step S510-step S530 will be explained and illustrated. First, according to the position of each candidate phrase in each candidate summary, its corresponding preposition and postposition are determined. For example, if "air-cooled and frost-free" is used as the selling point, its preposition can be "this model" and its postposition can be "refrigerator". Then, the pre-probability of air-cooled after this model appears, and the post-probability of refrigerator after this air-cooled and frost-free appears are calculated; specifically, the probability can be calculated and output by the encoder. Furthermore, after obtaining the pre-probability and post-probability, the calculation method of the pre-probability and post-probability can be as follows:

[0100] Pre-confusion: 2 -logP(风冷 / 这款) ;

[0101] Post-confusion: 2 -logP(冰箱 / 这款风冷无霜) .

[0102] Furthermore, after obtaining the pre-confusion and post-confusion, the readability score of each candidate summary can be calculated according to the confusion of each candidate phrase in each candidate summary. Specifically, it can include: calculating the readability score of each candidate summary according to the pre-confusion and post-confusion of each candidate phrase in each candidate summary; wherein the readability score of each candidate summary is negatively correlated with the pre-confusion and post-confusion of each candidate phrase in each candidate summary. wherein the readability score r i The specific calculation method can be shown as follows:

[0103] r i =2 -logP(风冷 / 这款) *2 -logP(冰箱 / 这款风冷无霜) .

[0104] In step S140, the overall score of each candidate abstract is calculated according to the readability score of each candidate abstract and the importance score of the candidate phrase included in the candidate abstract, and the candidate abstract with the highest overall score is used as the target abstract of the target object.

[0105] In this example embodiment, the overall score may be calculated as follows:

[0106] t i =s i *r i Among them, t i is the overall score of each candidate summary.

[0107] After obtaining the total score of each candidate summary, the summary with the highest overall score can be used as the target summary, for example, (a1, a2, a3, a4, b5, b6, b7); thus, it can also be determined that the selling point of the product can be (b5, b6, b7). This method can avoid the problem of excessive calculation caused by too many candidate selling points, which in turn leads to low summary generation efficiency.

[0108] The following will be combined Figure 6 The method for generating a summary according to an exemplary embodiment of the present invention is further explained and described. Figure 6 As shown, the summary generation method may include the following steps:

[0109] Step S610, detecting the height of each phrase in the product introduction, and calculating the TF-IDF of each phrase in the product introduction;

[0110] Step S620, calculating the importance score of each phrase in the product introduction according to the height of the phrase and TF-IDF;

[0111] Step S630, obtaining the top five phrases as candidate selling points, and generating a candidate product summary for each candidate selling point through restricted decoding;

[0112] Step S640 , calculating the readability score of each candidate product summary, and selecting a final product summary according to the importance score of the candidate selling point and the readability score of the candidate product summary.

[0113] The summary generation method provided by the exemplary embodiment of the present invention solves the problem in the prior art that the selling point phrase with the highest importance score is only the most brilliant description and is not necessarily the most suitable selling point to appear in the summary. Since the most suitable selling point must also be consistent with the current summary context, when it is added to the summary through restricted decoding, the summary has a higher readability. Therefore, firstly, a single fixed selling point is expanded into a selectable dynamic selling point list, and then for each selling point, a product summary containing the corresponding selling point is generated using restricted decoding, and then the decoded selling point and the corresponding product summary are finally determined by comprehensively considering the importance and readability.

[0114] The exemplary embodiment of the present invention also provides a summary generation device. Figure 7 As shown, the summary generation device may include a first calculation module 710, a candidate phrase determination module 720, a second calculation module 730, and a third calculation module 740. Among them:

[0115] The first calculation module 710 may be configured to calculate the importance score of each phrase according to the height values ​​and weight values ​​of multiple phrases included in the original description text of the target object.

[0116] The candidate phrase determination module 720 may be configured to sort the phrases according to the importance scores, and determine a plurality of candidate phrases from the phrases according to the sorting results.

[0117] The second calculation module 730 may be configured to calculate a candidate summary of the target object according to each of the candidate phrases and the original description text, and calculate a readability score of each of the candidate summaries according to the perplexity of each of the candidate phrases in the candidate summaries.

[0118] The third calculation module 740 may be configured to calculate an overall score of each candidate summary according to the readability score of each candidate summary and the importance score of the candidate phrase included in the candidate summary, and use the candidate summary with the highest overall score as the target summary of the target object.

[0119] In an exemplary embodiment of the present disclosure, the summary generating device further includes:

[0120] The fourth calculation module can be used to calculate the height value and weight value of each phrase in the original description text.

[0121] In an exemplary embodiment of the present disclosure, calculating the height value and weight value of each phrase in the original description text includes:

[0122] Calculate the height value of each phrase in the original description text according to the text size of each phrase in the original description text;

[0123] The weight value of each of the phrases in the original description text is calculated according to the number of times each of the phrases appears in the original description text, the total number of the phrases, and the number of times each of the phrases appears in all the phrases.

[0124] In an exemplary embodiment of the present disclosure, calculating the candidate summary of the target object according to each of the candidate phrases and the original description text includes:

[0125] Encoding the original description text using an encoder in a summary generation model to generate a hidden layer sequence; wherein the encoder is a bidirectional recurrent neural network;

[0126] Decoding the hidden layer sequence using a decoder in the summary generation model to generate multiple word sequences; wherein the decoder is a single recurrent neural network;

[0127] Based on the grid beam search algorithm, each candidate phrase is inserted into the word sequence according to the contextual relationship between each word sequence and each candidate phrase, so as to obtain a candidate summary of the target object; wherein each candidate summary of the target object includes one candidate phrase.

[0128] In an exemplary embodiment of the present disclosure, the summary generating device further includes:

[0129] The perplexity calculation module can be used to calculate the perplexity of each candidate phrase in each candidate summary.

[0130] In an exemplary embodiment of the present disclosure, calculating the perplexity of each candidate phrase in each candidate summary includes:

[0131] Determining, according to the position of each candidate phrase in each candidate summary, a preposition and a postposition corresponding to each candidate phrase in each candidate summary;

[0132] Calculating the preposition probability of each candidate phrase appearing after each preposition appears, and the postposition probability of each postposition appearing after each candidate phrase appears;

[0133] According to the preceding probabilities and the following probabilities, the preceding perplexity and the following perplexity of each candidate phrase in each candidate summary are calculated.

[0134] In an exemplary embodiment of the present disclosure, calculating the readability score of each candidate summary according to the perplexity of each candidate phrase in each candidate summary includes:

[0135] Calculate the readability score of each candidate summary according to the pre-perplexity and post-perplexity of each candidate phrase in each candidate summary;

[0136] The readability score of each candidate summary is negatively correlated with the pre-perplexity and post-perplexity of each candidate phrase in each candidate summary.

[0137] The specific details of each module in the above summary generation device have been described in detail in the corresponding summary generation method, so they will not be repeated here.

[0138] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0139] In addition, although the steps of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0140] In an exemplary embodiment of the present invention, an electronic device capable of implementing the above method is also provided.

[0141] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0142] Refer to the following Figure 8 An electronic device 800 according to this embodiment of the present invention will be described. Figure 8The electronic device 800 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0143] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.

[0144] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 810 can perform the following steps: Figure 1 Step S110 shown in: Calculate the importance score of each phrase according to the height value and weight value of multiple phrases included in the original description text of the target object; Step S120: Sort each phrase according to the importance score, and determine multiple candidate phrases from each phrase according to the sorting result; Step S130: Calculate the candidate summary of the target object according to each candidate phrase and the original description text, and calculate the readability score of each candidate summary according to the perplexity of each candidate phrase in each candidate summary; Step S140: Calculate the overall score of each candidate summary according to the readability score of each candidate summary and the importance score of the candidate phrase included in the candidate summary, and use the candidate summary with the highest overall score as the target summary of the target object. .

[0145] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .

[0146] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0147] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0148] The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0149] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present invention.

[0150] In an exemplary embodiment of the present invention, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of this specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification.

[0151] The program product for implementing the above method according to an embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0152] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0153] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0154] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0155] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0156] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0157] Other embodiments of the invention will readily occur to those skilled in the art after considering the specification and practicing the invention invented herein. This application is intended to cover any variations, uses or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art that are not invented by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.

Claims

1. A method for generating a summary, characterized in that: include: Calculating the importance score of each phrase according to the height values ​​and weight values ​​of multiple phrases included in the original description text of the target object; wherein the height value is calculated according to the text size of the phrase in the original description text, and the weight value is calculated according to the number of times the phrase appears in the original description text, the total number of phrases, and the number of times the phrase appears in all phrases; Sorting the phrases according to the importance scores, and determining a plurality of candidate phrases from the phrases according to the sorting results; Calculating a candidate summary of the target object according to each of the candidate phrases and the original description text, and calculating a readability score of each of the candidate summaries according to the perplexity of each of the candidate phrases in each of the candidate summaries; wherein the perplexity is calculated based on the preposition probability of the preposition corresponding to the candidate phrase and the postposition probability of the postposition; According to the readability scores of the candidate summaries and the importance scores of the candidate phrases included in the candidate summaries, the overall scores of the candidate summaries are calculated, and the candidate summaries with the highest overall scores are used as the target summaries of the target objects.

2. The method for generating a summary according to claim 1, characterized in that: The summary generation method further includes: The height value and weight value of each of the phrases in the original description text are calculated.

3. The method for generating a summary according to claim 2, characterized in that: Calculating the height value and weight value of each phrase in the original description text includes: Calculate the height value of each phrase in the original description text according to the text size of each phrase in the original description text; The weight value of each of the phrases in the original description text is calculated according to the number of times each of the phrases appears in the original description text, the total number of the phrases, and the number of times each of the phrases appears in all the phrases.

4. The method for generating a summary according to claim 1, characterized in that: Calculating the candidate summary of the target object according to each of the candidate phrases and the original description text includes: Encoding the original description text using an encoder in a summary generation model to generate a hidden layer sequence; wherein the encoder is a bidirectional recurrent neural network; Decoding the hidden layer sequence using a decoder in the summary generation model to generate multiple word sequences; wherein the decoder is a single recurrent neural network; Based on the grid beam search algorithm, each candidate phrase is inserted into the word sequence according to the contextual relationship between each word sequence and each candidate phrase, so as to obtain a candidate summary of the target object; wherein each candidate summary of the target object includes one candidate phrase.

5. The method for generating a summary according to claim 4, characterized in that: After calculating the candidate summary of the target object according to each of the candidate phrases and the original description text, the summary generation method further includes: The perplexity of each of the candidate phrases in each of the candidate summaries is calculated.

6. The method for generating a summary according to claim 5, characterized in that: Calculating the perplexity of each candidate phrase in each candidate summary includes: Determining, according to the position of each candidate phrase in each candidate summary, a preposition and a postposition corresponding to each candidate phrase in each candidate summary; Calculating the preposition probability of each candidate phrase appearing after each preposition appears, and the postposition probability of each postposition appearing after each candidate phrase appears; According to the preceding probabilities and the following probabilities, the preceding perplexity and the following perplexity of each candidate phrase in each candidate summary are calculated.

7. The method for generating a summary according to claim 6, characterized in that: Calculating the readability score of each candidate summary according to the perplexity of each candidate phrase in each candidate summary includes: Calculate the readability score of each candidate summary according to the pre-perplexity and post-perplexity of each candidate phrase in each candidate summary; The readability score of each candidate summary is negatively correlated with the pre-perplexity and post-perplexity of each candidate phrase in each candidate summary.

8. A summary generation device, characterized in that: include: A first calculation module is used to calculate the importance score of each phrase according to the height value and weight value of multiple phrases included in the original description text of the target object; wherein the height value is calculated according to the text size of the phrase in the original description text, and the weight value is calculated according to the number of times the phrase appears in the original description text, the total number of phrases, and the number of times the phrase appears in all phrases; A candidate phrase determination module, used to sort the phrases according to the importance scores, and determine a plurality of candidate phrases from the phrases according to the sorting results; A second calculation module is used to calculate a candidate summary of the target object according to each of the candidate phrases and the original description text, and calculate a readability score of each of the candidate summaries according to the perplexity of each of the candidate phrases in each of the candidate summaries; wherein the perplexity is calculated based on the preposition probability of the preposition corresponding to the candidate phrase and the postposition probability of the postposition; The third calculation module is used to calculate the overall score of each candidate summary according to the readability score of each candidate summary and the importance score of the candidate phrase included in the candidate summary, and use the candidate summary with the highest overall score as the target summary of the target object.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the abstract generation method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the abstract generation method according to any one of claims 1 to 7 by executing the executable instructions.

Citation Information

Patent Citations

  • Automatic key phrase extracting method and system for English literatures

    CN106066866A

  • Abstract generation method and apparatus, and computer device

    CN108280112A

  • Extraction-type text summarization method with comprehensive advantages based on integer linear programming

    CN108664598A

  • Document abstract generation method, device and equipment, and computer readable storage medium

    CN110134780A

  • Generation method of document summary, apparatus, electronic apparatus and computer readable storage medium

    JP2019139772A