Layer dumping method and electronic device
Patent Information
- Application Number
- CN202510577298.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-11-03
AI Technical Summary
During the user's drawing process, when layer texture data is written to disk, the amount of data exchange between the CPU and GPU is large, resulting in high performance consumption of electronic devices and affecting the responsiveness and display performance during the drawing process.
By acquiring information about the texture change areas of the layer through the graphics processor, copying the data of the texture change areas to shared memory, and then having the central processing unit write it to memory, the amount of data exchange between the CPU and GPU is reduced, thereby improving data exchange efficiency.
This reduces the amount of data exchange between the CPU and GPU during the layer-to-disk process, improves data exchange efficiency, reduces performance consumption on electronic devices, and enhances the user experience.
Smart Images

Figure CN123032525A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method for applying layers to a disk and an electronic device. Background Technology
[0002] Currently, users can draw on electronic devices. During the drawing process, the texture data of the layers is particularly important. In order to prevent the loss of texture data in extreme cases such as software crashes or device shutdown due to low battery, the texture data must be written to disk frequently (i.e., layer-to-disk or layer-texture-to-disk) to avoid texture data loss.
[0003] Writing a layer's texture data to disk requires the central processing unit (CPU) to download the entire texture data of the layer from the graphics processing unit (GPU) and save it to disk. However, as users' demands for the number and size of layers in their artwork increase, the large amount of data exchange between the CPU and GPU during the disk writing process leads to high performance consumption of electronic devices, affecting the responsiveness and display performance of the artwork, and impacting the user experience. Summary of the Invention
[0004] This application provides a layer-to-disk method and an electronic device to reduce the amount of data exchange between the CPU and GPU during the layer-to-disk process, improve the data exchange efficiency between the CPU and GPU, and reduce the performance consumption of the electronic device.
[0005] Firstly, this application provides a method for writing layers to disk, which can be applied to electronic devices, including graphics processing units (such as GPUs) and central processing units (such as CPUs). In this method, when a layer texture download is triggered, the graphics processing unit obtains information about the texture change areas of the layer, where the texture change areas are the areas where the texture of the layer has changed between the current layer texture download and the previous layer texture download; based on the information about the texture change areas, the graphics processing unit copies the texture data of the texture change areas to shared memory, which is accessible to both the graphics processing unit and the CPU; the CPU writes the texture data stored in the shared memory to a storage device (such as a disk).
[0006] In this method, during the layer write process, the graphics processor (such as GPU) obtains information about the texture change areas of the layer and copies the texture data to shared memory based on the information about the texture change areas. The graphics processor and the central processing unit (such as CPU) only exchange texture data of the texture change areas of the layer, without exchanging the texture data of the entire layer. This can reduce the amount of data exchange between the central processing unit and the graphics processor, improve the data exchange efficiency between the central processing unit and the graphics processor, and reduce the performance consumption of electronic devices.
[0007] In some implementations, the graphics processor obtains information about the texture change region of the layer, including: the graphics processor obtaining the drawing content that has changed between the current layer texture download and the previous layer texture download; the graphics processor determining at least one rectangular region surrounding the changed drawing content, and this at least one rectangular region being the texture change region.
[0008] The above implementation method can accurately locate the texture change area in the layer, avoiding an increase in the amount of data exchanged between the graphics processor and the central processing unit due to the texture change area being too large.
[0009] In some implementations, the graphics processor obtains information about the texture change areas of the layer, including: the graphics processor obtains the drawing content that has changed between the current layer texture download and the previous layer texture download; the graphics processor marks N layer partitions with changed drawing content in the M layer partitions of the layer, and these N layer partitions are texture change areas, where M and N are integers, and N is less than or equal to M.
[0010] In the above implementation method, the layer partitions can be divided by means of fixed size partitions, and the texture change area in the layer can be determined by the layer partitions, which can make the acquisition of information on the texture change area more concise and efficient.
[0011] In some implementations, before the CPU writes the texture data stored in the shared memory to the memory, the method further includes: the graphics processor copying information about the texture change regions of the layer to the shared memory; the CPU writing the texture data stored in the shared memory to the memory includes: the CPU determining the storage location of the texture change regions in the memory based on the information about the texture change regions; and the CPU writing the texture data to the memory based on the storage location.
[0012] The above implementation method enables the central processing unit to quickly locate the storage location of texture data in memory based on the information of the texture change area, and write the texture data into memory.
[0013] In some implementations, layer texture download is triggered by at least one of the following conditions: the number of strokes drawn by the user is greater than or equal to a first threshold since the last layer texture download; the time interval since the last layer texture download is greater than or equal to a second threshold; a layer switching operation; an operation to save the artwork including the layer; or an operation to close the artwork including the layer.
[0014] The above implementation method can support triggering layer texture download based on the number of strokes drawn by the user on the layer, such as brush drawing, filtering, and transformation. It can also be triggered by the time interval of layer texture download, layer switching operations, etc., which helps to ensure the reliability of texture data storage and avoid texture data loss.
[0015] In some implementations, shared memory is part of the video memory associated with the graphics processor, and the shared memory is mapped into the address space of the central processing unit.
[0016] In some implementations, after copying the texture data of the texture change region to shared memory, the method further includes: the graphics processor clearing the information of the texture change region corresponding to the current layer texture download.
[0017] The above implementation method can avoid the problem of increased data exchange between the central processing unit and the graphics processing unit due to the overlapping of texture change areas.
[0018] In some implementations, the texture change region includes a first sub-texture change region and a second sub-texture change region, and the texture data of the texture change region includes the texture data of the first sub-texture change region and the texture data of the second sub-texture change region; the central processing unit writes the texture data stored in shared memory to memory, including: the central processing unit writes the texture data of the first sub-texture change region stored in shared memory to memory through a first thread, and writes the texture data of the second sub-texture change region stored in shared memory to memory through a second thread.
[0019] The above implementation method allows for multi-threaded writing of texture data to memory, which improves the efficiency of writing texture data to memory.
[0020] Secondly, this application provides an electronic device comprising multiple functional modules; the multiple functional modules interact to implement the methods performed by the electronic device in any of the above aspects and their respective embodiments. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.
[0021] Thirdly, this application provides an electronic device including at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes any of the above aspects and the methods executed by the electronic device in its various embodiments.
[0022] Fourthly, this application also provides a computer program product containing instructions that, when the computer program product is run on a computer, cause the computer to perform the method executed by the electronic device in any of the above aspects and embodiments.
[0023] Fifthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a computer, causes the computer to perform the method executed by the electronic device in any of the above aspects and embodiments.
[0024] Sixthly, this application also provides a chip for reading a computer program stored in a memory and executing the method executed by the electronic device in any of the above aspects and embodiments.
[0025] Seventhly, this application also provides a chip system including a processor for supporting a computer device in implementing the methods executed by electronic devices in any of the above aspects and their embodiments. In one possible design, the chip system further includes a memory for storing programs and data necessary for the computer device. The chip system may be composed of chips or may include chips and other discrete devices.
[0026] The technical effects achievable by the second to seventh aspects mentioned above are similar to those achievable by the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the layer disk placement process provided in an embodiment of this application;
[0028] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0029] Figure 3 A software structure block diagram of an electronic device provided in an embodiment of this application;
[0030] Figure 4 This is a schematic diagram of the layer disk placement method provided in the embodiments of this application;
[0031] Figure 5 , Figure 6 , Figure 7 This is a schematic diagram of the texture change region provided in an embodiment of this application;
[0032] Figure 8 This is a schematic diagram of the texture format provided in the embodiments of this application;
[0033] Figure 9 This is a schematic diagram of the pixel map structure provided in an embodiment of this application;
[0034] Figure 10 , Figure 11 , Figure 12 This is a schematic diagram illustrating the download of texture data for the changed region provided in an embodiment of this application.
[0035] Figure 13 A schematic diagram illustrating the process of writing texture data to memory as provided in an embodiment of this application;
[0036] Figure 14 , Figure 15 and Figure 16 This is a schematic diagram of the layer disk placement process provided in an embodiment of this application;
[0037] Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0039] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. The terms “first” and “second” are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as “first” or “second” may explicitly or implicitly include one or more of that feature. “First” and “second,” etc., are used to distinguish different objects, not to describe a particular order of objects. For example, a first object and a second object are used to distinguish different objects, not to describe a particular order of objects.
[0040] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0041] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or related scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0042] The term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A existing alone, A and B existing simultaneously, and B existing alone.
[0043] To facilitate understanding by those skilled in the art, some terms used in this application are explained below.
[0044] 1) Pixel: The basic unit of image display, which cannot be further divided. Each pixel is a small square of a single color.
[0045] 2) Texture: A data object containing image information. For example, this data object can be an array of pixels, where the data of each pixel represents the color of that pixel, and the array of pixels can represent the entire image.
[0046] 3) Image layer: In image processing / painting software, layers are components of a work of art. A work can consist of multiple layers, each containing different visual elements. Layers can be stacked and blended to create the final effect. Each layer can be modified independently without affecting the content of other layers.
[0047] 4) Stagging buffer: This is a temporary storage space typically used when transferring data between the CPU and GPU. Its function is to buffer data from one location to another, ensuring efficient and stable data transfer.
[0048] 5) Texture saving to disk: This refers to the process of saving texture data to disk.
[0049] 6) PixelMap: A data structure used to store image data on the CPU side.
[0050] 7) Memory mapping: In this application, it refers to mapping the GPU's video memory to the CPU's address space, allowing the CPU to directly access the GPU's video memory. This mechanism is typically used to improve data transfer efficiency and reduce the overhead of data copying between the CPU and GPU.
[0051] 8) Active Layer: The layer that the user is currently drawing on.
[0052] 9) Layer thumbnails (snapshot): Used to show a thumbnail preview of the content of a layer, allowing users to quickly understand the content of each layer without having to open or view the detailed content of each layer one by one.
[0053] 10) Dirty region: The area where the content changes during the rendering process.
[0054] 11) Partition Marker: Divide a layer into multiple small blocks according to a fixed size. The partition marker is used to record whether the content drawn on each small block has changed.
[0055] 12) Vertex shader: A shader that performs a series of operations on vertices in the rendering pipeline.
[0056] 13) Fragment shader: The shader that the rendering pipeline is responsible for calculating and outputting colors.
[0057] It should be understood that not all of the terms described above are existing terms, and some of them may be terms proposed based on examples in this application.
[0058] Currently, during the user's drawing process, in order to prevent the loss of texture data in extreme situations such as software crashes or device shutdown due to low battery, the texture data of the layers needs to be written to disk frequently (i.e., layer write-to-disk). In the process of writing the texture data of the layers to disk, the electronic device needs to frequently download the texture data of the layers from the GPU side to the memory on the CPU side, and then the CPU writes the texture data of the layers to disk.
[0059] Reference Figure 1The diagram illustrates the layer-to-disk process. The CPU of an electronic device can request a block of CPU-side memory to store image data, and also request a staging buffer visible to both the GPU and CPU. The CPU can obtain the memory address mapped to the staging buffer on the CPU side. During layer-to-disk writing, the GPU copies the entire texture data of the layer to the staging buffer. The CPU, based on the memory address mapped to the staging buffer, copies the entire texture data of the layer from the staging buffer to CPU-side memory, and then writes the entire texture data of the layer stored in CPU-side memory to disk via a system interface (such as an I / O interface).
[0060] Users are increasingly demanding higher numbers and sizes of layers in their artwork, such as requiring 8K canvases and 50 layers. For such artwork, transferring layers to disk involves significant data exchange between the CPU and GPU, consuming considerable power and impacting the responsiveness of the drawing process, display performance, and overall user experience. Clearly, the performance issues related to data exchange between the CPU and GPU will be a major obstacle to realizing unlimited layers and unlimited canvases.
[0061] To address the above problems, this application provides a layer-to-disk method to reduce the amount of data exchange between the CPU and GPU during the layer-to-disk process, improve the data exchange efficiency between the CPU and GPU, and reduce the performance consumption of electronic devices. The layer-to-disk method provided by this application will be described in detail below with reference to the accompanying drawings.
[0062] The layer-to-disk method provided in this application is applicable to scenarios including but not limited to: users drawing and image processing on electronic devices.
[0063] The layer-to-disk method provided in this application can be executed by an electronic device, which includes a central processing unit (CPU) and a graphics processing unit (GPU). It is understood that the CPU and GPU can be integrated or deployed separately; for example, they can be integrated on a single chip or deployed on different chips. Furthermore, for ease of explanation, the following description of the examples in this application uses a GPU as the GPU and a CPU as the CPU as the CPU. In this method, when layer texture download is triggered, the electronic device obtains information about the texture change areas of the layer through the GPU, where the texture change areas are the areas where the texture of the layer has changed between the current layer texture download and the previous layer texture download. The GPU then copies the texture data of the texture change areas to shared memory accessible to both the GPU and the CPU based on the information about the texture change areas. The CPU then writes the texture data stored in the shared memory to a memory (such as a disk). Through this scheme, when each layer texture of an image is triggered, the GPU and CPU only need to interact with the texture data of the changed areas of the layer texture, without needing to interact with the overall texture data of the layer. This reduces the amount of data exchange between the CPU and GPU during layer-to-disk download, improves the data exchange efficiency between the CPU and GPU, and reduces the performance consumption of the electronic device.
[0064] The following describes an electronic device and embodiments for using such an electronic device. The electronic device may be a laptop, tablet, mobile phone, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), wearable device, etc. The embodiments of this application do not limit the specific type of electronic device.
[0065] In some embodiments of this application, the electronic device may also be a portable terminal device that includes other functions such as a personal digital assistant and / or a music player. Exemplary embodiments of the portable terminal device include, but are not limited to, devices equipped with... Or portable terminal devices with other operating systems.
[0066] Figure 2 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application. Figure 2As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0067] Processor 110 may include one or more processing units, such as a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0068] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0069] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0070] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0071] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the electronic device 100.
[0072] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0073] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0074] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0075] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. Display screen 194 can be used to display the drawing interface of a drawing application in electronic device 100.
[0076] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, layers, and other files can be saved on the external memory card.
[0077] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application required for a function (such as facial recognition, fingerprint recognition, mobile payment, etc.). The data storage area may store data created during the use of electronic device 100 (such as facial information template data, fingerprint information templates, etc.). Furthermore, internal memory 121 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0078] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 may also calculate the touch position based on the detection signal from pressure sensor 180A.
[0079] The accelerometer 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, it can detect the magnitude and direction of gravity.
[0080] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0081] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0082] Figure 3 This is a software structure block diagram of an electronic device provided in an embodiment of this application. For example... Figure 3 As shown, the electronic device 100 may include software modules such as applications, drawing engines, rendering hardware interfaces, and GPU drivers.
[0083] The application can be an application that includes image processing software or painting software, including the user interface of these software, artwork management, layer management, and functional logic for user operations such as brushes, filters, and transformations.
[0084] A rendering engine can include multiple units such as brush drawing, filter operations, transformation operations, layer compositing, and resource management, and may also include a rendering pipeline. The rendering engine can be used to implement the underlying drawing functions of image processing and painting software. The drawing of brushes, filters, etc., can be handled by the application logic assembling the rendering pipeline. Transformations and layer compositing can be implemented internally by the rendering engine using their respective rendering pipelines. The rendering pipeline can generate rendering instructions by calling the underlying rendering hardware interface. The rendering pipeline may also include vertex shaders and fragment shaders. The vertex shader is used to calculate the vertex colors, texture coordinates, etc., of the image to be rendered. The fragment shader is used to calculate the color of each pixel in the image to be rendered and to color each pixel.
[0085] Resource management is a core part of the rendering engine. It can efficiently manage GPU resources and provide users with a data interaction interface between the CPU and GPU, including texture request, texture data upload and download, etc.
[0086] Rendering hardware interfaces can include multiple interfaces such as DX12, Metal, Vulkan, and OpenGL, which can be used to record and generate corresponding drawing instructions. The CPU can access the GPU's storage and computing functions through the rendering hardware interfaces.
[0087] GPU drivers can parse the drawing instructions from the rendering hardware interface and send low-level drawing instructions to the GPU hardware.
[0088] GPU hardware can be used to execute drawing instructions and output the corresponding drawing results.
[0089] The product implementation of this application can be contained within a rendering engine and run as program code on cloud, desktop, and mobile devices. Resource management is the core of the rendering engine, efficiently managing GPU resources and providing users with a data interaction interface between the CPU and GPU, including texture allocation, texture data upload and download, etc.
[0090] Figure 4 This is a schematic diagram of a layer-to-disk method provided in an embodiment of this application. It can be applied to an electronic device 100, which includes a GPU and a CPU. The method includes:
[0091] S401: When a layer's texture download is triggered, the GPU acquires information about the layer's texture change areas. These texture change areas are the regions where the layer's texture has changed between the current and previous texture downloads.
[0092] S402: The GPU copies the texture data of the texture change region to shared memory based on the information of the texture change region. The shared memory can be accessed by both the GPU and the CPU.
[0093] To prevent the loss of texture data due to factors such as software crashes, in this embodiment of the application, when the layer texture download of the layer is triggered, the GPU of the electronic device 100 can copy the texture data of the texture change area of the layer to a shared memory that can be accessed by both the GPU and the CPU, and the CPU writes the texture data of the texture change area into the memory.
[0094] In some embodiments, layer texture downloading can be triggered by at least one of the following conditions:
[0095] The number of strokes drawn by the user since the last layer texture download is greater than or equal to the first threshold;
[0096] The time interval since the last layer texture download is greater than or equal to the second threshold;
[0097] Switching between layers;
[0098] The operation of saving the work; or,
[0099] Operations such as closing the work.
[0100] After the CPU detects one or more of the above triggering conditions, it can trigger the GPU to download the layer texture.
[0101] Specifically, "the number of strokes drawn by the user since the last layer texture download is greater than or equal to the first threshold" can mean that the number of strokes drawn by the user on the currently being drawn layer since the last layer texture download is greater than or equal to the first threshold. If the number of strokes drawn by the user on the currently being drawn layer since the last layer texture download is greater than or equal to the first threshold, it indicates that the user has performed multiple drawing operations on this layer since the last layer texture download, and the area of texture change in the layer may be large. This can trigger a layer texture download for this layer to prevent the loss of changed texture data on this layer.
[0102] The number of strokes drawn by the user since the last layer texture download is greater than or equal to a first threshold. Alternatively, it can mean that the number of strokes drawn by the user on the currently being drawn work since the last layer texture download is greater than or equal to the first threshold. If the number of strokes drawn by the user on the currently being drawn work since the last layer texture download is greater than or equal to the first threshold, it indicates that the user has performed multiple drawing operations on the work since the last layer texture download. This can trigger a layer texture download for all layers of the work, preventing the loss of texture data that has changed on the work.
[0103] If the time interval since the last layer texture download is greater than or equal to the second threshold, it means that the time interval since the last layer texture download for the currently being drawn is greater than or equal to the second threshold. If the time interval since the last layer texture download for the currently being drawn is greater than or equal to the second threshold, it indicates that the changed texture data for that layer has not been updated to memory for a considerable period of time. This can trigger a layer texture download for that layer to prevent the loss of changed texture data.
[0104] A time interval since the last layer texture download being greater than or equal to the second threshold can also refer to the current artwork being drawn, where the time interval since the last layer texture download for that artwork is greater than or equal to the second threshold. If the time interval since the last layer texture download for the currently being drawn artwork is greater than or equal to the second threshold, it indicates that the texture data of the artwork that has changed has not been updated to memory for a considerable period of time. This can trigger a layer texture download for all layers of the artwork, preventing the loss of changed texture data.
[0105] Switching layers can refer to changing the currently drawing layer from layer A to layer B. Switching the currently drawing layer from layer A to layer B can trigger the download of the layer texture of layer A, thus preventing the loss of texture data that has changed on layer A.
[0106] Additionally, if a save operation or a close operation is detected, it indicates that the user does not need to draw on the work at this time, or that the work has already been drawn. This can also trigger the download of layer textures for all layers of the work to prevent the loss of texture data that has changed on the work.
[0107] For the texture change area of a layer, in one possible implementation, the GPU can obtain the drawing content of the layer that has changed between the current layer texture download and the previous layer texture download, and determine it based on at least one rectangular region surrounding the changed drawing content.
[0108] Reference Figure 5 The diagram shown illustrates the texture change area. After a layer texture download is triggered, the changes in the layer's drawing content between the current and previous layer texture downloads include two parts, such as... Figure 5 Given two drawing contents, 1 and 2, the GPU can determine a rectangular region 1 enclosing drawing content 1 and a rectangular region 2 including drawing content 2. Each rectangular region can be identified by the coordinates of its four vertices, or by the coordinates of its starting point, width, and height. For example, in... Figure 5 The rectangular region 1 is identified by its starting coordinates (x1, y1), width (w1), and height (h1), and the rectangular region 2 is identified by its starting coordinates (x2, y2), width (w2), and height (h2).
[0109] Reference Figure 6 The diagram shown illustrates the texture change area. After a layer texture download is triggered, the changes in the layer's drawing content between the current and previous layer texture downloads include two parts, such as... Figure 6 Given two drawing contents, 1 and 2, the GPU can define a rectangular region 12 that encloses both. This rectangular region 12 can be identified by the coordinates of its four vertices, or by its starting coordinates, width, and height. For example, in... Figure 6 The rectangular region 12 is identified by its starting coordinates (x12, y12), width (w12), and height (h12).
[0110] For the drawing content where the layer changes between the current layer texture download and the previous layer texture download, the GPU can record this change between the two downloads; alternatively, the GPU can determine this change by recording user drawing operations on the layer between the current and previous downloads through the dirty regions of the layer. This application does not limit the method by which the GPU determines the drawing content where the layer changes between the current and previous downloads.
[0111] In another possible implementation, the layer can be divided into M layer partitions. The GPU can obtain the drawing content that has changed between the current layer texture download and the previous layer texture download, and mark N layer partitions with the changed drawing content in the M layer partitions, thereby determining the texture change area of the layer. M and N are integers, and N is less than or equal to M.
[0112] For example: A layer can be divided into M layer partitions according to a fixed partition size. After a layer texture download is triggered, the GPU obtains the drawing content that has changed between the current layer texture download and the previous layer texture download, and marks N partitions with the changed drawing content in the M layer partitions. The set of the marked N partitions is the area where the texture has changed.
[0113] The fixed partition size can be preset in the electronic device 100, or it can be changed by the user in the electronic device 100. This application embodiment does not limit the specific size of the fixed partition. For example, the fixed partition size can be 32*32 pixels, 64*64 pixels, etc. Furthermore, it should be understood that, due to the limitations of the layer size, the M layer partition sizes obtained based on the fixed partition size may differ. For example, the layer width and height may not be integer multiples of the width and height in the fixed partition size, and the layer partition size located at the edge of the layer may be inconsistent with the set fixed partition size.
[0114] Taking M=20 and N=3 as an example, refer to Figure 7 The diagram illustrates texture change areas. The layer can be divided into 20 layer partitions (layer partition 1-layer partition 20). Layer partitions 6, 10, and 15 contain the rendered content showing changes in the layer between the current and previous texture downloads. The GPU can identify layer partitions 6, 10, and 15 as texture change areas. Furthermore, the partition numbers 6, 10, and 15 can be used as information about these texture change areas.
[0115] In some embodiments, the GPU can also create a partition-updatable texture format for the layer, which can consist of two parts: information about the texture change areas and texture data. The texture data part is the texture data of the layer (or the layer texture), and the information about the texture change areas can record the information about the texture change areas of the layer since the last layer texture download.
[0116] Reference Figure 8The texture format shown includes the texture data portion of the layer and information about the texture change regions. The texture change region information records the texture change regions of the layer after the last layer texture download: {x1, y1, w1, h1} and {x2, y2, w2, h2}.
[0117] In some embodiments, for each layer, the CPU may also allocate a block of shared memory associated with (or bound to) that layer. This shared memory is accessible to both the CPU and the GPU and may be associated with the layer's identifier (ID). The shared memory may be used to store the texture data of its associated layer, as well as information about the texture variation regions of its associated layer.
[0118] When a layer's texture download is triggered, the GPU can obtain information about the texture change areas of the layer and copy the texture data of those areas to shared memory based on that information. Alternatively, when a layer's texture download is triggered, the GPU can obtain information about the texture change areas of the layer, first copy that information to shared memory, and then copy the texture data of those areas to shared memory based on that information.
[0119] It is understood that, in the embodiments of this application, shared memory may refer to memory that can be accessed by both the CPU and the GPU, such as a Stagging Buffer that can be accessed by both the CPU and the GPU.
[0120] For example: The CPU can request a Stagging Buffer in the GPU-associated video memory and obtain the memory address of the Stagging Buffer mapped to the CPU, so that the Stagging Buffer can be accessed by both the GPU and the CPU.
[0121] In one possible implementation, the GPU copies the texture data of the texture-changing region to shared memory, or copies the information and texture data of the texture-changing region to shared memory. Alternatively, the GPU copies the texture data of the texture-changing region to a PixelMap carried on shared memory, or copies the information and texture data of the texture-changing region to a PixelMap carried on shared memory.
[0122] Reference Figure 9The diagram illustrates the PixelMap structure. For each layer, the CPU can create a PixelMap associated with that layer, such as associating the PixelMap with the layer's ID. The PixelMap can include information about the areas of change and texture data. The information about the areas of change stores details about the texture changes of that layer; the texture data stores the texture data of that layer, such as a 4-channel (e.g., red (R), green (g), blue (B), and alpha (a)) color texture. The memory type storing the PixelMap can be shared memory accessible to both the GPU and CPU, such as a Stagging Buffer.
[0123] As an example: Reference Figure 10 The diagram illustrates the download of texture data for the changed region. When the layer texture download is triggered, the GPU can first download the information of the texture change region into the PixelMap, and then download the texture data of the texture change region into the PixelMap based on the information of the texture change region.
[0124] To ensure the integrity of the layer's texture data, in some embodiments, when the first layer texture download of a layer is triggered, the GPU can default to the entire layer (or the entire texture of the layer) being the area of texture change.
[0125] Reference Figure 11 The diagram illustrates the texture data download for the changed area. When the first layer texture download is triggered, the GPU can assume that the texture change area is the entire layer (or the entire texture of the layer), and copy the texture data of the entire layer to the shared memory associated with the layer (or the PixelMap hosted on the shared memory). In cases where it is not the first layer texture download, the texture change area is the area where the texture of the layer has changed between the current layer texture download and the previous layer texture download. The GPU only needs to copy the texture data of the changed area to the shared memory associated with the layer (or the PixelMap hosted on the shared memory).
[0126] In some embodiments, to avoid the overlap of texture change regions, which would increase the amount of data exchange between the CPU and GPU, the GPU can also clear the information of the texture change regions of the current texture download layer after copying the texture data of the texture change regions to shared memory (or the PixelMap carried on shared memory).
[0127] Reference Figure 12 The diagram shown illustrates the download of texture data for the changed region. Figure 12In (a) of this application, if the information of the texture change region of the layer is not cleared after the (i-1)th layer texture download, the information of the texture change region of the layer downloaded in the (i-1)th layer texture download will be added to the information of the texture change region of the layer downloaded in the i-th layer texture download. During the i-th layer texture download, the GPU will repeatedly copy the texture data of the change region to the shared memory associated with the layer (or the PixelMap carried on the shared memory), which will increase the amount of data exchange between the CPU and the GPU and cause resource waste. However, in the embodiments of this application, as Figure 12 As shown in (b), for the (i-1)th layer texture download, after the GPU copies the texture data of the texture change region of the layer to the shared memory (or the PixelMap carried on the shared memory) associated with the layer, it can clear the information of the texture change region of the layer. This avoids the information of the texture change region being superimposed on the information of the texture change region of the layer during the i-th layer texture download. This can avoid the problem of the GPU repeatedly copying the texture data of the texture change region to the shared memory (or the PixelMap carried on the shared memory) associated with the layer during the i-th layer texture download, thus avoiding the problem of wasting resources.
[0128] S403: The CPU writes the texture data stored in shared memory to the memory.
[0129] As an example: Since the texture data of each layer usually occupies a fixed storage area in memory, after the GPU downloads the texture data of the texture change area of the layer to the shared memory associated with the layer (or the PixelMap carried on the shared memory), the CPU can determine the storage location of the texture data of the texture change area in memory (such as the offset of the texture data of the texture change area relative to the starting position of the memory storing the texture data of the layer) based on the location of the texture data of the texture change area in the shared memory associated with the layer (or the PixelMap carried on the shared memory), and write the texture data of the texture change area into memory.
[0130] In some embodiments, if the shared memory associated with the layer (or the PixelMap carried on the shared memory) also stores information about texture change regions, the CPU can also determine the location in memory where the texture data of the texture change region is stored based on the information about the texture change region, and write the texture data of the texture change region into memory.
[0131] Reference Figure 13The diagram illustrates the process of writing texture data to memory. The CPU can obtain the CPU-side memory address of the PixelMap and use it to retrieve information about the texture change regions of the PixelMap. Based on this information, the CPU calculates the offset of the texture change region in memory relative to the corresponding layer file of the PixelMap (i.e., calculates the storage location of the texture change region in memory). The CPU then opens the layer file corresponding to the PixelMap in memory, offsets it to the specified location, and writes the corresponding texture data to the PixelMap.
[0132] Figure 14 This is a schematic diagram of the layer download process provided in this application embodiment. When the layer texture download is triggered, the GPU can determine whether it is the first layer texture download after the shared memory (or the PixelMap carried on the shared memory; this example uses shared memory) is bound to the layer. If it is the first layer texture download, the GPU can determine that the texture change area is the entire layer (or the entire texture of the layer), and copy the information of the texture change area and the overall texture data of the layer to the shared memory. If it is not the first layer texture download, the GPU can obtain the information of the texture change area of the layer, and copy the information of the texture change area and the texture data of the texture change area to the shared memory. The texture change area is the area where the texture of the layer has changed between the current layer texture download and the previous layer texture download. The CPU can obtain the memory address on the CPU side of the shared memory, obtain the information of the texture change area from the shared memory, determine the storage location of the texture change area in the memory based on the information of the texture change area, and write the texture data in the shared memory to the memory. After the CPU writes the texture data from the shared memory to the memory, or the GPU copies the information of the texture change region and the texture data of the texture change region to the shared memory, the GPU can also clear the acquired texture change region information to prevent the texture change region information from being superimposed between different layer texture downloads.
[0133] Taking a layer divided into multiple layer partitions based on a fixed size as an example, the information of the layer's texture change area is the information of the layer partition where the texture change occurs. Figure 15This is a schematic diagram of the layer-to-disk process provided in an embodiment of this application. The CPU can bind a layer to a shared memory block (or a PixelMap hosted on the shared memory) and divide the layer into multiple layer partitions according to a fixed size. Users can perform user drawing operations such as brush painting, filtering, and transformations on the layer. When the layer texture download is triggered, the GPU can obtain information about the layer partitions whose textures have changed. Based on this information, the GPU copies the information of the layer partitions whose textures have changed, along with the texture data of these partitions, to the shared memory (or the PixelMap hosted on the shared memory). The CPU can obtain information about the layer partitions whose textures have changed from the shared memory (or the PixelMap hosted on the shared memory), determine the storage location of these partitions in memory, and write the texture data from the shared memory to the memory.
[0134] In some embodiments, considering that the texture change area of a layer can be divided into multiple sub-texture change areas, and that these multiple sub-texture change areas are independent of each other in memory space and do not overlap, it is possible to consider writing the data of the texture change area to memory in a multi-threaded manner.
[0135] Example: Refer to Figure 13 As shown, the texture change region includes a first sub-texture change region and a second sub-texture change region. The texture data of the texture change region includes the texture data of the first sub-texture change region (this texture data corresponds to...). Figure 13 The texture data of the middle thread 1 and the second sub-texture change region (this texture data corresponds to) Figure 13 In thread 2, the CPU can write the texture data of the first sub-texture change region stored in shared memory to memory through the first thread, and write the texture data of the second sub-texture change region stored in shared memory to memory through the second thread, so as to improve the efficiency of writing texture data to memory.
[0136] Taking the writing of texture data from shared memory to storage using a multi-threaded approach as an example, refer to... Figure 16The diagram illustrates the layer download process. A layer can be bound to a shared memory block (or a PixelMap hosted on shared memory). Users can perform drawing operations such as brush painting, filtering, and transformations on the layer. When layer texture download is triggered, the GPU can obtain information about the texture change areas of the layer. Based on this information, it copies the texture change area information and texture data to the shared memory (or the PixelMap hosted on shared memory). The CPU can then obtain the texture change area information from the shared memory (or the PixelMap hosted on shared memory), determine the storage location of the texture change area in memory, and write the texture data from the shared memory to the main memory using a multi-threaded approach.
[0137] Understandably, when a layer is divided into M layer partitions, the GPU marks N layer partitions with changed drawing content in the M layer partitions of the layer. The method for determining the layer texture change area is that each layer partition can write the texture data of the layer partition to memory through an independent thread to improve the texture data writing efficiency.
[0138] Similarly, when the GPU copies texture data of texture-changing regions to shared memory (or the PixelMap hosted on shared memory), it can also do so using a multi-threaded approach. For example, each layer partition can copy its texture data to shared memory using a separate thread.
[0139] The methods provided in the embodiments of this application above are described from the perspective of an electronic device as the executing entity. To implement the functions of the methods provided in the embodiments of this application above, the electronic device may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.
[0140] Figure 17 This is a schematic diagram of the structure of the electronic device 1700 provided in an embodiment of this application. The electronic device 1700 can be one of the electronic devices described above. For example... Figure 17As shown, electronic device 1700 may include: one or more processors 1701; one or more memories 1702; a communication interface 1703; and one or more computer programs 1704. These devices can be connected via one or more communication buses 1705. The one or more computer programs 1704 are stored in the memory 1702 and configured to be executed by the one or more processors 1701. The one or more computer programs 1704 include instructions. For example, when electronic device 1700 is the electronic device described above, the instructions can be used to perform relevant steps of the electronic device as in the corresponding embodiments above, such as performing relevant steps of the processes in the foregoing embodiments. The communication interface 1703 is used to enable communication between electronic device 1700 and other devices; for example, the communication interface may be a transceiver.
[0141] Based on the above embodiments, this application also provides an electronic device, which includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions. When the electronic device is running, the at least one processor executes the functions performed by the electronic device in the methods described in the embodiments of this application, such as performing the steps executed by the electronic device in the above embodiments.
[0142] Based on the above embodiments, this application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to perform the methods described in the above embodiments.
[0143] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the methods described in the above embodiments.
[0144] Based on the above embodiments, this application also provides a chip for reading computer programs stored in a memory to implement the methods described in the above embodiments.
[0145] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the methods described in the above embodiments. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete devices.
[0146] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if..." or "after...". Similarly, depending on the context, the phrases "when it is determined" or "if (the stated condition or event) is interpreted as meaning "if it is determined..." or "in response to determining..." or "when (the stated condition or event) is detected" or "in response to detecting (the stated condition or event)".
[0147] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)). Where there is no conflict, the solutions in the above embodiments can be combined.
[0148] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0149] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0150] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0151] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0152] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of protection of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for transferring layers to disk, characterized in that, Applied to an electronic device, the electronic device including a graphics processor and a central processing unit, the method includes: When the layer texture download of a layer is triggered, the graphics processor obtains information about the texture change area of the layer, wherein the texture change area is the area where the texture of the layer has changed between the current layer texture download and the previous layer texture download; The graphics processor copies the texture data of the texture change region to shared memory based on the information of the texture change region. The shared memory is accessible to both the graphics processor and the central processing unit. The central processing unit writes the texture data stored in the shared memory into the memory.
2. The method as described in claim 1, characterized in that, The graphics processor acquires information about the texture variation regions of the layer, including: The graphics processor acquires the drawing content of the layer that has changed between the current layer texture download and the previous layer texture download; The graphics processor determines at least one rectangular region surrounding the drawn content, the at least one rectangular region being the texture variation region.
3. The method as described in claim 1, characterized in that, The graphics processor acquires information about the texture variation regions of the layer, including: The graphics processor acquires the drawing content of the layer that has changed between the current layer texture download and the previous layer texture download; The graphics processor marks N layer partitions of the drawing content in the M layer partitions of the layer. The N layer partitions are the texture change areas, where M and N are integers and N is less than or equal to M.
4. The method according to any one of claims 1-3, characterized in that, Before the central processing unit writes the texture data stored in the shared memory to the memory, the method further includes: The graphics processor copies information about the texture variation regions of the layer to the shared memory; The central processing unit writes the texture data stored in the shared memory into the memory, including: The central processing unit determines the storage location of the texture change region in the memory based on the information of the texture change region; The central processing unit writes the texture data into the memory according to the storage location.
5. The method according to any one of claims 1-4, characterized in that, The layer texture download is triggered by at least one of the following conditions: The number of strokes drawn by the user since the last layer texture download is greater than or equal to the first threshold; The time interval since the last layer texture download is greater than or equal to the second threshold; The operation of switching from the aforementioned layer to other layers; The operation of saving the artwork including the layer; or, Turn off operations on works that include the layer mentioned.
6. The method according to any one of claims 1-5, characterized in that, The shared memory is a portion of the video memory associated with the graphics processor, and the shared memory is mapped to the address space of the central processing unit.
7. The method as described in claim 2 or 3, characterized in that, After copying the texture data of the texture-changing region to shared memory, the method further includes: The graphics processor clears the information of the texture change area corresponding to the current layer texture download for that layer.
8. The method according to any one of claims 1-7, characterized in that, The texture change region includes a first sub-texture change region and a second sub-texture change region, and the texture data of the texture change region includes the texture data of the first sub-texture change region and the texture data of the second sub-texture change region. The central processing unit writes the texture data stored in the shared memory into the memory, including: The central processing unit writes the texture data of the first sub-texture change region stored in the shared memory to the memory through a first thread, and writes the texture data of the second sub-texture change region stored in the shared memory to the memory through a second thread.
9. An electronic device, characterized in that, It includes at least one processor coupled to at least one memory, the at least one processor being configured to read a computer program stored in the at least one memory to perform the method as described in any one of claims 1-8.
10. A chip system, characterized in that, The chip system includes at least one processor, characterized in that the at least one processor is configured to invoke computer instructions to cause execution of the method as described in any one of claims 1-8.
11. A computer program product containing instructions, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-8.
