Text display method and apparatus, and electronic device and storage medium

By obtaining and rendering the target text in the video editing software and aligning it with the target text, the problem that users cannot quickly determine the text rendering results is solved, and the interactive capabilities and user experience of the video editing software are improved.

WO2025112968A1PCT designated stage expired Publication Date: 2025-06-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/125898
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-27
Filing Date
2024-10-18
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

In video editing software, users cannot quickly determine whether the current text rendering result meets their editing intentions, because users can only view the rendering result where text needs to be added.

Method used

Provides a text display method, by obtaining multi-frame video images, obtaining and displaying target text, rendering, and aligning the rendering results with the target text, displaying them in a specified editing position.

Benefits of technology

This method enables users to intuitively view the rendering results of the target text and quickly determine whether the editing intention is met, thereby enhancing the interactive capabilities and user experience of the video editing software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024125898_05062025_PF_FP_ABST
    Figure CN2024125898_05062025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computer vision. Disclosed are a text display method and apparatus, and an electronic device and a storage medium. The text display method provided in the present disclosure comprises: acquiring a plurality of video image frames, wherein the plurality of video image frames include a target video image frame to be subjected to text editing; acquiring a target text from a specified editing position of said target video image frame, and displaying the target text at the specified editing position; rendering the target text, so as to obtain a rendering result; and aligning the rendering result with the target text, and displaying the aligned rendering result at the specified editing position.
Need to check novelty before this filing date? Find Prior Art

Description

Text display method, device, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed on November 27, 2023, with application number 202311596000.8 and invention name “Text display method, device, electronic device and storage medium”. The entire contents of that application are incorporated by reference into this application. Technical Field

[0003] The present disclosure relates to the field of computer vision technology, and in particular to a text display method, device, electronic device, and storage medium. Background Art

[0004] As video editing becomes increasingly diverse and sophisticated, adding text to videos has become a common feature in video editing software. However, in practice, users can only view the rendered text at the location where they want to add it, making it difficult to quickly determine whether the current rendering meets their text editing requirements.

[0005] Summary of the Invention

[0006] In view of this, the present disclosure provides a text display method, device, electronic device and storage medium.

[0007] In a first aspect, the present disclosure provides a text display method, comprising:

[0008] Acquire multiple frames of video images, wherein the multiple frames of video images include a target frame of video image to be subjected to text editing;

[0009] Obtain the target text from the designated editing position of the target frame video image, and display the target text at the designated editing position;

[0010] Render the target text and get the rendering result;

[0011] Align the rendering result with the target text and display the aligned rendering result at the specified editing position.

[0012] In a second aspect, the present disclosure provides a text display device, comprising:

[0013] An acquisition module, configured to acquire multiple frames of video images, wherein the multiple frames of video images include a target frame of video images to be subjected to text editing;

[0014] A first execution module is used to obtain a target text from a designated editing position of a target frame video image and display the target text at the designated editing position;

[0015] The rendering module is used to render the target text and obtain the rendering result;

[0016] The second execution module is used to align the rendering result with the target text and display the aligned rendering result at the designated editing position.

[0017] In a third aspect, the present disclosure provides an electronic device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the text display method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0018] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the text display method of the first aspect or any corresponding embodiment thereof.

[0019] The text display method provided by the embodiment of the present disclosure, after determining the target frame video image to be edited from multiple frames of video images, obtains and displays the target text at the designated editing position where text editing is required in the target frame video image, and then renders the target text to obtain a rendering result. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] FIG1 is a schematic diagram of text editing input in the prior art;

[0022] FIG2 is a schematic diagram of a rendering effect result of the prior art;

[0023] FIG3 is a flow chart of a text display method according to an embodiment of the present disclosure;

[0024] FIG4 is a schematic diagram of text editing input according to an embodiment of the present disclosure;

[0025] FIG5 is a schematic diagram showing a target text according to an embodiment of the present disclosure;

[0026] FIG6 is a schematic diagram of a rendering effect according to an embodiment of the present disclosure;

[0027] FIG7 is a flow chart of another text display method according to an embodiment of the present disclosure;

[0028] FIG. 8 is a schematic flowchart of another text display method according to an embodiment of the present disclosure;

[0029] FIG. 9 is a schematic diagram of another rendering effect according to an embodiment of the present disclosure;

[0030] FIG. 10 is a schematic diagram of the engine position relationship according to an embodiment of the present disclosure;

