Image processing method, device, electronic device and storage medium

By separating the target element and the original image into different layers in the map application and adding the target element to the first layer, the problem of high rendering complexity in the prior art is solved, and the rendering efficiency and user experience are improved.

CN119784884APending Publication Date: 2025-04-08SHANSHU TECH (BEIJING) CO LTD +5
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411878699.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art draws direction information on the original image in map applications, resulting in high rendering complexity, high time consumption, and affecting the user experience.

Method used

By obtaining the user's location information, separating the target element and the original image to different layers, and adding the target element to the first layer, the target element is obtained based on the existing picture. Users can rotate, scale and render target elements.

Benefits of technology

By separating layers, the number and number of rendered data is reduced, the efficiency of rendering processing is improved, and the drawing time is saved, which improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784884A_ABST
    Figure CN119784884A_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method, device, electronic device and storage medium. First, the present application obtains the placement position information of the target element by responding to the user's location information acquisition operation; wherein, the placement position of the target element is located in the first layer, and the original image is located in the second layer; the first layer is different from the second layer; based on the placement position information of the target element, the target element is added to the first layer; the target element is obtained based on an existing picture; in response to the user's processing operation, the target element is processed. The present application separates the target element placed later and the layer where the original image is located, so that in the rendering process, it can be rendered independently, and the amount of rendering data required is smaller, thereby improving the efficiency of the rendering process. In addition, since the target element is obtained based on an existing picture, there is no need to draw the element by itself, thereby saving drawing time and improving rendering efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an image processing method, device, electronic device and storage medium. Background Art

[0002] In today's map application field, there are many requirements for clearly displaying direction information on the map. In the prior art, the drawn image is often added directly to the original image. However, when the image contains a large amount of data, the drawing process becomes complicated and time-consuming, and increases the complexity of the image rendering process. Summary of the invention

[0003] The embodiments of the present application provide an image processing method, device, electronic device and storage medium to solve the problem of high rendering complexity in the existing problems.

[0004] On the one hand, an embodiment of the present application provides an image processing method, including: in response to a user's position information acquisition operation, obtaining placement position information of a target element; wherein the placement position of the target element is located in a first layer, and the original image is located in a second layer; the first layer is different from the second layer; based on the placement position information of the target element, adding the target element to the first layer; the target element is obtained based on an existing picture; and in response to the user's processing operation, processing the target element.

[0005] In a possible embodiment, the processing operation includes a rotation operation and / or a scaling operation; the processing of the target element in response to the user's processing operation includes: in response to the rotation operation and / or the scaling operation, obtaining position information of a target position point, and the position information of the target position point after performing the operation; wherein the target position point is a first specified position point in the target element; based on the position information of the target position point and the position information of the target position point after performing the processing operation, obtaining adjustment information of the target element; based on the adjustment information, generating an adjusted target element; and based on the adjusted target element, performing replacement processing on the target element.

[0006] In a possible embodiment, the processing operation includes a rendering operation; the processing of the target element in response to the user's processing operation includes: extracting the target element in the first layer in response to the rendering operation; rendering the target element separately to obtain a rendered target element; and replacing the target element based on the rendered target element.

[0007] In a possible embodiment, adding the target element in the first layer based on the placement position information of the target element includes: determining an insertion point of the target element in the first layer based on the placement position information; adding the target element in the first layer; wherein a reference point of the target element coincides with the coordinates of the insertion point; and the reference point is a second designated position point in the target element.

[0008] In a possible embodiment, the format of the target element includes at least one of the following: png, webp.

[0009] In a possible embodiment, after processing the target element, the method further includes: using the target element as an input of a rendering model, and outputting a first layer after adding the target element.

[0010] On the one hand, an embodiment of the present application provides an image processing device, including: an acquisition module, used to acquire placement position information of a target element in response to a user's position information acquisition operation; wherein the placement position of the target element is located in a first layer, and the original image is located in a second layer; the first layer is different from the second layer; an adding module, used to add the target element in the first layer based on the placement position information of the target element; the target element is obtained based on an existing picture; and a processing module, used to process the target element in response to the user's processing operation.

[0011] On the one hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes any one of the above-mentioned image processing methods.

[0012] On the one hand, the present application provides a computer-readable storage medium, which includes a program code. When the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any one of the above-mentioned image processing methods.

