Layer synthesis method and device, electronic equipment and storage medium

By obtaining the layer to be updated from the image frame to be processed, determining the update path of the target layer, and using intermediate cached data for layer compositing, the problem of excessively long layer compositing paths is solved, and image rendering efficiency is improved.

CN118967428APending Publication Date: 2024-11-15HUNAN KAIHONG ZHIGU DIGITAL IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411023392.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In existing technologies, the layer compositing path is too long, resulting in poor image rendering efficiency.

Method used

By obtaining the layer to be updated of the image frame to be processed, the update path of the target layer is determined, and the target layer compositing cache is determined based on the update path of the target layer. The intermediate cache data is used for layer compositing, reducing the number of layer compositing operations.

Benefits of technology

It effectively reduces the length of the layer compositing path and improves the efficiency of layer compositing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967428A_ABST
    Figure CN118967428A_ABST
Patent Text Reader

Abstract

The invention discloses a layer synthesis method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a to-be-processed image frame, and determining a to-be-updated layer corresponding to the to-be-processed image frame; determining a target layer updating path according to the to-be-updated layer, and determining a target layer synthesis cache based on the target layer updating path; and performing layer synthesis based on the target layer synthesis cache, the to-be-updated layer and the target layer update path, and determining a target image frame corresponding to the to-be-processed image frame. According to the method, the target layer updating path is determined according to the to-be-updated layer, the corresponding intermediate cache data is determined according to the target layer updating path, and then the target image frame is determined according to the intermediate cache data, the to-be-updated layer and the target layer updating path, so that the length of a layer synthesis path is effectively reduced; and the intermediate cache data is used, so that the layer synthesis frequency is reduced, and the technical effect of improving the layer synthesis efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a layer synthesis method, device, electronic equipment and storage medium. Background Art

[0002] With the continuous development of terminal device technology, various functions can be realized by installing different applications on the terminal devices. In order to realize the functions provided by the applications, the central processing unit (CPU) and graphics processing unit (GPU) in the terminal devices are called to render images.

[0003] For example, the CPU can be used to control the GPU to complete image rendering. However, the traditional image rendering method is to detect changes in the layers in the image, and then synthesize the layers from bottom to top according to the layers of the changed image frame and the layer hierarchy to obtain an updated image frame, which leads to a longer layer synthesis path and reduces the image rendering efficiency. Summary of the invention

[0004] The present invention provides a layer synthesis method, device, electronic device and storage medium to improve the layer synthesis efficiency and solve the problem in the prior art that the layer synthesis path is too long and the image rendering efficiency is poor.

[0005] According to one aspect of the present invention, a layer synthesis method is provided, comprising:

[0006] Acquire an image frame to be processed, and determine a layer to be updated corresponding to the image frame to be processed;

[0007] Determine a target layer update path according to the layer to be updated, and determine a target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data;

[0008] Layer synthesis is performed based on the target layer synthesis cache, the layer to be updated and the target layer update path to determine a target image frame corresponding to the image frame to be processed.

[0009] According to another aspect of the present invention, there is provided a layer synthesis device, comprising: a to-be-updated layer determination module, which acquires an image frame to be processed and determines a to-be-updated layer corresponding to the image frame to be processed;

[0010] A target cache determination module is used to determine a target layer update path according to the layer to be updated, and determine a target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data;

[0011] The layer synthesis module is used to perform layer synthesis based on the target layer synthesis cache, the layer to be updated and the target layer update path, and determine the target image frame corresponding to the image frame to be processed.

[0012] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the layer synthesis method described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the layer synthesis method described in any embodiment of the present invention when executed by a processor.

