Subtitle processing method and device

By obtaining user personalized data and device data and using parameter combination to obtain a model to adjust the subtitle style and position, the viewing experience problems caused by single subtitle display and device differences are solved, and personalized and high-quality subtitle display is achieved.

CN120676215APending Publication Date: 2025-09-19BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510747173.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The existing video subtitle display format is fixed and single, which cannot meet the personalized needs of users, and the screen differences of different hardware devices lead to a poor viewing experience.

Method used

By acquiring user personalized data, device data, and video content data, the model is obtained by using a combination of parameters to dynamically adjust the style, position, and display duration of subtitles to adapt to user preferences and device screen specifications.

Benefits of technology

It realizes personalized subtitle display, improves the user viewing experience, adapts to the screen specifications of different hardware devices, and provides better subtitle display effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676215A_ABST
    Figure CN120676215A_ABST
Patent Text Reader

Abstract

The invention provides a subtitle processing method and device. In a scene in which the electronic equipment plays the video, scene parameters of the scene are obtained, and the scene parameters comprise at least one of personalized data of a user watching the video, equipment data of the electronic equipment and content data of content in the video. And according to the parameter combination acquisition model, acquiring a parameter combination of the subtitles suitable for the scene parameters, the parameter combination comprising at least one of the following: the subtitle style, the position of the subtitles in the video playing interface and the continuous display duration of the subtitles. And displaying the subtitles to be displayed on the video playing interface based on the parameter combination. According to the method and the device, the requirement of a user on the personalized watching effect of the subtitles can be met, the personalized watching habits and experience preferences of the user on the subtitles can be met, the method and the device can adapt to the specification of a screen of hardware equipment of a currently played video, and better and more personalized subtitle watching experience is provided for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a subtitle processing method and device. Background Art

[0002] In daily life, users can use video playback apps to watch popular TV series, variety shows, and other videos. When playing videos, video playback apps usually display subtitles on the video playback interface. For example, subtitles such as character dialogue, lyrics, narration, and captions in the video can be displayed to help users more clearly understand the content of the video.

[0003] At present, subtitles in videos are often native subtitles provided by the video producer and pre-embedded in the video.

[0004] However, the inventors have found that the format of native subtitles is usually fixed and single, which is inconvenient for users to view subtitles, and the subtitle viewing experience is poor, and cannot attract audiences well. Summary of the Invention

[0005] This application provides a subtitle processing method and device.

[0006] In a first aspect, the present application provides a subtitle processing method, which is applied to an electronic device. The method includes:

[0007] In a scene in which the electronic device plays a video, obtaining scene parameters of the scene, the scene parameters including at least one of the following: personalized data of a user watching the video, device data of the electronic device, and content data of content in the video;

[0008] Acquire a parameter combination of subtitles suitable for the scene parameters according to a parameter combination acquisition model, wherein the parameter combination includes at least one of the following: a subtitle style, a subtitle position in the video playback interface, and a subtitle continuous display duration;

[0009] The subtitles to be displayed are displayed on the video playback interface based on the parameter combination.

[0010] In a second aspect, the present application provides a subtitle processing device, which is applied to an electronic device. The device includes:

[0011] A first acquisition module is configured to acquire, in a scene in which the electronic device plays a video, scene parameters of the scene, the scene parameters comprising at least one of the following: personalized data of a user viewing the video, device data of the electronic device, and content data of content in the video;

[0012] A second acquisition module is configured to acquire a model based on a parameter combination, and acquire a parameter combination of subtitles applicable to the scene parameters, wherein the parameter combination includes at least one of the following: a subtitle style, a position of the subtitles in the video playback interface, and a continuous display duration of the subtitles;

[0013] The first display module is used to display the subtitles to be displayed on the video playback interface based on the parameter combination.

[0014] In a third aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.

[0015] In a fourth aspect, the present application shows a non-temporary computer-readable storage medium, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method described in any of the above aspects.

[0016] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method as described in any one of the above aspects.

[0017] The technical solution provided by this application may have the following beneficial effects:

[0018] In this application, in a scenario where an electronic device is playing a video, scene parameters of the scene are obtained. The scene parameters include at least one of the following: personalized data of the user viewing the video, device data of the electronic device, and content data of the content in the video. A parameter combination acquisition model is used to obtain a parameter combination for subtitles that is suitable for the scene parameters. The parameter combination includes at least one of the following: subtitle style, subtitle position within the video playback interface, and subtitle display duration. The subtitles to be displayed are displayed on the video playback interface based on the parameter combination.

[0019] Thus, through this application, when watching a video, the display effect of subtitles can be automatically adjusted based on the personalized data of the user watching the video, the device data of the electronic device playing the video, and the content data of the video being played. This can meet the user's demand for personalized viewing effects of subtitles, meet the user's personalized viewing habits and experience preferences for subtitles, and adapt to the screen specifications of the hardware device currently playing the video, providing users with a higher quality and more personalized subtitle viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a flowchart of the steps of a subtitle processing method of the present application.

[0021] Figure 2 This is a structural block diagram of a subtitle processing device of the present application.

[0022] Figure 3 This is a block diagram of an electronic device of the present application.

[0023] Figure 4 This is a block diagram of an electronic device of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0025] Most current video playback applications usually display subtitles in a static, fixed, and single form when playing videos, with a single effect. For example, the font, color, size, and position of the characters in the subtitles are all fixed. The display form of the subtitles is not flexibly customized according to the user's personalized needs, and the user's demand for personalized viewing effects of subtitles cannot be met. The user's personalized viewing habits and experience preferences for subtitles cannot be met, resulting in a poor experience for users viewing subtitles in the video while watching the video.

