A method, device and equipment for generating document summary

By encoding user intentions and target documents, determining the importance of words and adjusting the generation of document summary, the problem that document summary in the prior art cannot meet users' personalized needs is solved, and the generation of personalized abstracts is realized, which improves user experience and Accuracy of the abstract.

CN112395411BActive Publication Date: 2025-02-14ALIBABA GROUP HOLDING LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910753768.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-15
Publication Date
2025-02-14
Estimated Expiration
2039-08-15

AI Technical Summary

Technical Problem

The document summary generated under the prior art cannot meet the user's personalized needs, resulting in a decrease in user experience.

Method used

By encoding user intention information and target documents, determine the importance of words in the target document, and adjust the generation of document summary according to the importance to generate a personalized document summary.

Benefits of technology

It realizes the generation of personalized document summary according to user intentions, improves the user experience and improves the accuracy of document summary.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395411B_ABST
    Figure CN112395411B_ABST
Patent Text Reader

Abstract

The present application discloses a method for generating a document summary, including: encoding user intent information to obtain encoding information of the user intent information; encoding a target document to obtain encoding information of the target document; determining the importance of words contained in the target document corresponding to the target document and the user intent information according to the encoding information of the target document and the encoding information of the user intent information; adjusting the encoding information of the target document according to the importance; generating a document summary of the target document according to the adjusted encoding information. The above method is used to solve the problem that the document summary generated under the prior art cannot meet the personalized needs of users and reduces the user's product experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method for generating a document summary. The present application also relates to a device for generating a document summary, an electronic device, and a storage device. Background Art

[0002] With the continuous development of Internet technology, more and more users are shopping through e-commerce websites.

[0003] Currently, in order to facilitate users to browse products, e-commerce websites have used document summarization technology to generate product titles or descriptions. Currently, every user in the application sees the same product description.

[0004] The document summaries generated by the existing technology have some defects: the document summaries seen by each user are the same. However, different users want to know different aspects of the product. For example, some users want to know the price, while others want to know the performance. Therefore, the document summaries generated by the existing technology cannot meet the personalized needs of users, which reduces the user's product experience. Summary of the invention

[0005] The present application provides a method, device, electronic device and storage device for generating a document summary to solve the problem that the document summary generated under the prior art cannot meet the personalized needs of users and reduces the user's product experience.

[0006] The present application provides a method for generating a document summary, comprising:

[0007] Encoding the user intention information to obtain encoded information of the user intention information;

[0008] Encoding the target document to obtain encoding information of the target document;

[0009] Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0010] Adjusting the encoding information of the target document according to the importance;

[0011] Generate a document summary of the target document based on the adjusted encoding information.

[0012] Optionally, determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information includes:

[0013] Calculating a first relevance of the words contained in the target document to the target document according to the encoding information of the target document, and calculating a second relevance of the words contained in the target document to the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0014] The importance of the words included in the target document corresponding to the target document and the user intention information is determined according to the first relevance and the second relevance.

[0015] Optionally, encoding the user intention information to obtain the encoded information of the user intention information includes:

[0016] The user intention information is encoded to obtain hidden state information of the words included in the user intention information.

[0017] Optionally, encoding the target document to obtain encoding information of the target document includes:

[0018] The target document is encoded to obtain hidden state information of the words contained in the target document.

[0019] Optionally, calculating the first relevance of the words contained in the target document to the target document according to the encoding information of the target document includes:

[0020] Calculating, according to the hidden state information of the word contained in the target document, a third relevance of the word contained in the target document to other words in the target document;

[0021] According to the third relevance of the words included in the target document to other words in the target document, the first relevance of the words included in the target document to the target document is obtained.

[0022] Optionally, obtaining the first relevance of the word contained in the target document to the target document according to the third relevance of the word contained in the target document to other words in the target document includes:

[0023] Obtaining a sum of all third relevances according to the third relevances of the words included in the target document to other words in the target document;

[0024] The sum of the third relevances is normalized to obtain a first relevance of the words contained in the target document to the target document.

[0025] Optionally, the calculating, according to the encoding information of the target document and the encoding information of the user intention information, a second relevance of the words contained in the target document to the user intention information includes:

