Text processing method and apparatus, device, and medium

By generating and replacing text content on the text editing page and combining the generation of video drafts, the problem of simple existing text generation functions is solved, realizing deep editing of text and rich processing of multimedia resources.

WO2025093004A1PCT designated stage expired Publication Date: 2025-05-08BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Application Number
PCT/CN2024/129478
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-03
Filing Date
2024-11-01
Publication Date
2025-05-08

AI Technical Summary

Technical Problem

The existing text generation function is relatively simple and cannot meet the users' deep editing needs.

Method used

A text processing method is provided, by displaying the initial text on a text editing page, generating the second text content in response to the user's text generation operation, and replacing the first text content in the initial text with the second text content, obtaining the target text. Generate video drafts based on the target text, including text editing clips.

Benefits of technology

It realizes further processing and editing of the initial text, supports the generation of video drafts, enriches the text processing functions of multimedia resources, and meets users' deeper editing and interaction needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024129478_08052025_PF_FP_ABST
    Figure CN2024129478_08052025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present invention relate to a text processing method and apparatus, a device, and a medium. The method comprises: displaying initial text on a text editing page, wherein the initial text is generated on the basis of text description information, and the text description information is used for describing a condition that the initial text needs to match; in response to a text generation operation on first text content in the initial text, generating second text content on the basis of the first text content, wherein the first text content is the same as part of the second text content; in response to a replacement operation on the second text content, replacing the first text content in the initial text with the second text content to obtain target text; and generating a draft video on the basis of the target text, wherein the draft video comprises at least one text edition segment generated on the basis of the target text. The present invention enriches text processing related functions of multimedia resources, thereby satisfying higher-level editing requirements and interaction requirements of a user on text generation.
Need to check novelty before this filing date? Find Prior Art

Description

Text processing method, device, equipment and medium

[0001] This application claims priority to the Chinese invention patent application entitled “A text processing method, device, equipment and medium” and application number 202311459951.0, filed on November 3, 2023. The entire contents of that application are incorporated by reference into this application. Technical Field

[0002] The present disclosure relates to the field of data processing technology, and in particular to a text processing method, apparatus, device, and medium. Background Art

[0003] With the development of natural language processing technology, more and more natural language tasks can be processed, such as text generation, dialogue, etc. At present, the function of text generation is relatively simple and cannot meet the editing needs of users.

[0004] Summary of the Invention

[0005] In order to solve the above technical problems, the present disclosure provides a text processing method, device, equipment and medium.

[0006] An embodiment of the present disclosure provides a text processing method, which includes: displaying an initial text on a text editing page, wherein the initial text is generated based on text description information, and the text description information is used to describe the conditions that the initial text needs to match; in response to a text generation operation on a first text content in the initial text, generating a second text content based on the first text content, wherein the first text content is partially identical to the second text content; in response to a replacement operation on the second text content, replacing the first text content in the initial text with the second text content to obtain a target text; and generating a video draft based on the target text, wherein the video draft includes at least one text editing segment generated based on the target text.

[0007] An embodiment of the present disclosure also provides a text processing device, which includes: a display module for displaying an initial text on a text editing page, wherein the initial text is generated based on text description information, and the text description information is used to describe the conditions that the initial text needs to match; a first generation module for generating a second text content based on the first text content in response to a text generation operation on the first text content in the initial text, wherein the first text content is identical to part of the text content of the second text content; a replacement module for replacing the first text content in the initial text with the second text content in response to a replacement operation on the second text content to obtain a target text; and a second generation module for generating a video draft based on the target text, wherein the video draft includes at least one text editing segment generated based on the target text.

[0008] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing instructions executable by the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the text processing method provided by the embodiment of the present disclosure.

[0009] An embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the text processing method provided by the embodiment of the present disclosure.

[0010] The embodiments of the present disclosure further provide a computer program product, comprising computer program instructions, which implement the text processing method provided in the embodiments of the present disclosure when the computer program instructions are executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0012] FIG1 is a flow chart of a text processing method provided by an embodiment of the present disclosure;

[0013] FIG2 is a schematic diagram of a text generation page provided by an embodiment of the present disclosure;

[0014] FIG3 is a schematic diagram of a text editing page provided by an embodiment of the present disclosure;

