Picture editing method and device based on large language model and computer equipment

Through the image editing method based on the large language model, the user's natural language editing request is analyzed using the large language model, and combined with the location, attributes and object information of the image elements, the precise editing of the picture is achieved, solving the problems of complex operations and high thresholds in the existing technology, and improving editing efficiency and flexibility.

CN119722870APending Publication Date: 2025-03-28SHANGHAI CAIYUE XINGCHEN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411873265.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Existing image editing technologies are difficult to meet users' diverse and personalized needs for image editing, and lack the ability to understand users' natural language expression, resulting in complex operations and high thresholds.

Method used

Using a large language model-based picture editing method, by obtaining the element information of the picture to be edited, the correlation information of location information, attribute information and object information is established, and saved in the vector database. Users use natural language input editing requests, identify and understand editing information through large language models, recall the information in the vector database and convert it into editing parameters, and edit the picture.

Benefits of technology

It enables users to easily express complex editing needs in natural language, and can achieve accurate editing without professional knowledge, reduce the threshold and learning cost, improve editing efficiency and flexibility, and ensure natural and professional editing effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722870A_ABST
    Figure CN119722870A_ABST
Patent Text Reader

Abstract

The invention relates to a picture editing method and device based on a large language model and computer equipment. The method comprises the steps of obtaining element information of a to-be-edited picture, establishing association information of position information, attribute information and object information in the element information, storing the association information in a vector database, obtaining a picture editing request of a user, obtaining editing information of the picture editing request through a large language model, and storing the editing information in the vector database. And recalling the position information, the attribute information or the object information in the vector database through the editing information, determining element information according to the associated information, and converting the element information into editing parameters by utilizing a large language model to edit the picture. By adopting the method, accurate picture editing can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a picture editing method, apparatus and computer equipment based on a large language model. Background Art

[0002] In today's digital age, picture editing has become a common need in people's daily lives and professional work. With the continuous advancement of science and technology, picture editing technology is also continuing to develop and evolve. On the one hand, the popularity of smart devices has made taking photos extremely convenient. People have a large number of picture resources, and the demand for picture editing is growing. Not only do they require the ability to process daily photos quickly and easily, but they also expect to obtain more efficient and creative editing tools in professional creation. On the other hand, the rapid development of artificial intelligence technology has brought new opportunities to the field of picture editing. More and more technologies are trying to integrate intelligent algorithms into the picture editing process to improve the efficiency and quality of editing and meet the diverse needs of users.

[0003] At present, the existing image editing technologies mainly include traditional professional software and some simple applications. Traditional professional image editing software, such as Photoshop, is powerful and comprehensive, and can realize various complex editing operations, but this also means that users need to have professional graphic design knowledge and proficient software operation skills. Learning to use such software often requires a lot of time and effort, and the technical threshold is too high for ordinary users. Moreover, even performing some simple modification tasks, such as adjusting the color or cropping the size of the picture, may involve multiple complex steps in professional software, and the operation is cumbersome. Although some simple filter applications are relatively easy to operate, they have relatively single functions and can only provide limited preset effects, which cannot meet the user's diversified and personalized needs for image editing. In addition, existing technologies generally lack the ability to intelligently understand the modification needs expressed by users in natural language. Users need to use complex menu operations or manually adjust parameters to realize their editing intentions, which is quite different from people's daily intuitive expression and operation methods. Summary of the invention

[0004] Based on this, it is necessary to provide a picture editing method, device and computer equipment based on a large language model to address the above technical problems.

[0005] A picture editing method based on a large language model, the method comprising:

[0006] Obtaining element information of the image to be edited; the element information includes location information, attribute information and object information;

[0007] Establishing association information of location information, attribute information and object information in the element information, and saving it in a vector database;

[0008] Obtaining a user's image editing request, and obtaining editing information of the image editing request through a large language model;

[0009] The location information, attribute information or object information in the vector database is recalled through the editing information, and the element information is determined according to the associated information, and the large language model is used to convert the element information into editing parameters to edit the picture.