[0026] Calculating, based on the hidden state information of the words included in the target document and the hidden state information of the words included in the user intention information, a fourth relevance of the words included in the target document to the words included in the user intention information;

[0027] According to the fourth relevance of the words included in the target document to the words included in the user intention information, a second relevance of the words included in the target document to the user intention information is obtained.

[0028] Optionally, obtaining a second relevance of the words included in the target document to the user intention information according to a fourth relevance of the words included in the target document to the words included in the user intention information includes:

[0029] Obtaining a sum of all fourth relevances according to the fourth relevance of the words contained in the target document to each word contained in the user intention information;

[0030] The sum of the fourth relevance is normalized to obtain a second relevance of the words included in the target document to the user intention information.

[0031] Optionally, adjusting the encoding information of the target document according to the importance includes:

[0032] The hidden state information of the words included in the target document is adjusted according to the importance.

[0033] Optionally, determining the importance of the word contained in the target document corresponding to the target document and the user intention information according to the first relevance and the second relevance includes:

[0034] Calculating an average value of the first correlation and the second correlation;

[0035] The average value is used as the importance of the words included in the target document corresponding to the target document and the user intention information.

[0036] Optionally, determining the importance of the word contained in the target document corresponding to the target document and the user intention information according to the first relevance and the second relevance includes:

[0037] Calculating a weighted average of the first correlation and the second correlation;

[0038] The weighted average value is used as the importance of the words contained in the target document corresponding to the target document and the user intention information.

[0039] Optionally, encoding the user intent information to obtain encoded information including the user intent information includes:

[0040] Encoding the user intention information using a bidirectional LSTM network or a GRU network to obtain encoded information including the user intention information;

[0041] The step of encoding the target document to obtain encoding information of the target document includes:

[0042] A bidirectional LSTM network or a GRU network is used to encode the target document to obtain encoding information of the target document.

[0043] Optionally, also include:

[0044] Get user intent information.

[0045] Optionally, the user intention information includes at least one of the following:

[0046] User search query information;

[0047] User purchase history information;

[0048] User review record information.

[0049] The present application also provides a device for generating a document summary, comprising:

[0050] A user intention coding information obtaining unit, used to encode the user intention information to obtain coding information of the user intention information;

[0051] A target document coding information obtaining unit, used to encode the target document to obtain the coding information of the target document;

[0052] An importance generating unit, configured to determine the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0053] A coding information adjustment unit, configured to adjust the coding information of the target document according to the importance;

[0054] The document summary generating unit is used to generate a document summary of the target document according to the adjusted encoding information.

[0055] The present application also provides an electronic device, comprising:

[0056] Processor; and

[0057] The memory is used to store a program of a method for generating a document summary. After the device is powered on and the program of the method for generating a document summary is run by the processor, the following steps are performed:

[0058] Encoding the user intention information to obtain encoded information of the user intention information;

[0059] Encoding the target document to obtain encoding information of the target document;

[0060] Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0061] Adjusting the encoding information of the target document according to the importance;

[0062] Generate a document summary of the target document based on the adjusted encoding information.

[0063] The present application also provides a storage device storing a program of a method for generating a document summary, wherein the program is executed by a processor to perform the following steps:

[0064] Encoding the user intention information to obtain encoded information of the user intention information;

[0065] Encoding the target document to obtain encoding information of the target document;

[0066] Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0067] Adjusting the encoding information of the target document according to the importance;

[0068] Generate a document summary of the target document based on the adjusted encoding information.

[0069] Compared with the prior art, this application has the following advantages:

[0070] The present application provides a method for generating a document summary. In the process of generating a document summary, the user's intention is combined to generate personalized summaries for different users, thereby improving the user experience. At the same time, in the encoding (encoder) stage, the encoding information of the target document is adjusted according to the importance of the words contained in the target document relative to the user's intention of the target document, thereby improving the accuracy of the document summary. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1A It is a schematic diagram of an application scenario embodiment provided by the present application.

[0072] Figure 1 This is a flowchart of a method for generating a document summary provided in the first embodiment of the present application.