[0015] FIG4 is a flow chart of another text processing method provided by an embodiment of the present disclosure;

[0016] FIG5 is a schematic diagram of a text card provided by an embodiment of the present disclosure;

[0017] FIG6 is a schematic diagram of another text card provided by an embodiment of the present disclosure;

[0018] FIG7 is a schematic diagram of another text editing page provided by an embodiment of the present disclosure;

[0019] FIG8 is a schematic structural diagram of a text processing device provided by an embodiment of the present disclosure;

[0020] FIG9 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0022] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0023] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0024] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0025] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0026] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0027] The present disclosure provides a text processing method, which is described below in conjunction with specific embodiments.

[0028] FIG1 is a flow chart of a text processing method provided by an embodiment of the present disclosure. The method can be executed by a text processing device, wherein the device can be implemented using software and / or hardware and can generally be integrated into an electronic device. As shown in FIG1 , the method includes:

[0029] Step 101: Display an initial text on a text editing page, wherein the initial text is generated based on text description information, and the text description information is used to describe conditions that the initial text needs to match.

[0030] The text processing method of the embodiment of the present disclosure can be applied to a processing plug-in, which can be set in a target application. The target application can be an application that supports editing and processing of multimedia such as text, images, and videos. For example, the target application can be a video editing application, an image editing application, etc., without limitation.

[0031] In some embodiments, the text editing page may be a page for editing and processing the initial text, and the text editing page may be displayed in response to an edit trigger operation on the initial text on the text generation page. The initial text may be text obtained through natural language processing based on text description information, and the initial text is used to generate text-related content in a video draft, and the initial text may include at least one text fragment. The text description information may be information that describes the conditions, goals, or requirements that need to be matched for the initial text to be generated, and the text description information may be input by the user on the text generation page. The text generation page may be a page for generating the above-mentioned initial text, and may be a page in the form of a dialogue.

[0032] In an embodiment of the present disclosure, the text processing device can display the initial text generated based on the text description information on the text generation page, and can display the text editing page in response to the editing trigger operation of the initial text in the text generation page, and display the initial text in the text editing page.

[0033] In some embodiments, after the initial text is displayed on the text editing page, the text processing method may further include: in response to an input operation and / or a deletion operation on the text editing page, adding text corresponding to the input operation to the initial text and / or deleting text corresponding to the deletion operation. And when the number of words in the initial text of the text editing page reaches a word count threshold, a word count prompt is performed. The word count threshold can be set according to actual conditions, for example, the word count threshold can be 2000. The text editing page supports users to perform input operations and / or deletion operations therein to implement editing of adding text and / or deleting text in the initial text, thereby meeting the user's basic editing needs for the initial text.

[0034] Exemplarily, FIG2 is a schematic diagram of a text generation page provided by an embodiment of the present disclosure. As shown in FIG2 , an exemplary text generation page 200 is shown in the figure. A card 201 is displayed in the text generation page 200. The card 201 includes an initial text generated based on the text description information. The initial text in the figure exemplarily includes two text segments. For example, if the text description information is to generate a movie review, the initial text in the card 201 is the movie review. In addition, the text generation page 200 also includes an edit trigger control 202. When the user triggers the edit trigger control 202 or performs a trigger operation on the initial text, it can be determined that the edit trigger operation has been received, and the text editing page can be displayed.

[0035] For example, FIG3 is a schematic diagram of a text editing page provided by an embodiment of the present disclosure. As shown in FIG3 , an exemplary text editing page 300 is shown. The text editing page 300 includes the initial text in the card 201 in FIG2 . In addition, the initial text can be input by calling up a keyboard 305 on the text editing page 300 .

[0036] Step 102 : In response to the text generation operation on the first text content in the initial text, generate second text content based on the first text content, wherein the first text content and the second text content have partially the same text content.

[0037] In some embodiments, the first text content may be the content selected from the initial text that needs to be subjected to a text generation operation. The first text content may be part of the content or the entire content of the initial text, without specific limitation. The second text content may be text content generated by a text generation process based on the first text content, and may specifically be generated by natural language processing. The second text content is identical to part of the first text content, has the same or similar text content, expresses the same or similar meaning, and may have a different number of words. The second text content may include at least one sub-text content, and the number of sub-text contents is not limited.