[0026] In addition, there are a variety of hardware devices on the market for users to watch videos. The screen sizes and resolutions of different hardware devices are different. For example, from mobile phones to large-screen TVs, the screen sizes and resolutions often vary. As a result, a fixed and single subtitle display format often leads to a poor viewing experience for users.

[0027] To this end, in order to meet users' needs for personalized viewing effects of subtitles, meet users' personalized viewing habits and experience preferences for subtitles, and adapt to the screen specifications of the hardware device currently playing the video, and provide users with a better and more personalized subtitle viewing experience, the technical solution of this application is proposed.

[0028] In the technical solution of the present application, in the scenario of watching a video, the display effect of subtitles suitable for the user is automatically and dynamically adjusted based on the personalized data of the user watching the video, the device data of the electronic device playing the video, and the content data of the content of the played video.

[0029] Specifically, refer to Figure 1, shows a flowchart of the steps of a subtitle processing method of the present application. The method can be applied to electronic devices, which may include: mobile phones, tablet computers, laptops, desktop computers, smart TVs and other devices with screens. The method may specifically include the following steps:

[0030] In step S101, in a scene where an electronic device plays a video, scene parameters of the scene are obtained, where the scene parameters include at least one of the following: personalized data of a user watching the video, device data of the electronic device, and content data of content in the video.

[0031] The personalized data includes at least one of the following: the user's preferred subtitle style, the user's preferred subtitle position in the video playback interface, the user's preferred subtitle display duration, the user's subtitle reading speed, and the user's manipulation of the video while watching the video.

[0032] During the video playback process, the subtitles displayed in the video playback interface continue to change as the plot of the video progresses. After one of the subtitles is displayed in the video playback interface, another subtitle will be switched and displayed in the video playback interface as the plot of the video changes... and then other subtitles will be switched and displayed in the video playback interface as the plot of the video changes. The duration of each subtitle displayed in the video playback interface is the continuous display duration of the subtitle. For example, a subtitle is displayed on the video playback interface from 1.3 seconds, and at 2.1 seconds the subtitle is replaced by other subtitles on the video playback interface. In this way, the continuous display time of the subtitle is 0.8 seconds (2.1 seconds - 1.3 seconds).

[0033] The continuous display duration of the user's preferred subtitles can be stored in advance for easy subsequent retrieval. For example, the mapping relationship between the user's user account and the continuous display duration of the user's preferred subtitles is stored in the cloud in advance, so that the continuous display duration of the user's preferred subtitles can be obtained in the cloud based on the user's user account.

[0034] The speed at which users read subtitles can be obtained through user testing in advance.

[0035] For example, in a test scenario, a text is displayed for the user to read. After the user finishes reading the text, he or she inputs an indication of completion of reading into the electronic device. The electronic device can obtain the time when the text starts to be displayed, the time when the indication of completion of reading input by the user is received, calculate the difference between the time when the indication of completion of reading input by the user is received and the time when the text starts to be displayed, and then obtain the number of characters in the text (characters include Chinese characters, English words, numbers, Japanese words, etc.), calculate the ratio between the number and the difference, obtain the ratio corresponding to the text, and use it as the speed at which the user reads subtitles.

[0036] Alternatively, different texts are displayed multiple times for the user to read, and the average of the ratios corresponding to the multiple texts is calculated and used as the user's subtitle reading speed.

[0037] The user's subtitle reading speed can then be stored for subsequent retrieval. For example, a mapping relationship between the user's user account and the user's subtitle reading speed is stored in the cloud, so that the user's subtitle reading speed can be obtained in the cloud based on the user's user account.

[0038] The user's manipulation of the video while watching the video includes: pausing, fast-forwarding, rewinding, slowing down / slowing down the playback, accelerating / speeding up the playback, etc.

[0039] The style of the user-preferred subtitles includes at least one of the following: a font of characters in the user-preferred subtitles, a color of characters in the user-preferred subtitles, a size of characters in the user-preferred subtitles, and a transparency of characters in the user-preferred subtitles.

[0040] The device data includes at least one of the following: the size of the video playback interface on the screen of the electronic device, the resolution of the screen of the electronic device, the brightness of the screen of the electronic device, the volume of the electronic device when playing the video, the distance between the electronic device and the user, and the brightness of the environment where the electronic device is located.

[0041] The distance between the electronic device and the user includes: the distance between the electronic device and the user's face, or the distance between the electronic device and the user's eyes.

[0042] The distance between the electronic device and the user's eyes includes: an average value of the distances between the electronic device and each of the user's two eyes, or a minimum value of the distances between the electronic device and each of the user's two eyes.

[0043] The electronic device can capture an image of the user's head portrait through a front camera, perform image analysis on the image of the user's head portrait, and obtain the distance between the electronic device and the user's eyes. The specific analysis method can refer to the existing method. This application does not limit this and will not describe it in detail.

[0044] Electronic devices can monitor the brightness of their surroundings using light sensors (also called photosensors). For example, in a mobile phone, the light sensor is located within a small aperture at the top front of the phone. This sensor senses the light intensity of the surrounding area, and thus determines the brightness of the surrounding area.

[0045] The device data may also include a tilt angle of the screen of the electronic device, and the tilt angle of the screen of the electronic device may be reflected based on data from a gyroscope in the electronic device.

