Layer synthesis method, device, equipment, medium and program product

By judging the layer status in the Android system and performing layer synthesis in the cache overlay mode, the problem of high layer synthesis overhead is solved, the layer synthesis efficiency and system battery life are improved, and user interface lag is avoided.

CN114510207BActive Publication Date: 2024-09-13HANGZHOU YIKATONG ADVANCED MANUFACTURING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210190787.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2024-09-13
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

In the existing technology, the more layers there are in the layer synthesis process, the greater the synthesis overhead, resulting in high load on Surface Flinger, low synthesis efficiency, and even user interface freezes.

Method used

By judging whether the layer status of the current frame matches the preset synthesis scene, if it does, the changed layer will be overlaid with the cache layer in the cache overlay mode, reducing the number and cost of layer synthesis and improving synthesis efficiency.

Benefits of technology

It effectively reduces the number of layers during layer synthesis, improves synthesis efficiency, extends the battery life of the display system, and avoids user interface freezes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510207B
    Figure CN114510207B
Patent Text Reader

Abstract

The present application provides a layer synthesis method, device, equipment, medium and program product. First, the layer synthesis process is started, and then it is determined whether the layer state of the current frame meets the preset synthesis scene. The preset synthesis scene refers to a scene in which the display system has a first number of layers, and the first number of layers has a second number of layers that are not covered by other layers and change in consecutive frames. If it meets the requirements and it is determined that the display system is in a cache overlay mode, the second number of layers are superimposed on the cache layer to obtain a synthesized layer. The cache layer is synthesized with the unchanged layers in the first number of layers to achieve layer synthesis in the current synthesis scene and complete the update of the display screen. The layer synthesis method provided by the present application can greatly reduce the number of layers during layer synthesis, reduce synthesis overhead, and improve synthesis efficiency, thereby improving the battery life of the display system and avoiding the occurrence of user interface freezes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image display technology, and in particular to a layer synthesis method, device, equipment, medium and program product. Background Art

[0002] Surface Flinger is the display core of the Android system. It is responsible for unified synthesis and display of user-visible layers such as application interface, status bar, navigation system status, etc. Its synthesis efficiency will directly determine the smoothness of the system.

[0003] Current display systems, such as the Android display system, use a Z-order layer stack to record all the layers that need to be displayed in the system. An image synthesis is the process of superimposing all layers. The more layers there are, the greater the synthesis cost and the longer it takes. Even for scenes such as navigation, reading, audio and video playback, where only one or two layers change, the system needs to re-synthesize all layers, which is bound to be the root cause of the high load and low synthesis efficiency of Surface Flinger, and may even cause freezes in the user interface in complex display scenarios.

[0004] It can be seen that a layer synthesis solution is urgently needed to overcome the defects of current layer synthesis. Summary of the invention

[0005] The present application provides a layer synthesis method, device, equipment, medium and program product, which are used to solve the technical problem that the existing layer synthesis is to superimpose all layers to re-synthesize all layers, resulting in high synthesis overhead and low synthesis efficiency.

[0006] In a first aspect, the present application provides a layer synthesis method, comprising:

[0007] Start the layer synthesis process;

[0008] Determining whether the layer state of the current frame conforms to a preset synthesis scene, where the preset synthesis scene refers to a scene in which the display system has a first number of layers, and a second number of layers among the first number of layers are not covered by other layers and change in consecutive frames;

[0009] If so, when it is determined that the display system is in the cache overlay mode, the second number of layers are overlaid with the cache layer to obtain a composite layer, and the cache layer is composited with unchanged layers of the first number of layers.

[0010] In a possible design, before the display system is in the cache overlay mode for the first time, the method further includes:

[0011] Rendering unchanged layers among the first number of layers onto the cache layer, the cache layer being generated by the layer synthesis process when the display system is initialized;

[0012] A main layer stack of the display system is backed up, and the display system is set to be in the cache overlay mode, wherein the main layer stack includes the first number of layers.