[0031] FIG. 11 is a schematic diagram of the component framework of a video editing software according to an embodiment of the present disclosure;

[0032] FIG. 12 is a structural block diagram of a text display device according to an embodiment of the present disclosure;

[0033] FIG. 13 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure. Detailed Embodiments

[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.

[0035] As shown in FIG. 1, in practical applications, when a user needs to add text to the current video, it is necessary to first determine the text addition position (the virtual box in the video content) in the current frame of the video where the text needs to be added, and then input the text to be input in the input box provided by the keyboard. When the input of the text to be input is completed, the rendering result of the text to be input is displayed at the text addition position. For example: As shown in FIG. 2, taking the text to be input as "#Check-in" as an example, when the input of "#Check-in" in the input box provided by the keyboard is completed, the rendering result corresponding to "#Check-in" is displayed at the text addition position.

[0036] Since the input position of the text to be input and the display position of the rendering result are provided by different controls, and there are also significant differences in the display positions, therefore, using this method for text editing is not conducive to the user quickly determining whether the current rendering result meets the user's text editing intention.

[0037] Based on this, the embodiments of the present disclosure provide a text display method, which enables the user to directly view the rendering result of the target text after rendering at the specified position of the input target text, so that the user can quickly determine whether the aligned rendering result displayed at the specified editing position meets their own needs, thereby helping to enhance the interaction ability of the video editing software for text editing and making the method of displaying the rendering result of the target text more intuitive and friendly.

[0038] According to an embodiment of the present disclosure, an embodiment of a text display method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0039] In this embodiment, a text display method is provided, which can be used in the above-mentioned electronic devices, such as computers, mobile terminals, etc. FIG3 is a flow chart of the text display method according to an embodiment of the present disclosure. As shown in FIG3 , the flow chart includes the following steps:

[0040] Step S301: Acquire multiple frames of video images.

[0041] The multiple video frames include target video frames to be edited. The multiple video frames may be all video frames constituting a video, or may be partial video frames captured according to user needs.

[0042] The multi-frame video images represent a scene recorded in real time using a video camera (e.g., a video camera, smartphone, or surveillance camera). This video can be obtained from a local database or downloaded from a cloud database. There are no restrictions on how the video is obtained for recognition; you can configure it based on your specific needs.

[0043] Step S302 : acquiring target text from a designated editing position of a target frame video image, and displaying the target text at the designated editing position.

[0044] The designated editing position can be understood as a position where text editing is allowed, and the designated editing position can be a user-specified position or a preset default position. The target text can be understood as the text that the user needs to add to the target frame video image.

[0045] When the target text is obtained at the designated editing position on the target frame video image, it indicates that the user has entered the target text at the designated editing position. Therefore, in order to facilitate the user to clearly understand the content currently entered at the designated editing position, the target text is displayed at the designated editing position so that the user can intuitively view the currently entered target text, so that when the target text is entered incorrectly, it can be adjusted in time to obtain the correct target text.

[0046] Step S303: Render the target text to obtain a rendering result.

[0047] To make the target text more aesthetically pleasing, the currently acquired target text is rendered to produce a rendering result. The rendered content of the target text includes, but is not limited to, font, size, color, alignment, shadow, and stroke effects. The rendered result can be a static image or a dynamic animation, depending on the user's choice and is not limited here.

[0048] Step S304: align the rendering result with the target text, and display the aligned rendering result at the designated editing position.

[0049] Since the rendering result after rendering may be quite different from the target text, in order to facilitate users to view the display result of the target text after rendering more intuitively, a correspondence between the rendering result and the target text is established to align the rendering result with the target text, thereby ensuring that the aligned rendering result can be displayed directly at the specified editing position, so that users can more intuitively confirm whether the current rendering effect meets their needs, making the way of displaying the result after rendering the target text more friendly, thereby helping users to quickly complete text editing.

[0050] The text display method provided in this embodiment, after determining the target frame video image to be edited from multiple frames of video images, obtains and displays the target text at the designated editing position where text editing is required in the target frame video image, and then renders the target text to obtain a rendering result. In order to facilitate the user to intuitively view the rendered result of the target text from the designated editing position, the rendering result is aligned with the target text, and then the aligned rendering result is displayed at the designated editing position, so that the user can quickly determine whether the aligned rendering result currently displayed at the designated editing position meets their own needs, thereby helping to enhance the interactive ability of the video editing software to perform text editing, making the method of displaying the rendered result of the target text more user-friendly, and helping to improve the user experience.

