Subtitle display method, device, terminal and storage medium

By displaying floating controls and interfaces on the terminal and displaying audio and video subtitles, the problem of obtaining audio and video content under noise or hearing impairment is solved, and the convenience of audio and video understanding in noisy environments is achieved.

CN114745585BActive Publication Date: 2024-09-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202210355929.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-06
Publication Date
2024-09-03
Estimated Expiration
2042-04-06

AI Technical Summary

Technical Problem

When playing audio and video, it is difficult for people with excessive external noise or hearing impairment to obtain the correct sound of the audio and video, which affects users' ability to understand the content.

Method used

By displaying floating controls on the terminal and receiving operation instructions, the floating interface is displayed to display audio and video subtitles, and supports translation and setting options of subtitles to adapt to different language and visual needs.

Benefits of technology

In noisy environments or hearing impairments, subtitles are displayed through the floating interface to help users effectively obtain audio and video content and improve the convenience of understanding audio and video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114745585B
    Figure CN114745585B
Patent Text Reader

Abstract

The present application relates to a subtitle display method, device, terminal and storage medium. The method includes: displaying a floating control on the interface currently displayed by the terminal, receiving an operation instruction for the floating control, and then responding to the operation instruction for the floating control, displaying a first floating interface, and displaying the first subtitle of the audio and video played by the terminal in the first floating interface. It is achieved that during the process of playing audio and video, the first subtitle of the audio and video played by the terminal can be displayed in the form of a floating interface. Therefore, when the external noise is too loud, it helps the user to effectively obtain the correct sound of the audio and video, or helps the hearing-impaired to obtain the correct sound of the audio and video, so as to facilitate understanding of the content of the audio and video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of speech recognition technology and video processing technology, and in particular to a subtitle display method, device, terminal and storage medium. Background Art

[0002] With the development of communication technology, more and more users are playing live broadcasts, videos and audios on their terminals, which is becoming an indispensable part of people's lives.

[0003] When playing audio or video, there is a problem that when the external noise is too loud, the user cannot effectively obtain the correct sound of the audio or video, or the hearing-impaired person cannot obtain the correct sound of the audio or video. Summary of the invention

[0004] The embodiments of the present application provide a subtitle display method, device, terminal and storage medium that can display subtitles of audio and video played by a terminal in a floating interface, thereby helping users obtain the correct sound of the audio and video.

[0005] In a first aspect, the present application provides a subtitle display method. The method comprises:

[0006] Display the floating control on the interface currently displayed on the terminal;

[0007] Receiving an operation instruction for the floating control;

[0008] In response to an operation instruction for the floating control, a first floating interface is displayed, and a first subtitle of the audio or video played by the terminal is displayed in the first floating interface.

[0009] In a second aspect, the present application also provides a subtitle display device. The device comprises:

[0010] A first display module, used to display a floating control on the interface currently displayed by the terminal;

[0011] A first receiving module, used to receive an operation instruction for the floating control;

[0012] The second display module is used to display a first floating interface in response to an operation instruction for the floating control, and to display a first subtitle of the audio and video played by the terminal in the first floating interface.

[0013] In a third aspect, the present application further provides a terminal. The terminal includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0014] Display the floating control on the interface currently displayed on the terminal;

[0015] Receiving an operation instruction for the floating control;

[0016] In response to an operation instruction for the floating control, a first floating interface is displayed, and a first subtitle of the audio or video played by the terminal is displayed in the first floating interface.

[0017] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0018] Display the floating control on the interface currently displayed on the terminal;

[0019] Receiving an operation instruction for the floating control;

[0020] In response to an operation instruction for the floating control, a first floating interface is displayed, and a first subtitle of the audio or video played by the terminal is displayed in the first floating interface.

[0021] The above-mentioned subtitle display method, device, terminal and storage medium display a floating control on the interface currently displayed by the terminal, receive an operation instruction for the floating control, and then respond to the operation instruction for the floating control to display a first floating interface, and display the first subtitle of the audio and video played by the terminal in the first floating interface. It is achieved that during the process of playing audio and video, the first subtitle of the audio and video played by the terminal can be displayed in the form of a floating interface. Therefore, when the external noise is too loud, it helps the user to effectively obtain the correct sound of the audio and video, or helps the hearing-impaired to obtain the correct sound of the audio and video, so as to facilitate understanding of the content of the audio and video. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flowchart of a subtitle display method provided by an embodiment of the present application;

[0023] Figure 2 is a schematic diagram of displaying a first subtitle in a first floating interface provided by an embodiment of the present application;

