CN117875392A - Scenario extraction model training method, device, equipment and storage medium - Google Patents

Scenario extraction model training method, device, equipment and storage medium Download PDF

Info

Publication number
CN117875392A
CN117875392A CN202410063236.3A CN202410063236A CN117875392A CN 117875392 A CN117875392 A CN 117875392A CN 202410063236 A CN202410063236 A CN 202410063236A CN 117875392 A CN117875392 A CN 117875392A
Authority
CN
China
Prior art keywords
scenario
character
ith
total
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410063236.3A
Other languages
Chinese (zh)
Inventor
郭卉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202410063236.3A priority Critical patent/CN117875392A/en
Publication of CN117875392A publication Critical patent/CN117875392A/en
Pending legal-status Critical Current

Links

Landscapes

  • Machine Translation (AREA)

Abstract

The application discloses a scenario extraction model training method, device, equipment and storage medium, and relates to the technical field of computers. The method comprises the following steps: acquiring a first training data set for training a scenario extraction model, wherein each first training sample comprises an ith scenario, a character relation corresponding to the ith scenario, a main character in a sample total scenario and a sample scenario abstract corresponding to the ith scenario; obtaining a predicted scene abstract corresponding to the ith scene play by adopting a scenario extraction model according to the ith scene play, the character relation corresponding to the ith scene play and the main characters in the sample total play; and adjusting parameters of the scenario extraction model according to the difference between the predicted scenario abstract and the sample scenario abstract to obtain a trained scenario extraction model. According to the method and the device, the character relation corresponding to the ith scene script and the main characters in the sample total script are considered, so that the accuracy of the generated abstract of each scene is improved.

Description