[0017] The technical solution of the embodiment of the present invention obtains the image frame to be processed, and determines the layer to be updated corresponding to the image frame to be processed, and then determines the target layer update path according to the layer to be updated, and determines the target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to the historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data, and finally performs layer synthesis based on the target layer synthesis cache, the layer to be updated and the target layer update path to determine the target image frame corresponding to the image frame to be processed. Based on the above technical solution, the target layer update path is determined according to the layer to be updated, and the corresponding intermediate cache data is determined according to the target layer update path, and then the target image frame is determined according to the intermediate cache data, the layer to be updated and the target layer update path, which effectively reduces the length of the layer synthesis path, and uses the intermediate cache data to reduce the number of layer synthesis times, thereby achieving the technical effect of improving the efficiency of layer synthesis.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 It is a flowchart of a layer synthesis method provided by an embodiment of the present invention;

[0021] Figure 2 is a flow chart of a layer synthesis method provided by an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of establishing a layer synthesis cache provided by an embodiment of the present invention;

[0023] Figure 4 is a structural block diagram of a layer synthesis device provided by an embodiment of the present invention;

[0024] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] Embodiment 1

[0028] Figure 1 This is a flow chart of a layer synthesis method provided by an embodiment of the present invention. This embodiment can be applied to determine the layer update path corresponding to the image frame to be processed according to the layer changes in the image frame to be processed, and call the corresponding layer synthesis cache according to the layer update path to implement the image frame update. The method can be executed by a layer synthesis device, which can be implemented in the form of hardware and / or software. The layer synthesis device can be configured in an electronic device, which can be a terminal device or a server device, etc. Figure 1 As shown, the method includes:

[0029] S110, obtaining an image frame to be processed, and determining a layer to be updated corresponding to the image frame to be processed.

[0030] The image frame to be processed can be understood as an image frame that needs to be updated in layers. For example, the image frame to be processed can be acquired by monitoring the user's operation when the user's operation causes the image frame to be changed. The layer to be updated can be a layer whose layer information in the image frame to be processed has been changed. The layer information can be layer type, layer style, layer display content, etc.

[0031] Specifically, the image frame to be processed is obtained, and the image frame to be processed is parsed according to a preset processing tool to obtain layer information corresponding to the image frame to be processed, and the layer to be updated is determined according to the layer information. Alternatively, the image frame update instruction is obtained, and the layer to be updated in the image frame that needs to be updated is determined by parsing the image frame update instruction. For example, the instruction information can be generated by detecting user operations, image frame update requests, and other situations where image frame updates are required. The instruction information can include a unique identifier of the layer, and then the layer to be updated can be determined according to the layer identification information included in the instruction, and it is used as the layer to be updated.

[0032] On the basis of the above technical solution, the determination of the layer to be updated corresponding to the image frame to be processed includes: parsing the image frame to be processed to determine the layer information to be processed corresponding to the image frame to be processed; obtaining the historical layer information corresponding to the historical image frame, and determining the layer to be updated according to the layer information to be processed and the historical layer information.

[0033] The layer information to be processed may be the image information of the layer contained in the image frame to be processed. The historical image frame may be understood as the image frame corresponding to the image frame to be processed, usually the previous image frame of the image frame to be processed. The historical layer information may be the layer information corresponding to each layer in the historical image frame, and the layer information may include the position, size, pixel data and other information of the layer.

[0034] Specifically, the historical image frame corresponding to the current image frame to be processed is determined, for example, by obtaining the previous image frame of the current image frame to be processed and using it as the historical image frame corresponding to the current image frame to be processed. After determining the current image frame to be processed and the historical image frame, the layer information in the image frame can be parsed. It should be noted that for each layer in the image, the layer information corresponding to the current layer is extracted, which may include, for example, the layer level, position, size, transparency, color / texture data, etc. The layer information of the image frame to be processed is then compared with the layer information of the historical image frame. According to the comparison result, the changed layer is identified and the changed layer is used as the layer to be updated. For example, it can be determined whether the display content of the layer has changed or whether the type of the layer has changed.

[0035] On the basis of the above technical solution, the layer to be updated is determined according to the layer information to be processed and the historical layer information, including: determining the number of historical layers based on the historical layer information, and determining the number of layers to be processed according to the layer information to be processed; when the number of historical layers matches the number of layers to be processed, determining the layer to be updated according to the historical layer information and the layer information to be processed.

