Object storage method and device
By extracting the feature words of the object generated by the artificial intelligence model and automatically generating the object name, the problem of users needing to manually edit the object name for saving is solved, and the object preservation process is simplified and improved efficiency.
Patent Information
- Application Number
- CN202510125584.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-04-25
AI Technical Summary
After using the artificial intelligence model to generate an object, the user needs to manually edit the object name for saving, resulting in a high complexity in the object saving process.
By obtaining the object description information input by the user, using the artificial intelligence model to generate objects, extract feature words from the description information, generating object names based on feature words, and realizing automatic association storage of objects and names.
Reduces the complexity of the object storage process, reduces the steps of users to manually edit object names, and improves the efficiency and convenience of object storage.
Smart Images

Figure CN119884449A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an object preservation method and device. Background Art
[0002] With the continuous development of artificial intelligence technology, the application of generating objects such as pictures or videos with the help of artificial models is becoming more and more widespread.
[0003] After an object is generated with the help of an artificial intelligence model, if the user wants to save the object, then in the process of saving the object, in order to identify the object, the user needs to edit an object name for the object before the object can be saved, which makes the object saving more complicated. Summary of the invention
[0004] In one aspect, the present application provides an object storage method, comprising:
[0005] Obtaining object description information input by a user, where the object description information is used to describe the characteristics of the object to be generated;
[0006] Based on the object description information, generate at least one object using an artificial intelligence model;
[0007] Extracting at least one feature word from the object description information using an artificial intelligence model, wherein the feature word is used to characterize content features of the object;
[0008] detecting a save request for a target object, generating an object name of the target object based on the at least one characteristic word, the target object belonging to the at least one object;
[0009] The target object is stored in association with the object name of the target object.
[0010] In a possible implementation, the method further includes:
[0011] Determine the category of the object to be generated;
[0012] The detecting a save request for the target object and generating an object name of the target object based on the at least one characteristic word includes:
[0013] A save request for a target object is detected, and an object name of the target object is generated based on the at least one feature word and the category.
[0014] In yet another possible implementation, determining the category of the object to be generated includes at least one of the following:
[0015] Obtain the category selected by the user for the object to be generated;
[0016] Based on the object description information, a category of the object to be generated is determined.
[0017] In yet another possible implementation, the generating the object name of the target object based on the at least one feature word and the category includes at least one of the following:
[0018] integrating the at least one characteristic word and the category into an object name of the target object;
[0019] A selection menu including at least one feature word is displayed, a target feature word selected by a user through the selection menu is determined, and the target feature word and the category are integrated into an object name of the target object.
[0020] In yet another possible implementation, the detecting a save request for the target object and generating an object name of the target object based on the at least one characteristic word and the category includes:
[0021] detecting a save request for at least one target object, and determining a sequence identifier corresponding to the target object, wherein the sequence identifier is used to distinguish the target object from other target objects in the at least one target object;
[0022] Based on at least one of the at least one characteristic word and the category, and a sequence identifier corresponding to the target object, an object name of the target object is generated.
[0023] In yet another possible implementation, determining a sequence identifier corresponding to the target object includes:
[0024] Based on the sorting order of the at least one target object, determine a first sorting position corresponding to the target object, and determine the first sorting position of the target object as a sequence identifier corresponding to the target object, wherein the first sorting position is used to represent the sorting order of the target object in the at least one target object;
[0025] or,
[0026] Determine, from objects stored in at least one target storage area, candidate objects whose object names are related to at least one of the at least one feature word and the category; determine, based on a second ranking position contained in the object name of the at least one candidate object and the sorting order of the at least one target object, a third ranking position to be added to the object name of the target object; determine the third ranking position as a sequence identifier corresponding to the target object, the third ranking position being used to characterize the sorting order of the target object among the at least one candidate object and the at least one target object; and the target storage area is used to store objects generated by the artificial intelligence model.
[0027] In yet another possible implementation, extracting at least one feature word from the object description information using an artificial intelligence model includes:
[0028] Extracting at least one feature word for representing a content theme feature or a content style feature represented by the target object from the object description information using an artificial intelligence model;
[0029] The step of generating the object name of the target object based on the at least one characteristic word includes:
[0030] Determining at least one target feature word from the at least one feature word;
[0031] Based on the at least one target feature word, an object name of the target object is generated.
[0032] In yet another possible implementation, the determining at least one target feature word from the at least one feature word includes:
[0033] Displaying a feature selection menu, wherein the feature selection menu displays the at least one feature word;
[0034] At least one target feature word selected by the user from the feature selection menu is determined.
[0035] In yet another possible implementation, storing the target object in association with the object name of the target object includes:
[0036] If an editing operation on the object name of the target object is detected, determining an edited object name corresponding to the target object;
[0037] In response to confirming the save instruction, the edited object name is associated with the target object and stored.
[0038] In another aspect, the present application further provides an object storage device, comprising:
[0039] An information obtaining unit, used to obtain object description information input by a user, wherein the object description information is used to describe the characteristics of the object to be generated;
[0040] An object generation unit, configured to generate at least one object using an artificial intelligence model based on the object description information;
[0041] A feature word extraction unit, used to extract at least one feature word from the object description information using an artificial intelligence model, wherein the feature word is used to characterize content features of the object;
[0042] A name generating unit, configured to detect a save request for a target object and generate an object name of the target object based on the at least one characteristic word, the target object belonging to the at least one object;
[0043] The object storage unit is used to store the target object in association with the object name of the target object.
[0044] In another aspect, the present application further provides an electronic device, the electronic device comprising at least a processor and a memory;
[0045] Wherein, the processor is used to execute the object saving method described in any one of the above embodiments;
[0046] The memory is used to store programs required for the processor to perform operations.
[0047] On the other hand, the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any object saving method provided in the embodiments of the present application.
[0048] On the other hand, the present application also provides a computer-readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any object saving method provided in the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0050] Figure 1 A flowchart of the object storage method provided by this application;
[0051] Figure 2 A schematic diagram of another flow chart of the object storage method provided by the present application;
[0052] Figure 3 A schematic diagram of another flow chart of the object storage method provided by the present application;
[0053] Figure 4 This is a comparative example diagram of storing objects in the target storage area twice in this application;
[0054] Figure 5 A schematic diagram of the process of the object storage method provided by the present application in an application scenario;
[0055] Figure 6 An example diagram of the image generation interface provided by this application;
[0056] Figure 7 A schematic diagram of a composition structure of an object storage device provided by the present application;
[0057] Figure 8 A schematic diagram of the composition architecture of an electronic device provided in this application. DETAILED DESCRIPTION
[0058] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0059] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0060] like Figure 1 , showing a flow chart of the object saving method provided by the present application. The method of this embodiment can be applied to electronic devices, and the electronic devices can be mobile phones, laptop computers or desktop computers, etc. Of course, when it is necessary to generate and store objects with the help of servers or cloud platforms, the electronic device can also be a server; it can also be a device node in a cloud platform or other system, without limitation.
[0061] The method of this embodiment may include:
[0062] S101, obtaining object description information input by a user.
[0063] The object description information is used to describe the characteristics of the object to be generated. Based on this, the object description information may include one or more description information used to describe the category, content, content characteristics, etc. of the object to be generated.
[0064] For example, the object description information may be "generate a picture of a sleeping kitten", or "generate a document describing a landscape", etc.
[0065] In the present application, the format of the object description information may be text, voice, or image information related to the object to be generated, etc., and there is no limitation on this.
[0066] In an optional manner, in order to facilitate the artificial intelligence model to process the object description information, when the object description information is non-text, the present application can also convert the object description information into textual object description information.
[0067] S102: Generate at least one object using an artificial intelligence model based on the object description information.
[0068] In the present application, the artificial intelligence model may be any processing model based on artificial intelligence. For example, the artificial intelligence model may be a large language model, or other deep learning models or machine learning models, etc., without limitation.
[0069] It is understandable that the categories of the generated objects and the contents of the objects may be different based on the different features of the objects desired to be generated expressed by the object description information. In this application, the objects generated by the artificial intelligence model can be images, documents, or PPTs, etc., without limitation.
[0070] There is no restriction on the specific implementation process of generating objects described by the object description information with the help of a large language model.
[0071] S103: extract at least one feature word from the object description information using an artificial intelligence model.
[0072] The feature word is used to represent the content feature of the object, which may reflect part or all of the content theme feature, content style feature, content category and other information of the content in the object, without any specific limitation.
[0073] In an optional manner, an artificial intelligence model may be used to extract at least one feature word from the object description information for representing the content theme feature or the content style feature represented by the object.
[0074] Among them, the content theme feature represents the theme category or theme content expressed by the content in the object. For example, if the object is a document, the theme expressed by the object can be a work report, paper, experimental data or journal, etc. For example, if the object is an image, the theme expressed by the object can be the person, object, animal, item, landscape or building presented in the image.
[0075] Content style features refer to the style characteristics of the content in an object. For example, if the object is a document and the subject of the document is a journal, the content style features in the object can be the fields or characteristics of the journal. For another example, if the object is an image, the content style features in the object can be the appearance, posture, picture style, and background style of people, animals, objects, and buildings in the image.
[0076] For example, taking the object to be generated as an image, if the object description information is "generate a picture of a yellow puppy walking in the rain", then the feature words "puppy" or "yellow puppy" that represent the theme of the image can be extracted, and the feature words "walking in the rain" and "yellow" that represent the content style can also be extracted, as well as the feature words "yellow puppy" and "yellow puppy walking in the rain" that represent the theme and style.
[0077] In the present application, there are many specific implementations of extracting feature words from object description information using an artificial intelligence model, and there is no limitation on this. For example, the object description information can be processed by an artificial intelligence model for word segmentation and semantic analysis to determine the feature words that can characterize the characteristics of the object, and there is no limitation on the specific implementation.
[0078] S104: Detect a request for saving the target object, and generate an object name of the target object based on at least one characteristic word.
[0079] The target object belongs to at least one object. For the sake of easy distinction, the object requested to be saved is referred to as the target object.
[0080] There are many possibilities for the specific implementation of generating the object name of the target object, which are not specifically limited.
[0081] For example, in a possible implementation, at least one characteristic word may be integrated into the object name of the target object.
[0082] Among them, integrating at least one feature word into the object name of the target object includes: splicing at least one feature word into the object name; removing duplicates and sorting at least one feature word, and then splicing it into the object name; or, combining natural language grammar, generating a character string that conforms to the rules of natural language based on at least one feature word, and determining the character string as the object name of the target object.
[0083] For example, if the feature words include "yellow" and "puppy", then the object name "yellow puppy" can be generated. For another example, if the feature words include "puppy" and "stroll", then the object name of the generated target object can be "strolling puppy". For another example, if the feature words include "cat", "yellow kitten" and "sleeping", then some repeated feature words can be removed, and the combination order of each feature word can be reasonably determined, and finally the object name "sleeping yellow kitten" can be generated.
[0084] In yet another possible implementation, the present application may determine at least one target feature word from at least one feature word, and then generate an object name of the target object based on the at least one target feature word.
[0085] Determining at least one target feature word from at least one feature word may be randomly selecting a set number (the set number may be 1, 2 or other values) of target feature words from at least one feature word.
[0086] Determining at least one target feature word may also include: displaying a feature selection menu, the feature selection menu displaying the at least one feature word. On this basis, at least one target feature word selected by the user from the feature selection menu may be determined.
[0087] The specific implementation of generating the object name of the target object based on the at least one target characteristic word may be to integrate the at least one target characteristic word into the object name of the target object, which is similar to the specific implementation of integrating at least one characteristic word into the object name of the target object, and will not be repeated here. Of course, other implementations of generating the object name based on the at least one target characteristic word may also be used, which will not be repeated here.
[0088] It should be noted that the order of the above steps S103 and S104 is not limited to Figure 1 As shown, in actual application, after the save request is detected, at least one feature word may be determined based on the object description information.
[0089] S105: Store the target object in association with the object name of the target object.
[0090] It can be understood that the object name of the target object is the name used to store the target object, so as to achieve the associated storage of the target object and its object name.
[0091] From the above content, it can be seen that in the present application, after at least one object is generated based on the object description information input by the user, if a save request for a target object in the at least one object is detected, the object name of the target object can be generated based on at least one feature word extracted from the object description information, thereby eliminating the need for the user to manually edit the object name for the target object, and the target object with the object name can also be stored, reducing the complexity of storing the object after the object is generated.
[0092] It is understandable that users may generate objects multiple times with the help of artificial intelligence models in different time periods. If the content features of objects generated by artificial intelligence models at different times are relatively similar, then naming the objects based solely on the feature words used to represent the content features of the objects may make it impossible for users to effectively distinguish different objects with the help of object names. In order to make the object names of objects more accurately reflect the characteristics of the objects and reduce the possibility of confusion between the object names of different objects, the present application also provides another implementation process of the object saving method.
[0093] like Figure 2 , shows another flow chart of the object saving method provided in an embodiment of the present application. The method of this embodiment may include:
[0094] S201, obtaining object description information input by a user.
[0095] The object description information is used to describe the characteristics of the object to be generated.
[0096] S202: Generate at least one object using an artificial intelligence model based on the object description information.
[0097] S203: extract at least one feature word from the object description information using an artificial intelligence model.
[0098] The feature word is used to characterize the content feature of the object.
[0099] The above steps can be referred to the related introduction of the previous embodiment, which will not be repeated here.
[0100] S204: Determine the category of the object to be generated.
[0101] In the present application, the category of the object may be at least one of an attribute category of the object and a content category of the object.
[0102] The attribute category of an object does not change due to the different contents contained or displayed in the object. When the attribute category of an object is different, the application used to display the object will also be different. For example, the attribute category of an object can be: document, image, video, PPT, audio or code.
[0103] The content category of an object refers to the category to which the content in the object belongs. The content of objects of the same attribute category can be different. Therefore, the content categories of different objects of the same attribute category can be different. For example, taking the object as an image, the content category of the object can be divided into scenery, people, animation, cartoons, and animals. For another example, taking the object as a document, the content category of the document can be: novels (which can also be subdivided into science fiction novels, martial arts novels, and romance novels), biographies, work records, papers (which can also be subdivided into papers of different research directions), and essays.
[0104] In the present application, there are multiple implementation possibilities for determining the category of the object to be generated. In one possible implementation, the category selected by the user for the object to be generated can be obtained. It is understandable that in order to accurately generate the object required by the user, before generating the object, the user can select the category of the object to be generated, based on which, the present application can obtain the category selected by the user for the object to be generated.
[0105] For example, a category selection menu may be provided in the object generation interface of the target application for generating objects. After the user clicks on the category selection menu, a plurality of objects for selection may be displayed, based on which the user may select the category of the object to be generated.
[0106] In particular, if the user is required to select the attribute category and content category of the object, the category selection menu in the object generation interface can be a secondary menu. On this basis, the user can first select the attribute category of the object to be generated. Based on the attribute category selected by the user, a menu of various content categories contained in the attribute category can be presented, and the content category selected by the user can be determined, thereby obtaining the attribute category and content category of the object to be generated.
[0107] In another possible implementation, the category of the object to be generated may be determined based on the object description information. Since the object description information is used to describe the features of the object to be generated, the object description information may reflect the category of the object to be generated.
[0108] For example, if the object description information is "generate an article describing summer", then it can be determined that the object to be generated is a document containing articles related to summer. For another example, if the object description information is "generate a cartoon containing beautiful women", it can be known that the object to be generated is an image and the content category of the image is cartoon.
[0109] S205: Detect a save request for the target object, and generate an object name of the target object based on the at least one feature word and the category.
[0110] It can be understood that since the category of the target object is consistent with the category of the object to be generated, the object name generated based on the at least one feature word and the category can reflect the content characteristics of the target object and the category of the target object, thereby making it easier to distinguish the object name of the target object from other saved objects, thereby reducing the situation where users are unable to effectively distinguish different objects due to similar object names.
[0111] There are many possible specific implementations for generating the object name based on at least one feature word and the category, and there is no limitation to this.
[0112] In a possible implementation, the present application may integrate at least one characteristic word and the category into an object name of the target object.
[0113] For example, integrating the at least one feature word and the category may be combining the at least one feature word and the category.
[0114] For another example, at least one feature word and a category are combined into an object name according to a set splicing priority order. For example, if the category is the first priority and the feature word is the second priority, the category can be used as the first field in the target object, and at least one feature word can be used as the field after the first field, and the category and the at least one feature word are spliced and combined. For example, if the feature word is "Star Wars" and the category is "Anime", the generated object name can be: Anime-Star Wars.
[0115] Optionally, considering that there may be semantically repeated words or repeated words between at least one feature word and the category, and directly combining at least one feature word with the category may also result in a phrase that does not conform to the natural language grammar, based on this, the present application can also combine the natural language grammar to arrange and combine the at least one feature word and category to obtain an object name that conforms to the natural language grammar.
[0116] In another possible implementation, if there are too many feature words, not only will the object name be too long, but the user will also be unable to intuitively distinguish the target object from other stored objects based on the object name. Based on this, the present application may also display a selection menu including at least one feature word, and determine the target feature word selected by the user through the selection menu. Accordingly, the target feature word and the category may be integrated into the object name of the target object.
[0117] Among them, the specific implementation of integrating the target feature words and categories into the object name can be similar to the specific implementation of integrating the feature words and categories into the object name mentioned above, such as taking the category as the first field of the object name, taking the target feature words as the second field, concatenating the category and the target feature words, and obtaining the object name of the target object. The details will not be repeated here.
[0118] S206: Store the target object in association with the object name of the target object.
[0119] It is understandable that when there are multiple objects generated using an artificial intelligence model, the user may only select one target object to save each time, or may request to save multiple target objects in batches. If the user requests to save multiple target objects, since these multiple target objects are generated based on the same object description information, at least one feature word and category corresponding to each target object are the same. On this basis, in order to distinguish the multiple target objects, it is necessary to add an identifier to distinguish the target objects in the object name. The following is an explanation of a situation.
[0120] like Figure 3 , shows another flow chart of the object saving method provided in an embodiment of the present application. The method of this embodiment may include:
[0121] S301, obtaining object description information input by a user.
[0122] The object description information is used to describe the characteristics of the object to be generated.
[0123] S302: Generate at least one object using an artificial intelligence model based on the object description information.
[0124] S303: extract at least one feature word from the object description information using an artificial intelligence model.
[0125] The feature word is used to characterize the content feature of the object.
[0126] S304: Determine the category of the object to be generated.
[0127] The above steps can be referred to the related introduction of the previous embodiment, which will not be repeated here.
[0128] S305: Detect a save request for at least one target object and determine a sequence identifier corresponding to the target object.
[0129] The sequence identifier is used to distinguish the target object from other target objects in the at least one target object.
[0130] There are many specific implementations of the sequence identifier, as long as it can distinguish the target object from other target objects. For example, the sequence identifier can be one or more combinations of numbers, letters, and identification characters used to indicate the order relationship between the target object and other target objects in at least one target object.
[0131] For example, assuming that there are three target objects to be stored, the sequence identifiers of the three target objects may be a, b, and c, or one, two, and three, or s1, s2, and s3, etc.
[0132] S306: Generate an object name of the target object based on at least one feature word and at least one of the categories and a sequence identifier corresponding to the target object.
[0133] For example, the object name of the target object can be generated based on at least one feature word and the sequential identifier corresponding to the target object. In this case, at least one feature word and the sequential identifier of the target object can also be integrated into the object name of the target object. Alternatively, the target feature word can be first determined from at least one feature word, and then the target feature word and the sequential identifier corresponding to the target object can be integrated into the object name of the target object. The implementation of determining the target feature word can refer to the relevant introduction above and will not be repeated here.
[0134] For another example, the sequence identifiers corresponding to the category and the target object are integrated into the object name of the target object.
[0135] For another example, at least one feature word and a category and a sequential identifier corresponding to the target object are integrated into the object name of the target object. In this possible case, a target feature word can be first determined from the at least one feature word, and then the target feature word, the category and the sequential identifier of the target object are integrated into the object name of the target object.
[0136] Among them, in the above methods, in the process of integrating the object names of the target objects, repeated words can also be removed and the object names can be integrated in combination with natural language grammar. For details, please refer to the previous related introduction and will not be repeated here.
[0137] S307: For each target object, store the target object in association with the object name of the target object.
[0138] In this embodiment, there are many possible implementations for determining the sequence identifier of the target object. Two possible implementations are described below:
[0139] In a possible implementation, based on the sorting order of the at least one target object, a first sorting position corresponding to the target object can be determined, and the first sorting position of the target object can be determined as a sequence identifier corresponding to the target object, wherein the first sorting position is used to characterize the sorting order of the target object in the at least one target object.
[0140] The sorting order of the at least one target object may be the sorting order of the at least one object displayed by the target application used to generate the object. Of course, the sorting order of the at least one target object may also be randomly assigned, and there is no limitation to this.
[0141] For example: suppose that 5 objects are generated, and these 5 objects have a sequence, and the user chooses to save the first object, the third object, and the fifth object as the target objects to be saved.
[0142] It can be seen that the first object is ranked first in the sorting order of the three objects that need to be saved, so the sorting position of the first object is 1. The third object is ranked second in the sorting order of the three objects that need to be saved, so the sorting position of the third object is 2. Similarly, the fifth object is ranked third in the sorting order of the three objects that need to be saved, so its corresponding sorting position is 3.
[0143] It is understandable that in the above implementation method of determining the sequential identification, the ranking position of the target object is only related to the target objects that need to be saved in this batch. However, in actual applications, users are likely to use artificial intelligence models to generate objects of the same category and the same or similar content multiple times. On this basis, if the category and at least one feature word corresponding to the historical object stored in the electronic device are the same as the category and at least one feature word corresponding to the currently determined target object, and the ranking position of the historical object is also the same as the ranking position of the target object, there will be a situation where different objects have the same object name.
[0144] For example, on Monday, the user inputs object description information "generate a yellow cartoon kitten" to the electronic device. Assume that the electronic device generates four cartoon pictures: Picture A, Picture B, Picture C, and Picture D. Assume that the feature words determined by the electronic device based on the object description information include "kitten", and the category of the determined object is "cartoon", then when the user chooses to save Picture A and Picture C, a picture name "Cartoon-Kitten 1" can be generated for Picture A, and "Cartoon-Kitten 2" can be generated for Picture C. Accordingly, the electronic device will save Picture A named "Cartoon-Kitten 1" and Picture C named "Cartoon-Kitten 2".
[0145] On Tuesday, the user inputs the object description information "generate a picture of a kitten" to the electronic device (of course, the user may also output the same object description information "generate a cute yellow kitten", and the processing process is similar), and the user sets the category of the picture to be cartoon, then the electronic device may still determine the feature word "kitten" based on the object description information input this time, and determine that the category of the picture to be generated is cartoon, then assume that the electronic device generates 3 cartoon pictures: Picture E, Picture F and Picture H. On this basis, if the user chooses to save Picture E and Picture F, and only based on the sorting order of Picture E and Picture F, it is determined that the sorting position of Picture E is 1, and the sorting position of Picture F is 2, then the picture name generated for Picture E is "Cartoon-Kitten 1", and this name is the same as the previously saved picture named "Cartoon-Kitten 1", so different pictures will have the same name, and then the user may need to manually adjust the picture name, or the user may need to choose to keep the latest picture or the historical picture, etc., resulting in high complexity in picture saving.
[0146] Based on this, in order to reduce the duplication of the object name of the target object and the object name of the saved object, in another possible implementation, the present application can first determine the candidate objects whose object names are related to at least one of the at least one feature word and category from the objects stored in at least one target storage area. The target storage area is used to store objects generated by the artificial intelligence model. For example, the target storage area is a pre-set or user-configured storage area for storing the artificial intelligence model object, without specific restrictions.
[0147] On this basis, the present application can determine the third ranking position to be added to the object name of the target object based on the second ranking position contained in the object name of at least one candidate object and the ranking order of at least one target object. Accordingly, the third ranking position can be determined as the sequence identifier corresponding to the target object.
[0148] In the present application, for the sake of distinction, in this possible implementation, the ranking position in the object name of the candidate object is referred to as the second ranking position, and the ranking position determined for the target object is referred to as the third ranking position.
[0149] The third ranking position is used to characterize the ranking order of the target object in the at least one candidate object and the at least one target object. Based on this, it can be seen that the third ranking positions of different target objects are different, and the third ranking position of the target object is also different from the second ranking position of the candidate object. Therefore, even if the characteristic words and categories corresponding to the objects stored at different times are the same, the different ranking positions of different objects can reduce the duplication of the object names of the objects saved at different times.
[0150] For example:
[0151] For ease of understanding and description, the object name is determined based on the feature word and category as an example, that is, it is necessary to query the target storage area whether there is at least one candidate object with an object name related to the feature word and category corresponding to the target object currently to be saved.
[0152] Combination Figure 4 , and still using the above example:
[0153] On Monday, the electronic device generated four cartoon pictures with the help of an artificial intelligence model: Picture A, Picture B, Picture C, and Picture D. After the user chooses to save Picture A and Picture C, the electronic device will save Picture A named "Cartoon-Kitten 1" and Picture C named "Cartoon-Kitten 2". Figure 4 As shown, the left side of the dotted line shows an example diagram of two pictures stored by the electronic device in the target storage area on Monday.
[0154] On this basis, on Tuesday, the user inputs the object description information "generate a picture of a kitten" to the electronic device, and the user sets the category of the picture to cartoon. Then the electronic device determines the characteristic word "kitten" and the category of the picture to be cartoon. Then, when the electronic device generates pictures E, F, and H, and the user chooses to save pictures E and F, the electronic device will first detect whether the target storage area has stored candidate objects whose names include "kitten" and "cartoon".
[0155] Based on this, Figure 4 It can be seen from the left side of the dotted line that both picture A and picture B are candidate objects. On this basis, this application will combine the ranking positions "1" and "2" in the names of pictures A and C, as well as the ranking order of pictures E and F, to determine the ranking positions of pictures E and F. For example, the ranking position of picture E is determined to be "3", while the ranking position of picture F is "4". In this way, subsequently combining the feature words and categories corresponding to picture E and the ranking position "3", a picture name "Cartoon - Kitten 3" can be generated for picture E, and a picture name "Cartoon - Kitten 4" can be generated for picture F. In this way, after saving pictures E and F, you can refer to Figure 4 As shown on the right side of the dotted line, it can be seen that the name of the picture saved this time does not overlap with the name of the picture that has been saved, which naturally avoids the user from manually adjusting the picture name and other operations.
[0156] It can be understood that the above description is based on an example of a case where the object generated and saved this time and the object generated and saved in the past have duplicate feature words and categories.
[0157] In actual applications, after the electronic device generates multiple objects with the help of an artificial intelligence model, the user may also save the objects in batches, and each batch can save one or more objects. In this case, the categories and feature words of the target objects to be saved in different batches are the same. Accordingly, in order to reduce the duplication of object names of target objects saved in different batches, it is also necessary to combine the categories and feature words of the target objects to be saved currently, detect candidate objects related to at least one of the categories and feature words of the target objects to be saved in this batch in the target storage area, and combine the second ranking position in the object name of each candidate object, and the ranking order of each target object to be saved, respectively determine the third ranking position of each target object. The specific implementation is the same as above and will not be repeated.
[0158] In addition, before receiving the save request for the at least one target object, if there are multiple candidate objects whose object names are related to at least one of the categories and feature words corresponding to the target object, but some or all of the candidate objects have been deleted, after receiving the save request for the at least one target object to be saved, there is no need to worry about the ranking positions in the object names of the deleted candidate objects, and only the ranking positions of the multiple candidate objects whose object names are related to at least one of the categories and feature words corresponding to the target object currently stored in the target storage area need to be considered.
[0159] For example:
[0160] Let's take the scenario of generating pictures as an example: suppose the user inputs the description information of the picture to be generated as "generate a cartoon kitten", it can be determined that the category of the object to be generated is "cartoon", and the feature word extracted from the description information is "kitten". Suppose the electronic device uses a large language model to generate five pictures, respectively: Picture a, Picture b, Picture c, Picture d and Picture e.
[0161] Assume that the user first chooses to save picture a and picture b, and assume that the picture name generated for picture a is "Cartoon-Kitten-1", and the picture name generated for picture b is "Cartoon-Kitten-2". After saving picture a and picture b, the user deletes the saved picture b.
[0162] On this basis, assuming that the user initiates a request to save the picture again, and this time the request is to save picture c and picture d, then it is detected that picture a whose name includes "cartoon" and "kitten" is currently stored in the target storage area, and the sorting bit in the name of picture a "cartoon-kitten-1" is "1". On this basis, there is no need to worry about the object name "cartoon-kitten-2" that has been generated before. Therefore, the picture name "cartoon-kitten-2" can be generated for picture c and the picture c exists. Correspondingly, the picture name "cartoon-kitten-3" is generated for picture d and the picture d is saved.
[0163] In order to facilitate understanding of the solution of the embodiment of the present application, the following is an explanation in conjunction with an application scenario. Taking the scenario of generating an image as an example, it is assumed that the electronic device has a target application for generating an image, and the target application can generate an image using an artificial intelligence model. On this basis, combined with Figure 5 The object saving method is described below with reference to the flowchart shown in FIG.
[0164] exist Figure 5 The flowchart of the object saving method shown may include the following steps:
[0165] S501, obtaining image description information input by a user.
[0166] The image description information is used to describe the features of the image to be generated.
[0167] S502: Determine the image category of the image to be generated.
[0168] The image category of an image is the category to which the content presented by the image belongs. For example, the image category of an image can be divided into categories such as animation, cartoon, landscape, and portrait.
[0169] For example, if the user selects a content category in the image generation interface of the target application, the content category selected by the user for the image to be generated is determined. If the user does not select a content category, the content category of the image to be generated can be determined based on the image description information.
[0170] Of course, if the user does not select a content category and the image description information does not include content category information, the image content category can be determined to be the set "default category", such as the "default category" can be an ordinary image that does not belong to the types of animation, cartoon, landscape, and photo.
[0171] S503: Generate at least one image using an artificial intelligence model based on the image description information.
[0172] It is understandable that if the user selects the category of the image to be generated, the image generated by the artificial intelligence model in this application is an image of that category. For example, if the image category set by the user is cartoon, a cartoon-type image is generated.
[0173] like Figure 6 An example diagram of an image generation interface of a target application is shown.
[0174] Depend on Figure 6It can be seen that the image generation interface includes a description information input area 601 and a generated image display area 602. It can be seen that after inputting the image description information in the description information input area, if the user clicks the "Generate" option, the target application can be triggered to call the artificial intelligence model to generate at least one image, and the generated image is displayed in the image display area 602.
[0175] S504: extract at least one feature word from the image description information using an artificial intelligence model.
[0176] The feature word is used to represent the content feature of the image generated by the image description information.
[0177] S505: Detect a request for saving at least one target image, and determine a sorting position corresponding to each target image based on the sorting order of the at least one target image.
[0178] The sorting bit is used to identify the sorting order of the target image in at least one target image.
[0179] Of course, this step may also consider the ranking position in the image name of each image stored in each target storage area for storing images generated by the target application to comprehensively determine the ranking position of the target image. Please refer to the previous introduction for details and will not be repeated here.
[0180] S506: For each target image, generate an image name of the target image based on at least one feature word, the image category and the ranking position corresponding to the target image.
[0181] S507: Store the target image in association with its image name.
[0182] It is understandable that in any of the above embodiments, after generating the object name of the target object, if the present application detects an editing operation on the object name of the target object, the edited object name corresponding to the target object is determined. Accordingly, in response to the confirmation save instruction, the edited object name is associated and stored with the target object.
[0183] For example, after the object name of the target object is generated, a save prompt box may be displayed, in which the object name generated for the target object is displayed, and a confirmation option for confirming the save is displayed. On this basis, if the user does not need to modify the object name of the target object, the user may directly click the confirmation option, and the electronic device will associate the target object with the object name generated for the target object and store it. If the user edits the object name of the target object and then clicks the confirmation option, the target object will be associated with the edited object name and stored.
[0184] On the other hand, corresponding to an object storage method of the present application, the present application also provides an object storage device. Figure 7 , shows a schematic diagram of a composition structure of an object storage device provided by the present application. The device of this embodiment may include:
[0185] An information obtaining unit 701 is used to obtain object description information input by a user, where the object description information is used to describe the characteristics of the object to be generated;
[0186] An object generation unit 702, configured to generate at least one object using an artificial intelligence model based on the object description information;
[0187] A feature word extraction unit 703 is used to extract at least one feature word from the object description information using an artificial intelligence model, wherein the feature word is used to characterize content features of the object;
[0188] A name generating unit 704 is configured to detect a save request for a target object and generate an object name of the target object based on the at least one characteristic word, the target object belonging to the at least one object;
[0189] The object storage unit 705 is used to store the target object in association with the object name of the target object.
[0190] In a possible implementation, the object storage device further includes:
[0191] A category determination unit, used to determine the category of the object to be generated;
[0192] The name generation unit includes:
[0193] The name generating subunit is used to detect a save request for a target object and generate an object name of the target object based on the at least one characteristic word and the category.
[0194] In yet another possible implementation, the category determination unit includes at least one of the following:
[0195] A first category determination subunit is used to obtain a category selected by a user for the object to be generated;
[0196] The second category determination subunit is used to determine the category of the object to be generated based on the object description information.
[0197] In yet another possible implementation, the name generation subunit includes at least one of the following:
[0198] A first integration subunit, configured to integrate the at least one characteristic word and the category into an object name of the target object;
[0199] The second integration subunit is used to display a selection menu including at least one feature word, determine a target feature word selected by a user through the selection menu, and integrate the target feature word with the category into an object name of the target object.
[0200] In yet another possible implementation, the name generation subunit includes:
[0201] a sequence determination subunit, configured to detect a save request for at least one target object and determine a sequence identifier corresponding to the target object, wherein the sequence identifier is used to distinguish the target object from other target objects in the at least one target object;
[0202] The name determination subunit is used to generate an object name of the target object based on at least one of the at least one characteristic word and the category, and a sequence identifier corresponding to the target object.
[0203] In yet another possible implementation, the sequence determination subunit includes:
[0204] A first order determination subunit is configured to detect a save request for at least one target object, determine a first order bit corresponding to the target object based on the order of sorting of the at least one target object, and determine the first order bit of the target object as an order identifier corresponding to the target object, wherein the first order bit is used to represent the order of sorting of the target object in the at least one target object;
[0205] or,
[0206] The second order determination subunit is used to detect a save request for at least one target object, determine a candidate object whose object name is related to at least one of the at least one feature word and category from the objects stored in the at least one target storage area, determine a third ranking position to be added to the object name of the target object based on the second ranking position contained in the object name of the at least one candidate object and the sorting order of the at least one target object, determine the third ranking position as the sequence identifier corresponding to the target object, the third ranking position is used to characterize the sorting order of the target object among the at least one candidate object and the at least one target object, and the target storage area is used to store objects generated by the artificial intelligence model.
[0207] In another possible implementation, the feature word extraction unit includes:
[0208] A feature word extraction subunit, used to extract at least one feature word for representing a content theme feature or a content style feature represented by the target object from the object description information using an artificial intelligence model;
[0209] The name generation unit includes:
[0210] a target determination subunit, configured to determine at least one target feature word from the at least one feature word;
[0211] The object name generating subunit is used to generate an object name of the target object based on the at least one target feature word.
[0212] In yet another possible implementation, the target determination subunit includes:
[0213] A menu display subunit, used to display a feature selection menu, wherein the feature selection menu displays the at least one feature word;
[0214] The feature selection subunit is used to determine at least one target feature word selected by the user from the feature selection menu.
[0215] In yet another possible implementation, the object storage unit includes:
[0216] an edit determination subunit, configured to determine an edited object name corresponding to the target object if an edit operation on the object name of the target object is detected;
[0217] The object storage subunit is used to store the edited object name in association with the target object in response to the confirmation saving instruction.
[0218] The present application also provides an electronic device. Figure 8 , which shows a schematic diagram of a composition structure of the electronic device, and the electronic device at least includes a processor 801 and a memory 802;
[0219] The processor 801 is configured to execute the object saving method described in any one of the above embodiments;
[0220] The memory 802 is used to store programs required by the processor to perform operations.
[0221] It is understandable that the electronic device may further include a display unit 803 and an input unit 804 .
[0222] Of course, the electronic device may also have Figure 8 There may be more or fewer components, without limitation.
[0223] A computer program product is also provided in an embodiment of the present application, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any object saving method provided in the embodiment of the present application.
[0224] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any object saving method provided in an embodiment of the present application.
[0225] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0226] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0227] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0228] 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 described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may 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 may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A method for storing an object, comprising: Obtaining object description information input by a user, where the object description information is used to describe the characteristics of the object to be generated; Based on the object description information, generate at least one object using an artificial intelligence model; Extracting at least one feature word from the object description information using an artificial intelligence model, wherein the feature word is used to characterize content features of the object; detecting a save request for a target object, generating an object name of the target object based on the at least one characteristic word, the target object belonging to the at least one object; The target object is stored in association with the object name of the target object.
2. The object storage method according to claim 1, further comprising: Determine the category of the object to be generated; The detecting a save request for the target object and generating an object name of the target object based on the at least one characteristic word includes: A save request for a target object is detected, and an object name of the target object is generated based on the at least one feature word and the category.
3. The object storage method according to claim 2, wherein the determining the category of the object to be generated comprises at least one of the following: Obtain the category selected by the user for the object to be generated; Based on the object description information, a category of the object to be generated is determined.
4. The object storage method according to claim 2, wherein the generating the object name of the target object based on the at least one characteristic word and the category comprises at least one of the following: integrating the at least one characteristic word and the category into an object name of the target object; A selection menu including at least one feature word is displayed, a target feature word selected by a user through the selection menu is determined, and the target feature word and the category are integrated into an object name of the target object.
5. The object saving method according to claim 2, wherein the detecting a saving request for a target object and generating an object name of the target object based on the at least one characteristic word and the category comprises: detecting a save request for at least one target object, and determining a sequence identifier corresponding to the target object, wherein the sequence identifier is used to distinguish the target object from other target objects in the at least one target object; Based on at least one of the at least one characteristic word and the category, and a sequence identifier corresponding to the target object, an object name of the target object is generated.
6. The object storage method according to claim 5, wherein the step of determining the sequence identifier corresponding to the target object comprises: Based on the sorting order of the at least one target object, determine a first sorting position corresponding to the target object, and determine the first sorting position of the target object as a sequence identifier corresponding to the target object, wherein the first sorting position is used to represent the sorting order of the target object in the at least one target object; or, Determine, from objects stored in at least one target storage area, candidate objects whose object names are related to at least one of the at least one feature word and the category; determine, based on a second ranking position contained in the object name of the at least one candidate object and the sorting order of the at least one target object, a third ranking position to be added to the object name of the target object; determine the third ranking position as a sequence identifier corresponding to the target object, the third ranking position being used to characterize the sorting order of the target object among the at least one candidate object and the at least one target object; and the target storage area is used to store objects generated by the artificial intelligence model.
7. The object preservation method according to claim 1, wherein the step of extracting at least one feature word from the object description information using an artificial intelligence model comprises: Extracting at least one feature word for representing a content theme feature or a content style feature represented by the target object from the object description information using an artificial intelligence model; The step of generating the object name of the target object based on the at least one characteristic word includes: Determining at least one target feature word from the at least one feature word; Based on the at least one target feature word, an object name of the target object is generated.
8. The object storage method according to claim 7, wherein determining at least one target feature word from the at least one feature word comprises: Displaying a feature selection menu, wherein the feature selection menu displays the at least one feature word; At least one target feature word selected by the user from the feature selection menu is determined.
9. The object storage method according to claim 1, wherein the storing the target object in association with the object name of the target object comprises: If an editing operation on the object name of the target object is detected, determining an edited object name corresponding to the target object; In response to confirming the save instruction, the edited object name is associated with the target object and stored.
10. An object storage device, comprising: An information obtaining unit, used to obtain object description information input by a user, wherein the object description information is used to describe the characteristics of the object to be generated; An object generation unit, configured to generate at least one object using an artificial intelligence model based on the object description information; A feature word extraction unit, used to extract at least one feature word from the object description information using an artificial intelligence model, wherein the feature word is used to characterize content features of the object; A name generating unit, configured to detect a save request for a target object and generate an object name of the target object based on the at least one characteristic word, the target object belonging to the at least one object; The object storage unit is used to store the target object in association with the object name of the target object.