A controllable movie script abstract joint generation method and system

By combining adaptive features and length attention with a coverage mechanism, a film script summary of controllable length is generated, which solves the problems of low summary generation efficiency and inconsistent length in existing technologies, and improves the construction of film script resource library and semantic knowledge base.

CN115269821BActive Publication Date: 2025-12-16TIANJIN FOREIGN STUDIES UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210922593.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-02
Publication Date
2025-12-16
Estimated Expiration
2042-08-02

AI Technical Summary

Technical Problem

Current methods for generating film script summaries rely on screenwriters, leading to insufficient resources and inefficiency. Furthermore, existing resource libraries suffer from summaries that are too long, too short, or missing, which hinders the construction of film script resource libraries and semantic knowledge bases.

Method used

Adaptive feature extraction is used to extract fine-grained features. Combining keyword and length attention with coverage and pointer mechanisms, the vocabulary distribution and sentence attention distribution are calculated through encoder and decoder to generate movie script summaries of controllable length.

Benefits of technology

It enables efficient generation of film script summaries of varying lengths, improving the quality and efficiency of summary generation and providing a guarantee for the construction of film script resource libraries and semantic knowledge bases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269821B_ABST
    Figure CN115269821B_ABST
Patent Text Reader

Abstract

The application discloses a controllable movie script abstract joint generation method and system, which comprises the following steps: combining adaptive features to extract fine-grained features and screen key sentences in important scenes; combining keywords, adopting an encoder to encode the screened sentence information; combining length attention, adopting a decoder to calculate a vocabulary distribution; combining length attention and a coverage mechanism, adopting the encoder and the decoder to calculate a screened sentence attention distribution; combining the vocabulary distribution, the screened sentence attention distribution and a pointer mechanism, calculating a final word distribution and generating an abstract. The application has the advantages that: different length movie script abstract generation is realized, the effect of movie script abstract generation is improved, and guarantee is provided for further construction of a movie script resource library and a movie semantic knowledge base.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a controllable movie script abstract joint generation method and system. BACKGROUND

[0002] The traditional movie text reading method requires people to summarize the core content of the script by reading the movie script, which faces the problems of insufficient artificial resources and low efficiency. It has become the demand of scriptwriters, story authors and actors to quickly find valuable information from long movie scripts, and the abstract is the minimization expression of the main content and core idea of the text. The controllable abstract generation of the movie script mainly provides guarantee for the movie script resource library and the construction of the movie semantic knowledge base, and further prepares for the generation of new movie stories, new movie scripts and movie knowledge index.

[0003] Abstract generation can be divided into extractive and generative methods. The extractive method is the extraction of important words and key sentences in the original text, while the generative method is regarded as a sequence-to-sequence mapping process in order to be closer to human thinking and more accurately reflect the artistic conception of the text. In order to effectively reduce the time of combining text editing and production in the movie post-production, the generation of abstracts with fixed length can further improve the quality of automatic abstract generation. However, the abstract generation of the movie script at the present stage depends on the movie scriptwriter, which makes the movie scriptwriter or movie producer need to spend effort to write abstracts of different lengths, thereby increasing the completion cost of the movie script and movie production. In addition, the core elements of the movie script abstract are the description of the key time period, important place, core character, important scene atmosphere and important plot. However, there are problems such as too long, too short or missing in the abstract of some movie scripts in the existing movie resource library. Therefore, the controllable abstract automatic generation method of the movie script has become a key problem to be solved in the film and television industry. At the same time, supplementing and perfecting the existing movie script abstract can provide more knowledge for the construction of the movie script resource library and the movie script semantic knowledge base. SUMMARY

[0004] The present application provides a controllable movie script abstract joint generation method to solve the defects of the prior art. According to the characteristics of the movie script expressed in accordance with the movie story timeline and segmented by scenes, first, the fine-grained information of the movie script is extracted by combining adaptive features; then the length and quality of the abstract generation are controlled by combining the core elements and length attention of the movie script; finally, the extractive and generative abstract generation methods are combined by combining the coverage and pointer mechanism to complete the abstract generation of the movie script.

[0005] In order to achieve the above application purposes, the technical solutions adopted by the present application are as follows:

[0006] A controllable joint generation method of movie script abstract, comprising the following steps:

[0007] Step 101: combining adaptive features to extract fine-grained features, and screening key sentences in important scenes;

[0008] Step 102: combining keywords, and using an encoder to encode the screened sentence information;

[0009] Step 103: combining length attention, and using a decoder to calculate the vocabulary distribution;

[0010] Step 104: combining length attention and coverage mechanism, and using an encoder and a decoder to calculate the attention distribution of the screened sentences;

[0011] Step 105: combining the vocabulary distribution, the screened sentence attention distribution and the pointer mechanism, calculating the final distribution of the word and generating the abstract.

[0012] Further, step 101 comprises the following sub-steps:

[0013] S11: extracting document-level information of the movie script, and dynamically training word embedding of the movie script;

[0014] S12: obtaining the syntactic and semantic features of the movie script, and screening important scene information in combination with adaptive features;

[0015] S13: obtaining the syntactic and semantic features of the important scene, and screening key sentence information in combination with adaptive features.

[0016] Further, S11 comprises the following sub-steps:

[0017] S111, using a pre-trained model to obtain word embedding, sentence embedding and position embedding;

[0018] S112, using word embedding, sentence embedding and position embedding to generate document-level information of the movie script;

[0019] S113, dynamically training word embedding of the movie script according to the document-level information of the movie script.

[0020] S12 comprises the following sub-steps:

[0021] S121, using a first layer neural network to obtain the syntactic and semantic features of the movie script;

[0022] S122, according to the syntactic and semantic features of the movie script, combining adaptive features to screen important scene information with greater weight.

[0023] S13 comprises the following sub-steps:

[0024] S131, acquire syntax and semantic features of the important scene by using the second-layer neural network;

[0025] S132, screen the key sentence information with greater weight according to the syntax and semantic features of the important scene and in combination with the adaptive features.

[0026] Further, the step 102 comprises the following sub-steps:

[0027] S21, acquire the keywords;

[0028] S22, encode the screened sentence information according to the keywords.

[0029] Further, the step 21 comprises the following sub-steps:

[0030] S211, obtain the keywords of the important scene atmosphere and the important plot by using an unsupervised keyword extraction algorithm;

[0031] S212, extract the keywords of the important time period, the important place and the core character according to the Wikipedia knowledge base.

[0032] Further, the step 103 comprises the following sub-steps:

[0033] S31, acquire the length attention;

[0034] S32, obtain the vocabulary distribution by using a decoder and according to the length attention.

[0035] Further, the step 105 comprises the following sub-steps:

[0036] S41, obtain the generated probability by using a pointer mechanism;

[0037] S42, calculate the final distribution of the word according to the vocabulary distribution, the screened sentence attention distribution and the generated probability;

[0038] S43, obtain the generation of the abstract by using the final distribution of the word.

[0039] The application further discloses a controllable abstract joint generation system for a movie script, which comprises:

[0040] An information acquisition and screening module is used to extract fine-grained features in combination with adaptive features and screen the key sentence under the important scene;

[0041] An encoding module is used to encode the screened sentence information by using an encoder in combination with the keywords;

[0042] A vocabulary distribution calculation module is used to calculate the vocabulary distribution by using a decoder in combination with the length attention;

[0043] a sentence attention distribution calculation module, configured to calculate the filtered sentence attention distribution by combining the length attention and the coverage mechanism, using an encoder and a decoder;

[0044] an abstract generation module, configured to calculate the final distribution of words and generate an abstract by combining the vocabulary distribution, the filtered sentence attention distribution and the pointer mechanism.

[0045] The application further discloses a computer device, including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the above-mentioned movie script controllable abstract joint generation method when executing the program.

[0046] The application further discloses a computer readable storage medium, which stores a computer program, and the program is executable on the processor to implement the above-mentioned movie script controllable abstract joint generation method.

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

[0048] By extracting the document-level information of the movie script, filtering the key sentences in the important scenes, and combining the length attention, the pointer and the coverage mechanism to calculate the final distribution of words, and then determining the content of abstract generation by the final distribution of words, the abstract generation of movie scripts of different lengths is realized, the effect of abstract generation of movie scripts is improved, and the construction of a movie script resource library and a movie semantic knowledge base is ensured. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 is a flowchart of the movie script controllable abstract joint generation method of the embodiment of the application;