[0013] In a possible design, if it is determined that the layer state of the current frame does not conform to the preset synthesis scene, the method further includes:

[0014] Determining whether the display system is in a cache overlay mode;

[0015] If so, clear the cache layer, restore the main layer stack and set the display system to exit the cache overlay mode to obtain the synthesized layer in native mode;

[0016] If not, the composite layer is obtained using native mode.

[0017] In a possible design, the determining whether the layer state of the current frame conforms to the preset synthesis scene includes:

[0018] Determining whether the first number is greater than a first preset number and whether the attributes of the first number of layers are unchanged;

[0019] Determining whether the second number is less than a second preset number, and whether the second number of layers are not covered by the other layers;

[0020] Determining whether the second number of layers in the current frame and the previous frame are the same layers;

[0021] If all the judgment results are yes, it is determined that the layer state of the current frame meets the preset synthesis scene.

[0022] In a possible design, after obtaining the composite layer, the method further includes:

[0023] The synthesized layer is sent to a display device to complete the picture update of the current frame.

[0024] In one possible design, the display system includes a vehicle-mounted display system or a mobile phone display system.

[0025] In a second aspect, the present application provides a layer synthesis device, comprising:

[0026] The startup module is used to start the layer synthesis process;

[0027] A determination module, used to determine whether the layer state of the current frame conforms to a preset synthesis scene, wherein the preset synthesis scene refers to a scene in which the display system has a first number of layers, and a second number of layers among the first number of layers are not covered by other layers and change in consecutive frames;

[0028] A processing module is used to, if it is determined that the layer state of the current frame conforms to the preset synthesis scene and when it is determined that the display system is in a cache overlay mode, overlay the second number of layers with the cache layer to obtain a synthesized layer, on which the unchanged layers of the first number of layers are synthesized.

[0029] In a possible design, the layer synthesis device further includes: a cache mode initialization module; the cache mode initialization module is used to:

[0030] Rendering unchanged layers among the first number of layers onto the cache layer, the cache layer being generated by the layer synthesis process when the display system is initialized;

[0031] A main layer stack of the display system is backed up, and the display system is set to be in the cache overlay mode, wherein the main layer stack includes the first number of layers.

[0032] In a possible design, if it is determined that the layer state of the current frame does not conform to the preset synthesis scene, the processing module is further used to:

[0033] Determining whether the display system is in a cache overlay mode;

[0034] If so, clear the cache layer, restore the main layer stack and set the display system to exit the cache overlay mode to obtain the synthesized layer in native mode;

[0035] If not, the composite layer is obtained using native mode.

[0036] In a possible design, the judgment module is specifically used to:

[0037] Determining whether the first number is greater than a first preset number and whether the attributes of the first number of layers are unchanged;

[0038] Determining whether the second number is less than a second preset number, and whether the second number of layers are not covered by the other layers;

[0039] Determining whether the second number of layers in the current frame and the previous frame are the same layers;

[0040] If all the judgment results are yes, it is determined that the layer state of the current frame meets the preset synthesis scene.

[0041] In a possible design, the layer synthesis device further includes: a sending module; the sending module is used to:

[0042] The synthesized layer is sent to a display device to complete the picture update of the current frame.

[0043] In one possible design, the display system includes a vehicle-mounted display system or a mobile phone display system.

[0044] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0045] The memory stores computer-executable instructions;

[0046] The processor executes the computer-executable instructions stored in the memory to implement any possible layer synthesis method provided in the first aspect.

[0047] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement any possible layer synthesis method provided in the first aspect.

[0048] In a fifth aspect, the present application provides a computer program product, comprising computer execution instructions, which, when executed by a processor, are used to implement any possible layer synthesis method provided in the first aspect.