[0038] After displaying initial text on a text editing page, a text processing device may, in response to a text selection operation on the initial text, determine, from the initial text, first text content corresponding to the text selection operation. The text selection operation may be a cursor sliding across the initial text, and the first text content may be the text content covered by the sliding operation. In response to a text generation operation on the first text content, the first text content is input into a model corresponding to the text generation operation for text generation, thereby obtaining second text content including at least one sub-text content.

[0039] In some embodiments, the text generation operation may be an operation for generating second text content based on retaining some identical or similar text content for the first text content. In some embodiments, the text generation operation may include at least one of an optimization operation, an expansion operation, and an abbreviation operation. The optimization operation may be an operation for optimizing the text content to improve the quality of content expression. The expansion operation may be an operation for expanding the number of words in the text content. The abbreviation operation may be an operation for reducing the number of words in the text content. The text editing page may include at least one of an optimization control, an expansion control, and an abbreviation control, and different text generation operations are implemented through different controls.

[0040] For example, referring to FIG3 , the initial text includes the selected first text content 301, which is highlighted by setting a gray fill color. This is only an example, and the text editing page 300 may also include the optimization control 302, expansion control 303 and abbreviation control 304 in the figure, and different text generation operations are implemented through different controls.

[0041] Step 103: In response to the replacement operation on the second text content, the first text content in the initial text is replaced with the second text content to obtain the target text.

[0042] In some embodiments, the replacement operation may be an operation for replacing the first text content with the second text content, and specifically may be a triggering operation on a replacement control. The target text may be the final text obtained after generating and replacing the remaining text content of the initial text while retaining some of the same text content. In the disclosed embodiment, the target text is the initial text after the first text content is replaced with the second text content.

[0043] In some embodiments, in response to a replacement operation on the second text content, the first text content in the initial text is replaced with the second text content to obtain the target text, which may include: in response to a replacement operation on the target sub-text content in the second text content, the first text content in the initial text is replaced with the target sub-text content to obtain the target text.

[0044] Since the second text content may include at least one subtext content, the target subtext content may be a subtext content selected by the user from the at least one subtext content included in the second text content, and is used to replace the first text content. The replacement operation of the target subtext content may be an operation for replacing the first text content with the target subtext content.

[0045] After generating the second text content based on the first text content, the text processing device can display the second text content. Since the second text includes at least one sub-text content, the specific display method can be to display only one sub-text content, display other sub-text contents in response to a switching operation on the displayed sub-text content, or to arrange and display all of the at least one sub-text content. When the user triggers a replacement operation on a sub-text content in the second text content, the text processing device can determine the sub-text content as the target sub-text content in response to the replacement operation, and can replace the first text content in the above-mentioned initial text with the target sub-text content, and determine the initial text after the replacement as the target text.

[0046] Step 104: Generate a video draft based on the target text, wherein the video draft includes at least one text editing segment generated based on the target text.

[0047] In some embodiments, the video draft can be the finished editing product of the video material, or it can be the editing process file of the video material, etc., such as a video material with only text material added, etc. The text material can be the above-mentioned target text, or at least one text editing segment generated by the target text.

[0048] A text editing segment, also known as a text track editing segment, can be a segment created by splitting a target text into at least one text segment and then editing it using the text track editor. Each text editing segment corresponds to a track segment of a video clip in the text track editor. When generating a video draft using multimedia editing tools, a multi-track editor for at least one video segment can be displayed in the video editing window. This multi-track editor includes a text track editor. The text track editor can be used to edit the target text segments to create text editing segments, which can then be added to the edited video clip.

[0049] After the text processing device determines the target text, it can split the target text into at least one text segment using a multimedia editing tool, with each text segment corresponding to a video segment. In the video editing operation window, the at least one text segment can be clipped using a text track editor, resulting in at least one text editing segment. After the at least one video segment is clipped, the clipped video segments are synthesized to produce a video draft.

[0050] The editing operation on the video clip here may include only the editing operation of obtaining at least one text editing clip, or may include not only the editing operation of obtaining at least one text editing clip but also the editing operation of at least one multimedia material and the addition of editing information. Thus, the video draft also includes at least one multimedia material and editing information, wherein the multimedia material includes at least one of the following: video material, audio material, image material, and special effects material, and the editing information can be used to indicate the editing operation on the at least one multimedia material.

