Video generation method and device, neural network training method and device

By employing multi-layered text semantic understanding and a unified modal neural network, the method addresses inefficiencies in generating videos from text, ensuring coherent and contextually relevant video content.

JP7550257B2Active Publication Date: 2024-09-12BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023026371
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-02-25
Filing Date
2023-02-22
Publication Date
2024-09-12
Estimated Expiration
2043-02-22

AI Technical Summary

Technical Problem

Existing methods for generating videos from text content are inefficient and lack automation, resulting in videos that are often fixed in mode, single in applicability, and difficult to control, with low authenticity and reliability.

Method used

A method involving multi-layered understanding of text semantic information to retrieve candidate data based on correlation, using a unified modal neural network to generate videos that match the content context and improve user experience.

Benefits of technology

Generates videos that consistently match the preceding and following content, improving user experience by ensuring relevance and coherence across text segments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007550257000011
    Figure 0007550257000011
  • Figure 0007550257000005
    Figure 0007550257000005
  • Figure 0007550257000003
    Figure 0007550257000003
Patent Text Reader

Abstract

To provide a video generation method and apparatus of the same, and a neural network training method and apparatus of the same.SOLUTION: A video generation method comprises: a step S201 for obtaining global semantic information of text and local semantic information corresponding to a text segment; a step S202 for performing a search in a database based on the global semantic information to obtain first data; a step S203 for performing a search in the database based on the local semantic information to obtain second data; a step S204 for obtaining a candidate data set based on the first data and the second data; a step S205 for matching target data to the text segment based on the degree of correlation between the text segment and each candidate data of the candidate data set; and a step S206 for generating video based on the target data matched to the text segment.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to the field of artificial intelligence, in particular to natural language processing technology, deep learning technology, computer vision technology, image processing technology, etc., and in particular to a video generation method, a neural network training method, a video generation device, a neural network training device, an electronic device, and a computer-readable storage medium. [Background technology]

[0002] Artificial intelligence is a field that studies how computers can simulate certain human thought processes and intellectual behaviors (e.g., learning, reasoning, thinking, planning, etc.), and includes both hardware and software technologies. AI hardware technologies generally include sensors, AI-dedicated chips, cloud computing, distributed storage, big data processing, and other technologies, while AI software technologies mainly include computer vision technology, voice recognition technology, natural language processing technology, and several major directions such as machine learning / deep learning, big data processing technology, and knowledge graph technology.

[0003] Digital content is the core foundation of the Internet. Compared with text content, video content contains more abundant information, is more user-friendly, and has a higher propagation effect. With the development of mobile Internet hardware facilities, the demand for video content is rapidly increasing.

[0004] The approaches described in this section are not necessarily approaches that have been previously contemplated or adopted. Unless otherwise noted, any approach described in this section should not be considered prior art by its inclusion in this section alone. Similarly, unless otherwise noted, any problem addressed in this section should not be considered an admission of prior art. Summary of the Invention

[0005] The present disclosure provides a video generation method, a neural network training method, a video generation device, a neural network training device, an electronic device, and a computer-readable storage medium.

[0006] According to one aspect of the present disclosure, a video generation method is provided, the method including: obtaining global semantic information of a text and at least one local semantic information corresponding to at least one text segment of the text; obtaining at least one first data corresponding to the global semantic information by performing a search in a database based on the global semantic information; for each local semantic information of the at least one local semantic information, obtaining at least one second data corresponding to the local semantic information by performing a search in a database based on the local semantic information; obtaining a candidate dataset based on the at least one first data and the at least one second data corresponding to each of the at least one local semantic information; matching target data to the at least one text segment based on a correlation degree between each of the at least one text segment and each candidate data of the candidate dataset; and generating a video based on the target data matched to each of the at least one text segment.

[0007] According to another aspect of the present disclosure, there is provided a method for training a neural network, the neural network being configured to embed a plurality of received inputs to obtain a plurality of corresponding input features, and to process the plurality of input features utilizing a self-attention mechanism, the method including: obtaining a sample text, real global semantic information of the sample text, and at least one real local semantic information of the sample text, where the at least one real local semantic information corresponds to at least one text segment of the sample text; inputting a plurality of first sample words included in the sample text into the neural network to obtain predicted global semantic information and at least one predicted local semantic information of the sample text; calculating a first loss value based on the real global semantic information, the predicted global semantic information, the at least one real local semantic information, and the at least one predicted local semantic information; obtaining positive example sample data corresponding to the sample text segment and negative example sample data corresponding to the sample text segment; inputting a plurality of second sample words included in the sample text segment and at least one positive example image block included in the positive example sample data into a neural network to obtain a positive example sample visual correlation degree between the sample text segment and the positive example sample data, the positive example sample visual correlation degree indicating a correlation degree between the text information of the sample text segment and the visual information of the positive example sample data; inputting a plurality of second sample words and at least one negative example image block included in the negative example sample data into the neural network to obtain a negative example sample visual correlation degree between the sample text segment and the negative example sample data, the negative example sample visual correlation degree indicating a correlation degree between the text information of the sample text segment and the visual information of the negative example sample data; calculating a second loss value based on the positive example sample visual correlation degree and the negative example sample visual correlation degree, where the second loss value is negatively correlated with the positive example sample visual correlation degree;and adjusting parameters of the neural network according to the first loss value and the second loss value, the first loss value being positively correlated with the visual correlation degree of the negative example samples.

[0008] According to another aspect of the present disclosure, there is provided a video generation apparatus, the apparatus including: a first acquisition unit configured to acquire global semantic information of a text and at least one local semantic information corresponding to at least one text segment of the text; a first search unit configured to obtain at least one first data corresponding to the global semantic information by performing a search in a database based on the global semantic information; a second search unit configured to obtain, for each local semantic information of the at least one local semantic information, at least one second data corresponding to the local semantic information by performing a search in a database based on the local semantic information; a second acquisition unit configured to obtain a candidate dataset based on the at least one first data and the at least one second data corresponding to each of the at least one local semantic information; a matching unit configured to match target data to the at least one text segment based on a correlation degree between each of the at least one text segment and each candidate data of the candidate dataset; and a generation unit configured to generate a video based on the target data matched to each of the at least one text segment.

[0009] According to another aspect of the present disclosure, there is provided an apparatus for training a neural network, the neural network being configured to embed a plurality of received inputs to obtain a corresponding plurality of input features, and to process the plurality of input features utilizing a self-attention mechanism, the apparatus comprising: a third acquisition unit configured to acquire a sample text, real global semantic information of the sample text, and at least one real local semantic information of the sample text, the at least one real local semantic information corresponding to at least one text segment of the sample text; a first input unit configured to obtain predicted global semantic information and at least one predicted local semantic information of the sample text by inputting a plurality of first sample words included in the sample text into the neural network; and a third acquisition unit configured to acquire a sample text, real global semantic information of the sample text, and at least one real local semantic information of the sample text, the at least one real local semantic information corresponding to at least one text segment of the sample text; a fourth acquiring unit configured to acquire a sample text segment, positive example sample data corresponding to the sample text segment, and negative example sample data corresponding to the sample text segment; a second input unit configured to obtain a positive example sample visual correlation degree between the sample text segment and the positive example sample data by inputting a plurality of second sample words included in the sample text segment and at least one positive example image block included in the positive example sample data to a neural network, the positive example sample visual correlation degree indicating a correlation degree between text information of the sample text segment and visual information of the positive example sample data; and a third input unit configured to obtain a negative example sample visual correlation degree between the sample text segment and the negative example sample data by inputting a plurality of second sample words and at least one negative example image block included in the negative example sample data to the neural network, the negative example sample visual correlation degree beingThe method includes: a third input unit for indicating a correlation degree between the text information of the sample text segment and the visual information of the negative example sample data; a second calculation unit configured to calculate a second loss value based on the visual correlation degree of the positive example samples and the visual correlation degree of the negative example samples, the second loss value being negatively correlated with the visual correlation degree of the positive example samples and positively correlated with the visual correlation degree of the negative example samples; and an adjustment unit configured to adjust parameters of the neural network based on the first loss value and the second loss value.

[0010] According to another aspect of the present disclosure, there is provided an electronic device including at least one processor and a memory communicatively coupled to the at least one processor, where the memory stores instructions executable by the at least one processor, which instructions, when executed by the at least one processor, enable the at least one processor to perform the method described above.

[0011] According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method described above. According to an embodiment of the present disclosure, by performing a multi-layered understanding of the text, global semantic information and local semantic information of the text are obtained, and then data search is performed based on the above-mentioned multi-layered semantic information to obtain candidate data. The text segment and the candidate data are matched based on the correlation between the two, so as to generate a video that is consistent in content before and after, matches both the paragraph and the entire text, and feels natural, thereby improving the user's viewing experience.

[0012] It should be understood that the contents described in this section are not intended to identify key or important features of the embodiments of the present disclosure, and are not intended to limit the scope of protection of the present disclosure. Other features of the present disclosure will become more readily understood through the following description. [Brief description of the drawings]

[0013] The drawings illustratively depict examples, constitute a part of the specification, and together with the written description of the specification are used to explain exemplary embodiments of the examples. The illustrated examples are for illustrative purposes only and are not intended to limit the scope of the claims. In all drawings, the same reference numerals refer to similar, but not necessarily identical, elements. [Figure 1A] 1 shows a schematic diagram of an exemplary system in which various methods described herein may be implemented, according to embodiments of the present disclosure. [Figure 1B] FIG. 1 shows a schematic diagram of a unified modal neural network according to an embodiment of the present disclosure. [Diagram 2] 1 illustrates a flowchart of a video generation method according to an exemplary embodiment of the present disclosure. [Diagram 3] 1 illustrates a flowchart of a video generation method according to an exemplary embodiment of the present disclosure. [Figure 4] 1 illustrates a flowchart of a video generation method according to an exemplary embodiment of the present disclosure. [Diagram 5] 1 illustrates a flowchart for matching target data to at least one text segment according to an exemplary embodiment of the present disclosure. [Figure 6] 1 shows a flowchart of a method for training a neural network according to an exemplary embodiment of the present disclosure. [Figure 7] 1 shows a flowchart of a method for training a neural network according to an exemplary embodiment of the present disclosure. [Figure 8] 1 shows a flowchart of a method for training a neural network according to an exemplary embodiment of the present disclosure. [Figure 9] FIG. 2 illustrates a structural block diagram of a video generation device according to an exemplary embodiment of the present disclosure. [Figure 10] FIG. 2 illustrates a structural block diagram of a video generation device according to an exemplary embodiment of the present disclosure. [Figure 11] FIG. 2 illustrates a structural block diagram of a video generation device according to an exemplary embodiment of the present disclosure. [Figure 12] FIG. 2 shows a structural block diagram of a neural network training apparatus according to an exemplary embodiment of the present disclosure. [Figure 13] FIG. 2 shows a structural block diagram of a neural network training apparatus according to an exemplary embodiment of the present disclosure. [Figure 14] FIG. 2 shows a structural block diagram of a neural network training apparatus according to an exemplary embodiment of the present disclosure. [Figure 15] FIG. 1 illustrates a structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, exemplary embodiments of the present disclosure will be described in conjunction with the drawings, and various details in the embodiments of the present disclosure contained therein are to be considered as merely illustrative, in order to facilitate understanding. Therefore, it should be recognized that those skilled in the art can make various changes and modifications to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the following description omits the description of known functions and structures.

[0015] In this disclosure, unless otherwise specified, the use of terms such as "first," "second," and the like to describe various elements is not intended to limit the location, timing, or importance of those elements. Such terms are used only to distinguish one element from another. In some instances, a first element and a second element may refer to the same instance of an element, or in some cases, may refer to different instances based on the contextual description.

[0016] The terms used in the description of the various examples of the present disclosure are intended only to describe particular examples and are not intended to be limiting. Unless the context clearly indicates otherwise, an element may be one or more, unless specifically limiting the number of elements. In addition, the term "and / or" as used in the present disclosure covers any and all possible combinations of the listed items.

[0017] Digital content is the core foundation of the Internet. Compared with text content, video content contains more abundant information, is more user-friendly, and has a higher propagation effect. With the development of mobile Internet hardware facilities, the demand for video content is rapidly increasing.

[0018] However, the efficiency of manual video production is relatively low, and it cannot meet the ever-increasing needs of video content.Compared with manual video production, the efficiency of manual text creation is higher, and at the same time, a large amount of text or image text type content is accumulated on the Internet.Therefore, how to automatically generate video content based on text content and combine a large amount of materials on the Internet has become an urgent problem to be solved.