[0024] Figure 3 It is a flowchart of a method for displaying subtitles of audio and video played by a terminal in a first floating interface after operating a setting control provided by an embodiment of the present application;

[0025] Figure 4 This is a schematic diagram of displaying subtitles of audio and video played by a terminal in a first floating interface provided by an embodiment of the present application;

[0026] Figure 5This is a schematic diagram of displaying a second subtitle of an audio or video in a first floating interface after size enlargement processing provided by an embodiment of the present application;

[0027] Figure 6 This is a schematic diagram of displaying prompt information in a first floating interface provided by an embodiment of the present application;

[0028] Figure 7 is a schematic diagram of hiding a control in a first floating interface provided by an embodiment of the present application;

[0029] Figure 8 is a structural schematic diagram of a subtitle display device provided in an embodiment of the present application;

[0030] Fig. 9 FIG. 4 is a diagram showing the internal structure of a terminal in an embodiment. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0032] In one embodiment, Figure 1 As shown, Figure 1 1 is a flow chart of a subtitle display method provided in an embodiment of the present application. The method can be applied to a terminal, including a smart terminal such as a smart phone and a tablet computer. The method includes the following steps:

[0033] S101: Display a floating control on an interface currently displayed on a terminal.

[0034] For example, if the interface currently displayed on the terminal is an interface for watching a video, a floating control may be displayed in the sidebar position of the interface.

[0035] It should be noted that the floating control switch can be turned on in the terminal's settings, and after the switch is turned on, the floating control is displayed on the terminal's desktop. When playing a video on the terminal, the floating control can be displayed in the sidebar position of the video interface.

[0036] S102: Receive an operation instruction for a floating control.

[0037] Among them, the operation instruction can be an operation instruction triggered by the user clicking the floating control, or it can be an operation instruction triggered by the user long pressing the floating control, or it can be an operation instruction triggered when the floating control is triggered by using a stylus. The form of generating the operation instruction in this embodiment is not limited.

[0038] S103: In response to an operation instruction for the floating control, display a first floating interface, and display a first subtitle of the audio or video played by the terminal in the first floating interface.

[0039] The first subtitle can be Chinese subtitle, English subtitle or other language subtitle. Here, the first subtitle is English subtitle. Figure 2 , Figure 2 is a schematic diagram of displaying a first subtitle in a first floating interface provided by an embodiment of the present application, wherein the first subtitle includes “names do in the workplace? He was afraid that hewould hit him first”. Figure 2 The height of the first floating interface is, for example, 128dp, and the width is, for example, 332dp, where dp represents a distance unit.

[0040] The method provided in this embodiment displays a floating control on the interface currently displayed by the terminal, receives an operation instruction for the floating control, and then displays a first floating interface in response to the operation instruction for the floating control, and displays the first subtitle of the audio and video played by the terminal in the first floating interface. It is realized that during the process of playing audio and video, the first subtitle of the audio and video played by the terminal can be displayed in the form of a floating interface. Therefore, when the external noise is too loud, it helps the user to effectively obtain the correct sound of the audio and video, or helps the hearing-impaired to obtain the correct sound of the audio and video, so as to facilitate understanding of the content of the audio and video.

[0041] In some embodiments, the first subtitles are subtitles corresponding to the target language obtained by translating the source language of the audio or video.

[0042] The source language of the audio and video may be the speech obtained by parsing the audio information of the audio and video, for example, the default language type of the source language may be Chinese, and the default language type of the target language may be English. The default language type of the source language and the default language type of the target language may also be other language types.

[0043] In some embodiments, the following steps may also be included:

[0044] In response to an operation instruction for the floating control, a translation service of the operating system of the terminal is called so that the translation service translates the source language of the audio and video to obtain a first subtitle.

[0045] The translation service is a service provided by the operating system, which can obtain audio information of the audio and video played by the terminal, parse the audio information to obtain the source language of the audio and video, and then translate the source language to obtain the first subtitle.

[0046] It should be noted that after the translation service parses the audio information of the audio and video to obtain the source language of the audio and video, the source language can be displayed in the interface of the audio and video currently displayed on the terminal. In this way, when playing the audio and video in the terminal, the user can see subtitles of two languages ​​of the audio and video at the same time.

[0047] In some embodiments, the first floating interface includes translation indication information, and the translation indication information is used to indicate the language type of the source language and the language type of the target language. Figure 2 As shown, the translation instruction information is, for example, Figure 2 "Chinese-English" displayed in.

[0048] In some embodiments, the first floating interface includes a setting control. Figure 3 , Figure 3 This is a flow chart of a method for displaying subtitles of audio and video played by a terminal in a first floating interface after operating a setting control provided by an embodiment of the present application. Based on the above embodiment, the method includes the following steps:

[0049] S301, receiving an operation instruction for setting a control.

[0050] Reference Figure 4 , Figure 4 Schematic diagram of a first floating interface showing subtitles of audio and video played by a terminal provided by an embodiment of the present application. Figure 4 The setting control 401 in the example is clicked or touched, and a corresponding operation instruction is generated when the click operation or the touch operation is performed. Accordingly, the terminal receives the operation instruction generated when the setting control 401 is clicked or touched.

[0051] S302: In response to an operation instruction for setting a control, display a second floating interface, where the second floating interface includes setting options.

[0052] The setting options include, for example, Figure 4 At least one of the language setting options in the source language, the language setting options in the target language, the font size setting options, the color setting options, and the font type setting options of the first subtitle. Figure 4 , Figure 4 The language setting options under the source language shown in the figure include Chinese option 402 and English option 403, and the language setting options under the target language include Chinese option 404 and English option 405. The user can change the language type of the source language, the language type of the target language, and the font size, color, and font type of the first subtitle through the setting options.

[0053] S303: Acquire a setting instruction based on the setting option, and display subtitles in the first floating interface according to the setting instruction.

[0054] In this embodiment, if the default language type of the source language is, for example, Chinese, and the default language type of the target language is, for example, English, after the user clicks or touches the English option 403 under the source language, the source language is changed from Chinese to English, and after the user clicks or touches the Chinese option 404 under the target language, the target language is changed from English to Chinese.

[0055] It should be noted that after the user clicks or touches the setting option, the terminal obtains the corresponding setting instruction and displays the subtitles of the audio and video played by the terminal in the first floating interface according to the setting instruction. For example, after the source language is changed to English and the target language is changed to Chinese, the Chinese subtitles of the audio and video played by the terminal are displayed in the first floating interface.

[0056] The method provided in this embodiment receives an operation instruction for a setting control, and in response to the operation instruction for the setting control, displays a second floating interface, the second floating interface includes setting options, and then obtains setting instructions based on the setting options, and displays subtitles in the first floating interface according to the setting instructions. Since the second floating interface displays setting options, the user can flexibly select the display form of the subtitles through the setting options, providing a method for realizing interaction between the user and the subtitles, which can better meet the needs of the user.

[0057] In some embodiments, the setting instruction includes at least one of the following:

[0058] Setting instructions for the language type of the target language after translation;

[0059] Setting instructions for the language type of the source language before translation;

[0060] Instructions for setting the font size of the first subtitle;

[0061] Instructions for setting the font color of the first subtitle;

[0062] Instructions for setting the font type of the first subtitle.

[0063] In this embodiment, for example, the user drags Figure 4 By sliding the slider under the font size in the text field, you can change the font size of the subtitles of the audio and video played by the terminal. Through the setting options provided above and the setting instructions corresponding to the setting options, you can change the font size, color and font type of the source language, target language and first subtitles, so as to meet the needs of users. For example, for people with poor eyesight, you can enlarge the font so that you can clearly see the content of the first subtitles, which meets the needs of watching videos.

[0064] In some embodiments, the first floating interface includes a close control, such as Figure 2 As shown, the first floating interface includes a close control 201, and may also include the following steps:

[0065] When an operation instruction for closing the control is received, the first floating interface is closed.

[0066] In some embodiments, the first floating interface includes a subtitle retraction control, such as Figure 2 As shown, the first floating interface includes a subtitle retracting and releasing control 202, and may also include the following steps:

[0067] After receiving an operation instruction for the subtitle retracting and releasing control, the first floating interface is enlarged, and the second subtitle of the audio and video is displayed in the first floating interface after the size enlargement process;

[0068] The number of characters in the second subtitle is greater than or equal to the number of characters in the first subtitle.

[0069] In this embodiment, after receiving an operation instruction for the subtitle retraction and playback control, the height and / or width of the first floating interface can be increased. Figure 2 The height of the first floating interface is increased to 212 dp.

[0070] like Figure 5 As shown, Figure 5 It is a schematic diagram of displaying second subtitles of audio and video in a first floating interface after size enlargement provided by an embodiment of the present application. Figure 5 The second subtitle shown in is "IQ bosses, what is it like to be an assistant? Annie said it was so cool. After all, the boss, who has been working for more than 40years and more than 20years, saw at a glance that the biggest problem of the company was the product naming".