[0051] The text processing scheme provided by the embodiment of the present disclosure displays an initial text on a text editing page, wherein the initial text is generated based on text description information, and the text description information is used to describe the conditions that the initial text needs to match; in response to a text generation operation on the first text content in the initial text, a second text content is generated based on the first text content, wherein the first text content is partially identical to the second text content; in response to a replacement operation on the second text content, the first text content in the initial text is replaced with the second text content to obtain a target text; a video draft is generated based on the target text, wherein the video draft includes at least one text editing segment generated based on the target text. By adopting the above technical scheme, for the initial text generated based on the text description information, it is supported to generate other text content for the text content in the initial text on the text editing page. In this way, further processing of the generated text is achieved, and it is supported to generate a video draft after replacing the text content of the initial text with other generated text content, thereby enriching the text processing related functions of the multimedia resources, thereby meeting the user's deeper editing needs and interactive needs for the generated text.

[0052] In some embodiments, when the text generation operation includes an optimization operation, generating the second text content based on the first text content may include: correcting text errors and / or adjusting sentence structure of the first text content to obtain the second text content.

[0053] The optimization operation may be an operation that optimizes the text content to improve the quality of the content. When the text generation operation is an optimization operation, the text processing device may input the first text content into an optimization model corresponding to the optimization operation, perform text error correction and / or sentence structure adjustment, and obtain second text content. Text error correction may include correcting typos, grammatical errors, and other errors, and sentence structure adjustment may include adjusting the text content from a current sentence structure to another with better expression, such as from a standard sentence structure to a parallel sentence structure.

[0054] In some embodiments, when the text generation operation includes an expansion operation, generating the second text content based on the first text content may include: expanding the number of words in the first text content by a first multiple to obtain the second text content.

[0055] The expansion operation may be an operation of expanding the number of words in the text content. The first multiple may be set according to actual conditions, for example, the first multiple may be 1.5 times. When the text generation operation is the expansion operation, the text processing device may input the first text content into the expansion model corresponding to the expansion operation, expand the number of words in the text by the first multiple, and obtain the second text content. The number of words in the second text content divided by the number of words in the first text content is the first multiple, and the second text content and the first text content have the same or similar text content to ensure that the meanings expressed are the same or similar.

[0056] In some embodiments, when the text generation operation includes an abbreviation operation, generating the second text content based on the first text content may include: reducing the number of words in the first text content by a second multiple to obtain the second text content.

[0057] The abbreviation operation may be an operation to reduce the number of words in the text content. The second multiple can be set according to actual conditions, for example, the second multiple can be 0.6 times. When the text generation operation is an abbreviation operation, the text processing device can input the first text content into the abbreviation model corresponding to the abbreviation operation, abbreviate the number of words in the text by the second multiple, and obtain the second text content. The second multiple is the number of words in the second text content divided by the number of words in the first text content, and the second text content and the first text content have the same or similar text content to ensure that the meaning expressed is the same or similar.

[0058] In the above solution, by performing a text generation operation on the first text content, the second text content can be generated while retaining some of the same or similar text content. In this way, further text processing such as optimization, expansion, and / or abbreviation of the first text content is achieved, thereby meeting the user's in-depth text processing needs for generated text.

[0059] For example, FIG4 is a flow chart of another text processing method provided by an embodiment of the present disclosure. As shown in FIG4 , in a feasible implementation, after generating the second text content based on the first text content, the text processing method may further include:

[0060] Step 401: Display a text card after the ending text of the first text content.

[0061] In some embodiments, a text card can be a card set in a text editing page for displaying the second text content. The specific location of the text card can be after the end text of the first text content, that is, after the last text of the first text content. If the end text does not end a sentence, the sentence containing the end text can be temporarily segmented, and the text card can be displayed after the end text.

[0062] For example, FIG5 is a schematic diagram of a text card provided in an embodiment of the present disclosure. As shown in FIG5 , an exemplary text card 501 is displayed on a text editing page 500. The text card 501 is set after the end text of the first text content 502. Optionally, the text card 501 can also be displayed when the second text content has not yet been generated, and prompt text such as "optimizing", "expanding", and "abbreviating" can be displayed in the text card 501 to enhance the content display experience.

