Video subtitle adjustment method, device, electronic device and storage medium

By decoding the video file and adjusting the subtitle style based on the screen brightness, the problem of subtitle display inadequacy caused by changes in ambient light is solved, and the video playback efficiency and user experience are improved.

CN115334348BActive Publication Date: 2024-11-26TENCENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110506350.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-10
Publication Date
2024-11-26
Estimated Expiration
2041-05-10

AI Technical Summary

Technical Problem

When playing videos, changes in ambient light brightness lead to inadequate subtitle styles, affecting user experience and video playback efficiency.

Method used

By decoding the video file, obtaining video picture data and subtitle data, adjusting the subtitle data based on the screen brightness, dynamically adjusting the color, border and shadow depth of the subtitles to match the ambient light and improving the display effect of subtitles.

Benefits of technology

It effectively improves video playback efficiency, avoids the need for users to manually adjust subtitle styles, improves the matching degree between subtitles and video images, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115334348B_ABST
    Figure CN115334348B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and in particular to a video subtitle adjustment method, device, electronic device and storage medium for improving video playback efficiency. The method includes: obtaining a video file corresponding to the video to be processed, and decoding the video file to obtain video screen data and subtitle data corresponding to the video to be processed; rendering the screen based on the video screen data to obtain the corresponding rendered frames of video screens in the video to be processed; adjusting the style of the subtitle data based on the screen brightness data corresponding to the playback interface of the video to be processed, and generating subtitle text based on the adjusted subtitle data rendering; synthesizing the subtitle text and the rendered frames of the video screen to obtain the target video screens of each frame corresponding to the video to be processed. Since the present application can dynamically change the subtitle style displayed by the current video through the screen brightness, no manual adjustment by the user is required, and thus the video playback efficiency can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the popularization of the Internet, users can obtain the videos they want to watch through convenient channels. Video carrier media such as videotapes and discs have gradually faded out of the public's field of vision. Video transmission methods such as online downloads and online viewing are accepted by more and more users, and various types of terminal devices appear in people's work and daily life. However, in the relevant technology, when various types of terminal devices play videos, the subtitle style displayed on the display screen is fixed. When the brightness of the ambient light changes, devices with screens, such as mobile phones, will adjust the brightness of the screen according to the current ambient light. However, when playing a video with subtitles, the automatic adjustment of the screen brightness will make the subtitles originally rendered in a fixed color become too dazzling or too dim, resulting in a poor viewing experience of the subtitles, thereby reducing the user experience and video playback efficiency. Summary of the invention

[0003] Embodiments of the present application provide a video subtitle adjustment method, device, electronic device, and storage medium to improve video playback efficiency.

[0004] A video subtitle adjustment method provided in an embodiment of the present application includes:

[0005] Obtaining a video file corresponding to the video to be processed, and decoding the video file to obtain video picture data and subtitle data corresponding to the video to be processed;

[0006] Performing image rendering based on the video image data to obtain corresponding rendered video frames in the video to be processed;

[0007] Based on the screen brightness data corresponding to the playback interface of the video to be processed, adjusting the style of the subtitle data, and rendering and generating subtitle text based on the adjusted subtitle data;

[0008] The subtitle text and the rendered video frames are synthesized to obtain target video frames corresponding to the video to be processed.

[0009] An embodiment of the present application provides a video subtitle adjustment device, comprising:

[0010] A data acquisition unit, used to acquire a video file corresponding to the video to be processed, and decode the video file to obtain video picture data and subtitle data corresponding to the video to be processed;

[0011] A first rendering unit, configured to perform image rendering based on the video image data to obtain corresponding rendered video frames in the video to be processed;

[0012] A second rendering unit is used to adjust the style of the subtitle data based on the screen brightness data corresponding to the playback interface of the video to be processed, and generate subtitle text based on the adjusted subtitle data;

[0013] The synthesis unit is used to synthesize the subtitle text and the rendered video frames to obtain target video frames corresponding to the video to be processed.

[0014] Optionally, the subtitle data includes font color data, and the second rendering unit is specifically configured to:

[0015] The product of the screen brightness data, the original font color parameter in the font color data, and the preset dynamic adjustment value is used as the adjusted font color parameter;

[0016] Based on the adjusted font color parameters, the color of the corresponding subtitle text is rendered and generated.

[0017] Optionally, the subtitle data includes font border data, and the second rendering unit is specifically used for:

[0018] taking the product of the screen brightness data, the original font border width in the font border data, and the preset dynamic adjustment value as the adjusted font border width; and

[0019] The product of the screen brightness data, the original font border color in the font border data, and the preset dynamic adjustment value is used as the adjusted font border color;

[0020] Based on the adjusted font border width and the adjusted font border color, a border of the corresponding subtitle text is rendered and generated.

[0021] Optionally, the subtitle data includes font shadow data, and the second rendering unit is specifically configured to:

[0022] The product of the screen brightness data, the original font shadow depth in the font shadow data, and the preset dynamic adjustment value is used as the adjusted font shadow depth;

[0023] Based on the adjusted font shadow depth, a shadow of the corresponding subtitle text is rendered and generated.

[0024] An electronic device provided by an embodiment of the present application includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of any one of the above-mentioned video subtitle adjustment methods.

[0025] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs any of the steps of the above-mentioned video subtitle adjustment method.

[0026] An embodiment of the present application provides a computer-readable storage medium, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to perform any step of the above-mentioned video subtitle adjustment method.

[0027] The beneficial effects of this application are as follows:

[0028] The video subtitle adjustment method, device, electronic device and storage medium provided in the embodiments of the present application can decode video files into two categories, video picture data and subtitle data. Furthermore, the video frame can be rendered based on the video picture data, and the subtitle text can be rendered based on the subtitle data. Among them, in the present application, before rendering the subtitle text based on the subtitle data, the subtitle data needs to be styled based on the screen brightness. Since the embodiments of the present application can dynamically change the subtitle style of the current video display through the screen brightness, no manual adjustment by the user is required, thereby effectively improving the video playback efficiency.

[0029] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0031] Figure 1 An optional schematic diagram of an application scenario in an embodiment of the present application;

[0032] Figure 2 A schematic diagram of a flow chart of a video subtitle adjustment method in an embodiment of the present application;

[0033] Figure 3 A virtual structural diagram of a video subtitle adjustment device in an embodiment of the present application;

[0034] Figure 4 A schematic diagram of module interaction of a video subtitle adjustment method in an embodiment of the present application;

[0035] Figure 5 A schematic diagram of a flow chart of a method for adjusting the style of subtitle data in an embodiment of the present application;

[0036] Figure 6 A flowchart of a method for calculating brightness data of each screen by normalization in an embodiment of the present application;

[0037] Figure 7 is a detailed flow chart of a screen brightness data reading module in an embodiment of the present application;

[0038] Figure 8 A flowchart of a method for obtaining target video frames corresponding to a video to be processed according to an embodiment of the present application;

[0039] Fig. 9 A subtitle key style data interpretation diagram in an embodiment of the present application;

[0040] Fig.10 A detailed flowchart of a video subtitle adjustment method in an embodiment of the present application;

[0041] Fig.11 A schematic diagram of a timing flow chart of a complete method for adjusting video subtitles in an embodiment of the present application;

[0042] Fig.12 A schematic diagram of the structure of a video subtitle adjustment device in an embodiment of the present application;

[0043] Fig.13 A schematic diagram of a hardware structure of an electronic device to which an embodiment of the present application is applied;

[0044] Fig.14 The present invention is a schematic diagram of the hardware structure of another electronic device to which the embodiments of the present application are applied. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0046] The following is an introduction to some concepts involved in the embodiments of the present application.

[0047] Player: refers to software that can be used to read video or audio files stored in the form of digital signals. It also refers to electronic device products that have the function of playing video or audio files, or refers to the program that renders sound and images on the device.

[0048] Subtitles: refers to the display of non-visual content such as dialogues in television, movies, and stage works in text form. It also refers to the text processed in the later stage of film and television works. The dialogue subtitles of film and television works generally appear at the bottom of the screen, while the subtitles of drama works may be displayed on the sides or above the stage. Its function is to display the voice content of the program in the form of subtitles, which can help viewers with poor hearing understand the content of the program. In addition, subtitles can also be used to translate foreign language programs, so that viewers who do not understand the foreign language can hear the original soundtrack and understand the content of the program at the same time. In the embodiment of the present application, it mainly refers to the display of the current video sound content or the text of the video content on the screen when using a player to play the video.

[0049] Subtitle data: data obtained by decoding a video file, used to represent the dialogue information and style information of the subtitle content to be displayed on the image, based on which the subtitle text in the video can be rendered. The subtitle data in the embodiment of the present application includes but is not limited to font color data, font border data, and font shadow data.

[0050] Video picture data: data obtained by decoding a video file and used to represent the content information of the video picture. Video pictures can be rendered frame by frame based on the video picture data.

[0051] Playback interface: A user-oriented interface for playing the video to be processed, which can be in the form of a floating layer, a web page, a pop-up window, etc., and is not specifically limited in the embodiments of the present application.

[0052] The following is a brief introduction to the design concept of the embodiment of the present application:

[0053] With the advancement of science and technology, various types of terminal devices have appeared in people's work and daily life. For example, a display screen can be combined with a treadmill so that the user can watch videos while using the treadmill, or a display screen can be set on the panel of a refrigerator so that the user can watch videos through the display screen while cooking.

[0054] However, the inventor discovered during the research process of this application that when various types of terminal devices in the related art play videos, the subtitle styles displayed on the display screen are fixed, which is not convenient for users to watch.

[0055] For example, when the ambient light is too bright, the screen brightness becomes higher, and the subtitle borders, shadows, and colors are not adjusted, making them look dim relative to the video screen.

[0056] For another example, when the ambient light is dim, such as when watching a video with the lights off, the screen brightness becomes low, the subtitles become white, and the subtitles look very dazzling compared to the video screen.

[0057] In view of this, the embodiments of the present application propose a method, device, electronic device and storage medium for adjusting video subtitles. The embodiments of the present application can decode video files into two categories, video picture data and subtitle data. Furthermore, the video frames can be rendered based on the video picture data, and the subtitle text can be rendered based on the subtitle data. Among them, in the present application, before rendering the subtitle text based on the subtitle data, the subtitle data needs to be styled based on the screen brightness. Since the embodiments of the present application can dynamically change the subtitle style of the current video display through the screen brightness, no manual adjustment by the user is required, thereby effectively improving the video playback efficiency.

[0058] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0059] like Figure 1 As shown, it is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario diagram includes two terminal devices 110 and a server 120, and a user can log in to the playback interface through the terminal device 110. The terminal device 110 and the server 120 can communicate through a communication network.

[0060] For example, the terminal device 110 obtains a video file corresponding to the video to be processed, and feeds the video file back to the server 120 , which decodes the video file and returns the decoded video picture data and subtitle data to the terminal device 110 , and so on.

[0061] In an optional implementation, the communication network is a wired network or a wireless network.

[0062] In the embodiment of the present application, the terminal device 110 can be a mobile phone, tablet computer, laptop computer, desktop computer, e-book reader, smart TV, smart home and other electronic devices with certain computing capabilities and running instant messaging software and websites or social software and websites. Each terminal device 110 is connected to the server 120 through a wireless network. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0063] It should also be noted that Figure 1 The figure is only an example. In fact, the number of terminal devices and servers is not limited and is not specifically limited in the embodiments of the present application.