[0049] The present application provides a layer synthesis method, device, equipment, medium and program product. First, the layer synthesis process is started, and then the layer state of the current frame is determined to be consistent with the preset synthesis scene. The preset synthesis scene refers to a scene in which the display system has a first number of layers, and a second number of layers in the first number of layers are not covered by other layers and change in consecutive frames. If it meets the requirements, and when it is determined that the display system is in a cache overlay mode, the second number of layers are superimposed with the cache layer to obtain a synthesized layer, so as to realize the layer synthesis in the current synthesis scene and complete the update of the display screen. The layer synthesis method provided by the present application can greatly reduce the number of layers during layer synthesis, reduce the synthesis overhead, and improve the synthesis efficiency, thereby improving the battery life of the display system and avoiding the occurrence of user interface freezes. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0051] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0052] Figure 2 A schematic diagram of a process of layer synthesis method provided in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of a process flow of another layer synthesis method provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of a process flow of another layer synthesis method provided in an embodiment of the present application;

[0055] Figure 5 A schematic diagram of a layer synthesis process provided in an embodiment of the present application;

[0056] Figure 6 A schematic diagram of the structure of a layer synthesis device provided in an embodiment of the present application;

[0057] Figure 7 A schematic diagram of the structure of another layer synthesis device provided in an embodiment of the present application;

[0058] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of methods and devices consistent with some aspects of the present application as detailed in the appended claims.

[0060] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations 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.

[0061] Current display systems, such as the Android display system, use a Z-order layer stack to record all the layers that need to be displayed in the system. An image synthesis is the process of superimposing all layers. The more layers there are, the greater the synthesis cost and the longer it takes. Even for scenes such as navigation, reading, audio and video playback, where only one or two layers change, the system needs to re-synthesize all layers, which is bound to be the root cause of the high load and low synthesis efficiency of Surface Flinger, and may even cause freezes in the user interface in complex display scenarios.

[0062] In response to the above-mentioned problems existing in the prior art, the present application provides a layer synthesis method, device, equipment, medium and program product. The inventive concept of the layer synthesis method provided by the present application is: to judge the scenes in which the system layer composition of navigation, reading, audio and video playback is fixed, the content update layer is small and is not blocked by other layers. If the layer state of the current frame meets the scene, when the display system needs to synthesize the layer for display, the display screen can be updated by directly synthesizing the cache layer and the change layer once. Among them, the cache layer can be created when it meets the scene, and the unchanged layer of the display system is rendered on it, so that the unchanged layer and the change layer of the display system can be separated. Using this layer synthesis method for layer synthesis does not require synthesizing all layers each time, thereby greatly reducing the number of layers during system synthesis and improving synthesis efficiency, thereby improving the battery life of the display system and reducing the occurrence of user interface freezes.

[0063] The following is an introduction to exemplary application scenarios of the embodiments of the present application.

[0064] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application, such as Figure 1As shown, the vehicle 100 is equipped with an in-vehicle display system 101, such as an Android display system, which is used to provide infotainment functions for the vehicle, such as navigation, reading, audio and video playback, etc. Among them, SurfaceFlinger is the display core of the in-vehicle display system 101, responsible for unified synthesis and display of user-visible layers such as application interface, status bar, navigation system status, etc. The layer synthesis method provided in the embodiment of the present application can execute the layer synthesis method provided in the embodiment of the present application when using SurfaceFlinger running in the in-vehicle display system 101 for layer synthesis.

[0065] The electronic device 102 may be configured as a corresponding hardware device capable of executing the layer synthesis method provided in the embodiment of the present application. The electronic device 102 may be a computer, a TCU (Transmission Control Unit) control unit, etc. The embodiment of the present application does not limit the type of the electronic device 102. Figure 1 The electronic device 102 in the figure is shown by taking a computer as an example.

[0066] It should be noted that the above application scenarios are only schematically illustrated by taking the vehicle display system as an example of a system for performing layer synthesis, and the layer synthesis method provided in the embodiment of the present application can also perform layer synthesis for other display systems such as mobile phone display systems. The layer synthesis method, device, equipment, medium and program product provided in the embodiment of the present application include but are not limited to the above application scenarios.