Scenario extraction model training method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a scenario extraction model training method, apparatus, device, and storage medium.
Background
The movie works need to be prepared in multiple ways according to the content of each occasion in the script before shooting each occasion, so that the rapid understanding of the scenario of each occasion is helpful for movie and television play related parties to know the scenario in advance, grasp the occasion trend and better deduct each occasion.
In the related art, a scenario abstract is generated based on a GPT (generating Pre-Trained Transformer, generating Pre-training transducer model) 2 or GPT4, and a scenario text of a certain scenario is input to ask a question to the GPT, for example, "please summarize the main events of the following scenario: xxx ", get the GPT answers about the scenario summaries of the input scenario. And because the scenario is too long, the GPT cannot understand the whole scenario at one time, so that each scenario is respectively input into the GPT to generate scenario summaries of each scenario.
However, the above method causes the scenario summaries of each session to be split due to the lack of context information of the contact scenario, and the scenario summaries of each session generated are inaccurate.
Disclosure of Invention
The embodiment of the application provides a training method, device and equipment for scenario extraction models and a storage medium. The technical scheme is as follows:
according to an aspect of the embodiments of the present application, there is provided a training method of scenario extraction model, the method including:
Acquiring a first training data set for training the scenario extraction model, wherein the first training data set comprises at least one first training sample, each first training sample comprises an ith scenario, character relations corresponding to the ith scenario, main characters in a sample total scenario and sample scenario abstracts corresponding to the ith scenario, the ith scenario is a scenario text of the ith scenario in the sample total scenario, the character relations corresponding to the ith scenario comprises character relations respectively corresponding to at least one key character appearing in the scenario of the first i scenario in the sample total scenario, and the sample scenario abstracts are used for indicating the scenario abstracts of the ith scenario, i is a positive integer;
obtaining a predicted scenario abstract corresponding to the ith scenario according to the ith scenario, the character relation corresponding to the ith scenario and the main characters in the sample total scenario by adopting the scenario extraction model, wherein the predicted scenario abstract is used for indicating the scenario abstract of the ith scenario;
and adjusting parameters of the scenario extraction model according to the difference between the predicted scenario abstract and the sample scenario abstract to obtain a trained scenario extraction model.
According to an aspect of the embodiments of the present application, there is provided a scenario extraction method based on a scenario extraction model, the scenario extraction model being a machine learning model for extracting a scenario abstract, the method including:
acquiring an ith scenario in a total scenario of scenarios to be extracted, wherein the ith scenario refers to scenario text of the ith scenario in the total scenario, and i is a positive integer;
according to the total scenario, main characters in the total scenario are obtained, and according to the scenario of the first i occasions in the total scenario, character relations corresponding to the ith scenario are obtained, wherein the character relations corresponding to the ith scenario comprise character relations respectively corresponding to at least one key character appearing in the scenario of the first i occasions in the total scenario;
and obtaining a scene abstract corresponding to the ith scene script according to the ith scene script, the character relation corresponding to the ith scene script and the main characters in the total script through the script extraction model.
According to an aspect of the embodiments of the present application, there is provided a training apparatus for scenario extraction model, the apparatus including:
The data acquisition module is used for acquiring a first training data set for training the scenario extraction model, the first training data set comprises at least one first training sample, each first training sample comprises an ith scenario, a character relation corresponding to the ith scenario, a main character in a sample total scenario and a sample scenario abstract corresponding to the ith scenario, the ith scenario is a scenario text of the ith scenario in the sample total scenario, the character relation corresponding to the ith scenario comprises character relations respectively corresponding to at least one key character appearing in the scenario of the first i scenario in the sample total scenario, and the sample scenario abstract is used for indicating the scenario abstract of the ith scenario, wherein i is a positive integer;
the model prediction module is used for obtaining a predicted scenario abstract corresponding to the ith scenario according to the ith scenario, the character relation corresponding to the ith scenario and the main characters in the sample total scenario by adopting the scenario extraction model, wherein the predicted scenario abstract is used for indicating the scenario abstract of the ith scenario;
And the model training module is used for adjusting parameters of the scenario extraction model according to the difference between the predicted scenario abstract and the sample scenario abstract to obtain a trained scenario extraction model.
According to an aspect of the embodiments of the present application, there is provided a scenario extraction apparatus based on a scenario extraction model, the scenario extraction model being a machine learning model for extracting a scenario abstract, the apparatus including:
the scenario acquisition module is used for acquiring an ith scenario in a total scenario of scenarios to be extracted, wherein the ith scenario refers to scenario text of the ith scenario in the total scenario, and i is a positive integer;
the character acquisition module is used for acquiring main characters in the total script according to the total script, acquiring character relations corresponding to the ith script according to the script of the previous i scenes in the total script, wherein the character relations corresponding to the ith script comprise character relations respectively corresponding to at least one key character appearing in the script of the previous i scenes in the total script;
and the abstract extraction module is used for obtaining the scene abstract corresponding to the ith scene script according to the ith scene script, the character relation corresponding to the ith scene script and the main characters in the total script through the script extraction model.
According to an aspect of the embodiments of the present application, there is provided a computer device, including a processor and a memory, in which a computer program is stored, the computer program being loaded and executed by the processor to implement the above-mentioned scenario extraction model training method, or a scenario extraction method based on a scenario extraction model.
According to an aspect of the embodiments of the present application, there is provided a computer-readable storage medium in which a computer program is stored, the computer program being loaded and executed by a processor to implement the above-described scenario extraction model training method, or a scenario extraction method based on a scenario extraction model.
According to an aspect of the embodiments of the present application, there is provided a computer program product comprising a computer program loaded and executed by a processor to implement the above-described scenario extraction model training method, or a scenario extraction method based on a scenario extraction model.
The technical scheme provided by the embodiment of the application can bring the following beneficial effects:
by taking the character relation corresponding to the ith scene play, the character relation corresponding to the ith scene play and the main characters in the sample total scene as input data of the scenario extraction model, the scenario extraction model considers the character relation corresponding to at least one key character appearing in the first i scene plays in the sample total scene when carrying out scenario extraction on the ith scene play, and avoids that the scenario extraction model only considers the current scene play and the character relation in the current scene play, thereby avoiding that the generation of the scene summaries of all the scenes is split. And the main characters in the total script of the sample are considered, and the script extraction model can enhance the script extraction of the main characters by constructing a script extraction bottom foundation, and the accuracy of each generated script abstract is improved by generating the script abstract of the contact above based on the bottom foundation.
In addition, as the scenario extraction model is a model obtained by additional training, compared with the model used in the related technology, the scenario extraction model has higher safety, prevents scenario leakage, and has better stability of the vertical domain model focusing on specific tasks.
In addition, the scenario extraction model supports each scenario in the input sample total scenario, reduces scenario extraction cost, improves scenario extraction efficiency and is beneficial to long-term use compared with the model of the input sample total scenario.
Drawings
FIG. 1 is a schematic diagram of an implementation environment for an embodiment provided herein;
FIG. 2 is a flow chart of a training method of scenario extraction model provided in one embodiment of the present application;
FIG. 3 is a schematic diagram of an inference process of a scenario extraction model provided by one embodiment of the present application;
FIG. 4 is a flow chart of a training method for character extraction models provided in one embodiment of the present application;
fig. 5 is a schematic diagram of scenario extraction flow of a scenario extraction model provided in an embodiment of the present application;
FIG. 6 is a flow chart of a scenario extraction method based on a scenario extraction model provided in one embodiment of the present application;
FIG. 7 is a block diagram of a training apparatus for scenario extraction models provided by one embodiment of the present application;
Fig. 8 is a block diagram of a scenario extraction apparatus based on a scenario extraction model according to an embodiment of the present application;
fig. 9 is a block diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include, for example, sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, pre-training model technologies, operation/interaction systems, mechatronics, and the like. The pre-training model is also called a large model and a basic model, and can be widely applied to all large-direction downstream tasks of artificial intelligence after fine adjustment. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Machine Learning (ML) is a multi-domain interdisciplinary, involving multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like. The pre-training model is the latest development result of deep learning, and integrates the technology.
The large language model (Large Language Model, LLM) is an artificial intelligence algorithm based on deep learning techniques with the goal of allowing the computer to understand and generate natural language. It learns the structure and regularity of a language by analyzing a large amount of language data such as text, speech or images, and uses this knowledge to accomplish various natural language processing tasks such as machine translation, speech recognition, text classification, question-answering systems, etc. Large language models typically use a transform architecture in deep learning to model text sequences in order to understand context and semantics. Its training process typically involves a large amount of data and computing resources, such as a large corpus and a high performance computing platform. In the training process, the large language model gradually learns the characteristics and rules of the language, and forms understanding and expression capability of the language.
The transducer architecture is a deep learning model that employs a self-attention mechanism that can be assigned different weights depending on the importance of the various parts of the input data. The architecture is mainly used in the field of natural language processing and Computer Vision (CV). The architecture typically includes Self-Attention (Self-Attention), multi-Head Attention (Multi-Head Attention), position coding (Positional Encoding), residual connection and normalization (Add & Norm), feed-Forward Network (Feed-Forward Network), position-by-Position Feed-Forward Network (Position-with-Forward Network), and the like, which constitute the encoder and decoder.
The Pre-training Model (PTM), also called a kerbstone Model, refers to a deep neural network (Deep Neural Network, DNN) with large parameters, which is trained on massive unlabeled data, and the PTM extracts common features on the data by utilizing the function approximation capability of the large-Parameter DNN, and is suitable for downstream tasks through Fine Tuning (PEFT), parameter-Efficient Fine Tuning (PEFT), prompt Fine Tuning (prompt-Tuning) and other technologies. Therefore, the pre-training model can achieve ideal effects in a small sample (Few-shot) or Zero sample (Zero-shot) scene. PTM can be classified according to the data modality of the process into a language model (ELMO, BERT, GPT), a visual model (swin-transducer, viT, V-MOE), a speech model (VALL-E), a multi-modal model (ViBERT, CLIP, flamingo, gato), etc., wherein a multi-modal model refers to a model that builds a representation of the characteristics of two or more data modalities. The pre-training model is an important tool for outputting artificial intelligence generation content (Artificial Intelligence Generated Content, AIGC), and can also be used as a general interface for connecting a plurality of specific task models.
As artificial intelligence technology research and advances, artificial intelligence technology expands research and applications in a variety of fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned, autopilot, unmanned, digital twinning, virtual humans, robotics, artificial intelligence generation content (Artificial Intelligence Generated Content, AIGC), conversational interactions, smart medicine, smart customer service, game AI, virtual Reality (VR), augmented Reality (Augmented Reality, AR), etc., it is believed that as technology advances, artificial intelligence technology will find application in more fields and with increasing value.
The technical scheme mainly relates to a machine learning technology in an artificial intelligence technology, and mainly relates to a training and using process of a scenario extraction model.
Referring to fig. 1, a schematic diagram of an implementation environment of an embodiment of the present application is shown. The implementation environment of the scheme can be realized to become a scenario extraction system. The implementation environment of the scheme can comprise: model training apparatus 10 and model using apparatus 20.
Model training device 10 may be an electronic device such as a cell phone, tablet, notebook, desktop, smart television, multimedia player device, vehicle terminal, server, smart robot, or some other electronic device with relatively high computing power. The model training apparatus 10 is used for training scenario extraction models.
In the embodiment of the application, the scenario extraction model is a machine learning model obtained by training based on a training method of the scenario extraction model and is used for generating a scenario abstract corresponding to the scenario according to the scenario, the character relation corresponding to the scenario and main characters in the sample total scenario. The model training apparatus 10 may train the scenario extraction model in a machine learning manner, so as to provide the capability of extracting scenario summaries of the scene scenario, and a specific model training method may refer to the following embodiments.
In the embodiment of the present application, the input data of the scenario extraction model includes an ith scenario in the sample total scenario, a character relationship corresponding to the ith scenario, and a main character in the sample total scenario, and the output data is a scenario abstract corresponding to the ith scenario.
The trained scenario extraction model may be deployed for use in the model use device 20. Model-using device 20 may be an electronic device such as a cell phone, tablet computer, notebook computer, desktop computer, smart television, multimedia player device, vehicle terminal, server, smart robot, or some other electronic device with relatively high computing power. When it is necessary to extract scenario summaries of individual scenario scenarios in the sample total scenario, the model use device 20 may implement the above-described functions by the trained scenario extraction model.
The model training apparatus 10 and the model using apparatus 20 may be two independent apparatuses or the same apparatus. If model training apparatus 10 and model using apparatus 20 are the same apparatus, model training apparatus 10 may be deployed in model using apparatus 20.
In the embodiment of the present application, the execution subject of each step may be a computer device, which may be the model training device 10 as in fig. 1 or the model using device 20. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing service.
Referring to fig. 2, a flowchart of a scenario extraction model training method according to an embodiment of the present application is shown. The subject of execution of the steps of the method may be a computer device, such as the model training device described above. The method may include at least one of the following steps 210-230:
step 210, obtaining a first training data set for training a scenario extraction model, where the first training data set includes at least one first training sample, each first training sample includes an i-th scenario, a character relationship corresponding to the i-th scenario, a main character in a sample total scenario, and a sample scenario abstract corresponding to the i-th scenario, the i-th scenario is a scenario text of the i-th scenario in the sample total scenario, the character relationship corresponding to the i-th scenario includes character relationships corresponding to at least one key character appearing in the scenario of the i-th scenario in the sample total scenario, and the sample scenario abstract is used for indicating a scenario abstract of the i-th scenario, where i is a positive integer.
The total scenario is a text describing the scenario of the movie works, and is used for guiding shooting of the movie works, one movie work corresponds to one total scenario, and the number of scenes and words of each total scenario are not necessarily the same.
The sample total scenario is a total scenario of training data used as scenario extraction model. Each scenario in the total scenario refers to each scenario in each section of scenario in the total scenario, and in general, one scenario corresponds to one scenario, for example, if a first section of scenario described in the total scenario occurs in scenario 1 and a second section of scenario described in the total scenario occurs in scenario 2, the scenario text corresponding to scenario 1 is determined to be the 1 st scenario, and the scenario text corresponding to scenario 2 is determined to be the 2 nd scenario. The scenes corresponding to the adjacent scene scenario are different, and the scenes corresponding to the alternate scene scenario may be the same or different. For example, the scene corresponding to the 3 rd scene scenario is any other scene than the scene 2, and may be the scene 1 or another scene.
Each scenario in the sample total scenario refers to scenario text describing each scenario in the sample total scenario, and each scenario mainly comprises occurrence time, occurrence place, character roles appearing in the scenario, behaviors of each character role and dialogue among the character roles.
The first training sample may be directed to each of the scene episodes in the same sample total episode, for example, the first training sample may include only each of the scene episodes in the total episode 1; the first training samples may be specific to each of the different total episodes, for example, the first training samples may include each of the total episodes 1 and each of the total episodes 2, which is not limited in this application.
The ith scenario refers to scenario text of the ith scenario in one total scenario. The main characters in the sample total scenario refer to characters with a high proportion of the characters in the sample total scenario, including at least two characters, and the main characters are also commonly called as "main corners".
The character relation corresponding to the ith scene scenario comprises character relations respectively corresponding to at least one key character appearing in the scene scenario of the first i scenes in the sample total scenario, the character relation corresponding to each key character comprises the relation of each character appearing in the scene scenario of the first i scenes relative to the key character, and the relation of the character relative to the key character refers to the relation of character characters with the proportion of the characters smaller than the proportion of the characters of the key character relative to the key character. The scenario of the first i number of occasions refers to all of the scenario of the 1 st to i th occasions in the sample total scenario. The key character refers to a character having a pushing effect on the scenario in the scenario of the first i occasions, and may be a main character in the sample total scenario, or may be other character characters with a proportion of the scenario less than that of the main character. The character relations can comprise a father-son relation, a father-woman relation, a mother-son relation, a mother-woman relation, a couple relation, a lover relation, a teacher-student relation and the like, if the total script of the sample is a script in a modern scene, the character relations can also comprise a classmate relation, a colleague relation and the like, and if the total script of the sample is a script in an ancient scene, the character relations can also comprise a master-slave relation and the like. The character relationship corresponding to the ith scene scenario is a character relationship obtained based on the scene scenario of the previous i scenes, and the specific acquisition process can refer to the embodiment shown in fig. 4 below.
The sample scenario abstract is a scenario abstract as supervision information of scenario extraction model, and is used for indicating scenario abstract of ith scenario. The scenario abstract is a scenario description text which is obtained by scenario extraction of the scenario of the scenario and is simplified, and the scenario abstract is used for describing the scenario corresponding to the scenario in a generalized language. Typically, the number of words in the scene summary is much smaller than the number of words in the scene transcript.
And 220, obtaining a predicted scenario abstract corresponding to the ith scenario according to the ith scenario, the character relation corresponding to the ith scenario and the main characters in the sample total scenario by adopting a scenario extraction model, wherein the predicted scenario abstract is used for indicating the scenario abstract of the ith scenario.
The predicted scenario digest is output data of the scenario extraction model for indicating a scenario digest of the ith scenario.
And step 230, adjusting parameters of the scenario extraction model according to the difference between the predicted scenario abstract and the sample scenario abstract to obtain a trained scenario extraction model.
In some embodiments, marking each vocabulary in the sample scene abstract with a first probability to obtain marked vocabulary in the sample scene abstract; replacing each vocabulary in the sample scene abstract by using a second probability to obtain a replaced vocabulary in the sample scene abstract, wherein the sum of the first probability and the second probability is smaller than 1; setting the marked vocabulary and the replaced vocabulary as the vocabulary to be predicted; and adjusting parameters of the scenario extraction model according to the difference between the vocabulary of the position of the vocabulary to be predicted in the abstract of the prediction scene and the vocabulary to be predicted, so as to obtain the trained scenario extraction model.
The first probability and the second probability are both in a value range of 0-1, and the sum of the first probability and the second probability is smaller than 1, for example, the first probability can be 0.8, and the second probability can be 0.1.
Alternatively, each vocabulary in the sample scene abstract may be marked only with the first probability, so as to obtain a marked vocabulary in the sample scene abstract, and the marked vocabulary is set as the vocabulary to be predicted. Or, each vocabulary in the sample scene abstract can be replaced only with the second probability, so as to obtain a replaced vocabulary in the sample scene abstract, and the replaced vocabulary is set as the vocabulary to be predicted.
Optionally, masking each vocabulary in the sample scene abstract with a third probability may be further performed to obtain a masked vocabulary in the sample scene abstract, where a sum of the first probability, the second probability, and the third probability is less than 1. The marked vocabulary, the replaced vocabulary and the masked vocabulary are set as the vocabulary to be predicted.
The vocabulary to be predicted refers to the vocabulary with actual meaning such as verb vocabulary, noun vocabulary, adjective vocabulary and the like, and the vocabulary to be predicted does not comprise the vocabulary without actual meaning such as adverb vocabulary, preposition vocabulary and the like.
Because the number of words of the predicted scene abstract and the sample scene abstract is large, sentence construction is complex, and the difficulty in calculating the difference between the predicted scene abstract and the sample scene abstract is large, a first loss function value is calculated according to the difference between the vocabulary of the position of the vocabulary to be predicted in the predicted scene abstract and the vocabulary to be predicted in the corresponding sample scene abstract, and then parameters of the scenario extraction model are adjusted according to the first loss function value, so that the trained scenario extraction model is obtained.
For calculating the first loss function value, a cross entropy loss function may be employed, which may be expressed as:
where bs represents the number of first training samples for each batch, y [ i ] represents the label of each word in the dictionary, and pi represents the probability that each word in the dictionary is determined to be the respective word to be predicted in the prediction scene summary. If a certain word of the dictionary is selected as a word to be predicted in the prediction scene abstract, the tag of the word is 1, and if the certain word of the dictionary is not selected as the word to be predicted in the prediction scene abstract, the tag of the word is 0.
For example, for the 1 st vocabulary in the prediction scene abstract, each vocabulary in the dictionary has a probability of being determined as the 1 st vocabulary, and the corresponding vocabulary when the probability of being determined as the 1 st vocabulary is maximum in each vocabulary is selected as the 1 st vocabulary, and the tag of the 1 st vocabulary is 1. The probability of the vocabulary is determined as the 1 st vocabulary, namely the similarity between the vocabulary and the vocabulary to be predicted at the corresponding position in the sample scene abstract can be expressed. And obtaining each word to be predicted in the prediction scene abstract and the probability that each word is determined as the word to be predicted.
In some embodiments, weights may be set for each word to be predicted in a sample scene abstract, for example, weights of words having a main effect on scenario description may be set higher, and weights of words having an auxiliary effect on scenario description may be set lower, so as to strengthen training on part of words and improve accuracy of scenario abstract extraction.
Alternatively, other loss functions capable of expressing the meaning of loss may be selected, such as a mean square error loss function, a log likelihood loss function, an exponential loss function, and the like, which is not limited in this application.
The method has the advantages that the difference between the calculated prediction scene abstract and the sample scene abstract is converted into the difference between the calculated prediction scene abstract and the sample scene abstract by determining the vocabulary to be predicted in the sample scene abstract, so that the calculation process is simplified, and the model training efficiency is improved.
In the above embodiment, the scenario extraction model may output a scenario summary corresponding to the ith scenario according to the ith scenario, the character relationship corresponding to the ith scenario, and the main characters in the sample total scenario. In other embodiments, the scenario extraction model may further output the scenario summaries corresponding to the multiple consecutive scenario scripts according to the multiple consecutive scenario scripts, the character relationships corresponding to the multiple consecutive scenario scripts, and the main characters in the sample total scenario.
In some embodiments, the scenario extraction model may further distinguish a main scenario from a branch scenario for a scenario summary corresponding to the ith scenario. The scenario related to the main characters in the sample total scenario is a main line scenario, and the scenario related to the non-main characters in the sample total scenario is a branch scenario. The scenario extraction model may output a main scenario corresponding to the i-th scenario and related to the main character in the sample total scenario, and a branch scenario corresponding to the i-th scenario and not related to the main character in the sample total scenario according to the i-th scenario, the character relation corresponding to the i-th scenario, and the main character in the sample total scenario. The scenario extraction model may further output a main scenario corresponding to the plurality of consecutive scenario scenarios and related to the main character in the sample total scenario, and a branch scenario corresponding to the plurality of consecutive scenario scenarios and not related to the main character in the sample total scenario according to the plurality of consecutive scenario scenarios, the character relation corresponding to the plurality of consecutive scenario, and the main character in the sample total scenario.
Fig. 3 shows an reasoning process of the scenario extraction model, and first, according to each scenario in the total scenario, the relationship among the key characters, the main characters and the characters corresponding to at least one key character in each scenario, and the relationship among the key characters, the main characters and the characters corresponding to at least one key character in the total scenario are obtained. And then extracting the scene abstract corresponding to the ith scene play according to the ith scene play, the character relation corresponding to the ith scene play and the main characters in the total scene play through the scene extraction model.
According to the technical scheme provided by the embodiment of the application, the character relation corresponding to the ith scene play and the main characters in the sample total scene are used as input data of the scene extraction model, so that the scene extraction model considers the character relation corresponding to at least one key character appearing in the scene play of the first i scenes in the sample total scene when the ith scene play is extracted, and the scene extraction model is prevented from only considering the current scene play and the character relation in the current scene play, thereby avoiding the generation of the split between the scene summaries of each scene. And the main characters in the total script of the sample are considered, and the script extraction model can enhance the script extraction of the main characters by constructing a script extraction bottom foundation, and the accuracy of each generated script abstract is improved by generating the script abstract of the contact above based on the bottom foundation.
In addition, as the scenario extraction model is a model obtained by additional training, compared with the model used in the related technology, the scenario extraction model has higher safety, prevents scenario leakage, and has better stability of the vertical domain model focusing on specific tasks.
In addition, the scenario extraction model supports each scenario in the input sample total scenario, reduces scenario extraction cost, improves scenario extraction efficiency and is beneficial to long-term use compared with the model of the input sample total scenario.
In some embodiments, please refer to fig. 4, which illustrates a flowchart of a training method for character extraction model according to one embodiment of the present application. The subject of execution of the steps of the method may be a computer device, such as the model training device described above. The method may include at least one of the following steps 410-430:
step 410, obtaining a second training data set for training the character extraction model, where the second training data set includes at least one second training sample, each second training sample includes a scenario of the first k scenarios in the total scenario of samples, key characters appearing in the scenario of the first k scenarios, and sample character relationships corresponding to the scenario of the first k scenarios, where the sample character relationships are used to indicate character relationships respectively corresponding to at least one key character appearing in the scenario of the first k scenarios, and k is a positive integer.
The scenario of the first k plays refers to all of the scenarios from 1 st to i th of the sample total scenario. The key persons appearing in the scenario of the first k plays refer to the key persons appearing in all of the 1 st to the kth plays of the sample total scenario, that is, the key persons appearing in the scenario of the next k plays are not included in the key persons appearing in the scenario of the first k plays.
In some embodiments, the process of acquiring the key characters appearing in the scenario of the first k occasions in the second training sample includes at least one sub-step of steps 411 to 413 (not shown).
Step 411, obtain at least one character appearing in the scenario of the first k occasions, and the number of times of the at least one character appearing in the scenario of the first k occasions, respectively.
The character characters refer to characters with autonomous consciousness in the scenario text, and the character characters can be human characters marked on the basis of real characters or virtual characters marked on the basis of animals or plants.
According to the scenario of the previous k occasions, at least one persona appearing in the scenario of the previous k occasions is obtained, the number of times of outputting at least one persona appearing in the scenario of the previous k occasions is obtained, and the number of times of outputting at least one persona appearing in the scenario of the previous k occasions is obtained.
Step 412, sorting at least one character appearing in the scenario of the first k fields according to the order of the number of times of the field from large to small, to obtain a sorting sequence corresponding to at least one character appearing in the scenario of the first k fields.
The ranking sequence refers to a ranking sequence from big to small in the number of times of the appearance of at least one character in the scene scenario of the first k scenes, and the number of times of the appearance of the character in the ranking sequence, which is the front ranking, is larger than the number of times of the appearance of the character in the ranking sequence.
Step 413, determining the first number of personas in the ordered sequence that are top ranking as key personas that appear in the scenario of the top k plays.
That is, the first number of character roles with the largest number of times of the departure among at least one character role appearing in the scenario of the first k number of occasions is acquired and determined as the key character appearing in the scenario of the first k number of occasions.
By acquiring the key characters appearing in the scenario of the first k occasions, the character relations respectively corresponding to at least one key character appearing in the scenario of the first k occasions can be further acquired, other character characters with fewer times of exiting are abandoned, the scenario extraction model is convenient to comb scenario texts according to the character relations corresponding to the key characters, and scenario extraction is carried out on the scenario.
In some embodiments, the process of obtaining the sample character relationships in the second training sample includes at least one sub-step of steps 414-416 (not shown).
Step 414, at least one key character appearing in the scenario of the first k occasions is acquired, wherein the key character is a character having a pushing effect on the scenario in the scenario of the first k occasions.
Referring to the above embodiment, according to the above steps 411 to 413, at least one key character appearing in the scenario of the first k fields is obtained, and no description is given here.
And 415, obtaining at least one personal relationship corresponding to the at least one key person appearing in the scenario of the first k occasions according to the scenario of the first k occasions and the at least one key person appearing in the scenario of the first k occasions through the large language model, wherein each personal relationship is used for indicating the relationship of the first character role relative to the first key person, and the proportion of the first character role in the scenario of the first k occasions is smaller than that of the first key person in the scenario of the first k occasions.
The large language model may be any publicly available large language model, such as a natural language model based on a transducer structure obtained by training a large amount of data, for example, a sample level of hundreds of millions or more, which is not limited in this application. The large language model may be used to extract the character relationships corresponding to the key characters. The input data of the large language model are the scenario of the first k occasions and at least one key person appearing in the scenario of the first k occasions, and the output data are at least one personal relationship respectively corresponding to at least one key person appearing in the scenario of the first k occasions.
The character relationships corresponding to the kth scene scenario include character relationships corresponding to at least one key character appearing in the first k scene scenarios, respectively, and the character relationships corresponding to the first key character appearing in the first k scene scenarios include relationships of each first character role in the first k scene scenarios relative to the first key character. Each persona relationship corresponding to a first key persona is used to indicate a relationship of each first persona to the first key persona. The first key character refers to any key character appearing in the scenario of the first k occasions, the first character is a character appearing in the scenario of the first k occasions, and the proportion of the first character in the scenario of the first k occasions is smaller than that of the first key character in the scenario of the first k occasions. The play proportion of the key character in the scenario of the first k plays refers to the number of plays of the key character in the scenario of the first k plays, as compared to the proportion of the total number of plays of each character of the scenario of the first k plays. That is, it means that in the scene scenario of the first k scenes, the number of times of the first character's departure is smaller than the number of times of the first key character's departure. For example, if the total number of times of appearance of each character of the first k-number-of-scenes is 100, the number of times of appearance of the first character in the first k-number-of-scenes is 9, and the number of times of appearance of the first key character in the first k-number-of-scenes is 10, the proportion of the first character in the first k-number-of-scenes is 9% and is less than the proportion of the first key character in the first k-number-of-scenes by 10%.
The relationship of the first persona to the first key persona, the spoken language may be expressed as who the first persona is the first key persona, the relationship of the first persona to the first key persona includes grandfather, grandmother, father, mother, brother, sister, son, daughter, grandson, husband, wife, grandmother, son, teacher, classmates, colleagues, supergrade, customer, master, subordinate, partner, student, tenant, landlord, neighbor, men, girlfriend, honey, friend, enemy, adversary, and the like.
Illustratively, the relationship between persona a and persona b is obtained through a large language model, and the question sentence can be: "answer the relationship between a and b according to the following scenario, wherein the relationship includes men's friends, women's friends, son, daughter, father, mother, colleague, and conjecture, answer only the relationship with confidence, answer the conjecture when the relationship is ambiguous. The scenario is as follows: xxx. "if character b is a key character in the scenario of the previous plurality of occasions and the proportion of the characters in the scenario of the previous plurality of occasions is smaller than the proportion of the characters in the scenario of the previous plurality of occasions, the large language model will answer the relationship of character a to character b, for example, the relationship of character a to character b may be mother. If character a is a key character in the scenario of the previous plurality of occasions and the proportion of characters in the scenario of the previous plurality of occasions is less than the proportion of characters in the scenario of the previous plurality of occasions, the large language model will answer the relationship of character b to character a, for example, the relationship of key character b to key character a may be a daughter.
Illustratively, if the characters in the scenario of the first k occasions include a character a, a character b, a character c and a character d, wherein the characters are sequentially arranged from small to large according to the proportion of the characters, the characters b, the characters c and the characters d are the key characters in the scenario of the first k occasions, namely the characters c and the characters d, the characters corresponding to the kth scenario include the characters corresponding to the characters c and the characters corresponding to the characters d. The character relationship corresponding to the character c comprises a relationship of the character a relative to the character c and a relationship of the character b relative to the character c. The persona relationships corresponding to persona d include the relationship of persona a to persona d, the relationship of persona b to persona d, and the relationship of persona c to persona d.
Step 416, determining at least one person relationship corresponding to at least one key person appearing in the scenario of the first k occasions as a sample person relationship.
The sample character relation comprises at least one character relation corresponding to at least one key character appearing in the scene scenario of the first k scenes respectively.
The accuracy of the sample character relation can be improved by acquiring the sample character relation through the large language model, so that the accuracy of scenario extraction can be improved by taking the sample character relation as supervision information of the character extraction model.
In some embodiments, the sample person relationships may also be obtained by way of manual generalization.
And step 420, obtaining predicted character relations corresponding to the scenario of the previous k occasions according to the scenario of the previous k occasions and key characters appearing in the scenario of the previous k occasions by adopting a character extraction model, wherein the predicted character relations are used for indicating character relations respectively corresponding to at least one key character appearing in the scenario of the previous k occasions.
The predicted character relation is output data of a character extraction model and is used for indicating character relations respectively corresponding to at least one key character appearing in the scene scenario of the first k scenes, and the predicted character relation comprises at least one character relation respectively corresponding to at least one key character appearing in the scene scenario of the first k scenes predicted by the model.
And 430, adjusting parameters of the character extraction model according to the difference between the predicted character relationship and the sample character relationship to obtain the trained character extraction model.
Because the number of words of the predicted character relationship and the sample character relationship is small, and the description of the character relationship is simple, the second loss function value can be calculated directly according to the difference between the predicted character relationship and the sample character relationship, and then the parameters of the character extraction model are adjusted according to the second loss function value, so that the trained character extraction model is obtained.
For calculating the second loss function value, a cross entropy loss function may be used, or other loss functions capable of expressing the meaning of loss may be used, such as a mean square error loss function, a log likelihood loss function, an exponential loss function, and the like, which is not limited in this application.
The character relation corresponding to the key character is extracted through the additional training character extraction model, so that the situation that the character relation is directly extracted by adopting a large language model to cause script leakage is avoided.
In some embodiments, the character relationship for the ith scene scenario is obtained using a trained character extraction model. The process of acquiring the character relationship corresponding to the ith scene scenario in the first training sample includes at least one sub-step of steps 2101 to 2103 (not shown).
And 2101, adopting a trained character extraction model, and obtaining character relations respectively corresponding to at least one key character appearing in the first j character scripts according to the character scripts of the first j character scripts and the key characters appearing in the first j character scripts in the sample total script, wherein j is a positive integer.
The character extraction model after training is used for extracting the character relations respectively corresponding to at least one key character appearing in the scene scenario, and the training process of the character extraction model can refer to the embodiment. The input data of the character extraction model comprises the scene scenario of the first j scenes in the sample total scenario and key characters appearing in the scene scenario of the first j scenes, and the output data is character relations respectively corresponding to at least one key character appearing in the scene scenario of the first j scenes.
The key characters appearing in the scenario of the first j occasions refer to key characters appearing in all the scenarios from the 1 st to the j th occasions of the total scenario of the sample, that is, the key characters appearing in the scenario after the j th occasion are not included in the key characters appearing in the scenario of the first j occasions.
Step 2102, constructing a character relation table according to character relations respectively corresponding to at least one key character appearing in the scene scenario of the previous j scenes, wherein each character relation in the character relation table corresponds to one scene scenario.
Each character relation in the character relation table represents a character relation respectively corresponding to the corresponding character scenario and at least one key character appearing in the previous character scenario.
The character relation corresponding to the 1 st scenario in the character relation table is a character relation corresponding to at least one key character appearing in the 1 st scenario, the character relation corresponding to the 2 nd scenario is a character relation corresponding to at least one key character appearing in the scenario of the first two scenarios, the character relation corresponding to the 3 rd scenario is a character relation corresponding to at least one key character appearing in the scenario of the first 3 scenarios, and the character relation corresponding to the j th scenario is a character relation corresponding to at least one key character appearing in the scenario of the first j scenarios.
And 2103, acquiring the character relation corresponding to the ith scene play in the character relation table according to the ith scene play.
And according to the ith scene play, acquiring the character relation corresponding to the ith scene play in the character relation table, namely, the character relation respectively corresponding to at least one key character appearing in the scene play of the previous i scenes.
By constructing the character relation table for the sample total script, the character relation corresponding to each scene script in the sample total script can be directly presented in the character relation table, so that when the script extraction model is used, the corresponding item in the character relation table is called, and the script extraction efficiency is improved. And the character relation corresponding to each scene scenario is acquired through the character extraction model, so that the accuracy of character relation extraction can be improved, and the accuracy of scenario extraction is improved.
In some embodiments, the person relationship corresponding to the ith scene scenario may also be obtained by manual induction.
In some embodiments, the process of obtaining the main character in the sample total scenario in the first training sample includes at least one sub-step of steps 2104-2107 (not shown).
Step 2104, obtaining at least one key person in the sample total scenario and number of times of the at least one key person in the sample total scenario is respectively in the total scenario.
The process of obtaining at least one key person in the sample total scenario may refer to steps 411 to 413, and includes the following steps: acquiring at least one persona in the sample total scenario and the number of times of the at least one persona in the sample total scenario; sequencing at least one character in the total script according to the sequence of the times of the field from big to small to obtain a sequencing sequence corresponding to the at least one character in the total script; a second number of personas in the ordered sequence that are top ranked are determined to be at least one key persona in the sample total script.
The values corresponding to the second number and the values corresponding to the first number may be the same or different, and the present application is not limited thereto. The value corresponding to the first quantity may relate to a position of the kth scene cut in the sample total cut, e.g., a ratio of the first quantity to the second quantity may be equal to a ratio of the kth scene cut to the total scenes in the sample total cut. Illustratively, if the total scenario of samples has 100 scenario scenarios, the second number is 10, and the key characters appearing in the scenario of the first 50 scenario scenarios need to be acquired, the first number may be set to 5.
And 2105, obtaining the proportion of the play corresponding to the at least one key character in the sample total script according to the number of the plays of the at least one key character in the sample total script and the total number of the plays of each character in the sample total script, wherein the proportion of the play refers to the number of the plays of the key character in the sample total script and is relative to the proportion of the total number of the plays of each character in the sample total script.
Illustratively, if the total number of plays of each character in the sample total scenario is 200 times and the number of plays of the key character a in the sample total scenario is 40 times, the proportion of plays corresponding to the key character a is 20%.
Step 2106, obtaining a maximum value in the score proportions respectively corresponding to at least one key character in the sample total scenario.
At step 2107, determining at least one key character in the sample total scenario as a key character having a score ratio greater than a first value, the first value being the product of the maximum value and the first duty ratio.
And ordering at least one key character in the total script of the sample according to the order of the proportion of the dramas from large to small to obtain an ordering sequence corresponding to the at least one key character in the total script of the sample, and determining the key character which is ranked at the front in the ordering sequence and has the proportion of the dramas larger than a first value as the main character in the total script of the sample. The first value is a product of a first duty ratio and a maximum value in the proportions of the parts corresponding to at least one key character in the sample total script, and the value of the first duty ratio is not limited in the application.
Illustratively, if the maximum value of the score ratios respectively corresponding to at least one key character in the sample total scenario is 50% and the first ratio is 50%, the key character having the score ratio greater than 25% is determined as the main character in the sample total scenario.
The main characters in the sample total scenario are used as input data of the scenario extraction model, so that the extraction of related scenarios of the main characters is enhanced, and the scenario extraction model ignores scenario description of the main characters due to the fact that the number of times of the main characters in a certain scenario is too small, thereby avoiding inaccurate scenario abstract of the generated scenario.
In some embodiments, the process of obtaining the sample session digest in the first training sample includes at least one sub-step of steps 2108-2110 (not shown).
Step 2108, obtaining the character relationship corresponding to the ith scene scenario and the main characters in the sample total scenario.
Referring to the above embodiment, according to the steps 2101 to 2103, the character relationship corresponding to the ith scene scenario is obtained, and according to the steps 2104 to 2107, the main characters in the sample total scenario are obtained, and the details are not repeated here.
And 2109, obtaining the scene abstract corresponding to the ith scene play according to the ith scene play, the character relation corresponding to the ith scene play and the main characters in the sample total scene through the large language model.
The large language model may also be used to extract the session summaries corresponding to each session scenario. The input data of the large language model are the ith scene play, the character relation corresponding to the ith scene play and the main characters in the sample total play, and the output data are the scene abstracts corresponding to the ith scene play.
Illustratively, the method includes the steps of obtaining a scene abstract corresponding to the ith scene scenario through a large language model, wherein the question sentence pattern can be: "the following is a scenario of a specific scenario, where B is a xx, C is B xx, and the main character is A, B, please extract a scenario abstract of the scenario, and the scenario is xxx. "wherein, the scene scenario of the first i scenes includes three key characters, namely key character A, B, C, and the proportion of the key character A, B, C in the scene scenario of the first i scenes is from as few as key character C, key character B, key character a in order. The session digest corresponding to the ith session scenario acquired by the large language model may be referred to as session digest 0.
Step 2110, determining the corrected scenario digest corresponding to the ith scenario as the sample scenario digest, where the corrected scenario digest corresponding to the ith scenario is a scenario digest obtained by manually correcting the scenario digest corresponding to the ith scenario.
Because the scenario 0 acquired by the large language model may have a detail error or a person dislocation, the scenario 0 may be manually corrected, and a corrected scenario abstract corresponding to the ith scenario may be referred to as scenario 1. And determining the scene scenario 1 as a sample scene abstract.
The accuracy of the sample scene abstract can be improved by acquiring the sample scene abstract through the large language model, and the scene abstract is manually corrected after the scene abstract is acquired through the large language model, so that the accuracy of the sample scene abstract is further improved, and the sample scene abstract is used as the supervision information of the scenario extraction model, and the accuracy of scenario extraction can be improved.
Fig. 5 shows a scenario extraction flow of scenario extraction models, in which training of character extraction models and scenario extraction models is involved. For training the character extraction model, firstly, questioning character relations in the ith scene by adopting a large language model according to the ith scene to obtain character relations corresponding to the ith scene, training the character extraction model by taking the character relations as sample character relations, and adjusting parameters of the character extraction model according to a first loss function value (loss 1) to obtain the trained character extraction model.
For training of a scenario extraction model, firstly, input data of the model, including an ith scenario, character relations corresponding to the ith scenario and main characters in a sample total scenario, are acquired, scenario summaries of the ith scenario are extracted by adopting a large language model, scenario summaries 0 corresponding to the ith scenario are obtained, and the scenario summaries 1 are obtained after manual correction is carried out on the scenario summaries 0. And taking the scene abstract 1 as a sample scene abstract of the scenario extraction model, training the scenario extraction model, and adjusting parameters of the scenario extraction model according to a second loss function value (loss 2) to obtain a trained scenario extraction model.
For example, the main structure of the scenario extraction model may be as shown in the following table 1:
TABLE 1
The main structure of the Decoder Layer can be referred to as the following table 2:
TABLE 2
Referring to fig. 6, a flowchart of a scenario extraction method based on a scenario extraction model according to an embodiment of the present application is shown. The subject of execution of the steps of the method may be a computer device, such as the model-using device described above. The method may include at least one of the following steps 610-630:
Step 610, obtaining an ith scenario in the total scenario of the scenario to be extracted, where the ith scenario refers to scenario text of the ith scenario in the total scenario, and i is a positive integer.
Step 620, obtaining main characters in the total scenario according to the total scenario, and obtaining character relations corresponding to the ith scenario according to the scenario of the first i occasions in the total scenario, wherein the character relations corresponding to the ith scenario comprise character relations respectively corresponding to at least one key character appearing in the scenario of the first i occasions in the total scenario.
In some embodiments, the process of acquiring the main character in the overall scenario described above includes at least one sub-step of steps 6201-6207 (not shown).
Step 6201, obtaining at least one character role in the total scenario and the number of times of the at least one character role in the total scenario being respectively in the total scenario.
And step 6202, sorting at least one object character in the total scenario according to the sequence of the number of times of the field from large to small, and obtaining a sorting sequence corresponding to the at least one object character in the total scenario.
Step 6203, determining a first number of personas in the ordered sequence that are top ranked as at least one key persona in the overall scenario.
Step 6204, obtaining at least one key person in the total scenario and the number of times of the at least one key person in the total scenario.
And step 6205, obtaining a play proportion corresponding to at least one key character in the total script according to the number of the plays of the key character in the total script and the total number of the plays of each character in the total script, wherein the play proportion refers to the number of the plays of the key character in the total script and is relative to the total number of the plays of each character in the total script.
And 6206, obtaining the maximum value in the proportion of the play corresponding to at least one key character in the total scenario.
And 6207, determining the key characters with the score proportion larger than a first value in at least one key character in the total scenario as main characters in the total scenario, wherein the first value is the product of the maximum value and the first duty ratio.
In some embodiments, the process of obtaining the character relationship corresponding to the ith scene scenario includes at least one sub-step of steps 6208-6210 (not shown).
And step 6208, adopting the trained character extraction model to obtain character relations respectively corresponding to at least one key character appearing in the first j character scripts according to the character scripts of the first j character scripts and the key characters appearing in the first j character scripts in the total script, wherein j is a positive integer.
And step 6209, constructing a character relation table according to character relations respectively corresponding to at least one key character appearing in the scene scenario of the previous j scenes, wherein each character relation in the character relation table corresponds to one scene scenario.
Step 6210, according to the ith scene scenario, acquiring the character relation corresponding to the ith scene scenario in the character relation table.
Step 630, obtaining the scenario abstract corresponding to the ith scenario according to the ith scenario, the character relation corresponding to the ith scenario and the main characters in the total scenario through a scenario extraction model, wherein the scenario extraction model is a machine learning model for extracting the scenario abstract.
The relevant content in step 620 and step 630 may be described with reference to the above embodiments, and will not be described herein.
According to the technical scheme provided by the embodiment of the application, the scenario extraction model is adopted to extract each scenario in the total scenario, so that the scenario abstract corresponding to each scenario is obtained, and a user can quickly understand the scenario content of the total scenario. For example, in the planning stage of a movie, a television play or other media items, a scenario extraction model can help a planner to quickly understand scenario contents of a large number of scenarios, so that each scenario can be effectively screened and decided, for example, which scenario important shooting is selected and which scenario merging shooting is selected according to a scenario abstract corresponding to each scenario. For another example, in a movie or television drama recommendation system, a scenario summary of each scenario may be generated through a scenario extraction model, so as to help a user quickly understand the scenario of each scenario and make a viewing decision.
The scenario extraction model training method and the scenario extraction method based on the scenario extraction model provided by the embodiment of the application are model training processes and using processes which correspond to each other. For details not described in detail on one side, reference is made to the description on the other side.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
Referring to fig. 7, a block diagram of a scenario extraction model training apparatus according to an embodiment of the present application is shown. The device has the function of realizing the training method of the scenario extraction model. As shown in fig. 7, the apparatus 700 may include: a data acquisition module 710, a model prediction module 720, and a model training module 730.
The data obtaining module 710 is configured to obtain a first training data set for training the scenario extraction model, where the first training data set includes at least one first training sample, each first training sample includes an i-th scenario, a character relationship corresponding to the i-th scenario, a main character in a total scenario of samples, and a sample scenario abstract corresponding to the i-th scenario, where the i-th scenario refers to a scenario text of the i-th scenario in the total scenario of samples, the character relationship corresponding to the i-th scenario includes character relationships corresponding to at least one key character appearing in a scenario of a previous i-th scenario in the total scenario of samples, and the sample scenario abstract is used to indicate a scenario abstract of the i-th scenario, where i is a positive integer.
The model prediction module 720 is configured to obtain a predicted scenario digest corresponding to the ith scenario according to the ith scenario, the character relationship corresponding to the ith scenario, and the main characters in the sample total scenario by using the scenario extraction model, where the predicted scenario digest is used to indicate a scenario digest of the ith scenario.
And the model training module 730 is configured to adjust parameters of the scenario extraction model according to the difference between the predicted scenario abstract and the sample scenario abstract, so as to obtain a trained scenario extraction model.
In some embodiments, the character relationship corresponding to the ith scene scenario is obtained by using a trained character extraction model, and the data obtaining module 710 is configured to:
adopting the trained character extraction model, and obtaining character relations respectively corresponding to at least one key character appearing in the scene scenario of the first j scenes according to the scene scenario of the first j scenes in the sample total scenario and the key characters appearing in the scene scenario of the first j scenes, wherein j is a positive integer;
according to character relations respectively corresponding to at least one key character appearing in the scene scenario of the previous j scenes, constructing a character relation table, wherein each character relation in the character relation table corresponds to one scene scenario;
And acquiring the character relation corresponding to the ith scene scenario in the character relation table according to the ith scene scenario.
In some embodiments, the apparatus further comprises a second training module for:
acquiring a second training data set for training the character extraction model, wherein the second training data set comprises at least one second training sample, each second training sample comprises a scene script of the first k scenes in the total scene of the sample, key characters appearing in the scene script of the first k scenes and sample character relations corresponding to the scene script of the first k scenes, the sample character relations are used for indicating character relations respectively corresponding to at least one key character appearing in the scene script of the first k scenes, and k is a positive integer;
obtaining predicted character relations corresponding to the scene scripts of the first k scenes according to the scene scripts of the first k scenes and key characters appearing in the scene scripts of the first k scenes by adopting the character extraction model, wherein the predicted character relations are used for indicating character relations respectively corresponding to at least one key character appearing in the scene scripts of the first k scenes;
And adjusting parameters of the character extraction model according to the difference between the predicted character relation and the sample character relation to obtain the trained character extraction model.
In some embodiments, the second training module is configured to:
acquiring at least one key person appearing in the scenario of the first k occasions, wherein the key person is a person character with pushing effect on the scenario in the scenario of the first k occasions;
obtaining at least one person relationship respectively corresponding to at least one key person appearing in the scenario of the first k occasions according to the scenario of the first k occasions and at least one key person appearing in the scenario of the first k occasions through a large language model, wherein each person relationship is used for indicating the relationship of a first person character relative to a first key person, and the proportion of the first person character in the scenario of the first k occasions is smaller than that of the first key person in the scenario of the first k occasions;
and determining at least one personal relationship corresponding to at least one key person appearing in the scene scenario of the first k scenes as the sample person relationship.
In some embodiments, the second training module is configured to:
acquiring at least one persona appearing in the scenario of the first k occasions and the number of times of field departure of at least one persona appearing in the scenario of the first k occasions;
sequencing at least one persona character appearing in the scene scenario of the first k scenes according to the sequence of the departure times from large to small to obtain a sequencing sequence corresponding to the at least one persona character appearing in the scene scenario of the first k scenes;
and determining a first number of characters in the ordered sequence, which are ranked first, as at least one key character appearing in the scenario of the first k occasions.
In some embodiments, the data acquisition module 710 is configured to:
acquiring at least one key person in the sample total scenario and the number of times of the at least one key person in the sample total scenario;
obtaining a play proportion corresponding to at least one key character in the sample total scenario according to the number of times of the at least one key character in the sample total scenario and the total number of times of the each character in the sample total scenario, wherein the play proportion refers to the number of times of the key character in the sample total scenario, and is relative to the total number of times of the each character in the sample total scenario;
Obtaining the maximum value in the proportion of the drama corresponding to at least one key character in the sample total script;
and determining a key character with the play proportion larger than a first value in at least one key character in the sample total script as a main character in the sample total script, wherein the first value is the product of the maximum value and a first duty ratio.
In some embodiments, the data acquisition module 710 is configured to:
acquiring a character relationship corresponding to the ith scene scenario and main characters in the sample total scenario;
obtaining a scene abstract corresponding to the ith scene play according to the ith scene play, the character relation corresponding to the ith scene play and the main characters in the sample total play through a large language model;
and determining the corrected session abstract corresponding to the ith session scenario as the sample session abstract, wherein the corrected session abstract corresponding to the ith session scenario is a scenario abstract obtained by manually correcting the session abstract corresponding to the ith session scenario.
In some embodiments, the model training module 730 is configured to:
marking each vocabulary in the sample scene abstract by using a first probability to obtain marked vocabularies in the sample scene abstract;
Replacing each vocabulary in the sample scene abstract with a second probability to obtain a replaced vocabulary in the sample scene abstract, wherein the sum of the first probability and the second probability is smaller than 1;
setting the marked vocabulary and the replaced vocabulary as vocabulary to be predicted;
and adjusting parameters of the scenario extraction model according to the difference between the vocabulary at the position of the vocabulary to be predicted and the vocabulary to be predicted in the prediction scene abstract and the vocabulary to be predicted, so as to obtain the trained scenario extraction model.
According to the technical scheme provided by the embodiment of the application, the character relation corresponding to the ith scene play and the main characters in the sample total scene are used as input data of the scene extraction model, so that the scene extraction model considers the character relation corresponding to at least one key character appearing in the scene play of the first i scenes in the sample total scene when the ith scene play is extracted, and the scene extraction model is prevented from only considering the current scene play and the character relation in the current scene play, thereby avoiding the generation of the split between the scene summaries of each scene. And the main characters in the total script of the sample are considered, and the script extraction model can enhance the script extraction of the main characters by constructing a script extraction bottom foundation, and the accuracy of each generated script abstract is improved by generating the script abstract of the contact above based on the bottom foundation.
In addition, as the scenario extraction model is a model obtained by additional training, compared with the model used in the related technology, the scenario extraction model has higher safety, prevents scenario leakage, and has better stability of the vertical domain model focusing on specific tasks.
In addition, the scenario extraction model supports each scenario in the input sample total scenario, reduces scenario extraction cost, improves scenario extraction efficiency and is beneficial to long-term use compared with the model of the input sample total scenario.
Referring to fig. 8, a block diagram of a scenario extraction apparatus based on scenario extraction model according to an embodiment of the present application is shown. The device has the function of realizing the scenario extraction method based on the scenario extraction model. As shown in fig. 8, the apparatus 800 may include: a scenario acquisition module 810, a character acquisition module 820, and a summary extraction module 830.
The scenario acquisition module 810 is configured to acquire an ith scenario in a total scenario of scenarios to be extracted, where the ith scenario refers to scenario text of the ith scenario in the total scenario, and i is a positive integer.
And the character acquisition module 820 is configured to acquire main characters in the total scenario according to the total scenario, and acquire character relations corresponding to the ith scenario according to the scenario of the first i occasions in the total scenario, where the character relations corresponding to the ith scenario include character relations respectively corresponding to at least one key character appearing in the scenario of the first i occasions in the total scenario.
The summary extraction module 830 is configured to obtain, according to the scenario extraction model, the scenario summary corresponding to the ith scenario, the character relationship corresponding to the ith scenario, and the main characters in the total scenario, where the scenario extraction model is a machine learning model for extracting scenario summaries.
In some embodiments, the persona acquisition module 820 is configured to:
acquiring at least one key person in the total scenario and the number of times of the at least one key person in the total scenario;
obtaining a play proportion corresponding to at least one key character in the total scenario according to the number of the plays of the key character in the total scenario and the total number of the plays of each character in the total scenario, wherein the play proportion refers to the number of the plays of the key character in the total scenario and is relative to the total number of the plays of each character in the total scenario;
obtaining the maximum value in the proportion of the play corresponding to at least one key character in the total scenario;
and determining a key character with the score proportion larger than a first value as a main character in the total script, wherein the first value is the product of the maximum value and a first duty ratio.
In some embodiments, the persona acquisition module 820 is configured to:
acquiring at least one persona in the total scenario and the number of times of the at least one persona in the total scenario;
sequencing at least one character in the total script according to the sequence of the departure times from big to small to obtain a sequencing sequence corresponding to the at least one character in the total script;
and determining a first number of personas in the ordered sequence, which are top ranking, as at least one key persona in the overall scenario.
In some embodiments, the persona acquisition module 820 is configured to:
the trained character extraction model is adopted, character relations respectively corresponding to at least one key character appearing in the first j field dramas are obtained according to the first j field dramas in the total dramas and key characters appearing in the first j field dramas, and j is a positive integer;
according to character relations respectively corresponding to at least one key character appearing in the scene scenario of the previous j scenes, constructing a character relation table, wherein each character relation in the character relation table corresponds to one scene scenario;
And acquiring the character relation corresponding to the ith scene scenario in the character relation table according to the ith scene scenario.
It should be noted that, in the apparatus provided in the foregoing embodiment, when implementing the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be implemented by different functional modules, that is, the content structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
Referring to FIG. 9, a block diagram of a computer device 900 according to one embodiment of the present application is shown. The computer device 900 may be the model training device 10 of fig. 1 or the model using device 20. The computer apparatus 900 may be used to implement the scenario extraction model training method provided in the above embodiments, or the scenario extraction method based on the scenario extraction model.
In general, the computer device 900 includes: a processor 901 and a memory 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 901 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 901 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 901 may also include an AI processor for processing computing operations related to machine learning.
The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer-readable storage medium in memory 902 is used to store a computer program configured to be executed by one or more processors to implement the above-described scenario extraction model training method, or scenario extraction method based on a scenario extraction model.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is not limiting of the computer device 900, and may include more or fewer components than shown, or may combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, a computer readable storage medium is also provided, in which a computer program is stored, which, when being executed by a processor of a computer device, implements the above-mentioned scenario extraction model training method, or a scenario extraction method based on a scenario extraction model. Alternatively, the above-mentioned computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory ), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, or the like.
In an exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program so that the computer device performs the training method of the scenario extraction model described above, or the scenario extraction method based on the scenario extraction model.
It should be noted that, before and during the process of collecting the relevant data of the user, the present application may display a prompt interface, a popup window or output voice prompt information, where the prompt interface, popup window or voice prompt information is used to prompt the user to collect the relevant data currently, so that the present application only starts to execute the relevant step of obtaining the relevant data of the user after obtaining the confirmation operation of the user to the prompt interface or popup window, otherwise (i.e. when the confirmation operation of the user to the prompt interface or popup window is not obtained), the relevant step of obtaining the relevant data of the user is finished, i.e. the relevant data of the user is not obtained. In other words, all user data collected in the application are processed strictly according to the requirements of relevant national laws and regulations, informed consent or independent consent of the personal information body is collected under the condition that the user agrees and authorizes, and in the scope of laws and regulations and authorization of the personal information body, subsequent data use and processing actions are carried out, and the collection, use and processing of relevant user data need to comply with relevant laws and regulations and standards of relevant countries and regions.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. In addition, the step numbers described herein are merely exemplary of one possible execution sequence among steps, and in some other embodiments, the steps may be executed out of the order of numbers, such as two differently numbered steps being executed simultaneously, or two differently numbered steps being executed in an order opposite to that shown, which is not limited by the embodiments of the present application.
The foregoing description of the exemplary embodiments of the present application is not intended to limit the invention to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, alternatives, and alternatives falling within the spirit and scope of the invention.