[0019] Currently, there are three main methods for generating videos based on text content: (1) A method of generating from text to video based on a clip tool: First, the text content entered by the user is automatically converted into audio by the clip tool, and then the video is finally generated through manual operations such as dubbing, host placement, and background placement. (2) A method for generating explanatory videos using tool-based text or template-based text: First, a summary extraction tool is used to extract a character sequence, then picture search is performed based on the character sequence, and then, in cooperation with a fixed template, artificial editing is performed to generate multiple video segments, and each segment is stitched together to finally generate a video; (3) Video generation method based on topic-based text description: Text is converted into semantic vectors based on a neural network model, and then videos are generated based on the semantic vectors. This method can automatically generate videos of simple scenes for short character descriptions (e.g., a flock of geese flying in the sky).

[0020] Here, the first two methods have the disadvantages that the degree of automation and intelligence is not high, the generated video mode is relatively fixed, the application scene is relatively single, and it is difficult to train and optimize based on the generated result. The third method can achieve the effect of automatically generating video based on simple text, but this method directly relies on the neural network model, so it is difficult to control the generation process and it is difficult to ensure the authenticity and reliability of the generated result.

[0021] To solve the above problem, the present disclosure performs a multi-layer understanding of text to obtain global semantic information and local semantic information of the text, and then performs data search based on the above multi-layer semantic information to obtain candidate data, and matches the text segment with the candidate data based on the correlation between the two, thereby generating a video that is consistently consistent between the preceding and following content, matches both the paragraph and the entire text, and feels natural, thereby improving the user's viewing experience.

[0022] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. 1A illustrates a schematic diagram of an example system 100 in which various methods and apparatus described herein may be implemented, according to embodiments of the present disclosure. With reference to FIG. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, 106 may be configured to execute one or more applications.

[0023] In an embodiment of the present disclosure, the server 120 operates to execute one or more services or software applications of a video production methodology. In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized and virtualized environments. In some embodiments, these services may be provided as web-based or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a Software as a Service (SaaS) model.

[0024] In the configuration shown in FIG. 1A, the server 120 may include one or more modules that implement the functions performed by the server 120. These modules may include software modules, hardware modules, or a combination thereof that may be executed on one or more processors. Users operating the client devices 101, 102, 103, 104, 105, and / or 106 may interact with the server 120 using one or more client applications to utilize the services provided by these modules. It should be understood that a variety of different system configurations are possible and may differ from the system 100. Thus, FIG. 1 is an example of a system for implementing various methods described herein and is not intended to be limiting.

[0025] A user can use client devices 101, 102, 103, 104, 105 and / or 106 to configure basic options, edit the text of the video to be generated, modify full-sentence keywords, paragraph keywords, etc. generated by the neural network. The client device can provide an interface through which a user of the client device can interact with the client device. The client device can also output information to the user through the interface. Although only six client devices are shown in FIG. 1, one skilled in the art can understand that any number of client devices can be supported by the present application.