[0063] Optionally, after the text card is displayed after the ending text of the first text content, in response to a scrolling operation, the initial text and the text card of the text editing page are scrolled following the scrolling operation.

[0064] Step 402: Display the first subtext content in the second text content in the text card, wherein the first subtext content is any subtext content in the second text content.

[0065] In some embodiments, after displaying a text card after the ending text of the first text content, the text processing device may display the second text content in the text card. Since the second text content includes at least one sub-text content, the first sub-text content of the at least one sub-text content may be displayed.

[0066] Step 403: In response to a switching operation in the text card, the first subtext content is switched to the second subtext content for display, wherein the second subtext content is another subtext content in the second text content except the first subtext content.

[0067] In some embodiments, the switching operation can be an operation for switching the sub-text content displayed in the text card, and specifically can be a triggering operation of a switch control set in the text card. For example, referring to Figure 5, a switch control is set in the text card 501, and the switch control can include a switch previous control 503 and a switch next control 504. By triggering the switch control, the sub-text content can be switched.

[0068] When the text processing device receives a user switching operation in a text card, it can, in response to the switching operation, select one of the subtext contents other than the first subtext content of the second text content as the second subtext content, and switch the first subtext content to the second subtext content for display. Optionally, in response to the switching operation in the text card, if the first subtext content is the last subtext content in the second text content, it can generate at least one subtext content based on the first text, and switch any one of them to be displayed as the second subtext content.

[0069] For example, referring to FIG5 , after the user triggers the switch next control 504 , the first sub-text content in the text card can be switched to the second sub-text content. In addition, the expansion 1 / 3 in the upper left corner of the text card changes to expansion 2 / 3 to prompt the user that a sub-text content has been switched.

[0070] In addition, the text card 501 may also include a replacement control 505. When the user triggers the replacement control 505, it can be regarded as a replacement operation for the sub-text content currently displayed in the text card 501. The sub-text content can be determined as the target sub-text content, and the first text content in the above-mentioned initial text can be replaced with the target sub-text content, and the initial text after replacement can be determined as the target text.

[0071] Optionally, the text card 501 may also include a positive feedback control 506 and a negative feedback control 507. In response to the triggering operation of the positive feedback control 506, a positive feedback operation is performed on the sub-text content displayed by the text card 501, that is, the sub-text content currently displayed is recognized and it is considered that the generated sub-text content is effective; in response to the triggering operation of the negative feedback control 507, a negative feedback operation is performed on the sub-text content displayed by the text card 501, that is, the sub-text content currently displayed is disagreed with and it is considered that the generated sub-text content is not effective. For the second text content generated by the first text content, users are supported to provide positive or negative feedback, thereby improving the user's interactive experience with further generated content and enriching the interactive related functions after text processing.

[0072] In some embodiments, the height of the text card changes as the number of words in the second text content displayed therein changes.

[0073] In some embodiments, the height of the text card matches the number of words in the second text content displayed therein. When the number of words in the second text content displayed in the text card is relatively small, the height of the text card is relatively small; when the number of words in the second text content displayed in the text card is relatively large, the height of the text card is relatively large.

[0074] For example, FIG6 is a schematic diagram of another text card provided in an embodiment of the present disclosure. As shown in FIG6 , a text card 601 is displayed on a text editing page 600. The subtext content of the second text content in text card 601 has a large number of words, so the height of text card 601 is large, and text card 601 is displayed starting from the top of text editing page 600. As shown in FIG5 , the subtext content of the second text content in text card 501 has a small number of words, so the height of text card 501 is small.

[0075] Optionally, the text content included in the text card supports selection and copying. In response to the selection operation and copy operation on part of the content in the text card, the part of the content can be copied and pasted.

[0076] In the above scheme, the second text content generated based on the first text content can be displayed through a text card, and the text card can provide a variety of interactive functions and text processing processes for the second text content, further enriching the text processing function and improving the user's text interaction experience.

[0077] It enriches the text processing related functions of multimedia resources, thereby meeting users' deeper editing and interaction needs for generated texts.

