Text processing method, system, device and equipment and storage medium
By obtaining and displaying segmented media content of multi-paragraph text content and using preset cache to accelerate loading, the problem of time-consuming generation of media content by multi-paragraph text content is solved, achieving faster media content display and smooth user experience.
Patent Information
- Application Number
- CN202311632619.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-05-30
AI Technical Summary
For multi-paragraph text content, the prior art takes a long time to generate media content, resulting in a long loading time for the media content and a long time for the user to wait for the first frame of media content to be displayed.
By responding to the content generation trigger operation of the target text, the media content corresponding to the first text fragment and the storage location information of the second text fragment are obtained, the first text fragment and the media content are displayed, and the media content of the second text fragment is obtained from the preset cache based on the storage location information.
It reduces the loading time of media content after content generation operation, reduces the waiting time for the first frame media content display, ensures smooth display of media content, and improves user experience.
Smart Images

Figure CN120067348A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular, to a text processing method, system, device, equipment, and storage medium. Background Art
[0002] With the continuous development of text processing technology, more and more users utilize text processing technology to generate media content such as pictures and audio based on text content to enrich the display of text content.
[0003] Currently, for multi-paragraph text content, usually after generating corresponding media content for each paragraph in the multi-paragraphs respectively, the order of the media content corresponding to each paragraph is then displayed. Since the overall time-consuming for generating media content for multi-paragraph text content is relatively long, the loading time after triggering the media content generation operation for multi-paragraph text content is relatively long, and thus the waiting time for the user to display the first-frame media content is relatively long. Summary of the Invention
[0004] To solve the above technical problems, embodiments of the present disclosure provide a text processing method.
[0005] In a first aspect, the present disclosure provides a text processing method, the method comprising:
[0006] In response to a content generation trigger operation for a target text, obtaining a first media content corresponding to a first text segment in the target text, and storage location information corresponding to a second text segment; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, the second text segment is a non-first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier generated based on the first text segment, and the storage location information is used to identify the storage location of a second media content pre-generated based on the second text segment in a preset cache;
[0007] Displaying the first text segment and the first media content;
[0008] Based on the storage location information corresponding to the second text segment, obtaining the second media content corresponding to the second text segment from the preset cache, and displaying the second text segment and the second media content; wherein, the second media content includes media content of the preset content carrier generated based on the second text segment.
[0009] In an optional implementation manner, the first media content includes first video content and a first audio segment, and the displaying the first text segment and the first media content includes:
[0010] Display the first text segment and the first video content, and play the first audio segment synchronously; wherein, the first audio segment includes a voice-over speech segment generated based on the first text segment, and the first video content includes a picture, animation or video segment generated based on the first text segment.
[0011] In an alternative embodiment, the first audio segment further includes a background music segment generated based on the first text segment.
[0012] In an alternative embodiment, before responding to a content generation trigger operation for a target text and obtaining the first media content corresponding to the first text segment in the target text and the storage location information corresponding to the second text segment, it further includes:
[0013] Receive the target text input by the user.
[0014] In an alternative embodiment, before responding to a content generation trigger operation for a target text and obtaining the first media content corresponding to the first text segment in the target text and the storage location information corresponding to the second text segment, it further includes:
[0015] Receive the content generation parameters set for the target text; wherein, the content generation parameters are used to determine the display attributes of the media content of the preset content carrier.
[0016] In an alternative embodiment, responding to a content generation trigger operation for a target text and obtaining the first media content corresponding to the first text segment in the target text and the storage information corresponding to the second text segment includes:
[0017] Responding to a content generation trigger operation for a target text, send a content generation request carrying the target text to a target server; wherein, the target server is used to segment the target text to obtain a first text segment and a second text segment, and generate first media content based on the first text segment; wherein, the first media content includes the media content of the preset content carrier;
[0018] For the content generation request, receive the first media content and the storage location information corresponding to the second text segment; wherein, the storage location information is used to identify the storage location of the second media content pre-generated based on the second text segment in the preset cache;
[0019] Display the first text segment and the first media content.
[0020] In an alternative embodiment, obtaining the second media content corresponding to the second text segment from the preset cache based on the storage location information corresponding to the second text segment, and displaying the second text segment and the second media content includes:
[0021] Sending a media content request carrying the storage location information corresponding to the target second text segment to the target server; wherein, the target second text segment is the adjacent next text segment of the currently displayed text segment, and the media content request is used to instruct the target server to obtain the second media content corresponding to the target second text segment from the preset cache based on the storage location information;
[0022] Receiving the second media content, and in response to the end of the display of the currently displayed text segment, displaying the target second text segment and the second media content.
[0023] In a second aspect, the present disclosure also provides a text processing method, the method includes:
[0024] In response to a content generation request for a target text, generating first media content based on a first text segment in the target text; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, and the first media content includes media content of a preset content carrier;
[0025] Determining the storage location information corresponding to a second text segment in the target text; wherein, the storage location information is used to identify the storage location of the second media content generated based on the second text segment in the preset cache, and the second text segment is a non-first text paragraph among the multiple text paragraphs;
[0026] Returning the first media content and the storage location information corresponding to the second text segment in response to the content generation request;
[0027] Asynchronously generating second media content based on the second text segment in the target text, and storing the second media content in the preset cache based on the storage location information corresponding to the second text segment.
[0028] In an alternative embodiment, the method further includes:
[0029] In response to a media content request carrying the storage location information corresponding to the target second text segment, obtaining the second media content from the preset cache based on the storage location information;
[0030] Returning the second media content in response to the media content request.
[0031] In a third aspect, the present disclosure also provides a text processing system, which includes a target client and a target server;
[0032] The target client is configured to send a content generation request carrying the target text to the target server in response to a content generation trigger operation for the target text;
[0033] The target server is configured to generate first media content based on a first text segment in the target text, determine storage location information corresponding to a second text segment in the target text, and return the first media content and the storage location information corresponding to the second text segment to the target client; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, the second text segment is a non-first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier, and the storage location information is used to identify the storage location of second media content pre-generated based on the second text segment in a preset cache;
[0034] The target client is further configured to display the first text segment and the first media content.
[0035] In an optional implementation manner, the target server is further configured to asynchronously generate second media content based on the second text segment in the target text, and store the second media content in the preset cache based on the storage location information corresponding to the second text segment.
[0036] In an optional implementation manner, the target client is further configured to send a media content request carrying the storage location information corresponding to a target second text segment to the target server; wherein, the target second text segment is the adjacent next text segment of the currently displayed text segment;
[0037] The target server is further configured to, in response to the media content request, obtain the second media content from the preset cache based on the storage location information, and return the second media content to the target client;
[0038] The target client is further configured to, in response to the end of display of the currently displayed text segment, display the target second text segment and the second media content
[0039] In a fourth aspect, the present disclosure provides a text processing device, which includes:
[0040] A first acquisition module, configured to, in response to a content generation trigger operation for a target text, acquire first media content corresponding to a first text segment in the target text and storage location information corresponding to a second text segment; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, the second text segment is a non-first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier generated based on the first text segment, and the storage location information is used to identify the storage location of second media content generated in advance based on the second text segment in a preset cache;
[0041] A first display module, configured to display the first text segment and the first media content;
[0042] A second display module, configured to, based on the storage location information corresponding to the second text segment, acquire second media content corresponding to the second text segment from the preset cache, and display the second text segment and the second media content; wherein, the second media content includes media content of the preset content carrier generated based on the second text segment.
[0043] In a fifth aspect, the present disclosure further provides a text processing device, the device includes:
[0044] A generation module, configured to, in response to a content generation request for a target text, generate first media content based on a first text segment in the target text; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, and the first media content includes media content of a preset content carrier;
[0045] A determination module, configured to determine storage location information corresponding to a second text segment in the target text; wherein, the storage location information is used to identify the storage location of second media content generated based on the second text segment in a preset cache, and the second text segment is a non-first text paragraph among the multiple text paragraphs;
[0046] A first return module, configured to return the first media content and the storage location information corresponding to the second text segment in response to the content generation request;
[0047] A storage module, configured to asynchronously generate second media content based on the second text segment in the target text, and store the second media content in the preset cache based on the storage location information corresponding to the second text segment.
[0048] In a sixth aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the above method.
[0049] In a seventh aspect, the present disclosure provides a text processing device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0050] In an eighth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.
[0051] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:
[0052] The disclosed embodiment provides a text processing method, first, in response to a content generation trigger operation for a target text, a first media content corresponding to a first text segment in the target text and storage location information corresponding to a second text segment are obtained; then the first text segment and the first media content are displayed; then, based on the storage location information corresponding to the second text segment, the second media content corresponding to the second text segment is obtained from a preset cache, and the second text segment and the second media content are displayed. It can be seen that the disclosed embodiment can synchronously obtain and display the media content corresponding to the first text paragraph of the target text after receiving a content generation trigger operation for the target text, thereby reducing the media content loading time after the content generation operation is triggered, and reducing the user's waiting time for the first frame of media content to be displayed.
[0053] In addition, by pre-acquiring the storage location information of the media content corresponding to the non-first text paragraph, the embodiment of the present disclosure can promptly acquire and display the pre-generated media content of the next text paragraph after the display of the media content of the adjacent previous text paragraph is completed, thereby ensuring the smooth display of the media content generated based on the target text, thereby ensuring the overall user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0055] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0056] Figure 1 Flowchart of a text processing method provided by an embodiment of the present disclosure;
[0057] Figure 2 Schematic diagram of a text processing page provided by an embodiment of the present disclosure;
[0058] Figure 3 Schematic diagram of a media content display page provided by an embodiment of the present disclosure;
[0059] Figure 4 Flowchart of another text processing method provided by an embodiment of the present disclosure;
[0060] Figure 5 Schematic diagram of the structure of a text processing system provided by an embodiment of the present disclosure;
[0061] Figure 6 Interaction diagram of a text processing process provided by an embodiment of the present disclosure;
[0062] Figure 7 Schematic diagram of the structure of a text processing device provided by an embodiment of the present disclosure;
[0063] Figure 8 Schematic diagram of the structure of another text processing device provided by an embodiment of the present disclosure;
[0064] Figure 9 Schematic diagram of the structure of a text processing device provided by an embodiment of the present disclosure. Detailed implementation manners
[0065] In order to more clearly understand the above objects, features, and advantages of the present disclosure, the following will further describe the solutions of the present disclosure. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
[0066] Many specific details are set forth in the following description to fully understand the present disclosure, but the present disclosure can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all of the embodiments.
[0067] With the continuous development of text processing technology, more and more users utilize text processing technology to generate media content such as pictures and audio based on text paragraphs to enrich the display methods of text content.
[0068] Currently, for multi-paragraph text content, usually after generating corresponding media content for each paragraph in the multi-paragraphs respectively, then the media content corresponding to each paragraph is displayed in sequence. Since the overall time-consuming for generating media content for multi-paragraph text content is relatively long, it leads to a relatively long loading time after triggering the media content generation operation for multi-paragraph text content, and further results in a relatively long waiting time for the user to view the first-frame media content.
[0069] For this reason, the present disclosure provides a text processing method. First, in response to a content generation trigger operation for a target text, obtain the first media content corresponding to the first text segment in the target text, and the storage location information corresponding to the second text segment; then display the first text segment and the first media content; next, based on the storage location information corresponding to the second text segment, obtain the second media content corresponding to the second text segment from a preset cache, and display the second text segment and the second media content. It can be seen that the embodiments of the present disclosure can synchronously obtain and display the media content corresponding to the first text paragraph of the target text after receiving the content generation trigger operation for the target text, reduce the media content loading duration after triggering the content generation operation, and reduce the waiting time for the user to view the first-frame media content.
[0070] In addition, by pre-obtaining the storage location information of the media content corresponding to non-first text paragraphs, the embodiments of the present disclosure can timely obtain and display the pre-generated media content of the next text paragraph after the media content display of the adjacent previous text paragraph is completed, ensuring the smooth display of the media content generated based on the target text, and thus ensuring the overall user experience.
[0071] Based on this, the embodiments of the present disclosure provide a text processing method, which can be applied to a target client. Refer to Figure 1 , which is a flowchart of a text processing method provided by the embodiments of the present disclosure. The method specifically includes:
[0072] S101: In response to a content generation trigger operation for a target text, obtain the first media content corresponding to the first text segment in the target text, and the storage location information corresponding to the second text segment.
[0073] Wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, the second text segment is a non-first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier generated based on the first text segment, and the storage location information is used to identify the storage location of the second media content pre-generated based on the second text segment in a preset cache.
[0074] The text processing method provided by the embodiments of the present disclosure can be applied to a target client. For example, the target client can include a client deployed on a smart phone, a client deployed on a tablet computer, etc.
[0075] In the embodiments of the present disclosure, the target text can be used to generate different types of media content. Among them, the target text can include text types such as novels, essays, poems, news, etc. In addition, the target text can also include language types such as English and Chinese, and the embodiments of the present disclosure do not limit this.
[0076] A content generation trigger operation for the target text is used to trigger the acquisition of the first media content corresponding to the first text segment in the target text and the storage location information corresponding to the second text segment. Among them, the content generation trigger operation for the target text can include a trigger operation for a content generation control corresponding to the target text, etc.
[0077] As Figure 2 shown, it is a schematic diagram of a text processing page provided by the embodiments of the present disclosure. Among them, a content generation control 201 is displayed on the text processing page. When a click operation of the user on the control is received, the first media content corresponding to the first text segment and the storage location information corresponding to the second text segment are acquired.
[0078] In the embodiments of the present disclosure, the first text segment can be the first text paragraph among multiple text paragraphs obtained by segmenting the target text.
[0079] In an optional implementation manner, in order to be able to dynamically adjust the lengths of each text segment, the target text can also be sent to a target server, and the target server segments the target text. The specific implementation manner will be introduced in detail in subsequent embodiments and will not be elaborated here.
[0080] In the embodiments of the present disclosure, the first media content corresponding to the first text segment may include the media content of a preset content carrier generated based on the first text segment, where the preset content carrier may include content carriers of types such as pictures, audio, animations, or videos. After generating the corresponding first media content for the first text segment, the media content may be displayed on the user page so that the user can better read the first text segment based on the first media content.
[0081] In the embodiments of the present disclosure, the second text segment may be a non-first text paragraph among multiple text segments. For example, assume that after segmenting the target text, three text paragraphs A, B, and C are obtained, where text paragraph A is the first text segment, and text paragraphs B and C are the second text segments.
[0082] In an alternative implementation, after obtaining multiple text segments corresponding to the target text, the first media content corresponding to the first text segment among the multiple text segments and the storage location information corresponding to the second text segment may also be obtained. The storage location information corresponding to the second text segment may be used to identify the storage location of the second media content pre-generated for the second text segment in the preset cache.
[0083] In practical applications, after the display of the first text segment is completed, since the storage location information corresponding to the second text segment has been obtained, the second media content corresponding to the second text segment can be directly obtained from the preset cache based on the storage location information and displayed, ensuring the smooth display of the media content generated based on the target text and thus ensuring the overall user experience.
[0084] S102: Display the first text segment and the first media content.
[0085] In an alternative implementation, the first media content corresponding to the first text segment may include first video content and first audio segments. Therefore, after obtaining the first media content, the first text segment and the first video content may also be displayed for the user, and the first audio segment may be played synchronously.
[0086] Among them, the first audio segment may include a voice reading speech segment generated based on the first text segment, and the first video content may include picture, animation, or video segments generated based on the first text segment, etc.
[0087] In an alternative implementation, the first audio segment may further include a background music segment generated based on the first text segment. Therefore, after obtaining the first media content, the first text segment and the first video content may also be displayed for the user, and the voice reading speech segment and the background audio segment may be played synchronously.
[0088] Such asFigure 3 As shown in the figure, it is a schematic diagram of a media content display page provided by an embodiment of the present disclosure. Among them, a first text segment can be displayed in the text display area, and a first video content corresponding to the first text segment, such as a picture, an animation, etc., can be displayed in the video content display area. In addition, a playback control progress bar can also be displayed on the media content display page, and the user can adjust the playback progress of the first audio segment based on this playback control progress bar.
[0089] Since the embodiment of the present disclosure can, after receiving a content generation trigger operation for a target text, synchronously obtain and display the media content corresponding to the first text paragraph of the target text, thereby reducing the media content loading duration after the trigger content generation operation and reducing the waiting time of the user for the display of the first-frame media content.
[0090] S103: Based on the storage location information corresponding to the second text segment, obtain the second media content corresponding to the second text segment from the preset cache, and display the second text segment and the second media content.
[0091] Among them, the second media content includes the media content of the preset content carrier generated based on the second text segment.
[0092] Since the second media content corresponding to the second text segment is stored in the preset cache in advance based on the storage location information, therefore, when the first text segment and the first media content are displayed, the second media content corresponding to the second text segment can be directly obtained from the preset cache based on the storage location information and displayed, and the user does not need to wait for a long time to view the second media content corresponding to the first text segment.
[0093] In the text processing method provided by the embodiment of the present disclosure, first, in response to a content generation trigger operation for a target text, obtain the first media content corresponding to the first text segment in the target text and the storage location information corresponding to the second text segment; then display the first text segment and the first media content; next, based on the storage location information corresponding to the second text segment, obtain the second media content corresponding to the second text segment from the preset cache, and display the second text segment and the second media content.
[0094] It can be seen that the embodiment of the present disclosure can, after receiving a content generation trigger operation for a target text, synchronously obtain and display the media content corresponding to the first text paragraph of the target text, reduce the media content loading duration after the trigger content generation operation, and reduce the waiting time of the user for the display of the first-frame media content.
[0095] In addition, by pre-obtaining the storage location information of the media content corresponding to the non-first text paragraph, the embodiments of the present disclosure can, after the display of the media content of the previous adjacent text paragraph is completed, timely obtain and display the pre-generated media content of the next text paragraph, ensuring the smooth display of the media content generated based on the target text, and thus ensuring the overall user experience.
[0096] In an alternative embodiment, before obtaining the first media content corresponding to the first text fragment in the target text in response to a content generation trigger operation for the target text, it may further include: receiving the target text input by the user.
[0097] In practical applications, a text input box may also be displayed on the text processing page, and then the target text input by the user is received based on the text input box.
[0098] As Figure 2 shown, a text input box 202 may also be displayed on the text processing page, and the user can input the target text in the text input box 202. After receiving the target text input by the user, in response to a content generation trigger operation for the target text, the first media content corresponding to the first text fragment is obtained.
[0099] In an alternative embodiment, before obtaining the first media content corresponding to the first text fragment in the target text in response to a content generation trigger operation for the target text, it may further include: receiving the content generation parameters set for the target text.
[0100] Among them, the content generation parameters can be used to determine the display attributes of the media content of the preset content carrier. For example, assuming that the media content is a voice reading speech, the content generation parameters set for the target text may include the speech rate or intonation of the voice reading speech, etc.; assuming that the media content is an image content, the content generation parameters set for the target text may include the display style of the image content, such as oil painting or sketch style, etc.
[0101] In practical applications, parameter adjustment controls may also be displayed on the text processing page. Further, the content generation parameters set by the user for the target text are received based on the parameter adjustment controls.
[0102] As Figure 2 shown, content adjustment controls 203, such as speech rate adjustment controls and intonation adjustment controls, etc., may also be displayed on the text processing page. The user can use the content adjustment controls to adjust the speech rate and intonation of the generated voice reading speech, for example, controlling the voice reading speech to be played at a faster speech rate, etc.
[0103] In an alternative embodiment, the target client may also respond to a content generation trigger operation for the target text, and send a content generation request carrying the target text to the target server, so that the target server performs segmentation processing on the target text to obtain a first text segment and a second text segment, and generates first media content based on the first text segment.
[0104] Among them, the first media content may include media content of a preset content carrier, such as pictures, animations, or videos, etc.
[0105] After receiving the content generation request carrying the target text, the target server performs segmentation processing on the target text to obtain a first text segment and a second text segment, determines the first media content corresponding to the first text segment, and the storage location information corresponding to the second text segment, and then sends the first media content and the storage location information corresponding to the second text segment to the client corresponding to the content generation request, that is, the target client.
[0106] Next, for the content generation request, the target client receives the first media content and the storage location information corresponding to the second text segment. Among them, the storage location information can be used to identify the storage location of the second media content pre-generated based on the second text segment in the preset cache.
[0107] Further, the target client displays the first text segment and the second media content.
[0108] In an alternative embodiment, based on the storage location information corresponding to the second text segment, obtaining the second media content corresponding to the second text segment from the preset cache, and displaying the second text segment and the second media content may further include:
[0109] Sending a media content request carrying the storage location information corresponding to the target second text segment to the target server.
[0110] In the embodiments of the present disclosure, the target second text segment may be the adjacent next text segment of the currently displayed text segment. Among them, the currently displayed text paragraph may include any one of the first text segment or the second text segment.
[0111] Exemplarily, assume that the multiple text paragraphs corresponding to the target text are text paragraph A, text paragraph B, text paragraph C, and text paragraph D respectively, where text paragraph A is the first text segment. Assume that the currently displayed text paragraph is C, then the target second text segment is the adjacent next text segment of text paragraph C, that is, text segment D.
[0112] In an embodiment of the present disclosure, a media content request may be used to instruct a target server to obtain second media content corresponding to a target second text segment from a preset cache based on the storage location information carried in the request.
[0113] In an embodiment of the present disclosure, when the target server receives a media content request carrying the storage location information corresponding to the target second text segment, it obtains the second media content corresponding to the target second text segment from the preset cache based on the storage location information, and sends the second media content to the client corresponding to the media content request, that is, the target client.
[0114] In another alternative embodiment, the target client receives the second media content from the target server, and when the currently displayed text segment is finished being displayed, it displays the target second text segment and the second media content.
[0115] It can be seen that in the embodiment of the present disclosure, by pre-obtaining the storage location information of the media content corresponding to the non-means text paragraph, it is possible to timely obtain and display the media content of the pre-generated next text segment after the media content corresponding to the currently displayed text paragraph is displayed.
[0116] To facilitate a further understanding of the text processing method provided by the present disclosure, an embodiment of the present disclosure also provides a text processing method. Refer to Figure 4 , which is a flowchart of another text processing method provided by an embodiment of the present disclosure. Specifically, this text processing method is applied to a target server and specifically includes:
[0117] S401: In response to a content generation request for a target text, generate first media content based on a first text segment in the target text.
[0118] Wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, and the first media content includes media content of a preset content carrier.
[0119] In practical applications, when the target client receives a content generation trigger operation for a target text, it may also send a content generation request for the target text to the target server to instruct the target server to generate first media content based on the target text.
[0120] The content generation request may carry the target text. When the target server receives the content generation request for the target text, it may generate first media content based on the first text segment in the target text.
[0121] In an alternative approach, before generating the first media content based on the first text segment in the target text, it may further include: segmenting the target text to obtain multiple text segments; wherein, the first text segment may be the first text segment among the multiple text segments.
[0122] In practical applications, a long text classification model based on machine learning or a long text windowing segmentation algorithm, etc., can be used to segment the target text to obtain multiple text paragraphs.
[0123] In order to generate the second media content corresponding to the second text segment as much as possible before the display of the first text segment and the first media content is completed, in practical applications, the length of the first text segment can also be controlled during the segmentation process.
[0124] In an alternative implementation manner, when a content generation trigger operation for the target text is received, the target text can also be segmented based on a preset text segmentation strategy so that the number of words in the first text segment is not less than a preset threshold. Wherein, the preset text segmentation strategy is used to control that the number of words in the first text paragraph is not less than the preset threshold.
[0125] In practical applications, during the display of the first text segment and the first media content, the second media content corresponding to the second text segment can also be generated and stored in a preset cache based on the storage location information, so that when a media content request carrying the storage location information is received later, the second media content can be obtained from the preset cache in a timely manner based on the storage location information, and the second media content is returned in response to the media content request, ensuring the smooth display of the media content generated based on the target text, thereby ensuring the overall user experience.
[0126] In an alternative implementation manner, the first media content may include first video content and first audio segments, wherein the first video content may include pictures, animations, or video segments, etc., generated based on the first text segment.
[0127] In practical applications, a deep learning algorithm or a text-to-image model, etc., can be used to generate a picture corresponding to the first text segment, and a text-to-video model, etc., can be used to generate an animation or a video segment, etc., corresponding to the first text segment.
[0128] In an alternative implementation manner, during the process of generating the media content corresponding to the first text segment of the target text, the media content corresponding to the next adjacent text segment or multiple text segments can also be generated synchronously, so that after the display of the media content of the current text paragraph is completed, the pre-generated media content of the next text paragraph can be obtained and displayed in a timely manner, ensuring the smooth display of the media content generated based on the target text, thereby ensuring the overall user experience.
[0129] S402: Determine the storage location information corresponding to the second text segment in the target text.
[0130] Wherein, the storage location information is used to identify the storage location of the second media content generated based on the second text segment in a preset cache, and the second text segment is a non-first text paragraph among the multiple text paragraphs.
[0131] In practical applications, after segmenting the target text to obtain multiple text paragraphs, the storage location information corresponding to the non-first text paragraphs (i.e., the second text segments) among the multiple text paragraphs can also be determined respectively.
[0132] In an alternative implementation, a random string generated by using random number generation technology can also be used as the storage location information corresponding to the second text segment to identify the storage location of the second media content in the preset cache, so that subsequently, based on the storage location information, the second media content corresponding to the second text segment can be obtained from the preset cache in a timely manner and displayed, ensuring the smooth display of the media content generated based on the target text, and thus ensuring the overall user experience.
[0133] S403: Return the first media content and the storage location information corresponding to the second text segment in response to the content generation request.
[0134] In the embodiments of the present disclosure, after determining the storage location information corresponding to the second text segment, the storage location information corresponding to the second text segment can also be sent to the target client corresponding to the content generation request, so that after receiving the storage location information corresponding to the second text segment, the target client can obtain the second media content from the preset cache based on the storage location information corresponding to the second text segment and display it.
[0135] S404: Asynchronously generate the second media content based on the second text segment in the target text, and store the second media content in the preset cache based on the storage location information corresponding to the second text segment.
[0136] In practical applications, asynchronous and synchronous are two different message communication mechanisms. Synchronous means that in response to a call request, the corresponding result is returned synchronously, while asynchronous means that receiving the call request and returning the call request are not carried out simultaneously.
[0137] In the embodiments of the present disclosure, asynchronously generating the second media content means that before receiving the media content request, the second media content is pre-generated based on the second text segment and stored in the preset cache, and subsequently, when receiving the media content request, the second media content is returned in response to the media content request.
[0138] In an alternative implementation, after storing the second media content in a preset cache, it is also possible to respond to a media content request carrying the storage location information corresponding to the target second text segment, and obtain the second media content from the preset cache based on the storage location information. Further, the second media content is returned in response to the media content request.
[0139] In the embodiments of the present disclosure, when the target server receives a content generation request for the target text, it can send the first media content corresponding to the first text paragraph to the target client, without waiting for all paragraphs to generate the corresponding media content and then returning the media content corresponding to the first paragraph, thereby reducing the media content loading duration after triggering the content generation operation and reducing the waiting time of the user for the display of the first-frame media content.
[0140] In addition, by pre-obtaining the storage location information of the media content corresponding to the non-first text paragraphs in the embodiments of the present disclosure, it is possible to timely obtain and display the pre-generated media content of the next text paragraph after the display of the media content of the adjacent previous text paragraph is completed, ensuring the smooth display of the media content generated based on the target text, and thus ensuring the overall user experience.
[0141] For the convenience of understanding the overall solution, the present disclosure provides a text processing system. Specifically, the text processing system includes a target client and a target server. Refer to Figure 5 , which is a schematic structural diagram of a text processing system provided by the embodiments of the present disclosure.
[0142] Among them, the text processing system 500 includes a target client 501 and a target server 502.
[0143] Specifically, the target client 501 is configured to send a content generation request carrying the target text to the target server in response to a content generation trigger operation for the target text.
[0144] The target server 502 is configured to generate first media content based on the first text segment in the target text, and determine the storage location information corresponding to the second text segment in the target text, and return the first media content and the storage location information corresponding to the second text segment to the target client; wherein, the first text segment is the first text paragraph among the multiple text paragraphs obtained by segmenting the target text, the second text segment is a non-first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier, and the storage location information is used to identify the storage location of the second media content pre-generated based on the second text segment in the preset cache.
[0145] In addition, the target client 501 is further configured to display the first text segment and the first media content.
[0146] In an embodiment of the present disclosure, when the target client receives a content generation trigger operation for text, it sends a content generation request carrying the target text to the target server.
[0147] After receiving the content generation request sent by the target client, the target server first performs a segmentation process on the target text carried in the content generation request to obtain multiple text segments, generates first media content based on the first text segment among the multiple text segments, and determines the storage location information corresponding to the second text segment among the multiple text segments.
[0148] After generating the first media content based on the first text segment and determining the storage location information corresponding to the second text segment, the target server returns the first media content and the storage location information corresponding to the second text segment to the target client.
[0149] After receiving the first media content and the storage location information corresponding to the second text segment returned by the target server, the target client displays the first text segment and the first media content.
[0150] The target client is further configured to send a media content request carrying the storage location information corresponding to the target second text segment to the target server. The target second text segment is the next adjacent text segment of the currently displayed text segment.
[0151] When receiving the media content request sent by the target client, the target server obtains the second media content from a preset cache based on the storage location information and returns the second media content to the target client.
[0152] When determining that the currently displayed text segment has ended, the target client displays the target second text segment and the second media content.
[0153] In the text processing system provided by the embodiment of the present disclosure, since the target server can send the first media content corresponding to the first text paragraph to the target client when receiving a content generation request for the target text, without waiting for all paragraphs to generate corresponding media content and then returning the media content corresponding to the first paragraph, the loading duration of the media content after the content generation trigger operation is reduced, and the waiting time of the user for the display of the first-frame media content is reduced.
[0154] In addition, by pre-obtaining the storage location information of the media content corresponding to the non-first text paragraph, the embodiments of the present disclosure can, after the display of the media content of the adjacent previous text paragraph is completed, timely obtain and display the pre-generated media content of the next text paragraph, ensuring the smooth display of the media content generated based on the target text, and thus ensuring the overall user experience.
[0155] To facilitate the understanding of the above embodiments, the embodiments of the present disclosure will be introduced with a specific interaction scenario. For example, Figure 6 As shown, the embodiments of the present disclosure provide an interaction diagram of a text processing process. Specifically, taking the generation of the voice reading voice, background music, and pictures corresponding to the target text as an example, the text processing process is described.
[0156] The target client receives the target text input by the user and the content generation parameters set for the target text, such as the speech rate and intonation, and sends a content generation request carrying the target text and the content generation parameters to the target server.
[0157] The target server receives the content generation request carrying the target text and the content generation parameters, performs segmentation processing on the target text to obtain multiple text paragraphs, and the storage location information corresponding to the second text segment; sends a voice generation request carrying the first text segment (i.e., the first text paragraph among the multiple text paragraphs) to the text-to-speech service.
[0158] The text-to-speech service receives the voice generation request carrying the first text segment, generates a voice reading voice segment corresponding to the first text segment; and returns the voice reading voice segment for the voice generation request.
[0159] The target server can also generate the corresponding background music based on the first text segment, or select relevant music from the preset music library as the background music corresponding to the first text segment.
[0160] In practical applications, the target server can also send a picture generation request carrying the keywords corresponding to the first text segment to the text-to-picture service to instruct the text-to-picture service to generate the picture corresponding to the first text segment.
[0161] Before sending the keywords corresponding to the first text segment to the text-to-picture service, the target text can also be segmented to obtain the keywords corresponding to the first text segment. In practical applications, for text segments in English style, space segmentation can be directly used, while for text segments in Chinese style, a third-party library can be used for segmentation. After segmentation, the text segments can more accurately extract the keywords in the text segments.
[0162] The text - image service receives an image generation request carrying a first text segment, generates an image corresponding to the first text segment, and returns the image corresponding to the first text segment for the image generation request.
[0163] The target server returns segmentation information, first media content (i.e., the voice - reading voice, background music, and image corresponding to the first text segment), and the storage location information corresponding to the second text segment to the target client.
[0164] The target client receives the segmentation information, the first media content, and the storage location information corresponding to the second text segment, and displays the first text segment and the first media content.
[0165] During the process of the target client displaying the first text segment and the first media content, the target server continues to execute the steps of obtaining the voice - reading voice, background music, and image corresponding to the second text segment.
[0166] When the target server receives a media content request from the target client, it obtains the second media content from a preset cache based on the storage location information and returns the second media content to the target client.
[0167] The target client receives the second media content corresponding to the target second text segment and displays the target second text segment and the second media content.
[0168] Corresponding to the above - mentioned method embodiments, the present disclosure also provides a text processing device. Refer to Figure 7 , which is a schematic structural diagram of a text processing device provided by an embodiment of the present disclosure. Specifically, the device includes:
[0169] A first acquisition module 701, configured to obtain the first media content corresponding to the first text segment in the target text and the storage location information corresponding to the second text segment in response to a content generation trigger operation for the target text. Wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, the second text segment is a non - first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier generated based on the first text segment, and the storage location information is used to identify the storage location of the second media content pre - generated based on the second text segment in a preset cache.
[0170] A first display module 702, configured to display the first text segment and the first media content.
[0171] The second display module 703 is configured to obtain the second media content corresponding to the second text segment from the preset cache based on the storage location information corresponding to the second text segment, and display the second text segment and the second media content; wherein, the second media content includes the media content of the preset content carrier generated based on the second text segment.
[0172] In an optional implementation manner, the display module includes:
[0173] The first display sub-module is configured to display the first text segment and the first video content, and synchronously play the first audio segment; wherein, the first audio segment includes a voice reading speech segment generated based on the first text segment, and the first video content includes a picture, an animation or a video segment generated based on the first text segment.
[0174] In an optional implementation manner, the first audio segment further includes a background music segment generated based on the first text segment.
[0175] In an optional implementation manner, the device further includes:
[0176] The first receiving module is configured to receive a target text input by a user.
[0177] In an optional implementation manner, the device further includes:
[0178] The second receiving module is configured to receive content generation parameters set for the target text; wherein, the content generation parameters are used to determine the display attributes of the media content of the preset content carrier.
[0179] In an optional implementation manner, the obtaining module includes:
[0180] The first sending sub-module is configured to, in response to a content generation trigger operation for a target text, send a content generation request carrying the target text to a target server; wherein, the target server is configured to perform segmentation processing on the target text to obtain a first text segment and a second text segment, and generate first media content based on the first text segment; wherein, the first media content includes the media content of the preset content carrier;
[0181] The first receiving sub-module is configured to receive, for the content generation request, the first media content and the storage location information corresponding to the second text segment; wherein, the storage location information is used to identify the storage location of the second media content pre-generated based on the second text segment in the preset cache;
[0182] The second display sub-module is configured to display the first text segment and the first media content.
[0183] In an alternative embodiment, the second display module includes:
[0184] A second sending sub-module, configured to send a media content request carrying the storage location information corresponding to the target second text segment to the target server; wherein, the target second text segment is the next adjacent text segment of the currently displayed text segment, and the media content request is used to instruct the target server to obtain the second media content corresponding to the target second text segment from the preset cache based on the storage location information;
[0185] A second receiving sub-module, configured to receive the second media content, and display the target second text segment and the second media content in response to the end of the display of the currently displayed text segment.
[0186] In addition, an embodiment of the present disclosure further provides a text processing device. Refer to Figure 8 , which is a schematic structural diagram of another text processing device provided by an embodiment of the present disclosure. Specifically, the device includes:
[0187] A generating module 801, configured to generate first media content based on a first text segment in the target text in response to a content generation request for the target text; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, and the first media content includes media content of a preset content carrier;
[0188] A determining module 802, configured to determine the storage location information corresponding to a second text segment in the target text; wherein, the storage location information is used to identify the storage location of the second media content generated based on the second text segment in the preset cache, and the second text segment is a non-first text paragraph among the multiple text paragraphs;
[0189] A first returning module 803, configured to return the first media content and the storage location information corresponding to the second text segment in response to the content generation request;
[0190] A storage module 804, configured to asynchronously generate second media content based on the second text segment in the target text, and store the second media content in the preset cache based on the storage location information corresponding to the second text segment.
[0191] In an alternative embodiment, the device further includes:
[0192] A second obtaining module, configured to obtain second media content from the preset cache based on the storage location information in response to a media content request carrying the storage location information corresponding to the target second text segment.
[0193] A second return module, configured to return the second media content for the media content request.
[0194] An embodiment of the present disclosure provides a text processing device. First, in response to a content generation trigger operation for a target text, obtain first media content corresponding to a first text segment in the target text and storage location information corresponding to a second text segment; then display the first text segment and the first media content; next, based on the storage location information corresponding to the second text segment, obtain second media content corresponding to the second text segment from a preset cache, and display the second text segment and the second media content. It can be seen that the embodiment of the present disclosure can, after receiving a content generation trigger operation for a target text, synchronously obtain and display media content corresponding to the first text paragraph of the target text, reduce the media content loading duration after the trigger content generation operation, and reduce the waiting time of the user for the display of the first-frame media content.
[0195] In addition, by pre-obtaining the storage location information of the media content corresponding to non-first text paragraphs, the embodiment of the present disclosure can, after the display of the media content of the adjacent previous text paragraph is completed, timely obtain and display the pre-generated media content of the next text paragraph, ensuring the smooth display of the media content generated based on the target text, and thus ensuring the overall experience of the user.
[0196] In addition to the above methods and devices, an embodiment of the present disclosure also provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a terminal device, the terminal device is enabled to implement the text processing method described in the embodiment of the present disclosure.
[0197] An embodiment of the present disclosure also provides a computer program product. The computer program product includes computer programs / instructions. When the computer programs / instructions are executed by a processor, the text processing method described in the embodiment of the present disclosure is implemented.
[0198] In addition, an embodiment of the present disclosure also provides a text processing device. Refer to Figure 9 as shown, it may include:
[0199] A processor 901, a memory 902, an input device 903, and an output device 909. The number of processors 901 in the text processing device may be one or more, Figure 9 taking one processor as an example. In some embodiments of the present disclosure, the processor 901, the memory 902, the input device 903, and the output device 909 may be connected through a bus or other means. Among them, Figure 9 taking the connection through a bus as an example.
[0200] The memory 902 can be used to store software programs and modules. The processor 901 executes various functional applications and data processing of the text processing device by running the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function, etc. In addition, the memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. The input device 903 can be used to receive input digital or character information, and generate signal inputs related to the user settings and function controls of the text processing device.
[0201] Specifically in this embodiment, the processor 901 will load the executable files corresponding to the processes of one or more application programs into the memory 902 according to the following instructions, and the processor 901 will run the application programs stored in the memory 902, so as to implement various functions of the above text processing device.
[0202] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0203] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A text processing method, characterized in that, the method includes: In response to a trigger operation for generating content of a target text, obtaining first media content corresponding to a first text segment in the target text, and storage location information corresponding to a second text segment; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, the second text segment is a non-first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier generated based on the first text segment, and the storage location information is used to identify the storage location of second media content pre-generated based on the second text segment in a preset cache; Displaying the first text segment and the first media content; Based on the storage location information corresponding to the second text segment, obtaining the second media content corresponding to the second text segment from the preset cache, and displaying the second text segment and the second media content; wherein, the second media content includes media content of the preset content carrier generated based on the second text segment.
2. The method according to claim 1, characterized in that, the first media content includes first video content and a first audio segment, and the displaying the first text segment and the first media content includes: Displaying the first text segment and the first video content, and synchronously playing the first audio segment; wherein, the first audio segment includes a voice reading speech segment generated based on the first text segment, and the first video content includes a picture, an animation or a video segment generated based on the first text segment.
3. The method according to claim 2, characterized in that, the first audio segment further includes a background music segment generated based on the first text segment.
4. The method according to claim 1, characterized in that, before the responding to a trigger operation for generating content of a target text and obtaining the first media content corresponding to the first text segment in the target text and the storage location information corresponding to the second text segment, further includes: Receiving a target text input by a user.
5. The method according to claim 4, characterized in that, before the responding to a trigger operation for generating content of a target text and obtaining the first media content corresponding to the first text segment in the target text and the storage location information corresponding to the second text segment, further includes: Receiving content generation parameters set for the target text; wherein, the content generation parameters are used to determine display attributes of the media content of the preset content carrier.
6. The method according to claim 1, characterized in that, the responding to a trigger operation for generating content of a target text and obtaining the first media content corresponding to the first text segment in the target text and the storage information corresponding to the second text segment includes: In response to a content generation trigger operation for a target text, send a content generation request carrying the target text to a target server; wherein, the target server is configured to perform segmentation processing on the target text to obtain a first text segment and a second text segment, and generate first media content based on the first text segment; wherein, the first media content includes media content of a preset content carrier. In response to the content generation request, receive the first media content and the storage location information corresponding to the second text segment; wherein, the storage location information is used to identify the storage location of second media content pre-generated based on the second text segment in a preset cache. Display the first text segment and the first media content.
7. The method according to claim 6, wherein, the obtaining the second media content corresponding to the second text segment from the preset cache based on the storage location information corresponding to the second text segment, and displaying the second text segment and the second media content includes: sending a media content request carrying the storage location information corresponding to a target second text segment to the target server; wherein, the target second text segment is the next adjacent text segment of the currently displayed text segment, and the media content request is used to instruct the target server to obtain the second media content corresponding to the target second text segment from the preset cache based on the storage location information; receiving the second media content, and in response to the end of the display of the currently displayed text segment, displaying the target second text segment and the second media content.
8. A text processing method, wherein, the method includes: in response to a content generation request for a target text, generating first media content based on a first text segment in the target text; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by performing segmentation processing on the target text, and the first media content includes media content of a preset content carrier; determining the storage location information corresponding to a second text segment in the target text; wherein, the storage location information is used to identify the storage location of second media content generated based on the second text segment in a preset cache, and the second text segment is a non-first text paragraph among the multiple text paragraphs; returning the first media content and the storage location information corresponding to the second text segment in response to the content generation request; asynchronously generating second media content based on the second text segment in the target text, and storing the second media content in the preset cache based on the storage location information corresponding to the second text segment.
9. The method according to claim 8, wherein, the method further includes: in response to a media content request carrying the storage location information corresponding to a target second text segment, obtaining the second media content from the preset cache based on the storage location information; returning the second media content in response to the media content request.
10. A text processing system, wherein, the system includes a target client and a target server; The target client is configured to send a content generation request carrying the target text to the target server in response to a content generation trigger operation for the target text; The target server is configured to generate first media content based on a first text segment in the target text, and determine storage location information corresponding to a second text segment in the target text, and return the first media content and the storage location information corresponding to the second text segment to the target client; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, the second text segment is a non-first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier, and the storage location information is used to identify the storage location of second media content pre-generated based on the second text segment in a preset cache; The target client is further configured to display the first text segment and the first media content.
11. The system according to claim 10, wherein, The target server is further configured to asynchronously generate second media content based on the second text segment in the target text, and store the second media content in the preset cache based on the storage location information corresponding to the second text segment.
12. The system according to claim 10, wherein, The target client is further configured to send a media content request carrying the storage location information corresponding to a target second text segment to the target server; wherein, the target second text segment is the next adjacent text segment of the currently displayed text segment; The target server is further configured to, in response to the media content request, obtain the second media content from the preset cache based on the storage location information, and return the second media content to the target client; The target client is further configured to, in response to the end of display of the currently displayed text segment, display the target second text segment and the second media content.
13. A text processing device, wherein, The device includes: A first acquisition module, configured to acquire first media content corresponding to a first text segment in the target text, and storage location information corresponding to a second text segment in response to a content generation trigger operation for the target text; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, the second text segment is a non-first text paragraph among the multiple text paragraphs, the first media content includes media content of a preset content carrier generated based on the first text segment, and the storage location information is used to identify the storage location of second media content pre-generated based on the second text segment in a preset cache; A first display module, configured to display the first text segment and the first media content; A second display module, configured to obtain second media content corresponding to the second text segment from the preset cache based on the storage location information corresponding to the second text segment, and display the second text segment and the second media content; wherein, the second media content includes media content of the preset content carrier generated based on the second text segment.
14. A text processing device, characterized in that the device includes: a generation module, configured to generate first media content based on a first text segment in the target text in response to a content generation request for the target text; wherein, the first text segment is the first text paragraph among multiple text paragraphs obtained by segmenting the target text, and the first media content includes media content of a preset content carrier; a determination module, configured to determine storage location information corresponding to a second text segment in the target text; wherein, the storage location information is used to identify the storage location of second media content generated based on the second text segment in a preset cache, and the second text segment is a non-first text paragraph among the multiple text paragraphs; a first return module, configured to return the first media content and the storage location information corresponding to the second text segment in response to the content generation request; a storage module, configured to asynchronously generate second media content based on the second text segment in the target text, and store the second media content in the preset cache based on the storage location information corresponding to the second text segment.
15. A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is caused to implement the method according to any one of claims 1-9.
16. A text processing device, characterized in that it includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the method according to any one of claims 1-9 is implemented.