[0013] On the one hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; when a processor of an electronic device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the electronic device performs any one of the above-mentioned image processing methods.

[0014] The beneficial effects of this application are as follows:

[0015] The present application provides an image processing method, device, electronic device and storage medium. The present application obtains the placement position information of the target image that the user wants to input by responding to the user's location information acquisition operation, and then places the target element in the first layer according to the placement position information, wherein the target element is placed in the first layer, and the original image is placed in the second layer, the first layer and the second layer are different, and the target element is obtained based on the existing picture. In this way, the target element placed later and the layer where the original image is located can be separated, so that in the later rendering process, they can be rendered independently, and the number and number of rendering data required are less, thereby improving the efficiency of the rendering process. In addition, since the target element is obtained based on the existing picture, there is no need to draw the element by itself, which saves drawing time and improves rendering efficiency.

[0016] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0018] Figure 1 A schematic diagram of a flow chart of an image processing method in an embodiment of the present application;

[0019] Figure 2 This is a schematic diagram of the structure of an image processing device in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of the hardware structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0022] The terms "first", "second", etc. in the specification and claims of this 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 numbers used in this way can be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0023] Currently, after drawing an image, some additional information may need to be added to help users understand the content in the image more comprehensively. For example, in today's map application field, there are many requirements for clearly displaying direction information on the map. For example, in many scenarios such as traffic navigation, logistics transportation, geographic information systems, and complex topological network structures, accurately indicating directions is crucial for users. It can help users better understand geographic spatial relationships and make more informed decisions.

[0024] In the prior art, in order to draw the above-mentioned direction information, existing software is often used to draw and render elements in an image according to relevant information input by a user (such as position, pattern, pattern color, etc.). For example, a user uses leaflet-polylineDecorator in Leaflet to complete the drawing of elements.

[0025] However, in the face of complex topological network structures and large amounts of data, traditional methods of drawing elements often experience lag problems. Especially when a large number of elements with directional indicators need to be displayed on the map at the same time, the drawing process becomes complicated and time-consuming due to the large amount of data, which not only affects the user experience, but may also cause the map to respond more slowly, or even freeze or freeze.

[0026] In order to solve the above problems, this application provides an image processing method, which uses existing elements to replace the elements that need to be generated by software in the prior art, thereby reducing the time and resources used to generate and render images. For easy understanding, please refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of an image processing method in an embodiment of the present application. Figure 1 As shown, the method includes steps S101-S103:

[0027] S101, in response to a user's position information acquisition operation, acquiring placement position information of a target element; wherein the placement position of the target element is located in a first layer, and the original image is located in a second layer; the first layer is different from the second layer.

[0028] Specifically, the present application can obtain the target element and the location of the target element based on the user's location information acquisition operation. Among them, the present application does not specifically limit the specific type of the location information acquisition operation. Exemplarily, it can be a user's input operation, or a data import operation and a drawing operation. When the location information acquisition operation is a drawing operation, the user can draw a line segment on the first layer, wherein the two endpoints of the line segment are the placement location information. When the location information acquisition operation is a user's input operation, the placement location information can be the coordinate point input by the user.

[0029] Among them, the target element needs to be obtained based on an existing picture. Here, the obtained based on an existing picture can be understood as a picture that can be directly read in the execution subject (such as software, terminal, model, etc.) to which the method described in this application is applied. In other words, the target element can be a picture that comes with the execution subject, or it can be an element obtained from a picture input by the user. In other words, unlike the prior art that requires software to draw elements by itself, this application uses existing elements as added content information, thereby saving the time of software drawing and rendering images and improving the efficiency of image processing.

[0030] Furthermore, the format of the target element may include but is not limited to at least one of the following: png, webp, html, css. Preferably, the format of the target element may be webp, in which a large amount of bandwidth and storage space may be saved.

[0031] S102: Add the target element to the first layer based on the placement position information; the target element is obtained based on an existing picture.

[0032] After obtaining the target element and placement location information, the target element can be added to the first layer. Among them, multiple elements can be set in the first layer, that is, the user can adjust and render multiple elements in the same layer at the same time. Among them, the original image can be understood as the image before the element is added. Taking the map as an example, the original image is the map without direction markings. Since the target element and the original image are not in the same layer, the original image does not need to be considered during the adjustment and rendering process, making it easier to modify and adjust the elements added later, and the amount of data included in the separated layer is relatively small, so the rendering operation can be completed faster during the rendering process.