[0078] In some embodiments, the text processing method may further include: in response to an undo operation of the replacement operation, restoring the second text content in the initial text to the first content.

[0079] The undo operation may be an operation for undoing the most recent historical operation at the current moment. The undo operation of the replace operation may be a triggering operation of an undo control on the text editing page after the replace operation. In the above embodiment, after the replace operation, when the text processing device receives a user triggering operation of the undo control, the device may restore the second text content in the initial text to the first text content in response to the undo operation.

[0080] Exemplary, FIG7 is a schematic diagram of another text editing page provided by an embodiment of the present disclosure, as shown in FIG7, a text editing page 700 is shown in the figure after the user performs a replacement operation on the second text content. The second text content 701 after the replacement operation can be displayed in the text editing page 700, and is highlighted by setting a gray fill color, which is only an example. At this time, when the user triggers the completion control 704, the second text content cancels the highlighting. The text editing page 700 can include an undo control 702. After the user triggers the undo control 702, the second text content 701 can be restored to the first text content. In addition, the text editing page 700 can also include a redo control 703. After the user triggers the redo control 703, the most recent historical operation from the current moment can be restored. If the historical operation is to restore the second text content 701 to the first text content, the first text content can be replaced with the second text content 701.

[0081] In the above solution, by supporting the undo operation for the text replacement operation, the text can be quickly restored when the user is not satisfied with the replaced text content, thereby meeting the user's fast operation needs and improving the user's text interaction experience.

[0082] FIG8 is a structural diagram of a text processing device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. As shown in FIG8 , the device includes: a display module 801 for displaying an initial text on a text editing page, wherein the initial text is generated based on text description information, and the text description information is used to describe the conditions that the initial text needs to match; a first generation module 802 for generating a second text content based on the first text content in response to a text generation operation on the first text content in the initial text, wherein the first text content is identical to a portion of the text content of the second text content; a replacement module 803 for replacing the first text content in the initial text with the second text content in response to a replacement operation on the second text content to obtain a target text; a second generation module 804 for generating a video draft based on the target text, wherein the video draft includes at least one text editing segment generated based on the target text.

[0083] Optionally, the second text content includes at least one sub-text content, and the replacement module 803 is used to: in response to a replacement operation on a target sub-text content in the second text content, replace the first text content in the initial text with the target sub-text content to obtain a target text.

[0084] Optionally, when the text generation operation includes an optimization operation, the first generation module 802 is configured to perform text error correction and / or sentence structure adjustment on the first text content to obtain second text content.

[0085] Optionally, when the text generation operation includes an expansion operation, the first generation module 802 is configured to: expand the number of words in the first text content by a first multiple to obtain second text content.

[0086] Optionally, when the text generation operation includes an abbreviation operation, the first generation module 802 is configured to reduce the number of words in the first text content by a second multiple to obtain second text content.

[0087] Optionally, the device also includes a display module, which is used to: after generating the second text content based on the first text content, display a text card after the ending text of the first text content; and display the first sub-text content in the second text content in the text card, wherein the first sub-text content is any sub-text content in the second text content.

[0088] Optionally, the device further includes a switching module for: in response to a switching operation in the text card, switching the first sub-text content to a second sub-text content for display, wherein the second sub-text content is another sub-text content in the second text content other than the first sub-text content.

[0089] Optionally, the height of the text card changes as the number of words in the second text content displayed therein changes.

[0090] Optionally, the apparatus further includes an undo module, configured to restore the second text content in the initial text to the first text content in response to an undo operation on the replacement operation.

[0091] Optionally, the video draft further includes at least one multimedia material and editing information, and the multimedia material includes at least one of the following: video material, audio material, image material, and special effects material.

[0092] The text processing device provided by the embodiments of the present disclosure can execute the text processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0093] An embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the text processing method provided by any embodiment of the present disclosure when executed by a processor.

[0094] FIG9 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.

[0095] 9 , which illustrates a schematic diagram of the structure of an electronic device 900 suitable for implementing embodiments of the present disclosure. The electronic device 900 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG9 is merely an example and should not limit the functionality or scope of use of the embodiments of the present disclosure.

