CN116828255A - Story line description file generation method and device, electronic equipment and storage medium - Google Patents

Story line description file generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116828255A
CN116828255A CN202310755661.4A CN202310755661A CN116828255A CN 116828255 A CN116828255 A CN 116828255A CN 202310755661 A CN202310755661 A CN 202310755661A CN 116828255 A CN116828255 A CN 116828255A
Authority
CN
China
Prior art keywords
determining
image
structure diagram
information
image elements
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
CN202310755661.4A
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.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and Technology 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 Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202310755661.4A priority Critical patent/CN116828255A/en
Publication of CN116828255A publication Critical patent/CN116828255A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The application provides a method, a device, electronic equipment and a storage medium for generating a story line description file. Acquiring a scenario structure diagram corresponding to the interactive video; performing image recognition processing on the scenario structure diagram to obtain a plurality of first image elements and second image elements for representing association relations among the plurality of first image elements; determining corresponding first element information based on each of the first image elements, and determining corresponding second element information based on each of the second image elements; determining corresponding first position information based on each of the first image elements, and determining corresponding second position information based on each of the second image elements; and generating a story line description file corresponding to the plot structure diagram based on the first element information, the second element information, the first position information and the second position information. Therefore, the production efficiency of the story line description file is improved.

Description

Story line description file generation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and apparatus for generating a storyline description file, an electronic device, and a storage medium.
Background
The interactive video is a video form capable of providing scenario interaction for users, and in the playing process of the interactive video, the users can select branching scenarios according to own preference, select different branching scenarios, influence the development of the scenarios, determine the trend of the scenarios, enable the users to be immersed in the scenarios, and promote the participation feeling of the users. The story line of interactive video tends to be more complex than traditional film and television works with single plot trends.
In order to enable a user to better know the story line of an interactive video, at present, when some interactive videos are played, a corresponding story line display diagram can be generated through a story line description file, so that the user can know the story line through the story line display diagram conveniently, wherein the story line display diagram generally comprises the progress of a plot branch line of a video clip currently played in the interactive video. As shown in fig. 1, an example of a story line display for representing that a current video includes "clip 1", "school return", "dinner", "game play", and "write" five video clips.
However, most of the story line description files of the current interactive video are completed by manual participation, and the efficiency is low.
Disclosure of Invention
In order to solve the technical problems, the application provides a method, a device, electronic equipment and a storage medium for generating a story line description file.
In a first aspect, an embodiment of the present application provides a method for generating a storyline description file, including:
acquiring a scenario structure diagram corresponding to an interactive video, wherein the interactive video comprises a plurality of video clips, and the scenario structure diagram is used for describing playing logic for playing the video clips;
performing image recognition processing on the scenario structure diagram to obtain a plurality of first image elements and second image elements for representing association relations among the plurality of first image elements;
determining corresponding first element information based on each of the first image elements, and determining corresponding second element information based on each of the second image elements;
determining corresponding first position information based on each of the first image elements, and determining corresponding second position information based on each of the second image elements;
and generating a story line description file corresponding to the plot structure diagram based on the first element information, the second element information, the first position information and the second position information, wherein the story line description file is used for generating a story line display diagram corresponding to the plot structure diagram.
In one possible implementation manner, the determining, based on each of the first image elements, corresponding first element information includes:
for each first image element, determining a first element area corresponding to the first image element from the scenario structure diagram;
identifying a first element shape of the first image element based on the first element region, and determining a corresponding element type based on the first element shape;
when the element type is a first type, the first image element is used for representing a corresponding interaction node, performing text recognition processing on a first subarea in the first element area to obtain a node title of the corresponding interaction node, and performing text recognition processing on a second subarea in the first element area to obtain a corresponding first pattern identifier;
and determining the node title and the first pattern identifier as corresponding first element information.
In one possible implementation manner, the determining, based on each of the first image elements, corresponding first element information includes:
when the element type is the second type, the first image element is used for representing a corresponding video segment, text recognition processing is performed on a third subarea in the first element area to obtain a segment identifier of the corresponding video segment, text recognition processing is performed on a fourth subarea in the first element area to obtain a segment title of the corresponding video segment, and text recognition processing is performed on a fifth subarea in the first element area to obtain a corresponding second style identifier;
And determining the fragment identifier, the fragment title and the second style identifier as corresponding first element information.
In one possible implementation manner, the determining the corresponding second element information based on each of the second image elements includes:
for each second image element, determining an associated image element corresponding to the second image element and an association relation with each associated image element in a plurality of first image elements;
determining a third pattern identifier corresponding to the second image element;
and determining the connection information formed by a plurality of associated image elements and the association relation with each associated image element and the third pattern identifier as corresponding second element information.
In one possible implementation manner, the determining the third style identifier corresponding to the second image element includes:
determining a second element region corresponding to the second image element from the scenario structure diagram;
and carrying out text recognition processing on a sixth subregion in the second element region to obtain a corresponding third style identifier.
In one possible embodiment, the determining the corresponding first position information based on each of the first image elements, and the determining the corresponding second position information based on each of the second image elements includes:
For each first image element, determining a first reference point corresponding to the first image element, and determining a first relative position of the first reference point in the scenario structure diagram as corresponding first position information;
the method comprises the steps of,
for each second image element, determining a second reference point corresponding to the second image element, and determining a second relative position of the second reference point in the scenario structure diagram as corresponding second position information.
In one possible implementation manner, the generating, based on the first element information, the second element information, the first location information, and the second location information, a story line description file corresponding to the plot structure diagram includes:
determining data format information;
and formatting the first element information, the second element information, the first position information and the second position information based on the data format information to obtain a story line description file corresponding to the plot structure diagram.
In a second aspect, an embodiment of the present application provides a storyline description file generating apparatus, including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a scenario structure diagram corresponding to an interactive video, the interactive video comprises a plurality of video clips, and the scenario structure diagram is used for describing playing logic for playing a plurality of video clips;
The processing module is used for carrying out image recognition processing on the scenario structure diagram to obtain a plurality of first image elements and a second image element used for representing the association relation among the plurality of first image elements;
a first determining module, configured to determine corresponding first element information based on each of the first image elements, and determine corresponding second element information based on each of the second image elements;
a second determining module, configured to determine corresponding first location information based on each of the first image elements, and determine corresponding second location information based on each of the second image elements;
and the generation module is used for generating a story line description file corresponding to the plot structure diagram based on the first element information, the second element information, the first position information and the second position information, wherein the story line description file is used for generating a story line display diagram corresponding to the plot structure diagram.
In one possible embodiment, the first determining module is configured to:
for each first image element, determining a first element area corresponding to the first image element from the scenario structure diagram;
Identifying a first element shape of the first image element based on the first element region, and determining a corresponding element type based on the first element shape;
when the element type is a first type, the first image element is used for representing a corresponding interaction node, performing text recognition processing on a first subarea in the first element area to obtain a node title of the corresponding interaction node, and performing text recognition processing on a second subarea in the first element area to obtain a corresponding first pattern identifier;
and determining the node title and the first pattern identifier as corresponding first element information.
In one possible embodiment, the first determining module is configured to:
when the element type is the second type, the first image element is used for representing a corresponding video segment, text recognition processing is performed on a third subarea in the first element area to obtain a segment identifier of the corresponding video segment, text recognition processing is performed on a fourth subarea in the first element area to obtain a segment title of the corresponding video segment, and text recognition processing is performed on a fifth subarea in the first element area to obtain a corresponding second style identifier;
And determining the fragment identifier, the fragment title and the second style identifier as corresponding first element information.
In one possible embodiment, the first determining module is configured to:
for each second image element, determining an associated image element corresponding to the second image element and an association relation with each associated image element in a plurality of first image elements;
determining a third pattern identifier corresponding to the second image element;
and determining the connection information formed by a plurality of associated image elements and the association relation with each associated image element and the third pattern identifier as corresponding second element information.
In one possible embodiment, the first determining module is configured to:
determining a second element region corresponding to the second image element from the scenario structure diagram;
and carrying out text recognition processing on a sixth subregion in the second element region to obtain a corresponding third style identifier.
In one possible embodiment, the second determining module is configured to:
for each first image element, determining a first reference point corresponding to the first image element, and determining a first relative position of the first reference point in the scenario structure diagram as corresponding first position information;
The method comprises the steps of,
for each second image element, determining a second reference point corresponding to the second image element, and determining a second relative position of the second reference point in the scenario structure diagram as corresponding second position information.
In one possible embodiment, the generating module is configured to:
determining data format information;
and formatting the first element information, the second element information, the first position information and the second position information based on the data format information to obtain a story line description file corresponding to the plot structure diagram.
In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of the first aspects when executing a program stored on a memory.
In a fourth aspect, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of the first aspects.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the above-described storyline description file generation methods.
The embodiment of the application has the beneficial effects that:
the embodiment of the application provides a method, a device, electronic equipment and a storage medium for generating a story line description file, wherein the method comprises the steps of firstly, obtaining a plot structure diagram corresponding to an interactive video, then, carrying out image recognition processing on the plot structure diagram to obtain a plurality of first image elements, and a second image element used for representing the association relation among the plurality of first image elements, determining first element information and first position information corresponding to each first image element, determining second element information and second position information corresponding to each second image element, and finally, generating the story line description file corresponding to the plot structure diagram based on the first element information, the second element information, the first position information and the second position information. Therefore, the story line description file corresponding to the plot structure diagram can be automatically generated according to the plot structure diagram drawn by the user, manual participation is not needed, and the production efficiency of the story line description file is improved.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is an example of a storyline presentation provided by an embodiment of the present application;
FIG. 2 is a flowchart of a method for generating a storyline description file according to an embodiment of the present application;
FIG. 3 is an example of a scenario structure diagram provided by an embodiment of the present application;
FIG. 4 is a flowchart of another method for generating a storyline description file according to an embodiment of the present application;
FIG. 5 is a flowchart of another method for generating a storyline description file according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a device for generating a story line description file according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The method for generating a story line description file according to the present application will be explained with reference to the accompanying drawings, which are not to be construed as limiting the embodiments of the present application.
Referring to fig. 2, a flowchart of an embodiment of a method for generating a storyline description file is provided in an embodiment of the present application. As shown in fig. 2, the process may include the steps of:
s201, a scenario structure diagram corresponding to an interactive video is obtained, wherein the interactive video comprises a plurality of video clips, and the scenario structure diagram is used for describing playing logic for playing the video clips.
The interactive video is a video which can provide scenario interaction for users, and in the process of playing the interactive video, the users can select branching scenarios according to own preference so as to enter different branching scenarios. The interactive video is composed of a plurality of video clips, wherein some video clips contain interactive nodes for interaction with users, and some video clips do not contain interactive nodes, namely common video clips.
The scenario structure diagram is used for describing playing logic for playing a plurality of video clips.
As shown in fig. 3, an example of a scenario structure diagram is shown, in which a rectangular box corresponding to "segment 1" is used for representing video segment id_1, a rectangular box corresponding to "segment 2" is used for representing video segment id_2, a rectangular box corresponding to "segment 3" is used for representing video segment id_3, and an oval box corresponding to "interaction 1" is used for representing one interaction node in video segment id_1. The arrowed lines are used to characterize the play logical relationship (i.e., the direction of the development of the storyline) between the individual video clips and the interaction nodes.
In application, the scenario structure diagram may further include a style number for describing a style of each element, as shown in fig. 3, "style 1" corresponding to "segment 1", "segment 2", and "segment 3", and "style 2" corresponding to "interaction 1", where each arrowed line corresponds to "style a", "style b", and "style c", respectively.
It should be noted that, each element in the scenario structure chart needs to be drawn according to a certain rule, taking fig. 3 as an example, a playing interval (i.e. a video clip) needs to be drawn into a rectangle, and the inside of the rectangle writes the titles (such as "clip 1", "clip 2" and "clip 3") of the playing interval displayed in the story line. The top of the rectangle of the playing interval is in a format of ' style number (such as style 1) ' playing interval number (such as ' id_1 ', ' id_2 ', ' id_3 ') ', and the style number and the playing interval number which need to be presented when the current playing interval is presented in the story line are listed respectively.
The interaction node needs to be drawn in an oval shape, and the inside of the oval writes the title (e.g. "interaction 1") that the interaction node uses when shown in the storyboard. Above the interaction node is listed the style number (e.g., "style 2") that the current interaction node needs to present when the storyline is presented.
And drawing connecting lines between the interactive nodes and the playing intervals and between the playing intervals, wherein the connecting lines with arrows represent the development directions of the storyline. Above each link is listed the style number (e.g., "style a", "style b", "style c") that the current link needs to present when the storyline is presented.
The number of the playing interval is consistent with the number of the playing interval in the interactive script file corresponding to the interactive video, so that the generated story line display diagram can be corresponding to the playing process of the interactive video. The style number is consistent with the number of the corresponding style drawing information in the style drawing database, so that when the story line display diagram is generated, the corresponding element can be drawn into the corresponding style according to the corresponding style drawing information.
For example, for a play section and an interaction node, the style may include: the width and height of the node frame, the relative position of the title in the element, the font size of the title, the relative position of the element background picture, the link of the element background picture, and the like.
For a wire, the pattern may include: thickness, color, solid line, broken line, etc. of the connection line.
The above information is divided into two sets of a current path and a non-current path, wherein the current path refers to the content which is already played, and the non-current path refers to the content which is not yet played, as in the example shown in fig. 3, the thickened content is already played, and the non-thickened content is not yet played.
S202, performing image recognition processing on the scenario structure diagram to obtain a plurality of first image elements and second image elements used for representing association relations among the plurality of first image elements.
S203, corresponding first element information is determined based on each first image element, and corresponding second element information is determined based on each second image element.
S204, corresponding first position information is determined based on each first image element, and corresponding second position information is determined based on each second image element.
S205, generating a story line description file corresponding to the plot structure diagram based on the first element information, the second element information, the first position information and the second position information, wherein the story line description file is used for generating a story line display diagram corresponding to the plot structure diagram.
S202 to S205 are collectively described below:
the first image element refers to an element used for representing a video segment and an interaction node in a scenario structure diagram, for example, in the scenario structure diagram shown in fig. 3, a rectangular frame is used for representing the video segment, and an oval frame is used for representing the interaction node, where the rectangular frame and the oval frame are the first image element.
And the second image element is used for representing the association relation among the plurality of first image elements, namely, the play logic relation between the video clips and the interaction nodes. For example, in the scenario structure diagram shown in fig. 3, the first line with an arrow on the left side is used to represent the playing interaction node "node 1" after the video clip id_1 is played, and the line with an arrow after the node 1 "is used to represent the playing interaction node" node 1 "after the video clip id_2 or the video clip id_3 is played.
The first element information refers to information for describing a corresponding first image element in a scenario structure diagram, for example, in the scenario structure diagram shown in fig. 3, for a first rectangular frame on the left side, "segment 1" and id_1 and style 1 on the upper side thereof, that is, first element information corresponding to the first rectangular frame, and for an oval frame, "interaction 1" and style 2 on the upper side thereof, that is, first element information corresponding to the oval frame.
The second element information refers to information for describing a corresponding second image element in a scenario structure diagram, for example, in the scenario structure diagram shown in fig. 3, for a connection line between "segment 1" and "interaction 1", a "style a" on an upper side of the scenario structure diagram is the second element information corresponding to the connection line, and similarly, for a connection line connecting "segment 2" in the diagram, a "style b" on an upper side of the scenario structure diagram is the second element information corresponding to the connection line, and for a connection line connecting "segment 3" in the diagram, a "style c" on an upper side of the scenario structure diagram is the second element information corresponding to the connection line.
The first position information is used for representing the relative position of the corresponding first image element in the scenario structure diagram, and specifically can be obtained through the following steps: for each first image element, determining a first reference point corresponding to the first image element, and determining a first relative position of the first reference point in the scenario structure diagram as corresponding first position information.
The first reference point may be a center point or a corner point in the corresponding first image element, and is used for positioning the corresponding first image element in the scenario structure chart.
The second position information is used for representing the relative position of the corresponding second image element in the scenario structure diagram, and specifically can be obtained through the following steps: for each second image element, determining a second reference point corresponding to the second image element, and determining a second relative position of the second reference point in the scenario structure diagram as corresponding second position information.
The second reference point may be a start point, an end point and a turning point in the corresponding second image element, and is used for locating the corresponding second image element in the scenario structure diagram.
In application, a training set with a certain scale can be prepared in advance, wherein the training set comprises sample plot structure diagrams and sample story line description files corresponding to the sample plot structure diagrams, and each sample story line description file is a correct description file corresponding to the sample plot structure diagrams. And training an image recognition model (such as an AI (Artificial Intelligence, artificial intelligence) model) by taking the sample plot structure diagrams as model training data and taking the sample story line description files as labels corresponding to the sample plot structure diagrams until the model converges, so as to obtain a trained recognition model.
The size of the training set may be determined according to the complexity of the story line description file to be supported in the model application, that is, the higher the complexity of the story line description file to be supported, the larger the size of the training set. In application, the complexity of the storyline description file may be determined by the number of video clips and interaction nodes, i.e., the greater the complexity.
In order to ensure the recognition effect of the recognition model, a test set can be prepared, the training result is evaluated by using the test set, the recognition model is ensured to have the following capability, and a story line description file (taking a scenario structure diagram shown in fig. 3 as an example) meeting the requirements is output:
A. all rectangle frames in the graph can be identified, each rectangle frame generates a node in the story line description file, the node number is automatically generated, and the type of the node is output as the type of a playing interval (namely video clip).
B. The style numbers in the characters above the rectangular frame can be identified and output to the nodes corresponding to the story line description file.
C. The playing interval number in the text above the rectangular frame can be identified, and the playing interval number (namely the video clip id) is filled in under the corresponding node in the story line description file. The number corresponds to the number of the playing interval in the interaction script file of the same interaction video. In the application, the terminal can control the display, hiding and style display of the current path and the non-current path of the corresponding story line nodes according to the play records of the user.
D. All oval frames in the graph can be identified, each oval frame generates a node in the story line description file, and node numbers are automatically generated, and the types of the nodes are interactive node types.
E. The pattern number in the text above the oval can be identified. And outputting the story line description file to the corresponding node.
F. The method can identify the position of a first reference point (such as a center point) of each node frame (namely a rectangular frame and an elliptic frame) in the provided storyboard structure diagram, and determine the relative position area of the corresponding node frame in the storyboard diagram by combining the information of the width, the height and the like of the node frame in the corresponding style of the style number.
The position of the first reference point is expressed by the percentage of the first reference point in the longitudinal direction and the percentage of the first reference point in the transverse direction in the plot structure diagram, so that the relative position of the first reference point in the plot display diagram can be ensured to be consistent with the relative position in the plot structure diagram when the corresponding plot display diagram is generated.
G. The positions of the second reference points (such as a starting point, a turning point and an ending point) in each connecting line can be identified, and for each second reference point, the positions of the second reference points are represented by the percentages of the second reference points in the longitudinal direction and the percentages in the transverse direction in the scenario structure diagram, so that corresponding coordinates are obtained. Each link generates a link structure in the story line description file, and corresponding coordinates are filled in the corresponding link structure. And identifying play areas or interactive nodes of the start point and the end point of the connection, finding out the corresponding node numbers in the steps and filling the node numbers into the connection structure to serve as a connection start node and a connection end node.
F. The method can identify the pattern number in the text above the connecting line, search corresponding pattern drawing information in a pattern drawing database based on the pattern number, and draw the element corresponding to the story line description file according to the pattern drawing information.
Based on this, in the embodiment of the present application, the scenario structure chart may be input into the recognition model, the recognition model performs image recognition processing on the scenario structure chart to obtain a plurality of first image elements, and second image elements for representing association relationships between the plurality of first image elements, and determine first element information and first position information corresponding to each first image element, and determine second element information and second position information corresponding to each second image element, and finally, generate a story line description file corresponding to the scenario structure chart based on the first element information, the second element information, the first position information and the second position information.
In application, the recognition model can learn the data format of the sample story line description file based on the sample story line description file in the training process to obtain data format information, such as JSON (JavaScript Object Notation, JS object numbered musical notation) format, XML (EXtensible Markup Language ) and the like.
Based on this, generating the specific implementation of the storyline description file corresponding to the plot structure diagram based on the first element information, the second element information, the first location information, and the second location information may include: determining data format information, and formatting the first element information, the second element information, the first position information and the second position information based on the data format information to obtain a story line description file corresponding to the plot structure diagram. In this way, a storyline description file is generated that conforms to the data format of the sample storyline description file in the training data.
In the embodiment of the application, firstly, a plot structure diagram corresponding to an interactive video is obtained, then, image recognition processing is carried out on the plot structure diagram to obtain a plurality of first image elements, and second image elements used for representing association relations among the plurality of first image elements, and first element information and first position information corresponding to each first image element, and second element information and second position information corresponding to each second image element are determined, and finally, a story line description file corresponding to the plot structure diagram is generated based on the first element information, the second element information, the first position information and the second position information. Therefore, the story line description file corresponding to the plot structure diagram can be automatically generated according to the plot structure diagram drawn by the user, manual participation is not needed, and the production efficiency of the story line description file is improved.
Referring to fig. 4, a flowchart of an embodiment of another method for generating a storyline description file is provided in accordance with an embodiment of the present application. The flow shown in fig. 4 describes how to determine the corresponding first element information based on each of the first image elements on the basis of the flow shown in fig. 1 described above. As shown in fig. 4, the process may include the steps of:
s401, determining a first element area corresponding to each first image element from the scenario structure diagram according to each first image element.
S402, performing identification processing on a first element shape of the first image element based on the first element area, and determining a corresponding element type based on the first element shape.
S403, under the condition that the element type is the first type, the first image element is used for representing the corresponding interaction node, text recognition processing is carried out on the first subarea in the first element area to obtain a node title of the corresponding interaction node, and text recognition processing is carried out on the second subarea in the first element area to obtain a corresponding first pattern identifier.
And S404, determining the node title and the first pattern identifier as corresponding first element information.
S401 to S404 are collectively described below:
the first element area refers to a block area containing a first image element and characters or marks around the first image element in the scenario structure chart.
A first style identification, for marking a display style of a corresponding interactive node, such as "style 2" in fig. 3.
The first sub-region refers to a region in the scenario structure diagram for marking a node title corresponding to the interactive node, such as an inner region of an oval frame in fig. 3.
The second sub-region refers to a region in the scenario structure diagram, which is used for marking the first type identifier corresponding to the interaction node, such as a region on the upper side of the oval frame in fig. 3.
In the embodiment of the application, the region image corresponding to the first element region can be identified to obtain the first element shape of the first image element, and the element types corresponding to the first image element are distinguished according to the first element shape. For example, the first element shape is a rectangular box, the corresponding element type is a video clip, and for another example, the first element shape is an oval box, and the corresponding element type is an interaction node.
When the element type is the first type, the first image element is considered to be used for representing the corresponding interaction node, at this time, text recognition processing is performed on the first sub-region in the first element region to obtain a node title of the corresponding interaction node (for example, the node title of the interaction node is "interaction 1" in fig. 3), text recognition processing is performed on the second sub-region in the first element region to obtain a first type identifier of the corresponding interaction node (for example, the first type identifier of the interaction node is "style 2" in fig. 3), and the node title and the first type identifier are determined to be corresponding first element information.
S405, in the case that the element type is the second type, the first image element is used for representing a corresponding video segment, text recognition processing is performed on a third subarea in the first element area to obtain a segment identifier of the corresponding video segment, text recognition processing is performed on a fourth subarea in the first element area to obtain a segment title of the corresponding video segment, and text recognition processing is performed on a fifth subarea in the first element area to obtain a corresponding second style identifier;
s406, determining the fragment identifier, the fragment title and the second style identifier as corresponding first element information.
S405 to S406 are collectively described below:
a second style identification for marking a display style of the corresponding video clip, such as "style 1" in fig. 3.
The third sub-region refers to a region in the scenario structure diagram for marking the segment identifier of the corresponding video segment, such as a region on the upper side of the rectangular frame in fig. 3.
The fourth sub-region refers to a region of the scenario structure diagram for marking a section title of a corresponding video section, as in fig. 3, a rectangular frame inner region.
And a fifth sub-region, which refers to a region for marking the second style identification corresponding to the video clip in the scenario structure diagram, such as a region on the upper side of the rectangular frame in fig. 3.
In the embodiment of the application, when the element type is the second type, the first image element is considered to be used for representing the corresponding video segment, at this time, text recognition processing is performed on the third sub-region in the first element region to obtain the segment identifier (such as id_1, id_2, id_3) of the corresponding video segment, text recognition processing is performed on the fourth sub-region in the first element region to obtain the segment title (such as segment 1, segment 2, segment 3) of the corresponding video segment, text recognition processing is performed on the fifth sub-region in the first element region to obtain the corresponding second style identifier (such as style 1), and the segment identifier, the segment title and the second style identifier are determined to be the corresponding first element information.
Through the flow shown in fig. 4, the element shape of the first image element can be identified based on the first element region corresponding to the first image element, and compared with the method of directly identifying based on the scenario structure diagram, the accuracy of image identification can be improved. Furthermore, the element types corresponding to the first image elements are distinguished according to the element shapes, automatic extraction of the corresponding first element information is realized according to the corresponding element types, manual participation is not needed in the whole process, and the processing efficiency is improved.
Referring to fig. 5, a flowchart of an embodiment of another method for generating an interactive video script is provided in an embodiment of the present application. The flow shown in fig. 5 describes how to determine the corresponding second element information based on each of the second image elements on the basis of the flow shown in fig. 1 described above. As shown in fig. 5, the process may include the steps of:
s501, determining an associated image element corresponding to each second image element and an association relation with each associated image element in a plurality of first image elements;
s502, determining a third pattern identifier corresponding to the second image element;
s503, determining the connection information formed by the association image elements and the association relation with each association image element and the third pattern identifier as corresponding second element information.
S501 to S502 are collectively described below:
associated image elements refer to first image elements associated with corresponding second image elements.
The association relation refers to the drawing relation of the corresponding second image element on the image drawing.
In the example shown in fig. 3, for the first arrowed line on the left side, the associated image element associated with it includes a rectangular box of "segment 1" and an oval box of "interaction 1", where the association relationship is: the rectangular box of "segment 1" is the start of the line and the oval box of "interaction 1" is the end of the line.
A third style identifier for marking a display style corresponding to the second image element, such as "style a", "style b", and "style c" in fig. 3.
Specifically, the third style identifier corresponding to the second image element may be determined by: and determining a second element region corresponding to the second image element from the scenario structure diagram, and performing text recognition processing on a sixth subarea in the second element region to obtain a corresponding third style identifier.
Through the flow shown in fig. 5, for each second image element, first, determining an associated image element corresponding to the second image element and an associated relation with each associated image element in the plurality of first image elements, determining a third pattern identifier corresponding to the second image element, and finally, determining connection information formed by the plurality of associated image elements and the associated relation with each associated image element, and the third pattern identifier as corresponding second element information. Thereby, an automatic determination of the second element information corresponding to the second image element is achieved. The whole process does not need to be manually participated, and the processing efficiency is improved.
Based on the same technical concept, the embodiment of the application also provides a device for generating the story line description file, as shown in fig. 6, the device comprises:
The acquiring module 601 is configured to acquire a scenario structure diagram corresponding to an interactive video, where the interactive video includes a plurality of video clips, and the scenario structure diagram is used to describe playing logic for playing a plurality of the video clips;
the processing module 602 is configured to perform image recognition processing on the scenario structure chart to obtain a plurality of first image elements, and a second image element for representing an association relationship between the plurality of first image elements;
a first determining module 603, configured to determine corresponding first element information based on each of the first image elements, and determine corresponding second element information based on each of the second image elements;
a second determining module 604, configured to determine corresponding first location information based on each of the first image elements, and determine corresponding second location information based on each of the second image elements;
and a generating module 605, configured to generate a storyline description file corresponding to the plot structure diagram based on the first element information, the second element information, the first location information, and the second location information, where the storyline description file is used to generate a storyline display diagram corresponding to the plot structure diagram.
In one possible embodiment, the first determining module is configured to:
for each first image element, determining a first element area corresponding to the first image element from the scenario structure diagram;
identifying a first element shape of the first image element based on the first element region, and determining a corresponding element type based on the first element shape;
when the element type is a first type, the first image element is used for representing a corresponding interaction node, performing text recognition processing on a first subarea in the first element area to obtain a node title of the corresponding interaction node, and performing text recognition processing on a second subarea in the first element area to obtain a corresponding first pattern identifier;
and determining the node title and the first pattern identifier as corresponding first element information.
In one possible embodiment, the first determining module is configured to:
when the element type is the second type, the first image element is used for representing a corresponding video segment, text recognition processing is performed on a third subarea in the first element area to obtain a segment identifier of the corresponding video segment, text recognition processing is performed on a fourth subarea in the first element area to obtain a segment title of the corresponding video segment, and text recognition processing is performed on a fifth subarea in the first element area to obtain a corresponding second style identifier;
And determining the fragment identifier, the fragment title and the second style identifier as corresponding first element information.
In one possible embodiment, the first determining module is configured to:
for each second image element, determining an associated image element corresponding to the second image element and an association relation with each associated image element in a plurality of first image elements;
determining a third pattern identifier corresponding to the second image element;
and determining the connection information formed by a plurality of associated image elements and the association relation with each associated image element and the third pattern identifier as corresponding second element information.
In one possible embodiment, the first determining module is configured to:
determining a second element region corresponding to the second image element from the scenario structure diagram;
and carrying out text recognition processing on a sixth subregion in the second element region to obtain a corresponding third style identifier.
In one possible embodiment, the second determining module is configured to:
for each first image element, determining a first reference point corresponding to the first image element, and determining a first relative position of the first reference point in the scenario structure diagram as corresponding first position information;
The method comprises the steps of,
for each second image element, determining a second reference point corresponding to the second image element, and determining a second relative position of the second reference point in the scenario structure diagram as corresponding second position information.
In one possible embodiment, the generating module is configured to:
determining data format information;
and formatting the first element information, the second element information, the first position information and the second position information based on the data format information to obtain a story line description file corresponding to the plot structure diagram.
In the embodiment of the application, firstly, a plot structure diagram corresponding to an interactive video is obtained, then, image recognition processing is carried out on the plot structure diagram to obtain a plurality of first image elements, and second image elements used for representing association relations among the plurality of first image elements, and first element information and first position information corresponding to each first image element, and second element information and second position information corresponding to each second image element are determined, and finally, a story line description file corresponding to the plot structure diagram is generated based on the first element information, the second element information, the first position information and the second position information. Therefore, the story line description file corresponding to the plot structure diagram can be automatically generated according to the plot structure diagram drawn by the user, manual participation is not needed, and the production efficiency of the story line description file is improved.
Based on the same technical concept, the embodiment of the present application further provides an electronic device, as shown in fig. 7, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, where the processor 111, the communication interface 112, and the memory 113 perform communication with each other through the communication bus 114,
a memory 113 for storing a computer program;
the processor 111 is configured to execute a program stored in the memory 113, and implement the following steps:
acquiring a scenario structure diagram corresponding to an interactive video, wherein the interactive video comprises a plurality of video clips, and the scenario structure diagram is used for describing playing logic for playing the video clips;
performing image recognition processing on the scenario structure diagram to obtain a plurality of first image elements and second image elements for representing association relations among the plurality of first image elements;
determining corresponding first element information based on each of the first image elements, and determining corresponding second element information based on each of the second image elements;
determining corresponding first position information based on each of the first image elements, and determining corresponding second position information based on each of the second image elements;
And generating a story line description file corresponding to the plot structure diagram based on the first element information, the second element information, the first position information and the second position information, wherein the story line description file is used for generating a story line display diagram corresponding to the plot structure diagram.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the above-described storyline-description-file generating methods.
In yet another embodiment of the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the storyline description file generation methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the application to enable those skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of storyline description file generation, the method comprising:
acquiring a scenario structure diagram corresponding to an interactive video, wherein the interactive video comprises a plurality of video clips, and the scenario structure diagram is used for describing playing logic for playing the video clips;
performing image recognition processing on the scenario structure diagram to obtain a plurality of first image elements and second image elements for representing association relations among the plurality of first image elements;
determining corresponding first element information based on each of the first image elements, and determining corresponding second element information based on each of the second image elements;
determining corresponding first position information based on each of the first image elements, and determining corresponding second position information based on each of the second image elements;
and generating a story line description file corresponding to the plot structure diagram based on the first element information, the second element information, the first position information and the second position information, wherein the story line description file is used for generating a story line display diagram corresponding to the plot structure diagram.
2. The method of claim 1, wherein said determining corresponding first element information based on each of said first image elements comprises:
for each first image element, determining a first element area corresponding to the first image element from the scenario structure diagram;
identifying a first element shape of the first image element based on the first element region, and determining a corresponding element type based on the first element shape;
when the element type is a first type, the first image element is used for representing a corresponding interaction node, performing text recognition processing on a first subarea in the first element area to obtain a node title of the corresponding interaction node, and performing text recognition processing on a second subarea in the first element area to obtain a corresponding first pattern identifier;
and determining the node title and the first pattern identifier as corresponding first element information.
3. The method of claim 2, wherein said determining corresponding first element information based on each of said first image elements comprises:
when the element type is the second type, the first image element is used for representing a corresponding video segment, text recognition processing is performed on a third subarea in the first element area to obtain a segment identifier of the corresponding video segment, text recognition processing is performed on a fourth subarea in the first element area to obtain a segment title of the corresponding video segment, and text recognition processing is performed on a fifth subarea in the first element area to obtain a corresponding second style identifier;
And determining the fragment identifier, the fragment title and the second style identifier as corresponding first element information.
4. The method of claim 1, wherein said determining corresponding second element information based on each of said second image elements comprises:
for each second image element, determining an associated image element corresponding to the second image element and an association relation with each associated image element in a plurality of first image elements;
determining a third pattern identifier corresponding to the second image element;
and determining the connection information formed by a plurality of associated image elements and the association relation with each associated image element and the third pattern identifier as corresponding second element information.
5. The method of claim 4, wherein determining a third style identification corresponding to the second image element comprises:
determining a second element region corresponding to the second image element from the scenario structure diagram;
and carrying out text recognition processing on a sixth subregion in the second element region to obtain a corresponding third style identifier.
6. The method of claim 1, wherein said determining corresponding first location information based on each of said first image elements and determining corresponding second location information based on each of said second image elements comprises:
For each first image element, determining a first reference point corresponding to the first image element, and determining a first relative position of the first reference point in the scenario structure diagram as corresponding first position information;
the method comprises the steps of,
for each second image element, determining a second reference point corresponding to the second image element, and determining a second relative position of the second reference point in the scenario structure diagram as corresponding second position information.
7. The method of claim 1, wherein the generating the storyline description file corresponding to the plot structure diagram based on the first element information, the second element information, the first location information, and the second location information comprises:
determining data format information;
and formatting the first element information, the second element information, the first position information and the second position information based on the data format information to obtain a story line description file corresponding to the plot structure diagram.
8. A storyline description file generation apparatus, the apparatus comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a scenario structure diagram corresponding to an interactive video, the interactive video comprises a plurality of video clips, and the scenario structure diagram is used for describing playing logic for playing a plurality of video clips;
The processing module is used for carrying out image recognition processing on the scenario structure diagram to obtain a plurality of first image elements and a second image element used for representing the association relation among the plurality of first image elements;
a first determining module, configured to determine corresponding first element information based on each of the first image elements, and determine corresponding second element information based on each of the second image elements;
a second determining module, configured to determine corresponding first location information based on each of the first image elements, and determine corresponding second location information based on each of the second image elements;
and the generation module is used for generating a story line description file corresponding to the plot structure diagram based on the first element information, the second element information, the first position information and the second position information, wherein the story line description file is used for generating a story line display diagram corresponding to the plot structure diagram.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
A memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-7 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-7.
CN202310755661.4A 2023-06-25 2023-06-25 Story line description file generation method and device, electronic equipment and storage medium Pending CN116828255A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310755661.4A CN116828255A (en) 2023-06-25 2023-06-25 Story line description file generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310755661.4A CN116828255A (en) 2023-06-25 2023-06-25 Story line description file generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116828255A true CN116828255A (en) 2023-09-29