Claims (17)

1. A method for training a scenario extraction model, the method comprising:
acquiring a first training data set for training the scenario extraction model, wherein the first training data set comprises at least one first training sample, each first training sample comprises an ith scenario, character relations corresponding to the ith scenario, main characters in a sample total scenario and sample scenario abstracts corresponding to the ith scenario, the ith scenario is a scenario text of the ith scenario in the sample total scenario, the character relations corresponding to the ith scenario comprises character relations respectively corresponding to at least one key character appearing in the scenario of the first i scenario in the sample total scenario, and the sample scenario abstracts are used for indicating the scenario abstracts of the ith scenario, i is a positive integer;
Obtaining a predicted scenario abstract corresponding to the ith scenario according to the ith scenario, the character relation corresponding to the ith scenario and the main characters in the sample total scenario by adopting the scenario extraction model, wherein the predicted scenario abstract is used for indicating the scenario abstract of the ith scenario;
and adjusting parameters of the scenario extraction model according to the difference between the predicted scenario abstract and the sample scenario abstract to obtain a trained scenario extraction model.
2. The method of claim 1, wherein the character relationship for the i-th scene scenario is obtained using a trained character extraction model, the method further comprising:
adopting the trained character extraction model, and obtaining character relations respectively corresponding to at least one key character appearing in the scene scenario of the first j scenes according to the scene scenario of the first j scenes in the sample total scenario and the key characters appearing in the scene scenario of the first j scenes, wherein j is a positive integer;
according to character relations respectively corresponding to at least one key character appearing in the scene scenario of the previous j scenes, constructing a character relation table, wherein each character relation in the character relation table corresponds to one scene scenario;
And acquiring the character relation corresponding to the ith scene scenario in the character relation table according to the ith scene scenario.
3. The method according to claim 2, wherein the method further comprises:
acquiring a second training data set for training the character extraction model, wherein the second training data set comprises at least one second training sample, each second training sample comprises a scene script of the first k scenes in the total scene of the sample, key characters appearing in the scene script of the first k scenes and sample character relations corresponding to the scene script of the first k scenes, the sample character relations are used for indicating character relations respectively corresponding to at least one key character appearing in the scene script of the first k scenes, and k is a positive integer;
obtaining predicted character relations corresponding to the scene scripts of the first k scenes according to the scene scripts of the first k scenes and key characters appearing in the scene scripts of the first k scenes by adopting the character extraction model, wherein the predicted character relations are used for indicating character relations respectively corresponding to at least one key character appearing in the scene scripts of the first k scenes;
And adjusting parameters of the character extraction model according to the difference between the predicted character relation and the sample character relation to obtain the trained character extraction model.
4. A method according to claim 3, characterized in that the method further comprises:
acquiring at least one key person appearing in the scenario of the first k occasions, wherein the key person is a person character with pushing effect on the scenario in the scenario of the first k occasions;
obtaining at least one person relationship respectively corresponding to at least one key person appearing in the scenario of the first k occasions according to the scenario of the first k occasions and at least one key person appearing in the scenario of the first k occasions through a large language model, wherein each person relationship is used for indicating the relationship of a first person character relative to a first key person, and the proportion of the first person character in the scenario of the first k occasions is smaller than that of the first key person in the scenario of the first k occasions;
and determining at least one personal relationship corresponding to at least one key person appearing in the scene scenario of the first k scenes as the sample person relationship.
5. The method of claim 4, wherein the obtaining at least one key persona appearing in the scene scenario of the first k plays comprises:
acquiring at least one persona appearing in the scenario of the first k occasions and the number of times of field departure of at least one persona appearing in the scenario of the first k occasions;
sequencing at least one persona character appearing in the scene scenario of the first k scenes according to the sequence of the departure times from large to small to obtain a sequencing sequence corresponding to the at least one persona character appearing in the scene scenario of the first k scenes;
and determining a first number of characters in the ordered sequence, which are ranked first, as at least one key character appearing in the scenario of the first k occasions.
6. The method according to claim 1, wherein the method further comprises:
acquiring at least one key person in the sample total scenario and the number of times of the at least one key person in the sample total scenario;
obtaining a play proportion corresponding to at least one key character in the sample total scenario according to the number of times of the at least one key character in the sample total scenario and the total number of times of the each character in the sample total scenario, wherein the play proportion refers to the number of times of the key character in the sample total scenario, and is relative to the total number of times of the each character in the sample total scenario;
Obtaining the maximum value in the proportion of the drama corresponding to at least one key character in the sample total script;
and determining a key character with the play proportion larger than a first value in at least one key character in the sample total script as a main character in the sample total script, wherein the first value is the product of the maximum value and a first duty ratio.
7. The method according to claim 1, wherein the method further comprises:
acquiring a character relationship corresponding to the ith scene scenario and main characters in the sample total scenario;
obtaining a scene abstract corresponding to the ith scene play according to the ith scene play, the character relation corresponding to the ith scene play and the main characters in the sample total play through a large language model;
and determining the corrected session abstract corresponding to the ith session scenario as the sample session abstract, wherein the corrected session abstract corresponding to the ith session scenario is a scenario abstract obtained by manually correcting the session abstract corresponding to the ith session scenario.
8. The method according to claim 1, wherein the adjusting parameters of the scenario extraction model according to the difference between the predicted scenario digest and the sample scenario digest to obtain a trained scenario extraction model comprises:
Marking each vocabulary in the sample scene abstract by using a first probability to obtain marked vocabularies in the sample scene abstract;
replacing each vocabulary in the sample scene abstract with a second probability to obtain a replaced vocabulary in the sample scene abstract, wherein the sum of the first probability and the second probability is smaller than 1;
setting the marked vocabulary and the replaced vocabulary as vocabulary to be predicted;
and adjusting parameters of the scenario extraction model according to the difference between the vocabulary at the position of the vocabulary to be predicted and the vocabulary to be predicted in the prediction scene abstract and the vocabulary to be predicted, so as to obtain the trained scenario extraction model.
9. A scenario extraction method based on a scenario extraction model, wherein the scenario extraction model is a machine learning model for extracting a scenario abstract, the method comprising:
acquiring an ith scenario in a total scenario of scenarios to be extracted, wherein the ith scenario refers to scenario text of the ith scenario in the total scenario, and i is a positive integer;
according to the total scenario, main characters in the total scenario are obtained, and according to the scenario of the first i occasions in the total scenario, character relations corresponding to the ith scenario are obtained, wherein the character relations corresponding to the ith scenario comprise character relations respectively corresponding to at least one key character appearing in the scenario of the first i occasions in the total scenario;
And obtaining a scene abstract corresponding to the ith scene script according to the ith scene script, the character relation corresponding to the ith scene script and the main characters in the total script through the script extraction model.
10. The method of claim 9, wherein the obtaining the main character in the overall scenario from the overall scenario comprises:
acquiring at least one key person in the total scenario and the number of times of the at least one key person in the total scenario;
obtaining a play proportion corresponding to at least one key character in the total scenario according to the number of the plays of the key character in the total scenario and the total number of the plays of each character in the total scenario, wherein the play proportion refers to the number of the plays of the key character in the total scenario and is relative to the total number of the plays of each character in the total scenario;
obtaining the maximum value in the proportion of the play corresponding to at least one key character in the total scenario;
and determining a key character with the score proportion larger than a first value as a main character in the total script, wherein the first value is the product of the maximum value and a first duty ratio.
11. The method of claim 10, wherein the obtaining at least one key character in the overall scenario comprises:
acquiring at least one persona in the total scenario and the number of times of the at least one persona in the total scenario;
sequencing at least one character in the total script according to the sequence of the departure times from big to small to obtain a sequencing sequence corresponding to the at least one character in the total script;
and determining a first number of personas in the ordered sequence, which are top ranking, as at least one key persona in the overall scenario.
12. The method of claim 9, wherein the obtaining the character relationship corresponding to the i-th scenario according to the scenario of the first i-th scenario in the total scenario comprises:
the trained character extraction model is adopted, character relations respectively corresponding to at least one key character appearing in the first j field dramas are obtained according to the first j field dramas in the total dramas and key characters appearing in the first j field dramas, and j is a positive integer;
According to character relations respectively corresponding to at least one key character appearing in the scene scenario of the previous j scenes, constructing a character relation table, wherein each character relation in the character relation table corresponds to one scene scenario;
and acquiring the character relation corresponding to the ith scene scenario in the character relation table according to the ith scene scenario.
13. A scenario extraction model training apparatus, the apparatus comprising:
the data acquisition module is used for acquiring a first training data set for training the scenario extraction model, the first training data set comprises at least one first training sample, each first training sample comprises an ith scenario, a character relation corresponding to the ith scenario, a main character in a sample total scenario and a sample scenario abstract corresponding to the ith scenario, the ith scenario is a scenario text of the ith scenario in the sample total scenario, the character relation corresponding to the ith scenario comprises character relations respectively corresponding to at least one key character appearing in the scenario of the first i scenario in the sample total scenario, and the sample scenario abstract is used for indicating the scenario abstract of the ith scenario, wherein i is a positive integer;
The model prediction module is used for obtaining a predicted scenario abstract corresponding to the ith scenario according to the ith scenario, the character relation corresponding to the ith scenario and the main characters in the sample total scenario by adopting the scenario extraction model, wherein the predicted scenario abstract is used for indicating the scenario abstract of the ith scenario;
and the model training module is used for adjusting parameters of the scenario extraction model according to the difference between the predicted scenario abstract and the sample scenario abstract to obtain a trained scenario extraction model.
14. A scenario extraction apparatus based on a scenario extraction model, wherein the scenario extraction model is a machine learning model for extracting a scenario abstract, the apparatus comprising:
the scenario acquisition module is used for acquiring an ith scenario in a total scenario of scenarios to be extracted, wherein the ith scenario refers to scenario text of the ith scenario in the total scenario, and i is a positive integer;
the character acquisition module is used for acquiring main characters in the total script according to the total script, acquiring character relations corresponding to the ith script according to the script of the previous i scenes in the total script, wherein the character relations corresponding to the ith script comprise character relations respectively corresponding to at least one key character appearing in the script of the previous i scenes in the total script;
And the abstract extraction module is used for obtaining the scene abstract corresponding to the ith scene script according to the ith scene script, the character relation corresponding to the ith scene script and the main characters in the total script through the script extraction model.
15. A computer device comprising a processor and a memory, wherein the memory has stored therein a computer program that is loaded and executed by the processor to implement the scenario extraction model training method according to any one of claims 1 to 8 or to implement the scenario extraction model-based scenario extraction method according to any one of claims 9 to 12.
16. A computer-readable storage medium, in which a computer program is stored, the computer program being loaded and executed by a processor to implement the scenario extraction model training method according to any one of claims 1 to 8, or to implement the scenario extraction model-based scenario extraction method according to any one of claims 9 to 12.
17. A computer program product, characterized in that the computer program product comprises a computer program that is loaded and executed by a processor to implement a scenario extraction model training method according to any one of claims 1 to 8 or to implement a scenario extraction method based on a scenario extraction model according to any one of claims 9 to 12.
CN202410063236.3A 2024-01-16 2024-01-16 Scenario extraction model training method, device, equipment and storage medium Pending CN117875392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410063236.3A CN117875392A (en) 2024-01-16 2024-01-16 Scenario extraction model training method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410063236.3A CN117875392A (en) 2024-01-16 2024-01-16 Scenario extraction model training method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117875392A true CN117875392A (en) 2024-04-12