[0096] As shown in Figure 9, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 903. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0097] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although FIG9 shows the electronic device 900 with various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0098] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the text processing method of the embodiment of the present disclosure are performed.

[0099] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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), an 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. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0100] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0101] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0102] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: displays an initial text on a text editing page, wherein the initial text is generated based on text description information, and the text description information is used to describe the conditions that the initial text needs to match; in response to a text generation operation on a first text content in the initial text, generates a second text content based on the first text content, wherein the first text content is identical to a portion of the text content of the second text content; in response to a replacement operation on the second text content, replaces the first text content in the initial text with the second text content to obtain a target text; generates a video draft based on the target text, wherein the video draft includes at least one text editing segment generated based on the target text.

[0103] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0105] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.

[0106] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0107] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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), an 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 foregoing.

[0108] It is understandable that before using the technical solutions disclosed in the embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0109] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0110] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0111] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A text processing method, comprising: Displaying the initial text on the text editing page, wherein the initial text is generated based on the text description information, and the text description information is used to describe the conditions that the initial text needs to match; In response to a text generation operation on a first text content in the initial text, generating a second text content based on the first text content, wherein the first text content is partially identical to the second text content; In response to a replacement operation on the second text content, the first text content in the initial text is replaced with the second text content to obtain a target text; and A video draft is generated based on the target text, wherein the video draft includes at least one text editing segment generated based on the target text.

2. The method according to claim 1, wherein the second text content includes at least one sub-text content, wherein in response to a replacement operation on the second text content, the first text content in the initial text is replaced with the second text content to obtain a target text, comprising: In response to a replacement operation on the target sub-text content in the second text content, the first text content in the initial text is replaced with the target sub-text content to obtain a target text.

3. The method according to claim 1, when the text generation operation includes an optimization operation, wherein generating the second text content based on the first text content comprises: The first text content is subjected to text error correction and / or sentence structure adjustment to obtain a second text content.

4. The method according to claim 1, when the text generation operation includes an expansion operation, generating the second text content based on the first text content comprises: The number of words in the first text content is expanded by a first multiple to obtain a second text content.

5. The method according to claim 1, when the text generation operation includes an abbreviation operation, wherein generating the second text content based on the first text content comprises: The number of characters in the first text content is reduced by a second multiple to obtain a second text content.

6. The method according to claim 2, wherein after generating the second text content based on the first text content, the method further comprises: Displaying a text card after the ending text of the first text content; as well as The first sub-text content in the second text content is displayed in the text card, wherein the first sub-text content is any sub-text content in the second text content.

7. The method according to claim 6, further comprising: In response to a switching operation in the text card, the first sub-text content is switched to the second sub-text content for display, wherein the second sub-text content is another sub-text content in the second text content except the first sub-text content. A sub-text content.

8. The method according to claim 6 or 7, wherein the height of the text card changes with the number of words in the second text content displayed therein.

9. The method according to claim 1, further comprising: In response to an undo operation on the replacement operation, the second text content in the initial text is restored to the first text content.

10. The method according to claim 1, wherein the video draft further includes at least one multimedia material and editing information, and the multimedia material includes at least one of the following: video material, audio material, image material, and special effect material.

11. A text processing device, comprising: A display module, used for displaying the initial text on the text editing page, wherein the initial text is generated based on the text description information, and the text description information is used for describing the conditions that the initial text needs to match; A first generating module, configured to generate second text content based on the first text content in response to a text generating operation on the first text content in the initial text, wherein the first text content is partially identical to the second text content; a replacement module, configured to replace the first text content in the initial text with the second text content in response to a replacement operation on the second text content, so as to obtain a target text; The second generating module is used to generate a video draft based on the target text, wherein the video draft includes at least one text editing segment generated based on the target text.

12. An electronic device comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the text processing method described in any one of claims 1-10.

13. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the text processing method according to any one of claims 1 to 10.

14. A computer program product, comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the text processing method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Multimedia data processing method and device, electronic equipment and storage medium

    CN109756751A

  • Text creation method and computer program product

    CN113590247A

  • Rich media manuscript auxiliary generation device

    CN116227463A

  • Method of parking for electronic device using UWB communication and apparatus thereof

    KR1020240008186A

Cited By

  • Text expansion model training method and text expansion method

    CN120492620A