[0026] The client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computing devices, such as portable handheld devices, general purpose computers (e.g., personal computers or laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computing devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (e.g., GOOGLE Chrome OS), and may include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android, and the like. Portable handheld devices may include mobile phones, intelligent phones, tablets, personal digital assistants (PDAs), and the like. Wearable devices may include head-mounted displays (e.g., smart glasses) and other devices. Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices, and the like. The client devices may run a variety of applications, such as Internet-related applications, communication applications (eg, email applications), Short Message Service (SMS) applications, and may use a variety of communication protocols.

[0027] Network 110 may be any type of network known to those skilled in the art that may use any one of a number of available protocols (including, but not limited to, TCP / IP, SNA, IPX, etc.) to support data communications. By way of example, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token loop, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and other networks.

[0028] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframes, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of virtualized logical storage devices to maintain the server's virtual storage). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0029] The computing units within server 120 may run one or more operating systems, including any of the operating systems mentioned above and any commercially available server operating system. Server 120 may also run any one of a variety of additional server applications and / or mid-tier applications, such as an HTTP server, an FTP server, a CGI server, a JAVA server, a database server, etc.

[0030] In some embodiments, server 120 may include one or more applications for analyzing and consolidating data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may include one or more applications for displaying data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.

[0031] In some embodiments, the server 120 may be a server of a distributed system or a server incorporating blockchain. The server 120 may be a cloud server, or an intelligent cloud computing server or an intelligent cloud host equipped with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, which solves the defects of high management difficulty and low business scalability that exist in traditional physical hosts and virtual private server (VPS) services.

[0032] System 100 may include one or more databases 130. In some embodiments, these databases may be used to store data or other information. For example, one or more of databases 130 may be used to store information such as audio files, video files, etc. Databases 130 may be located in a variety of locations. For example, a database used by server 120 may be local to server 120 or may be remote from server 120 and in communication with server 120 over a network or dedicated connection. Databases 130 may be of a variety of types. In some embodiments, a database used by server 120 may be a relational database. One or more of these databases may store, update, and retrieve data from the database and from the database in response to instructions.

[0033] In some embodiments, one or more of databases 130 may be used by an application to store data for the application. The databases used by the application may be various types of databases, such as a key-value repository, an object repository, a general-purpose repository supported by a file system, etc.

[0034] The system 100 of FIG. 1A can be configured and operated in a variety of ways to accommodate the application of the various methods and apparatus described in accordance with this disclosure. According to one aspect of the present disclosure, there is provided a video generation method, which includes the steps of: obtaining global semantic information of a text and at least one local semantic information corresponding to at least one text segment of the text in step S201; obtaining at least one first data corresponding to the global semantic information by performing a search in a database based on the global semantic information in step S202; obtaining at least one second data corresponding to each local semantic information of the at least one local semantic information by performing a search in a database based on the local semantic information in step S203; obtaining a candidate data set based on the at least one first data and the at least one second data corresponding to each of the at least one local semantic information in step S204; matching target data to the at least one text segment based on a correlation degree between each of the at least one text segment and each candidate data of the candidate data set in step S205; and generating a video based on the target data matched to each of the at least one text segment in step S206.

[0035] In this way, by performing a multi-layered understanding of the text, global semantic information and local semantic information of the text can be obtained, and then data search can be performed based on the above-mentioned multi-layered semantic information to obtain candidate data. The text segment and the candidate data can be matched based on the correlation between the two, so as to generate a video that is consistent in content before and after, matches both the paragraph and the entire text, and feels natural, thereby improving the user's viewing experience.

[0036] In one exemplary embodiment, if a text segment of a text about public figure B participating in a product launch event D of company C that occurred at time A includes only public figure B, when a search is performed using local semantic information corresponding to this text segment (e.g., keyword "public figure B"), the obtained data may be a video that is not related to company C, product launch event D, or time A at all, such as an entertainment video with a wide reach of this public figure B, or an advertisement in which public figure B speaks for another company's product. If such data is used as a target video matching this text segment, the finally generated video may not objectively map to the overall content of the text and may feel unnatural. If only video or image data obtained by searching based on global semantic information is used, it may not be possible to obtain sufficient candidate data for generating a video. Even if the candidate data is sufficient, the finally generated video content may be single and the correlation between each text segment may be objectively low. For example, one text segment of the text is about a historical event E, which describes when a public figure B attends a product launch event D, and if the historical event E is not global semantic information of the text, videos or images related to the historical event E cannot be searched for and further cannot be matched as target data of this text segment.

[0037] Furthermore, by matching the target data to the text segment based on the degree of correlation between the text segment and the candidate data, it is possible to ensure that the target data is relevant to the entire text segment, rather than just to the keywords of the corresponding text segment (which would otherwise result in the above-mentioned objectively unnatural situation).

[0038] According to some embodiments, before starting the text-to-video conversion, the application terminal may support the user to set basic configuration options.

[0039] In some embodiments, a user may be supported to configure a text to speech (TTS) function, including selecting whether to turn on the voice synthesis function, the tone, volume, and speaking rate of the voice synthesis.

[0040] In some embodiments, a user may be supported to configure background music, including selecting whether to add background music, the type of background music, etc. In some embodiments, a user may be supported to configure the video generation method, including selecting fully automatic video generation, man-machine interaction assisted video generation, and the like.

[0041] In some embodiments, a user may be supported to configure the training scheme of the unified modal neural network, including selecting whether to initiate neural network optimization training based on user feedback data, etc.

[0042] In some embodiments, a user may be supported to set a type of text to be converted, where the type of text to be converted may include a text document, a content page including image text content, a search keyword or search question, a substance word, etc. A user may select one or more of the above types of text to generate a video. In setting the type of text to be converted, a user may further set a specific text to be converted according to the above type by providing a specific text document, a page URL address, a specific search keyword text or search question text, a specific substance word text, etc.

[0043] In some embodiments, a user may be supported to configure one or more of the basic configuration options listed above. According to some embodiments, based on the text to be converted, it is possible to obtain the text for generating a video.

[0044] In some embodiments, in response to determining the text to be converted in a text document, the text may be obtained by directly reading the textual content in the text document selected by a user.

[0045] In some embodiments, in response to determining that the text to be converted is a content type page containing image text content, such as a page containing content such as news articles, knowledge articles, experience articles, etc., an open source web page analysis tool (e.g., HTML Parser) can read and analyze the page URL address selected by a user to obtain the body text and picture content of the page, and obtain meta tag information such as the page title, body, paragraph, bold, image text position relationship, table, etc.

[0046] In some embodiments, in response to determining the text to be converted as a search keyword or a search question, a plurality of search results can be obtained based on the search keyword or the search question, and the page URL address of each search result can be read and analyzed based on an open source web page analysis tool (such as HTML Parser) to obtain the body text and picture content of the page, and obtain Meta tag information such as the page title, body text, paragraph, bold, positional relationship of image text, table, etc. Here, the search engine and database for obtaining the search results can be self-configured according to actual needs and are not limited here.

[0047] In some embodiments, after a plurality of search results are first obtained, non-content-based pages such as advertisements in the search results are first filtered out, and then a plurality of content-based pages that have a relatively high correlation with the search keywords or search questions and are richer in image or video materials are selected from the filtered pages, and the above-mentioned processing can be performed.

[0048] In some embodiments, in response to determining the text to be converted as an entity word, obtain the corresponding encyclopedia page based on the entity word, and further read and analyze the page URL address of the encyclopedia page based on an open source web page analysis tool (e.g., HTML Parser, etc.) to obtain the body text and picture content of the page, and obtain meta tag information such as the page title, body text, paragraph, bold, image text position relationship, table, etc. Here, the entity word is a named entity, including a person's name, an organization's name, a place name, and all other entities that are labeled with a name.

[0049] According to some embodiments, after obtaining the text, a trained unified modal neural network can be used to process the text and obtain various types of information in the text.

[0050] The unified modal neural network is a neural network model that performs unified processing on multiple modal inputs, and can be used to complete tasks such as text classification (keyword extraction), text information extraction, correlation calculation between text and image or video, and image or video generation based on text. As shown in FIG. 1B, the main body of the unified modal neural network is composed of multiple TRANSFORMER layers, and other network structures can be combined after the multi-layer TRANSFORMER according to different downstream tasks. The unified modal neural network receives inputs such as text, image, or image-text pairs, and embeds these inputs to obtain corresponding text features or image features for input to the multi-layer TRANSFORMER, thereby obtaining a unified semantic representation of the multi-layer TRANSFORMER output.

[0051] Specifically, for a text input W, we first use word segmentation to generate a word sequence W = {[CLS], w1, ..., w n , [SEP]}, and then obtain a context-related semantic representation by a multi-layer TRANSFORMER. For an image input V, divide the image into multiple blocks, then vectorize the image blocks, and obtain an image input sequence V = {[IMG], v1, ..., v t} and similarly obtain a visual semantic representation by the multi-layer TRANSFORMER. Finally, for an input image-text pair (V, W), we stitch the input sequence of text and visual parts to obtain V,W={[IMG], v1, ..., v t , [CLS], w1, …, w n , [SEP]}, and similarly obtain a cross-modal semantic representation using a multi-layer TRANSFORMER.

[0052] The above [CLS], [IMG], [SEP], etc. are special codes that input a neural network based on TRANSFORMER. [CLS] and [IMG] can be used to extract global semantic representations of text and image sequences, respectively, and [SEP] can be used as a segmentation instruction between multiple inputs.

[0053] According to some embodiments, by using a trained unified modal neural network, multiple tasks are performed, such as obtaining global semantic information and local semantic information based on text, calculating the correlation between text segments and image or video data, and extracting summaries, and the text features and visual features used in these tasks are all located in the same semantic space, thereby establishing a relational relationship between these tasks, and further making the global semantic information and local semantic information output by the neural network more suitable for the application scene, and improving the obtained correlation degree and accuracy of the summary, so that the generated video has a high consistency with the text content, and there is a logical relationship between the target data for generating the video and there is no incongruity.

[0054] In some embodiments, for a video input, it is necessary to first extract frames and then convert these frames into an image block sequence. The frame extraction interval can be determined based on, for example, the currently available computing power. A relatively small frame extraction interval can be used when the available computing power is generous, and a relatively large frame extraction interval can be used when the available computing power is limited.

[0055] In some embodiments, the unified modal neural network can be trained using multiple methods, such as cross-modal comparison learning, visual mask prediction, language mask prediction, etc., and can also be weakly supervised learning using user interaction data. The following describes in detail how to train the unified modal neural network.

[0056] In some embodiments, for a relatively long text, a video directly generated based on the full text is also relatively long, which is disadvantageous to the quick consumption of the video. Therefore, if it is desired to produce a short video with concise content, it is possible to consider performing summary extraction on the text. As shown in FIG. 3, the video generating method may further include a step S301 of obtaining a summary text of the text. It can be understood that the operations and effects of steps S303, S305-S306, S308, and S314-S315 in FIG. 3 are respectively the same as those of steps S201-S206 in FIG. 2, and will not be further described here. The summary of the text can be used as a subtitle for the video, and can also be used to generate a voice for the video, as described below. In some other embodiments, for a relatively short text, the text can be directly used as a summary, or the text can be refined using a neural network, which is not limited here.

[0057] In some embodiments, the summary text of the text may be obtained by using a unified modal neural network. In one exemplary embodiment, a subtractive method may be adopted to obtain the summary text. The text may be simultaneously input into the unified modal neural network in units of phrases, so that a judgment result of whether each phrase is a summary or not can be obtained (for example, by setting [CLS] before each phrase, and determining whether this phrase belongs to the summary text according to the output feature corresponding to the [CLS] of each phrase). As can be understood, other methods may also be used to obtain the summary text of the text, and are not limited here.

[0058] According to some embodiments, the summary may be manually revised by a user. Step S301, obtaining a summary text of the text using a unified-modal neural network, may further include, in response to receiving a user input instructing to revise the summary text, revising at least the summary text based on the user input. Note that the summary after user revision may be used as sample data to further optimise and train the neural network, as described below.

[0059] According to some embodiments, the video generating method may further include a step S302 of determining at least one of video subtitles, video voice, and video background music based on the summary text.

[0060] In some implementations, the summary text can be further segmented to obtain video subtitles. In some embodiments, the text or summary text can be converted into video voice by using a voice synthesis (Text To Speech (TTS)) technology. Specifically, the content type of the text (e.g., narrative type, comment type, lyric type, etc.) can be first obtained based on the text or summary text, and the tone, timbre, volume, speaking rate, etc. of the corresponding voice synthesis can be invoked based on the content type.

[0061] In some embodiments, the style of the video background music can be determined based on the content type of the summary text (e.g., narrative type, commentary type, lyric type, etc., or for example, sports type, news type, entertainment type, etc.), and the corresponding music can be determined in the music library. Optionally, the length of the video voice can be used as a restriction to select music with a similar duration as the video background music.

[0062] In some embodiments, in response to a user confirming that the video generation method is set to the man-machine interaction-assisted video generation mode, the user may be supported to set the tone, volume, speaking rate, etc. of the voice synthesis according to actual needs.

[0063] In some embodiments, in response to the user determining that the video generation manner is set to the man-machine interaction assisted video generation mode, the user may be supported to make configurations including selecting whether to add background music to the background music, the type of background music, etc. Optionally, a plurality of different styles of background music may be provided to the user, supporting the user to select the background music by himself according to actual needs.

[0064] As can be appreciated, in some embodiments, the generated video may include one or more of the above video subtitles, video voice, and video background music, without being limited thereto.

[0065] When generating a video, a key step is to supplement the generated video with visual material data such as videos, pictures, etc., so that the generated video has rich visual elements. In step S303, global semantic information and at least one local semantic information of the text are obtained, where the at least one local semantic information corresponds to at least one text segment of the text.

[0066] In some embodiments, the global semantic information may be, for example, full-text keywords of the text, and the local semantic information may be, for example, keywords of the corresponding text segment. The text segment may be, for example, a paragraph in the text, a sentence in the text, or a text segment obtained by dividing the text at other granularities or determined in the text in other ways.

[0067] In some embodiments, a unified modal neural network can be used to realize keyword prediction based on a classification task. By predetermining a keyword list as a "category" that the classification task can predict, and training the neural network using corresponding samples, the neural network can output a number of category tags based on the input text, each of which corresponds to a keyword in the keyword list. In other embodiments, the neural network can output at least one output feature to a TRANSFORMER layer for fusion processing to extract a unified semantic representation of the text, and then directly generate a keyword corresponding to the input text based on the representation. It can be understood that the above are only two exemplary methods for determining text keywords, and other ways of using a neural network to obtain text keywords are also possible.

[0068] In some embodiments, the global semantic information may be, for example, obtained by inputting the full text into the unified modal neural network. In some embodiments, the at least one local semantic information may be, for example, obtained by directly inputting the full text into the unified modal neural network, or by inputting a text segment into the unified modal neural network. In other embodiments, the full text is input into the neural network, and the neural network can perform a fusion process on the output features corresponding to the text segment output by the TRANSFORMER layer to extract a unified semantic representation of the text segment, and then directly generate local semantic information of the text segment based on the representation.

[0069] According to some embodiments, step S303, obtaining global semantic information and at least one local semantic information of the text, may include, in response to receiving a user input to modify the global semantic information, modifying the global semantic information based on the user input, where the global semantic information after user modification may be used as sample data to further optimize and train the neural network, as described below.

[0070] According to some embodiments, step S303, obtaining global semantic information and at least one local semantic information of the text, may include, in response to receiving a user input to modify the at least one local semantic information, modifying the at least one local semantic information based on the user input, wherein the local semantic information after user modification may be used as sample data to further optimize and train the neural network, as described below.

[0071] Thus, the global and local semantic information can be adjusted by receiving user input from a user, and then a search can be performed based on the global and local semantic information to obtain data with higher correlation between the whole text and the text segment. Note that the user input can be used as interaction data to optimize the neural network.

[0072] According to some embodiments, the video generating method may further include a step S304 of recognizing at least one entity word in the at least one text segment. In one exemplary embodiment, a entity word table may be pre-determined, and entity words may be recognized in the text segment based on the entity word table.

[0073] In some embodiments, in step S305, at least one first data may be obtained by searching in a database using the global semantic information of the text as a search term, and the first data may be picture data or video data obtained by searching based on the global semantic information.

[0074] According to some embodiments, step S305, obtaining at least one first data corresponding to the global semantic information by performing a search in a database based on the global semantic information, may include obtaining the at least one first data by performing a search in a database based on the global semantic information and a title of the text.

[0075] In some embodiments, the at least one first data may be obtained by performing a search in a database using the global semantic information and the title of the text as search terms.

[0076] In some implementations, a search can also be performed with context, for example, the entire text or a portion of the text can be selected as context information. In one example, since using all the context information as search terms would increase the burden on a search engine or database, searching using search terms and then filtering the results using context information can improve the correlation between search results and text while using a similar amount of computational resources.

[0077] In some embodiments, the database may be, for example, a general-purpose search engine, or a specific material website or material database. The manner of obtaining at least one first data may specifically include searching the entire network online by a search engine, searching a specific material website, or searching an offline material database. It can be understood that the applied search engine may be selected according to actual needs, and is not limited here.

[0078] In some embodiments, in step S306, at least one second data may be obtained by searching in a database using the local semantic information of each text segment as a search keyword, and the second data may include a picture or a video that is obtained by searching based on the local semantic information of each text segment.

[0079] According to some embodiments, step S306, for each local semantic information of the at least one local semantic information, obtaining at least one second data corresponding to the local semantic information by performing a search in a database based on the local semantic information may include, for each local semantic information of the at least one local semantic information, obtaining at least one second data by performing a search in a database based on the local semantic information and a text segment corresponding to the local semantic information, thereby improving correlation between search results and text segments by using the corresponding text segments during searching.

[0080] In some embodiments, the at least one second data may be obtained by performing a search in a database using the local semantic information and the title of the text as search terms.

[0081] According to some embodiments, obtaining at least one second data by performing a search in a database for each local semantic information of the at least one local semantic information based on the local semantic information and a text segment corresponding to the local semantic information may include: obtaining a plurality of second search results by performing a search in a database for each local semantic information of the at least one local semantic information based on the local semantic information; and obtaining the at least one second data by filtering the plurality of second search results based on at least one of the text segment and the text corresponding to the local semantic information.

[0082] In some embodiments, the local semantic information of each text segment can be used as a search keyword to search in a database to obtain at least one second search result, and then the second search result can be filtered based on the correlation between the text segment corresponding to the local semantic information and the second search result to obtain at least one second data. Since directly using the text segment as a search term requires consuming a large amount of computational resources, the search term can be used to search and then the context information can be used to filter the results, thereby improving the correlation between the search result and the text when using fewer computational resources, and improving the efficiency of material acquisition.

[0083] In some embodiments, the manner of obtaining at least one second data or at least one second search result may specifically include searching the entire network online, searching a specific material website, or searching an offline material database by a search engine. As can be understood, the applied search engine may be self-selected according to actual needs, and is not limited herein.

[0084] According to some embodiments, as shown in Fig. 3, the video generating method may further include: step S307, for each entity word of the at least one entity word, searching in a database based on the entity word to obtain at least one third data corresponding to the entity word; step S308, obtaining a candidate dataset based on the at least one first data and the at least one second data corresponding to each of the at least one local semantic information may include obtaining a candidate dataset based on the at least one first data, the at least one second data corresponding to each of the at least one local semantic information, and the at least one third data corresponding to each of the at least one entity word. Thus, by searching based on the entity word to obtain the third data, the material data for generating the video can be enriched, and the candidate dataset includes data directly related to the entity word appearing in the text.

[0085] In some embodiments, in step S307, based on obtaining the entity words of each of the text segments, and further based on using each entity word as a search keyword, searching in a database to obtain at least one third data, where the third data may include a picture or a video obtained by searching based on the entity words of each of the text segments.

[0086] According to some embodiments, step S307, for each of the at least one entity term, obtaining at least one third data corresponding to the entity term by performing a search in a database based on the entity term may include obtaining at least one third data for each of the at least one entity term by performing a search in a database based on the entity term and the text segment in which the entity term is located, thereby improving correlation between search results and the text segment by using the corresponding text segment during searching.

[0087] In some embodiments, the entity term of each text segment and the corresponding text segment can be used as a search keyword to search in a database to obtain at least one third data.

[0088] According to some embodiments, for each entity term of the at least one entity term, obtaining at least one third data corresponding to the entity term by performing a search in a database based on the entity term and the text segment in which the entity term is located may include: for each entity term of the at least one entity term, performing a search in a database based on the entity term to obtain a plurality of third search results; and obtaining the at least one third data by filtering the plurality of third search results based on at least one of the text segment and the text in which the entity term is located.

[0089] In some embodiments, the entity words of each text segment are used as search keywords to search in a database to obtain at least one third search result, and then the third search result is filtered based on the correlation between the text segment corresponding to the entity word and the third search result to obtain at least one third data. Since directly using the text segment as a search word requires consuming a large amount of computational resources, the search word is used to search and then the result is filtered using context information, so that the correlation between the search result and the text can be improved when using fewer computational resources, and the efficiency of material data acquisition can be improved.

[0090] In some embodiments, the manner of obtaining at least one third data or at least one third search result may specifically include searching the entire network online, searching a specific material website, or searching an offline material database by a search engine. As can be understood, the applied search engine may be self-selected according to actual needs, and is not limited herein.

[0091] In one example, the candidate dataset obtained includes at least one first data corresponding to global semantic information, at least one second data corresponding to each of at least one local semantic information, and at least one third data corresponding to each of at least one entity word. The method described above can obtain rich image and video data at three different levels, from global to local to word.

[0092] At the same time as acquiring image data and video data, related text information such as the titles and description information of the image data and video data can also be acquired, and then these data can be screened, and the process of matching candidate data with text content can provide richer information.

[0093] According to some embodiments, as shown in Fig. 4, the video generating method may further include step S405 of performing content understanding on each candidate data in the candidate dataset to obtain content semantic information of the candidate data, step S406 of obtaining descriptive text information of each candidate data in the candidate dataset, and step S407 of performing voice recognition on the audio data of each candidate data in the candidate dataset to obtain voice text information corresponding to the candidate data. This can provide richer multi-modal information of the candidate data for calculating the correlation between the matching links and the text segments, as described below. The operations and effects of steps S401 to S404 and steps S408 to S409 in Fig. 4 are similar to those of steps S201 to S206 in Fig. 2, respectively, and will not be further described here.

[0094] According to some embodiments, content understanding may include at least one of text recognition and entity recognition. In one example, character recognition, including subtitles, titles, barrages, etc., may be performed on video or image data based on visual understanding technology tools. In another example, entity recognition, such as public figure recognition, place recognition, flag recognition, etc., may be performed in the manner of target detection. This allows the content understanding result to provide richer content information in the candidate data and improve the accuracy of the correlation between the text segment and the candidate data.

[0095] According to some embodiments, a voice recognition technology can be used to perform voice recognition on the audio data in the candidate data to obtain corresponding voice text information, so that the voice recognition result can provide richer content information in the candidate data and improve the accuracy of the correlation between the text segment and the candidate data.

[0096] Returning to Fig. 3. According to some embodiments, as shown in Fig. 3, step S308, obtaining a candidate data set based on at least one first data and at least one second data corresponding to each of the at least one local semantic information, includes: obtaining a plurality of data to be segmented by filtering the at least one first data and the at least one second data corresponding to each of the at least one local semantic information based on a first target filtering rule; obtaining a plurality of data segments by segmenting each of the plurality of data to be segmented based on the target segmentation rule; and obtaining a candidate data set by filtering the plurality of data segments based on a second target filtering rule. In this way, by screening and segmenting the acquired data, and further filtering the segmented data, it is possible to reduce non-correlated or inappropriate content as material data in the candidate data set, and further reduce the amount of calculation in correlation degree calculation and matching link.

[0097] In some embodiments, the first target filtering rule may, for example, filter videos of a particular type or meeting particular conditions, such as videos with a single scene, videos with few views, or videos with relatively low user scores.

[0098] In some embodiments, for the data to be segmented, i.e., for the video data obtained after filtering, it can first be segmented to obtain multiple data segments (i.e., video segments). Specifically, the video can be segmented based on semantic information of transitions or video frames. On the basis of obtaining multiple data segments, it can further filter out some specific scene segments (e.g., small scene changes), and only the video segments related to text content can be kept as candidate data.

[0099] In some embodiments, the second target filtering rule may filter segments such as openings, endings, transition processes, etc.

[0100] If the first data or the second data is an image, it does not need to be filtered and segmented. In some embodiments, the above steps can be similarly used for third data obtained by searching based on entity terms.

[0101] As can be understood, the above embodiments are merely illustrative, and the first target filtering rule and the second target filtering rule may be set as necessary so that the obtained candidate data becomes material data for generating a video.

[0102] According to some embodiments, as shown in FIG. 3 , the video generation method may further include a step S309 of determining a target text segment for directly generating video data or image data in at least one text segment, a step S310 of directly generating fifth data based on the target text segment using a unified modal neural network, where the visual content of the fifth data is associated with the target text segment, and a step S311 of adding the fifth data to the candidate dataset.

[0103] In some embodiments, the pre-trained unified modal neural network has a character-to-image or character-to-video generation based on artificial intelligence capabilities, so that the unified modal neural network can be used to directly generate an image or video, i.e., fifth data, based on the target text segment, that matches the content described in the target text segment. As can be understood, one or more fifth data can be generated based on a target text segment, and is not limited thereto. Thus, by using the above method, the material image data and video data can be made richer, and when there is no corresponding data in the database, appropriate visual material data can be provided, avoiding the situation where there is no material data available.

[0104] In one example embodiment, if the target text segment is "There are five apples on the plate," image data embodying "There are five apples on the plate" can be generated in a direct generation manner.

[0105] According to some embodiments, directly generating the fifth data may include recognizing entity words in the target text segment and directly generating the fifth data based on the entity words using a unified modal neural network.

[0106] In some embodiments, the entity word for directly generating the fifth data may be an entity object, such as a famous place, a portrait of a public figure, a mark of an institution, etc. As can be understood, one or more fifth data may be generated based on one entity word, and this is not limited thereto.

[0107] In some embodiments, the local semantic information and entity words of the text segments can be searched first, and the fifth data can be generated in the above manner when it is determined that the search results are relatively few. In other embodiments, data search and data generation can be performed synchronously to obtain more abundant material data, and the material data can be screened based on the quality of the material data or the correlation between the material data and the corresponding text segments. As can be understood, between the searched data and the generated fifth data, the user can be supported to make a selection by himself, and is not limited here.

[0108] In some embodiments, when it is determined that the fifth data has relatively high quality based on the relevant text segment (e.g., a text segment describing a specific object), the material generation method can be directly used to obtain candidate data.

[0109] As can be understood, current text-to-video generation methods based on artificial intelligence capabilities are not very effective at generating long videos, so this method can generate relatively short fifth data, and does not require operations such as segmentation, filtering, etc. on the fifth data.

[0110] In some embodiments, the obtained candidate data set may include at least one first data based on global semantic information, at least one second data based on each local semantic information, at least one third data obtained based on each entity word, and a fifth data generated based on the target text segment.

[0111] According to some embodiments, as shown in Fig. 3, the video generating method may further include step S312 of extracting text and one or more fourth data corresponding to the text in the original page, where the one or more fourth data correspond to one or more text segments different from the at least one text segment in the text.

[0112] In some embodiments, the candidate data may further include videos and images presented in the original page where the text is located (i.e., the text to be converted), i.e., the fourth data. The fourth data can be obtained by extracting the videos and images in the original page. The above method can obtain image data and video data directly related to the text and text segments.

[0113] According to some embodiments, as shown in Figure 3, the video generating method may further include step S313 of determining each of the one or more fourth data as target data of the text segment corresponding to the fourth data, thereby improving the richness of the material data by using the data in the source document that has the highest correlation with the text segment as the target data matched to the text segment, and reducing the number of text segments that need to be matched, thereby improving the video generating speed.

[0114] In step S314, the target data is matched to the at least one text segment based on a correlation degree between each of the at least one text segment and each candidate data in the candidate data set.

[0115] According to some embodiments, the correlation degree between the text segment and the candidate data may include a visual correlation degree between text information of the text segment and visual information of the corresponding candidate data, and the visual correlation degree may be determined based on the input text segment and the input candidate data using a unified modal neural network.

[0116] In some embodiments, in step S314, a neural network can be used to calculate a visual correlation between each text segment and each candidate data, to obtain a visual correlation matrix between at least one text segment and candidate data in the candidate dataset, and then match target data to each text segment based on an optimization policy.

[0117] According to some embodiments, as shown in Fig. 5, step S314, matching the target data to the at least one text segment may include: determining, for each text segment of the at least one text segment, a first number of candidate data in a candidate dataset having the highest visual correlation with the text segment using a unified modal neural network S501; and matching the target data to the at least one text segment based on the correlation between each of the at least one text segment and each of the corresponding candidate data of the first number of candidate data S502. This can first determine the first number of candidate data having the highest visual correlation with each text segment, and then match the target data to each text segment in the corresponding candidate data from the global, thereby reducing the complexity of the matching process and improving the matching speed.

[0118] In some embodiments, the image features of the candidate data and the text features of the text segments can be mapped into the same semantic space using a neural network, so that the visual correlation between each text segment and each candidate data is not required, and a hash-based method can be used to directly determine the first number of candidate data with the highest visual correlation for each text segment, thereby significantly reducing the computational complexity of the matching process and improving the matching speed. As can be understood, the value of the first number can be set based on the performance needs of the neural network and the requirements for matching accuracy, and is not limited here.

[0119] In some embodiments, the visual correlation degree may be a correlation degree between the text segment that binds the context and the candidate data. The text segment of the context may include one or more preceding text segments or their corresponding local semantic information / entity words, and one or more succeeding text segments or their corresponding local semantic information / entity words. In one exemplary embodiment, the current text segment, the paragraph consisting of the preceding text segment and the succeeding text segment, and the candidate data may be input into a neural network to obtain a visual correlation degree between the current text segment and the candidate data. In this manner, it is possible to ensure that there is a similar correlation between the target data matched to the adjacent text segments, and that there is a consistency between two adjacent video segments or images in the final generated video. In one exemplary embodiment, a first text segment describes entering a restaurant, then a second text segment after the first text segment describes an ordering scene, and then a third text segment after the second text segment describes a conversation scene in the restaurant, and by combining the contexts and calculating the visual correlation degree, the target material data matched to the three text segments can all include restaurants with similar scenes (e.g., all are a fast food restaurant, a French restaurant, and a tea restaurant).

[0120] According to some embodiments, the visual correlation degree may be determined based on the input text segment, the local semantic information corresponding to the input text segment, and the input candidate data by using a unified modal neural network, so that the target data matched to the text segment can be similarly well matched to the corresponding keyword in relation to the whole text segment, and the selected target data can highlight the important content of the text segment.

[0121] According to some embodiments, for a text segment that includes one or more entity words, the visual correlation degree may be determined based on the text segment, the entity word or words, and the input candidate data using a unified modal neural network, so that the target data matched to the text segment will match the corresponding entity words similarly well on a pertinent basis to the text segment as a whole, and avoid a situation where the selected target data matches the text segment overall, but the contained entities are significantly different from the entities appearing in the text segment.

[0122] After obtaining the candidate data corresponding to each text segment, the target data can be matched to each text segment. In some embodiments, the matching can be performed using a target optimization policy. The target optimization policy may include, for example, a greedy policy. In one embodiment, the greedy policy can be used to sequentially match each text segment with the candidate data with the highest visual correlation. In another embodiment, the visual correlation between all text segments and the corresponding candidate data can be globally sorted in descending order, and the candidate data in each set from the combination with the highest visual correlation can be determined as the target data for the text segment in the set, and the set containing the matched candidate data or the matched text segment can be skipped.

[0123] In some embodiments, the target optimization policy may include, for example, a dynamic programming policy, which may obtain a matching strategy that has the highest total visual correlation between all the text paragraphs and the matched target data.

[0124] Other constraints may also be added to the matching process. In some embodiments, the duration of the video and voice segments generated based on the corresponding portions of the summary text may be used as a constraint to ensure that the duration of the candidate data matched to the text segment is essentially the same as the duration of the corresponding video and voice segments. In some embodiments, multiple target videos may be matched to the text segment, and the duration of the corresponding video and voice segments may be used to limit the total duration of the target videos.

[0125] According to some embodiments, as shown in Fig. 5, step S314, matching the target data to each of the at least one text segment may further include, in response to determining that some of the at least one text segment are not successfully matched to the target data, using a unified modal neural network to determine, for each of the at least one text segment, a second number of candidate data in the unmatched candidate data of the candidate data set that have the highest correlation with the text segment, and matching the target data to the at least one text segment based on the correlation between each of the at least one text segment and each of the corresponding candidate data of the second number of candidate data. Thus, after the first matching is completed, a second matching or even multiple matching can be performed on the text segments that are not successfully matched to the target data, thereby ensuring that the target data is matched to each of the text segments.

[0126] As can be appreciated, step S314 may further include multiple rounds of matching until each of the text segments is matched with the target data. According to some embodiments, step S314, matching the target data to each of the at least one text segment, may further include, in response to receiving a user input instructing to modify the target data matched to one of the at least one text segments to another candidate data, determining the other candidate data as the target data for the text segment. This allows the target data matched to the text segment to be modified to another candidate data based on user feedback. Note that the user input may be used as interaction data to optimize the neural network.

[0127] According to some embodiments, step S315, generating a video based on the target data matching each of the at least one text segment, may include generating a video based on at least one of a video subtitle, a video voice, a video background music, and the target data matching each of the at least one text segment.

[0128] In some embodiments, when the target data corresponding to a text segment is video data, if the duration of the video and the duration of the corresponding video voice segment may not be completely consistent, image data may be determined in the target data matching other text segments, and the display duration of the image data may be adjusted accordingly to ensure the consistency of the video subtitles, the video voice, and the target data. As can be appreciated, other methods can be used to ensure the consistency, such as, for example, splitting the target data when the duration of the target data is greater than the duration of the corresponding video voice segment, and are not limited thereto.

[0129] In some embodiments, after obtaining the voice-subtitle-video timeline, the user can make fine adjustments to the alignment result to achieve accurate alignment of the text subtitles, voice and displayed video within the second level.

[0130] The above embodiment provides a method for matching target data based on the visual correlation between the text information of the text segment and the visual information of the candidate data, and the correlation between the text information of the text segment and other modal information of the candidate data can also be used to improve the accuracy of matching.

[0131] According to some embodiments, step S315, generating a video based on the target data matched to each of the at least one text segment, may include generating the video based on the target data matched to each of the at least one text segment and the target data matched to each of the one or more text segments, such that a video can be generated by combining target data from the source text (i.e., the target data matched to each of the one or more text segments) with target data obtained by retrieval or direct generation methods (i.e., the target data matched to each of the at least one text segment).

[0132] According to some embodiments, the correlation degree may further include a first semantic correlation degree between the text information of the corresponding text segment and the content semantic information of the corresponding candidate data. The first semantic correlation degree may be determined based on the input text segment and the input content semantic information by using a unified modal neural network.

[0133] According to some embodiments, the correlation degree may further include a second semantic correlation degree between the text information of the corresponding text segment and the descriptive text information of the corresponding candidate data. The second semantic correlation degree may be determined based on the input text segment and the input descriptive text information using a unified modal neural network.

[0134] According to some embodiments, the correlation degree may further include a third semantic correlation degree between the text information of the corresponding text segment and the voice text information of the corresponding candidate data, and the third semantic correlation degree may be determined based on the input text segment and the input voice text information by using a unified modal neural network.

[0135] As can be appreciated, one or more of the first semantic correlation measure, the second semantic correlation measure and the third semantic correlation measure may be optionally selected and used in combination with the visual correlation measure to assess the degree of matching between the text segment and the candidate data.

[0136] In some embodiments, in step S314, a visual correlation degree, a first semantic correlation degree, a second semantic correlation degree, and a third semantic correlation degree between each of the at least one text segment and each candidate data in the candidate dataset are calculated, and the semantic correlation degrees are merged to obtain an integrated correlation degree between each text segment and each candidate data, and then target data can be matched to each text segment based on the corresponding integrated correlation degree.

[0137] In some embodiments, in step S501, a unified modal neural network model can be used to determine for each text segment a first number of candidate data that have the highest visual correlation with the text segment, and in step S502, target data can be matched to each text segment based on the integrated correlation between the text segment and the candidate data.

[0138] As can be understood, the above embodiment is merely an example of using the above multiple correlation degrees to perform matching, and other methods can also be used to perform matching using the above multiple correlation degrees, for example, determining a first number of candidate data for each text segment based on the visual correlation degree, and screening the candidate data based on a first semantic correlation degree, a second semantic correlation degree, a third semantic correlation degree or a combination thereof, and further determining target data matching the text segment in the screened candidate data, and the present invention is not limited thereto.

[0139] According to another aspect of the present disclosure, a method for training a neural network is provided. The neural network is configured to embed a plurality of received inputs to obtain a plurality of corresponding input features, and to process the plurality of input features using a self-attention mechanism. As shown in FIG. 6, the training method includes the steps of: obtaining a sample text, real global semantic information of the sample text, and at least one real local semantic information of the sample text, where the at least one real local semantic information corresponds to at least one text segment of the sample text; obtaining predicted global semantic information and at least one predicted local semantic information of the sample text by inputting a plurality of first sample words included in the sample text into the neural network in step S602; calculating a first loss value based on the real global semantic information, the predicted global semantic information, the at least one real local semantic information, and the at least one predicted local semantic information; and calculating a first loss value based on the sample text segment, positive example sample data corresponding to the sample text segment, and the sample segment. Step S604 of acquiring negative example sample data corresponding to the pull text segment; Step S605 of obtaining a positive example sample visual correlation degree between the sample text segment and the positive example sample data by inputting a plurality of second sample words included in the sample text segment and at least one positive example image block included in the positive example sample data into a neural network, the positive example sample visual correlation degree indicating a correlation degree between the text information of the sample text segment and the visual information of the positive example sample data; Step S606 of obtaining a negative example sample visual correlation degree between the sample text segment and the negative example sample data by inputting a plurality of second sample words included in the sample text segment and at least one negative example image block included in the negative example sample data into a neural network, the negative example sample visual correlation degree indicating a correlation degree between the text information of the sample text segment and the visual information of the negative example sample data;The method includes: calculating a second loss value based on the visual correlation degree of the positive example samples and the visual correlation degree of the negative example samples, where the second loss value is negatively correlated with the visual correlation degree of the positive example samples and positively correlated with the visual correlation degree of the negative example samples; and adjusting parameters of the neural network based on the first loss value and the second loss value.

[0140] Thus, the unified modal neural network is provided with the ability of extracting global and local semantic information by training using sample text, real global semantic information, and local semantic information, and the unified modal neural network is provided with the ability of calculating visual correlation between the text information of the text or text segment and the visual information of the image or video data by training using sample text segments, corresponding positive example sample data, and corresponding negative example sample data. By performing these two trainings on the unified modal neural network, the text features and visual features in the two tasks of extracting global and local semantic information and calculating visual correlation are all located in the same semantic space, thereby establishing a relationship between the two tasks, and further making the global semantic information and local semantic information output by the neural network more suitable for the application scenario when used, and improving the accuracy of the correlation calculation result, and making the generated video and text content more consistent.

[0141] According to some embodiments, the unified modal neural network can be pre-trained by self-supervising using large-scale unlabeled text and visual data. For example, masked self-supervised learning can be used for text data, image reconstruction self-supervised learning can be used for image data, and cross-modal comparison learning can be used for image text data, so that the unified modal neural network can be equipped with feature representation capabilities by fully utilizing unlabeled data. Here, the text masked self-supervised learning can be a method of randomly masking the input text, predicting the masked words based on the output corresponding to the masking position, and training based on the actual tag and the prediction result. The image reconstruction self-supervised learning can be a method of masking some areas in the image in a similar manner, reconstructing the image based on the output image features, and training based on the original image and the reconstructed image. The cross-modal comparison learning can be a method of simultaneously inputting text data and image data into the neural network, and training based on the prediction result of whether the image and text match output by the neural network and the actual correlation between the image and text.

[0142] According to some embodiments, the actual global semantic information and the actual local semantic information of the sample text may be generated by, for example, a user, or in one embodiment, these two semantic information may be the contents after a user manually modifies the predicted global semantic information and the predicted local semantic information generated by the neural network.

[0143] According to some embodiments, both the positive example sample data and the negative example sample data are video data or image data. In some embodiments, the positive example sample data corresponding to the sample text segment may be, for example, an image or video manually selected by a user, and the corresponding negative example sample data may be, for example, data randomly selected among other data.

[0144] This allows weakly supervised training using data fed back by the user to further improve the accuracy of the results output by the neural network, and allows the results output by the neural network to be more consistent with the user's preferences for candidate data selection.

[0145] According to some embodiments, as shown in Fig. 7, the method for training a neural network may further include step S708 of obtaining an actual sample summary text, step S709 of obtaining a predicted sample summary text of the sample text by inputting a plurality of first sample words into the neural network, and step S710 of calculating a third loss value based on the actual sample summary text and the predicted sample summary text. Step S711, adjusting parameters of the neural network based on the first loss value and the second loss value, may include adjusting parameters of the neural network based on the first loss value, the second loss value and the third loss value. The operations and effects of steps S701 to S707 in Fig. 7 are similar to those of steps S601 to S607 in Fig. 6, and will not be further described here.

[0146] This equips the unified modal neural network with the ability of summary extraction by training it using sample texts and real sample summary texts.

[0147] According to some embodiments, the actual sample summary text may be determined based on user input, so that the data input or selected by the user can be used to further train the unified modal neural network, thereby realizing feedback learning and ensuring that the video generation effect can be continuously upgraded and optimized.

[0148] According to some embodiments, as shown in FIG. 8, the method for training the neural network includes step S808 of obtaining related text information of the positive example sample data and related text information of the negative example sample data, the related text information including at least one of content semantic information, description text information, and voice text information of the corresponding sample data; step S809 of obtaining a positive example sample semantic correlation degree between the sample text segment and the positive example sample data by inputting a plurality of second sample words and at least one third sample word included in the related text information of the positive example sample data into the neural network, the positive example sample semantic correlation degree indicating the correlation degree between the text information of the sample text segment and the related text information of the positive example sample data; The method may further include: inputting the pull word and at least one fourth sample word included in the related text information of the negative example sample data into the neural network to obtain a negative example sample semantic correlation degree between the sample text segment and the negative example sample data, the negative example sample semantic correlation degree indicating a correlation degree between the text information of the sample text segment and the related text information of the negative example sample data; calculating a fourth loss value based on the positive example sample semantic correlation degree and the negative example sample semantic correlation degree, where the fourth loss value is negatively correlated with the positive example sample semantic correlation degree and positively correlated with the negative example sample semantic correlation degree; and adjusting parameters of the neural network based on the first loss value, the second loss value and the fourth loss value. The operations and effects of steps S801 to S807 in FIG. 8 are similar to those of steps S601 to S607 in FIG. 6, and will not be described further here.

[0149] Thus, by training the neural network using the associated text information of the positive example sample data and the negative example sample data and the text information of the text segment, the neural network can output the correlation between the associated text information of the data and the text information of the text segment, thereby providing richer correlation information when matching candidate data to the text segment.

[0150] According to another aspect of the present disclosure, as shown in FIG. 9 , a video generating apparatus 900 is provided, the apparatus including: a first acquiring unit 901 configured to acquire global semantic information of a text and at least one local semantic information corresponding to at least one text segment of the text; a first searching unit 902 configured to obtain at least one first data corresponding to the global semantic information by performing a search in a database based on the global semantic information; a second searching unit 903 configured to obtain, for each local semantic information of the at least one local semantic information, at least one second data corresponding to the local semantic information by performing a search in a database based on the local semantic information; a second acquiring unit 904 configured to obtain a candidate dataset matching unit 905 based on the at least one first data and the at least one second data corresponding to each of the at least one local semantic information, configured to match target data to the at least one text segment based on a correlation degree between each of the at least one text segment and each candidate data of the candidate dataset; and a generating unit 906 configured to generate a video based on the target data matched to each of the at least one text segment. It can be understood that the operations and effects of unit 901 to unit 906 in the video generating apparatus 900 are similar to those of step S201 to step S206 in FIG. 2, respectively, and are not limited here.

[0151] According to some embodiments, as shown in Fig. 10, the video generating apparatus 1000 may further include a summary obtaining unit 1001 configured to obtain a summary text of the text, and a third determining unit 1002 configured to generate at least one of video subtitles, video voice, and video background music based on the summary text. As can be understood, the operations and effects of the units 1003, 1005 to 1006, 1008, and 1014 to 1015 in the video generating apparatus 1000 are similar to those of the units 901 to 906 in the video generating apparatus 900, respectively, and are not limited here.

[0152] According to some embodiments, the global semantic information and the at least one local semantic information may be obtained using a trained unified modal neural network.

[0153] According to some embodiments, as shown in FIG. 10, the video generation apparatus 1000 may further include a first recognition unit 1004 configured to recognize at least one entity word in the at least one text segment.

[0154] According to some embodiments, the first search unit 1005 may include a third search subunit configured to obtain at least one first data by performing a search in a database based on the global semantic information and the title of the text.

[0155] According to some embodiments, the second search unit 1006 may include a second search subunit configured to obtain, for each local semantic information of the at least one local semantic information, at least one second data by performing a search in a database based on the local semantic information and a text segment corresponding to the local semantic information.

[0156] According to some embodiments, obtaining at least one second data by performing a search in a database for each local semantic information of the at least one local semantic information based on the local semantic information and a text segment corresponding to the local semantic information may include: obtaining a plurality of second search results by performing a search in a database for each local semantic information of the at least one local semantic information based on the local semantic information; and obtaining the at least one second data by filtering the plurality of second search results based on at least one of the text segment and the text corresponding to the local semantic information.

[0157] According to some embodiments, as shown in FIG. 10 , the video generation device 1000 may further include a third search unit 1007 configured to, for each of the at least one entity term, obtain at least one third data corresponding to the entity term by performing a search in a database based on the entity term, and the second acquisition unit 1008 may be further configured to obtain a candidate dataset based on the at least one first data, the at least one second data corresponding to each of the at least one local semantic information, and the at least one third data corresponding to each of the at least one entity term.

[0158] According to some embodiments, the third search unit 1007 may include a first search subunit configured to obtain at least one third data by, for each entity term of the at least one entity term, performing a search in a database based on the entity term and the text segment in which the entity term is located.

[0159] According to some embodiments, for each entity term of the at least one entity term, obtaining at least one third data corresponding to the entity term by performing a search in a database based on the entity term and the text segment in which the entity term is located may include: for each entity term of the at least one entity term, performing a search in a database based on the entity term to obtain a plurality of third search results; and obtaining the at least one third data by filtering the plurality of third search results based on at least one of the text segment and the text in which the entity term is located.

[0160] According to some embodiments, as shown in Fig. 11, the video generating apparatus 1100 may further include a content understanding unit 1105 configured to obtain content semantic information of each candidate data in the candidate data set by performing content understanding on the candidate data, a description text acquisition unit 1106 configured to obtain description text information of each candidate data in the candidate data set, and a voice recognition unit 1107 configured to obtain voice text information corresponding to each candidate data in the candidate data set by performing voice recognition on audio data of each candidate data in the candidate data set. As can be understood, the operations and effects of units 1101 to 1104 and units 1108 to 1109 in the video generating apparatus 1100 are similar to those of units 901 to 906 in the video generating apparatus 900, respectively, and will not be further described here.

[0161] According to some embodiments, content understanding includes at least one of text recognition and entity recognition. Returning to Fig. 10, according to some embodiments, the second acquiring unit 1008 may include a third acquiring subunit configured to obtain a plurality of to-be-sliced ​​data by filtering the at least one first data and the at least one second data corresponding to each of the at least one local semantic information based on a first target filtering rule, a carving subunit configured to obtain a plurality of data segments by carving each to-be-sliced ​​data of the plurality of to-be-sliced ​​data based on a target carving rule, and a filtering subunit configured to obtain a candidate data set by filtering the plurality of data segments based on a second target filtering rule.

[0162] According to some embodiments, as shown in FIG. 10 , the video generating device 1000 may further include a first determination unit 1009 configured to determine a target text segment for directly generating video data or image data in at least one text segment, a data generating unit 1010 configured to directly generate fifth data based on the target text segment using a unified modal neural network, and an adding unit 1011 configured to add the fifth data to the candidate dataset.

[0163] According to some embodiments, the data generation unit may include a recognition subunit configured to recognize entity words in the target text segment, and a data generation subunit configured to directly generate fifth data based on the entity words using a unified modal neural network.

[0164] According to some embodiments, as shown in FIG. 10 , the video generating device 1000 may include: an extraction unit 1012 configured to extract text and one or more fourth data corresponding to the text in the original page, where the one or more fourth data correspond to one or more text segments different from the at least one text segment of the text; and a second determination unit 1013 configured to determine each fourth data of the one or more fourth data as target data of the text segment corresponding to the fourth data.

[0165] According to some embodiments, the correlation measure may include a visual correlation measure between the text information of the corresponding text segment and the visual information of the corresponding candidate data, and the visual correlation measure may be determined based on the input text segment and the input candidate data using a unified modal neural network.

[0166] According to some embodiments, the matching unit 1014 may include a determination subunit configured to determine, for each text segment of the at least one text segment, in the candidate dataset, a first number of candidate data having the highest visual correlation with the text segment using a unified modal neural network, and a matching subunit configured to match the target data to the at least one text segment based on the correlation between each of the at least one text segment and each of the corresponding candidate data of the first number of candidate data. According to some embodiments, the visual correlation degree may be determined based on the input text segment, local semantic information corresponding to the input text segment, and the input candidate data using a unified modal neural network.

[0167] According to some embodiments, for at least one text segment including one or more entity words, a visual correlation between the text segment and corresponding candidate data may be determined based on the text segment, the one or more entity words, local semantic information corresponding to the text segment, and the corresponding candidate data using a unified modal neural network.

[0168] According to some embodiments, each candidate data of the candidate data set matches at most one text segment of the at least one text segment. The determining subunit may be further configured, in response to determining that the portion of text segments of the at least one text segment is not successfully matched to the target data, to determine, for each text segment of the portion of text segments, a second number of candidate data in the unmatched candidate data of the candidate data set that has a highest correlation with the text segment, using the unified modal neural network. The matching subunit may be further configured to match the target data to the portion of text segments based on a correlation between each of the portion of text segments and each of the corresponding candidate data of the second number of candidate data.

[0169] According to some embodiments, the generation unit 1015 may include a generation subunit configured to generate a video based on target data matching at least one of a video subtitle, a video voice, a video background music, and at least one text segment, respectively.

[0170] According to some embodiments, the generation unit may be further configured to generate a video based on the target data matched to each of the at least one text segment and the target data matched to each of the one or more text segments.

[0171] According to some embodiments, the correlation degree may further include a first semantic correlation degree between the text information of the relevant text segment and the content semantic information of the corresponding candidate data, and the first semantic correlation degree is determined based on the input text segment and the input content semantic information using a unified modal neural network.

[0172] According to some embodiments, the correlation degree may further include a second semantic correlation degree between the text information of the corresponding text segment and the descriptive text information of the corresponding candidate data, the second semantic correlation degree being determined based on the input text segment and the input descriptive text information using a unified modal neural network.

[0173] According to some embodiments, the correlation degree may further include a third semantic correlation degree between the text information of the relevant text segment and the voice text information of the corresponding candidate data, and the third semantic correlation degree is determined based on the input text segment and the input voice text information using a unified modal neural network.

[0174] According to another aspect of the present disclosure, as shown in FIG. 12 , there is further provided an apparatus 1200 for training a neural network, in which the neural network is configured to embed a plurality of received inputs to obtain corresponding input features, and to process the plurality of input features using a self-attention mechanism, the apparatus including: a third acquiring unit 1201 configured to acquire a sample text, real global semantic information of the sample text, and at least one real local semantic information of the sample text, where the at least one real local semantic information corresponds to at least one text segment of the sample text; a first input unit 1202 configured to obtain predicted global semantic information and at least one predicted local semantic information of the sample text by inputting a plurality of first sample words included in the sample text into the neural network; and a first calculation unit 1203 configured to calculate a first loss value based on at least one actual local semantic information and at least one predicted local semantic information; a fourth acquisition unit 1204 configured to acquire a sample text segment, positive example sample data corresponding to the sample text segment, and negative example sample data corresponding to the sample text segment, where the positive example sample data and the negative example sample data are both video data or image data; a second input unit 1205 configured to obtain a positive example sample visual correlation value between the sample text segment and the positive example sample data by inputting a plurality of second sample words included in the sample text segment and at least one positive example image block included in the positive example sample data into a neural network, where the positive example sample visual correlation value indicates a correlation value between text information of the sample text segment and visual information of the positive example sample data;The method includes: a third input unit 1206 configured to obtain a negative example sample visual correlation value between the sample text segment and the negative example sample data by inputting a plurality of second sample words included in the sample text segment and at least one negative example image block included in the negative example sample data to a neural network, where the negative example sample visual correlation value indicates a correlation value between text information of the sample text segment and visual information of the negative example sample data; a second calculation unit 1207 configured to calculate a second loss value based on the positive example sample visual correlation value and the negative example sample visual correlation value, where the second loss value is negatively correlated with the positive example sample visual correlation value and positively correlated with the negative example sample visual correlation value; and an adjustment unit 1208 configured to adjust parameters of the neural network based on the first loss value and the second loss value. As can be understood, the operations and effects of the units 1201 to 1208 in the training device 1200 are similar to those of steps S601 to S608 in FIG. 6, respectively, and will not be further described here.

[0175] According to some embodiments, as shown in Fig. 13, the neural network training apparatus 1300 may further include a fifth obtaining unit 1308 configured to obtain an actual sample summary text, a fourth input unit 1309 configured to obtain a predicted sample summary text of the sample text by inputting a plurality of first sample words into the neural network, and a third calculating unit 1310 configured to calculate a third loss value based on the actual sample summary text and the predicted sample summary text. The adjusting unit 1311 is further configured to adjust the parameters of the neural network based on the first loss value, the second loss value and the third loss value. As can be understood, the operations and effects of the units 1301 to 1307 in the training apparatus 1300 are similar to those of the units 1201 to 1207 in the training apparatus 1200, respectively, and will not be further described here.

[0176] According to some embodiments, the actual sample summary text may be determined based on user input, so that the data input or selected by the user can be used to further train the unified modal neural network, thereby realizing feedback learning and ensuring that the video generation effect can be continuously upgraded and optimized.

[0177] According to some embodiments, as shown in FIG. 14 , the neural network training apparatus 1400 includes: a sixth acquiring unit 1408 configured to acquire related text information of the positive example sample data and related text information of the negative example sample data, where the related text information includes at least one of content semantic information, written text information, and voice text information of the corresponding sample data; and a fifth input unit 1409 configured to obtain a positive example sample semantic correlation degree between the sample text segment and the positive example sample data by inputting a plurality of second sample words and at least one third sample word included in the related text information of the positive example sample data into the neural network, where the positive example sample semantic correlation degree is a correlation degree between the text information of the sample text segment and the related text information of the positive example sample data. The fourth calculation unit 1411 may further include a fifth input unit 1409 for indicating a correlation degree between the sample text segment and the negative example sample data, a sixth input unit 1410 configured to obtain a negative example sample semantic correlation degree between the sample text segment and the negative example sample data by inputting a plurality of second sample words and at least one fourth sample word included in the related text information of the negative example sample data to the neural network, the negative example sample semantic correlation degree indicating a correlation degree between the text information of the sample text segment and the related text information of the negative example sample data, and a fourth calculation unit 1411 configured to calculate a fourth loss value based on the positive example sample semantic correlation degree and the negative example sample semantic correlation degree, the fourth loss value being negatively correlated with the positive example sample semantic correlation degree and positively correlated with the negative example sample semantic correlation degree. The adjustment unit 1412 is further configured to adjust a parameter of the neural network based on the first loss value, the second loss value and the fourth loss value.As can be understood, the operations and effects of the units 1401 to 1407 in the training apparatus 1400 are similar to those of the units 1201 to 1207 in the training apparatus 1200, respectively, and will not be further described here.

[0178] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of relevant user personal information shall all comply with the provisions of relevant laws and regulations and shall not violate public order and good customs.

[0179] According to embodiments of the present disclosure, an electronic device, a readable storage medium, and a computer program product are further provided. With reference to FIG. 15, a structural block diagram of an electronic device 1500 that can be used as a server or client of the present disclosure, which is an example of a hardware device applicable to various aspects of the present disclosure, is described herein. The electronic device is intended to refer to various forms of digital electronic computing devices, such as laptop computers, desktop computers, stages, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, mobile phones, smartphones, wearable devices, and other similar computing devices. The components, their connections, and their functions shown herein are merely exemplary and are not intended to limit the practice of the present disclosure as described and / or claimed herein.

[0180] As shown in Fig. 15, the device 1500 includes a computing unit 1501, which can perform various suitable operations and processes by means of a computer program stored in a read-only memory (ROM) 1502 or loaded from a storage unit 1508 into a random access memory (RAM) 1503. In the RAM 1503, various programs and data required for operating the device 1500 can be further stored. The computing unit 1501, the ROM 1502 and the RAM 1503 are connected to each other by a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.

[0181] The components in the device 1500 are connected to an I / O interface 1505, and include an input unit 1506, an output unit 1507, a storage unit 1508, and a communication unit 1509. The input unit 1506 may be any type of device capable of inputting information to the device 1500, and the input unit 1506 may receive input numeric or character information and generate key signal inputs related to user settings and / or function control of the computing device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a trackboard, a trackball, a joystick, a microphone, and / or a remote control. The output unit 1507 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1508 may include, but is not limited to, a magnetic disk, an optical disk. The communications unit 1509 enables the device 1500 to exchange information / data with other devices via a computer network, e.g., the Internet, and / or various telecommunications networks, and may include, but is not limited to, a modem, a network card, an infrared communications device, a wireless communications transceiver, and / or a chipset, e.g., a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communications device, and / or the like.

[0182] The computing unit 1501 may be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Examples of the computing unit 1501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, computing units that execute various machine learning network algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1501 executes the above methods and processes, such as the video generation method and the neural network training method. For example, in some embodiments, the video generation method and the neural network training method may be embodied as a computer software program and tangibly included in a machine-readable medium, such as the storage unit 1508. In some embodiments, parts or all of the computer program may be loaded and / or installed in the device 1500 via the ROM 1502 and / or the communication unit 1509. When the computer program is loaded into the RAM 1503 and executed by the computing unit 1501, one or more steps of the video generation method and the neural network training method described above may be executed. Alternatively, in other embodiments, the computing unit 1501 may be configured (eg, by firmware) to perform the video generation method and the neural network training method in any other suitable manner.

[0183] Various embodiments of the systems and techniques described herein above may be implemented in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), software hardware, firmware, software, and / or combinations thereof. These various embodiments may be embodied in one or more computer programs that may be executed and / or interpreted by a programmable system that includes at least one programmable processor, which may be a special purpose or general purpose programmable processor, and may receive data and instructions from a storage system, at least one input device, at least one output device, and may transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0184] The program code implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer or other programmable data processing apparatus, so that when executed by the processor or controller, the program code performs the functions / operations specified in the flowcharts and / or block diagrams. The program code may be entirely executed on a machine, partly executed on a machine, partly executed on a machine and partly executed on a remote machine as a separate software package, or entirely executed on a remote machine or server.