[0051] In some optional implementation scenarios, the process of displaying the rendering display result of the target text by the above-mentioned text display method can be shown in Figures 4 to 6. Among them, as shown in Figure 4, the virtual box in the target frame video image is the designated editing position. As shown in Figure 5, after the user selects the designated editing position, the target text ("#punch card") can be entered above the text to be entered, and then after the "#punch card" is entered, it is displayed at the designated editing position. Taking the rendering effect of displaying "#punch card" in bold as an example, the schematic diagram of displaying the aligned rendering result at the designated editing position can be shown in Figure 6. Among them, the bold "#punch card" superimposed with the "#punch card" is the rendering result after alignment, which can be used as the rendering display result of the target text.

[0052] In this embodiment, a text display method is provided, which can be used in the above-mentioned electronic devices, such as computers, mobile terminals, etc. FIG7 is a flow chart of the text display method according to an embodiment of the present disclosure. As shown in FIG7 , the flow chart includes the following steps:

[0053] Step S701: Acquire multiple frames of video images.

[0054] Step S702 : acquiring target text from a designated editing position of a target frame video image, and displaying the target text at the designated editing position.

[0055] Step S703: Render the target text to obtain a rendering result.

[0056] Step S704: align the rendering result with the target text, and display the aligned rendering result at the designated editing position.

[0057] Specifically, the above step S704 includes:

[0058] Step S7041: Determine, based on the current font size of the target text, a display ratio between the current font size displayed in the first display window and the current font size displayed in the second display window.

[0059] The first display window is a window for displaying multiple frames of video images, and the second display window is a window for displaying the rendering results. Since the rendering results and the target text are displayed in different windows, and different windows may display text differently, in order to facilitate targeted alignment of the rendering results with the target text, when the current font size of the target text is determined, the display ratio between the current font size displayed in the first display window and the current font size displayed in the second display window is determined. This display ratio ensures that the font size of the aligned rendering result displayed in the second display window is consistent with the current font size.

[0060] In an optional implementation scenario, when the current font size is determined, the display ratio can be calculated in the following manner:

[0061] The current font size (fontSize) of the target text used to display in the first display window is in points (pt). The expression for converting it to pixels is as follows: systemSize*ScreenScale, where systemSize is the font size in points and ScreenDPI is the pixel density per inch of the first display window.

[0062] The pixel conversion expression corresponding to the second display window is as follows: fontSize*300 / 72.0, where 300 represents the pixel density per inch of the second display window, and 72.0 is the number of points in 1 inch.

[0063] To align the rendering result with the target text, the following relationship is established:

[0064] fontSize*300 / 72.0=systemSize*ScreenScale;

[0065] fontSize=systemSize*ScreenScale*72.0 / 300;

[0066] fontSize=systemSize*(Player2Width / (Player1Width*ScreenScale))*ScreenScale*72.0 / 300;

[0067] The final display ratio rate = Player2Width / player1Width)*(72.0 / 300.0).

[0068] Wherein, Player2Width is the display width of the second display window. Player1Width is the display width of the first display window. In one example, Player2Width can be a preset fixed value, such as: 720.0.

[0069] Step S7042: Adjust the rendering result based on the display ratio to obtain an aligned rendering result.

[0070] Based on the display ratio, the adjustment direction of the rendering result can be clarified, and then targeted alignment can be performed to obtain the aligned rendering result. Therefore, when it is subsequently displayed, the readability of the aligned rendering result can be guaranteed not to be affected, which is conducive to enhancing the visualization effect of the rendering display result of the target text and improving the user experience.

[0071] In an optional implementation, the above step S7042 includes:

[0072] Step a1: determining a first value corresponding to a text configuration parameter according to a target text displayed in a first display window at a current font size.

[0073] Text configuration parameters can be understood as the configuration parameters for displaying the target text in the first display window at the current font size. These parameters include, but are not limited to, font size, text width, background radius, character spacing, line spacing, and shadow width. To facilitate clear adjustment direction, a first value corresponding to the text configuration parameter when the target text is displayed in the first display window is first determined.

[0074] Step a2: determining a second value of the text configuration parameter in the second display window based on the display ratio and the first value.

[0075] Based on the display ratio and the first value, an adjusted value suitable for the second display window can be obtained, thereby ensuring that the text maintains a consistent configuration effect on different display windows, thereby providing a unified and readable user experience.