[0071] Users can click Figure 2 The subtitle retraction and playback control 202 in the Figure 2 The subtitle retractable control in the subtitle retractable control is pointing downward and is in the retracted state. Figure 2 After the subtitle retraction control is clicked, Figure 2 The direction of the subtitle retraction control in the changes to Figure 5 The direction shown in the figure changes to upward and is in the expanded state.

[0072] from Figure 5 It can be seen that Figure 5 The number of characters of the second subtitle displayed in is greater than Figure 2 For example, if the total number of characters in the subtitles corresponding to the audio or video is greater than the first number of characters, it means Figure 2 The first floating interface shown cannot display all the subtitles corresponding to the audio information. In this case, after receiving an operation instruction for the subtitle retraction and playback control, the first floating interface is enlarged, and the second subtitles of the audio and video are displayed in the first floating interface after the size increase, so that more subtitles of the audio and video can be displayed in the first floating interface after the size increase, so that the user can watch more subtitles.

[0073] It should be noted that if the total number of characters in the subtitles corresponding to the audio and video is less than or equal to the first number of characters, it means Figure 2 The subtitles corresponding to the audio information can be displayed in the first floating interface shown. In this case, after receiving an operation instruction for the subtitle playback control, the first floating interface is increased in size, and the second subtitles of the audio and video are displayed in the first floating interface after the size increase. At this time, the number of characters in the second subtitles is equal to the number of characters in the first subtitles.

[0074] In some embodiments, after displaying the second subtitles of the audio and video in the first floating interface after the size increase processing, the following steps may also be included:

[0075] After receiving an operation instruction for the subtitle retracting and releasing control, the first floating interface after the size increase processing is reduced in size, and the third subtitle of the audio and video is displayed in the first floating interface after the size reduction processing;

[0076] The number of characters in the third subtitle is less than or equal to the number of characters in the second subtitle.

[0077] In this embodiment, for example, upon receiving Figure 5 After the operation instruction of the subtitle retracting and playing control 501 is displayed, the Figure 5 The height of the suspended interface shown is reduced to Figure 2 The height of the suspension interface is shown in Figure 2 The third subtitle of the audio and video is displayed in the first floating interface shown.

[0078] In some embodiments, the following steps may also be included:

[0079] If the total number of characters in the subtitles of the audio or video is greater than the first number of characters, a subtitle retraction and playback control is displayed on the first floating interface.

[0080] In some embodiments, before displaying the first subtitle of the audio or video played by the terminal in the first floating interface, the following steps may also be included:

[0081] Prompt information is displayed in the first floating interface, and the prompt information is used to prompt the user terminal that the subtitles are being recognized.

[0082] Reference Figure 6 , Figure 6 This is a schematic diagram of displaying prompt information in a first floating interface provided by an embodiment of the present application. Figure 6 The height of the first floating interface is, for example, 60dp, the width is 332dp, and the floating interface is a rectangle with a 10dp arc. Figure 6 The first floating interface shown displays prompt information, which helps the user to know the progress of subtitle display of audio and video. Figure 6 The size of the first suspension interface shown in FIG. 1 may be smaller than Figure 2 The dimensions of the first suspension interface shown in, for example, Figure 6 The height of the first suspension interface shown in Figure 2 The height of the first suspension interface is shown in .

[0083] In some embodiments, the step of displaying the first subtitle of the audio or video played by the terminal in the first floating interface in S103 above includes the following steps:

[0084] Subtitle recognition is performed on the audio and video played by the terminal. When the number of recognized subtitle sentences reaches a sentence number threshold, the subtitle sentences reaching the sentence number threshold are displayed as the first subtitles in the first floating interface.

[0085] The first suspension interface is Figure 2 As shown, for example, if the sentence quantity threshold is equal to 1, after the first sentence of subtitles is obtained, the first sentence of subtitles is displayed as the first subtitle in the first floating interface. Figure 6 The size of the first suspension interface shown is enlarged to obtain Figure 2 The first floating interface is shown, and the first sentence text, that is, the first number of sentence texts, is displayed as the first subtitle Figure 2 The first suspension interface is shown.

[0086] In some embodiments, after displaying the second subtitles of the audio and video in the first floating interface after the size increase processing, the following steps may also be included:

[0087] If a preset type of gesture operation is detected, the second subtitle is subjected to sliding processing.

[0088] The preset type of gesture operation is, for example, a sliding gesture operation, such as sliding your finger up and down. Figure 5In the interface of the first floating interface, the subtitles displayed in the first floating interface after the size increase processing can be slid to display, so as to facilitate the user to change the subtitles of the audio and video displayed in the first floating interface.

[0089] In some embodiments, the following steps may also be included:

[0090] If no operation instruction is received based on the first floating interface within the first time period, the controls in the first floating interface are hidden.

[0091] like Figure 7 As shown, Figure 7 is a schematic diagram of hiding a control in the first floating interface provided by an embodiment of the present application. If no operation instruction is received based on the first floating interface within the first time period, then hide Figure 2 The controls in the first floating interface in the video only display the first subtitles of the audio and video, and the first subtitles are updated in real time with the video, so that the user only needs to pay attention to the first subtitles that he is interested in, providing the user with a good visual experience. It should be noted that if no operation instruction is received based on the first floating interface within the first time length, you can also Figure 7 to hide the translation instructions.

[0092] In some embodiments, the following steps may also be included:

[0093] If no operation instruction is received based on the first floating interface within the first time period, the first floating interface is reduced in size, and subtitles are displayed in the first floating interface after the size reduction process. Figure 7 As shown, Figure 7 The height of the first suspension interface after the size reduction process shown in FIG. Figure 2 The height of the first suspension interface is shown in .

[0094] In some embodiments, the currently displayed interface includes a suspended transparent layer, and the display of the first suspended interface in S103 can be implemented in the following manner:

[0095] According to the first subtitle, a first floating interface is drawn and displayed on the transparent layer.

[0096] In this embodiment, the size of the first floating interface to be drawn can be determined according to the number of characters included in the first subtitle, and the first floating interface of the size can be drawn and displayed on the transparent layer. The size of the first floating interface to be drawn can also be determined according to the language type of the language corresponding to the first subtitle, and the first floating interface of the size can be drawn and displayed on the transparent layer.

[0097] In some embodiments, after the first floating interface is displayed, the following steps may also be included:

[0098] After an interface moving operation on the first floating interface is detected, the first floating interface is redrawn on the transparent layer according to the interface position after the movement corresponding to the interface moving operation.

[0099] In this embodiment, since the first floating interface is a floating interface drawn on a transparent layer, after detecting an interface movement operation on the first floating interface, the first floating interface can be redrawn on the transparent layer instead of directly dragging the first floating interface to a new position, thereby reducing the performance loss of the terminal and extending the usage time of the terminal without reducing the display effect.

[0100] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0101] Based on the same inventive concept, the embodiment of the present application also provides a subtitle display device for implementing the subtitle display method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more subtitle display device embodiments provided below can refer to the limitations on the subtitle display method above, and will not be repeated here.

[0102] In one embodiment, Figure 8 As shown, Figure 8 800 is a schematic diagram of a subtitle display device provided in an embodiment of the present application. The device 800 includes:

[0103] The first display module 801 is used to display the floating control on the interface currently displayed by the terminal;

[0104] A first receiving module 802, configured to receive an operation instruction for the floating control;

[0105] The second display module 803 is used to display a first floating interface in response to an operation instruction for the floating control, and to display a first subtitle of the audio or video played by the terminal in the first floating interface.

[0106] In some embodiments, the first subtitles are subtitles corresponding to a target language obtained by translating the source language of the audio or video.

[0107] In some embodiments, the device 800 may further include: a calling module, configured to call a translation service of the operating system of the terminal in response to an operation instruction for the floating control, so that the translation service translates the source language of the audio and video to obtain the first subtitles.

[0108] In some embodiments, the first floating interface includes translation indication information, where the translation indication information is used to indicate a language type of a source language of the first subtitle and a language type of the first subtitle.

[0109] In some embodiments, the first floating interface includes a setting control, and the apparatus 800 may further include:

[0110] A second receiving module, used for receiving an operation instruction for the setting control;

[0111] The third display module is used to display a second floating interface in response to an operation instruction for the setting control, where the second floating interface includes setting options; obtain a setting instruction based on the setting options, and display subtitles in the first floating interface according to the setting instruction.

[0112] In some embodiments, the setting instruction includes at least one of the following:

[0113] Setting instructions for the language type of the target language after translation;

[0114] Setting instructions for the language type of the source language before translation;

[0115] An instruction for setting the font size of the first subtitle;

[0116] An instruction for setting the font color of the first subtitle;

[0117] An instruction for setting the font type of the first subtitle.

[0118] In some embodiments, the first floating interface includes a close control, and the device 800 may further include: a close module, configured to close the first floating interface when an operation instruction for the close control is received.

[0119] In some embodiments, the first floating interface includes a subtitle retraction and playback control, and the device 800 may further include:

[0120] A first processing module is used to increase the size of the first floating interface after receiving an operation instruction for the subtitle retracting and releasing control, and display the second subtitle of the audio and video in the first floating interface after the size increase processing;

