Header and footer design pattern mining method and device, electronic equipment and medium

By constructing a header and footer dataset and using the PrefixSpan algorithm to mine character sequences, the problem of automatically mining interface design patterns in existing technologies is solved, achieving efficient header and footer design pattern mining and improving design efficiency and accuracy.

CN117032641BActive Publication Date: 2026-06-19SICHUAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN UNIV
Filing Date
2023-08-08
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies struggle to automatically identify the most frequent header and footer sequence patterns in mobile interface design, resulting in a time-consuming and labor-intensive design process with a lack of understanding of design patterns and their structural components.

Method used

By constructing a header and footer dataset, associating components with character representation sets, and using the PrefixSpan mining algorithm to mine character sequence sets, the most frequent sequence set is obtained, thereby automatically mining the most frequent header and footer design patterns in interface design.

🎯Benefits of technology

It automatically identifies the most frequently used header and footer design patterns in interface design, improving design efficiency and accuracy, and obtaining more comprehensive header and footer information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117032641B_ABST
    Figure CN117032641B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, electronic device, and medium for mining header and footer design patterns, relating to the field of data processing technology. The method includes: constructing a header and footer dataset based on the Rico dataset, the header and footer dataset comprising multiple headers and footers, each header and footer comprising multiple header and footer components; associating each header and footer component with corresponding character representations to generate a character representation set for the header and footer components; converting each header and footer into a character sequence based on the character representation set, with multiple character sequences forming a character sequence set; and mining the character sequence set using the PrefixSpan mining algorithm to obtain the set of most frequent sequences. This invention can automatically mine the most frequent header and footer design patterns.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and medium for mining header and footer design patterns. Background Technology

[0002] Designing mobile interface headers and footers requires designers to consult numerous design cases and manually select interface patterns and examples based on their design experience and knowledge, which is time-consuming and labor-intensive. With the development of mobile technology and the mining of interface design knowledge, existing technologies have proposed mining the semantics of mobile application interface design, revealing the elements on the screen and their functions, thus understanding the semantic information of the user interface from a certain perspective. However, this cannot be used to reconstruct a scalable template. Existing technologies have also demonstrated how to use the understood semantic encoding for embedding training to support example-based UI search and recommend similar UI screens. However, this recommendation method in existing technologies is based on visual similarity and does not understand the design patterns and structural composition of the interface. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to overcome the shortcomings of the prior art and provide a method, apparatus and medium for mining header and footer design patterns, for realizing the maximum frequent header and footer sequence patterns in the automatic mining interface.

[0004] This invention provides the following technical solution:

[0005] In a first aspect, this invention proposes a method for mining header and footer design patterns, comprising: constructing a header and footer dataset based on the Rico dataset, wherein the header and footer dataset includes multiple headers and footers, and each header and footer includes multiple header and footer components; associating each header and footer component with a corresponding character representation to generate a character representation set for the header and footer components; converting each header and footer into a character sequence based on the character representation set, wherein multiple character sequences form a character sequence set; and mining the character sequence set using the PrefixSpan mining algorithm to obtain the maximum frequent sequence set.

[0006] In one embodiment, the Rico dataset is used as the source of interface data. The Rico dataset includes first view hierarchy information. The step of constructing a header and footer dataset based on the Rico dataset includes: obtaining the position of each header and footer based on the first view hierarchy information; calculating the position of each header and footer to obtain a first boundary value range and a second boundary value range of the header and footer; filtering out interfaces containing the header and footer based on the first boundary value range and the second boundary value range; and extracting multiple headers and footers based on the first boundary value range and the second boundary value range to obtain the header and footer dataset.

[0007] In one embodiment, the character representation set includes a first character representation subset and a second character representation subset. The step of associating each header / footer component with a corresponding representation character to generate the character representation set for the header / footer component includes:

[0008] Extract each of the header and footer components from the header and footer;

[0009] The header and footer components are categorized into Icon-type components and Text-type components;

[0010] Associating the Icon class component with the corresponding character to obtain a first character representation subset, and associating the Text class component with the corresponding character to obtain a second character representation subset.

[0011] In one embodiment, the Icon class component has multiple icons, and associating the Icon class component with the corresponding representation characters to obtain a first character representation subset includes: inputting the Icon class component into a preset icon classifier to obtain the semantic category corresponding to each Icon class component; associating the multiple Icon class components with different semantic categories with different representation characters to obtain a first character representation subset.