[0050] Figure 2 is a schematic diagram of the running structure of the movie script controllable abstract joint generation method of the embodiment of the application;

[0051] Figure 3 is a schematic diagram of the structure of the pre-trained BERTSUM model of the embodiment of the application;

[0052] Figure 4 is a schematic diagram of the calculation process of the multi-layer encoder and the multi-layer decoder in the Transformer of the embodiment of the application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical scheme and advantages of the application clearer, the following embodiments are described in detail according to the drawings.

[0054] As Figure 1 and 2As shown in the figure, a controllable movie script abstract joint generation method comprises the following steps:

[0055] Step 101: Fine-grained features are extracted in combination with adaptive features to screen out key sentences in important scenes;

[0056] In actual application, a movie script has the characteristics of being expressed according to a movie story timeline and segmented by scenes, and the movie script can be composed of multiple scenes, and screening out key sentences in important scenes in the movie script can effectively improve the calculation efficiency and improve the quality of the abstract. Therefore, in the embodiment of the present application, fine-grained features are extracted in combination with adaptive features, on the one hand to obtain more effective chapter information in the original text sentences and target sentences, and on the other hand to further effectively utilize the self-attention mechanism to screen out key information in the text for subsequent abstract generation operation.

[0057] In one example, step 101 can comprise the following sub-steps:

[0058] S11: Extracting document-level information of the movie script and dynamically training word embedding of the movie script;

[0059] S12: Obtaining syntactic and semantic features of the movie script and screening important scene information in combination with adaptive features;

[0060] S13: Obtaining syntactic and semantic features of the important scene and screening key sentence information in combination with adaptive features.

[0061] In specific implementation, the embodiment of the present application can screen out key sentences in important scenes by extracting fine-grained features, and the structure is as shown in the figure. Figure 3 As shown in the figure, it is composed of a BERTSUM model and a 2-layer BiLSTM+adaptive feature+screening layer.

[0062] In one example, the step of S11: extracting document-level information of the movie script and dynamically training word embedding of the movie script can comprise:

[0063] S111, adopting a pre-trained model to obtain word embedding, sentence embedding and position embedding;

[0064] S112, generating document-level information of the movie script by using word embedding, sentence embedding and position embedding;

[0065] S113, dynamically training word embedding of the movie script according to the document-level information of the movie script.

[0066] In a specific implementation, a pre-trained model BERTSUM is used to extract features of multiple sentences in a document, so that document-level feature information can be extracted, and word embeddings are dynamically trained according to context. The input vector of the pre-trained model BERTSUM is formed by adding word embeddings, sentence embeddings and position embeddings, and then passes through multiple layers of encoders to capture document-level embeddings. The beginning and end of each sentence are represented by [CLS] and [SEP] respectively.

[0067] The movie script is denoted by F, the sentence is denoted by S, and each word is denoted by v, F = {S1, S2, …, S d}, S = {w1, w2, …, w s}.

[0068] In one example, document-level information of a movie script can be extracted by a BERTSUM model, and word embeddings are dynamically trained according to context. The attention mechanism calculation process of the BERTSUM model is shown in the formula:

[0069]

[0070] Where Q, K, and V represent query vectors, key vectors, and value vectors respectively, all of which are obtained by linear transformation of matrix S; N represents the number of heads in the attention mechanism, Q = SW Q , K = SW K , V = SW V . W Q , W K , and W V are trainable parameters. The similarity between different words in the text content is calculated by the query vector and the key vector. In order to analyze the input information from different angles, the multi-head attention calculation process is shown in the formula:

[0071] Multihead(Q, K, V) = [Concat(head1, head2, …, head N )] * W O

[0072] Where head i comes from formula (1), where W O is a trainable parameter. The output of multi-head attention is passed into two layers of feedforward neural networks, and the calculation process is shown in the formula:

[0073] z = max(0, W1Multihead(Q, K, V) + b1) W2 + b2

[0074] Where W1 and b1 are the weight and bias of the activation function ReLU respectively, and W2 and b2 are the weight and bias of the linear function respectively.

[0075] In one example, the step of acquiring the syntactic and semantic features of the movie script and screening important scene information in combination with adaptive features can include:

[0076] S121, acquiring the syntactic and semantic features of the movie script by using the first layer neural network;

[0077] S122, screening important scene information with greater weight according to the syntactic and semantic features of the movie script in combination with adaptive features.

[0078] In a specific implementation, the word embedding of the movie script dynamically trained is input into the first layer BiLSTM, and this recurrent neural network can capture the dependency relationship between long sentences and solve the problem of gradient disappearance or gradient explosion caused by too long sentences. After obtaining the updated sentence matrix, the relatively important scene information is screened in combination with adaptive features and according to the weight size.

[0079] In one example, the context information with syntactic and semantic features can be refined by BiLSTM, and each word in each sentence is updated to The LSTM unit is composed of an input gate, an output gate, a forget gate and a memory unit, as shown in the formula:

[0080] Input gate: i t =σ(W i ·[h t-1 ,z]+b i )

[0081] Forget gate: f t =σ(W f ·[h t-1 ,z]+b f )

[0082] Output gate: o t =σ(W o ·[h t-1 ,z]+b o )

[0083] Current time memory gate output:

[0084] Final output of memory gate (long memory):

[0085] Hidden layer state (short memory): h t =o t *tanh(C t )

[0086] Wherein, W and b are the weights and biases of different gate units, and sigma is the sigmoid function. After obtaining the updated sentence matrix S,

[0087] The adaptive feature is combined for screening. The calculation process of the adaptive feature is the same as the attention mechanism calculation process of the BERTSUM model, that is, the potential information of the word itself and the context in the sentence is obtained. The attention calculation process combined with the adaptive feature screening is shown in the formula:

[0088] attn select =Attention(Q,K,V)·S

[0089] Wherein, Q, K, V are calculated by using the updated sentence matrix S. According to the attention attn select , the screening process adopts a hard attention mechanism, which can filter out unimportant information in the context. The present application adds the weight of each sentence in each scene, so that the weight size of each scene can be obtained, thereby screening out P important places with greater weight, and the weights of the remaining scenes are all set to 0, that is, the model focuses on the content occurring in the more important scene, and the calculation process is shown in the formula:

[0090]

[0091] Wherein, the movie script is composed of multiple scene segments, and each scene attn int There are N sentences in each scene, Indicates the attention of the i-th sentence in a certain place, and the hard attention calculation process is shown in the formula:

[0092] θ=top(attn int )

[0093] Wherein, the hard attention mechanism is represented as top(.), and according to θ, the sentence in the relatively important scene information can be selected as a new sentence matrix S.

[0094] In one example, the steps of obtaining the syntactic and semantic features of the important scene and screening the key sentence information can include:

[0095] S131, the syntactic and semantic features of the important scene are obtained by using the second layer neural network;

[0096] S132, according to the syntactic and semantic features of the important scene, the adaptive feature is combined to screen the key sentence information with greater weight.

[0097] In a specific implementation, the updated sentence matrix S is input into the second layer loop BiLSTM to capture the dependency relationship between the sentences in the important scene screened out. After obtaining the updated sentence matrix, the adaptive feature is combined and the relatively key sentence information is screened according to the weight size.

[0098] In one example, the context information with syntactic and semantic features can be distilled by BiLSTM, and the attention calculation method adopted is the same as that of the first layer BiLSTM. Like the screening process after the first layer BiLSTM, the attention calculation combined with adaptive feature screening can obtain the weight size of each sentence, so as to screen out P' key sentences with greater weight, and the weights of the remaining sentences are all set to 0, that is, to make the model pay attention to more key sentence information.

[0099] wherein the hard attention mechanism is the same as the screening process of the first layer BiLSTM.

[0100] Finally, the key sentences can be screened out as the last new sentence matrix S input to the encoder.

[0101] Step 102: combining the keywords, the screened sentence information is encoded by the encoder;

[0102] In the embodiment of the present application, the description of the important time period, important place, core character, important scene atmosphere and important plot in the movie script summary is indispensable. Therefore, combining the keywords can effectively guarantee the quality of the generated movie script summary, so that the generated summary is more reasonable.

[0103] In one example, step 102 can include the following sub-steps:

[0104] S21, obtaining keywords;

[0105] S22, encoding the screened sentence information according to the keywords.

