Text processing method and device, equipment and medium

By generating and replacing text content on the text editing page, the problem of simple text generation function in the prior art is solved, and deep editing of text and video draft generation is realized to meet users' multimedia text processing needs.

CN119990072APending Publication Date: 2025-05-13BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311459951.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing text generation technology functions are 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 user operations, and replacing it in the initial text to generate the target text, and ultimately generating a video draft based on the target text.

Benefits of technology

It realizes further processing and editing of the initial text, supports the generation of video drafts, and meets the users' deeper editing needs and interactive needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990072A_ABST
    Figure CN119990072A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a text processing method and device, equipment and a medium, and the method comprises the steps that an initial text is displayed on a text editing page, the initial text is generated based on text description information, and the text description information is used for describing conditions needing to be matched with the initial text; in response to a text generation operation on first text content in the initial text, second text content is generated based on the first text content, and the first text content is the same as partial text content 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 a target text; and generating a video draft based on the target text, the video draft comprising at least one text editing fragment generated based on the target text. According to the method and the device, text processing related functions of multimedia resources are enriched, so that deeper editing requirements and interaction requirements of a user on the generated text are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] 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. Summary of the invention

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

[0004] The present disclosure provides a text processing method, the method comprising:

[0005] 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 a condition that the initial text needs to match;

[0006] 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;

[0007] 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;

[0008] 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.

[0009] The present disclosure also provides a text processing device, the device comprising:

[0010] A display module, used 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 for describing a condition that the initial text needs to match;

[0011] 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;

[0012] 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;

[0013] 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.

[0014] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of 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.

[0015] The 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.

[0016] The technical solution provided by the embodiment of the present disclosure has the following advantages over the prior art: the text processing solution provided by the embodiment of the present disclosure displays 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 the text generation operation of the first text content in the initial text, the second text content is generated based on the first text content, wherein the first text content is the same as part of the text content of the second text content; in response to the replacement operation of the second text content, the first text content in the initial text is replaced with the second text content to obtain the 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 solution, 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, so as to realize further processing of the generated text, and it is supported to generate a video draft after replacing the text content of the initial text with other generated text content, so as to enrich the text processing related functions of the multimedia resources, thereby satisfying the user's deeper editing needs and interactive needs for the generated text. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 A flowchart of a text processing method provided by an embodiment of the present disclosure;

[0019] Figure 2 A schematic diagram of a text generation page provided in an embodiment of the present disclosure;

[0020] Figure 3 A schematic diagram of a text editing page provided by an embodiment of the present disclosure;

[0021] Figure 4 A flowchart of another text processing method provided by an embodiment of the present disclosure;

[0022] Figure 5 A schematic diagram of a text card provided in an embodiment of the present disclosure;

[0023] Figure 6 A schematic diagram of another text card provided in an embodiment of the present disclosure;

[0024] Figure 7 A schematic diagram of another text editing page provided by an embodiment of the present disclosure;

[0025] Figure 8 A structural schematic diagram of a text processing device provided by an embodiment of the present disclosure;

[0026] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] Embodiments of the present disclosure will be described in more detail below 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 being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0028] 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.

[0029] The term "including" and its variations used herein are open inclusions, 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"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0030] It should be noted that the concepts such as "first" and "second" mentioned in the present 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.

[0031] It should be noted that the modifications of "one" and "plurality" 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, it should be understood as "one or more".

[0032] 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.

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

[0034] Figure 1 The present invention provides a flowchart of a text processing method provided by an embodiment of the present invention. The method can be executed by a text processing device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:

[0035] Step 101: 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 conditions that the initial text needs to match.

[0036] 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.

[0037] Among them, the text editing page can be a page for editing and processing the initial text, and the text editing page can be displayed in response to the editing trigger operation of the initial text on the text generation page. The initial text can be a text obtained by natural language processing based on the 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 can be information describing the conditions, goals or requirements that need to be matched for the initial text to be generated, and the text description information can be obtained by the user input in the text generation page. The text generation page can be a page for generating the above-mentioned initial text, and can be a page in the form of a dialogue.

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

[0039] 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, and 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, and implements the editing of adding text and / or deleting text in the initial text, meeting the user's basic editing needs for the initial text.

[0040] For example, Figure 2 A schematic diagram of a text generation page provided by an embodiment of the present disclosure, such as Figure 2 As shown, the figure shows an exemplary text generation page 200, in which a card 201 is displayed. 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 is received, and the text editing page can be displayed.

[0041] For example, Figure 3 A schematic diagram of a text editing page provided by an embodiment of the present disclosure, such as Figure 3 As shown in the figure, an exemplary text editing page 300 is shown, and the text editing page 300 includes Figure 2 The initial text in the middle card 201. In addition, the initial text can be input by calling up the keyboard 305 in the text editing page 300.

[0042] Step 102: In response to a text generation operation on first text content in the initial text, second text content is generated based on the first text content, wherein the first text content is partially identical to the second text content.

[0043] Among them, the first text content may be the content selected in the initial text that needs to be subjected to the text generation operation, and the first text content may be part of the content or the whole of the initial text, without specific limitation. The second text content may be text content generated by text generation processing based on the first text content, and may be generated specifically by natural language processing. The second text content is identical to part of the text content of the first text content, has the same or similar text content, expresses the same or similar meaning, and may have different text word counts. The second text content may include at least one sub-text content, and the number of sub-text contents is not limited.

[0044] After the text processing device displays the initial text in the text editing page, in response to a text selection operation on the initial text, the text processing device can determine the first text content corresponding to the text selection operation from the initial text, and the text selection operation can be a sliding process of the cursor on the initial text, and the first text content can be the text content covered by the sliding process; 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, so as to obtain a second text content including at least one sub-text content.

[0045] The text generation operation may be an operation of generating a second text content based on retaining part of the same or similar text content for the first text content. 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 optimization process performed on the text content to improve the quality of content expression. The expansion operation may be an operation of expanding the number of words in the text content. The abbreviation operation may be an operation of 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.

[0046] For example, see Figure 3 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 can also include an optimization control 302, an expansion control 303 and an abbreviation control 304 in the figure, and different text generation operations are implemented through different controls.

[0047] 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 a target text.

[0048] The replacement operation may be an operation for replacing the first text content with the second text content, and specifically may be a trigger operation for a replacement control. The target text may be the final text obtained after the generation and replacement of other text contents while retaining part of the same text content of the initial text. The target text of the embodiment of the present disclosure is the initial text in which the first text content is replaced with the second text content.

[0049] 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.

[0050] 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.

[0051] 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 arrange and display at least one sub-text content in its entirety; 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.

[0052] 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.

[0053] Among them, the video draft can be the finished editing of the video material, or it can be the editing process file of the video material, etc., such as 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.

[0054] A text editing segment, also known as a text track editing segment, can be a segment obtained by splitting a target text into at least one text segment and then editing it through a text track editor. One text editing segment corresponds to a track segment of a video segment in a text track editor. When a video draft is generated through a multimedia editing tool, a multi-track editor of at least one video segment can be displayed in the video editing operation window. The multi-track editor includes a text track editor. The text track editor can be used to edit the text segments split from the target text to obtain text editing segments, and the edited video segment can add the text editing segment.

[0055] After the text processing device determines the target text, the target text can be split into at least one text segment through a multimedia editing tool, each text segment corresponds to a video segment, and at least one text segment can be edited through a text track editor in a video editing operation window. After the editing is completed, at least one text editing segment is obtained. After completing the editing operation on at least one video segment, the edited video segments are synthesized to obtain a video draft.

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

[0057] 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 a 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 the same as 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. The above technical scheme is adopted, 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, thereby realizing further processing of the generated text, 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 multimedia resources, thereby satisfying the user's deeper editing needs and interactive needs for the generated text.

[0058] 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.

[0059] The optimization operation may be an operation of optimizing the text content to improve the quality of content expression. When the text generation operation is an optimization operation, the text processing device may input the first text content into the optimization model corresponding to the optimization operation, perform text error correction and / or sentence adjustment, and obtain the second text content. Text error correction may be correction of typos, grammatical errors, etc., and sentence adjustment may be adjustment of the text content from the current sentence structure to another sentence structure with better expression effect, for example, from an ordinary sentence structure to a parallel sentence structure.

[0060] 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.

[0061] 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 an expansion operation, the text processing device may input the first text content into an 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 expression meaning is the same or similar.

[0062] 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.

[0063] The abbreviation operation may be an operation of reducing the number of words in the text content. The second multiple may be set according to actual conditions, for example, the second multiple may be 0.6 times. When the text generation operation is an abbreviation operation, the text processing device may 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 number of words in the second text content is divided by the number of words in the first text content as the second 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.

[0064] In the above scheme, through the text generation operation on the first text content, the second text content can be generated on the basis of retaining part of the same or similar text content, thereby realizing further text processing of optimization, expansion and / or abbreviation of the first text content, thereby meeting the user's deep text processing needs for generated text.

[0065] For example, Figure 4 A flowchart of another text processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, in a feasible implementation manner, after generating the second text content based on the first text content, the text processing method may further include:

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

[0067] Among them, the text card can be a card set in the text editing page for displaying the second text content. The specific position of the text card can be after the ending text of the first text content, that is, after the last text of the first text content. When the ending text is not the end of a sentence, the sentence where the ending text is located can be temporarily segmented, and the text card can be displayed after the ending text.

[0068] For example, Figure 5 A schematic diagram of a text card provided by an embodiment of the present disclosure, such as Figure 5 As shown, an exemplary text card 501 is shown in the text editing page 500, and the text card 501 is set after the ending text of the first text content 502. Optionally, the text card 501 can also be displayed when the second text content has not been generated, and prompt texts such as optimizing, expanding, abbreviation, etc. can be displayed in the text card 501 to improve the content display experience.

[0069] 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.

[0070] 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.

[0071] After the text processing device displays the text card after the ending text of the first text content, the second text content can be displayed in the text card. Since the second text content includes at least one sub-text content, the first sub-text content in the at least one sub-text content can be displayed.

[0072] Step 403: 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.

[0073] The switching operation may be an operation for switching the sub-text content displayed in the text card, and specifically may be a triggering operation for a switching control set in the text card, for example, see Figure 5 A switching control is provided in the text card 501, and the switching control may include a switching previous control 503 and a switching next control 504. The switching of the sub-text content may be achieved by triggering the switching control.

[0074] When receiving a switching operation from a user in a text card, the text processing device can, in response to the switching operation, select one of the sub-text contents other than the first sub-text content of the second text content as the second sub-text content, and switch the first sub-text content to the second sub-text content for display. Optionally, in response to the switching operation in the text card, if the first sub-text content is the last sub-text content in the second text content, at least one sub-text content can be generated again based on the first text, and any one of them can be switched and displayed as the second sub-text content.

[0075] See for example Figure 5 When the user triggers the switch next control 504, the first sub-text content can be switched to the second sub-text content in the text card. 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.

[0076] 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 on 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.

[0077] 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 has a good effect; 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 not recognized and it is considered that the generated sub-text content has a poor effect. For the second text content generated from the first text content, users are supported to provide positive or negative feedback, thereby enhancing the user's interactive experience with further generated content and enriching the interactive related functions after text processing.

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

[0079] The height of the text card matches the number of characters in the second text content displayed therein. When the number of characters in the second text content displayed in the text card is small, the height of the text card is small; when the number of characters in the second text content displayed in the text card is large, the height of the text card is large.

[0080] For example, Figure 6 A schematic diagram of another text card provided in an embodiment of the present disclosure, such as Figure 6 As shown in the figure, a text card 601 is displayed on a text editing page 600. The subtext content of the second text content in the text card 601 has a large number of words. At this time, the height of the text card 601 is large, and the text card 601 is displayed from the top of the text editing page 600. Figure 5 As shown, the sub-text content of the second text content in the text card 501 has fewer words, and at this time the height of the text card 501 is smaller.

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

[0082] 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.

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

[0084] 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.

[0085] The undo operation may be an operation for undoing the most recent historical operation at the current moment, and the undo operation of the replace operation may be a trigger operation of the undo control of the text editing page after the replace operation. After the replace operation in the above embodiment, when the text processing device receives a trigger operation of the undo control by the user, the second text content in the initial text may be restored to the first text content in response to the undo operation.

[0086] For example, Figure 7 A schematic diagram of another text editing page provided by an embodiment of the present disclosure, such as Figure 7 As shown, the figure shows a text editing page 700 after the user replaces 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 the 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, and 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, and after the user triggers the redo control 703, the closest historical operation to 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 by the second text content 701.

[0087] In the above scheme, 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 demand for quick operation and improving the user's text interaction experience.

[0088] Figure 8 This is a schematic diagram of the structure 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. Figure 8 As shown, the device comprises:

[0089] Display module 801, used for displaying 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 for describing the conditions that the initial text needs to match;

[0090] A first generating module 802, 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;

[0091] A replacement module 803, 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, to obtain a target text;

[0092] The second generating module 804 is configured 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.

[0093] Optionally, the second text content includes at least one sub-text content, and the replacement module 803 is used to:

[0094] 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.

[0095] Optionally, when the text generation operation includes an optimization operation, the first generation module 802 is used to:

[0096] The first text content is subjected to text error correction and / or sentence structure adjustment to obtain a second text content.

[0097] Optionally, when the text generation operation includes an expansion operation, the first generation module 802 is used to:

[0098] The number of words in the first text content is expanded by a first multiple to obtain a second text content.

[0099] Optionally, when the text generation operation includes an abbreviation operation, the first generation module 802 is used to:

[0100] The number of characters in the first text content is reduced by a second multiple to obtain a second text content.

[0101] Optionally, the device further comprises a display module, which is used to: after generating the second text content based on the first text content,

[0102] Displaying a text card after the ending text of the first text content;

[0103] 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.

[0104] Optionally, the device further includes a switching module, configured to:

[0105] In response to a switching operation in the text card, the first sub-text content is switched to display a second sub-text content, wherein the second sub-text content is another sub-text content in the second text content except the first sub-text content.

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

[0107] Optionally, the device further comprises a revocation module, configured to:

[0108] 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.

[0109] Optionally, the video draft also 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.

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

[0111] The embodiments of the present disclosure also provide 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.

[0112] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.

[0113] The following specific reference Fig. 9 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure. The electronic device 900 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0114] like Fig. 9As shown, 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. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. 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.

[0115] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, 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 Fig. 9 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0116] 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 contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a 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 executed.

[0117] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit 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 of the above.

[0118] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may 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 future developed network.

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

[0120] 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.

[0121] 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a 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).

[0122] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0123] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0124] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0125] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. 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, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may 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.

[0126] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the information involved in the present 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.

[0127] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. 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 a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0128] 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 are 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.

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

Claims

1. A text processing method, characterized in that: The method comprises: 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 a condition 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; 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, characterized in that The second text content includes at least one sub-text content, and 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, including: 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, characterized in that When the text generation operation includes an optimization operation, generating the second text content based on the first text content includes: 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, characterized in that: When the text generation operation includes an expansion operation, generating the second text content based on the first text content includes: 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, characterized in that When the text generation operation includes an abbreviation operation, generating the second text content based on the first text content includes: 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, characterized in that After generating the second text content based on the first text content, the method further includes: Displaying a text card after the ending text of the first text content; 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, characterized in that The method further comprises: In response to a switching operation in the text card, the first sub-text content is switched to display a second sub-text content, wherein the second sub-text content is another sub-text content in the second text content except the first sub-text content.

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

9. The method according to claim 1, characterized in that: The method further comprises: 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, characterized in that The video draft also 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, characterized in that: The device comprises: 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, characterized in that: The electronic device comprises: 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, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the text processing method described in any one of claims 1 to 10.