Multimedia editing method, apparatus, device, and medium

By using a global font caching mechanism and a shared cache interface, the problem of memory waste caused by repeated caching of font resources in multimedia editing is solved, achieving memory optimization and improved editing performance.

CN122138008APending Publication Date: 2026-06-02BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-11-29
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

The current method of handling font resources in multimedia editing leads to memory waste and duplicate caching issues, which affect performance and editing experience.

Method used

A global font caching mechanism is adopted, which shares the cache through the first and second interfaces to implement draft writing and image rendering operations respectively, thereby reducing duplicate caching. A cache threshold and cache replacement strategy are set, and read-write locks are configured to ensure thread safety.

Benefits of technology

It effectively saves memory resources, improves access speed, enhances the editing experience, and avoids memory waste and thread switching waiting issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122138008A_ABST
    Figure CN122138008A_ABST
Patent Text Reader

Abstract

This disclosure relates to a multimedia editing method, apparatus, device, and medium. The method includes: storing candidate font resources for multimedia editing in a preset global font cache; responding to an editing operation on text effects, reading a target font resource corresponding to the editing operation from the global font cache via a first interface, and writing the editing operation result corresponding to the target font resource into a target multimedia editing draft; reading the target font resource from the global font cache via a second interface, and rendering a target image based on the editing operation result corresponding to the target font resource. This disclosure effectively saves memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a multimedia editing method, apparatus, device and medium. Background Technology

[0002] Multimedia editing websites and applications often provide users with font resources such as text templates and decorative fonts to edit uploaded images or videos. However, the inventors discovered that existing methods for handling font resources are inadequate and prone to memory waste. Summary of the Invention

[0003] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a multimedia editing method, apparatus, device and medium.

[0004] This disclosure provides a multimedia editing method, the method comprising: storing candidate font resources for multimedia editing in a preset global font cache; responding to an editing operation for text effects, reading a target font resource corresponding to the editing operation from the global font cache through a first interface, and writing the editing operation result corresponding to the target font resource into a target multimedia editing draft; reading the target font resource from the global font cache through a second interface, and rendering a target image based on the editing operation result corresponding to the target font resource.

[0005] Optionally, storing candidate font resources for multimedia editing into a preset global font cache includes: obtaining a target cache threshold corresponding to a preset global font cache; if it is detected that the cache size of the global font cache is higher than the target cache threshold when storing candidate font resources for multimedia editing into the global font cache, then searching for a first font resource in the global font cache, and replacing the first font resource with the candidate font resource in the global font cache; wherein, the first font resource is the least used font resource in the global font cache.

[0006] Optionally, storing candidate font resources for multimedia editing into a preset global font cache includes: obtaining a target cache threshold corresponding to the global font cache; storing the candidate font resources into the preset global font cache when the target cache threshold is less than a first preset threshold, and / or when the number of candidate font resources for multimedia editing is less than a second preset threshold and the memory usage of the candidate font resources exceeds a third preset threshold.

[0007] Optionally, the target cache threshold is determined based on the current cache data volume in the font global cache.

[0008] Optionally, the method further includes: performing a cache release operation when it is detected that the number of font instances in the global font cache is zero.

[0009] Optionally, the cache queue in the font global cache is configured with a read-write lock.

[0010] This disclosure also provides a multimedia editing device, including: a font caching module for storing candidate font resources for multimedia editing into a preset global font cache; a draft writing module for, in response to an editing operation on text effects, reading the target font resource corresponding to the editing operation from the global font cache through a first interface, and writing the editing operation result corresponding to the target font resource into a target multimedia editing draft; and an image rendering module for reading the target font resource from the global font cache through a second interface, and rendering a target image based on the editing operation result corresponding to the target font resource.

[0011] This disclosure also provides an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the multimedia editing method provided in this disclosure.

[0012] This disclosure also provides a computer-readable storage medium storing a computer program for performing the multimedia editing method provided in this disclosure.

[0013] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the multimedia editing method provided in this disclosure.

[0014] The technical solution provided in this disclosure can preset a global font cache and store candidate font resources for multimedia editing in the preset global font cache. It also sets a first interface and a second interface, which share a text cache. Both interfaces can read target font resources from the global font cache and implement draft writing operations and image rendering operations based on the editing operation results corresponding to the target font resources. Compared with the related technologies that require setting corresponding font resource caches for different operations, this solution can effectively save memory.