[0121] The number of characters in the second subtitle is greater than or equal to the number of characters in the first subtitle.

[0122] In some embodiments, the apparatus 800 may further include: a sliding processing module, configured to perform sliding processing on the second subtitle if a preset type of gesture operation is detected.

[0123] In some embodiments, the apparatus 800 may further include:

[0124] A second processing module is used to reduce the size of the first floating interface after the size increase processing after receiving the operation instruction for the subtitle retracting and releasing control, and display the third subtitle of the audio and video in the first floating interface after the size reduction processing;

[0125] The number of characters in the third subtitle is less than or equal to the number of characters in the second subtitle.

[0126] In some embodiments, the device 800 may further include: a third display module, configured to display the subtitle retraction and playback controls on the first floating interface if the total number of characters in the subtitles of the audio or video is greater than the first number of characters.

[0127] In some embodiments, the apparatus 800 may further include: a prompt module, configured to display prompt information in the first floating interface, wherein the prompt information is configured to prompt the user that the terminal is recognizing subtitles.

[0128] In some embodiments, the second display module 803 is specifically used to perform subtitle recognition processing on the audio and video played by the terminal. When the number of recognized subtitle sentences reaches a sentence number threshold, the subtitle sentences that reach the sentence number threshold are displayed as the first subtitles in the first floating interface.

[0129] In some embodiments, the device 800 may further include: a hiding module, configured to hide controls in the first floating interface if no operation instruction is received based on the first floating interface within a first time period.

[0130] Each module in the above-mentioned subtitle display device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the terminal in the form of hardware, or can be stored in the memory in the terminal in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0131] In one embodiment, a terminal is provided, whose internal structure diagram can be as follows: Fig. 9 As shown. The terminal includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the terminal is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a subtitle display method is implemented. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen, and the input device of the terminal can be a touch layer covering the display screen, or a key, trackball or touchpad set on the terminal shell, or an external keyboard, touchpad or mouse, etc.

[0132] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal to which the scheme of the present application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0133] In one embodiment, a terminal is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0134] Display the floating control on the interface currently displayed on the terminal;

[0135] Receiving an operation instruction for the floating control;

[0136] In response to an operation instruction for the floating control, a first floating interface is displayed, and a first subtitle of the audio or video played by the terminal is displayed in the first floating interface.

[0137] In one embodiment, the first subtitles are subtitles corresponding to a target language obtained by translating the source language of the audio or video.

[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0139] In response to an operation instruction for the floating control, a translation service of the operating system of the terminal is called, so that the translation service translates the source language of the audio and video to obtain the first subtitle.

[0140] In one embodiment, the first floating interface includes translation indication information, and the translation indication information is used to indicate a language type of the first subtitle source language and a language type of the first subtitle.

[0141] In one embodiment, the first floating interface includes a setting control, and the processor further implements the following steps when executing the computer program:

[0142] Receiving an operation instruction for the setting control;

[0143] In response to an operation instruction for the setting control, displaying a second floating interface, wherein the second floating interface includes setting options;

[0144] A setting instruction is obtained based on the setting option, and subtitles are displayed in the first floating interface according to the setting instruction.

[0145] In one embodiment, the setting instruction includes at least one of the following:

[0146] Setting instructions for the language type of the target language after translation;

[0147] Setting instructions for the language type of the source language before translation;

[0148] An instruction for setting the font size of the first subtitle;

[0149] An instruction for setting the font color of the first subtitle;

[0150] An instruction for setting the font type of the first subtitle.

[0151] In one embodiment, the first floating interface includes a close control, and the processor further implements the following steps when executing the computer program:

[0152] When an operation instruction for closing the control is received, the first floating interface is closed.

[0153] In one embodiment, the first floating interface includes a subtitle retraction and playback control, and the processor further implements the following steps when executing the computer program:

[0154] After receiving an operation instruction for the subtitle retracting and releasing control, the first floating interface is enlarged, and the second subtitle of the audio and video is displayed in the first floating interface after the size enlargement process;

[0155] The number of characters in the second subtitle is greater than or equal to the number of characters in the first subtitle.

[0156] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0157] If a preset type of gesture operation is detected, the second subtitle is subjected to sliding processing.

[0158] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0159] After receiving an operation instruction for the subtitle retracting and releasing control, the first floating interface after the size increase processing is reduced in size, and the third subtitle of the audio and video is displayed in the first floating interface after the size reduction processing;

[0160] The number of characters in the third subtitle is less than or equal to the number of characters in the second subtitle.