[0010] In one of the embodiments, the location information class includes: pixel coordinates and location coordinates, the attribute information class includes: color, position, size, brightness, color and texture, and the object information class is the object identified in the image.

[0011] In one of the embodiments, it also includes: using an edge detection algorithm to determine the boundaries of each element of the image to be edited to obtain the location information of the element; using a preset color recognition algorithm to obtain the color value, a brightness calculation algorithm to calculate the brightness, a size measurement algorithm to determine the size of the element, and a texture analysis algorithm to extract texture features to obtain the attribute information of the element; identifying the image to be edited according to a pre-trained image recognition algorithm to obtain the object information of the element.

[0012] In one of the embodiments, the method further includes: identifying the location information, attribute information and object information contained in the image editing request through a large language model; and generating editing information based on the identified location information, attribute information or object information.

[0013] A picture editing device based on a large language model, the device comprising:

[0014] An element information extraction module is used to obtain element information of the image to be edited; the element information includes location information, attribute information and object information;

[0015] A vector database construction module is used to establish the association information of the location information, attribute information and object information in the element information, and save it in the vector database;

[0016] An editing information acquisition module, used to acquire a user's image editing request and obtain the editing information of the image editing request through a large language model;

[0017] The editing module is used to recall the position information, attribute information or object information in the vector database through the editing information, determine the element information according to the association information, and use the large language model to convert the element information into editing parameters to edit the picture.

[0018] In one of the embodiments, the location information class includes: pixel coordinates and location coordinates, the attribute information class includes: color, position, size, brightness, color and texture, and the object information class is the object identified in the image.

[0019] In one of the embodiments, the element information extraction module is also used to use an edge detection algorithm to determine the boundaries of each element of the image to be edited, and obtain the location information of the element; use a preset color recognition algorithm to obtain the color value, a brightness calculation algorithm to calculate the brightness, a size measurement algorithm to determine the element size, and a texture analysis algorithm to extract texture features to obtain the attribute information of the element; identify the image to be edited according to a pre-trained image recognition algorithm to obtain the object information of the element.

[0020] In one of the embodiments, the editing information acquisition module is further used to identify the location information, attribute information and object information contained in the image editing request through a large language model; and generate the editing information based on the identified location information, attribute information or object information.

[0021] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0022] Obtaining element information of the image to be edited; the element information includes location information, attribute information and object information;

[0023] Establishing association information of location information, attribute information and object information in the element information, and saving it in a vector database;

[0024] Obtaining a user's image editing request, and obtaining editing information of the image editing request through a large language model;

[0025] The location information, attribute information or object information in the vector database is recalled through the editing information, and the element information is determined according to the associated information, and the large language model is used to convert the element information into editing parameters to edit the picture.

[0026] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0027] Obtaining element information of the image to be edited; the element information includes location information, attribute information and object information;

[0028] Establishing association information of location information, attribute information and object information in the element information, and saving it in a vector database;

[0029] Obtaining a user's image editing request, and obtaining editing information of the image editing request through a large language model;

[0030] The location information, attribute information or object information in the vector database is recalled through the editing information, and the element information is determined according to the associated information, and the large language model is used to convert the element information into editing parameters to edit the picture.

[0031] The above-mentioned image editing method, device and computer equipment based on the large language model, after the user inputs the image modification requirements in natural language, analyzes and understands through the AI ​​model, accurately identifies the image elements and combines their three layers of information of location, attributes and objects, converts the user requirements into editing parameters, and then generates multiple candidate results through image reconstruction. The synergy of these three layers of information allows ordinary users to easily express complex editing requirements in natural language, and can achieve accurate editing without professional knowledge, which reduces the threshold of use and learning cost; natural language interaction simplifies the operation process, reduces manual adjustments, quickly generates a variety of candidate solutions, supports iterative editing, and greatly improves editing efficiency and flexibility; the deep understanding and processing capabilities of the AI ​​model ensure accurate grasp of user intentions, automatically complete complex operations, and ensure natural and professional editing effects, making it suitable for a variety of scenarios, with broad application prospects and practical value. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a schematic diagram of a flow chart of a method for editing an image based on a large language model in one embodiment;