[0036] The number of historical layers may be understood as the total number of layers included in the historical image frames, and correspondingly, the number of to-be-processed layers may be the total number of layers included in the to-be-processed image frames.

[0037] Specifically, the number of historical layers is determined based on the historical layer information, and the number of layers to be processed is determined based on the layer information to be processed, and then when the number of historical layers matches the number of layers to be processed, the layers to be updated are determined based on the historical layer information and the layer information to be processed. For example, by traversing or querying the layer information associated with the historical image frames and the image frames to be processed, the total number of historical layers and layers to be processed is counted, and then the number of historical layers is compared with the number of layers to be processed. If the two are equal, the next step of layer information comparison can be performed; if they are not equal, it means that a large change has occurred between the image frame to be processed and the historical image frame, so it is necessary to perform layer synthesis in sequence according to the layer level of the image frame to be processed, delete the synthesis cache corresponding to the historical image frame stored in the layer cache space, and re-establish the synthesis cache corresponding to the image frame to be processed.

[0038] S120: Determine a target layer update path according to the layer to be updated, and determine a target layer synthesis cache based on the target layer update path.

[0039] The target layer update path may be the shortest layer synthesis path used for layer synthesis. The target layer synthesis cache may be understood as a layer synthesis cache that matches the target layer update path. The layer synthesis cache is intermediate cache data established based on historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data.

[0040] Specifically, the target layer update path is determined according to the layer to be updated, and the target layer synthesis cache is determined based on the target layer update path. It should be noted that in image or video processing, there is often a dependency relationship between layers. For example, a layer may cover another layer, or its content may be based on the output of other layers. In the process of layer synthesis, in order to improve the efficiency of layer synthesis, it is necessary to determine the target layer update path to improve the efficiency of layer synthesis. Exemplarily, a layer dependency graph can be constructed, in which nodes represent layers and edges represent dependencies between layers. Based on the layer dependency graph, the path from the bottom layer to each layer to be updated can be determined. After the target layer update path is determined, the layer synthesis cache corresponding to the target layer update path can be selected from the switching space according to the target layer update path as the target layer synthesis cache.

[0041] On the basis of the above technical solution, determining the target layer update path according to the layer to be updated includes: determining the layer level of each layer to be updated, and determining the target update layer according to the layer level of each layer to be updated; determining the target layer update path based on the layer level of the target update layer.

[0042] The layer level may be level information used to indicate the positional relationship of the layer in the image frame. The target update layer may be understood as the layer with the smallest layer level among the layers to be updated.

[0043] Specifically, the layer level of each layer to be updated is determined, and the target update layer is determined according to the layer level of each layer to be updated, and then the target layer update path is determined based on the layer level of the target update layer. It should be noted that each layer has a relative position or level in the image or video frame, which determines the coverage relationship of the layers during synthesis. The layer level is usually an integer, with layers with smaller values ​​at the bottom and layers with larger values ​​at the top. Then, the target update layer is determined according to the layer levels of each layer to be updated, the layer with the smallest layer level among the layers to be updated is used as the target update layer, and the target layer update path is determined according to the layer level of the target update layer.

[0044] On the basis of the above technical solution, the target layer update path is determined based on the layer level of the target update layer, including: determining at least one layer update path to be selected based on the layer level of the target update layer; determining the target layer update path corresponding to the target update layer from the at least one layer update path to be selected according to the shortest path principle.

[0045] The update path of the layer to be selected can be understood as an update path determined according to the layer level of the target update layer, and the update path of the layer to be selected can be one or more. The shortest path principle can be understood as the shortest layer synthesis path principle.

[0046] Specifically, at least one to-be-selected layer update path is determined based on the layer level of the target update layer, and then the target layer update path corresponding to the target update layer is determined from the at least one to-be-selected layer update path according to the shortest path principle. Exemplarily, for each path, its length is calculated by traversing each layer in the path, and then the number of steps required for layer synthesis is used as the path length of the synthesis path, and then the lengths of all to-be-selected layer update paths are compared to find the shortest path and use it as the target layer update path.