[0012] In one embodiment, the step of inputting the Icon class components into a preset icon classifier to obtain the semantic category corresponding to each Icon class component further includes: applying a semantic category dictionary of icons contained in the Google Material icon set to a convolutional neural network model, and training the model using the Rico dataset to obtain the preset icon classifier.

[0013] In one embodiment, characters with support below a threshold are considered infrequent characters. The step of mining the character sequence set using the PrefixSpan mining algorithm to obtain the maximum frequent sequence set includes:

[0014] Find all character categories in the character sequence set to obtain a prefix of length 1;

[0015] The support level of each character is obtained by counting the characters of different categories.

[0016] Delete the infrequent 1 sequence containing the infrequent character;

[0017] Deleting the infrequent characters yields a frequent 1 sequence;

[0018] Find the projection database corresponding to the frequent 1 sequence;

[0019] The projection database is recursively mined until a projection database is empty, resulting in multiple frequent subsequences, which together form the maximum frequent sequence set.

[0020] Secondly, the present invention proposes a device for mining header and footer design patterns, comprising: a dataset construction module, used to construct a header and footer dataset based on the Rico dataset, wherein the header and footer dataset includes multiple headers and footers, and the headers and footers include multiple header and footer components;

[0021] A character representation set construction module is used to associate each of the header and footer components with corresponding representation characters to generate a character representation set for the header and footer components;

[0022] The sequence set generation module is used to convert each of the header and footer components into a character sequence according to the character representation set, and the multiple character sequences form a character sequence set;

[0023] The mining module is used to mine the character sequence set using the PrefixSpan mining algorithm to obtain the set of most frequent sequences.

[0024] In one embodiment, a Rico dataset is used as the source of interface data. The Rico dataset includes first view hierarchy information. The dataset construction module is further configured to obtain the positions of each header and footer based on the first view hierarchy information, and to calculate the first and second boundary value ranges of the header and footer based on the positions of each header and footer. Based on the first and second boundary value ranges, interfaces containing the headers and footers are filtered out. Based on the first and second boundary value ranges, multiple headers and footers are extracted to obtain the header and footer dataset.

[0025] Thirdly, the present invention proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program executes the header and footer design pattern mining method of the present invention when running on the processor.

[0026] Fourthly, the present invention proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the header and footer design pattern mining method described in the present invention.

[0027] The header and footer design pattern mining method disclosed in this invention involves constructing a header and footer dataset based on the Rico dataset. This dataset includes multiple headers and footers, each comprising multiple header and footer components. Each header and footer component is associated with a corresponding character, generating a character representation set for the components. Based on this character representation set, each header and footer is converted into a character sequence, and these sequences are combined to form a character sequence set. The PrefixSpan mining algorithm is then used to mine this character sequence set to obtain the set of most frequent sequences.

[0028] In the stage of constructing the header and footer dataset, this invention determines a header and footer extraction method that can obtain more comprehensive header and footer data. All Icon and Text components involved in the header and footer components are assigned corresponding character representations. Based on the character representation set, the header and footer are represented by character sequences, and the PrefixSpan mining algorithm is used to mine the character sequences to obtain the maximum frequent sequence set. The frequent subsequences contained in this maximum frequent sequence set represent the most frequent header and footer design patterns.

[0029] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0030] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 A flowchart illustrating a method for mining header and footer design patterns proposed in an embodiment of the present invention is shown.

[0032] Figure 2 This illustration shows another flowchart of the header and footer design pattern mining method proposed in an embodiment of the present invention;

[0033] Figure 3 This illustration shows another flowchart of the header and footer design pattern mining method proposed in an embodiment of the present invention;

[0034] Figure 4This illustration shows another flowchart of the header and footer design pattern mining method proposed in an embodiment of the present invention;

[0035] Figure 5 This illustration shows another flowchart of the header and footer design pattern mining method proposed in an embodiment of the present invention;

[0036] Figure 6 A schematic diagram of the structure of the mining device for the header and footer design pattern proposed in an embodiment of the present invention is shown;

[0037] Figure 7 A schematic diagram of the structure of an electronic device proposed in an embodiment of the present invention is shown.

[0038] Explanation of key component symbols:

[0039] 600 - Header and footer design pattern mining device; 601 - Data set construction module; 602 - Character representation set construction module; 603 - Sequence set generation module; 604 - Mining module; 700 - Electronic device; 701 - Transceiver; 702 - Processor; 703 - Memory. Detailed Implementation

[0040] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0041] It should be noted that when an element is said to be "fixed" to another element, it can be directly on the other element or there may be an intervening element. When an element is said to be "connected" to another element, it can be directly connected to the other element or there may be an intervening element. Conversely, when an element is said to be "directly" on another element, there is no intervening element. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0042] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0043] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the template description is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0045] Example 1