[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of a font resource processing flow according to an embodiment of the present disclosure;

[0019] Figure 2 This is a schematic diagram of a font resource processing structure provided in an embodiment of the present disclosure;

[0020] Figure 3 A flowchart illustrating a multimedia editing method provided in this embodiment of the disclosure;

[0021] Figure 4 This is a schematic diagram of a font resource processing flow provided in an embodiment of the present disclosure;

[0022] Figure 5 This is a schematic diagram of a font resource processing structure provided in an embodiment of the present disclosure;

[0023] Figure 6 This is a schematic diagram of the structure of a multimedia editing device provided in an embodiment of the present disclosure;

[0024] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0025] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0026] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0027] The inventors discovered through research that existing methods of handling font resources are inadequate. For example, font resources in multimedia editing pages are loaded and cached at least twice, resulting in wasted memory due to redundant caching. For easier understanding, please refer to... Figure 1 The diagram illustrates a font resource processing flow for a related technology. This technology is primarily applied to multimedia editing, which involves drafts. These drafts can be considered multimedia editing project files, recording multimedia materials and editing information. Specifically, user modifications are first written into the draft before rendering updates are driven. In rich text scenarios, for user-performed text effects editing operations, the editing results need to be obtained through Effect and written into the draft before the data is passed to the Effect rendering instance to drive rendering updates. Effect can be considered a multimedia editor (in... Figure 1 The multimedia editor (VE for short) requires a library of functionalities, such as the ability to render special effects for video frame images parsed by VE. Figure 1 As shown, the above method requires switching and waiting between multiple threads, which can lead to performance waste and a choppy editing experience. To address this issue, the data required by the data layer and the rendering layer are isolated. Specifically, [the solution involves...]. Figure 1 The system contains rendering instances and data instances. Rendering instances are primarily used for image rendering, while data instances are mainly used for data processing, writing data to drafts. However, due to the existence of rendering instances and data instances, in related technologies, font files (i.e., font resources) are also cached twice. In other words, in the current business scenario, such as... Figure 1 As shown, to adapt to the call architecture of writing a draft first and then rendering, there are two font resource processing chains: data processing (such as draft writing processing) and rendering processing. Each chain requires switching and waiting between multiple threads, and each chain has a separate font resource, with each font resource storing a copy of the font data in memory. (Refer to...) Figure 2 As shown in the schematic diagram of a font resource processing structure in a related technology, rendering and data processing (including draft writing) each require their own font resource cache managers to cache the corresponding font resources. That is, the font resources are cached twice, leading to a waste of memory resources.

[0028] Figure 3 This is a flowchart illustrating a multimedia editing method provided in an embodiment of the present disclosure. The method can be executed by a multimedia editing device, which can be implemented using software and / or hardware, and is generally integrated into an electronic device. Figure 2 As shown, the method mainly includes the following steps S302 to S306:

[0029] Step S302 involves storing candidate font resources for multimedia editing into a preset global font cache. This embodiment does not limit the form or style of the candidate font resources; any font resource used for multimedia editing can be used as a candidate font resource. Compared to the method of setting multiple font resource caches in related technologies, this embodiment can first set a global font cache and store the candidate font resources in this global font cache for subsequent application.

[0030] Step S304: In response to an editing operation on text effects, the target font resource corresponding to the editing operation is read from the font global cache through the first interface, and the editing operation result corresponding to the target font resource is written to the target multimedia editing draft. This embodiment does not limit the editing operation; any editing operation that can affect text effects is acceptable, such as adding font resources to an existing image or video frame, or further editing the font resource to change its content, style, etc. In practical applications, the target font resource corresponding to the editing operation can be read from the font global cache through the first interface, and a draft writing operation can be performed on the target font resource using a preset first call chain, that is, the editing operation result corresponding to the target font resource is written to the target multimedia editing draft; the aforementioned call chain can also be understood as a processing path. The first interface can be a preset static interface of a function library that the multimedia editor depends on, and the function library can also be a third-party library. Compared to... Figure 1 In this context, the first interface may be an additional interface provided in the embodiments of this disclosure, which can be used to process data-related content such as font resources, and may specifically be the Effect static interface.

[0031] Step S306: Read the target font resource from the global font cache through the second interface, and render the target image based on the editing operation result corresponding to the target font resource. In practical applications, the target font resource can be read from the global font cache through the second interface, and a preset second call chain can be used to perform rendering processing operations on the target font resource. The second interface can be a preset rendering interface of the function library, used to handle rendering-related content, specifically the Effect rendering interface.

[0032] The technical solution provided in this disclosure can preset a global font cache and store candidate font resources for multimedia editing in the preset global font cache. It also sets a first interface and a second interface, which share a text cache. Both interfaces can read target font resources from the global font cache and implement draft writing operations and image rendering operations based on the editing operation results corresponding to the target font resources. Compared with the related technologies that require setting corresponding font resource caches for different operations, this solution can effectively save memory.

[0033] In some implementation examples, the draft writing operation corresponding to the target font resource read from the first interface can be implemented through the first call chain. The first call chain is a chain related to the main business thread, the static encapsulation interface of the multimedia editor, and the first interface (such as the target static interface). The rendering operation corresponding to the target font resource read from the second interface can be implemented through the second call chain. The second call chain is a chain related to the main business thread, the main thread of the multimedia editor, the rendering thread of the multimedia editor, and the second interface (such as the target rendering interface). For ease of understanding, please refer to... Figure 4 The diagram shown illustrates a font resource processing flow. Figure 4 The diagram clearly illustrates the first and second call chains. The main business thread involved in both the first and second call chains can also be called the draft thread, which can be used to record user operations in the draft. When rendering font resources using the second call chain, the rendering process must successively go through the intermediate layer thread used to drive rendering, the VE main thread (also called the logic thread), and the VE rendering thread. The VE is considered a multimedia editor or video editor, mainly used to parse the currently input video, perform audio and video encoding and decoding, and drive rendering of elements such as textures. Compared to... Figure 1 It is clear that, Figure 4 The code additionally extracts and sets up a static Effect interface (corresponding to the aforementioned first interface) and a static VE layer encapsulation interface (i.e., the static encapsulation interface of the multimedia editor). This eliminates the need for a lengthy second call chain for data processing; instead, a convenient first call chain is established based on the Effect static interface and the VE layer static encapsulation interface. Furthermore, the VE layer static encapsulation interface illustrated in the first call chain is mainly used to pass through the interactive information of the Effect static interface, primarily through encapsulation. Through this first call chain, draft writing can be performed efficiently and conveniently. Figure 4 and Figure 1 In contrast, it can ensure reduced thread switching and waiting while allowing the two links of font resource-related draft writing and rendering to share the global font cache, thereby reducing memory usage and effectively improving access speed.

[0034] Based on the above, you can also refer to Figure 5 The diagram shown illustrates a font resource processing structure, and... Figure 2 In contrast, the font resource-related rendering and data processing (mainly including draft writing processing) in this embodiment can share a cache, that is, they no longer hold separate font resource cache managers, but share a font resource cache manager. In other words, both the rendering engine instance and the font instance can access the global font cache without having to set the corresponding cache data separately, thereby effectively reducing memory usage and avoiding memory resource waste.

[0035] In some implementations, the step of storing the target text to be processed into a preset global font cache may include the following steps A and B:

[0036] Step A: Obtain the preset target cache threshold corresponding to the global font cache. For example, the target cache threshold is determined based on the current cached data volume in the global font cache; that is, the target cache threshold can be dynamically adjusted based on the current cached data volume in the global font cache. The target cache threshold can also be referred to as the cache memory level. In related technologies, caching is typically limited only by the number of font resources, such as limiting the number of cached font resources to no more than 15. However, in this embodiment, the limit is not based on the number of characters, but rather the target cache threshold can be flexibly adjusted according to the actual situation. Furthermore, an interface for setting the cache threshold can be provided, allowing users to set a suitable cache threshold as needed.

[0037] Step B: If it is detected that the cache size of the global font cache exceeds the target cache threshold when storing candidate font resources for multimedia editing into the global font cache, then the first font resource is searched in the global font cache, and the first font resource is replaced by a candidate font resource in the global font cache. The first font resource is the least used font resource in the global font cache; that is, the global font cache records the size of cached font resources. If loading the target font resource causes an overload, several least used font resources will be replaced until a new target font resource can be placed. It should be noted that this embodiment does not limit the number or size of the first font resource, as long as deleting it allows the latest target font resource to be placed in the global font cache. The above method provided by this embodiment can also be called a cache replacement strategy. Through this method, the global font cache can be reasonably utilized, avoiding the situation where the latest font resource cannot be stored in the cache due to old text occupying the cache.

[0038] In some implementations, the step of storing candidate font resources for multimedia editing into a preset global font cache may include the following steps a and b:

[0039] Step a, obtain the target cache threshold corresponding to the font global cache; the method for determining the target cache threshold can refer to the relevant description in step A above, and there are no restrictions here.

[0040] Step b: If the target cache threshold is less than the first preset threshold, and / or if the number of candidate font resources used for multimedia editing is less than the second preset threshold and the memory usage of the candidate font resources exceeds the third preset threshold, the candidate font resources are stored in the preset global font cache. That is, if the set memory limit is small, or if a certain font resource occupies a large amount of memory exceeding the limit, the above method can ensure that at least one font resource can be cached.

[0041] The methods described in steps A to B and / or steps a to b can all be referred to as memory water level (cache threshold) control strategies. These strategies can optimize font resource caching and prevent the latest font resources from being unable to be written to the cache due to a full cache.

[0042] Furthermore, the inventors discovered that related technologies also suffer from problems such as delayed cache release, failing to release memory in a timely manner even when text templates, decorative fonts, and other font resources are no longer used. Therefore, the method provided in this disclosure further includes performing a cache release operation when the number of font instances in the global font cache is detected to be zero. By explicitly setting the timing of cache release, the problem of untimely cache release in related technologies is effectively improved.

[0043] Furthermore, this disclosure fully considers the potential thread safety issues arising from shared caching and proposes a thread safety strategy. Specifically, the cache queues in the font global cache are configured with read-write locks. In practical applications, the font global cache typically corresponds to multiple cache queues, with different cache queues storing different data types and / or having different data priorities. Because threads share the cache, each thread can access all queues. To ensure thread safety, this disclosure configures a corresponding read-write lock for each cache queue. If at least two threads attempt to access the same cache queue, they must use the read-write lock of that cache queue for processing. For example, two threads cannot simultaneously process the same data in that cache queue, thereby ensuring the security and reliability of data processing.

[0044] In summary, the multimedia editing method provided in this disclosure effectively improves the problem of duplicate caching in related technologies by using cache sharing, thereby freeing up some memory space and reducing the memory usage of font resources. Furthermore, by setting a cache release trigger mechanism, timely cache release can be ensured. In addition, optimization strategies such as cache replacement strategies, memory watermark (cache threshold) control strategies, and thread safety strategies are proposed, achieving memory optimization for font resource processing scenarios from multiple dimensions.

[0045] Corresponding to the aforementioned multimedia editing method, this disclosure further provides a multimedia editing device. Figure 6 This is a schematic diagram of a multimedia editing device provided in an embodiment of the present disclosure. The device can be implemented by software and / or hardware, and is generally integrated into an electronic device, such as... Figure 6 As shown, the multimedia editing device includes:

[0046] The font caching module 602 is used to store candidate font resources for multimedia editing into a preset global font cache;

[0047] The draft writing module 604 is used to respond to the editing operation for text effects, read the target font resource corresponding to the editing operation from the font global cache through the first interface, and write the editing operation result corresponding to the target font resource into the target multimedia editing draft;

[0048] The image rendering module 606 is used to read the target font resource from the font global cache through the second interface, and render the target image based on the editing operation result corresponding to the target font resource.

[0049] The device provided in this embodiment can preset a global font cache and store candidate font resources for multimedia editing into the preset global font cache. It also sets a first interface and a second interface, which share a text cache. Both interfaces can read target font resources from the global font cache and implement draft writing operations and image rendering operations based on the editing operation results corresponding to the target font resources. Compared with the related technologies that require setting corresponding font resource caches for different operations, this device can effectively save memory.

[0050] In some embodiments, the font caching module 602 is specifically used to: obtain a preset target caching threshold corresponding to the global font cache; if it is detected that the cache size of the global font cache is higher than the target caching threshold when storing candidate font resources for multimedia editing into the global font cache, then search for a first font resource in the global font cache, and replace the first font resource in the global font cache with the candidate font resource; wherein, the first font resource is the least used font resource in the global font cache.

[0051] In some embodiments, the font caching module 602 is specifically used to: obtain the target cache threshold corresponding to the font global cache; when the target cache threshold is less than a first preset threshold, and / or when the number of candidate font resources used for multimedia editing is less than a second preset threshold and the memory usage of the candidate font resources exceeds a third preset threshold, store the candidate font resources in a preset font global cache.

[0052] In some implementations, the target cache threshold is determined based on the current amount of cached data in the font global cache.

[0053] In some embodiments, the apparatus further includes a cache release module for performing a cache release operation when it is detected that the number of font instances in the global font cache is zero.

[0054] In some implementations, the cache queue in the font global cache is configured with a read-write lock.

[0055] The multimedia editing device provided in this disclosure can execute the multimedia editing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.

[0056] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device embodiments can be referred to the corresponding process in the method embodiments, and will not be repeated here.

[0057] This disclosure provides an electronic device, which includes: a storage device storing a computer program thereon; and a processing device for executing the computer program in the storage device to implement the steps of any method of this disclosure.

[0058] The following is for reference. Figure 7 The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0059] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0060] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0061] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.