[0033] The location information involved in this application does not specifically limit its dimension, that is, the location information here can be two-dimensional coordinates or three-dimensional coordinates. Taking a map as an example, the location information here can be longitude and latitude.

[0034] Optionally, the target element is not directly embedded in the image after it is introduced, but is added to the Leaflet marker instance through the CSS background image of the div element. This allows full control over the appearance and behavior of the marker target element, including its size, color, animation effects, etc. In addition, since the target element is added as a CSS background image, the icon can be easily replaced without modifying the specific code.

[0035] S103: In response to a processing operation by the user, the target element is processed.

[0036] In this step, the processing operation may include but is not limited to at least one of the following operations: rotation operation, scaling operation, rendering operation. Specifically, after adding the target element in the first layer, the user may need to adjust its size and direction, that is, the target element may be scaled and / or rotated. It should be noted that since the present application separates the layers of the target element and the original image, even if the position, angle, size and other information of the target element changes, automatic rendering will not occur to adapt to the original image. The target element is rendered only when the rendering operation is performed. In this way, the number of times the system automatically renders the target element can be reduced, thereby reducing the resources consumed by automatic rendering. In order to ensure the consistency and visual effect between the target element and the original image, the target element can be rendered.

[0037] The above processing operations can also be used in combination. For example, after the processing operation is a scaling operation or a rotation operation, the user can perform a rendering operation, which is to obtain an adjusted target element based on the relevant information of the user's operation on the target element, and replace the original target element with the newly obtained target element. When the user performs a rendering operation, the target element's brightness, contrast, saturation and other properties can be adjusted to optimize the visual effect.

[0038] In summary, the present application obtains the placement location information of the target image that the user wishes to input by responding to the user's location information acquisition operation, and then places the target in the first layer according to the placement location information, wherein the target element is placed in the first layer, and the original image is placed in the second layer, the first layer and the second layer are different, and the target element is obtained based on an existing image. In this way, the target element placed later and the layer where the original image is located can be separated, so that in the later rendering process, they can be rendered independently, and the amount of rendering data required is smaller, thereby improving the efficiency of the rendering process. In addition, since the target element is obtained based on an existing image, there is no need to draw the element by itself, which saves drawing time and improves rendering efficiency.

[0039] In executing step S102, the step specifically includes: determining the insertion point of the target element in the first layer based on the placement position information.

[0040] Specifically, after obtaining the placement position information, at least one insertion point can be determined based on the placement position information. Depending on the amount of information included in the placement position information, the method of determining the insertion point is also different. Exemplarily, when the placement position information is the coordinates of the two endpoints of a line segment, the insertion point can be the midpoint of the line segment. This insertion point is mainly used to locate the insertion position of the target element. The target element is added to the first layer. When the reference point of the target element coincides with the insertion point, it can be considered that the target element is inserted into the user's specified position. The present disclosure does not specifically limit the specific position of the reference point, and the reference point can be any point in the target element.

[0041] In step S103, the processing steps for the target element vary according to different processing operations of the user.

[0042] In an exemplary embodiment, in response to the rendering operation, the target element is extracted from the first layer; the target element is rendered separately to obtain the rendered target element; based on the rendered target element, the target element is replaced. Alternatively, the target element is used as an input of a rendering model, and the first layer to which the rendered target element is added is output.

[0043] In another exemplary embodiment, the target element may be adjusted based on the change of the designated position coordinate point. This step specifically includes S201-S204:

[0044] S201, in response to the rotation operation and / or the scaling operation, acquiring position information of a target position point, and the position information of the target position point after the operation is performed; wherein the target position point is a first designated position point in the target element.

[0045] Specifically, based on the user's rotation operation, the position information of the target position point after rotation and the position information of the target element before rotation can be obtained. It should be noted that the operations performed are different depending on the relevant information. When the relevant information is the coordinates of the specified position point, the subsequent steps S202-S203 can be performed, that is, the rotation angle is calculated according to the second coordinate information, and then the rendering is performed according to the rotation angle. When the relevant information is directly the rotation angle, step S203 can be directly performed, that is, the adjusted target element is directly obtained according to the rotation angle. It should be noted that the target position information here can be the same or different from the aforementioned reference point. For example, the reference point can be the endpoint of the upper left corner of the element. When the reference point and the insertion point coordinates coincide, the target element can be inserted at the beginning. After inserting the target element, the user may need to adjust the angle and / or size of the target element. At this time, the center point can be used as the origin of the adjustment, thereby reducing the calculation difficulty of the target element during adjustment. At this time, the reference point is different from the insertion point.