[0046] This invention provides a method for mining header and footer design patterns. For details, please refer to [link / reference]. Figure 1 Methods for identifying header and footer design patterns include:

[0047] Step S101: Construct a header and footer dataset based on the Rico dataset. The header and footer dataset includes multiple headers and footers, and the header and footer includes multiple header and footer components.

[0048] In this embodiment, the Rico dataset is used as the source of the interface data. The Rico dataset is a large-scale user interface dataset for mobile applications, containing screenshots of interfaces from Android applications and view hierarchy information for each screenshot. The view hierarchy information for each screenshot is stored in the form of a .json file. The header and footer dataset contains multiple header and footer screenshots and view hierarchy information for each header and footer screenshot. The view hierarchy information for each header and footer screenshot is stored in the form of a .json file.

[0049] Please see Figure 2 Step S101 includes:

[0050] Step S1011: Obtain the positions of the header and footer based on the first view hierarchy information, and calculate the first boundary value range and the second boundary value range of the header and footer by counting the positions of each header and footer.

[0051] The Rico dataset contains multiple screenshots of interfaces from Android applications. Each screenshot contains multiple composite components, and each composite component includes multiple components. The first view hierarchy information is the view hierarchy information of each screenshot, which describes the hierarchical relationship, layout structure, and positional relationship of each composite component and each component within the Rico dataset.

[0052] In this embodiment, the first view hierarchy information is parsed to obtain the header and footer layout and the position information of the components contained in the header and footer; the position of each component and layout can be determined by the "bounds" boundary value information in the first view hierarchy information, that is, the position of the header and footer can be determined; the boundary values ​​of each header and footer in the 47,524 interface screenshots contained in the Rico dataset are statistically analyzed to obtain the first boundary value range [0,84,1440,182-332], that is, the boundary value range of the header, and the second boundary value range [0,2140-2245,1440,2350-2392], that is, the boundary value range of the footer.

[0053] It should be noted that the "bounds" boundary attributes [xmin, ymin, xmax, ymax] are known, and the four values ​​represent [minimum x-coordinate (left boundary), minimum y-coordinate (top boundary), maximum x-coordinate (right boundary), maximum y-coordinate (bottom boundary)], respectively. The left and right boundaries are fixed, but the range of ymax (bottom boundary) of the header and the range of ymin (top boundary) and ymax (bottom boundary) of the footer need to be determined.

[0054] Step S1012: Filter out interfaces containing the header and footer based on the first boundary value range and the second boundary value range.

[0055] Based on the first boundary value range and the second boundary value range, it can be determined whether the interface screenshot contains a header and footer. Interface screenshots that do not contain headers and footers are deleted from the Rico dataset, and data unrelated to headers and footers and some structurally disordered and low-quality JSON files in the Rico dataset are cleaned up.

[0056] Step S1013: Based on the first boundary value range and the second boundary value range, extract multiple headers and footers to obtain the header and footer dataset.

[0057] Based on the first and second boundary value ranges, the headers and footers of each interface screenshot contained in the Rico dataset are extracted separately to obtain the header and footer dataset.

[0058] Step S102: Associate each of the header and footer components with corresponding character representations to generate a character representation set for the header and footer components.

[0059] For each header and footer screenshot in the header and footer dataset, the header and footer components are selected, categorized, and different characters are assigned to different categories of header and footer components. Different characters represent different header and footer components, resulting in the character representation set for header and footer components, as shown in Table 1.

[0060] Table 1 Character Representation Set for Header and Footer Components

[0061] [0] -> Shop

[20] -> Facebook

[40] -> Explore

[60] -> Twitter

[80] -> Chat [1] -> ExpandLess

[21] -> AvRewind

[41] -> Cart

[61] -> More

[81] -> Home [2] -> Help

[22] -> Gift

[42] -> Videocam

[62] -> Flight

[82] -> ArrowForward [3] -> photo

[23] -> Settings

[43] -> Search

[63] -> Visibility

[83] -> Microphone [4] -> Switcher

[24] -> Edit

[44] -> Launch

[64] -> Volume

[84] -> Sliders [5] -> AttachFile

[25] -> SkipNext

[45] -> ArrowBackward

[65] -> Notification

[85] -> Book 6 -> Follow

[26] -> List

[46] -> Favorite

[66] -> AvFoorward

[86] -> Build [7] -> Font

[27] -> Refresh

[47] -> Location

[67] -> LocationCrosshair