[0064] In an embodiment of the present application, an application related to video playback is installed on the terminal device 110. The application involved in the embodiment of the present application can be software or a client such as a web page or a mini program. The server 120 is a back-end server corresponding to the software or web page, mini program, etc., and does not limit the specific type of the client.

[0065] It should be noted that the video subtitle adjustment method in the embodiment of the present application can be executed by the server or the terminal device alone, or can be executed by the server and the terminal device together, and is implemented through the interaction between the terminal device and the server.

[0066] See also Figure 2 As shown, it is an implementation flow chart of a video subtitle adjustment method provided by an embodiment of the present application. Here, it is illustrated by taking the execution by a terminal device as an example. The specific implementation process of the method is as follows:

[0067] S21: The terminal device obtains a video file corresponding to the video to be processed, and decodes the video file to obtain video picture data and subtitle data corresponding to the video to be processed;

[0068] See also Figure 3As shown, it is a virtual structural diagram of a video subtitle adjustment device in an embodiment of the present application, which mainly includes a player decoder module, a player rendering module and a screen brightness data reading module. Among them, the terminal device can decode the encoded video picture data and subtitle data from the video file based on the player decoder module to obtain the corresponding video picture data and subtitle data. Among them, the player rendering module and the screen brightness data reading module are key modules. The terminal device finally renders the video picture and subtitle text based on these two modules, and outputs them to the device screen for display.

[0069] S22: The terminal device performs image rendering based on the video image data to obtain corresponding rendered video frames in the video to be processed;

[0070] S23: The terminal device adjusts the style of the subtitle data based on the screen brightness data corresponding to the playback interface of the video to be processed, and generates subtitle text based on the adjusted subtitle data by rendering;

[0071] Among them, the terminal device receives video screen data through the player rendering module and renders each frame of the video screen; in addition, when rendering subtitle data based on the player rendering module, it is necessary to first read the current screen brightness value and subtitle data from the screen brightness data reading module and process them.

[0072] S24: The terminal device synthesizes the subtitle text and each rendered video frame to obtain each target video frame corresponding to the video to be processed.

[0073] See also Figure 4 As shown, it is a module interaction diagram of a video subtitle adjustment method in an embodiment of the present application.

[0074] Specifically, the terminal device obtains the video file from the network or locally, and outputs the file data of the video file (the video, audio, and subtitle data synthesized together) to the player decoder, and then decodes the data input by the video file based on the player decoding module, and decodes two channels of data, one for the video screen data and the other for the subtitle data, and inputs them to the rendering module, and then renders the video screen and subtitle text based on the rendering module, see steps S22 and S23 for details. Among them, when rendering the subtitle text in step S23, the subtitle data also needs to be adjusted according to the screen brightness data. In an embodiment of the present application, the terminal device mainly obtains the screen brightness data corresponding to the playback interface of the video to be processed based on the screen brightness data reading module, and transmits it to the rendering module.

[0075] Finally, the terminal device aligns the subtitles and video images by time points, synthesizing the target video images frame by frame to be output to the device screen. Based on the target video image data, the terminal device displays the corresponding video images and adjusted subtitles on the screen.

[0076] In the above implementation, the video file is decoded into two categories, video picture data and subtitle data. Then, the video frame can be rendered based on the video picture data, and the subtitle text can be rendered based on the subtitle data. In this application, before rendering the subtitle text based on the subtitle data, the subtitle data needs to be styled based on the screen brightness. Since the embodiment of the application can dynamically change the subtitle style of the current video display by the screen brightness, the video playback efficiency can be effectively improved.

[0077] An optional implementation is that the Figure 5 The flowchart shown implements S23, comprising the following steps:

[0078] S501: respectively obtaining, based on the playback interface, screen brightness data corresponding to each playback interface when playing each rendered video frame in the video to be processed;

[0079] S502: adjusting the style of corresponding subtitle data based on the screen brightness data corresponding to each playback interface.

[0080] That is, for each video frame, it is necessary to obtain the screen brightness data corresponding to the playback interface when playing the video frame, and then, based on each screen brightness data, adjust the style of the corresponding subtitle data.

[0081] For example, for video frame 1, the corresponding screen brightness data is l1, for video frame 2, the corresponding screen brightness data is l2, ... When the style of the corresponding subtitle data is adjusted according to each screen brightness data, the style of the subtitle data related to video frame 1 is adjusted based on the screen brightness data l1, and the style of the subtitle data related to video frame 2 is adjusted based on the screen brightness data l2, and so on.

[0082] In the above-mentioned implementation manner, in the embodiment of the present application, when the screen brightness is high, the corresponding screen brightness data is large, and when the screen brightness is low, the corresponding screen brightness data is small. The style of the subtitle data is effectively adjusted based on the screen brightness data corresponding to the playback interface to ensure that the subtitle style is more closely matched to the screen brightness of the playback interface, and the problem of the subtitles looking dim relative to the video screen when the ambient light is too bright and the screen brightness becomes high is effectively reduced. Similarly, the problem of the subtitles looking very dazzling relative to the video screen when the ambient light is dark and the screen brightness becomes low can also be effectively reduced. Manual adjustment by the user is not required, thereby improving the video playback efficiency and playback effect.

[0083] In an optional embodiment, the following Figure 6 The normalized method in the flowchart shown calculates each screen brightness data, which specifically includes the following steps:

[0084] S601: respectively obtaining the current screen brightness values ​​corresponding to each rendered video frame played based on the playback interface, and the maximum screen brightness value corresponding to the playback interface;