[0062] In addition to the methods and devices described above, embodiments of this disclosure can also be computer program products, comprising computer program instructions that, when executed by a processor, cause the processor to perform the methods provided in the embodiments of this disclosure. The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. These programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user computing device, partially on a user device, as a standalone software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0063] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the multimedia editing method provided in embodiments of this disclosure.

[0064] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0065] This disclosure also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the multimedia editing method described in this disclosure.

[0066] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0067] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation 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 software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0068] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0069] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0070] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0071] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A multimedia editing method, characterized in that, include: Store candidate font resources for multimedia editing in a preset global font cache; In response to an editing operation on text effects, the target font resource corresponding to the editing operation is read from the font global cache through the first interface, and the editing operation result corresponding to the target font resource is written into the target multimedia editing draft; The target font resource is read from the global font cache through the second interface, and the target image is rendered based on the editing operation result corresponding to the target font resource.

2. The method according to claim 1, characterized in that, The step of storing candidate font resources for multimedia editing into a preset global font cache includes: Get the target cache threshold corresponding to the preset global font cache; If it is detected that the cache size of the global font cache is higher than the target cache threshold when storing candidate font resources for multimedia editing into the global font cache, then the first font resource is searched in the global font cache, and the candidate font resource is used to replace the first font resource in the global font cache; wherein, the first font resource is the least used font resource in the global font cache.