[0067] Figure 2 The following is a flow chart of a layer synthesis method provided in an embodiment of the present application. Figure 2 As shown, the layer synthesis method provided in the embodiment of the present application includes:

[0068] S101: Start the layer synthesis process.

[0069] This step is the entry point for the display system to perform layer synthesis. For example, after SurfaceFlinger receives a refresh message of a vertical synchronization signal (Vsync), it starts to synthesize a new display screen for the display device. In other words, for example, the layer synthesis process can be started in response to the vertical synchronization signal, and the layer synthesis process is SurfaceFlinger.

[0070] S102: Determine whether the layer state of the current frame conforms to a preset synthesis scene.

[0071] The preset synthetic scene refers to a scene in which the display system has a first number of layers, and a second number of layers among the first number of layers are not covered by other layers and change in consecutive frames.

[0072] Determine whether the layer status of the current frame conforms to the preset synthesis scene. The preset synthesis scene refers to a scene in which the display system has a large number of layers but only a small number of layers are not covered by other layers and change in consecutive frames, wherein a large number of layers are represented by a first number of layers, and a small number of layers in the first number of layers that are not covered by other layers and change in consecutive frames are represented by a second number of layers. Obviously, the second number is smaller than the first number. The specific values ​​of the first number and the second number are determined by the actual display interface, which is used to display navigation, reading, audio and video playback and other states.

[0073] The layer state of the current frame is used to represent the state of the layer corresponding to the picture that needs to be updated in the current frame. The embodiment of the present application does not limit the specific content of the layer corresponding to the picture that needs to be updated, which is specifically determined by the content of the displayed picture.

[0074] S103: If yes, when it is determined that the display system is in the cache overlay mode, the second number of layers are overlaid with the cache layer to obtain a composite layer.

[0075] The cache layer is synthesized with unchanged layers of the first number of layers.

[0076] After determining that the layer state of the current frame meets the preset synthesis scene, that is, the judgment result is yes, then when it is further determined that the display system is in the cache overlay mode, the second number of layers, that is, the small number of layers in the first number of layers that are not covered by other layers and change in continuous frames, are superimposed with the cache layer to obtain a synthesized layer. The update of the display screen can be completed by performing one synthesis, and there is no need to re-synthesize all layers for the scene where only a small number of layers have changed as in the prior art.

[0077] The cache layer is synthesized with unchanged layers among the first number of layers, and the unchanged layers refer to layers that do not need to be changed in the current frame relative to the second number of layers.

[0078] The layer synthesis method provided in the embodiment of the present application first starts the layer synthesis process, then determines whether the layer state of the current frame meets the preset synthesis scene, and if so, when it is determined that the display system is in the cache overlay mode, the second number of layers are superimposed on the cache layer to obtain a synthesized layer, wherein the unchanged layers of the first number of layers are synthesized on the cache layer, so as to realize the layer synthesis in the current synthesis scene and complete the update of the display screen. The layer synthesis method provided in the embodiment of the present application can greatly reduce the number of layers during layer synthesis, reduce the synthesis overhead, and improve the synthesis efficiency, thereby improving the battery life of the display system and avoiding the occurrence of user interface freezes.

[0079] Figure 3A schematic diagram of another layer synthesis method provided in an embodiment of the present application. Figure 3 As shown, the layer synthesis method provided in the embodiment of the present application includes:

[0080] S201: Start the layer synthesis process.

[0081] The implementation method, principle and technical effect of step S201 are similar to those of step S101. For details, please refer to the above specific description and will not be repeated here.

[0082] S202: Determine whether the layer state of the current frame conforms to a preset synthesis scene.

[0083] Perform scene recognition on the layer state of the current frame to determine whether it conforms to the preset synthesis scene.

[0084] In a possible design, possible implementations of step S202 include:

[0085] Determine whether the first number is greater than a first preset number, and whether the attributes of the first number of layers are unchanged;