Family

ID=90592965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410063236.3A Pending CN117875392A (en) 2024-01-16 2024-01-16 Scenario extraction model training method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117875392A (en)

Similar Documents

Publication Publication Date Title
CN111444709B (en) Text classification method, device, storage medium and equipment
WO2021233112A1 (en) Multimodal machine learning-based translation method, device, equipment, and storage medium
CN111488739B (en) Implicit chapter relation identification method for generating image enhancement representation based on multiple granularities
CN110234018B (en) Multimedia content description generation method, training method, device, equipment and medium
CN113239169A (en) Artificial intelligence-based answer generation method, device, equipment and storage medium
CN113553418B (en) Visual dialogue generation method and device based on multi-modal learning
CN116721334B (en) Training method, device, equipment and storage medium of image generation model
CN111460118B (en) Artificial intelligence conflict semantic recognition method and device
Ruwa et al. Mood-aware visual question answering
Hendricks et al. Generating visual explanations with natural language
Tang et al. Video understanding with large language models: A survey
CN117437317A (en) Image generation method, apparatus, electronic device, storage medium, and program product
CN117216185A (en) Comment generation method, device, equipment and storage medium for distributed content
CN116595133A (en) Visual question-answering method based on stacked attention and gating fusion
CN116258147A (en) Multimode comment emotion analysis method and system based on heterogram convolution
CN117875392A (en) Scenario extraction model training method, device, equipment and storage medium
Chauhan et al. Mhadig: A multilingual humor-aided multiparty dialogue generation in multimodal conversational setting
CN117851587A (en) Scenario extraction method, scenario extraction device, scenario extraction equipment and storage medium
Khandait et al. Automatic question generation through word vector synchronization using lamma
Jaiswal et al. Enhancing Image Captioning Using Deep Convolutional Generative Adversarial Networks
Jiang et al. Multi-view semantic understanding for visual dialog
CN117789099B (en) Video feature extraction method and device, storage medium and electronic equipment
CN116821696B (en) Training method, device, equipment and storage medium for form question-answer model
CN117876940B (en) Video language task execution and model training method, device, equipment and medium thereof
Lei et al. Multimodal Sentiment Analysis Based on Composite Hierarchical Fusion

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination