Text processing methods, apparatuses, electronic devices, and storage media

By segmenting and formatting text, and creating videos based on the display time and stacking relationship of text fragments on the timeline, the problem of tedious and time-consuming traditional methods is solved, and automated text processing with the ability to quickly add special effects is achieved.

CN123075231APending Publication Date: 2026-11-10BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510583191.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Traditional methods for converting text into video content with specific layout effects require users to manually create video image frames one by one, which is tedious and time-consuming, and cannot quickly add special effects to the text.

Method used

The original text is segmented into multiple text fragments, which are then arranged and the target video is created based on the display time and stacking relationship of the text fragments on the timeline, so that the text fragments gradually appear.

Benefits of technology

It automates the conversion of text into video content with specific layout effects, meeting users' needs for quickly adding special effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123075231A_ABST
    Figure CN123075231A_ABST
Patent Text Reader

Abstract

This disclosure relates to a text processing method, apparatus, electronic device, and storage medium. The method includes: segmenting original text to obtain multiple text fragments; arranging the text fragments to obtain arranged text fragments; determining the display period of each text fragment on a timeline and the stacking relationship of text fragments whose display periods at least partially overlap, based on the position of the text fragments in the original text; creating a target video based on the display period of each text fragment on the timeline, the stacking relationship of text fragments whose display periods at least partially overlap, and the arranged text fragments; in the target video, new text fragments gradually appear over time. Essentially, it provides a method that can automatically convert text into video content with specific layout effects, satisfying users' needs to quickly add special effects to text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of information processing technology, and in particular to a text processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] In today's rapidly developing digital age, text, as the primary medium for information transmission, is increasingly diverse and personalized in its expression. With the widespread use of platforms such as social media, instant messaging software, and online forums, people increasingly desire to convey more vivid, interesting, and engaging information through text. To achieve this, people want to transform text into video content with specific layout effects. However, traditional text processing methods for converting text into video content with specific layout effects typically require users to manually create video image frames one by one. This method is tedious and time-consuming, and cannot achieve the goal of quickly adding special effects to text. Summary of the Invention

[0003] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a text processing method, apparatus, electronic device and storage medium.

[0004] Firstly, this disclosure provides a text processing method, including:

[0005] The original text is segmented to obtain multiple text fragments;

[0006] The text fragment is formatted to obtain the formatted text fragment;

[0007] Based on the position of the text fragment in the original text, determine the display period of the text fragment on the timeline, and the stacking relationship of the text fragments whose display periods at least partially overlap;

[0008] Based on the display periods of the text fragments on the timeline, the stacking relationship of the text fragments whose display periods at least partially overlap, and the layout of the text fragments, a target video is created; in the target video, as time goes on, new text fragments gradually appear.

[0009] Secondly, this disclosure also provides a text processing apparatus, comprising:

[0010] The segmentation module is used to segment the original text into multiple text fragments;

[0011] The typesetting module is used to typeset the text fragment to obtain the typeset text fragment;

[0012] The planning module is used to determine the display period of the text fragment on the timeline and the stacking relationship of the text fragments whose display periods at least partially overlap, based on the position of the text fragment in the original text.

[0013] The production module is used to create a target video based on the display time of the text fragments on the timeline, the stacking relationship of the text fragments whose display time periods at least partially overlap, and the layout of the text fragments; in the target video, new text fragments gradually appear as time goes by.

[0014] Thirdly, this disclosure also provides an electronic device, the electronic device comprising:

[0015] One or more processors;

[0016] Storage device for storing one or more programs;

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the text processing method as described above.

[0018] Fourthly, this disclosure also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the text processing method described above.

[0019] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0020] The technical solution provided in this disclosure involves segmenting the original text to obtain multiple text fragments; arranging the text fragments to obtain arranged text fragments; determining the display period of each text fragment on the timeline based on its position in the original text, and the stacking relationship of text fragments whose display periods at least partially overlap; and creating a target video based on the display periods of the text fragments on the timeline, the stacking relationship of text fragments whose display periods at least partially overlap, and the arranged text fragments; in the target video, new text fragments gradually appear over time. Essentially, it provides a method for automatically converting text into video content with specific layout effects, satisfying users' needs to quickly add special effects to text. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0022] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart of a text processing method provided in this disclosure embodiment;

[0024] Figure 2 A schematic diagram of the timeline of a target video provided in an embodiment of this disclosure;

[0025] Figure 3 A schematic diagram of the timeline of another target video provided in an embodiment of this disclosure;

[0026] Figure 4 A schematic diagram of a target video portion image frame provided in an embodiment of this disclosure;

[0027] Figure 5 This is a schematic diagram of the structure of a text processing device according to an embodiment of the present disclosure;

[0028] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. Detailed Implementation

[0029] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0030] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0031] Figure 1 This is a flowchart illustrating a text processing method provided in an embodiment of this disclosure. This embodiment is applicable to text processing on a client side. The method can be executed by a text processing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, including but not limited to smartphones, PDAs, tablets, wearable devices with displays, desktop computers, laptops, all-in-one computers, smart home devices, etc. Alternatively, this embodiment can be applied to text processing on a server side. The method can be executed by a text processing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server.

[0032] like Figure 1 As shown, the method may specifically include:

[0033] S110. Segment the original text to obtain multiple text fragments.

[0034] The original text is the object processed by the technical solution provided in this application. Using the technical solution provided in this application, the original text can be transformed into video content with specific layout effects.

[0035] The original text can be information directly entered by the user in text form, information copied from the network, or the recognition result obtained by speech-to-text recognition.

[0036] The original text can be segmented, for example, by splitting the original text into multiple text fragments.

[0037] There are various ways to implement this step, and this application does not limit this approach. For example, the original text can be segmented based on its textual features and / or text segmentation constraints to obtain multiple text fragments. The textual features of the original text include at least one of the following: the part of speech of phrases in the original text, the dependency relationships between phrases, and keywords in the original text. The part of speech of a phrase is its grammatical function; for example, the part of speech of a phrase can be a noun, verb, adjective, or preposition. The dependency relationships between phrases can be, for example, syntactic collocations between phrases, which are semantically related. Keywords in the original text can be, for example, phrases that play a key role in the original text (such as phrases that embody the core idea of ​​the original text), words with a specific structure (such as reduplicated words), phrases with a special position in the original text, phrases with a special pronunciation, phrases with a special part of speech, or phrases that appear repeatedly. Text segmentation constraints can be, for example, conditions limiting the number of text fragments after segmentation, and / or conditions limiting the maximum number of characters a single text fragment can contain.

[0038] Furthermore, there are various methods for determining keywords in the original text, and this application does not limit this method. For example, a method for determining keywords in the original text may include: determining at least two keyword filtering rules; determining the priority of the keyword filtering rules based on the style characteristics of the original text; and determining keywords in the original text based on keyword filtering rules with a priority higher than the set priority level.

[0039] The stylistic features of the original text can be, for example, the linguistic characteristics it displays in terms of language use. These stylistic features can also reflect tone, attitude, and the atmosphere created. For instance, the stylistic features of the original text could be solemn and serious, humorous and witty, relaxed and casual, friendly, sharp and incisive, concise and clear, or full of mystery and fantasy.

[0040] For example, the keyword filtering rules include the following four criteria: first, phrases that appear more than a set threshold number of times in the original text; second, phrases that are nouns, verbs, or adverbs; third, phrases whose pronunciation duration is longer than a set time length; and fourth, phrases that appear at the beginning or end of a sentence. The priority of each keyword filtering rule is pre-defined under different style characteristics. By analyzing the original text, its style characteristics are determined, and the priority of each keyword filtering rule under that style characteristic is clarified, ultimately determining the keyword filtering rule with the highest priority. Assuming the original text's style characteristic is sharp and incisive, under this style characteristic, the keyword filtering rule "phrases whose pronunciation duration is longer than the set time length" has the highest priority. Keywords are then identified in the original text based on this keyword filtering rule.

[0041] S120. Format the text fragment to obtain the formatted text fragment.

[0042] The essence of text fragment layout is to set the display style of the text fragment in the target video. The target video is the video that can be obtained using the technical solution provided in this application. The layout text fragment carries attribute values ​​regarding its display style in the target video.

[0043] For example, the implementation method of this step may include formatting the text fragment using preset text fragment formatting rules to obtain the formatted text fragment. This application does not limit the specific content included in the text fragment formatting rules. For example, the text fragment formatting rules include limitations on at least one of the following: 1. Text style: font, font size, line spacing, character spacing, color, glow effect, alignment; 2. Animation attributes: a list of entrance / loop / exit animations that can be added to the text fragment, animation frequency, animation percentage; 3. Position setting: the position of the text fragment on the screen, such as setting it to a random position, or displaying it at a specified position on the screen, or dynamically determining its display position based on the text fragments already displayed on the page, or specifying a fixed position on the screen for the text fragment; 4. Display duration: the display duration of the text fragment; 5. Dynamic characteristics: the movement characteristics, size change characteristics, and color change characteristics of the text fragment on the screen during the display process; 6. Character display: the character display method in the text fragment, such as displaying one character at a time, or displaying all characters simultaneously. S130. Based on the position of the text fragment in the original text, determine the display period of the text fragment on the timeline, and the stacking relationship of text fragments whose display periods at least partially overlap.