[0047] It should be noted that the technical solution of the embodiment of the present invention determines the layer synthesis path corresponding to the target update image by considering the layer synthesis cache stored in the cache space during the layer path determination process. For example, assuming there are five layers, layer A is the background layer [0,0,1024,768] with a layer order of 0; layer B is the status bar layer, [0,0,1024,32] with a layer order of 1; layer C is the toolbar layer [0,992,1024,32] with a layer order of 2; layer D is the setting application layer

[0048] [0,32,1024,704], the layer order is 3; layer E is the mouse layer [500,100,32,32, the layer order is 4; correspondingly, the cache space includes the following caches: D1 = A + B association table is

[0049] [1,1,0,0,0] Cache establishment type: Sequential model; D2 = A+B+C association table [1,1,1,0,0] Establishment type: Sequential model; D3 = A+B+C+D association table [1,1,1,1,0] Establishment type: Sequential model;

[0050] D4=A+C+D+E association table [1,0,1,1,1] establishment type: regional model; D5=A+B+D+E association table [1,1,0,1,1] establishment type: regional model. Further, based on the above content, when layer E is the target update layer, the layer update path corresponding to layer E includes: A+B+C+D+E; D1+C+D+E; D2+D+E; D3+E. Therefore, when only layer E changes, the tables corresponding to D1, D2, and D3 all meet the conditions, but only D3 has the smallest remaining path, which is 1. Therefore, the target layer update path corresponding to layer E is D3+E. Furthermore, when only layer B changes, the minimum path of D4 is 1. Use D4+B; when layers D and E change at the same time, the one that meets the conditions in the example is D2, and the synthesis path is D2+D+E. When layers B and E change at the same time, there is no corresponding cache in the example. First, use the full path to synthesize A+B+C+D+E, and then create a new cache when the hardware is idle as follows: D6 = A+C+D Association table [1,0,1,1,0] Establishment type: regional model. It should be noted that not all layers can establish a minimum path cache of only 1. For example, when the E layer is displayed above D, the minimum path of the change of layer D can only be D2+D+E.

[0051] On the basis of the above technical solution, the target layer synthesis cache is determined based on the target layer update path, including: obtaining a layer synthesis cache association table, and determining the target layer synthesis cache according to the target layer update path and the layer synthesis cache association table.

[0052] The layer composition cache association table is a pre-established mapping table for describing the association relationship between the layer composition cache and each layer.

[0053] Specifically, the target layer composition cache is determined by obtaining the layer composition cache association table and according to the target layer update path and the layer composition cache association table. For example, the current data of the layer composition cache association table is obtained through database query, memory mapping or other data storage mechanisms, and then the target layer update path is parsed to clarify the layers involved in the path and their processing order. According to the result of the path parsing, the layer combination corresponding to the target layer update path is determined, and the layer combination identifier is used to query in the layer composition cache association table to find the composition cache corresponding to the target layer update path. If there is cache data in the association table that fully matches the target layer combination, the cache data is used as the target layer composition cache.

[0054] S130, performing layer synthesis based on the target layer synthesis cache, the layer to be updated and the target layer update path, and determining a target image frame corresponding to the image frame to be processed.

[0055] The target image frame may be an updated image frame obtained by layer synthesis.

[0056] Specifically, the layer at the bottom layer is processed first. If the synthesis result of the bottom layer already exists in the cache, the cached data can be used directly, and then synthesized upward layer by layer in the order specified in the target layer update path. For each layer, it is necessary to consider the impact of the layers below it. When all the layers to be updated are processed according to the target layer update path, they are integrated into a complete image frame, which is the target image frame corresponding to the image frame to be processed.

[0057] The technical solution of the embodiment of the present invention obtains the image frame to be processed, and determines the layer to be updated corresponding to the image frame to be processed, and then determines the target layer update path according to the layer to be updated, and determines the target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to the historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data, and finally performs layer synthesis based on the target layer synthesis cache, the layer to be updated and the target layer update path to determine the target image frame corresponding to the image frame to be processed. Based on the above technical solution, the target layer update path is determined according to the layer to be updated, and the corresponding intermediate cache data is determined according to the target layer update path, and then the target image frame is determined according to the intermediate cache data, the layer to be updated and the target layer update path, which effectively reduces the length of the layer synthesis path, and uses the intermediate cache data to reduce the number of layer synthesis times, thereby achieving the technical effect of improving the efficiency of layer synthesis.

[0058] Embodiment 2

[0059] Figure 2 This is a flowchart of a layer synthesis method provided by an embodiment of the present invention. Based on the above embodiment, this embodiment further refines the technical solution of the above layer synthesis method. The specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same as or corresponding to the above embodiment are not repeated here.

[0060] like Figure 2 As shown, after determining the target image frame corresponding to the image frame to be processed, it also includes:

[0061] S210: Determine the layer composition cache to be released based on the layer level of the layer to be updated and the layer composition cache association table, and delete the layer composition cache to be released from the layer cache space.

[0062] The layer composition cache to be released can be understood as the layer composition cache that needs to be deleted, and the image composition cache contains the data of the historical layer that matches the layer level of the layer to be updated. The layer cache space can be understood as the cache space pre-established in the device cache for storing the layer composition cache.

[0063] Specifically, the layer composition cache to be released is determined based on the layer level of the layer to be updated and the layer composition cache association table, and the layer composition cache to be released is deleted from the layer cache space. Exemplarily, the layer composition cache association table is used to extract all cache items associated with the layer to be updated according to the relationship between the layer level of the layer to be updated and each layer cache. For each extracted cache item, the layer data on which the cache item depends has changed. Therefore, the extracted layer composition cache is marked as the layer composition cache to be released and deleted from the layer cache space.

[0064] S220. Determine a reusable historical layer from the historical layer information based on the layer level of the layer to be updated, determine a synthetic cache of the layer to be applied corresponding to the layer to be updated according to the reusable historical layer and the layer to be updated, and write the synthetic cache of the layer to be applied into the layer cache space.

[0065] The reusable historical layer can be understood as a layer whose data has not changed and whose layer level is below the layer level of the layer to be updated. The layer composition cache to be applied can be understood as a newly established layer composition cache associated with the layer to be updated.

[0066] Specifically, based on the layer level of the layer to be updated, the reusable historical layer is determined from the historical layer information, and the to-be-applied layer synthesis cache corresponding to the to-be-updated layer is determined according to the reusable historical layer and the to-be-updated layer, and the to-be-applied layer synthesis cache is written into the layer cache space. For example, Figure 3As shown, the layer level of the layer to be updated is used to determine from the historical layer information that the layer data has not changed, and the layer level of the layer is located below the layer level of the layer to be updated. The layer is used as a reusable historical layer. In order to ensure the synthesis efficiency during subsequent layer updates, the layer synthesis cache corresponding to the layer to be updated can be generated according to the reusable historical layer and the layer to be updated. Specifically, when performing layer synthesis for the current image frame, if the corresponding cache is not found, the frame signal is idle. It is necessary to calculate according to the sequence and area to determine whether the layer cache can be increased. The principle of increasing the layer synthesis cache is to synthesize the unchanged layers into a layer synthesis cache, and when the layer changes, the cache that uses this layer should also be marked invalid, and then the layer synthesis cache is re-established according to the above principle. It should be noted that when the number of layers changes, all caches need to be cleared and a new cache is re-established according to the above principle. When the number of layers changes, a batch of caches with a minimum path of only 1 are pre-established to increase the hit rate.

[0067] It should be noted that the technical solution provided by the embodiment of the present invention creates a new kernel node in the kernel and creates a cache list and a corresponding synthesis link. The more caches there are, the fewer remaining synthesis links there are. In the process of layer synthesis, according to the update requirements of the layer, appropriate caches and remaining links are selected to reduce the number of synthesis times and improve the frame rate.

[0068] The technical solution of the embodiment of the present invention obtains the image frame to be processed, and determines the layer to be updated corresponding to the image frame to be processed, and then determines the target layer update path according to the layer to be updated, and determines the target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to the historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data, and finally performs layer synthesis based on the target layer synthesis cache, the layer to be updated and the target layer update path to determine the target image frame corresponding to the image frame to be processed. Based on the above technical solution, the target layer update path is determined according to the layer to be updated, and the corresponding intermediate cache data is determined according to the target layer update path, and then the target image frame is determined according to the intermediate cache data, the layer to be updated and the target layer update path, which effectively reduces the length of the layer synthesis path, and uses the intermediate cache data to reduce the number of layer synthesis times, thereby achieving the technical effect of improving the efficiency of layer synthesis.

[0069] Embodiment 3

[0070] Figure 4 FIG. 1 is a structural block diagram of a layer synthesis device provided by an embodiment of the present invention. Figure 4 As shown, the device includes: a to-be-updated layer determination module 410 , a target cache determination module 420 , and a layer synthesis module 430 .

[0071] The to-be-updated layer determination module 410 acquires an image frame to be processed and determines a to-be-updated layer corresponding to the image frame to be processed;

[0072] The target cache determination module 420 is used to determine a target layer update path according to the layer to be updated, and determine a target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data;

[0073] The layer synthesis module 430 is used to perform layer synthesis based on the target layer synthesis cache, the layer to be updated and the target layer update path, and determine the target image frame corresponding to the image frame to be processed.

[0074] Based on the above technical solution, the target cache determination module is used to determine the layer level of each layer to be updated, and determine the target update layer according to the layer level of each layer to be updated; and determine the target layer update path based on the layer level of the target update layer.

[0075] On the basis of the above technical solution, the target cache determination module is used to determine at least one layer update path to be selected based on the layer level of the target update layer; and determine the target layer update path corresponding to the target update layer from the at least one layer update path to be selected according to the shortest path principle.

[0076] On the basis of the above technical solution, the target cache determination module is used to obtain a layer composition cache association table, and determine the target layer composition cache according to the target layer update path and the layer composition cache association table; wherein the layer composition cache association table is a pre-established mapping table for describing the association relationship between the layer composition cache and each layer;

[0077] On the basis of the above technical solution, the module for determining the layer to be updated is used to parse the image frame to be processed, determine the layer information to be processed corresponding to the image frame to be processed; obtain the historical layer information corresponding to the historical image frame, and determine the layer to be updated according to the layer information to be processed and the historical layer information.

[0078] On the basis of the above technical solution, the to-be-updated layer determination module is used to determine the number of historical layers based on the historical layer information, and to determine the number of to-be-processed layers according to the to-be-processed layer information; when the number of historical layers matches the number of to-be-processed layers, the to-be-updated layers are determined according to the historical layer information and the to-be-processed layer information.

[0079] On the basis of the above technical solution, the device also includes: a synthetic cache establishment module, which is used to determine the layer synthetic cache to be released based on the layer level of the layer to be updated and the layer synthetic cache association table after determining the target image frame corresponding to the image frame to be processed, and delete the layer synthetic cache to be released from the layer cache space; and / or, determine the reusable historical layer from the historical layer information based on the layer level of the layer to be updated, and determine the layer synthetic cache to be applied corresponding to the layer to be updated based on the reusable historical layer and the layer to be updated, and write the layer synthetic cache to be applied into the layer cache space.

[0080] The technical solution of the embodiment of the present invention obtains the image frame to be processed, and determines the layer to be updated corresponding to the image frame to be processed, and then determines the target layer update path according to the layer to be updated, and determines the target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to the historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data, and finally performs layer synthesis based on the target layer synthesis cache, the layer to be updated and the target layer update path to determine the target image frame corresponding to the image frame to be processed. Based on the above technical solution, the target layer update path is determined according to the layer to be updated, and the corresponding intermediate cache data is determined according to the target layer update path, and then the target image frame is determined according to the intermediate cache data, the layer to be updated and the target layer update path, which effectively reduces the length of the layer synthesis path, and uses the intermediate cache data to reduce the number of layer synthesis times, thereby achieving the technical effect of improving the efficiency of layer synthesis.

[0081] The layer synthesis device provided in the embodiment of the present invention can execute the layer synthesis method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0082] Embodiment 4

[0083] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0084] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0085] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0086] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a layer synthesis method.

[0087] In some embodiments, the layer synthesis method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the layer synthesis method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the layer synthesis method in any other appropriate manner (e.g., by means of firmware).

[0088] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0089] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0090] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0091] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0092] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0093] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0094] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0095] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A layer synthesis method, characterized in that: include: Acquire an image frame to be processed, and determine a layer to be updated corresponding to the image frame to be processed; Determine a target layer update path according to the layer to be updated, and determine a target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data; Layer synthesis is performed based on the target layer synthesis cache, the layer to be updated and the target layer update path to determine a target image frame corresponding to the image frame to be processed.

2. The method according to claim 1, characterized in that The step of determining a target layer update path according to the layer to be updated includes: Determine the layer level of each layer to be updated, and determine the target update layer according to the layer level of each layer to be updated; The target layer update path is determined based on the layer level of the target update layer.

3. The method according to claim 2, characterized in that The determining the target layer update path based on the layer level of the target update layer includes: Determine at least one layer update path to be selected based on the layer level corresponding to the target update layer; A target layer update path corresponding to the target update layer is determined from the at least one layer update path to be selected according to the shortest path principle.

4. The method according to claim 1, characterized in that The determining the target layer synthesis cache based on the target layer update path includes: Obtaining a layer composition cache association table, and determining the target layer composition cache according to the target layer update path and the layer composition cache association table; The layer composition cache association table is a pre-established mapping table for describing the association relationship between the layer composition cache and each layer.