[0046] The content data includes at least one of the following: the type of content, the degree of picture change of the content, and the number of characters in the subtitles to be displayed in the video.

[0047] Content types include: movie types, TV series types, variety show types, educational video types, sports video types, and short video types, etc.

[0048] The video content is static or dynamically changing (for example, the video is a teaching video where the teacher is lecturing and the teacher's body movements change, but the blackboard and students remain unchanged).

[0049] When the content image is static and does not change, the content image change degree may be 0.

[0050] Alternatively, when the content picture changes dynamically, the degree of change in the content picture can be the amount of change in the content picture. The amount of change can be understood as the ratio between the number of pixels involved in the changed content in the picture and the total number of pixels in the video playback interface.

[0051] During the video playback process, subtitles may be displayed on the video playback interface. The subtitles displayed in the video playback interface will continue to change as the plot of the video progresses. For example, as the plot of the video changes, the next subtitle will be switched and displayed in the video playback interface. The next subtitle that needs to be displayed but has not yet been displayed can be regarded as the subtitle to be displayed, or the subtitles that need to be switched and displayed in sequence can all be regarded as subtitles to be displayed, etc.

[0052] In step S102, a parameter combination acquisition model is obtained based on the parameter combination to obtain a parameter combination of subtitles suitable for the scene parameters, where the parameter combination includes at least one of the following: subtitle style, subtitle position in the video playback interface, and subtitle continuous display duration.

[0053] The style of the subtitles includes at least one of the following: a font of characters in the subtitles, a color of characters in the subtitles, a size of characters in the subtitles, and a transparency of characters in the subtitles.

[0054] In the present application, the scene parameters can be input into the parameter combination acquisition model so that the parameter combination acquisition model processes the scene parameters to obtain a parameter combination of subtitles applicable to the scene parameters, and outputs a parameter combination of subtitles applicable to the scene parameters, so that the electronic device obtains the parameter combination of subtitles applicable to the scene parameters output by the parameter combination acquisition model.

[0055] The parameter combination acquisition model may include a statistical rule-based model or a neural network-based machine learning model, etc.

[0056] The introduction of the parameter combination acquisition model can be found in the subsequent embodiments and will not be described in detail here.

[0057] In step S103, the subtitles to be displayed are displayed on the video playback interface based on the parameter combination.

[0058] In the scenario where subtitles to be displayed are displayed on the video playback interface, the style of the subtitles to be displayed may be the style of the subtitles in the parameter combination, the position of the subtitles to be displayed in the video playback interface may be the position of the subtitles in the parameter combination in the video playback interface, and the continuous display duration of the subtitles to be displayed may be the continuous display duration of the subtitles in the parameter combination.

[0059] In this application, in a scenario where an electronic device is playing a video, scene parameters of the scene are obtained. The scene parameters include at least one of the following: personalized data of the user viewing the video, device data of the electronic device, and content data of the content in the video. A parameter combination acquisition model is used to obtain a parameter combination for subtitles that is suitable for the scene parameters. The parameter combination includes at least one of the following: subtitle style, subtitle position within the video playback interface, and subtitle display duration. The subtitles to be displayed are displayed on the video playback interface based on the parameter combination.

[0060] Thus, through this application, when watching a video, the display effect of subtitles can be automatically adjusted based on the personalized data of the user watching the video, the device data of the electronic device playing the video, and the content data of the video being played. This can meet the user's demand for personalized viewing effects of subtitles, meet the user's personalized viewing habits and experience preferences for subtitles, and adapt to the screen specifications of the hardware device currently playing the video, providing users with a higher quality and more personalized subtitle viewing experience.

[0061] In one example, if a user is watching a video on a mobile phone, the size of the characters in the subtitles displayed on the video playback interface can be automatically optimized. For example, the subtitles can occupy 50-80% of the width of the video playback interface to ensure that the size of the subtitles is not too large. The subtitles can be located in the area below the video playback interface (the lower 10% area). In this way, the subtitles can be clearly displayed and the subtitles can be avoided from blocking the picture. For example, the subtitles can be avoided from blocking key pictures (such as faces or the main body of the picture), etc., to ensure the best viewing experience. When the brightness of the video picture is high, the color of the characters in the subtitles can be optimized to dark colors. When the brightness of the video picture is low, the color of the characters in the subtitles can be optimized to light colors.

[0062] In another example, if a user watches a video on a large-screen device (such as a large-screen TV), the size of the characters in the subtitles displayed on the video playback interface can be automatically optimized, for example, so that the subtitles occupy 30-50% of the width of the video playback interface, the size of the characters is larger, ensuring that the subtitles displayed on the large-screen device are not too small, the edges of the characters in the subtitles can have a slight shadow or stroke (border) effect, for example, white characters with a black border, to enhance the contrast, improve the anti-aliasing effect of the characters, and improve the visual clarity of the subtitles. The transparency of the characters in the subtitles is adjusted according to the user's viewing habits, so that the subtitles displayed on the large-screen device are not abrupt.

[0063] In another example, the font of the characters in the subtitles may be a sans-serif font (such as Arial font), etc., which is easy to read.

[0064] In another example, a visual algorithm adjusts the position of subtitles in the video playback interface to a more uniformly colored area based on the complexity of the video playback interface (e.g., a high-contrast image) to clearly display the subtitles. This ensures that the characters in the subtitles displayed on the video playback interface are clear and easy to read, with strong visibility, without affecting the user's viewing experience. For example, the subtitles have a significant color difference from the surrounding video content, making it easier to read the subtitles and ensuring comfort during long-term viewing, thereby avoiding visual fatigue.

[0065] In addition, the duration of subtitle display is automatically adjusted according to the number of characters in the subtitle and the speed at which the user reads the subtitle, for example, to 0.5 seconds, 0.6 seconds, or 0.7 seconds.

[0066] In one embodiment of the present application, the parameter combination acquisition model includes: a data input layer, a feature extraction layer, a feature fusion layer and a decision output layer.

[0067] The input end of the parameter combination acquisition model includes the input end of the data input layer.

[0068] The output of the data input layer is connected to the input of the feature extraction layer.

[0069] The output of the feature extraction layer is connected to the input of the feature fusion layer.

[0070] The output of the feature fusion layer is connected to the input of the decision output layer.

[0071] The output end of the parameter combination acquisition model includes the output end of the decision output layer.

[0072] The input end of the data input layer is used to input scene parameters, for example, to input at least one of personalized data of a user watching a video, device data of an electronic device, and content data of content in the video.

[0073] The output end of the decision output layer is used to output a parameter combination of subtitles applicable to the scene parameters.

[0074] The data input layer is used to obtain a first initial vector of personalized data, a second initial vector of device data, and a third initial vector of content data, and input the first initial vector, the second initial vector, and the third initial vector into the feature extraction layer.

[0075] For example, the data input layer has an embedding layer.

[0076] An embedding layer can be used to convert personalized data (discrete data) into a vector and used as the first initial vector of the personalized data.

[0077] An embedding layer can be used to convert device data (discrete data) into a vector and serve as the second initial vector of the device data.

[0078] Secondly, the data input layer can also have a text embedding layer or encoding layer (such as Transformer, etc.

[0079] Transformer is a deep learning model based on the self-attention mechanism. The core feature of the Transformer model is to capture the dependencies between different positions in the input sequence through the self-attention mechanism, so as to better understand the contextual information of the text.

[0080] The Transformer primarily consists of an encoder and a decoder, each of which contains multiple layers. The encoder's primary function is to map the input sequence into a continuous representation, while the decoder generates an output sequence based on this representation. Each encoder and decoder layer includes a self-attention mechanism and a fully connected feedforward network.

[0081] Text embedding layers include: BERT (Bidirectional Encoder Representations from Transformers) and GPT (Generative Pre-trained Transformer).

[0082] The content data may be encoded using an encoding layer or a text embedding layer to obtain a vector, which is used as the third initial vector of the content data.

[0083] In the present application, the dimensions of the first initial vector, the second initial vector, and the third initial vector are all the same.

[0084] The feature extraction layer is used to obtain a first feature vector of personalized data based on the first initial vector, obtain a second feature vector of device data based on the second initial vector, and obtain a third feature vector of content data based on the third initial vector, and input the first feature vector, the second feature vector and the third feature vector into the feature fusion layer.

[0085] In the present application, the dimensions of the first eigenvector, the second eigenvector, and the third eigenvector are all the same.

[0086] For example, the feature extraction layer includes a GRU (Gated Recurrent Unit) or an LSTM (Long Short-Term Memory), and the first initial vector can be input into the GRU or LSTM so that the GRU or LSTM processes the first initial vector into a first feature vector of personalized data, where the first feature vector includes high-level features of the personalized data.

[0087] For another example, if the feature extraction layer includes a fully connected layer, the second initial vector can be input into the fully connected layer so that the fully connected layer processes the second initial vector. For example, the fully connected layer performs a nonlinear transformation on the second initial vector to obtain a second feature vector of the device data, and the second feature vector includes high-level features of the device data.

[0088] For another example, if the feature extraction layer includes a Transformer or a CNN (Convolutional Neural Networks), the third initial vector can be input into the Transformer or the CNN so that the Transformer or the CNN processes the third initial vector to obtain a third feature vector of the content data, where the third feature vector includes high-level features of the content data.

[0089] The feature fusion layer is used to obtain a first attention feature vector between personalized data and device data based on the first feature vector and the second feature vector, obtain a second attention feature vector between personalized data and content data based on the first feature vector and the third feature vector, and obtain a third attention feature vector between device data and content data based on the second feature vector and the third feature vector. The first attention feature vector, the second attention feature vector, and the third attention feature vector are input into the decision output layer, or the first attention feature vector, the second attention feature vector, and the third attention feature vector are fused (fusion may include splicing, for example, splicing the first attention feature vector, the second attention feature vector, and the third attention feature vector end to end in sequence (for example, Concat, etc.), or fusion may include pooling, for example, averaging the first attention feature vector, the second attention feature vector, and the third attention feature vector) to obtain a fused feature vector, which is then input into the decision output layer.

[0090] In the present application, the dimensions of the first attention feature vector, the second attention feature vector, and the third attention feature vector are all the same.

[0091] In this application, a multi-modal attention mechanism can be used to obtain a first attention feature vector between personalized data and device data based on the first feature vector and the second feature vector, obtain a second attention feature vector between personalized data and content data based on the first feature vector and the third feature vector, and obtain a third attention feature vector between device data and content data based on the second feature vector and the third feature vector.

[0092] For example, the first attention feature vector between the personalized data and the device data can be obtained according to the first feature vector and the second feature vector according to the following formula:

[0093] Attention 12 =softmax(U*D T / α)*D.

[0094] Among them, Attention 12 is the first attention feature vector, U is the first feature vector, D is the second feature vector, and D T is the transpose of D, and α is a preset constant. The specific value of α can be determined according to actual conditions and is not limited in this application.

[0095] For another example, the second attention feature vector between the personalized data and the device data can be obtained based on the first feature vector and the third feature vector according to the following formula:

[0096] Attention 13 =softmax(U*C T / α)*C.

[0097] Among them, Attention 13 is the second attention eigenvector, U is the first eigenvector, C is the third eigenvector, C T is the transpose of C, and α is a preset constant. The specific value of α can be determined according to actual conditions and is not limited in this application.

[0098] For another example, the third attention feature vector between the personalized data and the device data can be obtained based on the second feature vector and the third feature vector according to the following formula:

[0099] Attention 13 =softmax(D*C T / α)*C.

[0100] Among them, Attention 23 is the third attention eigenvector, D is the second eigenvector, C is the third eigenvector, C T is the transpose of C, and α is a preset constant. The specific value of α can be determined according to actual conditions and is not limited in this application.

[0101] The decision output layer is used to obtain a parameter combination of subtitles applicable to the scene parameters based on the first attention feature vector, the second attention feature vector, and the third attention feature vector.

[0102] Among them, the decision output layer obtains the parameter combination of subtitles suitable for scene parameters based on the first attention feature vector, the second attention feature vector, and the third attention feature vector, which can be understood as:

[0103] In one example, the decision output layer obtains the first attention feature vector, the second attention feature vector, and the third attention feature vector input to it by the feature fusion layer. In this way, the decision output layer can fuse the first attention feature vector, the second attention feature vector, and the third attention feature vector to obtain a fused feature vector, and obtain a parameter combination of subtitles suitable for the scene parameters based on the fused feature vector.

[0104] Alternatively, the decision output layer obtains the fused feature vector inputted by the feature fusion layer, so that the decision output layer can obtain a parameter combination of the subtitles suitable for the scene parameters according to the fused feature vector.

[0105] The decision output layer has a fully connected layer.

[0106] In one embodiment, the fully connected layer has two layers. The first layer is used to extract high-dimensional features of the fused feature vector to obtain a high-dimensional feature vector. The second layer is used to obtain a parameter combination of subtitles suitable for scene parameters based on the high-dimensional feature vector.

[0107] For example, the first layer is h1=ReLU(W1*Fglobal+b1).

[0108] The second layer is h2=ReLU(W2*h1+b2).

[0109] Fglobal is the fused feature vector, h1 is the high-dimensional feature vector, and h2 is the subtitle parameter combination applicable to the scene parameters.

[0110] It can be seen that the formula of each layer in the fully connected layer is: h = ReLU (Wx + b).

[0111] h is the output feature vector.

[0112] W is the weight matrix (Weights), which is used to map the input feature vector to the new feature space.

[0113] For example, if the dimension of the input feature vector is n, and the dimension of the output feature vector is m, then the size of W is m*n.

[0114] The weight matrix determines how the input feature vectors are linearly combined in the new feature space to extract new feature vectors.

[0115] The dimension of the input feature vector is n.

[0116] The input feature vector of the first layer is the feature vector passed from the feature fusion layer, such as the fused feature vector.

[0117] b is the bias vector (Bias).

[0118] The dimension of the bias vector is m (the same as the dimension of the output feature vector).

[0119] The bias vector is used to introduce a non-zero intercept term to help the model fit the data better, especially when the input eigenvector is zero, the bias term ensures that the output eigenvector is not zero.

[0120] ReLU is the activation function (Rectified Linear Unit).

[0121] ReLU(z)=max(0,z).

[0122] ReLU is used to introduce nonlinear characteristics, enabling the model to learn more complex mapping relationships rather than just linear combinations.

[0123] The second layer has the function of multi-task learning, for example, it has multiple branches, and different branches are used to obtain different parameters in the parameter combination.

[0124] For example, branch 1 in the second layer is used to obtain the position of the subtitles in the video playback interface, branch 2 in the second layer is used to obtain the continuous display duration of the subtitles, branch 3 in the second layer is used to obtain the font of the characters in the subtitles, branch 4 in the second layer is used to obtain the color of the characters in the subtitles, branch 5 in the second layer is used to obtain the size of the characters in the subtitles, and branch 6 in the second layer is used to obtain the transparency of the characters in the subtitles.

[0125] In this way, when obtaining a model based on a parameter combination and obtaining a parameter combination of subtitles applicable to scene parameters, the first initial vector of personalized data, the second initial vector of device data, and the third initial vector of content data can be obtained based on the data input layer. The first feature vector of personalized data is obtained based on the feature extraction layer according to the first initial vector, the second feature vector of device data is obtained based on the second initial vector, and the third feature vector of content data is obtained based on the third initial vector. The first attention feature vector between personalized data and device data is obtained based on the first feature vector and the second feature vector, the second attention feature vector between personalized data and content data is obtained based on the first feature vector and the third feature vector, and the third attention feature vector between device data and content data is obtained based on the second feature vector and the third feature vector. The decision output layer is used to obtain a parameter combination of subtitles applicable to scene parameters based on the first attention feature vector, the second attention feature vector, and the third attention feature vector.

[0126] In another embodiment of the present application, after the subtitles to be displayed are displayed on the video playback interface based on the parameter combination, if the user believes that at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles does not meet the user's needs, the user is supported to manually temporarily adjust at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles, so that the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles meet the user's needs.

[0127] For example, the user may input an adjustment operation on at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles.

[0128] The electronic device may receive a user input for adjusting at least one of the style of displayed subtitles, the position of the displayed subtitles in a video playback interface, and the duration of the continuous display of the displayed subtitles. Based on the adjustment operation, the electronic device may adjust at least one of the style of displayed subtitles, the position of the displayed subtitles in the video playback interface, and the duration of the continuous display of the displayed subtitles so that the style of displayed subtitles, the position of displayed subtitles in the video playback interface, and the duration of the continuous display of the displayed subtitles meet the user's needs.

[0129] The style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles all fall within the scope of the user's personalized data. Therefore, after the user adjusts at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles, the adjusted data of at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles can be recorded to update the user's personalized data.

[0130] For example, the user account of the user logged in on the electronic device can be obtained, and the adjusted data of at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles can be uploaded to the cloud. In addition, the user account of the user can be uploaded to the cloud so that the cloud updates the user's personalized data stored in the cloud in advance according to the user's user account and the adjusted data. For example, the cloud can search for the user's personalized data stored in the cloud in advance according to the user's user account, and then use the adjusted data to update the same type of data in the user's personalized data stored in the cloud in advance.

[0131] The cloud may be a cloud corresponding to the electronic device, or the cloud may be a cloud corresponding to a video playback application on the electronic device for playing videos, etc.

[0132] In another embodiment, if the user adjusts at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles, it means that at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles in the parameter combination of subtitles obtained for the user by the parameter combination acquisition model is inaccurate.

[0133] To this end, in order to improve the accuracy of at least one of the style of displayed subtitles, the position of displayed subtitles in the video playback interface, and the continuous display duration of displayed subtitles in the parameter combination of subtitles obtained by the parameter combination acquisition model for the user, in another embodiment of the present application, the parameter combination acquisition model is updated based on the adjusted data of at least one of the style of displayed subtitles, the position of displayed subtitles in the video playback interface, and the continuous display duration of displayed subtitles.

[0134] For example, the adjusted data of at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles are used as the annotation data, and the parameter combination of the subtitles suitable for the scene parameters obtained by the parameter combination acquisition model in step S102 is used as the sample data, and the loss function is called to use the gradient descent algorithm to optimize and update the parameter combination acquisition model, for example, to update the parameters in the parameter combination acquisition model.

[0135] In this embodiment, different users may correspond to different parameter combination acquisition models, so that the parameter combination acquisition model corresponding to the user can serve the user specifically, thereby improving the accuracy of the parameter combination acquisition model corresponding to the user in acquiring the parameter combination suitable for the user.

[0136] In another embodiment of the present application, the present application supports users to customize their personalized data.

[0137] For example, a user may submit a request for customizing personalized data to the electronic device. The electronic device may display a personalized data setting interface based on the request for customizing personalized data. The user may enter the personalized data in the personalized data setting interface.

[0138] The electronic device can obtain the user's personalized data entered by the user in the personalized data setting interface, and obtain the user account of the user logged in to the electronic device, and then upload the user's personalized data and the user's user account to the cloud, so that the cloud can store the user's personalized data in the cloud according to the user's user account, for example, storing the mapping relationship between the user's user account and the user's personalized data in the cloud.

[0139] Among them, different users have different user accounts.

[0140] The user's user account can be registered through the video playback application or through the cloud, etc.

[0141] In this way, when obtaining the user's personalized data in the scene parameters of the scene, the user account of the user logged in on the electronic device can be obtained, and then, in the cloud corresponding to the electronic device, the user's personalized data stored in advance can be obtained based on the user account.

[0142] For example, the electronic device uploads a request to obtain personalized data to the cloud, and the request to obtain personalized data carries the user's user account. After receiving the request to obtain personalized data, the cloud can search for the user's personalized data in the cloud based on the user's user account, for example, searching for a mapping relationship with the user's user account, which is a mapping relationship between the user's user account and the user's personalized data, and then obtain the user's personalized data in the mapping relationship, and return the user's personalized data to the electronic device. The electronic device receives the user's personalized data returned by the cloud.

[0143] By storing the user's personalized data in the cloud, when the user switches to use other devices to watch videos, the other devices can also automatically obtain the user's personalized data through the cloud, without the user having to manually reset the user's personalized data on other devices, simplifying user operations.

[0144] It should be noted that for the method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions involved are not necessarily required by this application.

[0145] Reference Figure 2 , shows a structural block diagram of a subtitle processing device of the present application, which is applied to electronic equipment, and the device includes:

[0146] A first acquisition module 11 is configured to acquire scene parameters of a scene in which the electronic device plays a video, wherein the scene parameters include at least one of the following: personalized data of a user watching the video, device data of the electronic device, and content data of content in the video;

[0147] A second acquisition module 12 is configured to acquire a model based on a parameter combination, and acquire a parameter combination of subtitles suitable for the scene parameters, wherein the parameter combination includes at least one of the following: a subtitle style, a subtitle position in the video playback interface, and a subtitle continuous display duration;

[0148] The first display module 13 is configured to display the subtitles to be displayed on the video playback interface based on the parameter combination.

[0149] In an optional implementation, the personalized data includes at least one of the following: the style of subtitles preferred by the user, the position of the subtitles preferred by the user in the video playback interface, the continuous display duration of the subtitles preferred by the user, the speed at which the user reads subtitles, and the user's manipulation of the video while watching the video.

[0150] In an optional implementation, the style of the user-preferred subtitles includes at least one of the following: the font of the characters in the user-preferred subtitles, the color of the characters in the user-preferred subtitles, the size of the characters in the user-preferred subtitles, and the transparency of the characters in the user-preferred subtitles.

[0151] In an optional implementation, the device data includes at least one of the following: the size of the video playback interface on the screen of the electronic device, the resolution of the screen of the electronic device, the brightness of the screen of the electronic device, the volume of the electronic device when playing the video, the distance between the electronic device and the user, and the brightness of the environment where the electronic device is located.

[0152] In an optional implementation, the content data includes at least one of the following: the type of the content, the number of characters in the subtitles to be displayed in the video, and the degree of picture change of the content.

[0153] In an optional implementation, the style of the subtitles includes at least one of the following: font of characters in the subtitles, color of characters in the subtitles, size of characters in the subtitles, and transparency of characters in the subtitles.

[0154] In an optional implementation, the parameter combination acquisition model includes: a data input layer, a feature extraction layer, a feature fusion layer, and a decision output layer;

[0155] The second acquisition module includes:

[0156] a first acquiring unit, configured to acquire, based on a data input layer, a first initial vector of the personalized data, a second initial vector of the device data, and a third initial vector of the content data;

[0157] a second acquiring unit, configured to acquire, based on a feature extraction layer, a first feature vector of the personalized data according to the first initial vector, acquire a second feature vector of the device data according to the second initial vector, and acquire a third feature vector of the content data according to the third initial vector;

[0158] a third acquiring unit, configured to acquire, based on the feature fusion layer, a first attention feature vector between the personalized data and the device data according to the first feature vector and the second feature vector, acquire a second attention feature vector between the personalized data and the content data according to the first feature vector and the third feature vector, and acquire a third attention feature vector between the device data and the content data according to the second feature vector and the third feature vector;

[0159] The fourth acquisition unit is used to acquire a parameter combination of subtitles applicable to the scene parameters based on the first attention feature vector, the second attention feature vector and the third attention feature vector based on the decision output layer.

[0160] In an optional implementation, the apparatus further includes:

[0161] a receiving module, configured to receive an adjustment operation inputted by the user on at least one of the style of displayed subtitles, the position of displayed subtitles in the video playback interface, and the continuous display duration of displayed subtitles;

[0162] The adjustment module is used to adjust at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles according to the adjustment operation.

[0163] In an optional implementation, the apparatus further includes:

[0164] A third acquisition module is used to obtain the user account of the user logged in on the electronic device;

[0165] The first uploading module is used to upload adjusted data of at least one of the style of displayed subtitles, the position of displayed subtitles in the video playback interface, and the continuous display duration of displayed subtitles to the cloud, and to upload the user account of the user to the cloud, so that the cloud updates the personalized data of the user pre-stored in the cloud according to the user account and the adjusted data.

[0166] In an optional implementation, the apparatus further includes:

[0167] An updating module is used to update the parameter combination acquisition model according to adjusted data of at least one of the style of displayed subtitles, the position of displayed subtitles in the video playback interface, and the continuous display duration of displayed subtitles.

[0168] In an optional implementation, the first acquisition module includes:

[0169] a fifth acquiring unit, configured to acquire a user account of the user logged in on the electronic device;

[0170] The sixth acquisition unit is configured to acquire, in the cloud corresponding to the electronic device, the personalized data of the user that is stored in advance according to the user account.

[0171] In an optional implementation, the apparatus further includes:

[0172] The second display module is used to display the personalized data setting interface;

[0173] a fourth acquisition module, configured to acquire the personalized data of the user inputted by the user in the personalized data setting interface;

[0174] a fifth acquisition module, configured to acquire a user account of the user logged in on the electronic device;

[0175] The second uploading module is used to upload the personalized data of the user and the user account of the user to the cloud, so that the cloud stores the personalized data of the user in the cloud according to the user account of the user.

[0176] In this application, in a scenario where an electronic device is playing a video, scene parameters of the scene are obtained. The scene parameters include at least one of the following: personalized data of the user viewing the video, device data of the electronic device, and content data of the content in the video. A parameter combination acquisition model is used to obtain a parameter combination for subtitles that is suitable for the scene parameters. The parameter combination includes at least one of the following: subtitle style, subtitle position within the video playback interface, and subtitle display duration. The subtitles to be displayed are displayed on the video playback interface based on the parameter combination.

[0177] Thus, through this application, when watching a video, the display effect of subtitles can be automatically adjusted based on the personalized data of the user watching the video, the device data of the electronic device playing the video, and the content data of the video being played. This can meet the user's demand for personalized viewing effects of subtitles, meet the user's personalized viewing habits and experience preferences for subtitles, and adapt to the screen specifications of the hardware device currently playing the video, providing users with a higher quality and more personalized subtitle viewing experience.

[0178] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0179] Optionally, an embodiment of the present application also provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and runnable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0180] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the various processes of the above-described method embodiments are implemented and the same technical effects are achieved. To avoid repetition, the details are not described here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0181] Figure 3 8 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0182] Reference Figure 3 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0183] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.