[0044] The display period of a text fragment on the timeline refers to its specific position on the timeline of the target video, such as the exact moment when the text fragment begins and ends its display. The target video is a video obtained using the technical solution provided in this application, which is a video with specific layout effects obtained by processing the original text.

[0045] Stacking refers to the layering relationship between text fragments during display. In some scenarios, text fragments on top may obscure text fragments on bottom.

[0046] For example, Figure 2 This is a schematic diagram of a timeline provided in this application. This timeline is the timeline of the target video. Assume that the original text is segmented into six text fragments. The purpose of this step is to determine the specific positions of these six text fragments on the timeline.

[0047] In practice, the display periods of different text fragments on the timeline may not overlap, or they may at least partially overlap. For example, in... Figure 2 In the example, text fragment 1 and text fragment 6 are displayed at non-overlapping times on the timeline. However, text fragment 1 and text fragment 2 partially overlap in their timeline display periods; specifically, the timeline display period of text fragment 1 includes the timeline display period of text fragment 2. In this case, the stacking relationship between these two text fragments needs to be considered. Figure 2In the context of the timeline, text snippets closer to the timeline are stacked lower, while those farther away are stacked higher. For example, if text snippet 2 is above text snippet 1 and is set to opaque, it will obscure text snippet 1.

[0048] In practice, optionally, time-segmentation planning constraints can be preset. When performing this step, optionally, based on the position of the text fragment in the original text and the time-segmentation planning constraints, the display period of the text fragment on the timeline and the stacking relationship of text fragments whose display periods at least partially overlap are determined. The purpose of setting time-segmentation planning constraints here is to ensure that the generated target video can present text information coherently and dynamically within a reasonable duration, avoiding excessively long target video durations. This application does not limit the specific content of the time-segmentation planning constraints. In practice, optionally, the time-segmentation planning constraints include at least one of the following: the number of tracks included in the target video is less than a set track number threshold; the display order of different text fragments is consistent with their positions in the original text; the display periods of text fragments within the same track do not overlap on the timeline, and the display order is correct; the minimum time interval between adjacent text fragments within the same track is less than a preset first duration threshold; the duration of any text fragment's display period is greater than a preset second duration threshold.

[0049] Because there are instances where text snippets are stacked with at least partial overlap in their display timeframes, this means that text snippets will be displayed in different layers. Tracks are used to organize and manage the display timeframes of text snippets on the same layer, ensuring that each text snippet is presented in the correct order at the correct time. For example, Figure 2 The video includes six layers perpendicular to the timeline, meaning that in this example, six tracks are used to manage the display time of the text segments. The track number threshold can be a pre-specified number. If the number of tracks in the target video is less than the set threshold, it means fewer layers are used to display the text segments, resulting in lower video complexity and facilitating faster production of subsequent target videos.

[0050] In some scenarios, when formatting text fragments, a display duration may be configured for each fragment. This can result in the formatting information of the formatted text fragment potentially carrying information reflecting the display duration. To address this, this step can be configured to determine the display period of the text fragment on the timeline, as well as the stacking relationship of text fragments whose display periods at least partially overlap, based on the text fragment's position in the original text and its formatting information.

[0051] S140. Based on the display time of text fragments on the timeline, the stacking relationship of text fragments with at least partial overlap in display time, and the layout information of text fragments, create a target video; in the target video, as time goes by, new text fragments gradually appear.

[0052] For example, if the original text is "an unprecedented technological feast," it can be segmented into text fragments such as "one," "feast," "unprecedented," "of," "technology," and "feast." Each text fragment is then adjusted, such as by setting its font, color, size, and entrance animation. Based on the position of each text fragment within the original text, the display time of each fragment on the timeline is determined, along with the stacking relationship of text fragments whose display time overlaps at least partially. The determined results (the display time of each text fragment on the timeline, and the stacking relationship of text fragments whose display time overlaps at least partially) are as follows: Figure 3 As shown. Based on the display periods of text segments on the timeline, the stacking relationship of text segments with at least partial overlap in display periods, and the layout of the text segments, the target video is obtained. Figure 4 The diagram, for example, shows several image frames. Figure 4 It can be seen that, as time goes by, the text fragments gradually appear in the order they appear in the original text.