[0086] Determine whether the second number is less than a second preset number, and whether the second number of layers are not covered by other layers;

[0087] It is determined whether a second number of layers in a current frame and a previous frame are the same layers.

[0088] Specifically, it is determined whether the number of the first number of layers of the display system, i.e., the first number, is greater than the first preset number to determine whether the display system has a large number of layers, and the value of the first preset number is determined by actual conditions. And whether the attributes of the first number of layers are unchanged. The attributes can be understood as the attributes of the display screen expressed by the layer.

[0089] It is determined whether the second number of layers in the first number of layers of the display system is less than a second preset number to determine whether a small number of layers in the display system are changing, where the value of the second preset number is determined by actual conditions. And whether the second number of layers are not covered by other layers.

[0090] Determine whether the changed layer changes in consecutive frames, that is, whether the layer that changes in the current frame is the same layer as the layer that changed in the previous frame.

[0091] After judgment, if the judgment results of the above steps are all yes, it means that the layer state of the current frame meets the preset synthesis scene, and step S203 is executed. On the contrary, if at least one of the judgment results of the above steps is no, it means that the layer state of the current frame does not meet the preset synthesis scene, and step S204 is executed.

[0092] S203: If yes, determine that the layer state of the current frame meets the preset synthesis scene.

[0093] S204: If not, determine that the layer state of the current frame does not conform to the preset synthesis scene.

[0094] When it is determined that the layer state of the current frame meets the preset synthesis scene, that is, after step S203 is executed, step S205 is further executed.

[0095] S205: Determine whether the display system is in a cache overlay mode.

[0096] S206: If yes, superimpose the second number of layers and the cached layer to obtain a composite layer.

[0097] S207: If not, setting the display system to be in a cache overlay mode.

[0098] In step S205, it is determined whether the display system is in the cache overlay mode. If so, the layers are directly overlaid to obtain a composite layer, that is, the second number of layers are overlaid with the cache layer to obtain a composite layer, and step S206 is executed.

[0099] If it is determined in step S205 that the display system is not in the cache overlay mode, this situation usually occurs before the display system is in the cache overlay mode for the first time, then it is necessary to set the state of the display system to be in the cache overlay mode, that is, execute step S207 to put the display system in the cache overlay mode, and then execute the overlay step in step S206 to overlay the second number of layers with the cache layer to obtain a composite layer.

[0100] In the process of setting the display system to be in the cache overlay mode, the unchanged layer is rendered onto the cache layer, and then the second number of layers can be overlaid with the cache layer to obtain a composite layer.

[0101] When it is determined that the layer state of the current frame does not conform to the preset synthesis scene, that is, after step S204 is executed, step S208 is further executed.

[0102] S208: Determine whether the display system is in a cache overlay mode.

[0103] S209: If not, adopt the native mode to obtain the composite layer.

[0104] S2010: If yes, clear the cache layer, restore the main layer stack and set the display system to exit the cache overlay mode.

[0105] In step S208, it is determined whether the display system is in the cache overlay mode. If not, that is, the display system is not in the cache overlay mode, the native mode is used to obtain the composite layer, that is, step S209 is executed. The native mode can be other composite modes other than the cache overlay mode, such as the corresponding method of synthesizing all layers in the prior art.

[0106] On the contrary, if it is determined in step S208 that the display system is not in the cache overlay mode, that is, the judgment result is yes, but because the layer state of the current frame does not conform to the preset synthesis scene, it is necessary to clear the cache layer maintained in the cache overlay mode, restore the main layer stack and set the display system to exit the cache overlay mode, that is, execute step S2010, and then further execute step S209 to use the native mode to obtain the synthetic layer.

[0107] The main layer stack includes a first number of layers of the display system, and the main layer stack is backed up during the process of setting the display system to be in a cache overlay mode.

[0108] S2011: Send the composite layer to the display device to complete the image update of the current frame.

[0109] After the composite layer is obtained in the above step S206 or step S209, the composite layer is sent to the display device so that the display device displays the picture and completes the picture update of the current frame.