5. The method according to claim 1, characterized in that The determining of the to-be-updated layer corresponding to the to-be-processed image frame comprises: Parsing the image frame to be processed to determine the layer information to be processed corresponding to the image frame to be processed; The historical layer information corresponding to the historical image frame is acquired, and the layer to be updated is determined according to the layer information to be processed and the historical layer information.

6. The method according to claim 5, characterized in that The determining the layer to be updated according to the layer information to be processed and the historical layer information includes: Determining the number of historical layers based on the historical layer information, and determining the number of layers to be processed based on the layer information to be processed; In the case where the number of the historical layers matches the number of the layers to be processed, the layers to be updated are determined according to the historical layer information and the layers to be processed information.

7. The method according to claim 1, characterized in that After determining the target image frame corresponding to the image frame to be processed, the method further includes: Determine the layer composition cache to be released based on the layer level of the layer to be updated and the layer composition cache association table, and delete the layer composition cache to be released from the layer cache space; and / or, Based on the layer level of the layer to be updated, a reusable historical layer is determined from the historical layer information, and a to-be-applied layer synthesis cache corresponding to the layer to be updated is determined according to the reusable historical layer and the layer to be updated, and the to-be-applied layer synthesis cache is written into the layer cache space.

8. A layer synthesis device, characterized in that: include: A to-be-updated layer determination module is configured to obtain an image frame to be processed and determine a to-be-updated layer corresponding to the image frame to be processed; A target cache determination module is used to determine a target layer update path according to the layer to be updated, and determine a target layer synthesis cache based on the target layer update path, wherein the layer synthesis cache is intermediate cache data established according to historical layer data; the intermediate cache data is obtained by synthesizing at least two layer data; The layer synthesis module is used to perform layer synthesis based on the target layer synthesis cache, the layer to be updated and the target layer update path, and determine the target image frame corresponding to the image frame to be processed.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the layer synthesis method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the layer synthesis method described in any one of claims 1-7 when executed.