[0053] The above technical solution involves segmenting the original text into multiple text fragments; arranging these fragments to obtain formatted text fragments; determining the display time of each text fragment on the timeline based on its position within the original text, and identifying the stacking relationship of text fragments with at least partial overlap in their display timelines; and creating a target video based on the display timelines, the stacking relationship of text fragments with at least partial overlap in their display timelines, and the formatted text fragments. In the target video, new text fragments gradually appear over time. Essentially, it provides a method to automatically transform text into video content with specific formatting effects, satisfying users' desire to quickly add special effects to text.

[0054] Based on the above technical solution, the method may optionally further include: determining target text processing rules; the target text processing rules include text segmentation constraints and text fragment layout rules; S110 may include: segmenting the original text based on the text segmentation constraints to obtain multiple text fragments; S120 may include: using the text fragment layout rules to layout the text fragments to obtain the layout text fragments. Essentially, this setup binds the text segmentation constraints and text fragment layout rules together as text processing rules. Thus, when a specific text processing rule is determined to be used for the original text, its included text segmentation constraints can be automatically invoked to segment the original text, and the text fragment layout rules can be invoked to layout the text fragments. In practice, text segmentation constraints and text fragment layout rules with good matching effects can be bound together to improve the display effect of the target video.

[0055] There are various methods for determining the specific implementation of the target text processing rule, and this application does not limit this. In some scenarios, different text processing rule identifiers can be displayed for the user to select. In response to a user's selection operation (e.g., click, swipe, or drag) of a text processing rule identifier, the text processing rule represented by the identifier of the selected text processing rule is taken as the target text processing rule. The identifier of a text processing rule can be, for example, information used to distinguish different text processing rules. The identifier of a text processing rule may include one or more of the following: the name of the text processing rule, a brief description, the applicable scenarios, and the category of text to be processed.

[0056] In other scenarios, optionally, determining the target text processing rule may include: obtaining a text processing rule set; the text processing rule set includes multiple text processing rules; the text processing rules have corresponding labels; and determining the target text processing rule in the text processing rule set based on the correlation between the category features of the original text and the labels of the text processing rules.

[0057] The labels for text processing rules can be descriptive information describing which category of text the rule applies to. Category features of the original text can, for example, reflect information about which category the original text belongs to.

[0058] In practice, classification criteria for text categories can be pre-defined, and corresponding text processing rules can be set for different text categories. The label of a text processing rule describes which category of text it applies to. The category features of the original text can be obtained through semantic understanding. The relevance between the category features of the original text and the text processing rule label is calculated; the text processing rule with the highest relevance to the category features of the original text is selected as the target text processing rule.

[0059] By setting the correlation between category features based on the original text and text processing rule labels, the target text processing rule can be determined in the text processing rule set. This allows the target text processing rule to be adapted to the original text, thereby resulting in a better visual effect in the final target video.

[0060] Furthermore, if the text fragment layout rules include a first rule and a second rule; based on the text fragment layout rules, the text fragment is layoutd to obtain a layoutd text fragment, which may include: determining a first text fragment and a second text fragment in the text fragment; layouting the first text fragment based on the first rule to obtain a layoutd first text fragment; and layouting the second text fragment based on the first rule and the second rule to obtain a layoutd second text fragment.

[0061] In practice, all text fragments segmented from the original text can be considered as the first text fragment, and the second text fragment is a selection of text fragments from all the text fragments segmented from the original text. This application does not limit the selection criteria for the second text fragment. In practice, the second text fragment may include, or may not include, the keywords of the original text mentioned above. The first rule can be understood as a general typesetting rule used to typeset all text fragments. The second rule, for example, can be a specific typesetting rule used only for typesetting the second text fragment. This application does not limit the specific rules that the first and second rules are. For example, the first rule includes rules regarding text style and / or animation attributes. The second rule includes rules regarding dynamic characteristics and / or character display.

[0062] The process involves defining a first text segment and a second text segment within a text fragment; formatting the first text segment based on a first rule to obtain a formatted first text segment; and formatting the second text segment based on both the first and second rules to obtain a formatted second text segment. The aim is to make the second text segment have a more prominent visual effect compared to the first text segment.