[0110] The layer synthesis method provided in the embodiment of the present application determines whether the layer state of the current frame meets the preset synthesis scene after starting the layer synthesis process. If it meets the requirements, it is further determined whether the display system is in the cache overlay mode. If it is in the cache overlay mode, the second number of layers are superimposed on the cache layer to obtain a synthesized layer, and the unchanged layers of the first number of layers are synthesized on the cache layer. If it is not in the cache overlay mode, the display system is set to be in the cache overlay mode, and then the second number of layers are superimposed on the cache layer to obtain a synthesized layer. However, if the layer state of the current frame does not meet the preset synthesis scene, the native mode is used to obtain the synthesized layer. If the display system is in the cache overlay mode at this time, it is also necessary to clear the cache layer, restore the main layer stack, and set the display system to exit the cache overlay mode. After obtaining the synthesized layer, the synthesized layer is sent to the display device to complete the screen update of the current frame. The layer synthesis method provided in the embodiment of the present application determines whether the layer state of the current frame is in a preset synthesis scene, and when it meets the requirements, the cache overlay mode is used to directly overlay the second number of layers with the cache layer to obtain a synthesized layer, which greatly reduces the number of layers in layer synthesis, reduces the synthesis overhead, and improves the synthesis efficiency, thereby improving the battery life of the system and avoiding the occurrence of user interface freezes.

[0111] Based on the above embodiment, before the display system is in the cache overlay mode for the first time, the layer synthesis method provided in the embodiment of the present application further includes: Figure 4 Steps shown. Figure 4 The following is a flow chart of another layer synthesis method provided in the embodiment of the present application. Figure 4 As shown, the layer synthesis method provided in the embodiment of the present application includes:

[0112] S301: Render unchanged layers among the first number of layers onto a cache layer.

[0113] Among them, the cache layer is generated by the layer synthesis process when the display system is initialized.

[0114] The cache layer is generated by the layer synthesis process when the display system is initialized. For example, a cache layer of the size of a display screen can be created. Then, the unchanged layers of the first number of layers are rendered onto the cache layer, so that the unchanged layers of the first number of layers are synthesized onto the cache layer. For example, the area of ​​the size of a display screen is the area where the unchanged layers of the display system are located, so that the unchanged layers and the changed layers of the display system can be separated.

[0115] S302: Back up the main layer stack of the display system, and set the display system to be in a cache overlay mode.

[0116] The main layer stack includes a first number of layers.

[0117] The first number of layers of the display system are backed up, and the collection of the first number of layers can be regarded as the main layer stack, that is, the main layer stack of the backup display system. Then the display system is set to be in a cache overlay mode, so that when the layer state of the current frame meets the preset synthesis scene, the second number of layers and the cache layer are directly used for overlay, and the required layers are synthesized at one time to complete the display screen update.

[0118] The layer synthesis method provided in the embodiment of the present application renders unchanged layers in the first number of layers onto the cache layer before the display system is in the cache overlay mode for the first time to update the cache layer, backs up the main layer stack of the display system, and sets the display system in the cache overlay mode, so that when the layer state of the current frame meets the preset synthesis scene, the second number of layers can be superimposed on the cache layer to obtain a synthesized layer at one time, without the need to synthesize all layers in the prior art, which greatly reduces the number of layers during layer synthesis. In addition, the only overhead of the layer synthesis method provided in the embodiment of the present application is to generate the cache layer and update the cache layer, which can significantly reduce the synthesis overhead compared with the prior art, thereby improving the synthesis efficiency.