[0033] Figure 2 is a structural block diagram of a picture editing device based on a large language model in one embodiment;

[0034] Figure 3 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] In one embodiment, Figure 1 As shown, a picture editing method based on a large language model is provided, comprising the following steps:

[0037] Step 102, obtaining element information of the image to be edited.

[0038] Feature information includes location information, attribute information, and object information.

[0039] Position information refers to the specific location of each element in the image on a two-dimensional plane, which can be accurately represented by a coordinate system and pixel coordinates. It determines the distribution of elements in the image space and is an important basis for subsequent precise editing operations. For example, in a landscape photo, knowing the location information of the mountains, when performing editing operations such as adding fog effects, the fog effects can be accurately superimposed on the area where the mountains are located without affecting other parts of the picture, such as the sky or the grass in the foreground. This precise positioning capability is the basis for local editing and complex composition adjustments, ensuring the pertinence and accuracy of editing operations.

[0040] Attribute information describes the various visual features of the element itself. The color attribute defines the color presentation of the element. Different colors convey different emotions and information visually. By editing the color attributes, the hue, saturation and brightness of the element can be changed to create different atmospheres and visual effects. The brightness attribute determines the brightness of the element. Adjusting the brightness can highlight or weaken a certain element and enhance the layering and three-dimensional sense of the picture. The size attribute is related to the size of the element in the image. Changing the size can adjust the proportion and visual weight of the element in the picture, which is used to emphasize or reduce the importance of a certain element. The texture attribute reflects the detailed characteristics of the surface of the element, such as the roughness and smoothness of the object. Editing the texture can increase the realism of the image or create special artistic effects. These attributes are combined to determine the visual performance of the element, providing a rich adjustment dimension for editing operations.

[0041] Object information specifies what the various components of the image are, such as the sky, clouds, people, animals, buildings, etc. Object information provides a semantic understanding for editing operations, allowing the system to perform intelligent processing based on the user's editing needs for specific objects. When the user asks to "make the character's skin color healthier", the system identifies the person through object information, then locates the person's area based on its position information, and then adjusts it based on the skin color related data in the attribute information. Object information semantically integrates different position and attribute information, making editing operations more in line with human cognition and expression habits, and realizing the effective conversion from user natural language descriptions to specific editing actions, improving the system's ability to understand user intentions, and thus improving the intelligence of editing and user experience.

[0042] Location information, attribute information, and object information are interrelated and complementary, and together they form a complete system of element information. They provide a solid data foundation and basis for intelligent processing for the technology of using natural language to edit pictures, enabling the system to accurately understand user needs, achieve efficient, accurate, and natural picture editing operations, and meet users' diverse editing needs in different scenarios.

[0043] Step 104: Establish association information among location information, attribute information, and object information in the feature information, and save it in a vector database.

[0044] Step 106: Obtain the user's picture editing request, and obtain editing information of the picture editing request through the large language model.

[0045] First, obtaining the user's image editing request is the starting point of the entire process. Users express their expectations for image modification in the form of natural language, which is extremely flexible and close to human thinking habits. For example, users may say "lighten the color of the red flowers in the picture and add a few butterflies next to them" or "make the sky in the photo bluer, the clouds whiter, and make the buildings look clearer". The editing request entered by the user carries his or her creativity and vision for the final presentation of the image. It can cover a variety of needs from simple color adjustment to complex element addition and layout changes, reflecting the user's diverse purposes for image editing in different scenarios, such as beautifying photos for personal sharing and optimizing materials in professional design.

[0046] Then, the user's natural language editing request is input into the large language model for processing to obtain editing information. The large language model plays a key role with its powerful language understanding and generation capabilities. Inside the model, through learning and training on massive text data, it has the ability to deeply understand the grammatical structure, semantic logic and contextual relationships of natural language. When receiving the user's editing request, the model will first perform grammatical analysis on the input text to identify the keywords and phrases in the sentence and the logical relationships between them. For example, in the sentence "lighten the color of the red flowers in the picture", the model can identify "red flowers" as the operation object, "lighten the color" as the editing action, and "a little" indicates the degree of modification. At the same time, the model will also combine its knowledge reserves of common image editing operations and visual effects (also obtained through learning from a large amount of data) to semantically understand the user's request and determine the editing effect that the user really wants to achieve. For example, for "lighten the color", the model understands it as a specific image attribute adjustment operation such as reducing the saturation or brightness of the flower color.