[0185] In the context of this disclosure, a machine-readable medium may be a tangible medium, which may include or store a program for use in or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection with one or more leads, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0186] To provide for interaction with a user, a computer may implement the systems and techniques described herein and include a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) through which the user may provide input to the computer. Other types of devices may also be provided for providing interaction with a user. For example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and may receive input from the user in any form (including audio input, speech input, or tactile input).

[0187] The systems and techniques described herein may be implemented in a computing system including backstage components (e.g., as a data server), middleware components (e.g., an application server), front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques), or any combination of backstage, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0188] The computer system may include a client and a server. The client and the server are generally remote from each other and usually interact with each other via a communication network. The client-server relationship is generated by running computer programs having a client-server relationship on corresponding computers. The server is a cloud server, also called a cloud computing server or cloud host, which is one host product in a cloud computing service system and solves the problems of high management difficulty and low business scalability that exist in conventional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may be a server of a distributed system or a server combined with a blockchain.

[0189] It should be understood that the above-mentioned various forms of flow may be used, and the order may be rearranged, added, or removed. For example, each step described in this disclosure may be performed in parallel, sequentially, or in a different order, and the present disclosure is not limited thereto, as long as the technical solution disclosed in this disclosure can achieve the desired results.

[0190] Although the embodiments or examples of the present application have been described with reference to the drawings, it should be understood that the above methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present disclosure is not limited by these embodiments or examples, but only by the scope of the appended claims and their equivalents. Various elements of the embodiments or examples may be omitted or replaced by their equivalents. Also, each step may be performed in a different order from the order described in this disclosure. Furthermore, various elements of the embodiments or examples may be combined in various ways. It is important to note that as technology evolves, many elements described herein may be replaced by the same elements that appear later in this disclosure.