[0106] In actual application, seven keywords are used as auxiliary information and input into the encoder, which respectively represent the important time period, important place, core character, important scene atmosphere and important plot. In order to reduce the repeated generation of the summary, character matching is performed on all extracted keywords.

[0107] In one example, the step of obtaining keywords can include:

[0108] S211, using an unsupervised keyword extraction algorithm to obtain keywords of important scene atmosphere and important plot;

[0109] S212, extracting keywords of important time period, important place and core character according to the Wikipedia knowledge base.

[0110] In a specific implementation, a kind of graph-based keyword extraction algorithm TextRank is used, the movie script is regarded as a network consisting of word groups, the connection between words represents semantic relationship, and the keyword extraction of important scene atmosphere and important plot is completed by the semantic relationship inside the word in the document.For the keywords of key time periods, important places and core characters, the information related to the movie script can be obtained through the Wikipedia knowledge base.

[0111] Finally, the screened key sentences and keywords are marked with special symbols <eok>The length attention is concatenated and input into the decoder for the encoding operation.

[0112] Step 103: combining the length attention, the decoder is used to calculate the vocabulary distribution;

[0113] In a specific implementation, the length attention can effectively record the length of the current summary generation, predict the remaining length of the target summary generation, and concatenate the length attention to the decoder to effectively control the length of the summary generation.

[0114] In one example, step 103 can include the following sub-steps:

[0115] S31, obtaining the length attention;

[0116] S32, using the decoder to obtain the vocabulary distribution according to the length attention.

[0117] In a specific implementation, for each decoder time step t, the embodiment of the present application uses a length context vector Fused into the decoder, it can separate and process the length information from the recurrent decoding unit, and its calculation process is as shown in the formula:

[0118]

[0119]

[0120]

[0121] wherein, n represents the number of pre-defined length embeddings, represents the length attention score of the jth length embedding in the time step t, d represents the input of the decoder, W l ,V l ,w r and b l represent trainable parameters. l j represents the jth length embedding, when j = 1, it is 0, otherwise it uses the position encoding PE(j-1) of the Transformer to represent. And r t represents the remaining length scalar value of the time step t, but r t-1 -L(y t-1 )≤0 is 0, otherwise r t-1 -L(y t-1 ) represents the remaining length.

[0122] As Figure 4 As shown, the embodiment of the present application adopts the multi-layer encoder and multi-layer decoder in the Transformer to obtain the vocabulary distribution and the filtered sentence attention distribution, D represents the output of the last layer decoder, and E represents the output of the last layer encoder. In combination with the length attention, the decoder can calculate the vocabulary distribution, so as to select the word with the highest probability as the output reference, that is, the generative model generates new summary content, and the calculation process is as shown in the formula:

[0123]

[0124] Wherein, V', V, b and b' are learnable parameters.

[0125] Step 104: In combination with the length attention and the coverage mechanism, the encoder and the decoder are used to calculate the filtered sentence attention distribution;

[0126] In a specific implementation, in order to alleviate the problem of repeated generation, the filtered sentence attention distributions of all previous decoder time steps are added in combination with the coverage mechanism. In combination with the length attention and the coverage mechanism, the output of the encoder and the decoder can be used to calculate the filtered sentence attention distribution, so as to assist the model to select information from the filtered sentence as the output of the summary, that is, the extractive model generates new summary content. Therefore, the calculation process of the filtered sentence attention distribution is as shown in the formula:

[0127]

[0128]

[0129] Wherein, W c and v are learnable parameters of the same length, v, W d , W e and b attn are learnable parameters, e is from E, which represents the encoding vector of each word, and i represents the i th word in the text content. The coverage mechanism ensures that the information of the previous attention is used before the next selection, so that the attention mechanism can more easily avoid repeated attention to the same place.

[0130] Step 105: In combination with the vocabulary distribution, the filtered sentence attention distribution and the pointer mechanism, the final distribution of the word is calculated and the summary is generated.

[0131] In a specific implementation, the joint extractive and generative summary generation can effectively solve the problem of out-of-vocabulary words, and by effectively combining the respective advantages of the extractive method and the generative method, the coverage mechanism can more effectively improve the quality of summary generation and reduce the probability of repeated generation.

[0132] In one example, step 105 can include the following sub-steps:

[0133] S41, a pointer mechanism is used to obtain the generated probability;

[0134] S42, according to the vocabulary distribution, the filtered sentence attention distribution and the generated probability, the final distribution of the word is calculated;

[0135] S43, the final distribution of the word is used to obtain the generation of the abstract.

[0136] In a specific implementation, for each decoder time step t, a generated probability P gen ∈ [0, 1] is defined to determine the probability of generating a word from the vocabulary. In order to both copy a word through a pointer and allow a word to be generated through a fixed vocabulary, a pointer mechanism is used to generate the calculation process of the probability as shown in the formula:

[0137]

[0138] wherein, W x and b ptr are learnable parameters, x t is the input of the decoder, and sigma is a sigmoid function.

[0139] According to the vocabulary distribution, the filtered sentence attention distribution and the generated probability, the final distribution of the word is calculated. The pointer mechanism is used to determine whether to generate a word from the vocabulary or to copy a word from the original text by using P gen , and the final distribution of the word is as shown in the formula:

[0140]

[0141] Finally, the final distribution of the word is used to obtain the generation of the abstract. The loss function of the embodiment of the application is as shown in the formula:

[0142]

[0143]

[0144] wherein, represents a target word, and lambda is a hyperparameter.

[0145] The embodiment of the application also discloses a controllable abstract joint generation system for a movie script, comprising:

[0146] An information acquisition and screening module is used to extract fine-grained features in combination with adaptive features to screen out key sentences in important scenes.

[0147] An encoding module is used to encode the screened sentence information in combination with keywords by using an encoder.

[0148] a vocabulary distribution calculation module configured to calculate a vocabulary distribution by using a decoder in combination with length attention;

[0149] a sentence attention distribution calculation module configured to calculate a filtered sentence attention distribution by using an encoder and a decoder in combination with length attention and a coverage mechanism;

[0150] an abstract generation module configured to calculate a final distribution of words and generate an abstract by using a pointer mechanism in combination with the vocabulary distribution, the filtered sentence attention distribution, and the filtered sentence attention distribution.

[0151] Specific limitations of the controllable abstract joint generation system for movie scripts can be seen in the limitations of the method for generating an abstract of a movie script described above, and will not be repeated here. Each module in the controllable abstract joint generation system for movie scripts described above can be implemented in whole or in part by software, hardware, or a combination thereof. Each module described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0152] The embodiment of the present application also provides a computer device, which can be a server. The computer device comprises a processor, a memory, a network interface and a database connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store data of the resistance equivalent model and the equivalent sub-model, and to store the equivalent resistance, the working resistance and the contact resistance obtained when performing the calculation. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a controllable abstract joint generation method for movie scripts.

[0153] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: extracting fine-grained features in combination with adaptive features, and filtering key sentences in important scenes; encoding filtered sentence information by using an encoder in combination with keywords; calculating a vocabulary distribution by using a decoder in combination with length attention; calculating a filtered sentence attention distribution by using an encoder and a decoder in combination with length attention and a coverage mechanism; and calculating a final distribution of words and generating an abstract by using a pointer mechanism in combination with the vocabulary distribution, the filtered sentence attention distribution, and the filtered sentence attention distribution.

[0154] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the following steps: extracting fine-grained features in combination with adaptive features, screening key sentences in important scenes; screening the sentence information by using an encoder in combination with keywords; calculating a vocabulary distribution by using a decoder in combination with length attention; calculating the attention distribution of the screened sentences by using the encoder and the decoder in combination with the length attention and a coverage mechanism; calculating the last distribution of the words and generating an abstract in combination with the vocabulary distribution, the attention distribution of the screened sentences and a pointer mechanism.