[87] -> play 8 -> Layers

[28] -> Avatar

[48] -> Filter

[68] -> Copy

[88] -> Repeat [9] -> Pause

[29] -> NetworkWifi

[49] -> Delete

[69] -> Info

[89] -> Star

[10] -> Group

[30] -> Globe

[50] -> Navigation

[70] -> SkipPrevious

[90] -> Description

[11] -> Menu

[31] -> Bluetooth

[51] -> FileDownload

[71] -> ArrowDownward

[91] -> Wallpaper

[12] -> Flash

[32] -> Close

[52] -> Weather

[72] -> Dashboard

[92] -> ArrowUpward

[13] -> Send

[33] -> Fullscreen

[53] -> Dialpad

[73] -> Minus

[93] -> FilterList

[14] -> Add

[34] -> ThumbsUp

[54] -> Redo

[74] -> History

[94] -> ThumbsDown

[15] ->Swap

[35] ->Label

[55] ->Emoji

[75] ->Compare

[95] ->Time

[16] ->Folder

[36] ->Reply

[56] ->Playlist

[76] ->Lock

[96] ->Stop

[17] ->Save 37]->Email

[57] ->Bookmark

[77] ->NationalFlag

[97] ->ZoomOut

[18] ->ExpandMore 38]->Power

[58] ->Call

[78] ->Share

[98] ->Text

[19] ->DateRange

[39] ->Undo

[59] ->Music

[79] ->Warning

[0062] Please see Figure 3 Step S102 includes:

[0063] Step S1021: Extract each of the header and footer components within each of the headers and footers.

[0064] Iterate through each header and footer screenshot in the header and footer dataset and analyze its corresponding second view hierarchy information to obtain the boundary values ​​of multiple header and footer components contained in each header and footer screenshot. Extract each header and footer component based on the boundary values ​​of the header and footer components. The second view hierarchy information is the view hierarchy information of each header and footer screenshot, which describes the hierarchical relationship, layout structure and positional relationship of each header and footer and each header and footer component in the header and footer dataset.

[0065] Step S1022: Classify the multiple header and footer components to obtain Icon-type components and Text-type components.

[0066] The header and footer dataset contains multiple header and footer screenshots and the corresponding view hierarchy information for each screenshot, i.e., the second view hierarchy information. The view hierarchy information for each header and footer screenshot is stored in a .json file. By observing the "class" attribute information in the second view hierarchy information, the category of each header and footer component in each screenshot is identified. If the "class" attribute name of the header and footer component is: ImageView, ImageButton, GlyphView, AppCompactButton, AppCompactImageButton, ActionMenuItemView, or ActionMenuItemPresenter, then the corresponding header and footer component is an Icon component. If the "class" attribute name of the header and footer component is: TextView, then the corresponding header and footer component is a Text component. The specific correspondence is shown in Table 2.

[0067] Table 2

[0068]

[0069] Step S1023: Associate the Icon class component with the corresponding character to obtain a first character representation subset, and associate the Text class component with the corresponding character to obtain a second character representation subset.

[0070] The Icon class component can be divided into Icon classes with different semantic categories. Different character representations are assigned to each Icon class with different semantic categories to obtain the first character representation set; the same character representation is assigned to the Text class to obtain the second character representation set.

[0071] Please see Figure 4 The step S1023, which associates the Icon class component with the corresponding character to obtain the first character representation subset, includes steps S10231-S10232.

[0072] Step S10231: Input the Icon class components into a preset icon classifier to obtain the semantic category corresponding to each Icon class component.

[0073] The preset icon classifier is used to identify Icon class components with different semantic categories.

[0074] In one embodiment, the step of inputting the Icon class components into a preset icon classifier to obtain the semantic category corresponding to each Icon class component further includes: applying a semantic category dictionary of icons contained in the Google Material icon set to a convolutional neural network model, and training the model using the Rico dataset to obtain the preset icon classifier.

[0075] The Google Material Icon set contains a semantic category dictionary for icons, such as menu, share, back, etc. This semantic category dictionary is used to apply a convolutional neural network (CNN) architecture, which currently performs best on the CIFAR-100 dataset, to achieve a multi-classification task for icons. The classifier is trained on the Rico dataset, resulting in a classifier for 99 icon categories, i.e., the preset icon classifier.

[0076] Step S10232: Associate the Icon class components of multiple different semantic categories with different representation characters to obtain a first character representation subset.

[0077] Associating Icon class components with different semantic categories with different representation characters, and using different characters to represent Icon class components with different semantic categories, we obtain the first character representation subset.