[0085] S602: Based on the maximum screen brightness value, normalize each current screen brightness value to obtain each screen brightness data.

[0086] In an embodiment of the present application, the maximum screen brightness value corresponding to the playback interface is related to the playback device. The maximum screen brightness values ​​corresponding to the playback interfaces of different playback devices may be different. However, for the same playback device, the maximum screen brightness value corresponding to its playback interface is fixed, while the corresponding current screen brightness value when playing different video frames can change dynamically.

[0087] Assume that the maximum screen brightness value is a. For video frame 1, when playing video frame 1 based on the playback interface, the screen brightness of the current playback interface, that is, the current screen brightness value, is b1, and the corresponding screen brightness data is b1 / a. For video 2, when playing video frame 2 based on the playback interface, the screen brightness of the current playback interface, that is, the current screen brightness value, is b2, and the corresponding screen brightness data is b2 / a, and so on.

[0088] See also Figure 7 As shown, it is a detailed flow chart of a screen brightness data reading module in an embodiment of the present application, and its working principle is as follows:

[0089] First, obtain the maximum screen brightness value lmax from the screen hardware, and then obtain the current screen brightness value lcurrent from the screen hardware; perform data normalization based on lmax and lcurrent, and the normalized value L = lcurrent / lmax, where the result L has a value range of [0,1]; finally, use the normalized value L (i.e., screen brightness data) as the input value of the player rendering module.

[0090] It should be noted that the above process is illustrated by taking a frame of video as an example, and the current screen brightness value refers to the screen brightness value of the frame of video when the player plays the frame of video. In fact, each frame of video needs to calculate the corresponding screen brightness data based on the above process, and the repetition will not be repeated.

[0091] In the above implementation, the screen brightness data corresponding to each frame of video is calculated by normalization, which can effectively unify the screen brightness data to [0, 1], facilitate calculation, and improve the processing efficiency of video playback.

[0092] In an optional embodiment, the following Figure 8 The flowchart shown implements S24, comprising the following steps:

[0093] S801: Based on the time identification information of each text segment in the subtitle text, time alignment is performed between each text segment and each rendered video frame;

[0094] S802: Synthesize the rendered video frames and the text segments aligned with them respectively to obtain target video frames corresponding to the video to be processed.

[0095] Among them, the subtitle text contains multiple text segments, and a text segment can refer to a sentence, which is not specifically limited here. This application uses an example in which a text segment refers to a sentence. Each sentence has its own corresponding time identification information, and each frame of video also has corresponding time identification information. Therefore, when synthesizing the subtitle text with the video screen, the subtitle text segments and video screens associated with the time identification information can be synthesized based on the time identification information corresponding to each text segment in the subtitle text and the time identification information corresponding to each frame of video after rendering to obtain the target video screen.

[0096] In the above implementation, the video screen and the subtitle text are aligned and synthesized by time alignment, wherein the text segments aligned with each rendered frame of the video screen are also rendered after adjustment based on the corresponding screen brightness data, that is, the text segments and the video screen are matched, which can effectively improve the video display effect.

[0097] In the embodiment of the present application, in addition to adjusting the style of the subtitle data based solely on the screen brightness data, a preset dynamic adjustment value can also be set to fine-tune the subtitle data to improve practicality and rendering effect.

[0098] An optional implementation is to adjust the style of subtitle data based on screen brightness data and preset dynamic adjustment values, wherein the preset dynamic adjustment value is used to fine-tune the subtitle data, and the subtitle data includes at least one of the following: font color data, font shadow data, and font border data.

[0099] Among them, the preset dynamic adjustment value can be set by relevant staff members or set according to experience, and no specific limitation is made here. It is used to finely adjust the subtitle data, that is, to slightly adjust the subtitle data, but the adjustment range is very small, which means that through fine adjustment, the adjusted subtitle data is more accurate and better matches the video picture under the current screen brightness.

[0100] In the embodiments of the present application, by splitting the key subtitle data, the key data is extracted and defined as follows:

[0101] Font color c, shadow depth s, border width b, and border color bc.

[0102] First, for example Fig. 9 As shown, it is an explanatory diagram of a key subtitle style data in the embodiments of the present application. For the subtitle text "猛" in the figure, it mainly includes three parts: font color, font shadow, and font border. The subtitle border further includes two parts: border width and border color. The font color of the subtitle "猛" shown in the figure is white, the border color is black. In addition, the width of the font border is a certain value, and the depth of the font shadow is a certain value.

[0103] The following will introduce in detail the adjustment of the above-listed several types of subtitle data:

[0104] In an alternative embodiment, the subtitle data includes font color data. At this time, when adjusting the style of the font color data in the subtitle data based on the screen brightness data corresponding to the playback interface of the video to be processed, and rendering and generating subtitle text based on the adjusted subtitle data, the main process is as follows:

[0105] First, take the product of the screen brightness data, the original font color parameter in the font color data, and the preset dynamic adjustment value as the adjusted font color parameter; then, based on the adjusted font color parameter, render and generate the color of the corresponding subtitle text.

[0106] For example, for video frame 1, the normalized screen brightness data is L, the original font color parameter of a certain subtitle text is c, and the preset dynamic adjustment value is d. When calculating the final font color C, the input parameters are L (screen brightness data), input parameter c (original font color parameter), and input parameter d (preset dynamic adjustment value). The calculation formula is as follows:

[0107] C = f(L, c, d) = L * c * d;

[0108] That is, take the product of the screen brightness data, the original font color parameter in the font color data, and the preset dynamic adjustment value as the adjusted font color parameter.