[0046] The target location point is any specified location point in the target element, including but not limited to at least one of the following: an endpoint and a center point.

[0047] S202: Obtain adjustment information of the target element based on the position information of the target position point and the position information of the target position point after the processing operation is performed.

[0048] According to the position information of the target position point and the position information of the target position point after the processing operation is performed, the difference between the two can be used to obtain the offset in the coordinates. According to the preset function, the difference between the third position information and the second position information is input into the function to obtain the rotation angle. Among them, the present application does not specifically limit the type of preset function. Exemplarily, the preset function can be a two-parameter inverse tangent function.

[0049] S203: Generate an adjusted target element based on the adjustment information.

[0050] According to the rotation angle, the position, visual effect and other information of the target element can be adjusted accordingly.

[0051] When the processing operation is a scaling operation, the processing can be performed directly according to the scaling ratio, or the scaling ratio can be obtained according to the ratio of the distance before and after scaling the first specified position point, so as to process the target element.

[0052] S204: Replace the target element based on the adjusted target element.

[0053] After obtaining the above adjusted target element, the target element in the first layer can be replaced.

[0054] It should be noted that the present application does not specifically limit the number and order of operations included in the processing operation. That is, the user can perform both a scaling operation and a rotation operation on the target element. After performing multiple operations, the target element can be processed in sequence, and the target element can be rendered according to its rotation angle and scaling degree.

[0055] In this way, after the adjusted target element is generated, it can be replaced. Since the prior art cannot adjust the direction of the graphic at any time according to the business direction of the line segment, if the direction of the graphic needs to be adjusted, the instance of the bound line segment must be destroyed, the line segment must be redrawn, and a new object must be created in the layer before the target element is drawn. Therefore, compared with the prior art, the processing method of the present application is more flexible and does not require the target element to be redrawn, thereby saving processing resources and improving processing efficiency.

[0056] Based on the same inventive concept, an embodiment of the present application also provides an image processing device. Figure 2 is a schematic diagram of the structure of an image processing device in an embodiment of the present application, such as Figure 2 As shown, it is a schematic diagram of the structure of the image processing device 200, which may include:

[0057] The acquisition module 201 is used to acquire the placement position information of the target element in response to the user's position information acquisition operation; wherein the placement position of the target element is located in the first layer, and the original image is located in the second layer; the first layer is different from the second layer;

[0058] An adding module 202, configured to add the target element in the first layer based on the placement position information of the target element; the target element is obtained based on an existing picture;

[0059] The processing module 203 is used to process the target element in response to the processing operation of the user.

[0060] In a possible embodiment, the image processing device 200 is also configured that the processing operation includes a rotation operation and / or a scaling operation; the processing of the target element in response to the user's processing operation includes: in response to the rotation operation and / or the scaling operation, obtaining the position information of the target position point, and the position information of the target position point after performing the operation; wherein the target position point is the first specified position point in the target element; based on the position information of the target position point and the position information of the target position point after performing the processing operation, obtaining adjustment information of the target element; based on the adjustment information, generating an adjusted target element; based on the adjusted target element, replacing the target element.

[0061] In a possible embodiment, the image processing device 200 is also configured that the processing operation includes a rendering operation; the processing of the target element in response to the user's processing operation includes: extracting the target element in the first layer in response to the rendering operation; rendering the target element separately to obtain a rendered target element; and replacing the target element based on the rendered target element.

[0062] In a possible embodiment, the image processing device 200 is also configured to add the target element in the first layer based on the placement position information of the target element, including: determining the insertion point of the target element in the first layer based on the placement position information; adding the target element in the first layer; wherein the reference point of the target element coincides with the coordinates of the insertion point; and the reference point is a second specified position point in the target element.

[0063] In a possible embodiment, the image processing apparatus 200 is further configured so that the format of the target element includes at least one of the following: png, webp.