[0078] Step S103: Based on the character representation set, each header and footer is converted into a character sequence, and multiple character sequences are combined into a character sequence set.

[0079] Iterate through each header and footer in the header and footer dataset, extracting the header and footer components. Analyze the hierarchical structure information of the second view to obtain the position information of the corresponding components. Save the position information of the header and footer components associated with the corresponding characters according to the character representation set. Sort the header and footer components in ascending order of their position information to obtain a character sequence, which is then used to represent the header and footer. For example, if a header and footer contains five header and footer components A, B, C, D, and E, and the corresponding characters associated with these components are 3, 11, 46, 99, and 78 respectively, and the positional relationship of the five components is: component B first, component D second, and components A, B, and E in the same group third, then the character sequence should be: [['46'],['99'],['78','3','11']]. All the character sequences corresponding to the header and footer components form a character sequence set.

[0080] Step S104: Use the PrefixSpan mining algorithm to mine the character sequence set to obtain the maximum frequent sequence set.

[0081] The PrefixSpan mining algorithm is used to mine each character sequence in the character sequence set to obtain the maximum frequent sequence set.

[0082] Please see Figure 5 Step S104 includes:

[0083] Step S1041: Find all character categories in the character sequence set to obtain a prefix of length 1.

[0084] For example, for a sequence S = <'46''99'('78''3''11')>, we can obtain the prefixes of sequence S: <'46'>, <'46''99'>, <'46''99'('78')> and <'46''99'('78''3')>, where <'46'> is a prefix of length 1;

[0085] In this embodiment, all characters of different categories are prefixes of length 1. The algorithm for finding all different character categories is shown in Table 3 below:

[0086]

[0087] Step S1042: Count the characters of different categories respectively to obtain the support degree corresponding to each character.

[0088] Support represents the number of times a character appears in a set of character sequences, or the number of times a character sequence appears in a set of character sequences. Based on the prefixes of length 1, all prefixes of length 1 are counted separately, that is, characters of different categories are counted separately to obtain the support of characters of different categories.

[0089] Step S1043: Delete the infrequent 1-sequence containing the infrequent character.

[0090] Characters with support below the support threshold are considered infrequent characters. The method for determining the support threshold is as follows: (1) Target dataset selection: Take a subset of about 5000 entries from the Rico dataset as the target dataset for predicting support; (2) Draw a support distribution map for all elements, observe the distribution, and select a threshold of 5% that will not lead to excessive sparsity; (3) Perform pre-mining on the target dataset to determine the support threshold. With a support of 5% as the center, conduct mining step by step on a trial basis to obtain the data mining results of support and number of patterns. Observe the quality of the mining results, and debug and optimize them to determine the final support threshold.

[0091] In this embodiment, based on the Apriori prior property (all non-empty subsets of a frequent itemset are also frequent), if an element is infrequent, then the sequence containing that element is also infrequent; therefore, all infrequent 1-sequences containing infrequent characters are deleted from the character sequence set. The algorithm for deleting infrequent characters is shown in Table 4 below:

[0092]

[0093] Step S1044: Delete the infrequent characters to obtain the frequent 1 sequence.

[0094] A sequence consisting of prefixes of length 1 whose support is greater than the support threshold is called a frequent 1 sequence.

[0095] Step S1045: Find the projection database corresponding to the frequent 1 sequence.

[0096] In this embodiment, the projection database corresponding to the frequent 1 sequence is composed of subsets of character sequences with different prefixes; the specific steps to obtain the projection database corresponding to the frequent 1 sequence are as follows:

[0097] (1) Find the position of each character in the frequent 1 sequence within each character sequence;

[0098] (2) Observe whether each character is a single item or a co-item with other characters. If a character is a single item, execute (3). If a character is a co-item with other characters, execute (4).

[0099] (3) The projection of a single character is the subsequent sequence of that character. For example, the projection of the character sequence <"33" ("3" "11") "6"> onto the prefix "33" is <("3" "11") "6">;

[0100] (4) The projection of a character sequence into the same item set as other characters is (_) connecting the subsequent sequence of this character. For example, the projection of the character sequence <("33" "3" "11") "6"> onto the prefix "33" is <(_"3" "11") "6">.

[0101] The algorithm for generating a projection database of prefixes contained in frequent 1 sequences is shown in Table 5 below:

[0102]

[0103]

[0104] Step S1046: Recursively mine the projection database until a projection database is empty, and obtain multiple frequent subsequences. The multiple frequent subsequences form the maximum frequent sequence set.