Claims

1. A computer-implemented method for generating video, comprising: obtaining global semantic information of a text and at least one local semantic information corresponding to at least one text segment of the text; performing a search in a database based on the global semantic information to obtain at least one first data corresponding to the global semantic information; For each local semantic information of the at least one local semantic information, performing a search in the database based on the local semantic information to obtain at least one second data corresponding to the local semantic information; obtaining a candidate data set based on the at least one first data and at least one second data corresponding to each of the at least one local semantic information; matching target data, including video data or image data, to each of the at least one text segments based on a degree of correlation between each of the at least one text segment and each of the candidate data sets of the candidate data; generating a video based on target data matched to each of the at least one text segment; the global semantic information and the at least one local semantic information are obtained using a trained unified-modal neural network, and the correlation degree includes a visual correlation degree between text information of the corresponding text segment and visual information of the corresponding candidate data, the visual correlation degree being determined based on an input text segment and an input candidate data using the unified-modal neural network.

2. recognizing at least one entity word in the at least one text segment; and for each of the at least one entity term, performing a search in the database based on the entity term to obtain at least one third data corresponding to the entity term; wherein obtaining a candidate data set based on the at least one first data and at least one second data corresponding to each of the at least one local semantic information includes:

2. The method of claim 1, comprising obtaining the candidate data set based on the at least one first data, at least one second data corresponding to each of the at least one local semantic information, and at least one third data corresponding to each of the at least one entity term.