[0047] Based on a deep understanding of user requests, the large language model further generates corresponding editing information. These editing information converts the user's natural language description into an instruction set or parameter set that the system can recognize and execute. It contains operation instructions for specific elements in the picture. For example, for the identified "red flower" element, the editing information will clarify its position in the picture (determined by the previous element recognition and positioning technology) and the color attribute parameters that need to be adjusted (such as specific saturation and brightness values). If it involves adding elements, such as "add a few butterflies next to it", the editing information will also include detailed information such as the shape, size, color, and position of the butterfly element. This information may be generated based on the model's cognition of common butterfly images and its understanding of the overall layout of the picture. In addition, the editing information may also include logical control information such as the order and priority of operations to ensure that multiple editing operations can be correctly coordinated and ultimately achieve the image editing effect expected by the user.

[0048] Step 108, recalling the position information, attribute information or object information in the vector database through editing information, determining the element information according to the associated information, and using the large language model to convert the element information into editing parameters to edit the image.

[0049] Semantic matching, mapping mechanisms, etc. can be used to recall location information, attribute information or object information in the vector database.

[0050] In the above-mentioned image editing method based on a large language model, after the user inputs the image modification requirements in natural language, the AI ​​model parses and understands, accurately identifies the image elements and combines their location, attributes, and object information to convert the user requirements into editing parameters, and then reconstructs the image to generate multiple candidate results. The synergy of these three layers of information allows ordinary users to easily express complex editing requirements in natural language, and achieve accurate editing without professional knowledge, which reduces the threshold for use and learning costs; natural language interaction simplifies the operation process, reduces manual adjustments, quickly generates a variety of candidate solutions, supports iterative editing, and greatly improves editing efficiency and flexibility; the deep understanding and processing capabilities of the AI ​​model ensure accurate grasp of user intentions, automatically complete complex operations, and ensure natural and professional editing effects, making it suitable for a variety of scenarios, with broad application prospects and practical value.

[0051] In one embodiment, the location information class includes: pixel coordinates and location coordinates, the attribute information class includes: color, position, size, brightness, color and texture, and the object information class is the object identified in the image.

[0052] In another embodiment, an edge detection algorithm is used to determine the boundaries of each element of the image to be edited to obtain the location information of the element; a preset color recognition algorithm is used to obtain the color value, a brightness calculation algorithm is used to calculate the brightness, a size measurement algorithm is used to determine the size of the element, and a texture analysis algorithm is used to extract texture features to obtain the attribute information of the element; the image to be edited is identified according to a pre-trained image recognition algorithm to obtain the object information of the element.

[0053] In one of the embodiments, the location information, attribute information, and object information included in the image editing request are identified through a large language model; and the editing information is generated based on the identified location information, attribute information, or object information.

[0054] In a specific embodiment, a user uploads a photo containing a person and a background landscape, and wishes to edit it as follows: "Make the face of the person in the photo brighter, the blue sky behind the person more vivid, and add a red balloon of moderate size in the lower left corner of the picture.

[0055] After the user enters the editing request, the system first performs text processing. The large language model begins to parse this natural language request, identifying different editing objects and their corresponding attributes and location information. For "face of a person", this is an object, and its related attribute is "brightness". The location information is represented by the coordinate range of the face area of ​​the person that has been determined in the image recognition stage, which belongs to the location layer; "bright" is a modification requirement for the brightness attribute in the attribute layer. "The blue sky behind the person" is an object, and "brighter color" involves the adjustment of the color attribute in the attribute layer, while its location information can be determined based on the area of ​​the blue sky in the picture that was previously identified and the relative position relationship with the person, which is also in the location layer. "Lower left corner of the picture" clarifies the location of adding the "red balloon" (object), "red" is the color attribute of the balloon, and "moderate size" is a description of the size attribute of the balloon. At the same time, the system presets or calculates the specific size value corresponding to "moderate" based on the overall proportion of the picture, which corresponds to the three layers of information: location, attribute, and object.