[0161] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0162] If the total number of characters in the subtitles of the audio and video is greater than the first number of characters, the subtitle retraction and playback control is displayed on the first floating interface.

[0163] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0164] Prompt information is displayed in the first floating interface, where the prompt information is used to prompt the user that the terminal is recognizing subtitles.

[0165] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0166] Subtitle recognition processing is performed on the audio and video played by the terminal. When the number of recognized subtitle sentences reaches a sentence number threshold, the subtitle sentences that reach the sentence number threshold are displayed as the first subtitles in the first floating interface.

[0167] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0168] If no operation instruction is received based on the first floating interface within a first time period, the controls in the first floating interface are hidden.

[0169] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0170] Display the floating control on the interface currently displayed on the terminal;

[0171] Receiving an operation instruction for the floating control;

[0172] In response to an operation instruction for the floating control, a first floating interface is displayed, and a first subtitle of the audio or video played by the terminal is displayed in the first floating interface.

[0173] In one embodiment, the first subtitles are subtitles corresponding to a target language obtained by translating the source language of the audio or video.

[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0175] In response to an operation instruction for the floating control, a translation service of the operating system of the terminal is called, so that the translation service translates the source language of the audio and video to obtain the first subtitle.

[0176] In one embodiment, the first floating interface includes translation indication information, and the translation indication information is used to indicate a language type of the source language and a language type of the first subtitle.

[0177] In one embodiment, the first floating interface includes a setting control, and when the computer program is executed by the processor, the following steps are further implemented:

[0178] Receiving an operation instruction for the setting control;

[0179] In response to an operation instruction for the setting control, displaying a second floating interface, wherein the second floating interface includes setting options;

[0180] A setting instruction is obtained based on the setting option, and subtitles are displayed in the first floating interface according to the setting instruction.

[0181] In one embodiment, the setting instruction includes at least one of the following:

[0182] Instructions for setting the language type of the target language after translation;

[0183] Setting instructions for the language type of the source language before translation;

[0184] An instruction for setting the font size of the first subtitle;

[0185] An instruction for setting the font color of the first subtitle;

[0186] An instruction for setting the font type of the first subtitle.

[0187] In one embodiment, the first floating interface includes a close control, and when the computer program is executed by the processor, the following steps are further implemented:

[0188] When an operation instruction for closing the control is received, the first floating interface is closed.

[0189] In one embodiment, the first floating interface includes a subtitle retraction and playback control, and when the computer program is executed by the processor, the following steps are further implemented:

[0190] After receiving an operation instruction for the subtitle retracting and releasing control, the first floating interface is enlarged, and the second subtitle of the audio and video is displayed in the first floating interface after the size enlargement process;

[0191] The number of characters in the second subtitle is greater than or equal to the number of characters in the first subtitle.

[0192] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0193] If a preset type of gesture operation is detected, the second subtitle is subjected to sliding processing.

[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0195] After receiving an operation instruction for the subtitle retracting and releasing control, the first floating interface after the size increase processing is reduced in size, and the third subtitle of the audio and video is displayed in the first floating interface after the size reduction processing;

[0196] The number of characters in the third subtitle is less than or equal to the number of characters in the second subtitle.

[0197] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0198] If the total number of characters in the subtitles of the audio and video is greater than the first number of characters, the subtitle retraction and playback control is displayed on the first floating interface.

[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0200] Prompt information is displayed in the first floating interface, where the prompt information is used to prompt the user that the terminal is recognizing subtitles.

[0201] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0202] Subtitle recognition processing is performed on the audio and video played by the terminal. When the number of recognized subtitle sentences reaches a sentence number threshold, the subtitle sentences that reach the sentence number threshold are displayed as the first subtitles in the first floating interface.

[0203] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0204] If no operation instruction is received based on the first floating interface within a first time period, the controls in the first floating interface are hidden.

[0205] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the subtitle display method provided above when executed by a processor.