[0109] In the embodiment of the present application, when the ambient light is too bright, the screen brightness becomes higher, and the corresponding screen brightness data has a larger value. At this time, the font color parameters can be adjusted based on the screen brightness data, for example, the font color is adjusted to be brighter to ensure that it matches the brightness of the video screen. When the ambient light is dark, the screen brightness becomes lower, and the corresponding screen brightness data has a smaller value. At this time, the font color parameters can be adjusted based on the screen brightness data, for example, the font color is adjusted to be darker to ensure that it matches the brightness of the video screen and is not dazzling.

[0110] In an optional implementation, the subtitle data includes font frame data. At this time, based on the screen brightness data corresponding to the playback interface of the video to be processed, the subtitle data is style adjusted, and the subtitle text is rendered based on the adjusted subtitle data. The main process is as follows:

[0111] First, the screen brightness data, the original font border width in the font border data, and the product of the preset dynamic adjustment value are used as the adjusted font border width; and the screen brightness data, the original font border color in the font border data, and the product of the preset dynamic adjustment value are used as the adjusted font border color; then, based on the adjusted font border width and the adjusted font border color, the border of the corresponding subtitle text is rendered and generated.

[0112] For example, for video frame 1, the normalized screen brightness data is L, the original font border width of a corresponding subtitle text is b, the original font border color is bc, and the preset dynamic adjustment value is d. When calculating the final font border width B, input parameters L (screen brightness data), input parameter b (original font border width), input parameter d (preset dynamic adjustment value), the calculation formula is as follows:

[0113] B = f(L, b, d) = L*b*d;

[0114] That is, the product of the screen brightness data, the original font border width in the font border data, and the preset dynamic adjustment value is used as the adjusted font border width.

[0115] In addition, when calculating the final font border color BC, input parameter L (screen brightness data), input parameter bc (original font border color), input parameter d (preset dynamic adjustment value), the calculation formula is as follows:

[0116] BC = f(L, bc, d) = L*bc*d;

[0117] That is, the product of the screen brightness data, the original font border color in the font border data, and the preset dynamic adjustment value is used as the adjusted font border color.

[0118] In the embodiment of the present application, when the screen brightness is high, the corresponding screen brightness data has a large value. At this time, the font border data can be adjusted based on the screen brightness data, for example, the font border color is adjusted to be darker to ensure that it matches the brightness of the video screen. When the ambient light is dark, the screen brightness becomes low, and the corresponding screen brightness data has a small value. At this time, the font border data can be adjusted based on the screen brightness data, for example, the font border color is adjusted to be brighter to ensure that it matches the brightness of the video screen.

[0119] In an optional implementation, the subtitle data includes font shadow data. At this time, based on the screen brightness data corresponding to the playback interface of the video to be processed, the subtitle data is style adjusted, and the subtitle text is rendered and generated based on the adjusted subtitle data. The main process is as follows:

[0120] First, the product of the screen brightness data, the original font shadow depth in the font shadow data, and the preset dynamic adjustment value is used as the adjusted font shadow depth; then, based on the adjusted font shadow depth, the shadow of the corresponding subtitle text is rendered and generated.

[0121] For example, for video frame 1, the normalized screen brightness data is L, the original font shadow depth of a corresponding subtitle text is s, and the preset dynamic adjustment value is d. When calculating the final font shadow depth S, the input parameters L (screen brightness data), s (original font shadow depth), and d (preset dynamic adjustment value) are input, and the calculation formula is as follows:

[0122] S = f(L, s, d) = L*s*d;

[0123] That is, the product of the screen brightness data, the original font shadow depth in the font shadow data, and the preset dynamic adjustment value is used as the adjusted font shadow depth.

[0124] In the embodiment of the present application, when the screen brightness is high, the corresponding screen brightness data has a larger value. At this time, the font shadow data can be adjusted based on the screen brightness data, for example, the font shadow depth is adjusted to be deeper to ensure that it matches the brightness of the video screen. When the ambient light is dark, the screen brightness becomes low, and the corresponding screen brightness data has a smaller value. At this time, the font shadow data can be adjusted based on the screen brightness data, for example, the font shadow depth is adjusted to be lighter to ensure that it matches the brightness of the video screen.

[0125] It should be noted that the style adjustment of the subtitle data in the embodiment of the present application may only adjust the font color, or only adjust at least one of the font border color and the font border width, or only adjust the font shadow. In addition, at least two of the above may also be adjusted, which is not specifically limited here.

[0126] See also Fig.10 As shown, it is a detailed flow chart of a video subtitle adjustment method in an embodiment of the present application. Fig.10 The following example takes the adjustment of font color, font border and font shadow as an example. The specific process is as follows:

[0127] The screen brightness data, subtitle data, and video screen data are input into the rendering module. Based on the subtitle key style calculation, the parameters corresponding to the final font color, final font border, and final font shadow can be obtained, namely, the adjusted font color parameters, adjusted font border width, adjusted font border color, adjusted font shadow depth, etc. listed above. Subtitle rendering is performed based on these parameters. In addition, video screen rendering is also performed based on the video screen data. Then, based on the time point alignment method listed above, the subtitles and video screen are aligned to obtain the final screen (i.e., the target video screen), and the data corresponding to the final screen (i.e., Fig.10 The screen display data in the output is output and displayed on the screen.

[0128] It should be noted that the above process is illustrated using a frame of video as an example. In fact, each frame of video needs to be rendered based on the above process and synthesized with the corresponding adjusted subtitles to obtain the final target video and display it. The repetition will not be repeated.

[0129] See also Fig.11 The following is a timing diagram of a complete method for adjusting video subtitles. Here, the method is described by taking the terminal device as an example. The specific implementation process of the method is as follows:

[0130] Step S1101: The terminal device obtains a video file corresponding to the video to be processed;

[0131] Step S1102: The terminal device decodes the video file to obtain video picture data and subtitle data corresponding to the video to be processed;

[0132] Step S1103: the terminal device performs image rendering based on the video image data to obtain corresponding rendered video frames in the video to be processed;

[0133] Step S1104: the terminal device respectively obtains, based on the playback interface, the current screen brightness values ​​corresponding to each rendered video frame in the video to be processed, and the maximum screen brightness value corresponding to the playback interface;

[0134] Step S1105: the terminal device normalizes each current screen brightness value based on the maximum screen brightness value to obtain each screen brightness data;

[0135] Step S1106: the terminal device adjusts the style of the corresponding subtitle data based on the screen brightness data corresponding to each playback interface;

[0136] Step S1107: the terminal device renders and generates subtitle text based on the adjusted subtitle data;

[0137] Step S1108: the terminal device performs time alignment between each text segment and each rendered video frame based on the time identification information of each text segment in the subtitle text;

[0138] Step S1109: the terminal device synthesizes the rendered video frames and the text segments aligned with each other to obtain target video frames corresponding to the video to be processed;

[0139] Step S1110: The terminal device displays each frame of the target video through a playback interface.

[0140] Based on the same inventive concept, the embodiment of the present application also provides a video subtitle adjustment device. Fig.12 As shown, Fig.12 As shown, it is a structural diagram of a video subtitle adjustment device 1200 in an embodiment of the present application, which may include:

[0141] The data acquisition unit 1201 is used to acquire a video file corresponding to the video to be processed, and decode the video file to obtain video picture data and subtitle data corresponding to the video to be processed;

[0142] The first rendering unit 1202 is used to perform picture rendering based on the video picture data to obtain the corresponding rendered video frames in the video to be processed;

[0143] The second rendering unit 1203 is used to adjust the style of the subtitle data based on the screen brightness data corresponding to the playback interface of the video to be processed, and generate subtitle text based on the adjusted subtitle data;

[0144] The synthesis unit 1204 is used to synthesize the subtitle text and each frame of the rendered video image to obtain each frame of the target video image corresponding to the video to be processed.

[0145] Optionally, the second rendering unit 1203 is specifically configured to:

[0146] Respectively obtain the screen brightness data corresponding to each playback interface when playing each rendered video frame in the video to be processed based on the playback interface;

[0147] Based on the screen brightness data corresponding to the playback interface, the style of the corresponding subtitle data is adjusted.

[0148] Optionally, the second rendering unit 1203 is specifically configured to:

[0149] Obtain the current screen brightness values ​​corresponding to each rendered video frame played on the playback interface, as well as the maximum screen brightness value corresponding to the playback interface;

[0150] Based on the maximum screen brightness value, each current screen brightness value is normalized to obtain each screen brightness data.

[0151] Optionally, the synthesis unit 1204 is specifically used for:

[0152] Based on the time identification information of each text segment in the subtitle text, time alignment is performed between each text segment and each rendered video frame;

[0153] The rendered video frames and the text segments aligned with them are synthesized respectively to obtain target video frames corresponding to the video to be processed.

[0154] Optionally, the second rendering unit 1203 is specifically configured to:

[0155] Based on screen brightness data and a preset dynamic adjustment value, the subtitle data is style adjusted, and subtitle text is generated based on the adjusted subtitle data rendering, wherein the preset dynamic adjustment value is used to fine-tune the subtitle data, and the subtitle data includes at least one of the following: font color data, font shadow data, and font border data.

[0156] Optionally, the subtitle data includes font color data, and the second rendering unit 1203 is specifically used for:

[0157] The product of the screen brightness data, the original font color parameter in the font color data, and the preset dynamic adjustment value is used as the adjusted font color parameter;

[0158] Based on the adjusted font color parameters, the color of the corresponding subtitle text is rendered and generated.

[0159] Optionally, the subtitle data includes font frame data, and the second rendering unit 1203 is specifically used for:

[0160] The product of the screen brightness data, the original font border width in the font border data, and the preset dynamic adjustment value is used as the adjusted font border width; and

[0161] The product of the screen brightness data, the original font border color in the font border data, and the preset dynamic adjustment value is used as the adjusted font border color;

[0162] Based on the adjusted font border width and the adjusted font border color, a border of the corresponding subtitle text is rendered and generated.

[0163] Optionally, the subtitle data includes font shadow data, and the second rendering unit 1203 is specifically configured to:

[0164] The product of the screen brightness data, the original font shadow depth in the font shadow data, and the preset dynamic adjustment value is used as the adjusted font shadow depth;

[0165] Based on the adjusted font shadow depth, the shadow of the corresponding subtitle text is rendered and generated.

[0166] In the above implementation, the video file can be decoded into two categories, video picture data and subtitle data. Then, the video frame can be rendered based on the video picture data, and the subtitle text can be rendered based on the subtitle data. Among them, in the present application, before rendering the subtitle text based on the subtitle data, the subtitle data needs to be styled based on the screen brightness. Since the embodiment of the present application can dynamically change the subtitle style of the current video display by the screen brightness, the video playback efficiency can be effectively improved.

[0167] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0168] After introducing the video subtitle adjustment method and device according to an exemplary embodiment of the present application, next, a video subtitle adjustment device according to another exemplary embodiment of the present application is introduced.

[0169] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0170] After introducing the video subtitle adjustment method and device according to an exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.

[0171] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0172] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. In one embodiment, the electronic device may be a server, such as Figure 1 In this embodiment, the structure of the electronic device can be as follows: Fig.13 As shown, it includes a memory 1301 , a communication module 1303 and one or more processors 1302 .