Family

ID=88127022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310755661.4A Pending CN116828255A (en) 2023-06-25 2023-06-25 Story line description file generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116828255A (en)

Similar Documents

Publication Publication Date Title
CN111260545B (en) Method and device for generating image
CN113190781B (en) Page layout method, device, equipment and storage medium
US20200410371A1 (en) Data analysis method and device
CN111752557A (en) Display method and device
EP4213097A1 (en) Image generation method and apparatus
CN111260752A (en) Flow chart drawing method, device and equipment and storage medium
CN109191158A (en) The processing method and processing equipment of user's portrait label data
CN110569429A (en) method, device and equipment for generating content selection model
CN110969000B (en) Data merging processing method and device
CN110248235B (en) Software teaching method, device, terminal equipment and medium
CN112199261A (en) Application program performance analysis method and device and electronic equipment
CN111625679B (en) Video story line generation method and device
CN110347379B (en) Processing method, device and storage medium for combined crowdsourcing questions
CN112784529A (en) Mobile terminal sorting table based on BetterScroll and construction method thereof
CN116828255A (en) Story line description file generation method and device, electronic equipment and storage medium
CN110286893B (en) Service generation method, device, equipment, system and storage medium
CN116708929A (en) Interactive video script generation method and device, electronic equipment and storage medium
CN113411517B (en) Video template generation method and device, electronic equipment and storage medium
CN111444392B (en) Vulnerability library access method, device and equipment
CN113064590B (en) Processing method and device for interactive components in interactive video
CN112417295A (en) Education cloud information pushing method, storage medium and system
CN111866548A (en) Marking method applied to medical video
CN116708930A (en) Interactive video script generation method and device, electronic equipment and storage medium
CN114827703B (en) Queuing playing method, device, equipment and medium for views
CN114820879B (en) Method for constructing game drawing board by thinking guide picture, electronic equipment and storage medium

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