3. The step of obtaining at least one third data corresponding to each of the at least one entity term by searching the database based on the entity term includes:

3. The method of claim 2, further comprising obtaining the at least one third data by, for each entity term of the at least one entity term, performing a search in the database based on the entity term and the text segment in which the entity term is located.

4. obtaining at least one third data corresponding to each of the at least one entity term by performing a search in the database based on the entity term and the text segment in which the entity term is located, for each of the at least one entity term; for each entity term of the at least one entity term, performing a search in the database based on the entity term to obtain a plurality of third search results; 4. The method of claim 3, further comprising obtaining the at least one third data by filtering the plurality of third search results based on at least one of the text and the text segment in which the entity term is located.

5. For each piece of local semantic information among the at least one piece of local semantic information, performing a search in the database based on the local semantic information to obtain at least one second data corresponding to the local semantic information includes:

5. The method according to claim 1, further comprising obtaining the at least one second data by performing a search in the database for each local semantic information of the at least one local semantic information based on the local semantic information and a text segment corresponding to the local semantic information.

6. obtaining the at least one second data by performing a search in the database based on each local semantic information of the at least one local semantic information and a text segment corresponding to the local semantic information, for each local semantic information of the at least one local semantic information, performing a search in the database based on the local semantic information to obtain a plurality of second search results; and obtaining the at least one second data by filtering the plurality of second search results based on at least one of the text and the text segment corresponding to the local semantic information.