[0173] The memory 1301 is used to store computer programs executed by the processor 1302. The memory 1301 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0174] The memory 1301 may be a volatile memory, such as a RAM (random-access memory); the memory 1301 may also be a non-volatile memory, such as a read-only memory, a flash memory, a HDD (hard disk drive) or an SSD (solid-state drive); or the memory 1301 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1301 may be a combination of the above memories.

[0175] The processor 1302 may include one or more CPUs (central processing units) or digital processing units, etc. The processor 1302 is configured to implement the above-mentioned video subtitle adjustment method when calling the computer program stored in the memory 1301 .

[0176] The communication module 1303 is used to communicate with terminal devices and other servers.

[0177] The specific connection medium between the memory 1301, the communication module 1303 and the processor 1302 is not limited in the embodiment of the present application. Fig.13 In the embodiment, the memory 1301 and the processor 1302 are connected via a bus 1304. The bus 1304 is connected to the processor 1302 via a bus 1304. Fig.13 The connections between other components are shown in bold lines, and are not intended to be limiting. Bus 1304 can be divided into address bus, data bus, control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0178] The memory 1301 stores a computer storage medium, and the computer storage medium stores computer executable instructions, and the computer executable instructions are used to implement the video subtitle adjustment method of the embodiment of the present application. The processor 1302 is used to execute the above-mentioned video subtitle adjustment method, such as Figure 2 The steps of the method are shown.

[0179] In another embodiment, the electronic device may also be other electronic devices, such as Figure 1 The terminal device 110 shown in FIG. 1 is a terminal device 110 shown in FIG. 1 . In this embodiment, the structure of the electronic device can be as follows: Fig.14 As shown, it includes: a communication component 1410, a memory 1420, a display unit 1430, a camera 1440, a sensor 1450, an audio circuit 1460, a Bluetooth module 1470, a processor 1480 and other components.

[0180] The communication component 1410 is used to communicate with the server. In some embodiments, a circuit WiFi (Wireless Fidelity) module may be included. The WiFi module belongs to a short-range wireless transmission technology. The electronic device can help the user to send and receive information through the WiFi module.

[0181] The memory 1420 can be used to store software programs and data. The processor 1480 executes various functions and data processing of the terminal device 110 by running the software programs or data stored in the memory 1420. The memory 1420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The memory 1420 stores an operating system that enables the terminal device 110 to run. In the present application, the memory 1420 can store an operating system and various application programs, and can also store code for executing the video subtitle adjustment method of the embodiment of the present application.

[0182] The display unit 1430 may also be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the terminal device 110. Specifically, the display unit 1430 may include a display screen 1432 disposed on the front of the terminal device 110. The display screen 1432 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 1430 may be used to display the playback interface in the embodiment of the present application, etc.

[0183] The display unit 1430 can also be used to receive input digital or character information and generate signal input related to user settings and function control of the terminal device 110. Specifically, the display unit 1430 may include a touch screen 1431 arranged on the front of the terminal device 110, which can collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc.

[0184] The touch screen 1431 may be covered on the display screen 1432, or the touch screen 1431 and the display screen 1432 may be integrated to realize the input and output functions of the terminal device 110, and the integrated touch screen may be referred to as a touch display screen. In the present application, the display unit 1430 may display the application and the corresponding operation steps.

[0185] Camera 1440 can be used to capture static images, and users can upload comments on images taken by camera 1440 through a video client. Camera 1440 can be one or more. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the processor 1480 to convert it into a digital image signal.

[0186] The terminal device may further include at least one sensor 1450, such as an acceleration sensor 1451, a distance sensor 1452, a fingerprint sensor 1453, and a temperature sensor 1454. The terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.

[0187] The audio circuit 1460, the speaker 1461, and the microphone 1462 can provide an audio interface between the user and the terminal device 110. The audio circuit 1460 can transmit the electrical signal converted from the received audio data to the speaker 1461, which is converted into a sound signal for output. The terminal device 110 can also be equipped with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 1462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1460 and converted into audio data, and then the audio data is output to the communication component 1410 to be sent to, for example, another terminal device 110, or the audio data is output to the memory 1420 for further processing.

[0188] The Bluetooth module 1470 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 1470 to exchange data.

[0189] The processor 1480 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal device and processes data by running or executing software programs stored in the memory 1420 and calling data stored in the memory 1420. In some embodiments, the processor 1480 may include one or more processing units; the processor 1480 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 1480. In the present application, the processor 1480 can run the operating system, application programs, user interface display and touch response, as well as the video subtitle adjustment method of the embodiment of the present application. In addition, the processor 1480 is coupled to the display unit 1430.

[0190] In some possible implementations, various aspects of the video subtitle adjustment method provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the video subtitle adjustment method according to various exemplary implementations of the present application described above in this specification. For example, the electronic device may execute the following steps: Figure 2 Steps shown.

[0191] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0192] The program product of the embodiment of the present application can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a computing device. However, the program product of the present application is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, device or device.

[0193] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.

[0194] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0195] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user equipment, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0196] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0197] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0198] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0199] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0200] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A video subtitle adjustment method, characterized in that: The method includes: Obtaining a video file corresponding to the video to be processed, and decoding the video file to obtain video picture data and subtitle data corresponding to the video to be processed; Performing image rendering based on the video image data to obtain corresponding rendered video frames in the video to be processed; The screen brightness data corresponding to the playback interface of the video to be processed, the original subtitle parameters in the subtitle data, and the product of the preset dynamic adjustment value are used as adjusted subtitle parameters, and subtitle text is generated based on the adjusted subtitle parameters, wherein the subtitle data and subtitle parameters are at least one of the following combinations: combination one: font color data and font color parameters; combination two: font shadow data and font shadow depth; combination three: font border data and font border width and font border color; The subtitle text and the rendered video frames are synthesized to obtain target video frames corresponding to the video to be processed.