[0073] Figure 2 It is a flowchart provided by the first embodiment of the present application for determining the importance of words contained in a target document with respect to the target document and the user intention information based on the encoding information of the target document and the encoding information of the user intention information.

[0074] Figure 3 It is a schematic diagram of a first relevance of words contained in a target document relative to the target document itself provided by the first embodiment of the present application.

[0075] Figure 4 It is a schematic diagram of the second relevance of words contained in a target document to user intention information provided by the first embodiment of the present application.

[0076] Figure 5 It is a schematic diagram of a document summary generation device provided in the second embodiment of the present application.

[0077] Figure 6 It is a schematic diagram of an electronic device provided in the third embodiment of the present application. DETAILED DESCRIPTION

[0078] Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited to the specific implementation disclosed below.

[0079] In order to more clearly demonstrate the present application, the application scenario of the method for generating a document summary provided in an embodiment of the present application is first introduced.

[0080] Some embodiments provided in this application can be applied to scenarios where a client interacts with a server, such as Figure 1A As shown, it is a schematic diagram of an application scenario embodiment provided by the present application. The client first establishes a connection with the server. After the connection, the client sends the user intention and the target document to the server. After receiving the user intention and the target document, the server encodes the user intention and the target document to obtain the document summary result of the target document, and sends the document summary result of the target document to the client. The client receives the document summary result of the target document. It should be noted that the above application scenario is only an embodiment of the application scenario. The purpose of providing this application scenario embodiment is to facilitate the understanding of the method for generating the target summary of the present application, and is not used to limit the method for generating the target summary of the present application.

[0081] The first embodiment of the present application provides a method for generating a target summary. Figure 1 , Figure 2 Figure 3 Figure 4 Provide explanation.

[0082] like Figure 1 As shown, in step S101, the user intention information is encoded to obtain the encoded information of the user intention information.

[0083] The user intent information may refer to user behavior data, including user search query information, user purchase record information, user review record information, and other information.

[0084] The encoding of the user intention information to obtain the encoded information of the user intention information includes:

[0085] The user intention information is encoded to obtain hidden state information of the words included in the user intention information.

[0086] Specifically, a bidirectional LSTM (Long Short-Term Memory, a special RNN neural network) network can be used to encode user intent. The input is the representation q of the user intent, and the output is the hidden state ui of each word in the user intent:

[0087]

[0088]

[0089] In the first embodiment of the present application, before the step of encoding the user intention information to obtain the encoded information of the user intention information, the following step may also be included: obtaining the user intention information.

[0090] like Figure 1 As shown, in step S102, the target document is encoded to obtain encoding information of the target document.

[0091] The target document refers to the document from which the document summary needs to be extracted. The target document generally includes a long product description. In order to facilitate user browsing, a shorter document summary can be generated based on the target document.

[0092] The step of encoding the target document to obtain encoding information of the target document includes:

[0093] The target document is encoded to obtain hidden state information of the words contained in the target document.

[0094] Specifically, a bidirectional LSTM network can be used to encode the target document. The input is the representation d of the target document, and the output is the hidden state information ui of each word in the target document:

[0095] (h i ,h i )=BiLSTM(d)

[0096]

[0097] It should be noted that the LSTM network is used to encode the target document and user intent above, and a GRU (Gated Recurrent Unit, a variant of LSTM) network may also be used in the specific implementation.

[0098] like Figure 1 As shown, in step S103, the importance of the words contained in the target document corresponding to the target document and the user intention information is determined according to the encoding information of the target document and the encoding information of the user intention information.

[0099] The determining, based on the encoding information of the target document and the encoding information of the user intention information, the importance of the words contained in the target document corresponding to the target document and the user intention information comprises:

[0100] Calculating a first relevance of the words contained in the target document to the target document according to the encoding information of the target document, and calculating a second relevance of the words contained in the target document to the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0101] The importance of the words included in the target document corresponding to the target document and the user intention information is determined according to the first relevance and the second relevance.

[0102] Combine the following Figure 2 The process of determining the importance of words contained in the target document with respect to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information is introduced, including steps S103 - 1 to S103 - 3 .

[0103] like Figure 2 As shown, in step S103-1, a first relevance of the words contained in the target document to the target document is calculated according to the encoding information of the target document.

[0104] The first relevance refers to the importance of the words contained in the document to the target document.

[0105] The step of calculating a first relevance of a word contained in the target document to the target document according to the encoding information of the target document comprises:

[0106] Calculating, according to the hidden state information of the word contained in the target document, a third relevance of the word contained in the target document to other words in the target document;

[0107] According to the third relevance of the words included in the target document to other words in the target document, the first relevance of the words included in the target document to the target document is obtained.

[0108] The step of obtaining a first relevance of the word contained in the target document to the target document according to a third relevance of the word contained in the target document to other words in the target document comprises:

[0109] Obtaining a sum of all third relevances according to the third relevances of the words included in the target document to other words in the target document;

[0110] The sum of the third relevances is normalized to obtain a first relevance of the words contained in the target document to the target document.

[0111] Specifically, after obtaining the hidden state expression hi of each word in the target document d in step 102, the third relevance G of each word in the target document d with other words can be calculated:

[0112]

[0113] Gii' represents the third correlation between the i-th word di and the i'th word di' in the target document d. The third correlation between each word and other words is summed and normalized (softmax) to represent the Attention (first correlation) of each word di in the target document d and the target document itself, as shown in Figure 3 As shown, ai represents the i-th word relative to the target document ( Figure 3 The importance of the original document in the document.

[0114]

[0115] like Figure 2 As shown, in step S103-2, the second relevance of the words contained in the target document to the user intention information is calculated based on the encoding information of the target document and the encoding information of the user intention information.

[0116] The second relevance refers to the importance of the words contained in the document to the user's intention.

[0117] The calculating, based on the encoding information of the target document and the encoding information of the user intention information, a second relevance of the words contained in the target document to the user intention information comprises:

[0118] Calculating, based on the hidden state information of the words included in the target document and the hidden state information of the words included in the user intention information, a fourth relevance of the words included in the target document to the words included in the user intention information;

[0119] According to the fourth relevance of the words included in the target document to the words included in the user intention information, a second relevance of the words included in the target document to the user intention information is obtained.

[0120] The obtaining, according to the fourth relevance of the words included in the target document to the words included in the user intention information, a second relevance of the words included in the target document to the user intention information comprises:

[0121] Obtaining a sum of all fourth relevances according to the fourth relevance of the words contained in the target document to each word contained in the user intention information;

[0122] The sum of the fourth relevance is normalized to obtain a second relevance of the words included in the target document to the user intention information.

[0123] Specifically, after obtaining the hidden state expression ui of the words included in the user intention and the hidden state expression hi of each word in the target document d in step 101 and step S102, the fourth relevance S of the words included in the target document to the words included in the user intention information can be calculated:

[0124] S ij =f s (h i ,u j )

[0125]

[0126] in is a learnable parameter, and fs is a relevance calculation function. Sij represents the relevance between the i-th word di in the target document d and the j-th word qj in the user intent q. By summing the fourth relevance of di and all words in q and performing a softmax operation, the Attention of each word di in the target document d and q can be represented, as follows: Figure 4 As shown, ai' represents the target document ( Figure 4 The second relevance of the i-th word in the original document with the user's intent:

[0127]

[0128] like Figure 2 As shown, in step S103-3, the importance of the words contained in the target document corresponding to the target document and the user intention information is determined according to the first relevance and the second relevance.

[0129] The determining, according to the first relevance and the second relevance, the importance of the words contained in the target document corresponding to the target document and the user intention information includes:

[0130] Calculating an average value of the first correlation and the second correlation;

[0131] The average value is used as the importance of the words included in the target document corresponding to the target document and the user intention information.

[0132] The determining, according to the first relevance and the second relevance, the importance of the words contained in the target document corresponding to the target document and the user intention information includes:

[0133] Calculating a weighted average of the first correlation and the second correlation;

[0134] The weighted average value is used as the importance of the words contained in the target document corresponding to the target document and the user intention information.

[0135] like Figure 1 As shown, in step S104, the encoding information of the target document is adjusted according to the importance.

[0136] The step of adjusting the encoding information of the target document according to the importance includes:

[0137] The hidden state information of the words included in the target document is adjusted according to the importance.

[0138] Specifically, when the importance of each word in the target document to the target document and the user's intention is the average of the first relevance and the second relevance, the hidden state information of the words contained in the target document is adjusted according to the importance to obtain the adjusted hidden state expression h′, as shown below:

[0139]

[0140] like Figure 1 As shown, in step S105, a document summary of the target document is generated according to the adjusted encoding information.

[0141] Generating a document summary of the target document according to the adjusted encoding information, including: generating a document summary of the target document according to the adjusted latent state information of the words contained in the target document.

[0142] So far, the introduction of the first embodiment of the present application is completed. The first embodiment of the present application provides a method for generating a document summary. In the process of generating a document summary, the user's intention is combined to generate personalized summaries for different users, thereby improving the user experience; at the same time, in the encoding (encoder) stage, the encoding information of the target document is adjusted according to the importance of the words contained in the target document relative to the overall user intention of the target document, thereby improving the accuracy of the document summary.

[0143] Corresponding to the method for generating a document summary provided in the first embodiment of the present application, the second embodiment of the present application also provides a device for generating a document summary.

[0144] like Figure 5 As shown, the document summary generating device includes:

[0145] A user intention coding information obtaining unit 501 is used to encode the user intention information to obtain coding information of the user intention information;

[0146] The target document coding information obtaining unit 502 is used to encode the target document to obtain the coding information of the target document;

[0147] An importance generating unit 503, configured to determine the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0148] A coding information adjustment unit 504, configured to adjust the coding information of the target document according to the importance;

[0149] The document summary generating unit 505 is used to generate a document summary of the target document according to the adjusted encoding information.

[0150] Optionally, the importance generating unit is specifically used to:

[0151] Calculating a first relevance of the words contained in the target document to the target document according to the encoding information of the target document, and calculating a second relevance of the words contained in the target document to the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0152] The importance of the words included in the target document corresponding to the target document and the user intention information is determined according to the first relevance and the second relevance.

[0153] Optionally, the user intention encoding information obtaining unit is specifically used to:

[0154] The user intention information is encoded to obtain hidden state information of the words included in the user intention information.

[0155] Optionally, the target document encoding information obtaining unit is specifically used to:

[0156] The target document is encoded to obtain hidden state information of the words contained in the target document.

[0157] Optionally, the relevance generating unit is specifically used for:

[0158] Calculating, according to the hidden state information of the word contained in the target document, a third relevance of the word contained in the target document to other words in the target document;

[0159] According to the third relevance of the words included in the target document to other words in the target document, the first relevance of the words included in the target document to the target document is obtained.

[0160] Optionally, the importance generating unit is specifically used for:

[0161] Obtaining a sum of all third relevances according to the third relevances of the words included in the target document to other words in the target document;

[0162] The sum of the third relevances is normalized to obtain a first relevance of the words contained in the target document to the target document.

[0163] Optionally, the importance generating unit is specifically used for:

[0164] Calculating, based on the hidden state information of the words included in the target document and the hidden state information of the words included in the user intention information, a fourth relevance of the words included in the target document to the words included in the user intention information;

[0165] According to the fourth relevance of the words included in the target document to the words included in the user intention information, a second relevance of the words included in the target document to the user intention information is obtained.

[0166] Optionally, the importance generating unit is specifically used for:

[0167] Obtaining a sum of all fourth relevances according to the fourth relevance of the words contained in the target document to each word contained in the user intention information;

[0168] The sum of the fourth relevance is normalized to obtain a second relevance of the words included in the target document to the user intention information.

[0169] Optionally, the coding information adjustment unit is specifically used to:

[0170] The hidden state information of the words included in the target document is adjusted according to the importance.

[0171] Optionally, the importance generating unit is specifically used for:

[0172] Calculating an average value of the first correlation and the second correlation;

[0173] The average value is used as the importance of the words included in the target document corresponding to the target document and the user intention information.

[0174] Optionally, the importance generating unit is specifically used for:

[0175] Calculating a weighted average of the first correlation and the second correlation;

[0176] The weighted average value is used as the importance of the words contained in the target document corresponding to the target document and the user intention information.

[0177] Optionally, the user intention encoding information obtaining unit is specifically used to:

[0178] Encoding the user intention information using a bidirectional LSTM network or a GRU network to obtain encoded information including the user intention information;

[0179] The target document encoding information obtaining unit is specifically used for:

[0180] A bidirectional LSTM network or a GRU network is used to encode the target document to obtain encoding information of the target document.

[0181] Optionally, the device further comprises: a user intention information obtaining unit,

[0182] Used to obtain user intent information.

[0183] Optionally, the user intention information includes at least one of the following:

[0184] User search query information;

[0185] User purchase history information;

[0186] User review record information.

[0187] It should be noted that for the detailed description of the document summary generation device provided in the second embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.

[0188] Corresponding to the method for generating a document summary provided in the first embodiment of the present application, the third embodiment of the present application also provides an electronic device.

[0189] like Figure 6 As shown, the electronic device comprises:

[0190] Processor 601; and

[0191] The memory 602 is used to store a program of a method for generating a document summary. After the device is powered on and the program of the method for generating a document summary is run by the processor, the following steps are performed:

[0192] Encoding the user intention information to obtain encoded information of the user intention information;

[0193] Encoding the target document to obtain encoding information of the target document;

[0194] Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0195] Adjusting the encoding information of the target document according to the importance;

[0196] Generate a document summary of the target document based on the adjusted encoding information.

[0197] Optionally, determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information includes:

[0198] Calculating a first relevance of the words contained in the target document to the target document according to the encoding information of the target document, and calculating a second relevance of the words contained in the target document to the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0199] The importance of the words included in the target document corresponding to the target document and the user intention information is determined according to the first relevance and the second relevance.

[0200] Optionally, encoding the user intention information to obtain the encoded information of the user intention information includes:

[0201] The user intention information is encoded to obtain hidden state information of the words included in the user intention information.

[0202] Optionally, encoding the target document to obtain encoding information of the target document includes:

[0203] The target document is encoded to obtain hidden state information of the words contained in the target document.

[0204] Optionally, calculating the first relevance of the words contained in the target document to the target document according to the encoding information of the target document includes:

[0205] Calculating, according to the hidden state information of the word contained in the target document, a third relevance of the word contained in the target document to other words in the target document;

[0206] According to the third relevance of the words included in the target document to other words in the target document, the first relevance of the words included in the target document to the target document is obtained.

[0207] Optionally, obtaining the first relevance of the word contained in the target document to the target document according to the third relevance of the word contained in the target document to other words in the target document includes:

[0208] Obtaining a sum of all third relevances according to the third relevances of the words included in the target document to other words in the target document;

[0209] The sum of the third relevances is normalized to obtain a first relevance of the words contained in the target document to the target document.

[0210] Optionally, the calculating, according to the encoding information of the target document and the encoding information of the user intention information, a second relevance of the words contained in the target document to the user intention information includes:

[0211] Calculating, based on the hidden state information of the words included in the target document and the hidden state information of the words included in the user intention information, a fourth relevance of the words included in the target document to the words included in the user intention information;

[0212] According to the fourth relevance of the words included in the target document to the words included in the user intention information, a second relevance of the words included in the target document to the user intention information is obtained.

[0213] Optionally, obtaining a second relevance of the words included in the target document to the user intention information according to a fourth relevance of the words included in the target document to the words included in the user intention information includes:

[0214] Obtaining a sum of all fourth relevances according to the fourth relevance of the words contained in the target document to each word contained in the user intention information;

[0215] The sum of the fourth relevance is normalized to obtain a second relevance of the words included in the target document to the user intention information.

[0216] Optionally, adjusting the encoding information of the target document according to the importance includes:

[0217] The hidden state information of the words included in the target document is adjusted according to the importance.

[0218] Optionally, determining the importance of the word contained in the target document corresponding to the target document and the user intention information according to the first relevance and the second relevance includes:

[0219] Calculating an average value of the first correlation and the second correlation;

[0220] The average value is used as the importance of the words included in the target document corresponding to the target document and the user intention information.

[0221] Optionally, determining the importance of the word contained in the target document corresponding to the target document and the user intention information according to the first relevance and the second relevance includes:

[0222] Calculating a weighted average of the first correlation and the second correlation;

[0223] The weighted average value is used as the importance of the words contained in the target document corresponding to the target document and the user intention information.

[0224] Optionally, encoding the user intent information to obtain encoded information including the user intent information includes:

[0225] Encoding the user intention information using a bidirectional LSTM network or a GRU network to obtain encoded information including the user intention information;

[0226] The step of encoding the target document to obtain encoding information of the target document includes:

[0227] A bidirectional LSTM network or a GRU network is used to encode the target document to obtain encoding information of the target document.

[0228] Optionally, the electronic device further performs the following steps:

[0229] Get user intent information.

[0230] Optionally, the user intention information includes at least one of the following:

[0231] User search query information;

[0232] User purchase history information;

[0233] User review record information.

[0234] It should be noted that for the detailed description of the electronic device provided in the third embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.

[0235] Corresponding to the method for generating a document summary provided in the first embodiment of the present application, the fourth embodiment of the present application further provides a storage device storing a program for the method for generating a document summary, the program being executed by a processor to perform the following steps:

[0236] Encoding the user intention information to obtain encoded information of the user intention information;

[0237] Encoding the target document to obtain encoding information of the target document;

[0238] Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the encoding information of the target document and the encoding information of the user intention information;

[0239] Adjusting the encoding information of the target document according to the importance;

[0240] Generate a document summary of the target document based on the adjusted encoding information.

[0241] It should be noted that for the detailed description of the storage device provided in the fourth embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.

[0242] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0243] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0244] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0245] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0246] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

Claims

1. A method for generating a document summary, characterized in that: include: Encoding the user intention information to obtain encoded information of the user intention information; Encoding the target document to obtain encoding information of the target document; Calculating a first relevance of the words contained in the target document to the target document according to the encoding information of the target document, and calculating a second relevance of the words contained in the target document to the user intention information according to the encoding information of the target document and the encoding information of the user intention information; Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the first relevance and the second relevance, wherein the first relevance is used to indicate the importance of the words contained in the target document to the target document, and the second relevance is used to indicate the importance of the words contained in the target document to the user intention; Adjusting the encoding information of the target document according to the importance; Generate a document summary of the target document based on the adjusted encoding information.

2. The method according to claim 1, characterized in that The encoding of the user intention information to obtain the encoded information of the user intention information includes: The user intention information is encoded to obtain hidden state information of the words included in the user intention information.

3. The method according to claim 2, characterized in that The step of encoding the target document to obtain encoding information of the target document includes: The target document is encoded to obtain hidden state information of the words contained in the target document.

4. The method according to claim 3, characterized in that The step of calculating a first relevance of a word contained in the target document to the target document according to the encoding information of the target document comprises: Calculating, according to the hidden state information of the word contained in the target document, a third relevance of the word contained in the target document to other words in the target document; According to the third relevance of the words included in the target document to other words in the target document, the first relevance of the words included in the target document to the target document is obtained.

5. The method according to claim 4, characterized in that The step of obtaining a first relevance of the word contained in the target document to the target document according to a third relevance of the word contained in the target document to other words in the target document comprises: Obtaining a sum of all third relevances according to the third relevances of the words included in the target document to other words in the target document; The sum of the third relevances is normalized to obtain a first relevance of the words contained in the target document to the target document.

6. The method according to claim 3, characterized in that The calculating, based on the encoding information of the target document and the encoding information of the user intention information, a second relevance of the words contained in the target document to the user intention information comprises: Calculating, based on the hidden state information of the words included in the target document and the hidden state information of the words included in the user intention information, a fourth relevance of the words included in the target document to the words included in the user intention information; According to the fourth relevance of the words included in the target document to the words included in the user intention information, a second relevance of the words included in the target document to the user intention information is obtained.

7. The method according to claim 6, characterized in that The obtaining, according to the fourth relevance of the words included in the target document to the words included in the user intention information, a second relevance of the words included in the target document to the user intention information comprises: Obtaining a sum of all fourth relevances according to the fourth relevance of the words contained in the target document to each word contained in the user intention information; The sum of the fourth relevance is normalized to obtain a second relevance of the words included in the target document to the user intention information.

8. The method according to claim 2, characterized in that: The step of adjusting the encoding information of the target document according to the importance includes: The hidden state information of the words included in the target document is adjusted according to the importance.

9. The method according to claim 1, characterized in that: The determining, according to the first relevance and the second relevance, the importance of the words contained in the target document corresponding to the target document and the user intention information includes: Calculating an average value of the first correlation and the second correlation; The average value is used as the importance of the words included in the target document corresponding to the target document and the user intention information.

10. The method according to claim 1, characterized in that The determining, according to the first relevance and the second relevance, the importance of the words contained in the target document corresponding to the target document and the user intention information includes: Calculating a weighted average of the first correlation and the second correlation; The weighted average value is used as the importance of the words contained in the target document corresponding to the target document and the user intention information.

11. The method according to claim 1, characterized in that: The encoding of the user intention information to obtain the encoded information including the user intention information includes: Encoding the user intention information using a bidirectional LSTM network or a GRU network to obtain encoded information including the user intention information; The step of encoding the target document to obtain encoding information of the target document includes: A bidirectional LSTM network or a GRU network is used to encode the target document to obtain encoding information of the target document.

12. The method according to claim 1, characterized in that Also includes: Get user intent information.

13. The method according to claim 1, characterized in that The user intention information includes at least one of the following: User search query information; User purchase history information; User review record information.

14. A device for generating a document summary, characterized in that: include: A user intention coding information obtaining unit, used to encode the user intention information to obtain coding information of the user intention information; A target document coding information obtaining unit, used to encode the target document to obtain the coding information of the target document; an importance generating unit, configured to calculate a first relevance of the words contained in the target document to the target document according to the encoding information of the target document, and to calculate a second relevance of the words contained in the target document to the user intention information according to the encoding information of the target document and the encoding information of the user intention information; Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the first relevance and the second relevance, wherein the first relevance is used to indicate the importance of the words contained in the target document to the target document, and the second relevance is used to indicate the importance of the words contained in the target document to the user intention; A coding information adjustment unit, used for adjusting the coding information of the target document according to the importance; The document summary generating unit is used to generate a document summary of the target document according to the adjusted encoding information.

15. An electronic device, characterized in that: include: processor; as well as The memory is used to store a program of a method for generating a document summary. After the device is powered on and the program of the method for generating a document summary is run by the processor, the following steps are performed: Encoding the user intention information to obtain encoded information of the user intention information; Encoding the target document to obtain encoding information of the target document; Calculating a first relevance of the words contained in the target document to the target document according to the encoding information of the target document, and calculating a second relevance of the words contained in the target document to the user intention information according to the encoding information of the target document and the encoding information of the user intention information; Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the first relevance and the second relevance, wherein the first relevance is used to indicate the importance of the words contained in the target document to the target document, and the second relevance is used to indicate the importance of the words contained in the target document to the user intention; Adjusting the encoding information of the target document according to the importance; Generate a document summary of the target document based on the adjusted encoding information.

16. A storage device, characterized in that: A program storing a method for generating a document summary is executed by a processor to perform the following steps: Encoding the user intention information to obtain encoded information of the user intention information; Encoding the target document to obtain encoding information of the target document; Calculating a first relevance of the words contained in the target document to the target document according to the encoding information of the target document, and calculating a second relevance of the words contained in the target document to the user intention information according to the encoding information of the target document and the encoding information of the user intention information; Determining the importance of the words contained in the target document corresponding to the target document and the user intention information according to the first relevance and the second relevance, wherein the first relevance is used to indicate the importance of the words contained in the target document to the target document, and the second relevance is used to indicate the importance of the words contained in the target document to the user intention; Adjusting the encoding information of the target document according to the importance; Generate a document summary of the target document based on the adjusted encoding information.

Citation Information

Patent Citations

  • Method and device for calculating a personalized emotion abstract

    CN109800390A