[0076] In an optional implementation scenario, the calculation process of determining the second value by the first value may be as shown in Table 1 below:

[0077] Table 1

[0078] The text editing component is a component that supports the user to input target text in the first display window.

[0079] Step a3: Adjust the text configuration parameters of the rendering result according to the second value to obtain an aligned rendering result.

[0080] In order to make the display font size of the rendering result the same as the current font size, the text configuration parameters of the rendering result are specifically adjusted according to the second value, thereby obtaining an aligned rendering result that can be consistent with the target text.

[0081] In some optional implementations, if the text configuration parameter is the maximum display width, step a3 includes:

[0082] Step a31, determining the first display line number of the target text in the first display window;

[0083] Step a32, determining the second display row number of the rendering result under the second display result;

[0084] Step a33: If the second display line number is greater than the first display line number, a line break character is added to the target text to change the first display line number to the second display line number.

[0085] Specifically, based on the maximum display width of the first display window, the first display line number when the target text is currently displayed in the first display window is determined. Based on the maximum display width of the second display window, the second display line number of the aligned rendering result under the second display result is determined. In order to avoid the situation where the second display line number after rendering is inconsistent with the first display line number and affects the user's visual experience, the second display line number is compared with the first display line number. If the second display line number is greater than the first display line number, a line break is added to the target text to change the first display line number to the second display line number, thereby ensuring that the aligned rendering result has the same number of lines as the target text display.

[0086] Step S7043: Display the aligned rendering result at the designated editing position.

[0087] The text display method provided in this embodiment aligns the rendering result with the target text, and then displays the aligned rendering result at the specified editing position, which can ensure that the readability of the aligned rendering result will not be affected, and is conducive to enhancing the visualization effect of the rendering display result of the target text, thereby improving the user experience.

[0088] In this embodiment, a text display method is provided, which can be used in the above-mentioned electronic devices, such as computers, mobile terminals, etc. FIG8 is a flow chart of the text display method according to an embodiment of the present disclosure. As shown in FIG8 , the flow chart includes the following steps:

[0089] Step S801: Acquire multiple frames of video images.

[0090] Step S802 : acquiring target text from a designated editing position of a target frame video image, and displaying the target text at the designated editing position.

[0091] Step S803: Render the target text to obtain a rendering result.

[0092] Step S804: align the rendering result with the target text, and display the aligned rendering result at the designated editing position.

[0093] Step S805: If the target frame video image is a continuous multi-frame image, then during the playback of the multi-frame image, respond to the position movement instruction executed on the aligned rendering result, track the movement trajectory of the aligned rendering result, and determine the position refresh rate of the aligned rendering result based on the current playback frame rate of the multi-frame image.

[0094] To preview the display of the aligned rendering result in the target frame video image, multiple frames are played. However, during the playback of multiple frames, if a user triggers a position movement instruction for the aligned rendering result, the movement trajectory of the aligned rendering result is tracked to determine the target editing position corresponding to the display of the aligned rendering result in each frame.

[0095] In order to make the display effect of the aligned rendering result more user-friendly, the position refresh rate of the aligned rendering result is determined based on the current playback frame rate of the multi-frame image, so that when the aligned rendering result is moved, the aligned rendering result can be displayed accordingly with the movement of the position, which helps to enhance the user experience.

[0096] Specifically, the above step S805 includes:

[0097] Step b1: Switch the current playback frame rate to the target playback frame rate, and determine the second position refresh rate of the aligned rendering result based on the target playback frame rate.

[0098] The target playback frame rate is higher than the current playback frame rate. To improve the smoothness of dragging the aligned rendering result, the current playback frame rate is switched to the target playback frame rate. The refresh rate of the second position of the aligned rendering result is then determined based on the target playback frame rate, ensuring a better alignment effect. For example, if the current playback frame rate is 30 frames per second, the target playback frame rate can be adjusted to 60 frames per second.

[0099] In some optional implementations, the above step S805 further includes:

[0100] Step b2: Stop moving in response to the aligned rendering result, and restore the target playback frame rate to the current playback frame rate.

[0101] Since the purpose of adjusting the target playback frame rate is to ensure that the aligned rendering result can be aligned and displayed according to the movement of the user's gestures, thereby improving the user's preview experience, rather than adjusting the playback speed of multiple frames of images, after the user stops moving the aligned rendering result, the target playback frame rate is restored to the current playback frame rate.