2. The method according to claim 1, characterized in that The method uses the screen brightness data corresponding to the playback interface of the video to be processed, the original subtitle parameter in the subtitle data, and the product of the preset dynamic adjustment value as the adjusted subtitle parameter, and generates subtitle text based on the adjusted subtitle parameter, specifically including: Respectively obtaining, based on the playback interface, each screen brightness data corresponding to the playback interface when playing each rendered video frame in the video to be processed; For each video frame, the screen brightness data corresponding to the video frame, the original subtitle parameters in the subtitle data, and the product of the preset dynamic adjustment value are used as adjusted subtitle parameters, and subtitle text is rendered and generated based on the adjusted subtitle parameters.

3. The method according to claim 2, characterized in that The respectively obtaining, based on the playback interface, each screen brightness data corresponding to the playback interface when playing each rendered video frame in the video to be processed specifically includes: Respectively obtaining respective current screen brightness values ​​corresponding to each rendered video frame played based on the playback interface, and a maximum screen brightness value corresponding to the playback interface; Based on the maximum screen brightness value, each current screen brightness value is normalized to obtain each screen brightness data.

4. The method according to claim 1, characterized in that The synthesizing the subtitle text and each frame of the rendered video to obtain each frame of the target video corresponding to the video to be processed specifically includes: Based on the time identification information of each text segment in the subtitle text, time-aligning each text segment with each rendered video frame; The rendered video frames and the text segments aligned with the rendered video frames are synthesized to obtain target video frames corresponding to the video to be processed.

5. The method according to claim 1, characterized in that The subtitle data includes font color data, and the original subtitle parameters include original font color parameters in the font color data. Then, the screen brightness data corresponding to the playback interface of the video to be processed, the original subtitle parameters in the subtitle data, and the product of the preset dynamic adjustment value are used as adjusted subtitle parameters, and subtitle text is generated based on the adjusted subtitle parameters, including: The product of the screen brightness data, the original font color parameter in the font color data, and the preset dynamic adjustment value is used as the adjusted font color parameter; Based on the adjusted font color parameters, the color of the corresponding subtitle text is rendered and generated.

6. The method according to claim 1, characterized in that The subtitle data includes font border data, and the original subtitle parameters include the original font border width and font border color in the font border data. The screen brightness data corresponding to the playback interface of the video to be processed, the original subtitle parameters in the subtitle data, and the product of the preset dynamic adjustment value are used as adjusted subtitle parameters, and subtitle text is generated based on the adjusted subtitle parameters, including: taking the product of the screen brightness data, the original font border width in the font border data, and the preset dynamic adjustment value as the adjusted font border width; and The product of the screen brightness data, the original font border color in the font border data, and the preset dynamic adjustment value is used as the adjusted font border color; Based on the adjusted font border width and the adjusted font border color, a border of the corresponding subtitle text is rendered and generated.

7. The method according to claim 1, characterized in that The subtitle data includes font shadow data, and the original subtitle parameters include the original font shadow depth in the font shadow data. The screen brightness data corresponding to the playback interface of the video to be processed, the original subtitle parameters in the subtitle data, and the product of the preset dynamic adjustment value are used as adjusted subtitle parameters, and subtitle text is generated based on the adjusted subtitle parameters, including: The product of the screen brightness data, the original font shadow depth in the font shadow data, and the preset dynamic adjustment value is used as the adjusted font shadow depth; Based on the adjusted font shadow depth, a shadow of the corresponding subtitle text is rendered and generated.

8. A video subtitle adjustment device, characterized in that: include: A data acquisition unit, used to acquire a video file corresponding to the video to be processed, and decode the video file to obtain video picture data and subtitle data corresponding to the video to be processed; A first rendering unit, configured to perform image rendering based on the video image data to obtain corresponding rendered video frames in the video to be processed; A second rendering unit is used to use the screen brightness data corresponding to the playback interface of the video to be processed, the original subtitle parameters in the subtitle data, and the product of the preset dynamic adjustment value as the adjusted subtitle parameters, and render and generate subtitle text based on the adjusted subtitle parameters, wherein the subtitle data and subtitle parameters are at least one of the following combinations: combination one: font color data and font color parameters; combination two: font shadow data and font shadow depth; combination three: font border data and font border width and font border color; The synthesis unit is used to synthesize the subtitle text and the rendered video frames to obtain target video frames corresponding to the video to be processed.

9. The device according to claim 8, characterized in that The second rendering unit is specifically used for: Respectively obtaining, based on the playback interface, each screen brightness data corresponding to the playback interface when playing each rendered video frame in the video to be processed; For each video frame, the screen brightness data corresponding to the video frame, the original subtitle parameters in the subtitle data, and the product of the preset dynamic adjustment value are used as adjusted subtitle parameters, and subtitle text is rendered and generated based on the adjusted subtitle parameters.

10. The device according to claim 9, characterized in that The second rendering unit is specifically used for: Respectively obtaining respective current screen brightness values ​​corresponding to each rendered video frame played based on the playback interface, and a maximum screen brightness value corresponding to the playback interface; Based on the maximum screen brightness value, each current screen brightness value is normalized to obtain each screen brightness data.

11. The device according to claim 8, characterized in that The synthesis unit is specifically used for: Based on the time identification information of each text segment in the subtitle text, time-aligning each text segment with each rendered video frame; The rendered video frames and the text segments aligned with the rendered video frames are synthesized to obtain target video frames corresponding to the video to be processed.

12. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of any one of the methods described in claims 1 to 7.

13. A computer-readable storage medium, characterized in that: It includes program code, and when the program code is run on an electronic device, the program code is used to enable the electronic device to execute the steps of any method described in claims 1 to 7.