[0184] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0185] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0186] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0187] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0188] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0189] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect changes in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and temperature changes of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0190] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0191] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0192] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0193] Figure 4 1 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 can be provided as a server.

[0194] Reference Figure 4 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.

[0195] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

[0196] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0197] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0198] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

[0199] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0200] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0201] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0202] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0203] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0204] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0205] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A subtitle processing method, characterized in that: Applied to electronic equipment, the method includes: In a scene in which the electronic device plays a video, obtaining scene parameters of the scene, the scene parameters including at least one of the following: personalized data of a user watching the video, device data of the electronic device, and content data of content in the video; Acquire a parameter combination of subtitles suitable for the scene parameters according to a parameter combination acquisition model, wherein the parameter combination includes at least one of the following: a subtitle style, a subtitle position in the video playback interface, and a subtitle continuous display duration; The subtitles to be displayed are displayed on the video playback interface based on the parameter combination.

2. The method according to claim 1, characterized in that The personalized data includes at least one of the following: the style of subtitles preferred by the user, the position of the subtitles preferred by the user in the video playback interface, the continuous display duration of the subtitles preferred by the user, the speed at which the user reads subtitles, and the user's manipulation of the video while watching the video.

3. The method according to claim 2, characterized in that The style of the user-preferred subtitles includes at least one of the following: a font of characters in the user-preferred subtitles, a color of characters in the user-preferred subtitles, a size of characters in the user-preferred subtitles, and a transparency of characters in the user-preferred subtitles.