[0102] Step S806 : Displaying the aligned rendering result at the target editing position of each frame of the multiple frames of images according to the position refresh rate.

[0103] According to the position refresh rate, the corresponding aligned rendering results are displayed at the target editing position of each frame image, which can ensure that the aligned rendering results can remain consistent between multiple frames of images, thereby achieving visual continuity, thereby improving visual effects and enhancing user experience.

[0104] The text display method provided in this embodiment can enrich the functional diversity of text editing for videos, thereby not only improving the visual effect but also enhancing the user experience.

[0105] In an optional embodiment, in order to facilitate the user to clearly view the rendering effect after alignment, the target text displayed at the designated editing position is hidden. For example, in combination with the target text shown in FIG5 , the target text is displayed as shown in FIG9 .

[0106] In an optional implementation scenario, the first display window may be provided by the first engine of the current operating system of the electronic device, and the second display window may be provided by the second engine. The first engine may be understood as an engine embedded in the current operating system for performing text editing tasks. That is, when the user needs to input the target text, the first engine is called so that the user can input the target text through the text editing component provided by the first engine. The second engine may be understood as an engine for performing text rendering tasks. When the target text needs to be rendered, the second engine obtains the target text to be rendered from the first engine, and renders the target text through the text rendering component provided by the second engine to obtain a rendering result. In an example, as shown in Figure 10, in the process of performing text editing on the target frame video image, the second engine is located below the first engine, thereby facilitating better alignment of the rendering result with the target text input by the user.

[0107] Based on the same concept, the present disclosure also provides a component framework for video editing software, as shown in FIG11 . When a user enters target text at a designated editing position of a target frame video image, the text rendering component provided by the second engine is disabled, and the text editing component provided by the first engine is displayed, so that the user can enter and display the target text on the text editing component. When the target text is entered, the text editing component is automatically hidden, and the second engine is started to render the target text. Then, through text alignment, the aligned rendering result is displayed at the position where the target text is entered (the designated editing position), thereby utilizing visual difference to achieve the purpose of allowing video editing software to support both text editing and advanced display effects.

[0108] In this embodiment, a text display device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0109] This embodiment provides a text display device, as shown in FIG12 , including:

[0110] An acquisition module 1201 is configured to acquire multiple video frames, wherein the multiple video frames include a target video frame to be edited.

[0111] The first execution module 1202 is configured to obtain a target text from a designated editing position of a target frame video image and display the target text at the designated editing position;

[0112] The rendering module 1203 is used to render the target text and obtain a rendering result;

[0113] The second execution module 1204 is configured to align the rendering result with the target text, and display the aligned rendering result at a designated editing position.

[0114] In some optional embodiments, the first execution module 1202 includes: a first processing unit, used to determine the display ratio between the current font size displayed in the first display window and the current font size displayed in the second display window based on the current font size of the target text, the first display window is a window for displaying multiple frames of video images, and the second display window is a window for displaying the rendering result; a first adjustment unit, used to adjust the rendering result based on the display ratio to obtain an aligned rendering result; and a second processing unit, used to display the aligned rendering result at a designated editing position.

[0115] In some optional embodiments, the first adjustment unit includes: a first determination unit, used to determine the first value corresponding to the text configuration parameter based on the target text displayed in the first display window according to the current font size; a second determination unit, used to determine the second value of the text configuration parameter in the second display window based on the display ratio and the first value; and a third processing unit, used to adjust the text configuration parameter of the rendering result according to the second value to obtain an aligned rendering result.

[0116] In some optional embodiments, the second determination unit includes: a first line number determination module, used to determine the first display line number of the target text in the first display window; a second line number determination module, used to determine the second display line number of the rendering result in the second display result; a first adjustment module, used to add a line break to the target text if the second display line number is greater than the first display line number, so as to change the first display line number to the second display line number.

[0117] In some optional embodiments, if the target frame video image is a continuous multi-frame image, the device also includes: a second adjustment module, which is used to respond to the position movement instruction executed on the aligned rendering result during the playback of the multi-frame images, track the movement trajectory of the aligned rendering result, and determine the position refresh rate of the aligned rendering result based on the current playback frame rate of the multi-frame images; a display module, which is used to display the aligned rendering result at the target editing position of each frame image in the multi-frame images according to the position refresh rate.

[0118] In some optional embodiments, the display module includes: a fourth processing unit, used to switch the current playback frame rate to the target playback frame rate, and determine the second position refresh rate of the aligned rendering result based on the target playback frame rate, and the target playback frame rate is higher than the current playback frame rate.