[0105] After obtaining the frequent sequences corresponding to prefixes of length 1, recursively mine the frequent sequences corresponding to prefixes of length 2, and so on, until the projection database of a certain prefix is ​​empty. The longest prefix obtained is the frequent subsequence. The specific process is as follows:

[0106] (1) For a selected prefix, if its projection database is empty, return recursively and continue mining the next selected prefix.

[0107] (2) Count the support of each item in the corresponding projection database. If the support of all items is lower than the support threshold, return recursively.

[0108] (3) The individual items that meet the support requirements are merged with the current prefix to generate a new prefix.

[0109] (4) Find the projection database corresponding to the new prefix and recursively execute step S1046.

[0110] Since the set of maximum frequent sequences may contain some frequent subsequences with incomplete headers, and the design patterns represented by these incomplete frequent subsequences are not potential design patterns, a first reduction process is needed for the set of maximum frequent sequences. For headers, based on prior design knowledge, the navigation items (back, close, expand drawer, etc.) on the left side of the Action bar, App bar, etc., located at the top of the header are the main navigation functions. Therefore, design patterns that do not contain left navigation items are incomplete design patterns, and the frequent subsequences corresponding to these design patterns are removed from the set of maximum frequent subsequences. For example, if a frequent subsequence Sm = <'46''99'('78''3''11')> is mined from a character sequence S = <'99'(_'3''11')>, this pattern does not contain the key character '46' on the left, so this frequent subsequence is removed. Footers do not have this feature and do not require processing.

[0111] Since the design patterns represented by each frequent sequence in the maximum frequent sequence set may contain some redundant patterns, a second reduction process is needed to remove the redundant frequent subsequences from the maximum frequent sequence set.

[0112] Based on the characteristics of the character sequences corresponding to the header and footer components, there will be self-contained character sets. The specific characters in these sets have little impact on the pattern, so they can be merged, i.e., a third reduction process can be considered. For example, the top navigation bar in the header may be composed of: left navigation + middle heading + right navigation bar, for example <'46','99',('78','3','11')>. The specific elements of the right navigation bar sequence have little impact on the pattern, so it can be replaced with a new character sequence <'46','99',('O')>.

[0113] This invention discloses a method for mining header and footer design patterns. It constructs a header and footer dataset based on the Rico dataset, comprising multiple headers and footers, each containing multiple header and footer components. Each header and footer component is associated with a corresponding character, generating a character representation set. Based on this character representation set, each header and footer component is converted into a character sequence, and these sequences are combined into a character sequence set. The PrefixSpan mining algorithm is then used to mine this character sequence set, yielding the most frequent sequence set. This method provides a more comprehensive view of headers and footers. All Icon and Text components involved in the header and footer are assigned corresponding character representations. Based on the character representation set, the header and footer are represented by character sequences, and the PrefixSpan mining algorithm is used to mine these sequences, obtaining the most frequent sequence set. The most frequent subsequences within this set represent the most frequent header and footer design patterns. This automatically mines the most frequent header and footer design patterns in the user interface.

[0114] Example 2

[0115] Furthermore, embodiments of the present invention provide a device for detecting header and footer design patterns; for details, please refer to [link to relevant documentation]. Figure 6 The header and footer design pattern excavation device 600 includes:

[0116] The dataset construction module 601 is used to construct a header and footer dataset based on the Rico dataset. The header and footer dataset includes multiple headers and footers, and the headers and footers include multiple header and footer components.

[0117] The character representation set construction module 602 is used to associate each of the header and footer components with corresponding representation characters to generate the character representation set of the header and footer components;

[0118] The sequence set generation module 603 is used to convert each of the headers and footers into character sequences according to the character representation set, and the multiple character sequences form a character sequence set;

[0119] The mining module 604 is used to mine the character sequence set using the PrefixSpan mining algorithm to obtain the maximum frequent sequence set.

[0120] In one embodiment, a Rico dataset is used as the source of interface data. The Rico dataset includes first view hierarchy information. The dataset construction module is further configured to obtain the positions of each header and footer based on the first view hierarchy information, and to calculate the first and second boundary value ranges of the header and footer based on the positions of each header and footer. Based on the first and second boundary value ranges, interfaces containing the headers and footers are filtered out. Based on the first and second boundary value ranges, multiple headers and footers are extracted to obtain the header and footer dataset.