4. The method according to claim 1, wherein The device data includes at least one of the following: the size of the video playback interface on the screen of the electronic device, the resolution of the screen of the electronic device, the brightness of the screen of the electronic device, the volume of the electronic device when playing the video, the distance between the electronic device and the user, and the brightness of the environment where the electronic device is located.

5. The method according to claim 1, wherein The content data includes at least one of the following: the type of the content, the number of characters in the subtitles to be displayed in the video, and the degree of picture change of the content.

6. The method according to claim 1, characterized in that The style of the subtitle includes at least one of the following: a font of characters in the subtitle, a color of characters in the subtitle, a size of characters in the subtitle, and a transparency of characters in the subtitle.

7. The method according to claim 1, characterized in that The parameter combination acquisition model includes: a data input layer, a feature extraction layer, a feature fusion layer and a decision output layer; The step of acquiring a model according to a parameter combination to acquire a parameter combination of subtitles suitable for the scene parameters includes: Acquire a first initial vector of the personalized data, acquire a second initial vector of the device data, and acquire a third initial vector of the content data based on a data input layer; Obtaining, based on a feature extraction layer, a first feature vector of the personalized data according to the first initial vector, obtaining a second feature vector of the device data according to the second initial vector, and obtaining a third feature vector of the content data according to the third initial vector; Based on the feature fusion layer, a first attention feature vector between the personalized data and the device data is obtained according to the first feature vector and the second feature vector, a second attention feature vector between the personalized data and the content data is obtained according to the first feature vector and the third feature vector, and a third attention feature vector between the device data and the content data is obtained according to the second feature vector and the third feature vector. The decision output layer is used to obtain a parameter combination of subtitles suitable for the scene parameters according to the first attention feature vector, the second attention feature vector and the third attention feature vector.