[0119] In some optional implementations, the apparatus further includes: a third execution module, configured to stop moving in response to the aligned rendering result and restore the target playback frame rate to the current playback frame rate.

[0120] In some optional implementations, before displaying the aligned rendering result at the designated editing position, the apparatus further includes: a fourth execution module configured to hide the target text displayed at the designated editing position.

[0121] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0122] The text display device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0123] An embodiment of the present disclosure further provides an electronic device having the text display device shown in FIG. 12 .

[0124] Please refer to Figure 13, which is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present disclosure. As shown in Figure 13, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 13 takes a processor 10 as an example.

[0125] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0126] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.

[0127] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0128] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0129] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected via a bus or other means, with FIG13 taking the bus connection as an example.

[0130] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0131] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0132] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0133] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0134] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0135] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0136] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A text display method, the method comprises: obtaining multiple frames of video images, where the multiple frames of video images include a target frame video image to be text - edited; obtaining target text from a specified editing position of the target frame video image, and displaying the target text at the specified editing position; rendering the target text to obtain a rendering result; aligning the rendering result with the target text, and displaying the aligned rendering result at the specified editing position.

2. The method according to claim 1, wherein, the aligning the rendering result with the target text, and displaying the aligned rendering result at the specified editing position includes: determining a display ratio of the current font size displayed in a first display window (the window for displaying the multiple frames of video images) to the current font size displayed in a second display window (the window for displaying the rendering result) according to the current font size of the target text; adjusting the rendering result based on the display ratio to obtain an aligned rendering result; displaying the aligned rendering result at the specified editing position.

3. The method according to claim 2, wherein, the adjusting the rendering result based on the display ratio to obtain an aligned rendering result includes: determining a first value corresponding to a text configuration parameter according to the target text displayed in the first display window at the current font size; determining a second value of the text configuration parameter under the second display window based on the display ratio and the first value; adjusting the text configuration parameter of the rendering result according to the second value to obtain the aligned rendering result.

4. The method according to claim 3, wherein, if the text configuration parameter is the maximum display width, then the adjusting the text configuration parameter of the rendering result according to the second value to obtain the aligned rendering result includes: determining a first display line number of the target text under the first display window; determining a second display line number of the rendering result under the second display result; if the second display line number is greater than the first display line number, adding a line break in the target text to change the first display line number to the second display line number.

5. The method according to claim 1, wherein, if the target frame video image is a continuous multiple - frame image, then the method further includes: during the playback of the multiple - frame image, in response to a position - movement instruction executed on the aligned rendering result, tracking the movement trajectory of the aligned rendering result, and determining a position refresh rate of the aligned rendering result based on the current playback frame rate of the multiple - frame image; displaying the aligned rendering result at the target editing position of each frame image in the multiple - frame image according to the position refresh rate.

6. The method according to claim 5, wherein, the determining a position refresh rate of the aligned rendering result based on the current playback frame rate of the multiple - frame image includes: Switch the current playback frame rate to a target playback frame rate, and determine a second position refresh rate of the aligned rendering result based on the target playback frame rate, where the target playback frame rate is higher than the current playback frame rate.

7. The method according to claim 6, wherein, the method further includes: In response to the aligned rendering result stopping moving, restore the target playback frame rate to the current playback frame rate.

8. The method according to claim 1, wherein, before displaying the aligned rendering result at the specified editing position, the method further includes: Hide the target text displayed at the specified editing position.

9. A text display device, the device comprises: an acquisition module, configured to acquire multiple video images, where the multiple video images include a target frame video image to be text-edited; a first execution module, configured to acquire target text from a specified editing position of the target frame video image and display the target text at the specified editing position; a rendering module, configured to render the target text to obtain a rendering result; a second execution module, configured to align the rendering result with the target text and display the aligned rendering result at the specified editing position.

10. An electronic device, comprises: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the text display method according to any one of claims 1 to 8.

11. A computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the text display method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Text rendering and layout method, apparatus, equipment, and storage medium

    CN109145272A

  • Video processing method and device, storage medium and program product

    CN113747240A

  • Text editing method and device, computer equipment and computer readable storage medium

    CN116167910A

  • User emotion prediction system and method using deep learning-based graph fusion

    KR1020230034012A

  • Video editing and playing method, apparatus, device and medium

    US20220283697A1