Image processing method, device, equipment and storage medium
By detecting update instructions and independently updating the target background image or foreground image, the problem of low image processing flexibility in the existing technology is solved, and a smoother image processing process is achieved.
Patent Information
- Application Number
- CN202210058166.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-19
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-01-19
AI Technical Summary
Existing image processing methods need to reload the original image and drawn elements when updating the image, resulting in low flexibility in image processing and possibly incomplete display and lag.
By detecting the update instruction, the first view and the second view associated with the target image are obtained, the target view to be updated is determined according to the update instruction, and the target view is updated according to the update content, and the target background image or foreground image is independently updated to improve the flexibility of image processing. sex.
It achieves independent updating of the target background image and foreground image in the target image, improves the flexibility of image processing, and avoids the problems of incomplete display and lag.
Smart Images

Figure CN114510169B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, apparatus, device and storage medium. Background Art
[0002] With the rapid development of communication technology, social software has gradually become an important tool for communication in people's daily lives, and image processing is a common function in social software.
[0003] In the process of image processing, taking drawing a curve on an original picture as an example, after drawing a curve, when initiating drawing on the original picture again on this basis, it is necessary to reload the original picture and the drawn curve, that is, refresh and redraw the original picture and the drawn elements. In the case where the original picture or the drawn elements occupy a large storage space in the electronic device, within a fixed refresh cycle, the original picture or the drawn elements may not be fully displayed, resulting in a visual stuttering effect. At present, the way to solve image processing stuttering is usually to transfer the original picture and the drawn elements in the target image to be processed to one layer, add the newly drawn elements to another layer, and finally merge the contents of the two layers and display them on the screen.
[0004] However, in the above method, when adding a newly drawn element, the storage location of the original image needs to be transferred, and the flexibility of image processing is low. Summary of the invention
[0005] Based on this, it is necessary to provide an image processing method, device, equipment and storage medium to address the above technical problems, which can improve the flexibility of image processing.
[0006] In a first aspect, the present application provides an image processing method, the method comprising:
[0007] When an update instruction for updating a target image is detected, a first view and a second view associated with the target image are acquired, wherein the first view defines attribute information of a target background image of the target image, and the second view defines attribute information of at least one first element object in a target foreground image of the target image;
[0008] Determine, according to the update instruction, a target view to be updated, where the target view is the first view or the second view;
[0009] Acquire update content, and update the content of the target view according to the update content;
[0010] Views other than the target view in the first view and the second view are acquired as non-updated views, and the content in the updated target view and the content in the non-updated view are loaded to display the updated target image.
[0011] In combination with the first aspect, in some embodiments, before determining the target view to be updated according to the update instruction, the method further includes:
[0012] Setting a first trigger condition corresponding to the first view and a second trigger condition corresponding to the second view;
[0013] The step of determining the target view to be updated according to the update instruction includes:
[0014] When the update instruction satisfies the first trigger condition, determining that the target view is the first view;
[0015] When the update instruction satisfies the second trigger condition, the target view is determined to be the second view.
[0016] In combination with the first aspect, in some embodiments, the method is applied to a terminal device including a user interaction interface, and the obtaining of update content includes:
[0017] Acquiring user interaction information, wherein the user interaction information includes information related to the target image input by the user on the user interaction interface;
[0018] The update content is determined according to the user interaction information.
[0019] In combination with the first aspect, in some embodiments, determining the update content according to the user interaction information includes:
[0020] When the target view is the first view, acquiring an identifier of the newly added image selected by the user from the user interaction information;
[0021] According to the identifier of the newly added image, attribute information of the newly added image is obtained from a first storage space associated with the first view, and the attribute information of the newly added image is determined as the update content. The first storage space stores attribute information of at least one background image used historically.
[0022] In combination with the first aspect, in some embodiments, updating the content of the target view according to the update content includes:
[0023] The attribute information of the newly added image is added to the first view to update the attribute information of the target background image in the first view.
[0024] In combination with the first aspect, in some embodiments, determining the update content according to the user interaction information includes:
[0025] When the target view is the second view, acquiring an identifier of at least one second element object selected by the user from the user interaction information;
[0026] According to the identifier of the at least one second element object, attribute information of the at least one second element object is obtained from a second storage space associated with the second view, and the attribute information of the at least one second element object is determined as the update content. The second storage space stores attribute information of at least one element object that has been used historically.
[0027] In combination with the first aspect, in some embodiments, determining the update content according to the user interaction information includes:
[0028] When the target view is the second view, obtaining a sliding track of the user on the user interaction interface from the user interaction information, and determining attribute information of the sliding track;
[0029] Acquire an identifier of at least one second element object selected by the user from the user interaction information, and acquire attribute information of the at least one second element object from a second storage space associated with the second view according to the identifier of the at least one second element object, wherein the second storage space stores attribute information of at least one element object that has been used historically;
[0030] The update content is determined according to the attribute information of the sliding track and the attribute information of the at least one second element object.
[0031] In a second aspect, the present application provides an image processing device, the device comprising:
[0032] an acquiring unit, configured to acquire, when an update instruction for updating a target image is detected, a first view and a second view associated with the target image, wherein the first view defines attribute information of a target background image of the target image, and the second view defines attribute information of at least one first element object in a target foreground image of the target image;
[0033] a determining unit, configured to determine a target view to be updated according to the update instruction, wherein the target view is the first view or the second view;
[0034] An updating unit, configured to obtain update content and update the content of the target view according to the update content;
[0035] A loading unit is used to obtain views other than the target view in the first view and the second view as non-updated views, and load the content in the updated target view and the content in the non-updated view to display the updated target image.
[0036] In conjunction with the second aspect, in some embodiments, the apparatus further includes:
[0037] a setting unit, configured to set a first trigger condition corresponding to the first view and a second trigger condition corresponding to the second view;
[0038] The determining unit is specifically configured to:
[0039] When the update instruction satisfies the first trigger condition, determining that the target view is the first view;
[0040] When the update instruction satisfies the second trigger condition, the target view is determined to be the second view.
[0041] In conjunction with the second aspect, in some embodiments, the apparatus is applied to a terminal device including a user interaction interface; and the updating unit is specifically configured to:
[0042] Acquiring user interaction information, wherein the user interaction information includes information related to the target image input by the user on the user interaction interface;
[0043] The update content is determined according to the user interaction information.
[0044] In conjunction with the second aspect, in some embodiments, the determining unit is specifically configured to:
[0045] When the target view is the first view, acquiring an identifier of the newly added image selected by the user from the user interaction information;
[0046] According to the identifier of the newly added image, attribute information of the newly added image is obtained from a first storage space associated with the first view, and the attribute information of the newly added image is determined as the update content. The first storage space stores attribute information of at least one background image used historically.
[0047] In conjunction with the second aspect, in some embodiments, the updating unit is specifically configured to:
[0048] The attribute information of the newly added image is added to the first view to update the attribute information of the target background image in the first view.
[0049] In conjunction with the second aspect, in some embodiments, the determining unit is specifically configured to:
[0050] When the target view is the second view, acquiring an identifier of at least one second element object selected by the user from the user interaction information;
[0051] According to the identifier of the at least one second element object, attribute information of the at least one second element object is obtained from a second storage space associated with the second view, and the attribute information of the at least one second element object is determined as the update content. The second storage space stores attribute information of at least one element object that has been used historically.
[0052] In conjunction with the second aspect, in some embodiments, the determining unit is specifically configured to:
[0053] When the target view is the second view, obtaining a sliding track of the user on the user interaction interface from the user interaction information, and determining attribute information of the sliding track;
[0054] Acquire an identifier of at least one second element object selected by the user from the user interaction information, and acquire attribute information of the at least one second element object from a second storage space associated with the second view according to the identifier of the at least one second element object, wherein the second storage space stores attribute information of at least one element object that has been used historically;
[0055] The update content is determined according to the attribute information of the sliding track and the attribute information of the at least one second element object.
[0056] In a third aspect, the present application provides an image processing device, comprising a processor, a memory, and a communication interface, wherein the processor, the memory, and the communication interface are interconnected, wherein the communication interface is used to receive and send data, the memory is used to store a computer program, and the processor is used to call the computer program to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0057] In a fourth aspect, the present application provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium; when the computer program runs on one or more processors, the one or more processors execute the method described in the first aspect and any possible implementation manner of the first aspect.
[0058] In an embodiment of the present application, when an update instruction for updating a target image is received, the first view and the second view associated with the target image can be first obtained, and the first view or the second view can be determined as the target view to be updated according to the update instruction, and the target view can be updated in combination with the obtained update content to achieve independent update of the target background image or the target foreground image in the target image. The present application can achieve independent update of the target background image and the target foreground image containing the drawn elements during the image processing process by separately storing the target background image of the target image and the target foreground image containing the drawn elements, thereby improving the flexibility of image processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments are briefly introduced below.
[0060] Figure 1 A schematic diagram of an application scenario of an image processing method provided in an embodiment of the present application;
[0061] Figure 2 A flowchart of an image processing method provided in an embodiment of the present application;
[0062] Figure 3 A schematic diagram of an application scenario for updating a target background image provided by an embodiment of the present application;
[0063] Figure 4 A schematic diagram of an application scenario for updating a target foreground image provided by an embodiment of the present application;
[0064] Figure 5 A schematic diagram of an application scenario of another image processing method provided in an embodiment of the present application;
[0065] Figure 6 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0066] Figure 7 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0068] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and appended claims of the present application, the singular expressions "a", "a", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context.
[0069] In the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c".
[0070] With the development of image processing technology, the image processing functions of various applications are widely used in people's daily work or study, and along with it comes people's higher demand for flexibility in the image processing process.
[0071] At present, the image processing method is usually to store an original image and several drawn element objects in the same view or layer, and draw the newly added element objects in another view or layer. To more clearly illustrate the above method, the embodiment of the present application provides an application scenario diagram of the above method.
[0072] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of an image processing method provided in an embodiment of the present application.
[0073] like Figure 1 As shown, the schematic diagram of the application scenario includes: an original picture 101, an element object 102, a cache layer 103, an active layer 104, and an element object 105. The original picture 101 and the element object 102 together constitute the target image to be processed, the original picture 101 can be regarded as the target background image of the target image, the element object 102 can be regarded as the content in the target foreground image of the target image, the cache layer 103 is used to store the original picture 101 and the element object 102 that does not need to be adjusted, and the active layer 104 is used to store the newly added element object 105.
[0074] In the implementation process of the above-mentioned image processing method, the original picture 101 and the element object 102 that does not need to be adjusted in the target image to be processed are first split and transferred to the cache layer 103, and then the newly added element object 105 is drawn in the active layer 104. After the drawing is completed, the contents in the above-mentioned cache layer 103 and the above-mentioned active layer 104 are merged and displayed on the display of the terminal device to realize the update of the target image.
[0075] However, in the above method, each time an image is updated, it is necessary to separate the drawn element objects and the original image as the target images to be processed, and transfer all the content that does not need to be adjusted, including the original image, to the cache layer. In addition, the original image is fixed and unchanged, and the flexibility of image processing is low.
[0076] An embodiment of the present application provides an image processing method. In order to more clearly describe the solution of the present application, some drawings involved in the present application are further introduced below.
[0077] See also Figure 2 , Figure 2 A schematic diagram of a flow chart of an image processing method provided in an embodiment of the present application. Figure 2 As shown, the above method comprises the following steps:
[0078] S201: When an update instruction for updating a target image is detected, a first view and a second view associated with the target image are acquired.
[0079] In an embodiment of the present application, the target image may be an image imported from a system image library of a terminal device, or may be an image loaded through a network. The first view and the second view respectively define the attribute information of the target background image of the target image and the attribute information of at least one first element object in the target foreground image of the target image. It can be understood that the target background image is one or more images displayed as a background in the target image, and the target foreground image is at least one first element object in the target image other than the above-mentioned images, and the first element object may be any one of an image element, a graphic element or a text element. Among them, the image element includes an actual scene picture captured by an electronic device or any picture stored in a digital form, the graphic element includes a vector diagram composed of external contour lines, and the text element includes text input through an instruction or data input device.
[0080] Exemplarily, when the target image is an image imported from a system image library of a terminal device, the access right to the system image library may be obtained first, and after being authorized, the system image library may be opened to obtain the storage path of the target image, thereby obtaining the target image. Alternatively, when the target image is an image loaded from a network, the uniform resource locator (URL) address of the target image may be obtained, and the target image may be loaded to obtain the target image.
[0081] Further, after acquiring the target image, a control having a function of identifying or receiving the update instruction is called to detect the update instruction. When the update instruction is detected, the first view and the second view are acquired according to the hierarchical relationship between the target image and the first view and the second view.
[0082] S202: Determine the target view to be updated according to the above update instruction.
[0083] In the embodiment of the present application, the target view is the first view or the second view mentioned above.
[0084] Optionally, the target view to be updated can be determined by setting a first trigger condition corresponding to the first view and a second trigger condition corresponding to the second view. Specifically, when the update instruction satisfies the first trigger condition, the target view is determined to be the first view; when the update instruction satisfies the second trigger condition, the target view is determined to be the second view.
[0085] Exemplarily, a first icon corresponding to the first view and a second icon corresponding to the second view may be respectively set on a display that displays the target image; when the first icon is clicked, the target view is determined to be the first view; and when the second icon is clicked, the target view is determined to be the second view.
[0086] Alternatively, a first gesture corresponding to the first view and a second gesture corresponding to the second view may be respectively set. Specifically, a sensor with a gesture recognition function is installed on the terminal device where the display is located. When the first gesture is sensed, the target view is determined to be the first view. When the second gesture is sensed, the target view is determined to be the second view.
[0087] Alternatively, a first voice corresponding to the first view and a second voice corresponding to the second view may be respectively set, and a sensor with a voice recognition function may be installed on the terminal device where the display is located. Specifically, the sensor with a voice recognition function may be equipped with a semantic analysis algorithm, and when the first voice or a voice text with the same semantics as the first voice is recognized, the target view is determined to be the first view; when the second voice or a voice text with the same semantics as the second voice is recognized, the target view is determined to be the second view.
[0088] S203: Acquire update content, and update the content of the target view according to the update content.
[0089] In an embodiment of the present application, the update content may include different contents according to the different target views. Specifically, in the case where the target view is the first view, the update content may include a first operation type performed on the attribute information of the target background image defined in the first view, and the operation type includes any one of adding an image to the target background image, deleting an image, and modifying an image. Alternatively, in the case where the target view is the second view, the update content may include a second operation type performed on the attribute information of the target foreground image defined in the second view, and the second operation type includes any one of adding an element object to the target foreground image, deleting an element object, and adjusting an element object.
[0090] Optionally, the image processing method may be applied to a terminal device including a user interaction interface, and information related to the target image input by a user on the user interaction interface may be obtained as user interaction information, and the update content may be determined based on the user interaction information.
[0091] In some possible implementations, the attribute information of at least one background image that has been used in the past can be stored in a first storage space, and the first storage space has a hierarchical relationship with the first view. When the target view is the first view and the first operation type included in the update content is to add an image to the target background image, the identifier of the newly added image selected by the user can be obtained from the user interaction information, and the attribute information of the newly added image can be obtained from the first storage space according to the identifier, and the attribute information of the newly added image can be determined as the update content, and the update content can be added to the first view.
[0092] To more clearly describe the process of obtaining the attribute information of the newly added image from the first storage space and adding it to the first view, the following will be combined with the attached diagram provided in the embodiment of the present application. Figure 3 For further introduction.
[0093] See also Figure 3 , Figure 3 A schematic diagram of an application scenario for updating a target background image provided by an embodiment of the present application. Figure 3As shown, the application scenario includes a first storage space 301, a newly added image 302, a first view 303, and a target background image 304. The newly added image 302 in the first storage space 301 in the figure is the image selected by the user, and the newly added image 302 in the first view 303 is a newly added image relative to the target background image 304, and the target background image 304 includes at least one image. It should be noted that the identifier of each background image can be determined in the order of storage time in the first storage space 301, such as the character identifier in the upper left corner of each image shown in the figure, which can be used as an index to obtain the attribute information of each background image.
[0094] In the process of updating the content in the first view 303, the first storage space 301 is accessed by calling a specified interface, the newly added image 302 is selected and the identifier of the newly added image 302 is obtained, and the attribute information associated with the newly added image 302 is obtained according to the identifier of the newly added image 302, and the attribute information of the newly added image 302 is added to the first view 303 to achieve the update of the target background image in the first view. It can be understood that the updated target background image includes the target background image 304 and the newly added image 302, and accordingly, the updated first view 303 includes the attribute information of the target background image 304 and the attribute information of the newly added image 302.
[0095] In some possible implementations, the attribute information of at least one first element object that has been drawn historically may be stored in a second storage space, and the second storage space has a hierarchical relationship with the second view. When the target view is the second view and the second operation type included in the update content is to add an element object to the target foreground image, the identifier of the at least one second element object selected by the user may be obtained from the user interaction information, and the attribute information of the at least one second element object may be obtained from the second storage space according to the identifier, and the attribute information of the at least one second element object may be determined as the update content, and the update content may be added to the second view.
[0096] In particular, in some possible implementations, the sliding trajectory of the user on the above-mentioned user interaction interface can be obtained from the above-mentioned user interaction information, and the attribute information of the sliding trajectory can be determined, and then the attribute information of at least one second element object can be obtained from the above-mentioned second storage space, and the above-mentioned update content can be determined according to the attribute information of the above-mentioned sliding trajectory and the attribute information of the above-mentioned at least one second element object, and the updated content can be added to the above-mentioned second view.
[0097] To more clearly describe the process of obtaining the attribute information of the sliding track and the attribute information of the at least one second element object from the second storage space and adding them to the second view, the following will be combined with the attached diagram provided in the embodiment of the present application. Figure 4 For further introduction.
[0098] See also Figure 4 , Figure 4 A schematic diagram of an application scenario for updating a target foreground image provided by an embodiment of the present application. Figure 4 As shown, the application scenario includes: a second storage space 401, a second element object 402, a terminal device 403, a user interaction interface 404, a sliding track 405, a second view 406, an update content 407, a second view 408, and an update content 409. The second storage space 401 stores at least one first element object drawn historically, and the first element object includes an image element, a graphic element, and a text element. The second element object 402 is included in the second storage space 401, and the terminal device 403 is installed with a user interaction interface 404.
[0099] It should be noted that, in the second storage space 401, the identifier of at least one of the first element objects can be determined according to the order of storage time, and the attribute information of each first element object can be obtained based on the identifier. In addition, the number of second element objects in the method shown in the figure can be one or more, and the second element object can be an image element, a graphic element or a text element. The second element object 402 shown in the figure is only a possible presentation form of the second element object, and the implementation of the above method should not be limited to this.
[0100] In the process of adding an element object to the target foreground image, the second storage space 401 can be accessed by calling a specified interface, the second element object 402 is selected and the identifier of the second element object 402 is obtained, and the attribute information associated with the second element object 402 is obtained according to the identifier of the second element object 402. When the user performs a sliding operation in the user interaction interface 404, the user interaction interface 404 responds to the sliding event and calls the corresponding sliding control to receive the sliding track 405 drawn by the user. The update content is determined according to the attribute information of the sliding track 405 and the attribute information of the second element object 402, and the update content is added to the second view.
[0101] Optionally, when the second element object 402 is used as the line color of the sliding track 405, the updated content 407 is obtained, and the updated content 407 is displayed in the updated second view 406. Alternatively, when the second element object 402 is used as the fill color of the sliding track 405, the updated content 409 is obtained, and the updated content 409 is displayed in the updated second view 408. It can be understood that the content of the second view 406, the second view 408 and the second view before the update may be different.
[0102] S204: Obtain views other than the target view in the first view and the second view as non-updated views, load the content in the updated target view and the content in the non-updated view to display the updated target image.
[0103] In an embodiment of the present application, the content in the target view after the update may be different from the content in the target view before the update. It can be understood that for the non-updated view, there is no need to refresh and redraw during the loading process. It is only necessary to obtain the content in the non-updated view and display it in the designated area of the display.
[0104] Exemplarily, the first display area and the second display area of the updated target view and the non-updated view in the display may be respectively determined first, and then the contents of the updated target view and the non-updated view may be loaded, and the contents of the updated target view and the non-updated view may be displayed in the display in combination with the first display area and the second display area.
[0105] Among them, the first loading control corresponding to the first view and the second loading control corresponding to the second view can be called respectively to obtain the first data information for describing the content in the updated target view and the second data information for describing the content in the non-updated view, and obtain the content in the updated target view and the non-updated view. Then, by respectively decoding the first data information and the second data information, the first pixel information and the second pixel information are obtained, and the first pixel information and the second pixel information are displayed in the first display area and the second display area respectively, so as to realize that the content in the updated target view and the non-updated view is displayed in the display.
[0106] In some possible implementations, when the target background image includes two or more images, the target background image can be dynamically displayed by setting the switching frequency of each image. Figure 5 For further introduction.
[0107] See also Figure 5 , Figure 5 A schematic diagram of another application scenario of an image processing method provided in an embodiment of the present application. Figure 5 As shown, the application scenario includes a first view 501, a second view 502, a target background image 503, a target foreground image 504, a first element object 505, and a terminal device 506. The first view 501 may be the first view 303 before or after the update, the second view 502 may be the second view 406 before or after the update, or the second view 408 before or after the update, the target background image 503 may be the target background image 304 before or after the update, and the target foreground image 504 may include the update content 407 and the update content 409 mentioned above.
[0108] Before loading the content in the first view 501 and the second view 502, the switching frequency of each image in the target background image 503 can be set to control the display time of each image, and then the first loading control corresponding to the first view 501 and the second loading control corresponding to the second view 502 are respectively called to obtain the content in the first view 501 and the second view 502, and display them on the display of the terminal device 506. Assuming that the display time of each image is T, the display effect can be described as follows: starting from image 1, after a time of 1·T, image 2 begins to be displayed, and so on, after a time of (n-1)·T, image n begins to be displayed. After each image in the target image background 503 is displayed once, it is regarded as a complete display process. It should be noted that after a completed display process is completed, the above display may be in a state of displaying image n or image 1 alone, or the above display process may be re-initiated one or more times. In addition, the terminal device in the embodiment of the present application includes a smart phone, a computer, or a wearable electronic device that can implement the image processing method in the present application.
[0109] In an embodiment of the present application, when an update instruction for updating a target image is received, the first view and the second view associated with the target image can be first obtained, and the first view or the second view can be determined as the target view to be updated according to the update instruction, and the target view can be updated in combination with the obtained update content to achieve independent update of the target background image or the target foreground image in the target image. The present application can achieve independent update of the target background image and the target foreground image containing the drawn elements during the image processing process by separately storing the target background image of the target image and the target foreground image containing the drawn elements, thereby improving the flexibility of image processing.
[0110] The present application also provides an image processing device. Figure 6 , Figure 6 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application.
[0111] like Figure 6 As shown, the image processing device may include:
[0112] The acquisition unit 601 is configured to acquire, when an update instruction for updating a target image is detected, a first view and a second view associated with the target image, wherein the first view defines attribute information of a target background image of the target image, and the second view defines attribute information of at least one first element object in a target foreground image of the target image;
[0113] A determining unit 602, configured to determine a target view to be updated according to the update instruction, where the target view is the first view or the second view;
[0114] An updating unit 603, configured to obtain update content and update the content of the target view according to the update content;
[0115] The loading unit 604 is used to obtain views other than the target view in the first view and the second view as non-updated views, and load the content in the updated target view and the content in the non-updated view to display the updated target image.
[0116] In a possible design, the above device further includes:
[0117] A setting unit 605, configured to set a first trigger condition corresponding to the first view and a second trigger condition corresponding to the second view;
[0118] The determination unit 602 is specifically configured to:
[0119] In a case where the update instruction satisfies the first trigger condition, determining that the target view is the first view;
[0120] When the update instruction satisfies the second trigger condition, the target view is determined to be the second view.
[0121] In a possible design, the above-mentioned apparatus is applied to a terminal device including a user interaction interface; the above-mentioned updating unit 603 is specifically used for:
[0122] Acquiring user interaction information, wherein the user interaction information includes information related to the target image input by the user on the user interaction interface;
[0123] The update content is determined based on the user interaction information.
[0124] In a possible design, the determining unit 602 is specifically configured to:
[0125] When the target view is the first view, obtaining an identifier of the newly added image selected by the user from the user interaction information;
[0126] According to the identification of the newly added image, the attribute information of the newly added image is obtained from the first storage space associated with the first view, and the attribute information of the newly added image is determined as the updated content. The first storage space stores the attribute information of at least one background image used historically.
[0127] In a possible design, the updating unit 603 is specifically configured to:
[0128] The attribute information of the newly added image is added to the first view to update the attribute information of the target background image in the first view.
[0129] In a possible design, the determining unit 602 is specifically configured to:
[0130] When the target view is the second view, acquiring an identifier of at least one second element object selected by the user from the user interaction information;
[0131] According to the identifier of the at least one second element object, the attribute information of the at least one second element object is obtained from the second storage space associated with the second view, and the attribute information of the at least one second element object is determined as the updated content. The attribute information of at least one element object that has been used historically is stored in the second storage space.
[0132] In a possible design, the determining unit 602 is specifically configured to:
[0133] In a case where the target view is the second view, obtaining a sliding track of the user on the user interaction interface from the user interaction information, and determining attribute information of the sliding track;
[0134] Acquire an identifier of at least one second element object selected by the user from the user interaction information, and acquire attribute information of the at least one second element object from a second storage space associated with the second view according to the identifier of the at least one second element object, wherein the second storage space stores attribute information of at least one element object that has been used historically;
[0135] The update content is determined according to the attribute information of the sliding track and the attribute information of the at least one second element object.
[0136] in, Figure 6 The detailed description of the embodiment of the device shown can refer to the aforementioned Figures 2 to 5 The specific description of the method embodiment shown in will not be repeated here.
[0137] The present application also provides an image processing device. Figure 7 , Figure 7 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application.
[0138] like Figure 7 As shown, the image processing device 700 may include: at least one processor 701, such as a central processing unit (CPU), at least one communication interface 703, a memory 704, and at least one communication bus 702. The communication bus 702 is used to realize the connection and communication between these components. The communication interface 703 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The memory 704 may be a cache memory or a non-volatile memory (NVM), such as at least one disk storage. The memory 704 may optionally be at least one storage device located away from the aforementioned processor 701. As shown in FIG. Figure 7 As shown, the memory 704 as a computer storage medium may include an operating system, a network communication unit, and program instructions.
[0139] exist Figure 7 In the image processing device 700 shown, the processor 701 may be used to load program instructions stored in the memory 704, and specifically perform the following operations:
[0140] When an update instruction for updating a target image is detected, a first view and a second view associated with the target image are acquired, wherein the first view defines attribute information of a target background image of the target image, and the second view defines attribute information of at least one first element object in a target foreground image of the target image;
[0141] Determine, according to the update instruction, a target view to be updated, where the target view is the first view or the second view;
[0142] Acquire update content, and update the content of the target view according to the update content;
[0143] Views other than the target view in the first view and the second view are acquired as non-updated views, and the content in the updated target view and the content in the non-updated view are loaded to display the updated target image.
[0144] It should be noted that the specific implementation process can be found in Figures 2 to 5 The specific description of the method embodiment shown in will not be repeated here.
[0145] The present application also provides a computer-readable storage medium, which can store a plurality of instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figures 2 to 5 The method steps of the embodiment shown in , and the specific execution process can be seen in Figures 2 to 5 The specific description of the embodiments shown in is not repeated here.
[0146] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function of the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. 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 a data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital versatile disk), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0147] A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program codes.
Claims
1. An image processing method, characterized in that: The method comprises: When an update instruction for updating a target image is detected, a first view and a second view associated with the target image are acquired, wherein the first view defines attribute information of a target background image of the target image, and the second view defines attribute information of at least one first element object in a target foreground image of the target image; Displaying a first icon corresponding to the first view and a second icon corresponding to the second view, and determining that the target view to be updated is the first view when the first icon is clicked, and determining that the target view to be updated is the second view when the second icon is clicked; or, determining that the target view is the first view when a first gesture corresponding to the first view is detected, and determining that the target view is the second view when a second gesture corresponding to the second view is sensed; or, determining that the target view is the first view when a first voice corresponding to the first view is recognized, and determining that the target view is the second view when a second voice corresponding to the second view is recognized; Acquire update content, and update the content of the target view according to the update content; Acquire views other than the target view in the first view and the second view as non-updated views, load the content in the updated target view and the content in the non-updated view to display the updated target image; The acquiring of the updated content and updating the content of the target view according to the updated content includes: When the target view is the first view and the first operation type is to add an image to the target background image, calling a specified interface to access a first storage space, the first storage space stores attribute information of at least one background image that has been used historically, and there is a hierarchical relationship between the first storage space and the first view; Acquire an identifier of a newly added image selected by the user from the user interaction information, acquire attribute information of the newly added image from the first storage space according to the identifier of the newly added image, determine the attribute information of the newly added image as updated content, and add the updated content to the first view; When the target view is the second view and the second operation type included in the update content is adding an element object to the target foreground image, calling a specified interface to access a second storage space, the second storage space storing attribute information of at least one element object that has been drawn historically, and the second storage space and the second view have a hierarchical relationship; Acquire an identifier of at least one second element object selected by the user from the user interaction information, and acquire a sliding track of the user on the user interaction interface from the user interaction information, and determine attribute information of the sliding track; Acquire attribute information of the at least one second element object from the second storage space according to the identifier of the at least one second element object; Based on the attribute information of the sliding track and the attribute information of the at least one second element object, the update content is determined and added to the second view, wherein the update content includes the sliding track, the lines of the sliding track are composed of the second element objects, or the update content includes a closed figure composed of the sliding track, and the closed figure is filled with the second element objects.
2. An image processing device, characterized in that: The device comprises a unit for executing the method according to claim 1, the device comprising: an acquiring unit, configured to acquire, when an update instruction for updating a target image is detected, a first view and a second view associated with the target image, wherein the first view defines attribute information of a target background image of the target image, and the second view defines attribute information of at least one first element object in a target foreground image of the target image; a determining unit, configured to determine a target view to be updated according to the update instruction, wherein the target view is the first view or the second view; An updating unit, configured to obtain update content and update the content of the target view according to the update content; A loading unit is used to obtain views other than the target view in the first view and the second view as non-updated views, and load the content in the updated target view and the content in the non-updated view to display the updated target image.
3. An image processing device, characterized in that: It includes a processor, a memory and a communication interface, wherein the processor, the memory and the communication interface are connected to each other, wherein the communication interface is used to receive and send data, the memory is used to store a computer program, and the processor is used to call the computer program to execute the method as claimed in claim 1.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program; when the computer program runs on one or more processors, the method according to claim 1 is executed.
