Method, device, electronic device and storage medium for generating graphic logo
Through semantic understanding of object description text and graphic material retrieval, graphic logos are automatically generated, which solves the problem of low efficiency in generating graphic logos in the existing technology and achieves efficient, relevant and diverse graphic logo generation.
Patent Information
- Application Number
- CN202110852701.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-27
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-07-27
AI Technical Summary
The efficiency of generating graphic marks in the prior art is low, relies on professional designers, is time-consuming and labor-intensive, and the efficiency of generating graphic marks is not high.
By obtaining the object description text, semantic understanding is performed, the semantic understanding results are obtained, graphic material retrieval is performed, and graphic logos are generated by combining text materials. The semantic understanding results are used to retrieve and combine graphic materials, and graphic logos are automatically generated.
It greatly shortens the time to generate graphic marks, improves the efficiency of generating graphic marks, ensures the relevance and diversity of generated graphic marks and objects, and meets the user's marking needs.
Smart Images

Figure CN113836933B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and more specifically, to a method, device, electronic device and storage medium for generating a graphic logo. Background Art
[0002] A graphic logo is a visual design that identifies an object, such as a brand's LOGO (Logo type, icon). In related technologies, graphic logos are designed and drawn by professional designers. This method of designing and drawing graphic logos by professional designers is time-consuming and labor-intensive, and the efficiency of generating graphic logos is low. Summary of the invention
[0003] In view of the above problems, the embodiments of the present application propose a method, device, electronic device and storage medium for generating a graphic logo to solve the problem of low efficiency in generating graphic logos in the related art.
[0004] According to one aspect of an embodiment of the present application, a method for generating a graphic logo is provided, the method comprising: obtaining an object description text; performing semantic understanding on the object description text to obtain a semantic understanding result; performing graphic material retrieval based on the semantic understanding result to obtain candidate graphic materials; generating a graphic logo based on text materials and the candidate graphic materials, the text materials being determined based on the object description text.
[0005] According to one aspect of an embodiment of the present application, a device for generating a graphic logo is provided, including: an acquisition module for acquiring an object description text; a semantic understanding module for performing semantic understanding on the object description text to obtain a semantic understanding result; a retrieval module for performing graphic material retrieval based on the semantic understanding result to obtain candidate graphic materials; and a generation module for generating a graphic logo based on text materials and the candidate graphic materials, wherein the text materials are determined based on the object description text.
[0006] In some embodiments of the present application, based on the aforementioned scheme, the semantic understanding result includes object classification words; a semantic understanding module includes: a word statistical information acquisition unit, used to acquire word frequency statistical information of each object text set, the word frequency statistical information indicates the word frequency of each word in the object text set in the object text set; wherein one object text set corresponds to one object classification; a frequency determination unit, used to determine the word frequency of the words in the object description text in each object text set according to the word frequency statistical information of each object text set; a probability calculation unit, used to calculate the probability that the object description text belongs to the object classification corresponding to each object text set according to the word frequency of the words in the object description text in each object text set; a target object classification determination unit, used to determine the target object classification to which the object described by the object description text belongs according to the probability that the object description text belongs to the object classification corresponding to each object text set; an object classification word determination unit, used to determine the object name of the target object classification as the object classification word.
[0007] In other embodiments of the present application, based on the aforementioned scheme, the semantic understanding result includes an extended word; the semantic understanding module includes: a combination unit, used to combine at least two characters in the object text to obtain a combined word; an extended word determination unit, used to determine the combined word as the extended word if the combined word is included in a preset vocabulary.
[0008] In some embodiments of the present application, based on the aforementioned scheme, the semantic understanding results include object classification words and extension words, and the candidate graphic materials are derived from at least one of a first candidate graphic material set, a second candidate graphic material set, and a third candidate graphic material set; wherein, the first candidate graphic material set is determined by matching the object classification words with the material classification to which each graphic material in the graphic material library belongs; the second candidate graphic material set is determined by matching the extension words with the material name of each graphic material in the graphic material library; and the third candidate graphic material set is determined by matching the extension words with the material label of each graphic material in the graphic material library.
[0009] In some embodiments of the present application, based on the aforementioned scheme, the candidate graphic material is at least derived from the first candidate graphic material set; the retrieval module includes: a target material classification determination unit, used to determine the target material classification corresponding to the object classification word according to the correspondence between the object classification and the material classification; a first candidate graphic material set determination unit, used to determine the graphic material belonging to the target material classification in the graphic material library as the graphic material in the first candidate graphic material set; a first adding unit, used to select graphic material from the first candidate graphic material set to obtain the candidate graphic material.
[0010] In some other embodiments of the present application, based on the aforementioned scheme, the candidate graphic material is at least derived from the second candidate graphic material set; the retrieval module includes: a first similarity calculation unit, used to calculate the first similarity between the material name of each graphic material in the graphic material library and the extended word; a material name screening unit, used to screen the material name according to the first similarity to determine the candidate material name; a second candidate graphic material set determination unit, used to determine the graphic material indicated by the candidate material name as the graphic material in the second candidate graphic material set; a second adding unit, used to select a graphic material in the second candidate material set to obtain the candidate graphic material.
[0011] In other embodiments of the present application, based on the aforementioned scheme, the candidate graphic material at least comes from the third candidate graphic material set; the retrieval module includes: a second similarity calculation unit, used to calculate the second similarity between the material label corresponding to each graphic material in the graphic material library and the extended word; a material label screening unit, used to screen the material label according to the second similarity to determine the candidate material label; a third candidate graphic material set determination unit, used to determine the graphic material associated with the candidate material label as the graphic material in the third candidate graphic material set; a third adding unit, used to select graphic material from the third candidate material set to obtain the candidate graphic material.
[0012] In some embodiments of the present application, based on the aforementioned scheme, the device for generating a graphic logo also includes: a semantic understanding result display module, used to display the semantic understanding result in an editing box; and a correction module, used to correct the semantic understanding result according to the editing operation triggered in the editing box.
[0013] In some embodiments of the present application, based on the aforementioned scheme, a generation module includes: a material layout strategy determination unit, used to determine a material layout template corresponding to a material combination according to a preset material layout template set, wherein the material combination includes text material and at least one candidate graphic material; a layout unit, used to combine the candidate graphic material and the text material in the material combination according to the material layout template corresponding to the material combination to obtain the graphic logo.
[0014] In some embodiments of the present application, based on the aforementioned scheme, the device for generating a graphic logo also includes: a color layout information acquisition unit, used to acquire color layout information, wherein the color layout information is used to indicate the colors of the candidate graphic material and the text material in the material combination; in this embodiment, the layout unit includes: a combination unit, used to add the candidate graphic material in the material combination to the graphic container of the corresponding material layout template, and add the text material to the text container of the corresponding material layout template to obtain an initial graphic logo; a rendering unit, used to render the initial graphic logo according to the color layout information to obtain the graphic logo.
[0015] In some embodiments of the present application, based on the aforementioned scheme, the color layout information acquisition unit includes: a color selection option display unit, used to display the color selection option; a color selection unit, used to determine the color triggered by the selection operation triggered by the color selection option; and a color layout information determination unit, used to determine the color layout information associated with the color triggered by the selection.
[0016] In some embodiments of the present application, based on the aforementioned scheme, there are at least two graphic logos; the device for generating graphic logos also includes: a score calculation module, used to calculate the score of each of the generated graphic logos; a target graphic logo determination module, used to determine the target graphic logo to be displayed according to the score; and a target graphic logo display module, used to display the target graphic logo.
[0017] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for generating a graphic logo as described above is implemented.
[0018] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the method for generating a graphic logo as described above is implemented.
[0019] In the scheme of the present application, after determining the semantic understanding result of the object description text, the graphic material is retrieved through the semantic understanding result, and then the graphic logo is generated based on the candidate graphic material determined by the retrieval and the text material generated based on the object description text, thereby realizing the automatic generation of the graphic logo, instead of manual design of the graphic logo by designers, which greatly shortens the time required for generating the graphic logo and improves the efficiency of generating the graphic logo.
[0020] Moreover, on the one hand, since the semantic understanding result obtained by semantically understanding the object description text is related to the object description text, the graphic material retrieval based on the semantic understanding result can ensure the correlation between the retrieved candidate graphic material and the object description text, and the object description text is related to the described object, so the correlation between the generated graphic mark and the object can be guaranteed, reflecting the identification function of the object. On the other hand, the semantic understanding result is obtained by extracting, expanding and deriving information from the object description text, and the semantic understanding result also includes the information behind the object description text. Therefore, the graphic material retrieval based on the semantic understanding result can ensure the diversity of the obtained candidate graphic materials, and then ensure the diversity of the generated graphic marks. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied is shown.
[0023] Figure 2A-2D It is an interactive schematic diagram of generating a graphic logo for a brand according to a specific embodiment of the present application.
[0024] Figure 3 It is a flowchart of generating a graphic logo according to a specific embodiment of the present application.
[0025] Figure 4 It is a flow chart of a method for generating a graphic logo according to an embodiment of the present application.
[0026] Figure 5 It is a schematic diagram of a graphic logo according to a specific embodiment of the present application.
[0027] Figure 6 It is a flowchart of step 420 according to an embodiment of the present application.
[0028] Figure 7 It is a flowchart of step 420 according to a specific embodiment of the present application.
[0029] Figure 8 It is a flowchart of step 440 according to an embodiment of the present application.
[0030] Fig. 9It is a schematic diagram of a material layout template and a color layout of left-picture-right-text according to an embodiment of the present application.
[0031] Fig.10 It is a schematic diagram of a material layout template and color layout of left-picture-right-text according to another embodiment of the present application.
[0032] Fig.11 It is a schematic diagram of a material layout template and a color layout of an upper figure and a lower figure according to an embodiment of the present application.
[0033] Fig.12 It is a schematic diagram of a text-centered material layout template and a color layout according to an embodiment of the present application.
[0034] Fig.13 It is a flowchart of generating a vector graphic mark according to an embodiment of the present application.
[0035] Fig.14 It is a schematic diagram of vector graphics rendering according to a specific embodiment of the present application.
[0036] Fig.15 It is a block diagram of a device for generating a graphic mark according to an embodiment of the present application.
[0037] Fig.16 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0038] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0039] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0040] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0041] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0042] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0043] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiment of the present application can be applied is shown. Figure 1 As shown, the system architecture includes a terminal 110 and a server 120. The terminal 110 and the server 120 can be directly or indirectly connected via wired or wireless communication, which is not limited in the present application.
[0044] The terminal 110 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a self-service terminal, a vehicle-mounted terminal, a smart TV, a smart speaker, etc., and is not specifically limited here. The server 120 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0045] The terminal 110 can display a user interface, in which the user can enter an object description text, which can be an object name, an object slogan, etc. The object can be a company, a school, a commodity, a brand, a competition, etc., which are not specifically limited here. The terminal 110 sends the object description text entered by the user to the server 120, and the server 120 performs semantic understanding on the object description text, and searches for graphic materials in a preset graphic library based on the semantic understanding results to determine a candidate graphic material set; and determines text materials based on the object description text; on this basis, generates a graphic logo based on the candidate graphic materials and text materials in the candidate graphic material set, and returns the generated graphic logo to the terminal, which displays the generated graphic logo.
[0046] Semantic understanding is a direction in natural language processing (NLP) technology. Natural language processing technology is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language used by people in daily life, so it is closely related to the study of linguistics.
[0047] In the scheme of the present application, semantic understanding technology is used to analyze and process the object description text input by the user, and then graphic materials are retrieved based on the semantic understanding results, and candidate graphic materials for generating graphic logos are determined, and then graphic logos are generated based on the determined candidate graphic materials, thereby realizing automatic generation of graphic logos without relying on designers and improving the efficiency of generating graphic logos.
[0048] In some embodiments, the server 120 may use the object name (abbreviation or full name) in the object description text as the text material. In some embodiments, the text material may also be the object name of the object and the object slogan of the object, such as a corporate slogan, a brand slogan, etc. In some embodiments, the text material may also be a text after the object name is deformed, such as an object name in Chinese characters converted into an English text, a Pinyin text, etc., which is not specifically limited here.
[0049] In some embodiments, the user interface of the terminal 110 may also display the semantic understanding results corresponding to the object description text. Among them, the semantic understanding results may include several object description words. Furthermore, the displayed semantic understanding results may also be editable, so the user can edit the semantic understanding results, such as deleting or adding object description words (expansion words and / or object classification words) in the semantic understanding results, to correct the semantic understanding results. The edited semantic understanding results are then sent to the server 120, and the server 120 performs graphic material retrieval based on the edited semantic understanding results.
[0050] In some embodiments, a color selection option may also be displayed in the user interface of the terminal 110, and the user may select a color based on the color selection option. The server 120 may recommend color layout information based on the color selected by the user, and the recommended color layout information may be one or more groups. The color information is used to indicate at least the color of the candidate material and the text material, and is also used to indicate the background color of the graphic logo.
[0051] In some embodiments of the present application, the user interface of the terminal 110 may also display a font selection option. The displayed font selection option may be a font recommended by the system. The recommended font may be a font that matches the material layout or the text material. After determining the font that the user triggers to select, the server 120 determines the font that the user triggers to select as the font of the text material in the graphic mark.
[0052] It should be noted that the functions corresponding to the terminal 110 can be integrated into the server 120, or the functions corresponding to the server 200 can also be integrated into the terminal 110. In this case, the method of the present application is implemented on one device (terminal or server).
[0053] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0054] Fig. 2 is an interactive schematic diagram of generating a graphic logo for a brand according to a specific embodiment of the present application. In this embodiment, the object is a brand, and the object description text is a brand description text. Figure 2A The first user interface 210 for inputting brand description text is shown. The first user interface 210 is provided with a first text input box 211 and a second text input box 212. The first text input box 211 is used to input the brand name (which can be a full name or an abbreviation), Figure 2A The brand name "Perfect Diary" is exemplarily entered in the first text input box 211.
[0055] The second text input box 212 is used to input the brand slogan (Slogan) of the brand. In some embodiments, the user can input or not input content (brand slogan) in the second text input box 212. In the case where no content is input in the second text input box 212, the brand name input in the first text input box 211 is used as the brand description text. In the case where content is input in both the first text input box 211 and the second text input box 212, the content input in both input boxes is used as the brand description text.
[0056] The first user interface 210 is also provided with a first control 213. If a trigger operation on the first control 213 is detected, the user interface 210 can jump to the following. Figure 2B The second user interface 220 shown. The second user interface 220 displays operation prompt content 221. Figure 2B The operation prompt displayed is "Please describe the brand characteristics you hope to display? Such as: industry, specific business, expected image..."
[0057] The second user interface 220 is provided with an edit box 222, which can be used to display the semantic understanding result obtained by semantically understanding the brand description text, and the semantic understanding result can include one or more brand description words, such as brand classification words, expansion words, etc. In this embodiment, the content in the edit box 222 is editable, and the user can perform editing operations such as deletion and addition on the description words in the edit box 222 to modify the semantic understanding result displayed in the edit box 222. In a specific embodiment, text can be added according to the displayed operation prompt content. For example, the added text can be a phrase indicating the industry to which the brand belongs, the specific business under the brand, the brand's desired image, etc. Of course, the description words in the edit box 222 after editing serve as the basis for graphic material retrieval.
[0058] The second user interface 220 is also provided with a keyword display area 223, which is used to display keywords that can be selected by the user. In some embodiments, the object description words in the semantic understanding result are not only displayed in the edit box 222, but also displayed in the keyword display area 223. The semantic understanding result can be highlighted in the keyword display area 223, for example Figure 2B The three brand descriptors "food and beverage", "beauty and makeup" and "jewelry" are filled in the solid background. By highlighting the descriptors in the semantic understanding results in the keyword display area 223, it is convenient for users to quickly and intuitively know the descriptors in the semantic understanding results.
[0059] If the user needs to add a new brand descriptor in the edit box 222, the user can trigger the selection of keywords in the keyword display area 223 to automatically fill the triggered selected keywords into the edit box 222. Of course, the user can also directly enter a new brand descriptor in the edit box 222.
[0060] The second user interface 220 is also provided with a second control 224 and a third control 225. If an operation is detected to trigger the second control 224, the user returns from the second user interface 220 to the first user interface 210; if an operation is detected to trigger the third control 225, the user enters from the second user interface 220 to the first user interface 210. Figure 2C A third user interface 230 is shown.
[0061] like Figure 2C As shown, the third user interface 230 also displays an operation prompt, namely, "Which color best represents your company?" The third user interface 230 is provided with a color display area 231, which includes a plurality of color selection options 232. Figure 2C2 shows the color selection options of red, orange, yellow, green, light blue, blue, purple and rose red, and the user can trigger the corresponding color selection option 232 to select the corresponding color. In some embodiments, the color indicated by the displayed color selection option 232 can be a color recommended according to the semantic understanding result or the edited semantic understanding result.
[0062] Furthermore, the third user interface 230 may also display the color indicated by each color selection option and the meaning of the color in the form of text, and the meaning of the color can be used as a reference for the user to select a color. The color indicated by the color selection option 232 and the meaning of the color can be displayed in the form of a text pop-up window 233. For example Figure 2C In the example, when the cursor moves to the color selection option 232 indicating red, a text pop-up window 233 is displayed above the color selection option, and the content in the text pop-up window 233 is "Red: enthusiasm, passion, power". When the cursor leaves the area where the color selection option is located, the corresponding text pop-up window 233 is hidden. Figure 2C In order to prompt the user to select the color option currently pointed by the cursor, the color selection option currently pointed by the cursor is highlighted, for example Figure 2C The solid circle legend corresponding to the medium red color has a ring attached to it.
[0063] The third user interface 230 also includes a fourth control 234. If a trigger operation on the fourth control 234 is detected, a graphic logo generation instruction is sent to the background or server, so that the background or server generates one or more graphic logos according to the trigger selected color and the edited semantic recognition result.
[0064] Further, such as Figure 2A , 2B As shown in FIG2C , progress nodes are further displayed in the first user interface 210, the second user interface 220 and the third user interface 230, and the progress nodes are used to indicate the current node for generating the graphic logo. In the first user interface 210, “① Enter brand name” is highlighted, indicating that the node for entering brand name is reached after entering the first user interface 210; similarly, in the second user interface 220, “② Select business keywords” is highlighted, indicating that the node for selecting business keywords (i.e., correcting the semantic understanding results) is reached; and in the third user interface 230, “③ Select preferred style” is highlighted, indicating that the node for selecting preferred style (i.e., selecting color) is reached.
[0065] After the fourth control 234 is triggered, the process jumps to Figure 2D The fourth user interface 240 is used to display the generated one or more graphic symbols. Figure 2D 6 graphic logos generated for the brand name “Perfect Diary” are shown as an example.
[0066] The fourth user interface 240 also includes a fifth control 241 and a sixth control 242. If a trigger operation for the fifth control 241 is detected, the fourth user interface 240 returns to the third user interface 230; if a trigger operation for the sixth control 241 is detected, an instruction is given to generate and display more graphic icons.
[0067] Figure 3 is a flow chart of generating a graphic mark according to a specific embodiment. Figure 3 As shown, it includes: step 310, inputting object description text; step 320, semantic understanding; step 330, displaying the semantic understanding result; if the user is satisfied with the semantic understanding result (i.e., the semantic understanding result does not need to be modified), the user can select the option of directly generating a graphic logo. If the user selects the option of directly generating a graphic logo, step 340 is executed to generate a graphic logo; the specific process of generating a graphic logo can be described below. If the user is not satisfied with the semantic understanding result, step 331: modifying the semantic understanding result is performed to modify the semantic understanding result, for example, Figure 2C The semantic understanding result can be modified by editing in the edit box; then determining whether to select the option of direct generation. If the user selects the option of not directly generating the graphic logo, step 332 is executed: selecting the color, font and material layout template; then generating the graphic logo in combination with the candidate graphic material and text material according to the selected color, font and material layout.
[0068] In this embodiment, the user interface provides a color selection option for color selection, a font selection option for font selection, and a material layout selection option for material layout selection. The color selection option, the font selection option, and the material layout selection option can be displayed in the same user interface (e.g. Figure 2C The third user interface in the figure) can also be displayed in different user interfaces, which is not specifically limited here.
[0069] It is understandable that if the user is satisfied with the semantic understanding result and chooses to generate directly, the color selection option, font selection option and material layout selection option may not be displayed, and the graphic logo can be generated directly based on the recommended color, font and material layout, combined with the candidate graphic materials and text materials.
[0070] In some embodiments of the present application, it is also possible not to display the semantic understanding result, and not to set a selection option of whether to directly generate a graphic mark, but only to provide the user with a selection option such as Figure 2AThe first user interface shown is used to input the object description text, and then the object description text is semantically understood in accordance with the present solution, and the graphic material is retrieved based on the result of the semantic understanding, and then the graphic logo is generated based on the candidate graphic material in the candidate graphic material set determined by the retrieval and the text material determined according to the object description text, and the generated multiple graphic logos are displayed in the user interface for the user to select. In this case, the user only needs to input the object description text, and the operation process is simple, which greatly simplifies the interaction process. For the user, there is no need to limit or describe the characteristics of the graphic logo to be generated in multiple dimensions through complex selection or input. The interaction in this solution is simple, which ensures the user experience.
[0071] Figure 4 This is a flowchart of a method for generating a graphic logo according to an embodiment of the present application. The method can be executed by a computer device with processing capabilities, such as a server, a terminal, or by a server and a terminal interacting with each other, and is not specifically limited here. Figure 4 As shown, the method at least includes steps 410 to 440, which are described in detail as follows:
[0072] Step 410, obtaining object description text.
[0073] The object description text refers to the text used to describe the object, which can be a sentence, a phrase, a word group, a short sentence, etc., which is not specifically limited here. The object description text can be input by the user in the user interface of the terminal, for example, Figure 2A The text input in the first text input box 211 and the second text input box 212. The object description text includes but is not limited to Chinese text, English text, and can also be text in other languages such as Korean, Japanese, French, etc.
[0074] The described object may be an enterprise, school, commodity, organization, brand, TV station, sports, competition, etc. The object description text may include key information of the object such as the object name (full name or abbreviation), object slogan, etc. For example, if the described object is a brand, the object description text may be the brand name, or the brand name and brand slogan.
[0075] Step 420, perform semantic understanding on the object description text to obtain a semantic understanding result.
[0076] Semantic understanding refers to extracting, expanding and deriving information from the object description text to obtain information related to the object in multiple dimensions. For example, if the object description text is a brand name, then based on the brand name, you can mine information related to the brand, such as the industry to which the brand belongs, the specific business under the brand, the products under the brand, the brand concept, the time when the brand was created, and the person who created the brand.
[0077] In some embodiments of the present application, the object description text can be semantically understood based on the knowledge graph. Specifically, keywords can be extracted from the object description text, and then the extracted keywords can be matched and searched in the constructed knowledge graph. Based on the relationship between the entity node where the keyword is located in the knowledge graph and the associated node associated with the entity node where the keyword is located, and the entity represented by the associated node, the information related to the keyword is determined, and the determined information related to the keyword is used as the result of semantic understanding. Entities in the knowledge graph refer to things, such as people, place names, concepts, drugs, companies, etc. The relationship between nodes is used to express a certain connection between different entities, such as Zhang San and Li Si are "friends" (relationship).
[0078] In some embodiments of the present application, the semantic understanding result can be reflected by multiple object description words, and the object description word can be at least one of an object classification word and an extension word. Among them, the object classification word is used to indicate the object classification to which the object belongs. The extension word refers to the word obtained by semantic derivation based on the object description text. It can be understood that under multiple classification principles, the same object can belong to multiple object classifications. For example, if the object described by the object description text is a certain brand, the object classification to which the brand belongs can be the brand classification under the industry to which it belongs, it can be the object classification under the brand creation time classification, and it can be the classification under the brand creation location classification. Therefore, a semantic understanding result can include multiple object classification words.
[0079] In some embodiments of the present application, the object classification words of the object described by the object description text can be determined by constructing an object classification-object text set. An object classification corresponds to an object text set. Wherein, an object text set includes object texts belonging to all objects under the corresponding object classification, and the object texts are used to describe the corresponding objects, and the object texts can be the object names of the objects. Based on the constructed object classification-object text set, the object text set related to the object description text is first determined according to the object description text, and then the object classification corresponding to the object text set related to the object description text is determined as the object classification to which the object described by the object description text belongs.
[0080] In some embodiments of the present application, synonyms of words in the object description text may be used as extended words in the semantic recognition result. In this case, the object description text is first segmented, and then synonyms of each segmented word are determined, and the determined synonyms are used as extended words.
[0081] In some embodiments of the present application, the object classification words may be determined by the word frequency statistics method described below, and the expansion words may be determined by the word combination method, as described below for details.
[0082] In some embodiments of the present application, after step 420, the method further includes: displaying the semantic understanding result in the edit box; and modifying the semantic understanding result according to the editing operation triggered in the edit box. Figure 2B As shown, the editing operation triggered by the user can be a deletion operation or a new addition operation on the content in the edit box, which is not specifically limited here. By displaying the semantic understanding result, it is convenient for the user to confirm the rationality of the semantic understanding result according to the displayed semantic understanding result, so that if there is a deviation in the semantic understanding result, the semantic understanding result can be corrected in time according to the editing operation triggered by the user, so as to ensure the accuracy of the subsequent graphic material retrieval results and the generated graphic logo meets the user's needs.
[0083] Step 430, performing graphic material retrieval based on the semantic understanding result to obtain candidate graphic materials.
[0084] In the scheme of the present application, a graphic material library including a plurality of graphic materials is provided, and the graphic materials may be animal patterns, plant patterns, human patterns, architectural patterns, a combination of various geometric patterns, etc., which are not specifically limited here. For each graphic material, the graphic material library stores description information of the graphic material in association. The description information of the graphic material may include the material name of the graphic material, the material category to which the graphic material belongs, the material label of the graphic material, etc., which are not specifically limited here. The material label of the graphic material may be the commodity to which the graphic material is applicable, the meaning expressed by the graphic material, the state of the entity presented by the graphic material, etc. The material label of the graphic material may be manually labeled, or may be an image recognition label of the graphic material, or a combination of the two, which are not specifically limited here.
[0085] Based on the description information of each graphic material in the graphic material library, the semantic understanding result can be matched with the description information of each graphic material, and the graphic material associated with the first set number of groups of description information with the highest matching degree with the semantic understanding result is used as a candidate graphic material. The obtained candidate graphic material can be one or more. In some embodiments of the present application, in order to generate multiple graphic logos for users to select, there are multiple candidate graphic materials.
[0086] Step 440, generating a graphic logo according to the text material and the candidate graphic material, wherein the text material is determined according to the object description text.
[0087] It is understandable that before step 440, a step of determining text material according to the object description text is also included. In some embodiments of the present application, keywords that can represent the described object can be selected from the object description text as text material. The selected keyword group is, for example, the object name (full name or abbreviation). In some embodiments of the present application, the selected keyword group may include an object slogan of the object in addition to the object name. Further, in some scenarios, important time (such as brand creation time) and important places related to the object can also be used as text material.
[0088] In some embodiments of the present application, the selected phrase can be further converted to a text representation, for example, the Chinese identifier of the object name can be converted into a pinyin representation or an English representation, and the converted pinyin representation or English representation can be used as text material, and the selected phrase and the corresponding pinyin representation (or English representation) can also be used as text materials.
[0089] In some embodiments of the application, a material layout template is preset, and the material layout template at least indicates the layout direction and layout position of the candidate graphic material and text material, and the layout direction is, for example, top-bottom layout, left-right layout, center layout, etc. Further, the material layout template may also indicate background information of the graphic logo, and the background information is used to indicate whether the background of the graphic logo is a solid background or a hollow background.
[0090] On the basis of determining the candidate graphic material and the text material, according to the layout position indicated by the material layout template, the candidate graphic material is added to the graphic container in the material layout template, and the text material is added to the text container of the preset material layout template, and a corresponding graphic logo is obtained. In a specific embodiment, in order to ensure the diversity of the generated graphic logo, there are multiple material layout templates.
[0091] In some embodiments of the present application, in the material layout template, color layout information may be further defined, and the color layout information is used to indicate at least the color of the candidate graphic material and the color of the text material. Furthermore, if the background of the graphic logo requires color, the color layout information is used to indicate the background color of the graphic logo. The background of the graphic logo may be defined by the material layout template, such as whether the background is solid or hollow. Of course, the background provided by the material layout template may also include area division graphics for area division, such as circle, rectangle, ellipse, etc.
[0092] In some embodiments of the present application, the font information of the text material can also be defined in the material layout template. The font information is used to indicate the font of the text material. Therefore, in the process of generating the graphic logo, the text material is converted into the font defined by the font information in the material layout template.
[0093] In some embodiments of the present application, the material layout template may not limit the color and font, but only limit the layout position of the candidate graphic material and text material, and provide additional options for color and font selection for the user to select the color and font. Then, the color of the candidate graphic material in the graphic mark, the font and color of the text material in the graphic mark, and the color of the background material in the graphic mark are determined according to the color selected by the user.
[0094] Figure 5 is a schematic diagram of a graphic mark according to a specific embodiment, such as Figure 5 As shown, the graphic logo includes a solid background. In addition, the "intelligent design" 510 in the graphic logo is a text material, and the petal graphic 520 in the graphic logo is a graphic material. The annular boundary pattern 530 surrounding the "intelligent design" 510 and the petal graphic 520 may be defined in the material layout template, and in this case, it may be called a layout material. Of course, in other embodiments, the annular boundary pattern 530 may also be regarded as another graphic material.
[0095] In the scheme of the present application, after determining the semantic understanding result of the object description text, the graphic material is retrieved through the semantic understanding result, and then the graphic logo is generated based on the candidate graphic material determined by the retrieval and the text material generated based on the object description text, thereby realizing the automatic generation of the graphic logo, instead of manual design of the graphic logo by designers, which greatly shortens the time required for generating the graphic logo and improves the efficiency of generating the graphic logo.
[0096] Moreover, on the one hand, since the semantic understanding result obtained by semantically understanding the object description text is related to the object description text, the graphic material retrieval based on the semantic understanding result can ensure the correlation between the retrieved candidate graphic material and the object description text, and the object description text is related to the described object, so the correlation between the generated graphic mark and the object can be guaranteed, reflecting the identification function of the object. On the other hand, the semantic understanding result is obtained by extracting, expanding and deriving information from the object description text, and the semantic understanding result also includes the information behind the object description text. Therefore, the graphic material retrieval based on the semantic understanding result can ensure the diversity of the obtained candidate graphic materials, and then ensure the diversity of the generated graphic marks.
[0097] If the object described by the object description text is a brand, the brand description text can be semantically understood to fully explore the information related to the brand. Graphic materials can be screened and a graphic logo (brand LOGO) can be generated based on the semantic understanding results. This can ensure that the generated brand LOGO meets the brand positioning and brand characteristics, and is close to the brand image and user needs.
[0098] In some embodiments of the present application, the semantic understanding results include object classification words; Figure 6 As shown, step 420 includes:
[0099] Step 610, obtaining word frequency statistics information of each object text set, the word frequency statistics information indicates the word frequency of each word in the object text set in the object text set; wherein one object text set corresponds to one object classification.
[0100] The object text set includes object texts of objects belonging to the same object classification, and the object text refers to the description text of the object. In some embodiments of the present application, the object text and the object description text describe the same type of information. For example, if the object description text is the object name of the described object, the object text is also the object name of the corresponding object.
[0101] In some embodiments of the present application, the word frequency statistics of the object text set may be a word frequency vector corresponding to the object text set. The word frequency vector is used to indicate the word frequency of each word in the corresponding object text set. The word frequency of each word in the object text set may be calculated according to the following process:
[0102] Assume there are n object categories, and the object text set corresponding to object category k is R k Based on the object texts included in the object text set and the characters in each object text, the word frequency c(i, R k )for:
[0103]
[0104] in, Represents word i in the object text set R k The number of times it appears in Represents the object text set R k The sum of the number of times each word appears in .
[0105] On this basis, the object text set R can be determined k The word frequency vector of k :
[0106] r k =[c(i0,R k ) c(i1,R k ) ... c(i m ,R k )|i0,i1,...i m ∈R k ] T ; (Formula 2)
[0107] In the same way as formula (2), the word frequency vector of each object text set in the n object text sets can be calculated respectively, and the word frequency vector of each object text set in the n object text sets can be combined to obtain the word frequency matrix M:
[0108] M=[r1 r2 ... r n ]; (Formula 3)
[0109] In a specific embodiment, to facilitate matrix calculation, the length of each word frequency vector is unified. If a word does not exist in an object text set, its word frequency is set to a minimum value, such as zero.
[0110] Step 620, determining the word frequency of the words in the object description text in each object text set according to the word frequency statistics information of each object text set.
[0111] The above word frequency matrix indicates the word frequency of words (words in the object text in each object text set) in each object text set. Therefore, the word in the object description text (assuming that the jth word t in the object description text) can be j ) in an object text set R k If the word t is found, j , then the corresponding word t is obtained from the word frequency matrix j In the object text collection R k On the contrary, if in the object text set R k No word found in j , then word t j In the object text collection R k The word frequency in is zero.
[0112] Step 630, calculating the probability that the object description text belongs to the object category corresponding to each object text set according to the word frequency of the words in the object description text in each object text set.
[0113] After determining the word frequency of the words in the object description text in each object text set, for each object text set, the word frequency of the words in the object description text in an object text set is regarded as the probability of the word appearing in an object classification. On this basis, the joint probability of the words in the specified word set in the object description text relative to the object text set is taken as the probability that the object described by the object description text belongs to the object classification to which the object text set belongs. The specified word set can be all the words in the object description text or part of the words in the object description text.
[0114] If the specified character set is all the characters in the object description text, then the probability P that the object described by the object description text belongs to object category k isk is:
[0115]
[0116] In some embodiments of the present application, the weights of each word may be determined first. The weight is used to indicate the contribution of the word to determining the object classification to which the object belongs. Then, the word frequency of the words in the specified word set in the object description text in the object text set R k is weighted with the weights corresponding to each word, and the weighted calculation result is used as the probability that the object description text belongs to the object classification k corresponding to the object text set R k corresponding to.
[0117] In some embodiments of the present application, keywords may be extracted from each sample object text as a sample in the sample object text set, and the extracted keywords are added to the keyword set. Among them, the extracted keywords may be words that play an identifying role for the object. Assuming that the total number of keywords in the keyword set is m, for each keyword a l (1≤l≤m, l is an integer) in the keyword set, calculate the number of sample object texts in the sample object text set that include the keyword a l , and use the ratio of the number of sample object texts including the keyword a l to the total number of sample object texts in the sample object text set as the weight of the keyword a l . After obtaining the weights of each keyword, for the words in the object description text, if the word exists in the keyword set, the weight of the word as a keyword is correspondingly obtained; otherwise, if the word is not in the keyword set, the specified weight is used as the weight of the word. In a specific embodiment, the specified weight may be set to be less than the weight of the keyword.
[0118] If a word has a high usage frequency and has no identifying role for the object (or has a small identifying role for the object), then the word frequency of the word in the object text set is also relatively high. If the word frequency of the word in the corresponding text set is directly used as the probability that the object description text including the word belongs to the corresponding object classification, it will lead to an incorrect determination of the object classification. Words with a high usage frequency but no identifying role for the object or a small identifying role for the object) may be auxiliary words, such as the words "de" and "le". In this embodiment, the constructed keyword set does not include words with a high usage frequency but no identifying role for the object, and moreover, the weights of other words outside the keyword set are set to be less than the weights of the keywords. Therefore, the influence of such words on determining the object classification can be effectively reduced.
[0119] It is worth mentioning that in Asian languages, such as Chinese, Japanese, Korean, etc., characters are the unit semantic elements in the corresponding language text, while in other languages that do not use characters as the unit semantic elements, such as English, German, and French, words are the unit semantic elements in the corresponding language text. Correspondingly, for texts with words as the unit semantic elements in the corresponding language text, the word frequency is the frequency of a word appearing in the object text set.
[0120] Step 640 , determining the target object category to which the object described by the object description text belongs based on the probability that the object description text belongs to the object category corresponding to each object text set.
[0121] In some embodiments of the present application, according to the probability that the object description text belongs to the object classification corresponding to each object text set, the object classifications are sorted in descending order of probability, and the object classifications ranked first by a set number are determined as the target object classifications to which the object description text belongs. The target object classification refers to the object classification to which the object described by the determined object description text belongs.
[0122] In other embodiments, based on a set probability threshold, an object category with a probability not lower than the probability threshold may be determined as the target object category to which the object described in the object description text belongs.
[0123] Step 650: determine the object name of the target object classification as the object classification word.
[0124] Regarding the classification of objects, in each object classification, relatively similar characters tend to be used as object names; therefore, in this embodiment, the frequency of characters in the object text set is counted in units of characters, and the probability that the object indicated by the object description text belongs to an object classification is determined based on the frequency of the characters, thereby determining the object classification term.
[0125] In the application scenario where the object description text is an object name, the object name's identification function for the object is reflected by one or several characters therein, while the object name as a whole or the words in the object name do not have a definite semantics. Therefore, in this embodiment, the word frequency is counted in units of characters, and the probability that the object indicated by the object name belongs to an object classification is determined based on the word frequency. This fully utilizes the object identification function of the characters in the object name, which can ensure the accuracy of the determined target object classification, and further ensure the accuracy of the obtained object classification terms.
[0126] In some embodiments of the present application, the semantic understanding result includes an extended word; step 320 includes: combining at least two characters in the object text to obtain a combined word; if the combined word is included in the preset word list, determining the combined word as an extended word.
[0127] In some embodiments of the present application, characters in the object text may be combined in a permutation and combination manner to obtain a combined word.
[0128] In some embodiments of the present application, a set number of adjacent characters can be combined according to the order of characters in the object text to obtain a combined word. In this embodiment, an N-gram algorithm (also known as an N-gram model algorithm) can be used to expand words, where N is a preset number, and N can be set according to actual needs. Generally speaking, N can be set to an integer greater than 1, for example, N is set to 2, 3, or 4. In some embodiments, in order to ensure the diversity of the expanded words obtained, the preset number can be multiple groups.
[0129] For example, for the above Figure 2A For the brand name "Perfect Diary" input in , if N is 2, the resulting words include: Perfect, Beauty and Day, Diary; if N is 3, the resulting words include: Perfect Day, Beauty Diary; if N is 4, the resulting words include: Perfect Diary. If the preset number is multiple groups, such as 2, 3, and 4, the resulting words include: Perfect, Beauty and Day, Diary, Perfect Day, Beauty Diary, Perfect Diary.
[0130] Since adjacent characters are combined according to the order of arrangement of the characters in the object description text, in practice, the combined words obtained by this method may not be phrases that conform to grammatical rules or words that do not exist in the dictionary. Therefore, according to the preset word list, if the combined word is included in the preset word list, the combined word is determined as an extended word. Among them, the words in the preset word list are words that exist in the dictionary. Furthermore, the preset word list can also be words related to the field where the object is located, thereby narrowing the scope of the combined word query and increasing the determination rate of the extended word. In some embodiments of the present application, after determining that a combined word exists in the preset word list, a synonym of the combined word can be further obtained from the preset word list, and the synonym of the combined word is also determined as an extended word.
[0131] In this embodiment, the expansion is performed based on the characters in the object description text, and adjacent characters are combined. The number of combined words must be greater than the words included in the object description text itself. Therefore, the characters in the object description text are fully utilized for word expansion.
[0132] In some embodiments, if the object description text is relatively short, for example, the object description text is the object name, the method of this embodiment is used for expansion and derivation, which can ensure the number of expansion words. Further, in this embodiment, after obtaining the combination word, it is further confirmed whether the preset word list includes the combination word. After determining that the preset word list includes the combination word, the combination word is determined as an expansion word, so that the determined expansion words are all derived from the preset word list, and the source of the expansion words is stable, which ensures the stability of the determined expansion words, and facilitates the subsequent retrieval of graphic materials based on the expansion words.
[0133] In some embodiments of the present application, if the object description text is long (for example, the object description text includes not only the object name but also the object slogan), and it expresses more information, the object description text can be segmented, and the segmented words and the synonyms of the segmented words can be used as extended words. In this case, since the object description text is long, extracting relevant keywords from the object description text can effectively reflect the information in the object description text, ensuring the accurate orientation of the extended words determined based on the keywords, rather than expanding the words in units of smaller granularity characters, taking into account both the efficiency and accuracy of the determination of the extended words.
[0134] Figure 7 4 is a flowchart of step 420 according to a specific embodiment. In this embodiment, the semantic understanding result includes object classification words and expansion words. The object classification words can be one or more, and the expansion words can be one or more, which are not specifically limited here. Figure 7 As shown, after the user inputs the object description text, the object classification word is determined through the process of steps 711-713, and the expansion word is determined through the process of steps 721-723.
[0135] Specifically, step 711, determine the word frequency matrix. Step 712, query the word frequency corresponding to the word in the object description text. Step 713, determine the target classification object. The specific implementation process of steps 711-713 is described above and will not be repeated here.
[0136] Step 721, determine the combination word; step 722, perform a word search in a preset word list according to the combination word; step 723, determine the expansion word. The implementation process of steps 721-723 is described above and will not be repeated here. On the basis of obtaining the object classification word and the combination word, the corresponding semantic understanding result is obtained.
[0137] In some embodiments of the present application, the semantic understanding results include object classification words and extension words, and the candidate graphic materials are derived from at least one of a first candidate graphic material set, a second candidate graphic material set, and a third candidate graphic material set; wherein, the first candidate graphic material set is determined by matching the object classification words with the material classification to which each graphic material in the graphic material library belongs; the second candidate graphic material set is determined by matching the extension words with the material name of each graphic material in the graphic material library; and the third candidate graphic material set is determined by matching the extension words with the material label of each graphic material in the graphic material library.
[0138] In some embodiments of the present application, graphic materials can be selected from the first candidate graphic material set, the second candidate graphic material set, and the third candidate graphic material set as candidate graphic materials according to a set mixing ratio. For example, if the total number of candidate graphic materials is set to X, and the ratios of graphic materials selected from the first candidate graphic material set, the second candidate graphic material set, and the third candidate graphic material set are set to x1, x2, and x3, respectively, then the ratios of graphic materials selected from each candidate graphic material set are calculated based on the total number X and the ratios x1, x2, and x3.
[0139] In some embodiments of the present application, the priorities of the first candidate graphic material set, the second candidate graphic material set, and the third candidate graphic material set may also be set. For example, since the first candidate graphic material set is determined based on matching of object classification words and material classification, and the second candidate graphic material set matches the extension words with the material name, the material retrieval accuracy is higher in comparison. Therefore, the first candidate graphic material set and the second candidate graphic material set may be set as the first priority to preferentially select graphic materials from the two candidate graphic material sets as candidate graphic materials, and the third candidate graphic material set may be set as the second priority. In a specific embodiment, it may be limited by the number of graphic materials in the graphic material library, and the number of graphic materials in the first candidate graphic material set and the second candidate graphic material set may not reach the total number X. In this case, graphic materials are selected from the third candidate graphic material set to supplement the candidate graphic materials to enrich the number of candidate graphic materials.
[0140] The first candidate graphic material set, the second candidate graphic material set and the third candidate graphic material set are determined by performing graphic material retrieval under three different dimensions. Therefore, combining the first candidate graphic material set, the second candidate graphic material set and the third candidate graphic material set to determine the candidate graphic materials can enrich the number of candidate graphic materials and ensure the diversity of candidate graphic logos generated based on the candidate graphic materials.
[0141] In some embodiments of the present application, the candidate graphic materials are derived from at least a first candidate graphic material set; in this embodiment, step 430 includes: determining the target material classification corresponding to the object classification term based on the correspondence between the object classification and the material classification; determining the graphic materials belonging to the target material classification in the graphic material library as graphic materials in the first candidate graphic material set; selecting graphic materials from the first candidate graphic material set to obtain candidate graphic materials.
[0142] The material classification is used to indicate the category to which the graphic material belongs. With object classification, the graphic material can be classified under multiple classification principles, so that the same graphic material can belong to multiple material categories. The correspondence between the object classification and the material classification can be constructed based on the object classification to which the graphic material in the collected graphic mark and the object identified by the collected graphic mark belong. Since the object classification word indicates the object classification, based on the correspondence between the object classification and the material classification, the material classification corresponding to the object classification indicated by the object classification word is determined as the target material classification corresponding to the object classification word.
[0143] In a specific embodiment, the similarity between the object classification word and the object classification in the corresponding relationship can be calculated, and the object classification in the corresponding relationship whose similarity exceeds the set similarity threshold, or the object classification in the corresponding relationship with the highest similarity, is determined to be the object classification associated with the object classification word (referred to as the target object classification); then, the material classification corresponding to the target object classification is determined as the target material classification.
[0144] In some embodiments of the present application, in order to ensure the diversity of the subsequently generated graphic logo, graphic materials can be randomly selected from the first candidate graphic material set according to the set first graphic material quantity, and the selected graphic materials can be determined as candidate graphic materials. Of course, in other embodiments, all graphic materials in the first candidate graphic material set can also be used as candidate graphic materials.
[0145] In some embodiments of the present application, the candidate graphic material is derived from at least a second candidate graphic material set; in this embodiment, step 430 includes: calculating a first similarity between the material name of each graphic material in the graphic material library and the extended word; screening the material name according to the first similarity to determine the candidate material name; determining the graphic material indicated by the candidate material name as the graphic material in the second candidate graphic material set; selecting a graphic material from the second candidate material set to obtain a candidate graphic material.
[0146] In some embodiments of the present application, a first vector representation of an extended word and a second vector representation of a material name of each graphic material in a material graphic library can be generated through a trained doc2vec (also called Paragraph Vector) model, and then the similarity (for example, cosine similarity) between the first vector representation and the second vector representation of each material name is calculated, and one or more material names that are most similar to the first vector representation are determined as candidate material names.
[0147] In some embodiments of the present application, all graphic materials in the second candidate graphic material set may be used as candidate graphic materials, or some graphic materials may be selected from the second candidate graphic material set as candidate graphic materials. In a specific embodiment, graphic materials may be selected according to the similarity between the corresponding material name and the extended word, so as to select multiple graphic materials with the highest similarity as candidate graphic materials.
[0148] In some embodiments of the present application, the candidate graphic materials are at least derived from a third candidate graphic material set; in this embodiment, step 430 includes: calculating the second similarity between the material label corresponding to each graphic material in the graphic material library and the extended word; screening the material labels according to the second similarity to determine the candidate material labels; determining the graphic material associated with the candidate material label as the graphic material in the third candidate graphic material set; selecting the graphic material in the third candidate material set to obtain the candidate graphic material.
[0149] A material tag is a description of a certain feature of a graphic material. It can be a highly general word that describes the features of the graphic material, such as the shape and pattern of the graphic material. Figure 5 For the graphic material of the petals graphic, the material label can be words used to describe the number of petals, words used to describe the state of the petals (such as blooming, budding, etc.), words used to describe the color of the petals, etc.
[0150] Similarly, the trained doc2vec model can be used to generate a first vector representation of the extended words and a third vector representation of each material label of each graphic material, and then the similarity (for example, cosine similarity) between the first vector representation and the third vector representation of each material label is calculated, and one or more material labels that are most similar to the first vector representation are determined as candidate material labels.
[0151] Similarly, all graphic materials in the third candidate graphic material set can be used as candidate graphic materials, or some graphic materials can be selected from the third candidate graphic material set as candidate graphic materials. In a specific embodiment, graphic materials can be selected according to the similarity between the corresponding material label and the extended word, so as to select multiple graphic materials with the highest similarity as candidate graphic materials.
[0152] In some embodiments of the present application, Figure 8 As shown, step 440 includes:
[0153] Step 810: Determine a material layout template corresponding to a material combination according to a preset material layout template set, where the material combination includes a text material and at least one candidate graphic material.
[0154] As described above, the determined candidate graphic materials may be multiple. In this case, the pairing of the candidate material and the text material used to generate a graphic mark is called a material combination. Since the candidate graphic materials in different material combinations are different, the material layout strategies adapted to different material combinations may be different. Therefore, the material layout template adapted to each material combination is first determined.
[0155] The material layout template set includes a plurality of material layout templates, and the material layout template indicates the layout positions of the candidate graphic materials and text materials in the corresponding material combination. Furthermore, the material layout template also indicates whether the graphic mark includes background materials.
[0156] In some embodiments of the present application, the material layout template can be screened according to whether the text material includes an object slogan, that is, if the text material in the material combination includes an object slogan (such as a brand slogan), the material layout template provided for layout of the object slogan is determined as the material layout template corresponding to the material combination; conversely, if the text material in the material combination does not include an object slogan, the material layout template not provided for layout of the object slogan is determined as the material layout template corresponding to the material combination. It can be understood that the material layout module determined for each material combination can be one or more, which is not specifically limited here.
[0157] In some embodiments of the present application, the graphic container in the material layout template sets an aspect ratio, and an aspect ratio range that matches the aspect ratio of the graphic container can be set. Thus, if the aspect ratio of the candidate graphic material in the material combination is within the aspect ratio range that corresponds to a graphic container, the material layout template where the graphic container is located is determined as the material layout template corresponding to the material combination.
[0158] In other embodiments of the present application, similarity calculation can be performed based on the style tags of each material layout template in the material layout template set (referred to as the first style tag for easy distinction) and the style tags of the candidate graphic materials in the material combination (referred to as the second style tag for easy distinction), and the material layout template associated with the first style tag with a similarity higher than the set similarity threshold is used as the material layout template corresponding to the material combination. Of course, the above is only an illustrative example of matching material layout templates for material combinations. In other embodiments, the above two or more factors (whether the text material includes an object slogan, the aspect ratio of the candidate graphic material, the second style tag of the candidate graphic material, etc.) can also be combined to match the material layout template.
[0159] Step 820, combining the candidate graphic materials and text materials in the material combination according to the material layout template corresponding to the material combination to obtain a graphic logo.
[0160] In the material layout template, a graphic container for laying out candidate graphic materials and a text container for laying out text materials are set. Therefore, after determining the material layout template corresponding to the material combination, the candidate graphic materials in the material combination are added to the graphic container of the material layout template, and the text materials are added to the text container, and a graphic logo is generated accordingly. It can be understood that if the text material includes an object name and an object slogan, the material layout template correspondingly includes a first text container for laying out the object name and a second text container for laying out the object slogan.
[0161] In some embodiments of the present application, font information compatible with the material layout template is set in the material layout template, and after the text material in the material combination is added to the corresponding text container, the font of the text material is converted to the font indicated by the font information.
[0162] In some embodiments of the present application, the material layout template can also set the fill attribute of each area, and the fill attribute is used to indicate whether the corresponding area is solid or hollow. If an area is solid, the area needs to be filled with color. Conversely, if an area is hollow, the boundary line of the area can be drawn with a brush.
[0163] Fig. 9 It is a schematic diagram of a material layout template and a color layout of left-picture-right-text according to an embodiment of the present application. Figure 9-1 and Fig. 9 -2 are schematic diagrams showing material layout templates without a layout object slogan, such as Figure 9-1 As shown, area 910 is the layout area of the graphic container, area 920 is the layout area of the text container, and area 930 is the background material. Figure 9-1 ,exist Fig. 9 -2, the area 910 is divided into an area 911 and an area 912, wherein the area 912 is a layout area of the graphic container.
[0164] Figure 9-3 Shows that it can be applied to Figure 9-1 The color layout diagram of the material layout template is as follows: Figure 9-3 As shown, area 910, area 920, and area 930 are all solid areas, wherein the fill color and brush color of area 910 are color I, the fill color and brush color of area 920 are color II, and the fill color and brush color of area 930 are color III. The brush color is used to define the color of the outer boundary of the corresponding area.
[0165] Figure 9-4 and Figure 9-5 An example is shown that can be applied to Fig. 9 -2 shows the color layout diagram of the material layout template. Figure 9-4 As shown, the fill color and brush color of area 911 are color I, the fill colors and brush colors of area 912 and area 930 are color III, and the fill color and brush color of area 920 are color II. Figure 9-5 As shown, the fill color and brush color of area 912 are color I, the brush color of area 911 is color I, the fill color of area 911 is color III, the fill color and brush color of area 930 are color III, and the fill color and brush color of area 920 are color II.
[0166] Fig.10 It is a schematic diagram of a material layout template and color layout of left-picture-right-text according to another embodiment of the present application. Fig.10 The material layout template in is suitable for material combinations that include object slogans in text materials. Figure 10-1 In the material layout template shown, area 1010 is the layout area of the graphic container, area 1020 is the layout area of the first text container, area 1030 is the layout area of the second text container, and area 1040 is the background material area; the first text container is used to layout the object name, and the second text container is used to layout the object slogan. Figure 10-1 In terms of Fig.10 In the material layout template shown in -2, area 1010 is divided into area 1011 and area 1012, where area 1011 is the layout area of the graphic container. Figure 10-1 In terms of Figure 10-3 In the material layout template shown, area 1040 is divided into area 1041 and area 1042 .
[0167] Figure 10-4It shows that it can be applied to Figure 10-1 Schematic diagram of the color layout of the material layout template. Figure 10-4 As shown, the filling color and brush color of area 1010 are color I, the filling colors and brush colors of areas 1020 and 1030 are both color II, and the filling color and brush color of area 1040 are color III.
[0168] Figure 10-5 and Figure 10-6 They are shown respectively as Fig.10 -2 color layout diagram of the material layout template. Figure 10-5 As shown, the fill color and brush color of area 1011 are color III; the fill color and brush color of area 1040 are color III; the fill color and brush color of area 1012 are color I; the fill color and brush color of area 1020 and area 1030 are both color II. Figure 10-6 As shown, the fill color and brush color of area 1012 and area 1040 are color III, the brush color of area 1011 is color I, the fill color of area 1011 is color III, and the fill color and brush color of area 1020 and area 1030 are color II.
[0169] Figure 10-7 and Figure 10-8 They are shown respectively as Figure 10-3 Schematic diagram of the color layout of the material layout template. Figure 10-7 As shown, the fill color and brush color of regions 1010, 1020, 1030 and 1042 are color III, and the fill color and brush color of region 1041 are color I. Figure 10-8 As shown, the fill color and brush color of area 1010 are color I, the fill color of area 1041 are color III, and the brush color of area 1041 is color I; the fill color and brush color of area 1042 are color III, and the fill color and brush color of areas 1020 and 1030 are color II.
[0170] Fig.11 is a schematic diagram of a material layout template and a color layout of the upper figure and lower figure according to an embodiment of the present application. Figure 11-1 and Fig.11 -The material layout template shown in 2 is suitable for material combinations that do not include object slogans in the text materials; Figure 11-3 , Figure 11-4 and Figure 11-5 The material layout template shown is suitable for a material combination including object slogans in text materials.
[0171] exist Figure 11-1In the material layout template shown, area 1110 is the layout area of the graphic container, area 1120 is the layout area of the first text container of the layout object name, and area 1130 is the background material. Figure 11-1 , Fig.11 In the material layout template shown in FIG. 2 , area 1110 is divided into area 1111 and area 1112 , wherein area 1111 is the layout area of the graphic container.
[0172] Compared to Figure 11-1 , Figure 11-3 In the material layout template shown, area 1130 is divided into area 1131 and area 1132, wherein area 1131 is the layout area of the second text container of the layout object slogan; area 1132 is used as background material.
[0173] Compared to Figure 11-3 , Figure 11-4 In the material layout template shown, area 1110 is divided into area 1111 and area 1112 , wherein area 1111 is the layout area of the graphic container.
[0174] Compared to Figure 11-3 , Figure 11-5 In the material layout template shown, area 1132 is divided into area 1133 and area 1134 .
[0175] Figure 11-6 It shows that it can be applied to Figure 11-1 The color layout diagram of the material layout template is shown. Figure 11-6 As shown, the fill color and brush color of area 1110 are color I, the fill color and brush color of area 1120 are color II, and the fill color and brush color of area 1130 are color III.
[0176] Figure 11-7 and Figure 11-8 They are shown respectively as Fig.11 -2 shows the color layout diagram of the material layout template. Figure 11-7 As shown, the fill color and brush color of area 1112 and area 1130 are color III, the fill color and brush color of area 1111 are color I, and the fill color and brush color of area 1120 are color II.
[0177] like Figure 11-8 As shown, the fill color and brush color of area 1111 are color I, the fill color of area 1112 are color III, and the brush color of area 1112 is color I; the fill color and brush color of area 1130 are color III, and the fill color and brush color of area 1120 are color II.
[0178] Figure 11-9 It shows that it can be applied to Figure 11-3 The color layout diagram of the material layout template is shown. Figure 11-9 As shown, the fill color and brush color of area 1110 are color I, the fill color and brush color of area 1120 and area 1131 are color II, and the fill color and brush color of area 1132 are color III.
[0179] Figure 11-10 and Figure 11-11 They are shown respectively as Figure 11-4 A schematic diagram of the color layout of the material layout template is shown.
[0180] like Figure 11-10 As shown, the fill color and brush color of area 1111 and area 1132 are color III; the fill color and brush color of area 1112 are color I, and the fill color and brush color of area 1120 and area 1131 are color II.
[0181] like Figure 11-11 As shown, the fill color and brush color of area 1111 are color I, the fill color of area 1112 are color III, and the brush color of area 1112 is color I; the fill color and brush color of area 1120 and area 1131 are color II; and the fill color and brush color of area 1132 are color III.
[0182] Figure 11-12 and Figure 11-13 They are shown respectively as Figure 11-5 The color layout diagram of the material layout template is shown. Figure 11-12 As shown, the filling color and brush color of regions 1110 , 1120 , 1131 and region 1134 are color III, and the filling color and brush color of region 1133 are color I.
[0183] like Figure 11-13 As shown, the fill color and brush color of area 1110 are color I, the fill color and brush color of area 1120 and area 1131 are color II, the fill color of area 1133 is color III, and the brush color of area 1133 is color I; the fill color and brush color of area 1134 are color III.
[0184] Fig.12 : is a schematic diagram of a text-centered material layout template and color layout according to an embodiment of the present application. Figure 12-1 and Fig.12 The material layout template shown in -2 is suitable for material combinations that do not include object slogans in the text materials.
[0185] like Figure 12-1 As shown, region 1210 is a region for layout text containers, and region 1210 is arranged in the center of the template. Region 1220 is a background material. In a specific embodiment, the candidate graphic material can be arranged in region 1220 ( Figure 12-1 The layout position of the candidate graphic material is not shown in the figure) to be arranged around the area 1210. Figure 12-1 The material layout template shown, Fig.12 -2, region 1220 is divided into region 1221 and region 1222.
[0186] Figure 12-3 It shows that it can be applied to Figure 12-1 The color layout diagram of the material layout template is shown. Figure 12-3 As shown, the fill color and brush color of area 1210 are color II, and the fill color and brush color of area 1220 are color III.
[0187] Figure 12-4 and Figure 12-5 They are shown respectively as Fig.12 -2 shows the color layout diagram of the material layout template. Figure 12-4 As shown, the fill color and brush color of area 1210 and area 1222 are color III, and the fill color and brush color of area 1221 are color II. Figure 12-5 As shown, the filling color and brush color of area 1210 are color II; the filling color and brush color of area 1222 are color III; the filling color of area 1221 is color III, and the brush color of area 1221 is color II.
[0188] It is worth mentioning that the material layout templates and the color layout of the material layout templates shown above are only exemplary examples. In other embodiments, more or fewer material layout templates and color layouts of material layout templates may also be included. In the above examples, the shape of the outer boundary line of each area is a circle or a rectangle. In other embodiments, the shape of the boundary line may also be a graphic of other shapes. In the embodiments shown above, each area is solid filled. In other embodiments, the area may also be hollow (i.e., its filling color is colorless), which can be set according to actual needs.
[0189] In a specific embodiment, the specific positions of each area in the material layout template, the proportional relationship between each area, the boundary shape of each area, etc. can be set as needed. The schematic diagram of the material layout template provided above is only an illustrative example and cannot be regarded as a limitation on the scope of use of this application.
[0190] The schematic diagram of the material layout template shown above shows an example of setting a graphic container in each material layout template. In other embodiments, two or more graphic containers can also be set in a material layout template. Correspondingly, the candidate graphic materials applied to the material layout template include at least two.
[0191] In some embodiments of the present application, graphic materials may be pre-set in the material layout template as layout materials in the material layout template, so that, in the candidate process, only a combination of a text material and a candidate graphic material may be limited to generate a graphic logo.
[0192] In some embodiments of the present application, before step 820, the method further includes: obtaining color layout information, the color layout information is used to indicate the colors of the candidate graphic material and the text material in the material combination. In this embodiment, step 820 further includes: adding the candidate graphic material in the material combination to the graphic container of the corresponding material layout template, and adding the text material to the text container of the corresponding material layout template to obtain an initial graphic mark; rendering the initial graphic mark according to the color layout information to obtain a graphic mark.
[0193] In some embodiments of the present application, the step of obtaining color layout information further includes: displaying a color selection option; determining a color that triggers selection based on a selection operation triggered by the color selection option; and determining color layout information associated with the color that triggers selection.
[0194] The color selection options displayed can be Figure 2C shown in, but not limited to Figure 2C The form shown and the color shown.
[0195] In some embodiments of the present application, the color indicated by the displayed color selection option may be a color recommended according to the semantic understanding result. In this case, the color indicated by the color word associated with the object classification word or the expansion word in the semantic understanding result may be used as the recommended color.
[0196] In some embodiments of the present application, the colors provided for user selection can be preset, and color layout information associated with the color indicated by each color selection option is also provided, and the color layout information includes multiple color combinations that meet the user's visual aesthetics. Figure 2C The color indicated by the color options provided is equivalent to allowing the user to select a color style, and the color layout information provided is related to the color style.
[0197] The color layout information associated with the color indicated by the color selection option is used to indicate at least the color of the candidate graphic material, the color of the text material, and further, the color of the background. In some embodiments of the present application, the color layout information includes a triple consisting of the color of the candidate graphic material, the color of the text material, and the background color of the graphic mark.
[0198] In some embodiments of the present application, after determining the color selected by the user, one or more similar colors similar to the color selected by the user are further automatically selected, and then the color layout information associated with each automatically selected similar color is correspondingly determined, and a triple indicating the color of the candidate graphic material, the color of the text material, and the background color of the graphic logo is formed according to the same process as above. The color triple corresponding to the color selected by the user and the color triple corresponding to the color similar to the color selected by the user are used as the data basis for the graphic logo to be generated.
[0199] In some embodiments of the present application, the generated graphic mark is a vector graphic. Specifically, after obtaining the text material, the candidate graphic material, the color layout information and the material layout template, the generated graphic mark can be generated as follows: Fig.13 The process shown generates a vector graphic symbol. Fig.13 As shown, specifically including:
[0200] Step 1310, material cleaning.
[0201] Material cleaning refers to standardizing the original material (candidate graphic material, text material) to facilitate subsequent material rendering. In some embodiments of the present application, the candidate graphic material and text material are vector materials, such as svg format. For vector materials, if there is a solid fill area in the material, the solid fill area is obtained by filling, and the boundary (border) of the area in the material can be obtained by a brush.
[0202] Therefore, in step 1310, color parameters of the candidate graphic materials and text materials are set according to the color information (including brush color, fill color, etc.) of the candidate graphic materials and the color information of the text materials indicated in the color layout information, so that in the generated graphic logo, the color of each material is the color indicated in the color layout information, rather than the original color of the material, thereby achieving color cleaning of the material.
[0203] The following example uses the svg (Scalable Vector Graphics) format as an example. Svg is an image file format that represents graphic information in a concise and portable form. The svg format defines graphics based on the XML format.
[0204] In the SVG format, the g tag is used as a container element to combine other related elements, that is, the g tag is used to logically group related graphic elements. Graphic elements include rectangular elements (corresponding label is rect), circular elements (label is circle), ellipse elements (label is ellipse), straight line elements (label is line), path elements (label is path), etc. The g tag groups all its child elements into the same group. When the element represented by the g tag is changed graphically, its child elements will also be transformed. Similar to HTML documents, SVG files also use nested tags to define the overall characteristics and properties of graphics. The elements in the child tags will inherit the characteristics and properties defined in the parent tags.
[0205] When parsing SVG-formatted materials, you can first determine whether an element in the material has a color mark, and specifically obtain the node style of the element from the SVG file of the material, if the node style can indicate whether the element has a color. During the parsing process, since the g tag itself does not have the function of drawing, the sub-tags it contains may be areas that need to be filled with color. Therefore, you can recursively determine whether the sub-tag needs to be filled with color, so as to determine whether a certain element needs to set the brush color (define the stroke attribute of the element) and / or fill color (define the fill attribute of the element), and set the brush color and / or fill color of the element accordingly.
[0206] Step 1320, material combination.
[0207] As described above, the material layout template indicates the layout positions of the candidate graphic materials and text materials in the graphic mark, so the graphic materials and text materials can be combined subsequently according to the layout positions indicated by the material layout template.
[0208] Step 1330: Generate vectorized material.
[0209] In this step, the combined material layout template is vectorized and rendered using the color indicated in the material layout information. In some embodiments of the present application, a vector graphics rendering solution based on Emscripten+WASM may be used.
[0210] Emscripten is a compiler from Low Level Virtual Machine (LLVM) to JavaScript. Through the Emscripten compiler, the C or C++ language code supported by LLVM can be compiled into a programming language that can be run in a browser or other platforms. In this solution, the Emscripten compiler is used to compile code files (such as code files for graphics rendering) into wasm modules.
[0211] WASM, or Web Assembly, is an efficient, low-level programming language. Based on WASM, code written in languages other than JavaScript (such as C, C++, Rust, or others) can be compiled into a wasm module, which is a compact binary bytecode format that enables it to run at speeds close to native performance.
[0212] Before going into details, let's explain the concepts in WASM: Module: a "code unit" that contains compiled binary code and can be efficiently cached and shared. Memory: a continuous, variable-size byte array buffer that can be understood as a "heap". Instance: based on Module, it contains all instances of the states required for runtime (wasmtime). If Module is compared to a cpp file, then Instance is an exe file linked to a dll.
[0213] like Fig.14 As shown in the figure, after the Wasm module is compiled, the Wasm module is passed to Wasmtime (WASM runtime) for compilation, and the compilation result is stored in the wasm instance memory. Wasmtime is a small and efficient runtime that runs WebAssembly code outside the Web. It can be used as a command-line utility or as a library embedded in a larger application.
[0214] Through the above process, a wasm instance is provided for calling during the rendering process. The wasm instance is stored in the wasm instance memory. If a new rendering task is received, such as Fig.14 As shown, the rendering task is performed through the following process:
[0215] Step 1410, sending a cache application request.
[0216] Step 1420, return the allocated cache address. After receiving the cache application request sent by the front end, the wasm instance performs cache allocation and returns the allocated cache address (bufAddr) to the request initiator (Decaton). Fig.14As shown, the allocated cache address bufAddr is 0xbeaf. In this process, external functions can be imported through the import module, such as importing specified functions from other wasm, etc. Specifically, during the import process, polling can be performed through the polling function (poll_task()).
[0217] Step 1430, sending the task data of the rendering task to the memory to execute the rendering task. After obtaining the allocated cache address (bufAddr), the request initiator sends the task data of the rendering task (such as the graphics file to be rendered) to the wasm instance memory according to the allocated cache address, so as to call the rendering instance in the wasm instance memory for rendering.
[0218] Step 1440, returning the rendering result. In this process, the rendering result can be read from the memory through module exports and stored in the byte buffer. Through the above process, a vector graphic mark can be generated.
[0219] In this implementation, the WASM solution is adopted to render the graphic logo. The wasm module is a compact binary bytecode format, which can run at a speed close to native performance and has high performance. Moreover, compared with the text format, the binary-encoded text occupies less storage space and has a low storage cost.
[0220] Please continue reading Fig.13 , step 1340, graphic logo recommendation and display.
[0221] In the case that there are at least two generated graphic logos, further graphic logo screening may be performed, or the order in which the generated graphic logos are pushed to the user may be determined.
[0222] In some embodiments of the present application, at least two graphic logos are generated; after step 440, the method further includes: calculating a score for each generated graphic logo; determining a target graphic logo to be displayed according to the score; and displaying the target graphic logo.
[0223] In some embodiments of the present application, each generated graphic mark may be scored on at least two scoring dimensions, and then the score of the graphic mark is calculated by combining the scores on each scoring dimension. In a specific embodiment, the scores on all dimensions may be weighted, and the weighted result may be used as the score of the graphic mark. The scoring dimensions may include at least two of the graphic material, material layout template, text material (which may be content and font), and color.
[0224] In some implementations of the present application, the weight corresponding to each scoring dimension can be calculated based on the score of each sample graphic mark in the sample graphic mark set. The sample graphic mark can be a graphic mark generated according to the method of the present application. For each sample graphic mark, score the sample graphic mark under the set multiple scoring dimensions, obtain the score of each sample graphic mark under each scoring dimension, and obtain the score set of the sample graphic mark set under each scoring dimension. Then, based on the score set under each scoring dimension, calculate the average score under the dimension, and based on the score in the score set under the scoring dimension and the average score, obtain the mean error under the scoring dimension; then calculate the weight under the scoring dimension based on the mean error under the scoring dimension according to the following formula:
[0225]
[0226] Among them, p a represents the weight under the ath scoring dimension; q a It represents the mean error under the ath scoring dimension; μ is a constant that can be set as needed; s is the total number of scoring dimensions.
[0227] According to the above formula 5, it can be determined that the ratio of the weights under different scoring dimensions is equal to the ratio of the reciprocal of the square of the mean error under each scoring dimension, that is:
[0228]
[0229] From the above, we can see that no matter what value μ takes, the proportional relationship of the weights under different scoring dimensions remains unchanged. The size of the weight represents the contribution of the score under the corresponding scoring dimension to the score.
[0230] In some embodiments of the present application, based on the score of each graphic logo, graphic logos with scores higher than a set score threshold can be screened as target graphic logos, and then the target graphic logos can be pushed to the terminal for display. In some embodiments of the present application, the display order of the graphic logos can also be determined based on the ranking of the scores of the graphic logos, and the higher the score, the earlier the graphic logo is displayed.
[0231] In some embodiments of the present application, when there are multiple determined target graphic signs, the target graphic signs may be displayed in a random manner, thereby ensuring the diversity of the displayed target graphic signs while ensuring the quality of the graphic signs.
[0232] In some embodiments of the present application, each target graphic symbol can be stored in association with the corresponding primary key according to the preset primary key as an index, and the target graphic symbol associated with the selected primary key can be displayed according to the primary key selected by the user. The primary key can be a color, a material layout template type (such as left image and right text, upper image and lower text, text centered, etc.), etc., which is not specifically limited here.
[0233] In this embodiment, after generating multiple graphic logos, the graphic logos are screened based on the scores of each graphic logo, and a graphic logo with a higher score can be determined as a target graphic logo, thereby ensuring that the graphic logo presented to the user at the terminal is a graphic logo with a higher overall score, thereby ensuring the quality of the graphic logo presented to the user.
[0234] The following describes an apparatus embodiment of the present application, which can be used to execute the method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned method embodiment of the present application.
[0235] Fig.15 is a block diagram of an apparatus for generating a graphic mark according to an embodiment. Fig.15 As shown, the device for generating a graphic logo includes: an acquisition module 1510, used to acquire an object description text; a semantic understanding module 1520, used to perform semantic understanding on the object description text and obtain a semantic understanding result; a retrieval module 1530, used to perform graphic material retrieval based on the semantic understanding result and obtain candidate graphic materials; a generation module 1540, used to generate a graphic logo based on text materials and candidate graphic materials, wherein the text materials are determined based on the object description text.
[0236] In some embodiments of the present application, the semantic understanding result includes object classification words; the semantic understanding module 1520 includes: a word statistical information acquisition unit, which is used to acquire word frequency statistical information of each object text set, and the word frequency statistical information indicates the word frequency of each word in the object text set in the object text set; wherein, one object text set corresponds to one object classification; a frequency determination unit, which is used to determine the word frequency of the words in the object description text in each object text set according to the word frequency statistical information of each object text set; a probability calculation unit, which is used to calculate the probability that the object description text belongs to the object classification corresponding to each object text set according to the word frequency of the words in the object description text in each object text set; a target object classification determination unit, which is used to determine the target object classification to which the object described by the object description text belongs according to the probability that the object description text belongs to the object classification corresponding to each object text set; and an object classification word determination unit, which is used to determine the object name of the target object classification as the object classification word.
[0237] In some other embodiments of the present application, the semantic understanding result includes an extended word; the semantic understanding module 1520 includes: a combination unit, used to combine at least two characters in the object text to obtain a combined word; an extended word determination unit, used to determine the combined word as an extended word if the combined word is included in the preset vocabulary.
[0238] In some embodiments of the present application, the semantic understanding results include object classification words and extension words, and the candidate graphic materials are derived from at least one of a first candidate graphic material set, a second candidate graphic material set, and a third candidate graphic material set; wherein, the first candidate graphic material set is determined by matching the object classification words with the material classification to which each graphic material in the graphic material library belongs; the second candidate graphic material set is determined by matching the extension words with the material name of each graphic material in the graphic material library; and the third candidate graphic material set is determined by matching the extension words with the material label of each graphic material in the graphic material library.
[0239] In some embodiments of the present application, the candidate graphic materials are derived from at least a first candidate graphic material set; the retrieval module 1530 includes: a target material classification determination unit, used to determine the target material classification corresponding to the object classification term according to the correspondence between the object classification and the material classification; a first candidate graphic material set determination unit, used to determine the graphic materials belonging to the target material classification in the graphic material library as graphic materials in the first candidate graphic material set; a first adding unit, used to select graphic materials from the first candidate graphic material set to obtain candidate graphic materials.
[0240] In some other embodiments of the present application, the candidate graphic material is at least derived from a second candidate graphic material set; the retrieval module 1530 includes: a first similarity calculation unit, used to calculate the first similarity between the material name of each graphic material in the graphic material library and the extended word; a material name screening unit, used to screen the material name according to the first similarity to determine the candidate material name; a second candidate graphic material set determination unit, used to determine the graphic material indicated by the candidate material name as the graphic material in the second candidate graphic material set; a second adding unit, used to select graphic material from the second candidate material set to obtain candidate graphic material.
[0241] In some other embodiments of the present application, the candidate graphic material is at least derived from a third candidate graphic material set; the retrieval module 1530 includes: a second similarity calculation unit, used to calculate the second similarity between the material label corresponding to each graphic material in the graphic material library and the extended word; a material label screening unit, used to screen the material label according to the second similarity to determine the candidate material label; a third candidate graphic material set determination unit, used to determine the graphic material associated with the candidate material label as the graphic material in the third candidate graphic material set; a third adding unit, used to select graphic material from the third candidate material set to obtain the candidate graphic material.
[0242] In some embodiments of the present application, the device for generating a graphic logo also includes: a semantic understanding result display module, which is used to display the semantic understanding result in an editing box; and a correction module, which is used to correct the semantic understanding result according to the editing operation triggered in the editing box.
[0243] In some embodiments of the present application, the generation module 1540 includes: a material layout strategy determination unit, which is used to determine a material layout template corresponding to a material combination according to a preset material layout template set, where the material combination includes text material and at least one candidate graphic material; a layout unit, which is used to combine the candidate graphic material and text material in the material combination according to the material layout template corresponding to the material combination to obtain a graphic logo.
[0244] In some embodiments of the present application, the device for generating a graphic logo also includes: a color layout information acquisition unit, used to acquire color layout information, the color layout information is used to indicate the colors of candidate graphic materials and text materials in the material combination; in this embodiment, the layout unit includes: a combination unit, used to add the candidate graphic materials in the material combination to the graphic container of the corresponding material layout template, and add the text material to the text container of the corresponding material layout template to obtain an initial graphic logo; a rendering unit, used to render the initial graphic logo according to the color layout information to obtain a graphic logo.
[0245] In some embodiments of the present application, the color layout information acquisition unit includes: a color selection option display unit for displaying a color selection option; a color selection unit for determining a color that triggers a selection based on a selection operation triggered by the color selection option; and a color layout information determination unit for determining color layout information associated with the color that triggers the selection.
[0246] In some embodiments of the present application, there are at least two graphic logos; the device for generating graphic logos also includes: a score calculation module, used to calculate the score of each generated graphic logo; a target graphic logo determination module, used to determine the target graphic logo to be displayed according to the score; and a target graphic logo display module, used to display the target graphic logo.
[0247] Fig.16 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0248] It should be noted that Fig.16 The computer system 1600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0249] like Fig.16 As shown, the computer system 1600 includes a central processing unit (CPU) 1601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1602 or the program loaded from the storage part 1608 to the random access memory (RAM) 1603, such as executing the method in the above embodiment. In RAM 1603, various programs and data required for system operation are also stored. CPU 1601, ROM 1602 and RAM 1603 are connected to each other through bus 1604. Input / output (I / O) interface 1605 is also connected to bus 1604.
[0250] The following components are connected to the I / O interface 1605: an input section 1606 including a keyboard, a mouse, etc.; an output section 1607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1608 including a hard disk, etc.; and a communication section 1609 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1609 performs communication processing via a network such as the Internet. A drive 1610 is also connected to the I / O interface 1605 as needed. A removable medium 1611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1610 as needed so that a computer program read therefrom is installed into the storage section 1608 as needed.
[0251] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1609, and / or installed from a removable medium 1611. When the computer program is executed by a central processing unit (CPU) 1601, various functions defined in the system of the present application are executed.
[0252] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0253] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0254] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0255] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries computer-readable instructions, and when the computer-readable storage instructions are executed by a processor, the method in any of the above embodiments is implemented.
[0256] According to one aspect of the present application, an electronic device is also provided, which includes: a processor; a memory, wherein computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the method in any of the above embodiments is implemented.
[0257] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in any of the above embodiments.
[0258] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0259] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0260] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0261] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for generating a graphic mark, characterized in that: include: Get the object description text; Performing semantic understanding on the object description text to obtain a semantic understanding result, wherein the semantic understanding result includes a plurality of object classifiers, an object classifier being used to characterize an object category to which the object described in the object description text belongs under a classification principle; Performing graphic material retrieval according to the semantic understanding result to obtain candidate graphic materials; Generating a graphic mark according to a text material and the candidate graphic material, wherein the text material is determined according to the object description text; The performing semantic understanding on the object description text to obtain a semantic understanding result includes: Obtain word frequency statistics information of each object text set, wherein the word frequency statistics information indicates the word frequency of each word in the object text set in the object text set; wherein one object text set corresponds to one object classification, and one object text set includes object texts belonging to all objects under the corresponding object classification; Determining the word frequency of the words in the object description text in each object text set according to the word frequency statistics information of each object text set; For each of the object text sets, the word frequency of a word in the object description text in the object text set is used as the probability of the word appearing in the object classification corresponding to the object text set, and the probability that the object description text belongs to the object classification corresponding to the object text set is obtained according to the joint probability of the words in the object description text that are in a specified word set in the object text set, wherein the specified word set may be all the words in the object description text or part of the words in the object description text; Determining the target object category to which the object described by the object description text belongs according to the probability that the object description text belongs to the object category corresponding to each object text set; The object name of the target object classification is determined as the object classification word.
2. The method according to claim 1, characterized in that: The semantic understanding result includes the extended word; the semantic understanding of the object description text is performed to obtain the semantic understanding result, including: Combining at least two characters in the object description text to obtain a combined word; If the preset word list includes the combined word, the combined word is determined as the extended word.
3. The method according to claim 1, characterized in that The semantic understanding result includes object classification words and expansion words, and the candidate graphic material is derived from at least one of the first candidate graphic material set, the second candidate graphic material set and the third candidate graphic material set; Wherein, the first candidate graphic material set is determined by matching the object classification words with the material classification to which each graphic material in the graphic material library belongs; The second candidate graphic material set is determined by matching the extended word with the material name of each graphic material in the graphic material library; The third candidate graphic material set is determined by matching the extended word with the material label of each graphic material in the graphic material library.
4. The method according to claim 3, characterized in that: The candidate graphic material is at least from the first candidate graphic material set; The step of performing graphic material retrieval according to the semantic understanding result to obtain candidate graphic materials includes: Determining the target material category corresponding to the object classification word according to the corresponding relationship between the object classification and the material classification; Determine the graphic materials belonging to the target material category in the graphic material library as the graphic materials in the first candidate graphic material set; Selecting a graphic material from the first candidate graphic material set to obtain the candidate graphic material.
5. The method according to claim 3, characterized in that: The candidate graphic material is at least from the second candidate graphic material set; The step of performing graphic material retrieval according to the semantic understanding result to obtain candidate graphic materials includes: Calculating a first similarity between a material name of each graphic material in the graphic material library and the extended word; Screening the material names according to the first similarity to determine candidate material names; Determine the graphic material indicated by the candidate material name as the graphic material in the second candidate graphic material set; Select a graphic material from the second candidate graphic material set to obtain the candidate graphic material.
6. The method according to claim 3, characterized in that: The candidate graphic material is at least derived from the third candidate graphic material set; The step of performing graphic material retrieval according to the semantic understanding result to obtain candidate graphic materials includes: Calculating a second similarity between a material label corresponding to each graphic material in the graphic material library and the extended word; Screening material tags according to the second similarity to determine candidate material tags; Determine the graphic material associated with the candidate material tag as the graphic material in the third candidate graphic material set; A graphic material is selected from the third candidate graphic material set to obtain the candidate graphic material.
7. The method according to claim 1, characterized in that Before performing graphic material retrieval according to the semantic understanding result to obtain candidate graphic materials, the method further includes: Display the semantic understanding result in an edit box; The semantic understanding result is modified according to the editing operation triggered in the editing box.
8. The method according to claim 1, characterized in that: The step of generating a graphic mark according to the text material and the candidate graphic material includes: Determining a material layout template corresponding to a material combination according to a preset material layout template set, wherein the material combination includes a text material and at least one candidate graphic material; The candidate graphic material and the text material in the material combination are combined according to the material layout template corresponding to the material combination to obtain the graphic logo.
9. The method according to claim 8, characterized in that Before combining the candidate graphic material and the text material in the material combination according to the material layout template corresponding to the material combination to obtain the graphic mark, the method further includes: Acquire color layout information, where the color layout information is used to indicate the colors of the candidate graphic material and the text material in the material combination; The step of combining the candidate graphic material and the text material in the material combination according to the material layout template corresponding to the material combination to obtain the graphic mark includes: Adding the candidate graphic material in the material combination to the graphic container of the corresponding material layout template, and adding the text material to the text container of the corresponding material layout template, to obtain an initial graphic mark; The initial graphic mark is rendered according to the color layout information to obtain the graphic mark.
10. The method according to claim 9, characterized in that The obtaining of color layout information comprises: Display color selection options; Determining a color that triggers selection according to a selection operation triggered by the color selection option; The color layout information associated with the color that triggered the selection is determined.
11. The method according to claim 1, characterized in that: There are at least two graphic marks; after generating the graphic mark according to the text material and the candidate graphic material, the method further includes: Calculating a score for each of the generated graphic marks; Determining a target graphic mark to be displayed according to the score; The target graphic symbol is displayed.
12. A device for generating a graphic mark, characterized in that: include: The acquisition module is used to obtain the object description text; A semantic understanding module is used to perform semantic understanding on the object description text to obtain a semantic understanding result, wherein the semantic understanding result includes a plurality of object classifiers, wherein an object classifier is used to characterize the object category to which the object described by the object description text belongs under a classification principle; and, to obtain word frequency statistics information of each object text set, wherein the word frequency statistics information indicates the word frequency of each word in the object text set in the object text set; wherein an object text set corresponds to an object category, and an object text set includes object texts belonging to all objects under the corresponding object category; according to the word frequency statistics information of each object text set, the word frequency of the word in the object description text in each object text set is determined; for each of the object text set, taking the word frequency of a word in the object description text in the object text set as the probability of the word appearing in the object classification corresponding to the object text set, and obtaining the probability that the object description text belongs to the object classification corresponding to the object text set according to the joint probability of the words in the object description text that are in a specified word set in the object text set, wherein the specified word set may be all the words in the object description text or part of the words in the object description text; determining the target object classification to which the object described by the object description text belongs according to the probability that the object description text belongs to the object classification corresponding to each object text set; and determining the object name of the target object classification as the object classification term; A retrieval module, used to retrieve graphic materials according to the semantic understanding results to obtain candidate graphic materials; A generating module is used to generate a graphic mark according to text material and the candidate graphic material, wherein the text material is determined according to the object description text.
13. The device according to claim 12, characterized in that The semantic understanding result includes an extended word; and the semantic understanding module includes: A combining unit, used for combining at least two characters in the object description text to obtain a combined word; The expansion word determination unit is used to determine the combination word as the expansion word if the combination word is included in the preset word list.
14. The device according to claim 12, characterized in that The semantic understanding result includes object classification words and extension words, and the candidate graphic materials are derived from at least one of a first candidate graphic material set, a second candidate graphic material set, and a third candidate graphic material set; wherein the first candidate graphic material set is determined by matching the object classification words with the material classification to which each graphic material in the graphic material library belongs; the second candidate graphic material set is determined by matching the extension words with the material name of each graphic material in the graphic material library; the third candidate graphic material set is determined by matching the extension words with the material label of each graphic material in the graphic material library, and the candidate graphic materials are at least derived from the first candidate graphic material set; the retrieval module includes: a target material classification determining unit, configured to determine the target material classification corresponding to the object classification word according to the corresponding relationship between the object classification and the material classification; A first candidate graphic material set determining unit, configured to determine graphic materials belonging to the target material category in the graphic material library as graphic materials in the first candidate graphic material set; The first adding unit is used to select graphic materials from the first candidate graphic material set to obtain the candidate graphic materials.
15. The device according to claim 14, characterized in that The candidate graphic material is at least derived from the second candidate graphic material set; the retrieval module includes: A first similarity calculation unit, used for calculating a first similarity between a material name of each graphic material in the graphic material library and the extended word; a material name screening unit, configured to screen the material names according to the first similarity to determine candidate material names; A second candidate graphic material set determining unit, configured to determine the graphic material indicated by the candidate material name as a graphic material in the second candidate graphic material set; The second adding unit is used to select graphic materials from the second candidate graphic material set to obtain the candidate graphic materials.
16. The device according to claim 14, characterized in that The candidate graphic material is at least derived from the third candidate graphic material set; the retrieval module comprises: A second similarity calculation unit, used for calculating a second similarity between a material label corresponding to each graphic material in the graphic material library and the extended word; a material label screening unit, configured to screen the material labels according to the second similarity to determine candidate material labels; A third candidate graphic material set determining unit, configured to determine the graphic material associated with the candidate material tag as the graphic material in the third candidate graphic material set; The third adding unit is used to select a graphic material from the third candidate graphic material set to obtain the candidate graphic material.
17. The device according to claim 12, characterized in that The device also includes: A semantic understanding result display module, used to display the semantic understanding result in an edit box; A correction module is used to correct the semantic understanding result according to the editing operation triggered in the editing box.
18. The device according to claim 12, characterized in that The generating module comprises: A material layout strategy determination unit, configured to determine a material layout template corresponding to a material combination according to a preset material layout template set, wherein the material combination includes a text material and at least one candidate graphic material; A layout unit is used to combine the candidate graphic material and the text material in the material combination according to a material layout template corresponding to the material combination to obtain the graphic mark.
19. The device according to claim 18, characterized in that The device also includes: A color layout information acquisition unit, used to acquire color layout information, wherein the color layout information is used to indicate the colors of the candidate graphic material and the text material in the material combination; The layout unit further includes: A combination unit, used to add the candidate graphic material in the material combination to the graphic container of the corresponding material layout template, and to add the text material to the text container of the corresponding material layout template, to obtain an initial graphic mark; A rendering unit is used to render the initial graphic mark according to the color layout information to obtain the graphic mark.
20. The device according to claim 19, characterized in that The color layout information acquisition unit comprises: A color selection option display unit, used to display color selection options; A color selection unit, used to determine a color that triggers selection according to a selection operation triggered by the color selection option; The color layout information determining unit is used to determine the color layout information associated with the triggered selected color.
21. The device according to claim 12, characterized in that The number of the graphic signs is at least two; the device further comprises: A score calculation module, used for calculating the score of each of the generated graphic marks; A target graphic mark determination module, used to determine the target graphic mark to be displayed according to the score; The target graphic mark display module is used to display the target graphic mark.
22. An electronic device, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 11 is implemented.
23. A computer-readable storage medium having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
24. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the method of any one of claims 1-11 is implemented.
Citation Information
Patent Citations
Intelligent LOGO design method and system and storage medium
CN109859291A
Image retrieval method based on semantic tag, related device and storage medium
CN110472090A
Dish label warehousing method and device, computer equipment and storage medium
CN112328746A