[0064] In a possible embodiment, the image processing device 200 is further configured to process the target element, and the method further includes: using the target element as an input of a rendering model, and outputting a first layer after adding the target element.

[0065] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the functions of the aforementioned image processing method and device, referring to Figure 3 , the electronic device comprises:

[0066] At least one processor 301, and a memory 302 connected to the at least one processor 301. The specific connection medium between the processor 301 and the memory 302 is not limited in the embodiment of the present application. Figure 3In the example, the processor 301 and the memory 302 are connected via the bus 300. The bus 300 is connected to the memory 302 via the bus 300. Figure 3 The bus 300 is represented by a bold line, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 300 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 301 can also be called a controller, and there is no limitation on the name.

[0067] In the embodiment of the present application, the memory 302 stores instructions that can be executed by at least one processor 301. The at least one processor 301 can execute the image processing method discussed above by executing the instructions stored in the memory 302. The processor 301 can implement Figure 3 The functions of each module in the device shown.

[0068] Among them, the processor 301 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 302 and calling data stored in the memory 302, the various functions of the device and process data, the device can be monitored as a whole.

[0069] In one possible design, the processor 301 may include one or more processing units, and the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 301. In some embodiments, the processor 301 and the memory 302 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0070] The processor 301 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the image processing method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0071] The memory 302 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 302 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 302 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 302 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0072] By programming the processor 301, the code corresponding to the image processing method described in the above embodiment can be fixed into the chip, so that the chip can execute the image processing method when it is running. Figure 2 The steps of the image processing method of the embodiment shown are as follows: How to design and program the processor 301 is a technique well known to those skilled in the art and will not be described in detail here.

[0073] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the image processing method discussed above.

[0074] In some possible implementations, various aspects of the image processing method provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the image processing method according to various exemplary implementations of the present application described above in this specification.

[0075] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0076] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0077] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0079] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An image processing method, characterized in that: The method comprises: In response to the user's position information acquisition operation, the placement position information of the target element is acquired; wherein the placement position of the target element is located in a first layer, and the original image is located in a second layer; the first layer is different from the second layer; Based on the placement position information of the target element, adding the target element to the first layer; the target element is obtained based on the existing picture; In response to a processing operation of the user, the target element is processed.

2. The method according to claim 1, characterized in that: The processing operation includes a rotation operation and / or a scaling operation; The processing of the target element in response to the processing operation of the user includes: In response to the rotation operation and / or the scaling operation, acquiring position information of a target position point, and the position information of the target position point after the operation is performed; wherein the target position point is a first designated position point in the target element; Based on the position information of the target position point and the position information of the target position point after the processing operation is performed, obtaining adjustment information of the target element; Based on the adjustment information, generating an adjusted target element; Based on the adjusted target element, a replacement process is performed on the target element.

3. The method according to claim 1, characterized in that: The processing operation includes a rendering operation; The processing of the target element in response to the processing operation of the user includes: In response to the rendering operation, extracting the target element in the first layer; The target element is rendered separately to obtain a rendered target element; and based on the rendered target element, the target element is replaced.

4. The method according to any one of claims 1 to 3, characterized in that: Adding the target element to the first layer based on the placement position information of the target element includes: Based on the placement position information, determining an insertion point of the target element in the first layer; The target element is added to the first layer; wherein the reference point of the target element coincides with the coordinates of the insertion point; and the reference point is a second designated position point in the target element.

5. The method according to any one of claims 1 to 4, characterized in that: The format of the target element includes at least one of the following: png, webp.

6. The method according to any one of claims 1 to 5, characterized in that: After processing the target element, the method further includes: The target element is used as an input of a rendering model, and a first layer of the target element after rendering is obtained as an output.

7. An image processing device, characterized in that: include: An acquisition module, configured to acquire placement position information of a target element in response to a user's position information acquisition operation; wherein the placement position of the target element is located in a first layer, and the original image is located in a second layer; and the first layer is different from the second layer; An adding module, used for adding the target element in the first layer based on the placement position information of the target element; the target element is obtained based on the existing picture; The processing module is used to process the target element in response to a processing operation of the user.

8. An electronic device, characterized in that: The device comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes any one of the methods in claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The storage medium comprises a program code, and when the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any one of the methods of claims 1 to 6.