[0063] Based on the above technical solution, optionally, S140 may further include: configuring the motion attributes of the text fragments; and creating a target video based on the motion attributes of the text fragments, the display period of the text fragments on the timeline, the stacking relationship of text fragments with overlapping display periods, and the layout of the text fragments. Here, configuring the motion attributes of the text fragments can be a global configuration, that is, uniformly configuring the motion attributes of all text fragments. In other words, configuring the motion attributes of the text fragments will affect each text fragment. Configuring the motion attributes of the text fragments may include: setting the text fragments to move along a preset trajectory, swing in a specific direction with a preset amplitude, perform rotation actions, and scale during their display.

[0064] By configuring the motion attributes of text fragments, and based on these attributes, the display time of the text fragments on the timeline, the stacking relationship of text fragments with overlapping display time, and the layout of the text fragments, a target video can be created, resulting in a better visual effect.

[0065] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0066] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0067] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0068] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0069] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0070] Figure 5 This is a schematic diagram of the structure of a text processing device according to an embodiment of this disclosure. The text processing device provided in this embodiment can be configured in a client or in a server. See also Figure 5 The text processing device specifically includes:

[0071] The segmentation module 310 is used to segment the original text to obtain multiple text fragments;

[0072] The typesetting module 320 is used to type the text fragment to obtain the typeset text fragment;

[0073] The planning module 330 is used to determine the display period of the text segment on the timeline and the stacking relationship of the text segments whose display periods at least partially overlap, based on the position of the text segment in the original text.

[0074] The production module 340 is used to produce a target video based on the display time of the text fragments on the timeline, the stacking relationship of the text fragments whose display time periods at least partially overlap, and the layout of the text fragments; in the target video, new text fragments gradually appear as time goes by.

[0075] Furthermore, the device also includes a rule determination module for determining target text processing rules; the target text processing rules include text segmentation constraints and text fragment layout rules;

[0076] The segmentation module 310 is used to segment the original text based on the text segmentation constraints to obtain multiple text fragments;

[0077] The typesetting module 320 is used to type the text fragment according to the text fragment typesetting rules to obtain the typeset text fragment.

[0078] Furthermore, the rule determination module is used for:

[0079] Obtain a text processing rule set; the text processing rule set includes multiple text processing rules; the text processing rules have corresponding tags;

[0080] Based on the correlation between the category features of the original text and the text processing rule labels, the target text processing rule is determined in the text processing rule set.

[0081] Furthermore, the segmentation module 310 is used for:

[0082] Based on the text segmentation constraints and the text features of the original text, the original text is segmented to obtain multiple text segments; the text features of the original text include at least one of the following: the part of speech of the phrases in the original text, the dependency relationship between the phrases, and the keywords in the original text.

[0083] Furthermore, the device also includes a keyword determination module for:

[0084] Determine at least two keyword filtering rules;

[0085] Based on the style characteristics of the original text, the priority of the keyword filtering rules is determined;

[0086] Keywords are determined in the original text based on the keyword filtering rules that prioritize keywords with a priority level greater than the set priority level.

[0087] Furthermore, the text fragment layout rules include a first rule and a second rule; the layout module 320 is used for:

[0088] Identify the first text segment and the second text segment within the text segment;

[0089] The first text fragment is formatted based on the first rule to obtain the formatted first text fragment;

[0090] The second text fragment is formatted based on the first rule and the second rule to obtain the formatted second text fragment.

[0091] Furthermore, module 340 is manufactured for:

[0092] Configure the motion attributes of the text fragment;

[0093] Based on the motion attributes of the text fragments, the display period of the text fragments on the timeline, the stacking relationship of the text fragments with overlapping display periods, and the layout of the text fragments, a target video is created.

[0094] The text processing apparatus provided in this disclosure can execute the steps performed by the client or server in the text processing method provided in this disclosure, and has the execution steps and beneficial effects, which will not be described in detail here.

[0095] Figure 6This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device 1000 in the embodiments of this disclosure. The electronic device 1000 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0096] like Figure 6 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003 to implement the text processing method as described in the embodiments of this disclosure. The RAM 1003 also stores various programs and information required for the operation of the electronic device 1000. The processing device 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0097] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to exchange information with other devices wirelessly or via wired communication. Although Figure 6 An electronic device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0098] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the text processing method as described above. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.