7. Obtaining at least one first data corresponding to the global semantic information by performing a search in a database based on the global semantic information includes: The method of claim 5 , further comprising obtaining the at least one first data by performing a search in the database based on the global semantic information and the title of the text.

8. performing content understanding on each candidate data of the candidate data set to obtain content semantic information of the candidate data; 2. The method of claim 1, wherein the correlation degree further includes a first semantic correlation degree between the text information of the relevant text segment and the content semantic information of the corresponding candidate data, and the first semantic correlation degree is determined based on the input text segment and the input content semantic information using the unified modal neural network.

9. The method of claim 8 , wherein the content understanding includes at least one of text recognition and entity recognition.

10. obtaining descriptive text information for each candidate data in the candidate data set; 2. The method of claim 1, wherein the correlation degree further includes a second semantic correlation degree between the text information of the relevant text segment and the descriptive text information of the corresponding candidate data, and the second semantic correlation degree is determined based on the input text segment and the input descriptive text information using the unified modal neural network.

11. performing voice recognition on audio data of each candidate data in the candidate data set to obtain voice text information corresponding to the candidate data; 2. The method of claim 1, wherein the correlation degree further includes a third semantic correlation degree between the text information of the relevant text segment and the voice text information of the corresponding candidate data, and the third semantic correlation degree is determined based on the input text segment and the input voice text information using the unified modal neural network.

12. said matching target data to said at least one text segment comprises: determining, for each text segment of the at least one text segment, a first number of candidate data in the candidate data set that have a highest visual correlation with the text segment, using the unified modal neural network; and matching target data to the at least one text segment based on a correlation degree between each of the at least one text segment and each of the first number of candidate data corresponding to the at least one text segment.

13. Each candidate data in the candidate data set matches at most one text segment in the at least one text segment, and wherein the matching of target data to the at least one text segment comprises: in response to determining that a portion of the at least one text segment is not successfully matched to the target data, determining, using the unified modal neural network, for each text segment of the portion of text segments, a second number of candidate data in the candidate data set that are most highly correlated with the text segment; 13. The method of claim 12, further comprising: matching target data to the portion of text segments based on a degree of correlation between each of the portion of text segments and each of the corresponding candidate data among the second number of candidate data.

14. 2. The method of claim 1, wherein the visual correlation degree is determined based on an input text segment, local semantic information corresponding to the input text segment, and input candidate data using the unified modal neural network.

15. further comprising recognizing entity words in the at least one text segment; 15. The method of claim 14, wherein, for a text segment including one or more entity words among the at least one text segment, a visual correlation degree between the text segment and corresponding candidate data is determined based on the text segment, the one or more entity words, local semantic information corresponding to the text segment, and the corresponding candidate data using the unified modal neural network.

16. determining a target text segment for directly generating video or image data in the at least one text segment; Utilizing the unified modal neural network to directly generate fifth data based on the target text segment, where visual content of the fifth data is associated with the target text segment; and adding the fifth data to the candidate data set.

17. said directly generating fifth data based on the target text segment further comprising: recognizing entity words in the target text segment; and utilizing the unified modal neural network to directly generate the fifth data based on the entity words.

18. Extracting the text and one or more fourth data corresponding to the text in an original page, where the one or more fourth data correspond to one or more text segments of the text that are different from the at least one text segment; determining each of the one or more fourth data as target data of a text segment corresponding to the fourth data; wherein generating a video based on target data matched to each of the at least one text segment includes: The method of claim 1 , comprising generating the video based on target data matched to each of the at least one text segment and target data matched to each of the one or more text segments.

19. Obtaining a candidate data set based on the at least one first data and at least one second data corresponding to each of the at least one local semantic information includes: Obtaining a plurality of data to be dissected by filtering the at least one first data and at least one second data corresponding to each of the at least one local semantic information according to a first target filtering rule; obtaining a plurality of data segments by carving each to-be-carved data among the plurality of to-be-carved data according to a target carving rule; The method of claim 1 , further comprising obtaining the candidate data set by filtering the plurality of data segments based on a second target filtering rule.

20. obtaining a summary text of the text; determining at least one of a video subtitle, a video voice, and a video background music based on the summary text; wherein generating a video based on target data matched to each of the at least one text segment includes: The method of claim 1 , further comprising: generating the video based on target data matching at least one of the video subtitles, the video voice, the video background music, and the at least one text segment, respectively.

21. A computer-implemented method for training a neural network, the neural network being configured to embed a plurality of received inputs to obtain a plurality of corresponding input features, and to process the plurality of input features utilizing a self-attention mechanism, the method comprising: Obtaining a sample text, actual global semantic information of the sample text, and at least one actual local semantic information of the sample text, where the at least one actual local semantic information corresponds to at least one text segment of the sample text; obtaining predicted global semantic information and at least one predicted local semantic information of the sample text by inputting a plurality of first sample words included in the sample text into the neural network; calculating a first loss value based on the actual global semantic information, the predicted global semantic information, the at least one actual local semantic information, and the at least one predicted local semantic information; Obtaining a sample text segment, positive example sample data corresponding to the sample text segment, and negative example sample data corresponding to the sample text segment; obtaining a positive example visual correlation degree between the sample text segment and the positive example sample data by inputting a plurality of second sample words included in the sample text segment and at least one positive example image block included in the positive example sample data into the neural network, the positive example visual correlation degree indicating a correlation degree between text information of the sample text segment and visual information of the positive example sample data; obtaining a negative example sample visual correlation degree between the sample text segment and the negative example sample data by inputting the plurality of second sample words and at least one negative example image block included in the negative example sample data into the neural network, the negative example sample visual correlation degree indicating a correlation degree between text information of the sample text segment and visual information of the negative example sample data; Calculate a second loss value based on the visual correlation degree of the positive example samples and the visual correlation degree of the negative example samples, where the second loss value is negatively correlated with the visual correlation degree of the positive example samples and positively correlated with the visual correlation degree of the negative example samples; and adjusting parameters of the neural network based on the first loss value and the second loss value.

22. Obtaining a real sample summary text; obtaining a predicted sample summary text of the sample text by inputting the first plurality of sample words into the neural network; and calculating a third loss value based on the actual sample summary text and the predicted sample summary text; Here, adjusting the parameters of the neural network includes:

22. The method of claim 21, comprising adjusting parameters of the neural network based on the first loss value, the second loss value, and the third loss value.

23. The method of claim 22 , wherein the actual global semantic information, the at least one actual local semantic information, the positive example sample data, and the actual sample summary text are determined based on user input.