[0155] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0156] The method of the present application described above can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk or an optical disk, or be implemented by computer code originally stored in a remote recording medium or a non-transitory machine readable medium and downloaded to a local recording medium, so that the method described herein can be processed by such software stored on a recording medium using a general computer, a special processor or programmable or special hardware such as ASIC or FPGA. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component (for example, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, processor or hardware, the processing method described herein is implemented. In addition, when the general computer accesses the code for implementing the processing shown herein, the execution of the code will convert the general computer into a special computer for executing the processing shown herein.

[0157] Those skilled in the art will appreciate that the embodiments described herein are intended to help the reader understand the implementation method of the present application, and should be understood as the protection scope of the present application is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations according to the technical inspiration disclosed in the present application without departing from the essence of the present application, and these modifications and combinations are still within the protection scope of the present application.< / eok>

Claims

1. A controllable movie script abstract co-generation method, characterized in that, The method comprises the following steps: Step 101: combining adaptive features to extract fine-grained features and screen key sentences in important scenes; Step 101 comprises the following sub-steps: S11: extracting document-level information of the movie script and dynamically training word embedding of the movie script; S11 comprises the following sub-steps: S111, obtaining word embedding, sentence embedding and position embedding by using a pre-trained model; S112, generating document-level information of the movie script by using the word embedding, the sentence embedding and the position embedding; S113, dynamically training word embedding of the movie script according to the document-level information of the movie script; S12: obtaining syntactic and semantic features of the movie script and screening important scene information by combining adaptive features; S12 comprises the following sub-steps: S121, obtaining syntactic and semantic features of the movie script by using a first-layer neural network; S122, screening important scene information with greater weight by combining adaptive features according to the syntactic and semantic features of the movie script; S13: obtaining syntactic and semantic features of the important scene and screening key sentence information by combining adaptive features; S13 comprises the following sub-steps: S131, obtaining syntactic and semantic features of the important scene by using a second-layer neural network; S132, screening key sentence information with greater weight by combining adaptive features according to the syntactic and semantic features of the important scene; Step 102: combining keywords, and encoding the screened sentence information by using an encoder; Step 103: combining length attention, and calculating vocabulary distribution by using a decoder; Step 104: combining length attention and coverage mechanism, and calculating screened sentence attention distribution by using the encoder and the decoder; Step 105: combining vocabulary distribution, screened sentence attention distribution and pointer mechanism, calculating the final distribution of words and generating an abstract.

2. The controllable summary co-generation method for a movie script according to claim 1, characterized in that: Step 102 comprises the following sub-steps: S21, obtaining keywords; S22, encoding the screened sentence information according to the keywords.

3. The controllable summary co-generation method for a movie script according to claim 2, characterized in that: Step 21 comprises the following sub-steps: S211, obtaining keywords of important scene atmosphere and important plot by using an unsupervised keyword extraction algorithm; S212, extracting keywords of important time periods, important places and core characters according to a Wikipedia knowledge base.

4. The controllable summary co-generation method for a movie script according to claim 1, characterized in that: Step 103 comprises the following sub-steps: S31, obtaining length attention; S32, obtaining vocabulary distribution by using a decoder and according to the length attention.

5. The controllable summary co-generation method for a movie script according to claim 1, characterized in that: Step 105 comprises the following sub-steps: S51, obtaining generation probability by using a pointer mechanism; S52, calculating the final distribution of words according to the vocabulary distribution, the screened sentence attention distribution and the generation probability; S53, obtaining abstract generation by using the final distribution of words.

6. A controllable movie script summary co-generation system for implementing the controllable movie script summary co-generation method of any one of claims 1-5, characterized in that, The method comprises: An information acquisition and screening module, configured to combine adaptive features to extract fine-grained features and screen key sentences in important scenes; An encoding module, configured to combine keywords and encode screened sentence information by using an encoder; A vocabulary distribution calculation module, configured to combine length attention and calculate vocabulary distribution by using a decoder; A pointer mechanism, configured to obtain generation probability; The sentence attention distribution calculation module is configured to calculate the filtered sentence attention distribution by combining the length attention and the coverage mechanism, and by using an encoder and a decoder. The abstract generation module is configured to calculate the final distribution of words and generate an abstract by combining the vocabulary distribution, the filtered sentence attention distribution and the pointer mechanism.

7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that: The processor implements the steps of the movie script controllable abstract joint generation method of any one of claims 1-5 when executing the program.

8. A computer readable storage medium having stored thereon a computer program, characterized in that: The program is executed by the processor to implement the steps of the movie script controllable abstract joint generation method of any one of claims 1-5.

Citation Information

Patent Citations

  • Method for reversely generating abstract based on key sentences and keywords

    CN109977220A

  • Text abstract generation method and device, medium and electronic equipment

    CN113434664A