[0121] This invention discloses a device for mining header and footer design patterns. It constructs a header and footer dataset based on the Rico dataset, comprising multiple headers and footers, each containing multiple header and footer components. Each header and footer component is associated with a corresponding character, generating a character representation set. Based on this character representation set, each header and footer is converted into a character sequence, and these sequences are combined into a character sequence set. The PrefixSpan mining algorithm is then used to mine this character sequence set, yielding the most frequent sequence set. This device can obtain more comprehensive header and footer data. It assigns corresponding character representations to all Icon and Text components involved in the header and footer. Based on the character representation set, the header and footer are represented by character sequences, and the PrefixSpan mining algorithm is used to mine these sequences, yielding the most frequent sequence set. The most frequent subsequences contained in this most frequent sequence set represent the most frequent header and footer design patterns. This achieves automatic mining of the most frequent header and footer design patterns in interface design.

[0122] Example 3

[0123] Furthermore, embodiments of the present invention provide an electronic device, including a memory and a processor. The memory stores a computer program, and the computer program, when run on the processor, executes the header and footer design pattern mining method provided in Embodiment 1.

[0124] Please see Figure 7 The electronic device 700 includes a transceiver 701, a bus interface, and a processor 702. The processor 702 is used to construct a header and footer dataset based on the Rico dataset. The header and footer dataset includes multiple headers and footers, and each header and footer includes multiple header and footer components. It associates each header and footer component with a corresponding character to generate a character representation set for the header and footer components. Based on the character representation set, it converts each header and footer into a character sequence, and the multiple character sequences form a character sequence set. It then uses the PrefixSpan mining algorithm to mine the character sequence set to obtain the maximum frequent sequence set.

[0125] In one embodiment, a Rico dataset is used as the source of interface data. The Rico dataset includes first view hierarchy information. The processor 702 is further configured to obtain the position of each header and footer based on the first view hierarchy information, and to calculate the first boundary value range and second boundary value range of each header and footer based on the position of each header and footer. Based on the first boundary value range and the second boundary value range, the interface containing the header and footer is filtered out. Based on the first boundary value range and the second boundary value range, multiple headers and footers are extracted to obtain the header and footer dataset.

[0126] In one embodiment, the character representation set includes a first character representation subset and a second character representation subset, and the processor 702 is further configured to extract each of the header and footer components within each of the headers and footers;

[0127] The header and footer components are categorized into Icon-type components and Text-type components;

[0128] Associating the Icon class component with the corresponding character to obtain a first character representation subset, and associating the Text class component with the corresponding character to obtain a second character representation subset.

[0129] In one embodiment, the Icon class component has multiple icons, and the processor 702 is further configured to input the Icon class component into a preset icon classifier to obtain the semantic category corresponding to each Icon class component; and associate the multiple Icon class components with different semantic categories with different representation characters to obtain a first character representation subset.

[0130] In one embodiment, the processor 702 is further configured to apply a semantic category dictionary of icons contained in the Google Material icon set to a convolutional neural network model, and train the model using the Rico dataset to obtain the preset icon classifier.

[0131] In one embodiment, characters with support below a threshold are considered infrequent characters, and the processor 702 is further configured to find all character categories in the character sequence set to obtain a prefix of length 1;

[0132] The support level of each character is obtained by counting the characters of different categories.

[0133] Delete the infrequent 1 sequence containing the infrequent character;

[0134] Deleting the infrequent characters yields a frequent 1 sequence;

[0135] Find the projection database corresponding to the frequent 1 sequence;

[0136] The projection database is recursively mined until a projection database is empty, resulting in frequent subsequences, i.e., the maximum frequent sequence set.

[0137] In this embodiment of the invention, the electronic device 700 further includes: a memory 703, in Figure 7 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 702) and memory (memory 703). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 701 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium. The processor 702 is responsible for managing the bus architecture and general processing, and the memory 703 can store data used by the processor 702 during operation.

[0138] The electronic device 700 provided in this application embodiment can execute the header and footer design pattern mining method provided in the above method embodiment 1. To avoid repetition, it will not be described again here.

[0139] Example 4

[0140] Furthermore, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the header and footer design pattern mining method provided in Embodiment 1.

[0141] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0142] The computer-readable storage medium provided in this embodiment can implement the header and footer design pattern mining method provided in Embodiment 1. To avoid repetition, it will not be described again here.

[0143] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0145] In all examples shown and described herein, any specific values ​​should be interpreted as merely exemplary and not as limitations; therefore, other examples of exemplary embodiments may have different values.

[0146] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0147] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.

Claims