[0119] Figure 5A schematic diagram of a layer synthesis process provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, Figure 5 (a) shows the synthesis process of the prior art, Figure 5 (b) shows the synthesis process of the layer synthesis method provided by the embodiment of the present application, in which both of them are only "lyrics" (i.e. Figure 5 The synthesis process when the LRC in the lyrics changes. If the existing technology is used for synthesis, all layers participate in the synthesis. If the layer synthesis method provided in the embodiment of the present application is used, if the "lyrics" occur, it means that layer 1 and layer 3 have changed. It is only necessary to superimpose layer 1 and layer 3 with the remaining unchanged layers 2, 4, 5, and 6. The layers actually participating in the synthesis are only layers 1 and 3. Compared with the two, the number of synthesized layers is significantly reduced, the time consumption of synthesizing layers is shortened, and the synthesis efficiency is improved. Figure 5 The layers that actually participate in the synthesis are indicated by slash columns.

[0120] Figure 6 This is a schematic diagram of the structure of a layer synthesis device provided in an embodiment of the present application. Figure 6 As shown, the layer synthesis device 400 provided in the embodiment of the present application includes:

[0121] A start module 401 is used to start the layer synthesis process;

[0122] The judging module 402 is used to judge whether the layer state of the current frame meets the preset synthesis scene, where the preset synthesis scene refers to a scene in which the display system has a first number of layers, and a second number of layers among the first number of layers are not covered by other layers and change in consecutive frames;

[0123] Processing module 403 is used to, if it is determined that the layer state of the current frame meets the preset synthesis scene, and when it is determined that the display system is in the cache overlay mode, superimpose the second number of layers with the cache layer to obtain a synthesized layer, and the cache layer is synthesized with the unchanged layers of the first number of layers.

[0124] exist Figure 6 On the basis of Figure 7 This is a schematic diagram of the structure of another layer synthesis device provided in an embodiment of the present application. Figure 7 As shown, the layer synthesis device 400 provided in the embodiment of the present application further includes: a cache mode initialization module 404. The cache mode initialization module 404 is used to:

[0125] Rendering unchanged layers in the first number of layers onto a cache layer, where the cache layer is generated by a layer synthesis process when the display system is initialized;

[0126] A main layer stack of the display system is backed up, and the display system is set to be in a cache overlay mode, wherein the main layer stack includes a first number of layers.

[0127] In a possible design, if it is determined that the layer state of the current frame does not conform to the preset synthesis scene, the processing module 403 is further used to:

[0128] Determine whether the display system is in cache overlay mode;

[0129] If so, clear the cache layer, restore the main layer stack and set the display system to exit the cache overlay mode to obtain the composite layer in native mode;

[0130] If not, use native mode to get the composite layer.

[0131] In a possible design, the determination module 402 is specifically configured to:

[0132] Determine whether the first number is greater than a first preset number, and whether the attributes of the first number of layers are unchanged;

[0133] Determine whether the second number is less than a second preset number, and whether the second number of layers are not covered by other layers;

[0134] Determine whether the second number of layers in the current frame and the previous frame are the same layer;

[0135] If all the judgment results are yes, it is determined that the layer state of the current frame meets the preset synthesis scene.

[0136] In a possible design, the layer synthesis device further includes: a sending module. The sending module is used to:

[0137] Send the composite layer to the display device to complete the image update of the current frame.

[0138] In one possible design, the display system includes a vehicle-mounted display system or a mobile phone display system.

[0139] The layer synthesis device provided in the embodiment of the present application can execute the corresponding steps of the layer synthesis method in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.

[0140] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 500 may include: a processor 501 , and a memory 502 communicatively connected to the processor 501 .

[0141] The memory 502 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer-executable instructions.

[0142] The memory 502 may include a high-speed RAM memory, and may also include a non-volatile memory (MoM-volatile memory), such as at least one disk memory.

[0143] The processor 501 is used to execute the computer-executable instructions stored in the memory 502 to implement the layer synthesis method.

[0144] The processor 501 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0145] Optionally, the memory 502 may be independent or integrated with the processor 501. When the memory 502 is a device independent of the processor 501, the electronic device 500 may further include:

[0146] The bus 503 is used to connect the processor 501 and the memory 502. The bus can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.