[0056] Based on the above analysis, the editing information is generated. The editing information for the human face includes its accurate position coordinate range (position layer), the current brightness attribute value and the target brightness value to be adjusted (attribute layer), and the object identification as "human face" (object layer). For the blue sky, there is also its position area information (position layer), the current color attribute value and the adjusted color attribute target value (attribute layer) and the "blue sky" object identification (object layer). For the balloon to be added, the editing information includes its preset shape, color attribute value (the value corresponding to red), size attribute value (calculated based on "moderate"), as well as the specific position coordinates in the lower left corner of the screen (position layer) and the "balloon" object identification (object layer).

[0057] The system uses this editing information to perform recall operations in the vector database. The original records of relevant elements such as the person's face and blue sky are quickly located through the object layer information to obtain their complete three-layer information. For adding balloons, although the original information of the balloon may not exist in the database, the corresponding synthesis or drawing parameters are prepared according to the description of its object, attributes and position. For example, according to the "red" attribute, the standard red value is obtained from the color library, the initial coordinates are determined according to the "lower left corner" position information, and the size is determined according to the "moderate size". The preparation of these parameters is also based on the understanding and processing of the three-layer information.

[0058] For human faces, the facial area is accurately locked based on the recalled position information, and the brightness adjustment algorithm is operated according to the brightness value in the attribute information to make the face brighter. At the same time, the facial feature recognition at the object layer is followed to ensure that only the human face is processed without affecting other areas.

[0059] For the blue sky, the color properties are adjusted according to its location area, and the color saturation is increased using image processing algorithms to make the color more vivid, and based on the identification of the object layer, it is ensured that only the color of the blue sky part is changed.

[0060] In the lower left corner of the picture, a red balloon is generated and added to the picture using graphic drawing technology based on the balloon's position, attributes, and object information. Considering the accuracy of the position (lower left corner), color attribute (red), size attribute (moderate), and integration with the overall picture (based on the position and attribute analysis of the surrounding environment), ensure that the balloon looks natural and reasonable after being added. For example, the shadow effect of the balloon is adjusted according to the lighting direction of the picture to make it consistent with the light and shadow relationship of the surrounding environment, which involves comprehensive processing of the position layer (position relationship with the surrounding environment), attribute layer (visual effect under the influence of lighting attributes), and object layer (the presentation of the balloon as an independent object in the picture).

[0061] After the editing operation is completed, the system generates multiple candidate results. These candidate results meet the user's editing requirements for the face, blue sky and balloon to varying degrees. For example, there may be different adjustment levels for the brightness of the face, and there are also multiple possible changes in the color vividness of the blue sky. The position and size of the balloon will also have slight differences based on meeting the "lower left corner" and "moderate".

[0062] The system displays these four candidate images to the user, who can choose according to his or her expectations of the overall effect of the person, blue sky and balloon. If the user is not satisfied, he or she can input the editing request again, and the system will repeat the above process, continuously optimizing the editing effect until the user is satisfied and exports the final image. In this process, each edit and result generation is based on the coordinated processing and optimization of the three layers of information: location, attribute and object, in order to achieve the user's most ideal image editing effect, which reflects the effective support and implementation of image editing through the three-layer concept in practical applications.

[0063] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0064] In one embodiment, Figure 2 As shown, a picture editing device based on a large language model is provided, comprising: an element information extraction module 202, a vector database construction module 204, an editing information acquisition module 206 and an editing module 208, wherein:

[0065] The element information extraction module 202 is used to obtain element information of the image to be edited; the element information includes location information, attribute information and object information;

[0066] A vector database building module 204 is used to build association information of location information, attribute information and object information in the element information and save it in a vector database;

[0067] The editing information acquisition module 206 is used to acquire the user's picture editing request and obtain the editing information of the picture editing request through the large language model;

[0068] The editing module 208 is used to recall the position information, attribute information or object information in the vector database through the editing information, determine the element information according to the association information, and use the large language model to convert the element information into editing parameters to edit the picture.

