Text data display method, device, computer equipment and storage medium
Through the combination of static and dynamic display controls, dynamic display of target statements and static display of associated statements, the problem of poor display effect of text data is solved, and the target statements that quickly locate the current playback content is improved, and the user experience is improved.
Patent Information
- Application Number
- CN202110495696.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-07
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2041-05-23
AI Technical Summary
In the prior art, the display effect of text data is poor, and it is difficult for users to quickly find the target statement corresponding to the current playback content.
The first display parameter and the second display parameter are determined through the static display control, the dynamic display control displays the target statement, and the static display control displays the associated statement, so as to realize the dynamic display of the target statement and the static display of the associated statement.
It improves the display effect of text data, enables users to quickly find the target statement corresponding to the current playback content, and enhances the user experience.
Smart Images

Figure CN113515334B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computer technology, and more particularly to a method, apparatus, computer device, and storage medium for displaying text data. Background Art
[0002] With the continuous development of computer technology and electronic devices, watching or listening to multimedia data has become a common form of entertainment for people. In order to make users more aware of the content of multimedia data, text data corresponding to the multimedia data can be displayed during the playback of multimedia data. However, the display effect of text data is currently poor. Summary of the Invention
[0003] The present invention provides a method, apparatus, computer device, and storage medium for displaying text data, which improve the display effect of text data. The technical solution is as follows:
[0004] In one aspect, a method for displaying text data is provided, the method comprising:
[0005] Acquire text data corresponding to the audio data, wherein the text data includes at least one sentence;
[0006] During playback of the audio data, calling a static display control to determine a first display parameter and a second display parameter, wherein the first display parameter includes at least a target sentence in the text data that matches the currently played content of the audio data, and the second display parameter includes at least an associated sentence, wherein the associated sentence includes at least one of a sentence before the target sentence and a sentence after the target sentence;
[0007] Calling the static display control and sending the first display parameter to the dynamic display control;
[0008] Calling the dynamic display control to display the target sentence according to the first display parameter;
[0009] The static display control is called to display the associated statement according to the second display parameter.
[0010] In another aspect, a text data display device is provided, the device comprising:
[0011] An acquisition module, configured to acquire text data corresponding to the audio data, wherein the text data includes at least one sentence;
[0012] a determination module, configured to, during playback of the audio data, call a static display control to determine a first display parameter and a second display parameter, wherein the first display parameter includes at least a target sentence in the text data that matches the currently played content of the audio data, and the second display parameter includes at least an associated sentence, wherein the associated sentence includes at least one of a sentence before the target sentence and a sentence after the target sentence;
[0013] A sending module, configured to call the static display control and send the first display parameter to the dynamic display control;
[0014] A first display module, configured to call the dynamic display control and display the target sentence according to the first display parameter;
[0015] The second display module is used to call the static display control and display the associated statement according to the second display parameter.
[0016] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the operations performed in the text data display method described in the above aspects.
[0017] On the other hand, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the operations performed in the text data display method as described in the above aspects.
[0018] On the other hand, a computer program is provided, wherein at least one program code is stored in the computer program, and the at least one program code is loaded and executed by a processor to implement the operations performed in the text data display method of the above embodiment.
[0019] The text data display method, apparatus, computer device, and storage medium provided in the embodiments of the present application can dynamically display the target sentence corresponding to the currently playing content and statically display the associated sentences of the target sentence. This allows users to quickly find the target sentence corresponding to the currently playing content when viewing text data, thereby improving the display quality of the text data. Furthermore, in the embodiments of the present application, the dynamic display control is controlled by a static display control, making this solution easier to implement. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 It is a structural diagram of an implementation environment provided by an embodiment of the present application.
[0022] Figure 2 This is a flowchart of a text data display method provided in an embodiment of the present application.
[0023] Figure 3 This is a flowchart of a text data display method provided in an embodiment of the present application.
[0024] Figure 4 This is a schematic diagram of the dynamic effect of a target sentence provided in an embodiment of the present application.
[0025] Figure 5 This is a schematic diagram of a static display control provided in an embodiment of the present application.
[0026] Figure 6 This is a schematic diagram of the superimposed display of a static display control and a dynamic display control provided in an embodiment of the present application.
[0027] Figure 7 This is a structural diagram of a text data display device provided in an embodiment of the present application.
[0028] Figure 8 A schematic structural diagram of another text data display device provided in an embodiment of the present application.
[0029] Figure 9 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present application.
[0030] Figure 10 This is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0032] It is understood that the terms "first," "second," "third," "fourth," "fifth," "sixth," etc., used in this application may be used to describe various concepts herein, but unless otherwise specified, these concepts are not limited by these terms. These terms are merely used to distinguish one concept from another. For example, a first display module may be referred to as a second display module, and a second display module may be referred to as a first display module, without departing from the scope of this application.
[0033] As used herein, the terms "each," "plurality," "at least one," and "any" include one, two, or more, "plurality" includes two or more, "each" refers to each of the corresponding "plurality," and "any" refers to any one of the "plurality." For example, if "plurality" includes three statements, "each" refers to each of the three statements, and "any" refers to any one of the three statements, which can be the first, second, or third statement.
[0034] The text data display method provided in the embodiment of the present application is executed by a computer device. In one possible implementation, the computer device is a terminal, such as a mobile phone, a tablet computer, a computer, etc. In another possible implementation, the computer device includes a terminal and a server.
[0035] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 , the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network.
[0036] The target application provided by the server 102 is installed on the terminal 101. The terminal 101 can use the target application to implement functions such as data transmission and message exchange. Optionally, the target application is a target application in the terminal 101 operating system, or a target application provided by a third party. For example, the target application is a multimedia processing application that has the function of playing multimedia data, such as playing videos and playing audio. Of course, the multimedia processing application can also have other functions, such as sharing functions and commenting functions.
[0037] Optionally, the terminal 101 obtains the audio data and the text data corresponding to the audio data from the server 102 based on the target application, and plays the audio data and the text data locally.
[0038] The text data display method provided in the embodiment of the present application can be applied to multimedia data playback scenarios:
[0039] For example, it is used in audio playback scenarios.
[0040] When a user listens to a song, in order to hear the lyrics clearly, the user can view the lyrics on the terminal. If the text data display method provided in the embodiment of the present application is adopted, since the lyrics being sung are dynamically displayed, the user can find the lyrics being sung at a glance, thereby improving the display effect of the lyrics.
[0041] For example, it is applied in the recording scene of a song.
[0042] When a user records a song, if the text data display method provided in the embodiment of the present application is used, the lyrics being sung can be dynamically displayed, thereby helping the user to better grasp the rhythm of the song and record more pleasant songs.
[0043] It should be noted that the embodiments of the present application are only illustrative of the playback scenarios of multimedia data in the above two scenarios. The embodiments of the present application do not limit the playback scenarios of multimedia data. The playback scenarios of the multimedia data can also be user K (karaoke) song scenarios, video playback scenarios, etc.
[0044] Figure 2 This is a flowchart of a text data display method provided by an embodiment of the present application. This embodiment of the present application takes the execution subject as a terminal as an example for exemplary description. Figure 2 , the method comprising:
[0045] 201. A terminal obtains text data corresponding to audio data, where the text data includes at least one sentence.
[0046] In the embodiment of the present application, the audio data may be audio data corresponding to the video data, for example, the audio of a movie, or may be separate audio data, for example, the audio of a song, etc. The embodiment of the present application does not limit the audio data.
[0047] During the playback of audio data, in order to help users better understand the content of the audio data, textual commentary is usually provided for the audio data. The content included in the textual commentary is the textual commentary. For example, if the audio data is a song, the textual commentary may be the lyrics of the song. For another example, if the audio data is the dubbing of a TV series, the textual commentary may be the subtitles of the TV series.
[0048] Among them, the text data includes at least one sentence, each sentence includes at least one character, and the character can be any form of character such as Chinese characters, numeric characters, English characters, punctuation characters, etc. The embodiment of the present application does not limit the character form.
[0049] 202. During playback of audio data, the terminal calls a static display control to determine a first display parameter and a second display parameter.
[0050] The first display parameter includes at least a target sentence in the text data that matches the currently played content of the audio data, and the second display parameter includes at least a related sentence, wherein the related sentence includes at least one of a sentence before the target sentence or a sentence after the target sentence. In other words, the related sentence may include only the sentence before the target sentence, only the sentence after the target sentence, or both the sentence before the target sentence and the sentence after the target sentence.
[0051] Among them, the sentences before the target sentence in the associated sentence can be one or more, and the sentences after the target sentence can also be one or more. The embodiment of the present application does not limit the number of associated sentences.
[0052] It should be noted that the associated statements corresponding to the target sentence are related to the position of the target sentence in the text data. For example, if the target sentence is the first sentence in the text data, the associated statements will only include the sentences after the target sentence, not the sentences before the target sentence. For another example, if the target sentence is the last sentence in the text data, the associated statements will only include the sentences before the target sentence, not the sentences after the target sentence.
[0053] Among them, the static display control is used to display static content.
[0054] 203. The terminal calls the static display control and sends a first display parameter to the dynamic display control.
[0055] Among them, the dynamic display control is used to display dynamic content.
[0056] 204. The terminal calls the dynamic display control and displays the target sentence according to the first display parameter.
[0057] 205. The terminal calls the static display control and displays the associated statement according to the second display parameter.
[0058] That is to say, the statically displayed associated statements are displayed through the static display control, and the dynamically displayed target statements are displayed through the dynamic display control. Since the display parameters of the dynamic display control are provided by the static display control, the solution of dynamically displaying the target statement through the dynamic display control in the embodiment of the present application has less changes to the system framework and is easier to implement.
[0059] The text data display method provided in the embodiment of the present application can dynamically display the target sentence corresponding to the currently playing content and statically display the associated sentences of the target sentence. This allows users to quickly find the target sentence corresponding to the currently playing content when viewing the text data, thereby improving the display effect of the text data. In addition, in the embodiment of the present application, the dynamic display control is controlled by a static display control, so this solution is easier to implement.
[0060] Figure 3 This is a flowchart of a text data display method provided by an embodiment of the present application. Figure 3 In this embodiment of the present application, the execution subject is a terminal as an example for illustrative description. The method includes:
[0061] 301. A terminal obtains text data corresponding to audio data, where the text data includes at least one sentence.
[0062] In the embodiment of the present application, the audio data may be audio data corresponding to the video data, for example, the audio of a movie, or may be separate audio data, for example, the audio of a song, etc. The embodiment of the present application does not limit the audio data.
[0063] During the playback of audio data, in order to help users better understand the content of the audio data, textual commentary is usually provided for the audio data. The content included in the textual commentary is the textual commentary. For example, if the audio data is a song, the textual commentary may be the lyrics of the song. For another example, if the audio data is the dubbing of a TV series, the textual commentary may be the subtitles of the TV series.
[0064] Among them, the text data includes at least one sentence, each sentence includes at least one character, and the character can be any form of character such as Chinese characters, numeric characters, English characters, punctuation characters, etc. The embodiment of the present application does not limit the character form.
[0065] Optionally, the terminal has a target application installed, and the terminal executes step 301 through the target application.
[0066] Optionally, the text data may be data stored in a server that provides services for the target application, and the terminal may obtain the text data from the server through the target application; or the text data may be data stored locally in the terminal, and the terminal may directly read the text data locally. This embodiment of the present application is not limited to this.
[0067] In one possible implementation, while playing audio data, text data corresponding to the audio data is obtained. Optionally, the terminal obtaining the text data corresponding to the audio data includes: the terminal obtaining the audio data and the text data corresponding to the audio data in response to a playback operation on the audio data. The terminal can then play the audio data and text data simultaneously. For example, if the audio data is song audio and the text data is lyrics, the terminal can simultaneously play the video and subtitles in the interface.
[0068] In another possible implementation, when displaying a text display interface corresponding to audio data, text data corresponding to the audio data is obtained. For example, the terminal obtaining the text data corresponding to the audio data includes: the terminal, in response to an operation of opening the text display interface for the audio data, obtaining the text data corresponding to the audio data, and displaying the text data in the text display interface. For example, when playing a song, the terminal, in response to an operation of opening a lyrics display interface, obtains the lyrics corresponding to the song, and displays the lyrics in the lyrics display interface.
[0069] It should be noted that the embodiments of the present application are merely illustrative of the timing of obtaining text data using the above two situations as examples, and do not limit this.
[0070] 302. During the playback of the audio data, the terminal calls the static display control to determine a first display parameter and a second display parameter.
[0071] Among them, a control refers to the encapsulation of data and methods. A control can have its own properties and methods, and the control will also be displayed in the user interface to facilitate user interaction with the control. Therefore, a control includes both the encapsulated method and the visual control displayed in the interface. The static display control in the embodiment of the present application is a control for displaying static content, and the embodiment of the present application does not limit static display controls.
[0072] The first display parameter includes at least a target sentence in the text data that matches the current playing content of the audio data, and the second display parameter includes at least an associated sentence, which includes at least one of a sentence before the target sentence or a sentence after the target sentence.
[0073] The following is an exemplary description of the process of determining the first display parameter of the static display control:
[0074] In one possible implementation, calling a static display control and determining a first display parameter includes: calling the static display control, determining a target sentence based on the playback progress of the audio data, and determining the first display parameter based on the target sentence. That is, the first display parameter includes at least the target sentence, so that the dynamic display control can display the target sentence based on the first display parameter. The display position of the dynamic display control or the display position of the target sentence can be a default position. For example, the display position can be in the middle of the interface to increase the user's attention to the target sentence.
[0075] Among them, the playback progress can be the percentage of the played data in the audio data, or it can be the playback time point corresponding to the audio frame being played, etc. The embodiment of the present application does not limit the playback progress.
[0076] In one possible implementation, determining the first display parameter based on the target sentence includes: invoking a static display control to determine the display position of the target sentence, and determining the first display parameter based on the target sentence and the target display position. That is, the first display parameter includes at least the target sentence and the display position of the target sentence. In this way, the static display control can control the display position of the target sentence. Because the static display control displays the target sentence's associated sentences, controlling the target sentence's display position by the static display control ensures the accuracy of the order of the target sentence and its associated sentences, and also avoids issues such as occlusion between the target sentence and its associated sentences.
[0077] Optionally, to make it easier for the user to focus on the target sentence, the target sentence can be displayed at a central position, which can be the center of the screen or the center of the display area of a static display control. Therefore, calling the static display control to determine the display position of the target sentence includes: calling the static display control to determine the center position as the display position of the target sentence.
[0078] It should be noted that the dynamic display control can display the target statement in at least the following two situations:
[0079] The first case: the dynamic display control includes a dynamic display style, and the dynamic display control will display the content to be displayed according to the dynamic display style.
[0080] The second case: the dynamic display control dynamically displays the content to be displayed according to the received dynamic display style.
[0081] The second case is exemplified below:
[0082] In one possible implementation, determining the first display parameter based on the target statement includes: calling a static display control, obtaining a dynamic display style, and determining the first display parameter based on the target statement and the dynamic display style, that is, the first display parameter includes at least the target statement and the dynamic display style.
[0083] Among them, the dynamic display style obtained by the static display control can be the dynamic display style set by default by the target application, or the dynamic display style set by the user, or other dynamic display styles. The embodiment of the present application does not limit the dynamic display style.
[0084] In one possible implementation, the text data display method further includes: displaying at least one dynamic effect option in a dynamic setting interface; and in response to selecting any dynamic effect option, obtaining a dynamic display style corresponding to the dynamic effect option as a target dynamic display style. Thereafter, when calling a static display control to determine a first display parameter, the static display control is called to obtain the target dynamic display style, determine a target sentence, and determine the first display parameter based on the target dynamic display style and the target sentence. That is, the first display parameter includes at least the target sentence and the target dynamic display style.
[0085] In one possible implementation, the first display parameter also includes a target character, and calling a static display control to determine the first display parameter includes: calling the static display control, determining the target sentence and the target character in the target sentence that matches the currently playing content based on the playback progress of the audio data, and determining the first display parameter based on the target sentence and the target character, that is, the first display parameter includes at least the target sentence and the target character.
[0086] Optionally, the dynamic display control also displays some graphical elements when displaying the target sentence to increase the user's attention to the target sentence. Optionally, the dynamic display control includes a graphical element, and the dynamic display control displays the graphical element when displaying the target sentence. Optionally, the graphical element is received by the dynamic display control, and the dynamic display control displays according to the received graphical element.
[0087] In one possible implementation, calling a static display control to determine a first display parameter includes: calling the static display control to determine a target sentence based on the playback progress of the audio data; calling the static display control to obtain a graphic element, and determining the first display parameter based on the target sentence and the obtained graphic element.
[0088] Among them, the graphic element can be a graphic element set by default in the target application, or a graphic element set by the user. The process of setting the graphic element is the same as the process of setting the dynamic display style, and the embodiments of this application will not be repeated here.
[0089] It should be noted that the embodiment of the present application is only an illustrative description of the first display parameter and does not limit the first display parameter. Optionally, the first display parameter may also include a display style of a dynamic display control, which indicates the size or shape of the dynamic display control.
[0090] The following is an exemplary description of the process of determining the second display parameter of the static display control:
[0091] In one possible implementation, calling the static display control to determine the second display parameter includes: calling the static display control to determine a target sentence based on the playback progress of the audio data, and obtaining related sentences of the target sentence from the text data; calling the static display control to determine the display position of each related sentence; and determining the second display parameter based on each related sentence and the display position of each related sentence. In other words, the second display parameter includes each related sentence and the display position of each related sentence.
[0092] Optionally, the static display control will also determine the display position of the target sentence, and determine the second display parameter based on each associated sentence and the display position of each associated sentence, including: determining the second display parameter based on the target sentence, each associated sentence, the display position of the target sentence, and the display position of each associated sentence, that is, the second display parameter includes the target sentence, each associated sentence, the display position of the target sentence, and the display position of each associated sentence.
[0093] That is to say, in the embodiment of the present application, the static display control can display the target statement or not. It should be noted that even if the static display control displays the target statement, the target statement displayed by the static display control will be blocked by the target statement displayed by the dynamic display control. Therefore, the static display control can display or not display the target statement.
[0094] It should be noted that the display area of the static display control is limited, and therefore, the static display control can display a first number of associated statements at most, wherein the first number can be any integer greater than 1, such as 10, 12, etc.
[0095] It should be noted that the embodiment of the present application only states the process of determining the first display parameter and the second display parameter separately in order to make the contents of the first display parameter and the second display parameter clear, but it does not mean that the process of the static display control determining the first display parameter and the second display parameter is also separate. Optionally, calling the static display control to determine the first display parameter and the second display parameter includes: calling the static display control, determining the target sentence corresponding to the current playback content of the audio data according to the playback progress of the audio data, obtaining related sentences from the text data according to the target sentence, determining the first display parameter based on the target sentence, and determining the second display parameter based on the related sentence.
[0096] 303. The terminal calls the static display control and sends a first display parameter to the dynamic display control.
[0097] The first display parameter is sent to the dynamic display control through the static display control, so that the dynamic display control can display the target sentence according to the first display parameter.
[0098] 304. The terminal calls the dynamic display control and displays the target sentence according to the first display parameter.
[0099] After the dynamic display control obtains the target sentence from the first display parameter, it can display the target sentence. Optionally, the dynamic display control can dynamically display the target sentence at a specified position, which is the default display position of the dynamic display control.
[0100] The following is an exemplary description of calling the dynamic display control and displaying the target statement according to the first display parameter based on the content recorded in step 302:
[0101] In one possible implementation, displaying the target sentence according to the first display parameter includes at least one of the following:
[0102] (1) The first display parameter includes a target display position of the target sentence, and the target sentence is dynamically displayed at the target display position.
[0103] In an embodiment of the present application, a static display control can indicate the display position of a target statement of a dynamic display control, so that the dynamic display control displays the target statement at the target display position. For example, the dynamic display control renders a visual dynamic display control at the target display position, and the visual dynamic display control displays the target statement.
[0104] Optionally, when determining the display position of a statement in a static display control, the target statement will be determined at a specified position, which can be the middle position of the display area of the static display control, the top of the display area of the static display control, the middle position of the interface, or the top of the interface, etc.
[0105] Optionally, since the dynamic display control is used to display the target statement, and the target statement is a line of statement, the size of the dynamic display control can be the size corresponding to a line of statement. Optionally, the dynamic display control is a control of the same size as the static display control. The embodiment of the present application does not limit the size of the dynamic display control.
[0106] (2) The first display parameter includes a dynamic display style of the target sentence, and the dynamic display style is the dynamic display style of the target sentence, and the target sentence is displayed according to the dynamic display style.
[0107] The subsequent content of the embodiments of this application explains the dynamic display style. Please refer to the subsequent content. The embodiments of this application will not be described in detail here.
[0108] In a possible implementation, the dynamic display control includes OpenGL (a cross-language, cross-platform application programming interface for rendering vector graphics), and the dynamic display control can render the target statement of the dynamic display through the OpenGL.
[0109] (3) The first display parameter includes a target character, which is a character in the target sentence that matches the currently played content. The target character is displayed dynamically, and other characters in the target sentence except the target character are displayed statically.
[0110] That is, the dynamic display control only dynamically displays the character that the audio is playing, and displays other characters in the target sentence in a static manner.
[0111] (4) The first display parameter also includes a graphic element, which displays the target sentence and the graphic element.
[0112] When displaying the target sentence, the dynamic display control can also display some graphic elements to make the display of the text data more vivid. The graphic elements can be any graphic elements, for example, the graphic elements can be any graphic elements such as circle elements, star elements, heart elements, cloud elements, etc.
[0113] It should be noted that in the text data display method provided in the embodiment of the present application, the dynamic display control can display the target sentence in any dynamic display style. The following is an exemplary description of the dynamic display style of the target sentence:
[0114] In one possible implementation, the terminal displays the target sentence according to the first display parameter, including at least one of the following:
[0115] (1) The terminal displays a dynamic effect of a target character in the target sentence changing its size and then restoring its original size according to the first display parameter, and statically displays other characters in the target sentence except the target character.
[0116] Among them, the dynamic effect of displaying the target character in the target sentence changing size and then restoring the initial size can be: displaying the target character in the target sentence gradually enlarging and then gradually shrinking the dynamic effect; or displaying the target character in the target sentence gradually shrinking and then gradually enlarging the dynamic effect.
[0117] Optionally, the first display parameter includes a dynamic display style, and the dynamic display style includes a reference font size of the character, and the reference font size is used to indicate the maximum font size of the target character. The dynamic effect of displaying that the target character in the target sentence changes size and then returns to the initial size refers to: the target character is displayed gradually enlarged from the initial font size to the reference font size, and then gradually reduced to the initial font size. Alternatively, the reference font size is used to indicate the minimum font size of the target character. The dynamic effect of displaying that the target character in the target sentence gradually reduces and then gradually enlarges refers to: the target character is displayed gradually reduced from the initial font size to the reference font size, and then gradually enlarged to the initial font size.
[0118] Alternatively, the dynamic display style includes a reference height of the character, and the reference height is used to indicate the maximum height of the target character. The dynamic effect of gradually enlarging and then gradually shrinking the target character means: the target character is gradually enlarged from the initial height to the reference height, and then gradually shrinks back to the initial height. Alternatively, the reference height is used to indicate the minimum height of the target character. The dynamic effect of gradually shrinking and then gradually enlarging the target character means: the target character is gradually reduced from the initial height to the reference height, and then gradually enlarged to the initial height.
[0119] It should be noted that, when the height of a character changes, the width of the character may also change accordingly, or may remain unchanged, and this embodiment of the present application does not limit this.
[0120] (2) The terminal displays a dynamic effect of the target character returning to the initial position after leaving the initial position according to the first display parameter, and statically displays other characters in the target sentence.
[0121] Optionally, the first display parameter includes a dynamic display style, and the dynamic display style includes a first movement trajectory of the character. The terminal displays the dynamic effect of the target character returning to the initial position after leaving the initial position according to the first display parameter, and statically displays other characters in the target sentence, including: displaying the dynamic effect of the target character moving according to the first movement trajectory in the dynamic display style, and statically displaying other characters in the target sentence.
[0122] The first movement trajectory is a trajectory that returns to the initial position after leaving the initial position. For example, the first movement trajectory is a trajectory that moves upward a reference distance perpendicular to the target sentence and then moves downward by the reference distance. If the target characters in the target sentence move according to the first movement trajectory, the effect of each character being played will be achieved. It should be noted that the first movement trajectory can be any trajectory that returns to the initial position after leaving the initial position, and the embodiment of the present application does not limit the first movement trajectory.
[0123] (3) The terminal displays the target character in a dynamic rotation according to the first display parameter, and displays other characters in a static manner.
[0124] The target character is rotated around its own axis of symmetry.
[0125] It should be noted that, when displaying the target sentence, the embodiment of the present application can be achieved by dynamically displaying the characters in the target sentence, or by adding dynamic graphic elements to the target sentence.
[0126] In one possible implementation, the terminal dynamically displays the target sentence according to the first display parameter, including: according to the first display parameter, while displaying the target sentence, displaying a graphic element at a position corresponding to a target character in the target sentence, and the graphic element moves as the target character changes, and the target character is a character in the target sentence that matches the currently playing content.
[0127] There are many ways to implement the movement of the graphic element as the target character changes. It should be noted that the embodiments of this application are only illustrative of the following three implementations:
[0128] (1) According to the first display parameter, while displaying the target sentence, a dynamic effect of a graphic element jumping at a position corresponding to the target character is displayed.
[0129] Among them, the position corresponding to the target character can be the position where the target character is located, or above the target character, below the target character or other positions around the target character. The embodiment of the present application does not limit the position corresponding to the target character.
[0130] It should be noted that in the text data display method provided in the embodiments of the present application, the dynamic display control displaying the target sentence can be a dynamic display control that only dynamically displays the characters in the target sentence, a dynamic display control that statically displays the target sentence and dynamically displays graphic elements, or a dynamic display control that dynamically displays the characters in the target sentence and dynamically displays graphic elements. The embodiments of the present application do not limit the manner in which the dynamic display control displays the target sentence.
[0131] Optionally, according to the first display parameter, the target sentence is displayed, including: according to the first display parameter, the height of the target character is gradually reduced from the initial height to the reference height and then gradually enlarged from the reference height to the initial height, and the graphic element is displayed at the top of the target character, falling as the height of the target character decreases, rising as the height of the target character increases, and jumping from the top of the current target character to the next target character as the target character changes, and statically displaying other characters in the target sentence, so as to achieve the effect that the graphic element flattens the character and then bounces off the character, thereby improving the display effect of the text data. Figure 4 As shown, the graphic elements are clouds.
[0132] (2) According to the first display parameter, while displaying the target sentence, a dynamic effect of the graphic element rotating at the position corresponding to the target character is displayed.
[0133] Among them, the position corresponding to the target character can be the position where the target character is located, or above the target character, below the target character or other positions around the target character. The embodiment of the present application does not limit the position corresponding to the target character.
[0134] It should be noted that if the target character changes, the graphic element may move from the previous target character to the next target character; or, the graphic element may disappear from the position corresponding to the previous target character and be displayed at the position corresponding to the next target character.
[0135] (3) According to the first display parameter, while displaying the target sentence, the graphic element and the shadow graphic of the graphic element are displayed to create a dynamic effect of moving as the target character changes.
[0136] Among them, since the graphic element will move with the change of the target character, the embodiment of the present application also provides a method for displaying the afterimage of the graphic element. Normally, the characters in the target sentence are played by audio in sequence from left to right, so that the graphic element will move from left to right. Therefore, the embodiment of the present application can add a afterimage graphic to the left side of the graphic element, and the afterimage graphic moves with the graphic element.
[0137] It should be noted that the embodiments of the present application are merely illustrative of the solution obtained by combining the "solution for adding dynamic graphic elements to the target sentence" with the "solution for dynamically displaying the target characters in the target sentence". Any one or more "solutions for adding dynamic graphic elements to the target sentence" provided in the embodiments of the present application can be combined with any one or more "solutions for dynamically displaying the target characters in the target sentence" provided in the embodiments of the present application. The embodiments of the present application will not be described one by one here.
[0138] It should be noted that in the embodiments of the present application, both the associated statements are displayed via a static display control and the target statement is displayed via a dynamic display control. Optionally, the associated statements and the target statement can be displayed in layers. In one possible implementation, the terminal dynamically displays the target statement based on a first display parameter, including: calling the dynamic display control to display the target statement based on the first display parameter on a layer corresponding to the dynamic display control; wherein the layer corresponding to the dynamic display control is located above the layer corresponding to the static display control.
[0139] Since the target statement may be a statement located between two associated statements, the static display control and the dynamic control will overlap. Therefore, the static display control and the dynamic display control can be set in different layers so that the dynamic display control is located above the static display control.
[0140] Optionally, the terminal uses a FrameLayout control (a type of layout control) to overlay the visual static display control and the visual dynamic display control.
[0141] In one possible implementation, a terminal calls a dynamic display control to display a target statement based on a first display parameter, including: calling a method in the dynamic display control to render a visual dynamic display control based on the first display parameter, wherein the visual dynamic display control displays the target statement, wherein the visual dynamic display control is a transparent control or an opaque control. Optionally, if the visual dynamic display control is a transparent control, the associated statements displayed by the static display control do not include the target statement; if the visual dynamic display control is an opaque control, the associated statements displayed by the static display control may or may not include the target statement.
[0142] The method in the dynamic display control is the method encapsulated by the dynamic display control, and the visual dynamic display control is the control displayed on the user interface.
[0143] 305. The terminal calls the static display control and displays the associated statement according to the second display parameter.
[0144] The second display parameter at least includes a related sentence, and the related sentence includes at least one of a sentence before the target sentence or a sentence after the target sentence. The static display control displays the related sentence according to the second display parameter.
[0145] In a possible implementation, each statement is displayed in a different row, and the static display control also determines the display position of each statement, that is, the second display parameter includes each associated statement and the display position of each associated statement, and the corresponding associated statement is displayed at the display position of each associated statement. Figure 5As shown, the static display control 501 displays multiple lines of associated statements.
[0146] Optionally, the static display control is a control for displaying multiple lines of sentences, and can scroll and display corresponding sentences as the audio data is played.
[0147] Optionally, the static display control and the dynamic display control are displayed in superposition, such as Figure 6 As shown, the static display control 602 and the dynamic display control 603 are superimposed together using the FrameLayout control 601.
[0148] 306. In response to detecting a touch event on the visual dynamic display control, the terminal calls the dynamic display control and transmits the touch event to the static display control.
[0149] The touch event can be any event achieved by touching the visual dynamic display control, such as a slide event or a click event. A touch event on the visual dynamic display control means that the contact point between the user and the terminal is within the display area of the visual dynamic display control.
[0150] In the embodiment of the present application, the dynamic display control does not respond to the touch event, but instead transmits the touch event to the static display control, which responds.
[0151] 307. The terminal calls a static display control to respond to the touch event.
[0152] The touch event may change the display content of the terminal interface. For example, the touch event is a sliding event. Performing a sliding operation in the target text display interface may change the sentence displayed in the target text display interface.
[0153] In one possible implementation, the touch event is a sliding event, and the terminal calls a static display control to respond to the touch event, including: calling the static display control, re-determining first display parameters based on the sliding event, and sending the re-determined first display parameters to the dynamic display control. After receiving the re-determined first display parameters, the dynamic display control further displays according to the re-determined first display parameters. The terminal re-determines the display parameters of the dynamic display control through the static display control, so that the display of the dynamic display control changes in response to the user's touch operation.
[0154] In addition, the static display control will not only redetermine the first display parameter based on the sliding event, but also redetermine the second display parameter. Since the determination process of the second display parameter is the same as the determination process of the first display parameter, the embodiment of the present application is only illustrative of the redetermining of the second display parameter as an example.
[0155] In one possible implementation, the terminal calls a static display control and redetermines a first display parameter based on a sliding event, including: calling a static display control and redetermining a display position of a target sentence based on a sliding direction and a sliding distance of the sliding event, wherein the first display parameter includes the target sentence and the display position of the target sentence.
[0156] It should be noted that the embodiments of the present application only use sliding events as an example to illustrate how static display controls and dynamic display controls update display content according to touch events when a touch event of a dynamic display control is detected. The touch event can also be other events such as click events, and the embodiments of the present application will not go into details here.
[0157] The text data display method provided in the embodiments of the present application can dynamically display the target sentence corresponding to the currently playing content and statically display the associated sentences of the target sentence. This allows users to quickly find the target sentence corresponding to the currently playing content when viewing the text data, thereby improving the display quality of the text data. In addition, in the embodiments of the present application, the dynamic display control is controlled by the static display control, making this solution easier to implement.
[0158] In addition, the text data display method provided in the embodiment of the present application can dynamically display the target characters corresponding to the currently playing content, so that the user can more intuitively understand the characters being played by the audio.
[0159] In addition, the text data display method provided in the embodiment of the present application can also display dynamic graphic elements in combination with dynamic target characters, thereby improving the display effect of the text data.
[0160] In addition, the text data display method provided in the embodiment of the present application processes various events through static display controls, without the need for major improvements to the system framework, and can ensure smooth display of related sentences and target sentences, thereby improving the accuracy of text data display.
[0161] Figure 7 This is a structural diagram of a text data display device provided by this application. Figure 7 , the device comprises:
[0162] An acquisition module 701 is configured to acquire text data corresponding to the audio data, where the text data includes at least one sentence.
[0163] Determination module 702, configured to call a static display control to determine, during playback of the audio data, first and second display parameters, wherein the first display parameter includes at least a target sentence in the text data that matches the currently played content of the audio data, and the second display parameter includes at least a related sentence, wherein the related sentence includes at least one of a sentence preceding the target sentence or a sentence following the target sentence;
[0164] The sending module 703 is used to call the static display control and send the first display parameter to the dynamic display control;
[0165] The first display module 704 is used to call the dynamic display control and display the target sentence according to the first display parameter;
[0166] The second display module 705 is used to call the static display control and display the associated statement according to the second display parameter.
[0167] like Figure 8 As shown, in one possible implementation, the first display module 704 is configured to perform at least one of the following:
[0168] The first display parameter also includes a target display position of the target sentence, and the target sentence is displayed at the target display position;
[0169] The first display parameter also includes a dynamic display style of the target sentence, and the target sentence is displayed according to the dynamic display style;
[0170] The first display parameter also includes a target character, which is a character in the target sentence that matches the currently played content. The target character is displayed dynamically, and other characters in the target sentence except the target character are displayed statically.
[0171] The first display parameter also includes a graphic element, which displays the target sentence and the graphic element.
[0172] In one possible implementation, the first display module 704 is configured to perform at least one of the following:
[0173] According to the first display parameter, a target character in the target sentence is displayed with a dynamic effect of changing its size and then restoring its original size, and other characters in the target sentence except the target character are displayed statically;
[0174] According to the first display parameter, a dynamic effect of the target character returning to the initial position after leaving the initial position is displayed, and other characters are displayed statically;
[0175] According to the first display parameter, the target character is displayed with a dynamic effect of rotation, and other characters are displayed statically;
[0176] The target characters are characters in the target sentence that match the currently playing content.
[0177] In one possible implementation, the first display module 704 is used to display a graphic element at a position corresponding to a target character in the target sentence while displaying the target sentence according to a first display parameter, and the graphic element moves as the target character changes. The target character is a character in the target sentence that matches the currently playing content.
[0178] In one possible implementation, the first display module 704 is configured to perform at least one of the following:
[0179] According to the first display parameter, while displaying the target sentence, a dynamic effect of displaying a graphic element jumping at a position corresponding to the target character;
[0180] According to the first display parameter, while displaying the target sentence, a dynamic effect of displaying a graphic element rotating at a position corresponding to the target character is displayed;
[0181] According to the first display parameter, while displaying the target sentence, the graphic element and the shadow graphic of the graphic element are displayed to create a dynamic effect of moving as the target character changes.
[0182] In one possible implementation, the determination module 702 is used to call a static display control, determine a target sentence based on the playback progress of the audio data, obtain associated sentences of the target sentence from the text data, and the associated sentences include sentences located before the target sentence and sentences located after the target sentence; call the static display control to determine the display position of the target sentence and each associated sentence; determine a second display parameter based on the target sentence, each associated sentence, and the display position of the target sentence and each associated sentence.
[0183] In one possible implementation, the first display module 704 is configured to call a dynamic display control and display the target sentence on a layer corresponding to the dynamic display control according to a first display parameter;
[0184] The layer corresponding to the dynamic display control is located above the layer corresponding to the static display control.
[0185] In a possible implementation, the first display module 704 is configured to call a method in a dynamic display control and render a visual dynamic display control according to a first display parameter, wherein the visual dynamic display control displays a target statement.
[0186] In one possible implementation, the apparatus further includes:
[0187] The transfer module 706 is configured to, in response to detecting a touch event on the visual dynamic display control, call the dynamic display control to transfer the touch event to the static display control, and the static display control responds to the touch event.
[0188] In one possible implementation, the determining module 702 is further configured to call the static display control and re-determine the first display parameter according to the sliding event;
[0189] The sending module 703 is further configured to send the re-determined first display parameter to the dynamic display control.
[0190] In one possible implementation, the determination module 702 is configured to call a static display control and redetermine a display position of a target sentence according to a sliding direction and a sliding distance of a sliding event, wherein the first display parameter includes the target sentence and the display position of the target sentence.
[0191] In one possible implementation, the apparatus further includes:
[0192] The third display module 707 is used to display at least one dynamic effect option in the dynamic effect setting interface;
[0193] An acquisition module 701 is configured to, in response to a selection operation on any dynamic effect option, acquire a dynamic display style corresponding to any dynamic effect option as a target dynamic display style;
[0194] The determination module 702 is configured to call a static display control, obtain a target dynamic display style, determine a target sentence, and determine a first display parameter based on the target dynamic display style and the target sentence.
[0195] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the operations performed in the audio generation method of the above embodiment.
[0196] Optionally, the computer device is provided as a terminal. Figure 9 The figure is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. Terminal 900 may be a portable mobile terminal, such as a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. Terminal 900 may also be referred to as user equipment, a portable terminal, a laptop terminal, a desktop terminal, or other similar names.
[0197] The terminal 900 includes a processor 901 and a memory 902 .
[0198] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0199] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one program code, which is used to be executed by the processor 901 to implement the text data display method provided in the method embodiment of the present application.
[0200] In some embodiments, terminal 900 may optionally include a peripheral device interface 903 and at least one peripheral device. The processor 901, memory 902, and peripheral device interface 903 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 903 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, a positioning assembly 908, and a power supply 909.
[0201] The peripheral device interface 903 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0202] The RF circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 904 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 904 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The RF circuit 904 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 20G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 904 may also include circuitry related to Near Field Communication (NFC), although this application does not limit this.
[0203] The display screen 905 is used to display a user interface (UI). This UI may include graphics, text, icons, videos, or any combination thereof. When the display screen 905 is a touch screen display, it is also capable of collecting touch signals on or above the surface of the display screen 905. These touch signals can be input as control signals to the processor 901 for processing. In this case, the display screen 905 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there can be one display screen 905, disposed on the front panel of the terminal 900; in other embodiments, there can be at least two display screens 905, disposed on different surfaces of the terminal 900 or in a foldable design; in still other embodiments, the display screen 905 can be a flexible display, disposed on a curved or foldable surface of the terminal 900. Furthermore, the display screen 905 can be configured as a non-rectangular irregular shape, i.e., a special-shaped screen. The display screen 905 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0204] The camera assembly 906 is used to capture images or videos. Optionally, the camera assembly 906 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 906 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0205] The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals to be input into the processor 901 for processing, or input into the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the terminal 900. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 907 may also include a headphone jack.
[0206] Positioning component 908 is used to locate the current geographic location of terminal 900 to implement navigation or LBS (Location Based Service). Positioning component 908 can be based on the US GPS (Global Positioning System), China's Beidou system, Russia's Greninja positioning system, and the European Union's Galileo positioning system.
[0207] Power supply 909 is used to power various components in terminal 900. Power supply 909 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 909 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0208] In some embodiments, the terminal 900 further includes one or more sensors 910 , including but not limited to: an acceleration sensor 911 , a gyroscope sensor 912 , a pressure sensor 913 , a fingerprint sensor 914 , an optical sensor 915 , and a proximity sensor 916 .
[0209] The accelerometer 911 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the terminal 90. For example, the accelerometer 911 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 911. The accelerometer 911 can also be used to collect game or user motion data.
[0210] The gyroscope sensor 912 can detect the orientation and rotation angle of the terminal 900. It can work with the accelerometer 911 to collect the user's 3D movements on the terminal 900. Based on the data collected by the gyroscope sensor 912, the processor 901 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0211] The pressure sensor 913 can be set on the side frame of the terminal 900 and / or the lower layer of the display screen 902. When the pressure sensor 913 is set on the side frame of the terminal 900, it can detect the user's grip signal of the terminal 900, and the processor 901 performs left and right hand recognition or shortcut operations based on the grip signal collected by the pressure sensor 913. When the pressure sensor 913 is set on the lower layer of the display screen 902, the processor 901 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 905. The operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0212] The fingerprint sensor 914 is used to collect the user's fingerprint. The processor 901 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 914, or the fingerprint sensor 914 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 901 authorizes the user to perform relevant sensitive operations, such as unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 914 can be set on the front, back, or side of the terminal 900. When a physical button or manufacturer logo is provided on the terminal 900, the fingerprint sensor 914 can be integrated with the physical button or manufacturer logo.
[0213] The optical sensor 915 is used to detect ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the display screen 905 based on the ambient light intensity detected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is decreased. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 based on the ambient light intensity detected by the optical sensor 915.
[0214] Proximity sensor 916, also known as a distance sensor, is provided on the front panel of terminal 900. Proximity sensor 916 is used to detect the distance between the user and the front of terminal 900. In one embodiment, when proximity sensor 916 detects that the distance between the user and the front of terminal 900 is gradually decreasing, processor 901 controls display screen 905 to switch from the screen-on state to the screen-off state. When proximity sensor 916 detects that the distance between the user and the front of terminal 900 is gradually increasing, processor 901 controls display screen 905 to switch from the screen-off state to the screen-on state.
[0215] Those skilled in the art will understand that Figure 9 The structure shown in the figure does not constitute a limitation on the terminal 900, and the terminal 900 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0216] Optionally, the computer device is provided as a server. Figure 10 This is a schematic diagram of the structure of a server according to an exemplary embodiment. The server 1000 may vary significantly due to different configurations or performances, and may include one or more processors (Central Processing Units, CPUs) 1001 and one or more memories 1002. The memories 1002 store at least one program code, which is loaded and executed by the processor 1001 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.
[0217] An embodiment of the present application further provides a computer-readable storage medium, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the operations performed in the text data display method of the above embodiment.
[0218] An embodiment of the present application further provides a computer program, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the operations performed in the text data display method of the above embodiment.
[0219] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0220] The above are only optional embodiments of the embodiments of the present application and are not intended to limit the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of this application.
Claims
1. A text data display method, characterized in that: The method comprises: Acquire text data corresponding to the audio data, wherein the text data includes at least one sentence; During playback of the audio data, a static display control is called to obtain a target dynamic display style, and a target sentence in the text data that matches the currently played content of the audio data is determined; a first display parameter is determined based on the target dynamic display style and the target sentence; and the static display control is called to determine a second display parameter; the first display parameter includes at least the target sentence, the second display parameter includes at least an associated sentence, the associated sentence includes at least one of a sentence before the target sentence or a sentence after the target sentence, and the target dynamic display style is a dynamic display style corresponding to the dynamic effect option selected in the dynamic effect setting interface; Calling the static display control and sending the first display parameter to the dynamic display control; calling the dynamic display control to display the target sentence according to the first display parameter and simultaneously displaying a dynamic effect of a graphic element, wherein the dynamic effect of the graphic element includes at least one of the following: the graphic element jumping at a position corresponding to a target character, the graphic element rotating at a position corresponding to the target character, and the graphic element and a trailing shadow of the graphic element moving as the target character changes, wherein the target character is a character in the target sentence that matches the currently playing content; and calling the static display control to display the associated sentence according to the second display parameter; In response to detecting a sliding event on the visualized dynamic display control, if the dynamic display control does not respond to the sliding event, calling the dynamic display control to transmit the sliding event to the static display control; the sliding event means that the contact point between the user and the terminal is within the display area of the dynamic display control; calling the static display control, re-determining the display position of the target sentence according to the sliding direction and sliding distance of the sliding event, and sending the re-determined first display parameters to the dynamic display control, so that the dynamic display control displays according to the re-determined first display parameters, wherein the first display parameters also include the display position of the target sentence; Displaying the target sentence according to the first display parameter includes at least one of the following: displaying a dynamic effect of the target character changing size and then restoring to an initial size according to the first display parameter, and statically displaying other characters in the target sentence except the target character; displaying a dynamic effect of the target character returning to the initial position after leaving the initial position according to the first display parameter, and statically displaying the other characters; According to the first display parameter, the target character is displayed with a dynamic effect of rotation, and the other characters are displayed statically.
2. The method according to claim 1, characterized in that The displaying of the target sentence according to the first display parameter further includes at least one of the following: The first display parameter further includes a dynamic display style of the target sentence, and the target sentence is displayed according to the dynamic display style; The first display parameter also includes the target character; The first display parameter also includes the graphic element.
3. The method according to claim 1, characterized in that The calling of the static display control to determine the second display parameter includes: Calling the static display control, determining the target sentence according to the playback progress of the audio data, and obtaining the associated sentences of the target sentence from the text data; Calling the static display control to determine the display position of the target sentence and each associated sentence; The second display parameter is determined based on the target sentence, each of the associated sentences, and display positions of the target sentence and each of the associated sentences.
4. The method according to claim 1, wherein The calling of the dynamic display control to display the target statement according to the first display parameter includes: Calling the dynamic display control to display the target statement on a layer corresponding to the dynamic display control according to the first display parameter; The layer corresponding to the dynamic display control is located above the layer corresponding to the static display control.
5. The method according to claim 1, wherein The calling of the dynamic display control to display the target statement according to the first display parameter includes: A method in the dynamic display control is called to render the visual dynamic display control according to the first display parameter, wherein the visual dynamic display control displays the target sentence.
6. A text data display device, characterized in that: The device comprises: An acquisition module, configured to acquire text data corresponding to the audio data, wherein the text data includes at least one sentence; a determination module configured to, during playback of the audio data, call a static display control, obtain a target dynamic display style, and determine a target sentence in the text data that matches the currently played content of the audio data; determine a first display parameter based on the target dynamic display style and the target sentence; and, call the static display control to determine a second display parameter; the first display parameter includes at least the target sentence, the second display parameter includes at least an associated sentence, the associated sentence includes at least one of a sentence before the target sentence or a sentence after the target sentence, and the target dynamic display style is a dynamic display style corresponding to a dynamic effect option selected in a dynamic effect setting interface; A sending module, configured to call the static display control and send the first display parameter to the dynamic display control; a first display module, configured to call the dynamic display control, display the target sentence according to the first display parameter, and simultaneously display a dynamic effect of a graphic element, wherein the dynamic effect of the graphic element includes at least one of the following: the graphic element jumps at a position corresponding to a target character, the graphic element rotates at a position corresponding to the target character, and the graphic element and a trailing shadow of the graphic element move as the target character changes, wherein the target character is a character in the target sentence that matches the currently playing content; A second display module, configured to call the static display control and display the associated statement according to the second display parameter; a transmitting module, configured to, in response to detecting a sliding event on the visualized dynamic display control, call the dynamic display control and transmit the sliding event to the static display control if the dynamic display control does not respond to the sliding event; wherein the sliding event refers to: a contact point between the user and the terminal is within a display area of the dynamic display control; The determining module is further configured to call the static display control and re-determine the display position of the target sentence according to the sliding direction and sliding distance of the sliding event, wherein the first display parameter also includes the display position of the target sentence; The sending module is further configured to send the re-determined first display parameter to the dynamic display control, so that the dynamic display control is displayed according to the re-determined first display parameter; Displaying the target sentence according to the first display parameter includes at least one of the following: displaying a dynamic effect of the target character changing size and then restoring to an initial size according to the first display parameter, and statically displaying other characters in the target sentence except the target character; displaying a dynamic effect of the target character returning to the initial position after leaving the initial position according to the first display parameter, and statically displaying the other characters; According to the first display parameter, the target character is displayed with a dynamic effect of rotation, and the other characters are displayed statically.
7. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the operations performed in the text data display method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the operations performed in the text data display method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Lyric display method and device
CN102148048A