8. The method according to claim 1, characterized in that After displaying the subtitles to be displayed on the video playback interface based on the parameter combination, the method further includes: receiving an adjustment operation inputted by the user on at least one of a style of displayed subtitles, a position of displayed subtitles in the video playback interface, and a continuous display duration of displayed subtitles; According to the adjustment operation, at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles is adjusted.

9. The method according to claim 8, characterized in that The method further comprises: Obtaining a user account of the user logged in on the electronic device; Uploading to the cloud the adjusted data of at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles, and uploading to the cloud the user account of the user, so that the cloud updates the personalized data of the user pre-stored in the cloud according to the user account of the user and the adjusted data.

10. The method according to claim 8, characterized in that The method further comprises: The parameter combination acquisition model is updated according to the adjusted data of at least one of the style of the displayed subtitles, the position of the displayed subtitles in the video playback interface, and the continuous display duration of the displayed subtitles.

11. The method according to claim 1, wherein Acquiring the personalized data of the user in the scene parameters of the scene includes: Obtaining a user account of the user logged in on the electronic device; In the cloud corresponding to the electronic device, the personalized data of the user stored in advance is obtained according to the user account.

12. The method according to claim 11, characterized in that The method further comprises: Display the personalized data setting interface; Acquire the personalized data of the user entered by the user in the personalized data setting interface; Obtaining a user account of the user logged in on the electronic device; The personalized data of the user and the user account of the user are uploaded to the cloud, so that the cloud stores the personalized data of the user in the cloud according to the user account of the user.

13. A subtitle processing device, characterized in that: Applied to electronic equipment, the device comprises: A first acquisition module is configured to acquire, in a scene in which the electronic device plays a video, scene parameters of the scene, the scene parameters comprising at least one of the following: personalized data of a user viewing the video, device data of the electronic device, and content data of content in the video; A second acquisition module is configured to acquire a model based on a parameter combination, and acquire a parameter combination of subtitles applicable to the scene parameters, wherein the parameter combination includes at least one of the following: a subtitle style, a position of the subtitles in the video playback interface, and a continuous display duration of the subtitles; The first display module is used to display the subtitles to be displayed on the video playback interface based on the parameter combination.

14. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 12 when executed by the processor.

15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which implements the method according to any one of claims 1 to 12 when executed by a processor.

Citation Information

Cited By

  • Intelligent subtitle generation method and system based on scene perception

    CN120881222A