1. A method for identifying header and footer design patterns, characterized in that, include: Based on the Rico dataset, a header and footer dataset is constructed, which includes multiple headers and footers, and the header and footer dataset includes multiple header and footer components; Associate each of the header and footer components with a corresponding character to generate a character representation set for the header and footer components; Based on the character representation set, each header and footer is converted into a character sequence, and multiple character sequences are combined into a character sequence set; The PrefixSpan mining algorithm is used to mine the character sequence set to obtain the set of most frequent sequences; The character representation set includes a first character representation subset and a second character representation subset. The step of associating each header / footer component with a corresponding representation character to generate the character representation set for the header / footer component includes: Extract each of the header and footer components from the header and footer; The header and footer components are categorized into Icon-type components and Text-type components; Associating the Icon class component with the corresponding character to obtain a first character representation subset, and associating the Text class component with the corresponding character to obtain a second character representation subset; The Icon class component has multiple icons, characterized in that associating the Icon class component with the corresponding character representation to obtain a first character representation subset includes: Input the Icon class components into a preset icon classifier to obtain the semantic category corresponding to each Icon class component; The Icon class components of the multiple semantic categories are associated with different representation characters to obtain a first character representation subset.

2. The method for mining header and footer design patterns according to claim 1, using the Rico dataset as the source of interface data, wherein the Rico dataset includes first view hierarchy information, is characterized in that... The process of constructing the header and footer dataset based on the Rico dataset includes: The positions of each header and footer are obtained based on the first view hierarchy information, and the first boundary value range and the second boundary value range of each header and footer are obtained by statistically analyzing the positions of each header and footer. The interface containing the header and footer is selected based on the first boundary value range and the second boundary value range; Based on the first boundary value range and the second boundary value range, multiple headers and footers are extracted to obtain the header and footer dataset.

3. The method for mining header and footer design patterns according to claim 1, characterized in that, The step of inputting the Icon class components into a preset icon classifier to obtain the semantic category corresponding to each Icon class component further includes: The semantic category dictionary of icons contained in the Google Material icon set is applied to a convolutional neural network model, and the model is trained using the Rico dataset to obtain the preset icon classifier.

4. The method for mining header and footer design patterns according to claim 1, wherein characters with support below a threshold are considered infrequent characters, characterized in that, The step of mining the character sequence set using the PrefixSpan mining algorithm to obtain the set of most frequent sequences includes: Find all character categories in the character sequence set to obtain a prefix of length 1; The support level of each character is obtained by counting the characters of different categories. Delete the infrequent 1 sequence containing the infrequent character; Deleting the infrequent characters yields a frequent 1 sequence; Find the projection database corresponding to the frequent 1 sequence; The projection database is recursively mined until a projection database is empty, resulting in multiple frequent subsequences, which together form the maximum frequent sequence set.

5. A digging device for a header and footer design pattern, characterized in that, include: A dataset construction module is used to construct a header and footer dataset based on the Rico dataset. The header and footer dataset includes multiple headers and footers, and the headers and footers include multiple header and footer components. A character representation set construction module is used to associate each of the header and footer components with corresponding representation characters to generate a character representation set for the header and footer components; The sequence set generation module is used to convert each of the header and footer components into a character sequence according to the character representation set, and the multiple character sequences form a character sequence set; The mining module is used to mine the character sequence set using the PrefixSpan mining algorithm to obtain the set of most frequent sequences; The character representation set includes a first character representation subset and a second character representation subset. The step of associating each header / footer component with a corresponding representation character to generate the character representation set for the header / footer component includes: Extract each of the header and footer components from the header and footer; The header and footer components are categorized into Icon-type components and Text-type components; Associating the Icon class component with the corresponding character to obtain a first character representation subset, and associating the Text class component with the corresponding character to obtain a second character representation subset; The Icon class component has multiple icons, characterized in that associating the Icon class component with the corresponding character representation to obtain a first character representation subset includes: Input the Icon class components into a preset icon classifier to obtain the semantic category corresponding to each Icon class component; The Icon class components of the multiple semantic categories are associated with different representation characters to obtain a first character representation subset.

6. The header and footer design pattern mining device according to claim 5, wherein the Rico dataset is used as the source of interface data, the Rico dataset including first view hierarchy information, is characterized in that, The dataset construction module is further configured to obtain the positions of each header and footer based on the first view hierarchy information, and to calculate the first boundary value range and the second boundary value range of each header and footer by counting the positions of each header and footer. The interface containing the header and footer is selected based on the first boundary value range and the second boundary value range; Based on the first boundary value range and the second boundary value range, multiple headers and footers are extracted to obtain the header and footer dataset.

7. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed on the processor, performs the method for mining header and footer design patterns according to any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method for mining header and footer design patterns as described in any one of claims 1 to 4.