3. The method according to claim 1, characterized in that, The step of storing candidate font resources for multimedia editing into a preset global font cache includes: Obtain the target cache threshold corresponding to the font global cache; If the target cache threshold is less than the first preset threshold, and / or if the number of candidate font resources for multimedia editing is less than the second preset threshold and the memory usage of the candidate font resources exceeds the third preset threshold, the candidate font resources will be stored in a preset global font cache.

4. The method according to claim 2 or 3, characterized in that, The target cache threshold is determined based on the current cached data volume in the font global cache.

5. The method according to claim 1, characterized in that, The method further includes: If the number of font instances in the global font cache is detected to be zero, a cache release operation is performed.

6. The method according to claim 1, characterized in that, The cache queue in the global font cache is configured with a read-write lock.

7. A multimedia editing device, characterized in that, include: The font caching module is used to store candidate font resources for multimedia editing into a preset global font cache; The draft writing module is used to respond to the editing operation on the text effect, read the target font resource corresponding to the editing operation from the font global cache through the first interface, and write the editing operation result corresponding to the target font resource into the target multimedia editing draft; The image rendering module is used to read the target font resource from the font global cache through the second interface, and render the target image based on the editing operation result corresponding to the target font resource.

8. An electronic device, characterized in that, The electronic device includes: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the multimedia editing method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the multimedia editing method described in any one of claims 1-6.

10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the multimedia editing method according to any one of claims 1-6.