[0069] In one of the embodiments, the location information class includes: pixel coordinates and location coordinates, the attribute information class includes: color, position, size, brightness, color and texture, and the object information class is the object identified in the image.

[0070] In one embodiment, the element information extraction module 202 is also used to use an edge detection algorithm to determine the boundaries of each element of the image to be edited to obtain the location information of the element; use a preset color recognition algorithm to obtain the color value, a brightness calculation algorithm to calculate the brightness, a size measurement algorithm to determine the element size, and a texture analysis algorithm to extract texture features to obtain the attribute information of the element; identify the image to be edited according to a pre-trained image recognition algorithm to obtain the object information of the element.

[0071] In one embodiment, the editing information acquisition module 206 is further used to identify the location information, attribute information and object information contained in the image editing request through a large language model; and generate editing information according to the identified location information, attribute information or object information.

[0072] For the specific limitations of the image editing device based on the large language model, please refer to the limitations of the image editing method based on the large language model above, which will not be repeated here. The various modules in the above-mentioned image editing device based on the large language model can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0073] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a picture editing method based on a large language model is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0074] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0075] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.

[0076] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.

[0077] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0078] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0079] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A picture editing method based on a large language model, characterized in that: The method comprises: Obtaining element information of the image to be edited; the element information includes location information, attribute information and object information; Establishing association information of location information, attribute information and object information in the element information, and saving it in a vector database; Obtaining a user's image editing request, and obtaining editing information of the image editing request through a large language model; The location information, attribute information or object information in the vector database is recalled through the editing information, and the element information is determined according to the associated information, and the large language model is used to convert the element information into editing parameters to edit the picture.

2. The method according to claim 1, characterized in that: The location information class includes: pixel coordinates and location coordinates, the attribute information class includes: color, position, size, brightness, color and texture, and the object information class is the object recognized in the picture.

3. The method according to claim 1, characterized in that Get the element information of the image to be edited, including: Use edge detection algorithm to determine the boundaries of each element of the image to be edited and obtain the position information of the element; The preset color recognition algorithm is used to obtain the color value, the brightness calculation algorithm is used to calculate the brightness, the size measurement algorithm is used to determine the size of the element, and the texture analysis algorithm is used to extract the texture features to obtain the attribute information of the element; The image to be edited is identified according to the pre-trained image recognition algorithm to obtain the object information of the element.

4. The method according to claim 1, characterized in that: The editing information of the image editing request is obtained through the large language model, including: Identify the location information, attribute information, and object information contained in the image editing request by using a large language model; Editing information is generated based on the recognized position information, attribute information, or object information.

5. A picture editing device based on a large language model, characterized in that: The device comprises: An element information extraction module is used to obtain element information of the image to be edited; the element information includes location information, attribute information and object information; A vector database construction module is used to establish the association information of the location information, attribute information and object information in the element information, and save it in the vector database; An editing information acquisition module, used to acquire a user's image editing request and obtain the editing information of the image editing request through a large language model; The editing module is used to recall the position information, attribute information or object information in the vector database through the editing information, determine the element information according to the association information, and use the large language model to convert the element information into editing parameters to edit the picture.

6. The device according to claim 5, characterized in that The location information class includes: pixel coordinates and location coordinates, the attribute information class includes: color, position, size, brightness, color and texture, and the object information class is the object recognized in the picture.

7. The device according to claim 5, characterized in that The feature information extraction module is also used to use an edge detection algorithm to determine the boundaries of each feature of the image to be edited, and obtain the location information of the feature; use a preset color recognition algorithm to obtain the color value, a brightness calculation algorithm to calculate the brightness, a size measurement algorithm to determine the feature size, and a texture analysis algorithm to extract texture features to obtain the attribute information of the feature; identify the image to be edited according to a pre-trained image recognition algorithm to obtain the object information of the feature.

8. The device according to claim 5, characterized in that The editing information acquisition module is also used to identify the location information, attribute information and object information contained in the image editing request through a large language model; and generate editing information based on the identified location information, attribute information or object information.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.