24. Obtaining related text information of the positive example sample data and related text information of the negative example sample data, the related text information including at least one of content semantic information, descriptive text information, and voice text information of the corresponding sample data; obtaining a positive example sample semantic correlation degree between the sample text segment and the positive example sample data by inputting the plurality of second sample words and at least one third sample word included in related text information of the positive example sample data into the neural network, the positive example sample semantic correlation degree indicating a correlation degree between the text information of the sample text segment and related text information of the positive example sample data; obtaining a negative example sample semantic correlation degree between the sample text segment and the negative example sample data by inputting the plurality of second sample words and at least one fourth sample word included in the related text information of the negative example sample data into the neural network, the negative example sample semantic correlation degree indicating a correlation degree between the text information of the sample text segment and the related text information of the negative example sample data; Calculating a fourth loss value based on the positive example sample semantic correlation degree and the negative example sample semantic correlation degree, wherein the fourth loss value is negatively correlated with the positive example sample semantic correlation degree and positively correlated with the negative example sample semantic correlation degree; Here, adjusting the parameters of the neural network includes:

24. The method of claim 21, further comprising adjusting parameters of the neural network based on the first loss value, the second loss value and the fourth loss value.

25. 1. A video generation device, comprising: a first obtaining unit configured to obtain global semantic information of a text and at least one local semantic information corresponding to at least one text segment of the text; a first search unit configured to obtain at least one first data corresponding to the global semantic information by performing a search in a database based on the global semantic information; a second search unit configured to, for each local semantic information of the at least one local semantic information, obtain at least one second data corresponding to the local semantic information by performing a search in the database based on the local semantic information; a second acquisition unit configured to acquire a candidate data set based on the at least one first data and at least one second data corresponding to each of the at least one local semantic information; a matching unit configured to match target data, including video data or image data, to each of the at least one text segment based on a correlation degree between each of the at least one text segment and each candidate data of the candidate data set; a generating unit configured to generate a video based on target data matched to each of the at least one text segment; The global semantic information and the at least one local semantic information are obtained using a trained unified-modal neural network, and the correlation degree includes a visual correlation degree between text information of the relevant text segment and visual information of corresponding candidate data, and the visual correlation degree is determined based on an input text segment and an input candidate data using the unified-modal neural network.

26. a first recognition unit configured to recognize at least one entity word in the at least one text segment; a third search unit configured to, for each entity term of the at least one entity term, perform a search in the database based on the entity term to obtain at least one third data corresponding to the entity term; 26. The apparatus of claim 25, wherein the second obtaining unit is further configured to obtain the candidate data set based on the at least one first data, at least one second data corresponding to each of the at least one local semantic information, and at least one third data corresponding to each of the at least one entity term.

27. The third search unit is The apparatus of claim 26, further comprising a first search subunit configured to obtain the at least one third data by, for each entity term of the at least one entity term, performing a search in the database based on the entity term and a text segment in which the entity term is located.

28. obtaining at least one third data corresponding to each of the at least one entity term by performing a search in the database based on the entity term and the text segment in which the entity term is located, for each of the at least one entity term; for each entity term of the at least one entity term, performing a search in the database based on the entity term to obtain a plurality of third search results; and obtaining the at least one third data by filtering the plurality of third search results based on at least one of the text and the text segment in which the entity term is located.

29. The second search unit: The apparatus according to any one of claims 25 to 28, further comprising a second search subunit configured to, for each local semantic information of the at least one local semantic information, obtain the at least one second data by performing a search in the database based on the local semantic information and a text segment corresponding to the local semantic information.

30. obtaining the at least one second data by performing a search in the database based on each local semantic information of the at least one local semantic information and a text segment corresponding to the local semantic information, for each local semantic information of the at least one local semantic information, performing a search in the database based on the local semantic information to obtain a plurality of second search results; and obtaining the at least one second data by filtering the plurality of second search results based on at least one of the text and the text segment corresponding to the local semantic information.

31. The first search unit includes: The apparatus according to claim 29, further comprising a third search subunit configured to obtain the at least one first data by performing a search in the database based on the global semantic information and a title of the text.

32. A content understanding unit configured to perform content understanding on each candidate data of the candidate data set to obtain content semantic information of the candidate data; 26. The apparatus of claim 25, wherein the correlation degree further includes a first semantic correlation degree between the text information of the relevant text segment and content semantic information of the corresponding candidate data, and the first semantic correlation degree is determined based on the input text segment and the input content semantic information using the unified modal neural network.

33. The apparatus of claim 32 , wherein the content understanding includes at least one of text recognition and entity recognition.

34. a description text obtaining unit configured to obtain description text information of each candidate data in the candidate data set; 26. The apparatus of claim 25, wherein the correlation degree further includes a second semantic correlation degree between the text information of the relevant text segment and the descriptive text information of the corresponding candidate data, and the second semantic correlation degree is determined based on the input text segment and the input descriptive text information using the unified modal neural network.

35. a voice recognition unit configured to perform voice recognition on audio data of each candidate data in the candidate data set to obtain voice text information corresponding to the candidate data; 26. The apparatus of claim 25, wherein the correlation degree further includes a third semantic correlation degree between the text information of the relevant text segment and the voice text information of the corresponding candidate data, and the third semantic correlation degree is determined based on the input text segment and the input voice text information using the unified modal neural network.

36. The matching unit comprises: a determining subunit configured to determine, for each text segment of the at least one text segment, a first number of candidate data in the candidate data set that have a highest visual correlation with the text segment, using the unified modal neural network; and a matching subunit configured to match target data to the at least one text segment based on a correlation degree between each of the at least one text segment and each of the first number of candidate data corresponding to the at least one text segment.

37. each candidate data of the candidate data set matches at most one text segment of the at least one text segment; wherein the determining subunit is further configured to, in response to determining that a portion of the at least one text segment is not successfully matched to the target data, determine, for each text segment of the portion of the text segments, a second number of candidate data in the unmatched candidate data of the candidate data set that are most highly correlated with the text segment, using the unified modal neural network; and the matching subunit is further configured to match target data to the portion of text segments based on a correlation degree between each of the portion of text segments and each candidate data among a second number of candidate data corresponding to each of the portion of text segments.

38. 26. The apparatus of claim 25, wherein the visual correlation measure is determined based on an input text segment, local semantic information corresponding to the input text segment, and input candidate data using the unified modal neural network.

39. a second recognition unit configured to recognize entity words in the at least one text segment; 39. The apparatus of claim 38, wherein, for a text segment including one or more entity words among the at least one text segment, a visual correlation degree between the text segment and corresponding candidate data is determined based on the text segment, the one or more entity words, local semantic information corresponding to the text segment, and the corresponding candidate data using the unified-modal neural network.

40. a first determining unit configured to determine a target text segment for directly generating video data or image data in the at least one text segment; a data generating unit configured to utilize the unified modal neural network to directly generate fifth data based on the target text segment, the fifth data having visual content associated with the target text segment; and an addition unit configured to add the fifth data to the candidate data set.

41. The data generating unit includes: a recognition subunit configured to recognize entity words in the target text segment; and a data generation subunit configured to utilize the unified modal neural network to directly generate the fifth data based on the entity words.

42. an extraction unit configured to extract the text and one or more fourth data corresponding to the text in an original page, the one or more fourth data corresponding to one or more text segments of the text different from the at least one text segment; a second determining unit configured to determine each fourth data of the one or more fourth data as target data of a text segment corresponding to the fourth data; 26. The apparatus of claim 25, wherein the generating unit is further configured to generate the video based on target data matched to each of the at least one text segment and target data matched to each of the one or more text segments.

43. The second acquisition unit includes: an acquisition subunit configured to obtain a plurality of to-be-segmented data by filtering the at least one first data and at least one second data corresponding to each of the at least one local semantic information according to a first target filtering rule; a carving subunit configured to obtain a plurality of data segments by carving each to-be-carved data of the plurality of to-be-carved data according to a target carving rule; and a filtering subunit configured to obtain the candidate data set by filtering the plurality of data segments based on a second target filtering rule.

44. a summary obtaining unit configured to obtain a summary text of the text; and a third determining unit configured to determine at least one of a video subtitle, a video voice, and a video background music based on the summary text; Here, the generating unit is The apparatus of claim 25, further comprising a generating subunit configured to generate the video based on target data matching at least one of the video subtitles, the video voice, the video background music and each of the at least one text segment.

45. 1. An apparatus for training a neural network, the neural network being configured to embed a plurality of received inputs to obtain a plurality of corresponding input features, and to process the plurality of input features utilizing a self-attention mechanism, the apparatus comprising: A third acquisition unit configured to acquire a sample text, actual global semantic information of the sample text, and at least one actual local semantic information of the sample text, the at least one actual local semantic information corresponding to at least one text segment of the sample text; a first input unit configured to obtain predicted global semantic information and at least one predicted local semantic information of the sample text by inputting a plurality of first sample words included in the sample text to the neural network; a first calculation unit configured to calculate a first loss value based on the actual global semantic information, the predicted global semantic information, the at least one actual local semantic information, and the at least one predicted local semantic information; a fourth acquiring unit configured to acquire a sample text segment, positive example sample data corresponding to the sample text segment, and negative example sample data corresponding to the sample text segment; a second input unit configured to obtain a positive example visual correlation degree between the sample text segment and the positive example sample data by inputting a plurality of second sample words included in the sample text segment and at least one positive example image block included in the positive example sample data to the neural network, the positive example visual correlation degree indicating a correlation degree between text information of the sample text segment and visual information of the positive example sample data; a third input unit configured to obtain a negative example sample visual correlation degree between the sample text segment and the negative example sample data by inputting the plurality of second sample words and at least one negative example image block included in the negative example sample data to the neural network, the negative example sample visual correlation degree indicating a correlation degree between text information of the sample text segment and visual information of the negative example sample data; a second calculation unit configured to calculate a second loss value based on the positive example sample visual correlation degree and the negative example sample visual correlation degree, the second loss value being negatively correlated with the positive example sample visual correlation degree and positively correlated with the negative example sample visual correlation degree; an adjustment unit configured to adjust parameters of the neural network based on the first loss value and the second loss value.

46. a fifth acquiring unit configured to acquire the actual sample summary text; a fourth input unit configured to input the first plurality of sample words into the neural network to obtain a predicted sample summary text of the sample text; a third calculation unit configured to calculate a third loss value based on the actual sample summary text and the predicted sample summary text; 46. ​​The apparatus of claim 45, wherein the tuning unit is further configured to adjust parameters of the neural network based on the first loss value, the second loss value, and the third loss value.

47. 47. The apparatus of claim 46, wherein the actual global semantic information, the at least one actual local semantic information, the positive example sample data, and the actual sample summary text are determined based on user input.

48. A sixth acquisition unit configured to acquire related text information of the positive example sample data and related text information of the negative example sample data, the related text information including at least one of content semantic information, description text information, and voice text information of the corresponding sample data; a fifth input unit configured to obtain a positive example sample semantic correlation degree between the sample text segment and the positive example sample data by inputting the plurality of second sample words and at least one third sample word included in related text information of the positive example sample data to the neural network, the positive example sample semantic correlation degree indicating a correlation degree between text information of the sample text segment and related text information of the positive example sample data; a sixth input unit configured to obtain a negative example sample semantic correlation degree between the sample text segment and the negative example sample data by inputting the plurality of second sample words and at least one fourth sample word included in related text information of the negative example sample data to the neural network, the negative example sample semantic correlation degree indicating a correlation degree between the text information of the sample text segment and related text information of the negative example sample data; a fourth calculation unit configured to calculate a fourth loss value based on the positive example sample semantic correlation degree and the negative example sample semantic correlation degree, the fourth loss value being negatively correlated with the positive example sample semantic correlation degree and positively correlated with the negative example sample semantic correlation degree; 48. The apparatus of any one of claims 45 to 47, wherein the adjustment unit is further configured to adjust parameters of the neural network based on the first loss value, the second loss value and the fourth loss value.

49. An electronic device, At least one processor; and a memory communicatively coupled to the at least one processor, wherein: The memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, enable the at least one processor to perform the method according to any one of claims 1 to 4.

50. A non-transitory computer readable storage medium having stored thereon computer instructions, the computer instructions being used to cause a computer to carry out the method according to any one of claims 1 to 4.

51. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • How to search for available content and the system

    JP2010503112A

  • Method and device for generating video

    JP2020173776A

  • Vectorized representation method of document, vectorized representation device of document, and computer device

    JP2021099774A

  • Video retrieval method, apparatus, device and medium

    JP2021114287A