[0206] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0207] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0208] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0209] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A subtitle display method, It is characterized in that The method comprises: Display the floating control on the interface currently displayed on the terminal; Receiving an operation instruction for the floating control; In response to an operation instruction for the floating control, a first floating interface is displayed, and a first subtitle of the audio and video played by the terminal is displayed in the first floating interface; The first floating interface includes a subtitle retraction and playback control, and the method further includes: After receiving an operation instruction for the subtitle retracting and releasing control, the first floating interface is enlarged, and the second subtitle of the audio and video is displayed in the first floating interface after the size enlargement process; Wherein, the number of characters of the second subtitle is greater than or equal to the number of characters of the first subtitle; Before displaying the first subtitle of the audio or video played by the terminal in the first floating interface, the method further includes: Displaying prompt information in the first floating interface, where the prompt information is used to prompt that the terminal is recognizing subtitles; The currently displayed interface includes a suspended transparent layer, and the display of the first suspended interface includes: Drawing and displaying the first floating interface on the transparent layer according to the first subtitle; After detecting an interface moving operation on the first floating interface, redrawing the first floating interface on the transparent layer according to a position of the interface after the movement corresponding to the interface moving operation; The method further comprises: If no operation instruction is received based on the first floating interface within a first time period, hiding the controls in the first floating interface; or, If no operation instruction is received based on the first floating interface within the first time period, the first floating interface is reduced in size, and subtitles are displayed in the first floating interface after the size reduction process; Drawing and displaying the first floating interface on the transparent layer according to the first subtitles includes: The size of the first floating interface to be drawn is determined according to the number of characters included in the first subtitle, and the first floating interface of the size is drawn and displayed on the transparent layer.

2. The method according to claim 1, It is characterized in that The method further comprises: In response to an operation instruction for the floating control, a translation service of the operating system of the terminal is called, so that the translation service translates the source language of the audio and video to obtain the first subtitle.

3. The method according to claim 1 or 2, It is characterized in that The first floating interface includes translation indication information, where the translation indication information is used to indicate a language type of a source language of the first subtitle and a language type of the first subtitle.

4. The method according to claim 2, It is characterized in that The first floating interface includes a setting control, and the method further includes: Receiving an operation instruction for the setting control; In response to an operation instruction for the setting control, displaying a second floating interface, wherein the second floating interface includes setting options; A setting instruction is obtained based on the setting option, and subtitles are displayed in the first floating interface according to the setting instruction.

5. The method according to claim 4, It is characterized in that The setting instruction includes at least one of the following: Setting instructions for the language type of the target language after translation; Setting instructions for the language type of the source language before translation; An instruction for setting the font size of the first subtitle; An instruction for setting the font color of the first subtitle; An instruction for setting the font type of the first subtitle.

6. The method according to claim 1, It is characterized in that After displaying the second subtitle of the audio and video in the first floating interface after the size increase processing, the method further includes: After receiving an operation instruction for the subtitle retracting and releasing control, the first floating interface after the size increase processing is reduced in size, and the third subtitle of the audio and video is displayed in the first floating interface after the size reduction processing; The number of characters in the third subtitle is less than or equal to the number of characters in the second subtitle.

7. The method according to claim 1, It is characterized in that The displaying, in the first floating interface, a first subtitle of the audio or video played by the terminal includes: Subtitle recognition processing is performed on the audio and video played by the terminal. When the number of recognized subtitle sentences reaches a sentence number threshold, the subtitle sentences that reach the sentence number threshold are displayed as the first subtitles in the first floating interface.

8. A subtitle display device, It is characterized in that The device comprises: A first display module, used to display a floating control on the interface currently displayed by the terminal; A first receiving module, used to receive an operation instruction for the floating control; A second display module, configured to display a first floating interface in response to an operation instruction for the floating control, and display a first subtitle of the audio or video played by the terminal in the first floating interface; The first floating interface includes a subtitle retraction and playback control, and the device further includes: A first processing module is used to increase the size of the first floating interface after receiving an operation instruction for the subtitle retraction and playback control, and display the second subtitle of the audio and video in the first floating interface after the size increase processing; wherein the number of characters in the second subtitle is greater than or equal to the number of characters in the first subtitle; A prompt module, used for displaying prompt information in the first floating interface, wherein the prompt information is used for prompting the terminal that the terminal is recognizing subtitles; The currently displayed interface includes a suspended transparent layer, and the second display module is specifically used to draw and display the first suspended interface on the transparent layer according to the first subtitle; after detecting an interface movement operation for the first suspended interface, redraw the first suspended interface on the transparent layer according to the interface position after the movement corresponding to the interface movement operation; a hiding module, configured to hide controls in the first floating interface if no operation instruction is received based on the first floating interface within a first duration; or to reduce the size of the first floating interface and display subtitles in the reduced-size first floating interface if no operation instruction is received based on the first floating interface within the first duration; The second display module is specifically configured to determine the size of the first floating interface to be drawn according to the number of characters included in the first subtitle, and to draw and display the first floating interface of the size on the transparent layer.

9. A terminal comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Picture processing method, device and equipment

    CN107369197A

  • Android-based floating video playing method

    CN108366301A

  • Video subtitle display method and device

    CN108833991A

  • Video subtitle display method and device

    CN108924598A

  • Video file recording method and device and storage medium

    CN110300274A