[0099] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include information signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated information signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0100] In some implementations, clients and servers may communicate using any known or future network protocol, such as HTTP (Hypertext Transfer Protocol), and may interconnect with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any known or future network.

[0101] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0102] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to:

[0103] The original text is segmented to obtain multiple text fragments;

[0104] The text fragment is formatted to obtain the formatted text fragment;

[0105] Based on the position of the text fragment in the original text, determine the display period of the text fragment on the timeline, and the stacking relationship of the text fragments whose display periods at least partially overlap;

[0106] Based on the display periods of the text fragments on the timeline, the stacking relationship of the text fragments whose display periods at least partially overlap, and the layout of the text fragments, a target video is created; in the target video, as time goes on, new text fragments gradually appear.

[0107] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0108] Computer program code for performing the operations of this disclosure can 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, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0109] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0110] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0111] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

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

[0113] According to one or more embodiments of this disclosure, this disclosure provides an electronic device, including:

[0114] One or more processors;

[0115] Memory, used to store one or more programs;

[0116] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the text processing methods provided in this disclosure.

[0117] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements a text processing method as described in any of the present disclosure.

[0118] This disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the text processing method described above.

[0119] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0120] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text processing method, characterized in that, include: The original text is segmented to obtain multiple text fragments; The text fragment is formatted to obtain the formatted text fragment; Based on the position of the text fragment in the original text, determine the display period of the text fragment on the timeline, and the stacking relationship of the text fragments whose display periods at least partially overlap; Based on the display periods of the text fragments on the timeline, the stacking relationship of the text fragments whose display periods at least partially overlap, and the layout of the text fragments, a target video is created; in the target video, as time goes on, new text fragments gradually appear.

2. The method according to claim 1, characterized in that, Also includes: Determine the target text processing rules; the target text processing rules include text segmentation constraints and text fragment layout rules. The step of segmenting the original text to obtain multiple text fragments includes: segmenting the original text to obtain multiple text fragments based on the text segmentation constraints; The step of formatting the text fragment to obtain the formatted text fragment includes: formatting the text fragment using the text fragment formatting rules to obtain the formatted text fragment.

3. The method according to claim 2, characterized in that, The rules for determining the target text processing include: Obtain a text processing rule set; the text processing rule set includes multiple text processing rules; the text processing rules have corresponding tags; Based on the correlation between the category features of the original text and the text processing rule labels, the target text processing rule is determined in the text processing rule set.

4. The method according to claim 2, characterized in that, Based on the aforementioned text segmentation constraints, the original text is segmented to obtain multiple text fragments, including: Based on the text segmentation constraints and the text features of the original text, the original text is segmented to obtain multiple text segments; the text features of the original text include at least one of the following: the part of speech of the phrases in the original text, the dependency relationship between the phrases, and the keywords in the original text.

5. The method according to claim 4, characterized in that, Determining keywords in the original text includes: Determine at least two keyword filtering rules; Based on the style characteristics of the original text, the priority of the keyword filtering rules is determined; Keywords are determined in the original text based on the keyword filtering rules that prioritize keywords with a priority level greater than the set priority level.

6. The method according to claim 2, characterized in that, The text fragment layout rules include a first rule and a second rule; the process of layout the text fragment based on the text fragment layout rules to obtain the layoutd text fragment includes: Identify the first text segment and the second text segment within the text segment; The first text fragment is formatted based on the first rule to obtain the formatted first text fragment; The second text fragment is formatted based on the first rule and the second rule to obtain the formatted second text fragment.

7. The method according to claim 1, characterized in that, The process of creating a target video based on the display periods of the text segments on the timeline, the stacking relationship of the text segments whose display periods at least partially overlap, and the layout information of the text segments includes: Configure the motion attributes of the text fragment; Based on the motion attributes of the text fragments, the display period of the text fragments on the timeline, the stacking relationship of the text fragments with overlapping display periods, and the layout of the text fragments, a target video is created.

8. A text processing device, characterized in that, include: The segmentation module is used to segment the original text into multiple text fragments; The typesetting module is used to typeset the text fragment to obtain the typeset text fragment; The planning module is used to determine the display period of the text fragment on the timeline and the stacking relationship of the text fragments whose display periods at least partially overlap, based on the position of the text fragment in the original text. The production module is used to create a target video based on the display time of the text fragments on the timeline, the stacking relationship of the text fragments whose display time periods at least partially overlap, and the layout of the text fragments; in the target video, new text fragments gradually appear as time goes by.

9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.