Method and device for determining UI design template, storage medium and electronic equipment
By using the correlation dictionary of design correlation data to match UI design templates, the problem of low template matching accuracy caused by different meanings of design vocabulary in the prior art is solved, and higher matching accuracy and design requirements are achieved.
Patent Information
- Application Number
- CN202411207881.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
AI Technical Summary
The existing UI design template recall method only focuses on text similarity and fails to effectively consider the different meanings of design vocabulary in different scenarios, resulting in low matching accuracy and increasing designer workload.
Use a correlation dictionary with design association data containing design meaning for template matching, match UI design templates from the design meaning level, match pre-constructed correlation dictionary and user-entered keyword collection in the preset template, and calculate matching scores Value to determine the target template.
Improve the accuracy of template matching, ensure that the matching templates are more in line with design needs, reduce the situation where the same design meaning is expressed by the vocabulary but matches different templates, and meets the design needs of users.
Smart Images

Figure CN119106148A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for determining a UI design template, a storage medium, and an electronic device. Background Art
[0002] Currently, when designers are designing UIs, they usually retrieve the templates they need, and then use the templates to help them quickly generate design content, thereby improving their work efficiency. The current method of recalling templates is usually based on the solution idea of the Embedding model, which converts the template description information entered by the designer into a text format, then labels each template, generates a text description of the template, and then performs vector matching between the user's input text and the template's text description, and outputs the template based on the similarity of the two texts.
[0003] The text description of the template contains a large number of design words, some of which have different meanings in UI design scenarios and ordinary scenarios. The current template recall method only focuses on text similarity, and does not pay attention to the meanings of different words in different scenarios. This results in low accuracy of matched templates, and designers need to spend time on multiple matches, which increases the workload of designers. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for determining a UI design template, a storage medium and an electronic device. The present application matches UI design templates by using a correlation dictionary of design-related data containing design meanings, matches UI design templates for users at the design meaning level, matches more suitable templates for users, and improves the matching accuracy.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] A method for determining a UI design template, comprising:
[0007] Get the design information input by the user;
[0008] Processing the design information to obtain a keyword set, wherein the keyword information includes at least one keyword;
[0009] Using a pre-built relevance dictionary and the keyword set, matching is performed in various preset UI design templates to obtain at least one matching template, wherein the relevance dictionary includes a plurality of design-related data, each of which represents a different design meaning;
[0010] The matching score of each matching template is determined, and the matching template with the highest matching score is determined as the target UI design template.
[0011] In the above method, optionally, the processing of the design information to obtain a keyword set includes:
[0012] extracting each keyword from the design information;
[0013] Record the repeated keywords in the first list;
[0014] Record the non-repeated keywords in the second list;
[0015] The first list and the second list are combined to obtain a keyword set.
[0016] In the above method, optionally, the use of the pre-built relevance dictionary and the keyword set to match various preset UI design templates to obtain at least one matching template includes:
[0017] Acquire a descriptive word set of each UI design template, wherein the descriptive word set includes each descriptive word describing the UI design template;
[0018] Using the relevance dictionary, determining a descriptive word set matching the keyword set in each of the descriptive word sets, and determining the descriptive word set matching the keyword set as a target descriptive word set;
[0019] The UI design template corresponding to the target descriptor set is determined as a matching template.
[0020] In the above method, optionally, the applying the relevance dictionary to determine a descriptive word set matching the keyword set in each of the descriptive word sets includes:
[0021] For each descriptive word in each of the descriptive word sets, the design-related data containing the descriptive word in the relevance dictionary is determined as target data, and when there is a keyword in the keyword set that exists in the target data, the keyword that exists in the target data is determined as an associated word of the descriptive word, and the descriptive word is determined as a matching word;
[0022] For each of the descriptive word sets, when there is at least one matching word in the descriptive word set, it is determined that the descriptive word set matches the keyword set.
[0023] In the above method, optionally, determining the matching score of each matching template includes:
[0024] Determining a weight score of each matching word of each matching template based on an associated word of each matching word of each matching template;
[0025] For each of the matching templates, the weighted scores of each matching value of the matching template are summed to obtain the matching score of the matching template.
[0026] A device for determining a UI design template, comprising:
[0027] An acquisition unit, used for acquiring design information input by a user;
[0028] A processing unit, configured to process the design information to obtain a keyword set, wherein the keyword information includes at least one keyword;
[0029] A matching unit, configured to use a pre-built relevance dictionary and the keyword set to match preset UI design templates to obtain at least one matching template, wherein the relevance dictionary includes a plurality of design-related data, each of which represents a different design meaning;
[0030] The determination unit is used to determine the matching score of each matching template, and determine the matching template with the highest matching score as the target UI design template.
[0031] In the above device, optionally, the processing unit includes:
[0032] An extraction subunit, used to extract each keyword from the design information;
[0033] A first recording subunit, used for recording repeated keywords in a first list;
[0034] A second recording subunit, used for recording non-repeated keywords in a second list;
[0035] The aggregation subunit is used to aggregate the first list and the second list to obtain a keyword set.
[0036] In the above device, optionally, the matching unit includes:
[0037] An acquisition subunit, configured to acquire a descriptive word set of each UI design template, wherein the descriptive word set includes each descriptive word that describes the UI design template;
[0038] A first determination subunit is used to apply the relevance dictionary to determine a description word set matching the keyword set in each of the description word sets, and determine the description word set matching the keyword set as a target description word set;
[0039] The second determining subunit is used to determine the UI design template corresponding to the target description word set as a matching template.
[0040] In the above device, optionally, the first determining subunit includes:
[0041] A first determination module is used for, for each descriptive word in each descriptive word set, determining the design associated data containing the descriptive word in the relevance dictionary as target data, and when there is a keyword in the keyword set that exists in the target data, determining the keyword that exists in the target data as an associated word of the descriptive word, and determining the descriptive word as a matching word;
[0042] The second determination module is configured to determine, for each of the descriptive word sets, that the descriptive word set matches the keyword set when there is at least one matching word in the descriptive word set.
[0043] In the above device, optionally, the determining unit includes:
[0044] A third determining subunit, configured to determine a weight score of each matching word of each matching template based on an associated word of each matching word of each matching template;
[0045] The operation subunit is used to sum the weighted scores of each matching value of each matching template to obtain the matching score of the matching template.
[0046] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the method for determining a UI design template as described above.
[0047] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the method for determining a UI design template as described above.
[0048] Compared with the prior art, this application has the following advantages:
[0049] The present application provides a method and device for determining a UI design template, a storage medium, and an electronic device, including: obtaining design information input by a user; processing the design information to obtain a keyword set, wherein the keyword information includes at least one keyword; using a pre-constructed relevance dictionary and a keyword set to match among various preset UI design templates to obtain at least one matching template, wherein the relevance dictionary includes multiple design-related data, each design-related data represents a different design meaning; determining a matching score for each matching template, and determining the matching template with the highest matching score as the target UI design template. In the process of matching UI design templates, the present application uses a relevance dictionary containing design-related data with different design meanings to perform template matching, so that in the process of using keywords to match templates, templates are matched at the design meaning level, thereby effectively avoiding the situation where different vocabularies express the same design meaning, but are matched to different templates due to different vocabularies. Templates matched at the design meaning level can better meet the user's design needs and improve the matching accuracy of templates. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0051] Figure 1 A flowchart of a method for determining a UI design template provided in an embodiment of the present application;
[0052] Figure 2 A flowchart of processing design information to obtain a keyword set provided in an embodiment of the present application;
[0053] Figure 3 This is an example of a design image of a social APP homepage provided in an embodiment of the present application;
[0054] Figure 4 A method flow chart for using a pre-built relevance dictionary and a keyword set to match preset UI design templates to obtain at least one matching template provided in an embodiment of the present application;
[0055] Figure 5 A schematic diagram of the structure of a device for determining a UI design template provided in an embodiment of the present application;
[0056] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0059] In the process of UI design, there is a method of generating UI design content based on template ideas. The core idea is to search and recall the information provided by the user (design drawings or input text descriptions) in the template library to find matching content, helping users to quickly generate design content to improve the work efficiency of designers.
[0060] There are currently two implementation ideas. One is based on the solution of Embedding, which converts the user's input information into text format, then labels each template, generates a text description, and matches the two texts by vector to find similar content, that is, the template that meets the user's expectations. This method is not limited by the amount of data and the length of the text, but because the existing Embedding models are general models and there are no proprietary training models for the vertical field of design, the matching effect is poor within the scope of design professional terms, which is far below theoretical expectations.
[0061] For example, in the Embedding model, the vector matching scores of "picture and text" and "picture and text card" may be very low, and users cannot find "picture and text card" when searching for "picture and text", which does not meet expectations. However, the vector matching scores of "product card" and "travel card" are very high, and users may find "travel card" when searching for "product card", which still does not meet expectations. The matching process is completely black box, and the matching results are completely dependent on the Embedding model used, and the overall effect is very poor.
[0062] Embedding is also better at handling chat conversations or knowledge base question-and-answer types of questions, which do not require the accuracy of the returned content. In the scenario of template-generated UI content, accurate answers are required based on limited input content, and Embedding is not good at doing this.
[0063] Another implementation idea is to use a large language model (LLM) to directly solve the problem, and give the user's input information and template library information directly to the LLM, let it make a choice, and return the answer in the specified format. Although in theory compared with the Embedding solution, LLM can better understand semantics and user needs, and the matching accuracy is also higher, but LLM naturally has an upper limit on input tokens and a limit on the amount of input information, which means that the number of templates is limited to a very small number (about a few hundred). The idea of templating to generate UI content is to solve the user's demand for generating design content through a large number of templates. A few hundred templates will not achieve the expected effect (in theory, at least thousands or tens of thousands may be required to meet user needs).
[0064] Therefore, currently neither Embedding nor LLM can solve the problem of template generation simply and effectively.
[0065] In order to solve the above-mentioned problems, the present application provides a solution for determining UI design templates. When determining UI design templates, the solution uses a relevance dictionary containing multiple design-related data representing different design meanings for matching, thereby providing users with UI design templates that better meet design requirements. The solution uses a relevance dictionary of design-related data with different design meanings for matching, thereby reducing the impact of text having different meanings in different situations, focusing on the semantics of text during design, improving the matching accuracy of templates, and matching templates that better meet design requirements for users.
[0066] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.
[0067] Reference Figure 1 , which is a flow chart of a method for determining a UI design template provided in an embodiment of the present application, wherein the specific process is as S101-S103, and the relevant description is as follows:
[0068] S101. Obtain design information input by a user.
[0069] The user can input design information according to actual needs. The design information is used to describe the design direction of the UI page that the user wants to design.
[0070] Preferably, the design information includes design description text and / or design pictures. In other words, the design information may be design description text and / or design pictures.
[0071] The design description text can be a text description of the design content of the UI page that the user wants to design, and the design picture can be a half-designed picture of the user or an example picture of the UI page that the user wants to design.
[0072] S102: Process the design information to obtain a keyword set, where the keyword information includes at least one keyword.
[0073] Keywords in the design information are extracted, and then the extracted keywords are aggregated into a keyword set.
[0074] When extracting keywords from design information, different contents use different extraction methods. Specifically, there are different keyword extraction methods for design description text and design images.
[0075] Reference Figure 2 , which is a flowchart of processing design information to obtain a keyword set provided by an embodiment of the present application, the specific process is as S201-S204, and the relevant description is as follows:
[0076] S201. Extract keywords from design information.
[0077] For the design image in the design information, a preset image recognition model is used to recognize the design image so as to obtain description information of the design image. Preferably, the image recognition model is a model that recognizes the image content and converts it into corresponding description text.
[0078] For example, the image recognition model can be an LLM model, the design image is input into the LLM model, the multi-modal capability of the LLM model is used to recognize the image, the description information of the design image is obtained, and then each keyword is extracted from the description information, preferably, each extracted keyword can be aggregated into a first keyword group. It should be noted that there may be repeated keywords in the first keyword group.
[0079] For example, refer to Figure 3 , which is an example of a design picture of the homepage of a social APP provided in the embodiment of the present application. After using the multimodal capability of LLM for recognition, a description of the design picture is obtained, as follows:
[0080] {
[0081] "design_description":"This is the homepage of a social app. The user posted a travel-related graphic and text information. The design includes a top navigation bar, graphic and text information cards, and a bottom navigation bar."
[0082] }
[0083] Then extract keywords from the description information, for example:
[0084] {
[0085] "design_keywords":["social","travel","picture card","top navigation bar","bottom navigation bar"]
[0086] }
[0087] The extracted keywords are gathered into a first keyword group: ["social", "travel", "picture and text card", "top navigation bar", "bottom navigation bar"]. Preferably, there may be repeated keywords in the first keyword group.
[0088] For the design description text in the design information, the design description text is semantically decomposed to extract various keywords, and then the extracted keywords are aggregated into a second keyword group. Preferably, the design description text can be processed using the text processing capability of the LLM model. Preferably, there may be repeated keywords in the second keyword group.
[0089] For example, a user enters a design description: I am designing a social app. I need to make a list of multiple picture and text cards. Please help me design several different layouts. Using LLM's text processing capabilities, the user input is summarized into a more refined description:
[0090] {
[0091] "prompt_description":"Social App's picture and text card list, with various layout methods."
[0092] }
[0093] After breaking down the refined description into several keywords:
[0094] {
[0095] "prompt_keywords":["social","picture card","list","layout"]
[0096] }
[0097] Thus, we can get the second keyword group: ["social", "picture and text card", "list", "layout"].
[0098] It should be noted that when the design information includes design description text and design pictures, two keyword groups will be obtained; when the design information includes only design description text or design pictures, one keyword group will be obtained.
[0099] S202: Record repeated keywords in a first list.
[0100] S203: Record the non-repeated keywords in the second list.
[0101] When the design information only contains design description text or design pictures, and there is only one keyword group, the keywords that appear repeatedly in the keyword group are recorded in the first list. Assuming the keyword group is: ["social", "picture and text card", "typesetting", "social"], the repeated keyword is "social", then the keyword "social" is recorded in the first list; the remaining non-repeated keywords "picture and text card" and "typesetting" are all recorded in the second list.
[0102] When the design information includes a design description file and a design picture, there are two keyword groups. For example, the first keyword group is: ["social", "travel", "picture and text card", "top navigation bar", "bottom navigation bar"]; the second keyword group is: ["social", "picture and text card", "list", "layout"], and the keywords that appear repeatedly are: "social", "picture and text card"; the keywords that do not appear repeatedly are: "travel", "top navigation bar", "bottom navigation bar", "list", "layout"; thus, the first list and the second list can be obtained.
[0103] S204: Aggregate the first list and the second list to obtain a keyword set.
[0104] The keyword set includes all the keywords in the first list and the second list.
[0105] Exemplarily, the keyword set can be expressed as:
[0106] {
[0107] "intersection":["social","picture and text card"],
[0108] "difference":["Travel","Top Navigation Bar","Bottom Navigation Bar","List","Layout"]
[0109] }
[0110] It should be noted that "intersection" represents a list of keywords that appear repeatedly, and "difference" represents a list of keywords that do not appear repeatedly. Preferably, the keywords that appear repeatedly can indicate from the side that the user is more inclined to apply the design template containing the keyword.
[0111] Steps S202-S203 can be understood as deduplication of each keyword, so as to obtain non-repeated keywords in the subsequent matching process, reduce repeated matching in the subsequent matching process, avoid wasting server processing resources and increasing server work pressure. In the process of deduplication of each keyword, repeated keywords and non-repeated keywords are distinguished, so as to facilitate the subsequent assignment of matching weights to each keyword after deduplication, and facilitate the subsequent use of keyword sets to match appropriate UI design templates.
[0112] S103, using a pre-built correlation dictionary and a keyword set to match preset UI design templates to obtain at least one matching template, wherein the correlation dictionary contains multiple design-related data, each of which represents a different design meaning.
[0113] It should be noted that the content in the relevance dictionary can be continuously updated, in other words, the relevance dictionary is dynamically maintained. The relevance dictionary contains multiple design-related data, each of which represents a different design meaning, and each design key data contains multiple words. The words in the same design keyword data all represent the same design meaning.
[0114] A relevance dictionary is constructed using relevant words that are often involved in the design field. Preferably, the relevance dictionary can be represented by a data table, in which different rows represent different design meanings, and each row contains at least one word.
[0115] Preferably, in the correlation dictionary, each row represents a group of synonymous words, which can include multiple languages. When any word is identified, it can be associated with other words in the same row. Words in different rows represent different words. Even if the meanings and spellings are similar, they are different words in the design field. Words in different rows represent different design meanings and need to be treated differently. Furthermore, synonymous words within a row + different words across rows together constitute a correlation dictionary. The data content in the dictionary is dynamically updated and can be maintained at any time as needed, such as addition, deletion, and modification.
[0116] Refer to Table 1, which is an example of a data table that constitutes a relevance dictionary.
[0117] home front page horizontal Horizontal layout Horizontal Arrangement Horizontal Icon icon image images picture image
[0118] Table 1
[0119] As shown in Table 1, each row represents a different design meaning, and different columns in the same row represent different written expressions with the same design meaning.
[0120] Reference Figure 4 , which is a flowchart of a method for using a pre-built correlation dictionary and a keyword set provided in an embodiment of the present application to match various preset UI design templates to obtain at least one matching template, the specific process is as S301-S303, and the related description is as follows:
[0121] S301: Obtain a descriptive word set for each UI design template, where the descriptive word set includes various descriptive words that describe the UI design template.
[0122] It should be noted that each UI design template has a text description and some keyword descriptions. By processing the text description and keyword description of each UI design template, a descriptive word set for each UI design template is obtained. The descriptive word set includes various descriptive words that describe the UI design template. The descriptive words here can be understood as vocabulary that describes the UI design template.
[0123] Preferably, there are no repeated descriptive words in the descriptive word set, in other words, the descriptive word set has been deduplicated. Deduplication can avoid subsequent repeated processing of repeated descriptive words, thereby reducing processing pressure.
[0124] S302: Apply the relevance dictionary to determine, from among the various descriptive word sets, a descriptive word set that matches the keyword set, and determine the descriptive word set that matches the keyword set as a target descriptive word set.
[0125] For each descriptive word in each descriptive word set, the design associated data containing the descriptive word in the relevance dictionary is determined as the target data, and when there is a keyword in the keyword set that exists in the target data, the keyword that exists in the target data is determined as an associated word of the descriptive word, and the descriptive word is determined as a matching word;
[0126] For each descriptive word set, when there is at least one matching word in the descriptive word set, it is determined that the descriptive word set matches the keyword set.
[0127] Furthermore, when determining a set of descriptive words that matches a keyword set, the design associated data of each descriptive word in the relevance dictionary can be determined, and the design associated data of each keyword in the relevance dictionary can be determined; when the design associated data contains both descriptive words and keywords, the descriptive word set containing the descriptive word is matched with the keyword set.
[0128] Exemplarily, the correlation dictionary shown in Table 1 is used as an example. Suppose there are three UI design templates, namely UI Design Template 1, UI Design Template 2 and UI Design Template 3, among which the description word set 1 of UI Design Template 1 includes the description words [home, icon, picture, input box, positioning], the description word set 2 of UI Design Template 2 includes the description words [home, icon, picture, live broadcast, login], and the description word set 3 of UI Design Template 3 includes the description words [news, horizontal arrangement, published content, notification].
[0129] Assume that the keywords in the keyword set are [homepage, icon, attractions, evaluation, ranking].
[0130] According to the data table of the correlation dictionary shown in Table 1, it can be seen that the home of the description word set 1 and the home page in the keyword set are in the same row, and the icon of the description word set 1 and the icon in the keyword set are in the same row. Therefore, the description word set 1 matches the keyword set. Similarly, the description word set 2 matches the keyword set. Each description word in the description word set 3 and each keyword in the keyword set are in different rows. Therefore, the description word set 3 does not match the keyword set. At this time, both the description word set 2 and the description word set 1 can be determined as the target description word set.
[0131] S303: Determine the UI design template corresponding to the target description word set as a matching template.
[0132] Continuing with the description of S302 , UI design template 2 corresponding to description word set 2 and UI design template 1 corresponding to description word set 1 are both matching templates.
[0133] A matching template is determined by using a relevance dictionary. Preferably, in the process of using the relevance dictionary to determine the matching template, words with the same design meaning but different expressions can be matched to the same design-related data in the relevance dictionary, thereby determining that the UI design template matches the keyword set, avoiding the problem of mismatch due to having the same design meaning but different expressions, thereby improving the matching accuracy of the template.
[0134] Furthermore, the relevance dictionary includes multilingual vocabulary, so that the solution provided by the present application can be applied to various language scenarios, and is convenient for users who use different languages. Specifically, in the relevance dictionary, "home" and "homepage" are in the same design-related data. The word home originally means "home, house", and the conventional translation function cannot associate it with the "homepage", but in the design field, the homepage is often called "home" (the full name is "home page", but it is often abbreviated as "home"). By attributing home and homepage to the same design-related data, the two are associated.
[0135] In the design process, similar words may represent different design meanings. In order to distinguish them, in the relevance dictionary, the words are classified into different design-related data according to the design meanings they represent, thus solving the problem that two words are very similar but refer to different objects (i.e., design meanings). For example, "Tab" refers to a switchable tab, while "Tabbar" refers to the navigation bar at the bottom of the page. Figure 3 As shown, Tab and Tab bar are very similar in meaning, and even contain the same words, but refer to completely different objects. In this case, the two are different words. In the traditional template matching method, it is impossible to distinguish the different objects referred to by the two, and one can only rely on the designer's proprietary design industry experience. However, in the solution provided in this application, Tab and Tab bar are maintained as two pieces of data in the correlation dictionary, even if they belong to different design-related data, thereby solving the problem of similar words referring to different objects.
[0136] In the design process, there are two completely dissimilar words, but they refer to the same object (i.e., design meaning), such as "Tag" and "Chip". In terms of meaning, Tag means labels and signs, while Chip means French fries. They are two completely unrelated words, but in the design field, they both refer to label components. The only difference is that Chip usually refers to clickable labels, while Tag can refer to various types of labels. In the daily communication of designers, there is no special distinction between the two. In the traditional template matching method, there is no way to associate these two words so that the two words refer to the same object, which will reduce the accuracy of template matching. The present application associates such words by maintaining words that refer to the same object but are completely dissimilar in the same design-related data in the correlation dictionary, thereby solving the problem of dissimilar words referring to the same object.
[0137] During the design process, there are spelling mistakes, such as "登录" (login) and "登陆" (land). In the design field, the correct term is "登录" (login), while "登陆" (land) means to come ashore from the water, such as in a "beach landing battle". However, in daily usage, many people incorrectly use "登陆" (land) to mean "登录账号" (login to an account). In this application, by using a relevance dictionary, these two terms are maintained in the same design-related data, thus associating such words and solving the problem of reduced template matching accuracy due to input errors.
[0138] Therefore, when using the relevance dictionary to match templates in this application, it can break through the barriers of different languages, enabling users of different languages to apply this application, expanding the application scope of this application, and can gather words in different languages in the relevance dictionary to improve the accuracy of template matching. In the relevance dictionary, similar words and words representing different design meanings are maintained in different design-related data respectively, and completely dissimilar words representing the same design meaning are maintained in the same design-related data. For words that are prone to spelling mistakes, the correct word and the misspelled word are maintained in the same design-related vocabulary. This enables the use of the relevance dictionary to match templates to solve the problem that the input word cannot match the correct template, and to solve the situation where similar words represent different design meanings, dissimilar words represent the same design meaning, but the currently used matching method cannot recognize the design meaning expressed by the word, resulting in the matching template not meeting the user's needs, thus effectively improving the accuracy of template matching.
[0139] S104. Determine the matching score of each matching template, and determine the matching template with the highest matching score as the target UI design template.
[0140] When determining the matching score of each matching template, based on the associated words of each matching word of each matching template, determine the weight score of each matching word of each matching template. For each matching template, perform a summation operation on the weight scores of each matching value of the matching template to obtain the matching score of the matching template.
[0141] It should be noted that for each matching template, determine the associated words of each matching word, and use the matching weight of the associated words of the matching word as the weight score of the matching word. It should be noted that the matching weights of different associated words are different. The associated words here are the keywords in the keyword set described above. The matching weights of different keywords are different and can be configured according to actual needs. Exemplarily, for keywords that appear repeatedly, the matching weight can be set according to the frequency of their appearance. For keywords that do not appear repeatedly, the matching weight can be set to the default value. Figure 2 In the above text, the matching weights of different keywords are different and can be configured according to actual needs. Exemplarily, for keywords that appear repeatedly, the matching weight can be set according to the frequency of their appearance. For keywords that do not appear repeatedly, the matching weight can be set to the default value.
[0142] Preferably, each descriptive word of each UI design template may be directly assigned a weight score, so that after obtaining each matching template, the matching score of each matching template may be obtained according to the weight score of each matching word of each matching template.
[0143] Preferably, after calculating the matching scores of each matching template, the matching templates are sorted in descending order according to the matching scores, and then the template identifiers of each matching template, such as template IDs, can be output one by one according to the sorting. Preferably, the matching template with the highest matching score can be determined as the target UI design template. At this point, the matching process based on the correlation dictionary is completed.
[0144] In the method provided in the embodiment of the present application, the design information input by the user is obtained; the design information is processed to obtain a keyword set, and the keyword information contains at least one keyword; a pre-constructed relevance dictionary and a keyword set are used to match in various preset UI design templates to obtain at least one matching template, and the relevance dictionary contains multiple design-related data, each design-related data represents a different design meaning; the matching score of each matching template is determined, and the matching template with the highest matching score is determined as the target UI design template. In the process of matching UI design templates, the present application uses a relevance dictionary containing design-related data with different design meanings to perform template matching, so that in the process of using keywords to match templates, templates are matched at the design meaning level, thereby effectively avoiding the situation where different vocabularies express the same design meaning, but match different templates due to different vocabularies. The template matched at the design meaning level can better meet the user's design needs and improve the matching accuracy of the template.
[0145] In the solution provided by this application, the relevance dictionary is completely based on the professional knowledge and industry experience of designers, and is more in line with the work needs of designers than any traditional information source; the template is matched from the design meaning of the keywords, so that the matching idea has a higher certainty, the matching accuracy is improved, and the implementation method using embedding and LLM is full of uncertainty. In addition, it can effectively solve many problems that traditional embedding and LLM solutions cannot solve: for example, the problem of not being applicable to multi-language scene matching; the problem of not being able to recognize words with similar meanings but different referents; the problem of not being able to recognize words with different meanings but the same referent; the problem of being unable to recognize due to spelling errors when users enter content; by using a relevance dictionary, the above problems can be effectively solved and the matching accuracy can be improved.
[0146] In the solution provided by the present application, the matching effect is improved by establishing a relevance dictionary, and the extracted keywords are deduplicated to improve the keyword matching accuracy, and matching weights are added to the keywords, and the final UI design template is determined according to the number of keywords matched by the UI design template to improve the matching accuracy of the template. The present application is not a simple keyword search and matching logic, but processes different types of input data, and then performs relevance matching based on a highly professional proprietary domain dictionary, and then adjusts the weight and ranking of the matching results through some technical solutions, thereby greatly improving the retrieval recall effect, so that the recalled design templates are more in line with the user's design needs.
[0147] To support Figure 1 As a specific implementation of the method shown, the present application also provides a device for determining a UI design template, which can be set in various computers, or in a server or processor.
[0148] Reference Figure 5 , which is a structural diagram of a device for determining a UI design template provided in an embodiment of the present application, and the specific description is as follows.
[0149] An acquisition unit 501 is used to acquire design information input by a user;
[0150] A processing unit 502 is used to process the design information to obtain a keyword set, wherein the keyword information includes at least one keyword;
[0151] A matching unit 503 is used to use a pre-built correlation dictionary and the keyword set to match various preset UI design templates to obtain at least one matching template, wherein the correlation dictionary contains multiple design-related data, each of which represents a different design meaning;
[0152] The determination unit 504 is used to determine the matching score of each matching template, and determine the matching template with the highest matching score as the target UI design template.
[0153] In the device provided in the embodiment of the present application, the design information input by the user is obtained; the design information is processed to obtain a keyword set, and the keyword information contains at least one keyword; a pre-constructed relevance dictionary and a keyword set are used to match in various preset UI design templates to obtain at least one matching template, and the relevance dictionary contains multiple design-related data, each design-related data represents a different design meaning; the matching score of each matching template is determined, and the matching template with the highest matching score is determined as the target UI design template. In the process of matching UI design templates, the present application uses a relevance dictionary containing design-related data with different design meanings to perform template matching, so that in the process of using keywords to match templates, templates are matched at the design meaning level, thereby effectively avoiding the situation where different vocabularies express the same design meaning, but match different templates due to different vocabularies. The template matched at the design meaning level can better meet the user's design needs and improve the matching accuracy of the template.
[0154] In another embodiment provided by the present application, the processing unit of the device includes:
[0155] An extraction subunit, used to extract each keyword from the design information;
[0156] A first recording subunit, used for recording repeated keywords in a first list;
[0157] A second recording subunit, used for recording non-repeated keywords in a second list;
[0158] The aggregation subunit is used to aggregate the first list and the second list to obtain a keyword set.
[0159] In another embodiment provided by the present application, the matching unit of the device includes:
[0160] An acquisition subunit, configured to acquire a descriptive word set of each UI design template, wherein the descriptive word set includes each descriptive word that describes the UI design template;
[0161] A first determination subunit is used to apply the relevance dictionary to determine a description word set matching the keyword set in each of the description word sets, and determine the description word set matching the keyword set as a target description word set;
[0162] The second determining subunit is used to determine the UI design template corresponding to the target description word set as a matching template.
[0163] In another embodiment provided by the present application, the first determining subunit of the device includes:
[0164] A first determination module is used for, for each descriptive word in each descriptive word set, determining the design associated data containing the descriptive word in the relevance dictionary as target data, and when there is a keyword in the keyword set that exists in the target data, determining the keyword that exists in the target data as an associated word of the descriptive word, and determining the descriptive word as a matching word;
[0165] The second determination module is configured to determine, for each of the descriptive word sets, that the descriptive word set matches the keyword set when there is at least one matching word in the descriptive word set.
[0166] In another embodiment provided by the present application, the determining unit of the device includes:
[0167] A third determining subunit, configured to determine a weight score of each matching word of each matching template based on an associated word of each matching word of each matching template;
[0168] The operation subunit is used to sum the weighted scores of each matching value of each matching template to obtain the matching score of the matching template.
[0169] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned method for determining the UI design template.
[0170] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 6 As shown, it specifically includes a memory 601 and one or more instructions 602, wherein the one or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to execute the one or more instructions 602 to execute the above-mentioned method for determining the UI design template.
[0171] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0172] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.
[0173] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0174] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0175] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for determining a UI design template, characterized in that: include: Get the design information input by the user; Processing the design information to obtain a keyword set, wherein the keyword information includes at least one keyword; Using a pre-built relevance dictionary and the keyword set, matching is performed in various preset UI design templates to obtain at least one matching template, wherein the relevance dictionary includes a plurality of design-related data, each of which represents a different design meaning; The matching score of each matching template is determined, and the matching template with the highest matching score is determined as the target UI design template.
2. The method according to claim 1, characterized in that The step of processing the design information to obtain a keyword set includes: extracting each keyword from the design information; Record the repeated keywords in the first list; Record the non-repeated keywords in the second list; The first list and the second list are combined to obtain a keyword set.
3. The method according to claim 1, characterized in that The use of the pre-built correlation dictionary and the keyword set to match various preset UI design templates to obtain at least one matching template includes: Acquire a descriptive word set of each UI design template, wherein the descriptive word set includes each descriptive word describing the UI design template; Using the relevance dictionary, determining a descriptive word set matching the keyword set in each of the descriptive word sets, and determining the descriptive word set matching the keyword set as a target descriptive word set; The UI design template corresponding to the target descriptor set is determined as a matching template.
4. The method according to claim 3, characterized in that The applying the relevance dictionary to determine a description word set matching the keyword set in each of the description word sets includes: For each descriptive word in each of the descriptive word sets, the design-related data containing the descriptive word in the relevance dictionary is determined as target data, and when there is a keyword in the keyword set that exists in the target data, the keyword that exists in the target data is determined as an associated word of the descriptive word, and the descriptive word is determined as a matching word; For each of the descriptive word sets, when there is at least one matching word in the descriptive word set, it is determined that the descriptive word set matches the keyword set.
5. The method according to claim 3, characterized in that: The determining of the matching score of each matching template comprises: Determining a weight score of each matching word of each matching template based on an associated word of each matching word of each matching template; For each of the matching templates, the weighted scores of each matching value of the matching template are summed to obtain the matching score of the matching template.
6. A device for determining a UI design template, characterized in that: include: An acquisition unit, used for acquiring design information input by a user; A processing unit, configured to process the design information to obtain a keyword set, wherein the keyword information includes at least one keyword; A matching unit, configured to use a pre-built relevance dictionary and the keyword set to match preset UI design templates to obtain at least one matching template, wherein the relevance dictionary includes a plurality of design-related data, each of which represents a different design meaning; The determination unit is used to determine the matching score of each matching template, and determine the matching template with the highest matching score as the target UI design template.
7. The device according to claim 6, characterized in that The processing unit comprises: An extraction subunit, used to extract each keyword from the design information; A first recording subunit, used for recording repeated keywords in a first list; A second recording subunit, used for recording non-repeated keywords in a second list; The aggregation subunit is used to aggregate the first list and the second list to obtain a keyword set.
8. The device according to claim 6, characterized in that The matching unit comprises: An acquisition subunit, configured to acquire a descriptive word set of each UI design template, wherein the descriptive word set includes each descriptive word that describes the UI design template; A first determination subunit is used to apply the relevance dictionary to determine a description word set matching the keyword set in each of the description word sets, and determine the description word set matching the keyword set as a target description word set; The second determining subunit is used to determine the UI design template corresponding to the target description word set as a matching template.
9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the method for determining the UI design template according to any one of claims 1 to 5.
10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the method for determining the UI design template as described in any one of claims 1-5.