[0147] Optionally, in a specific implementation, if the memory 502 and the processor 501 are integrated on a chip, the memory 502 and the processor 501 can communicate through an internal interface.

[0148] The present application also provides a computer-readable storage medium, which may include: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores computer execution instructions, and the computer execution instructions are used for the layer synthesis method in the above embodiment.

[0149] The present application also provides a computer program product, including computer instructions, which implement the layer synthesis method in the above embodiment when executed by a processor.

[0150] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

[0151] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A layer synthesis method, characterized in that: include: Start the layer synthesis process; Determining whether the layer state of the current frame conforms to a preset synthesis scene, wherein the preset synthesis scene refers to a scene in which the display system has a first number of layers with fixed attributes, and a second number of layers among the first number of layers are not covered by other layers and change in consecutive frames; wherein the second number is less than the first number; If yes, when it is determined that the display system is in the cache overlay mode, the second number of layers are overlaid with the cache layer to obtain a composite layer, wherein the unchanged layers of the first number of layers are composited on the cache layer; The determining whether the layer state of the current frame conforms to the preset synthesis scene includes: Determining whether the first number is greater than a first preset number and whether the attributes of the first number of layers are unchanged; Determining whether the second number is less than a second preset number, and whether the second number of layers are not covered by the other layers; Determining whether the second number of layers in the current frame and the previous frame are the same layers; If all the judgment results are yes, determining that the layer state of the current frame meets the preset synthesis scene; Before the display system is in the cache overlay mode for the first time, the method further includes: Rendering unchanged layers among the first number of layers onto the cache layer, the cache layer being generated by the layer synthesis process when the display system is initialized; A main layer stack of the display system is backed up, and the display system is set to be in the cache overlay mode, wherein the main layer stack includes the first number of layers.

2. The layer synthesis method according to claim 1, characterized in that: If it is determined that the layer state of the current frame does not conform to the preset synthesis scene, the method further includes: Determining whether the display system is in a cache overlay mode; If so, clear the cache layer, restore the main layer stack and set the display system to exit the cache overlay mode to obtain the synthesized layer in native mode; If not, the composite layer is obtained using native mode.

3. The layer synthesis method according to claim 1, characterized in that: After obtaining the composite layer, the method further includes: The synthesized layer is sent to a display device to complete the picture update of the current frame.

4. The layer synthesis method according to claim 3, characterized in that: The display system includes a vehicle-mounted display system or a mobile phone display system.

5. A layer synthesis device, characterized in that: include: The startup module is used to start the layer synthesis process; A judgment module, used to judge whether the layer state of the current frame conforms to a preset synthesis scene, wherein the preset synthesis scene refers to a scene in which the display system has a first number of layers with fixed attributes, and a second number of layers among the first number of layers are not covered by other layers and change in consecutive frames; wherein the second number is less than the first number; a processing module, configured to, if it is determined that the layer state of the current frame conforms to the preset synthesis scene and when it is determined that the display system is in a cache overlay mode, overlay the second number of layers with the cache layer to obtain a synthesized layer, wherein the cache layer is synthesized with unchanged layers of the first number of layers; The judging module is specifically configured to judge whether the first number is greater than a first preset number, and whether the attributes of the first number of layers are unchanged; Determining whether the second number is less than a second preset number, and whether the second number of layers are not covered by the other layers; Determining whether the second number of layers in the current frame and the previous frame are the same layers; If all the judgment results are yes, determining that the layer state of the current frame meets the preset synthesis scene; A cache mode initialization module is used to render unchanged layers among the first number of layers onto the cache layer before the display system is in the cache overlay mode for the first time, the cache layer being generated by the layer synthesis process when the display system is initialized; back up the main layer stack of the display system, and set the display system to be in the cache overlay mode, the main layer stack including the first number of layers.

6. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the layer synthesis method as described in any one of claims 1 to 5.

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

8. A computer program product, comprising computer executable instructions, which, when executed by a processor, are used to implement the layer synthesis method described in any one of claims 1 to 4.