Method, system and storage medium for automatically generating interface layout
By obtaining the interface resolution and style configuration parameters, combined with user characteristics and scene attributes, the layout of the vehicle user interface is automatically generated, which solves the problem in the existing technology that the fixed interface layout cannot meet personalized needs, and achieves flexible and changeable intelligence. experience.
Patent Information
- Application Number
- CN202410750395.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-12
AI Technical Summary
The user interface layout of existing vehicle cockpit products is fixed and cannot fully meet the personalized needs of users. Especially after the level of active intelligence increases, users' personalized requirements for interfaces increase but existing technology cannot meet them.
By obtaining the interface resolution parameters and style configuration parameters, calculate the basic grid layout parameters, and combine the user characteristics and scene attributes to assign the interface proportion, automatically generate the display interface, adjust the layout coordinates of the application interface elements, and realize the automatic generation and creation of the interface layout. Personalize.
It achieves a flexible interface that meets changes in user preferences and usage scenarios, provides an intelligent experience, meets users' personalized needs, and adapts to existing vehicle systems without replacing the display system.
Smart Images

Figure CN118331675B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of human-computer interaction interface, and in particular to an automatic generation method, system and storage medium for interface layout. Background Art
[0002] User Interface refers to the overall design of the software's human-computer interaction, operating logic, and aesthetic interface. A good UI design not only makes the software personalized and tasteful, but also makes the software's operation comfortable, simple, and free, fully reflecting the software's positioning and characteristics.
[0003] User interface (UI for short) is the medium for interaction and information exchange between the system and the user. It realizes the conversion between the internal form of information and the form acceptable to humans. User interface is the software designed for interaction and communication between users and hardware. The purpose is to enable users to operate hardware conveniently and efficiently to achieve two-way interaction and complete the work they want to complete with the help of hardware. User interface has a broad definition, including human-computer interaction and graphical user interface. User interface exists in all fields involving information exchange between humans and machines.
[0004] With the improvement of the intelligence level of the whole vehicle, users have put forward higher requirements for active intelligence. The UI screen and layout of the current vehicle cockpit products are basically fixed after leaving the factory. The new themes pushed through subsequent OTA upgrades are also fixed and not combined with active intelligence. See the Chinese patent "Control Method, Device and Storage Medium of Electronic Device" with application number 202211648155.7, which discloses "controlling the electronic device to display the application interface of the first application; placing the application interface of the second application in the background of the electronic device." Or "controlling the electronic device to display the application interface of the first application in the first display area, and displaying the application interface of the second application in the second display area, the size of the second display area is smaller than the size of the first display area", where the interface layout of the display area is fixed, and only hiding or shrinking the application interface with a lower priority according to the priority of the application cannot fully meet the personalized needs of users. Summary of the invention
[0005] The present invention provides an interface layout automatic generation method, system and storage medium, which solve the technical problem that the layout of the existing application interface display area is fixed and the interface display cannot fully meet the personalized needs of users.
[0006] In order to solve the above technical problems, the present invention provides a method for automatically generating an interface layout, comprising:
[0007] Get the interface resolution parameters and calculate the style configuration parameters;
[0008] Determine the element parameters corresponding to the current interface style;
[0009] Combine the above element parameters and style configuration parameters to calculate the layout parameters of the basic grid in the current interface layout;
[0010] Allocate an interface proportion of each application interface based on the current scenario and / or user characteristics, and partition the basic grid to determine the interface partition of each application interface;
[0011] The layout coordinates of each element in the application interface are calculated according to the interface partitions, and a display interface is generated.
[0012] This basic solution loads an automatic generation method for interface layout into the existing in-vehicle intelligent system, directly obtains the interface resolution parameters of the current interface, and calculates the style configuration parameters, and then calculates the layout parameters of the basic grid in the current interface layout in combination with the element parameters corresponding to the current interface style, thereby determining the layout parameters of the current display interface (i.e., the display area); at this time, the interface proportion of each application interface is allocated based on the current scenario and / or user characteristics, and the basic grid is partitioned to obtain interface partitions, and the application interface is laid out according to user needs; then the layout coordinates of each element in the application interface are further calculated, so as to automatically generate the layout and elements of the UI screen according to user preferences, changes in usage scenarios, etc., giving users a flexible, diverse, and intelligent experience that meets their needs.
[0013] In a further embodiment, the obtaining of the interface resolution parameter and the calculation of the style configuration parameter includes:
[0014] Get the horizontal resolution Y, vertical resolution X, and screen width L and height H of the entire display interface as interface resolution parameters;
[0015] According to the horizontal resolution Y and the vertical resolution X, the horizontal border ratio parameter PEy, the vertical border ratio parameter PEx, the horizontal grid ratio PGy, and the vertical grid ratio PGx are calculated and recorded as setting parameters in the style configuration.
[0016] This solution calculates the style configuration parameters based on the interface resolution parameters of the actual vehicle, providing a basis for subsequent automatic interface production to adapt to the existing vehicle-mounted system and implement system updates by inserting software programs without the need for additional display system replacement.
[0017] In a further embodiment, determining the element parameters corresponding to the current interface style includes:
[0018] At least one style classification data of user preferences, application scenarios and user individual characteristics is obtained; the user preferences and user individual characteristics are identified to obtain user characteristics;
[0019] At least two different style interfaces are set according to the style classification data, and the number and size of elements in the screen are set;
[0020] According to the current interface style, get the number and size of the corresponding display elements and get the corresponding element parameters.
[0021] This solution is based on the fact that the application display style in actual application scenarios depends on style classification data such as user preferences, application scenarios and user individual characteristics. Therefore, user preferences, application scenarios and user individual characteristics are collected to design a style interface that meets the needs of different users in different scenarios, thereby optimizing the user experience.
[0022] In a further embodiment, the calculation of the layout parameters of the basic grid in the current interface layout by combining the above element parameters and style configuration parameters includes:
[0023] Obtaining the sizes of all display elements in the current interface from the element parameters, and determining the number of rows and columns in the basic grid layout;
[0024] Calculate the horizontal pixels and vertical pixels of each basic grid in the current interface layout according to the number of rows, the number of columns and the style configuration parameters;
[0025] The distribution quantity of the basic grid in the current interface layout is calculated according to the horizontal pixels and vertical pixels.
[0026] In a further implementation scheme, determining the number of rows and columns in the basic grid layout is specifically: reading the sizes of all display elements in the current interface, and calculating the greatest common divisor of the widths and heights of all display elements respectively as the number of rows and columns in the basic grid layout.
[0027] This solution calculates the greatest common divisor of the width and height of all display elements to obtain the number of rows and columns in the basic grid layout, so that the basic grid can adapt to the layout adjustment of all elements in the current interface while ensuring the rhythm and consistency of the interface design.
[0028] In a further embodiment, the calculation formulas for the horizontal pixels and vertical pixels of the basic grid are as follows:
[0029] layy=(Y*(1-PEy*2) / Nc)*(1-PGy)
[0030] layx=(X*(1-PEx*2) / Nl)*(1-PGx)
[0031] The calculation formula for the distribution quantity of the basic grid is as follows:
[0032] Nuy=(Y*(1-PEy*2) / Nc) / (layx / (1-PGy))
[0033] Nux=(X*(1-PEx*2) / Nl) / (layy / (1-PGx))
[0034] Where layy and layx are the horizontal and vertical pixels of the basic grid respectively; Nuy and Nux are the distribution numbers of the basic grid in the horizontal and vertical directions respectively; Nl and Nc are the number of rows and columns in the basic layout respectively.
[0035] After calculating the number of rows and columns in the basic layout, this solution incorporates the horizontal border ratio parameter PEy, the vertical border ratio parameter PEx, the horizontal grid ratio PGy, and the vertical grid ratio PGx to fully consider the size of the grid gap, and accurately calculate the actual pixel coordinates (horizontal pixels, vertical pixels) of the basic grid in the current interface, so as to further grid the display interface and obtain the distribution number of basic grids in the horizontal and vertical directions, providing basic partition data for subsequent interface partitioning, simplifying the difficulty of partition calculation through grid partitioning, and improving the efficiency of interface generation.
[0036] In a further embodiment, the allocating the interface proportion of each application interface based on the current scenario and / or user characteristics, partitioning the basic grid, and determining the interface partition of each application interface includes:
[0037] Obtain all application interfaces in the current scene, and determine the partition order and partition ratio corresponding to each application interface based on scene attributes and / or user characteristics;
[0038] The basic grid is partitioned according to the partition ratio to obtain at least two interface partitions, and the interface partitions are arranged and distributed according to the partition sorting to determine the position coordinates of each of the interface partitions.
[0039] When generating the interface layout, this solution, on the one hand, identifies the scene attributes of the current scene, thereby providing a targeted display interface suitable for the current scene for the convenience of users; on the other hand, it obtains user characteristics and performs personalized layouts for different users; and then performs partition sorting and partition ratio adjustment of the application interface, providing a good driving experience while ensuring driving safety.
[0040] In a further implementation, the calculating the layout coordinates of each element in the corresponding application interface according to the interface partitions and generating a display interface includes:
[0041] For the image elements, the predefined edges are used as restrictions, and the starting pixel and the ending pixel of each image element are calculated as the layout coordinates;
[0042] For button elements, the predefined edges are used as restrictions, and the starting pixel of each button element is calculated as the layout coordinates;
[0043] Arrange elements based on element priority and layout coordinates to generate a screen layout for the display interface;
[0044] The predefined edge includes at least one of an edge of the application interface corresponding to the interface partition and a layout edge of other elements in the application interface.
[0045] This solution further makes targeted layout adjustments to each element in each application interface based on the interface partitions corresponding to the current application and / or edge restrictions of other elements to achieve tiling, layering, and overlapping display effects between multiple elements, optimize the interface layout, and further adapt to user usage habits.
[0046] The present invention provides an interface layout automatic generation system, comprising an acquisition module, a processor, a display module and a storage module;
[0047] The acquisition module is used to obtain at least one style classification data of user preferences, application scenarios and user individual characteristics;
[0048] The storage module is used to store computer program codes, and the computer program codes include computer instructions;
[0049] The processor is used to run the computer instructions in the storage module to execute the above-mentioned method for automatically generating an interface layout;
[0050] The display module is used to produce a display interface according to the control instructions of the processor;
[0051] The acquisition module includes at least one of image acquisition, voice acquisition, and key input acquisition.
[0052] The system composed of various modules provided in this solution is used to provide a basic environment for the implementation of the above method.
[0053] The present invention also provides a storage medium on which a computer program is stored, characterized in that: the computer program is used to be loaded by the above-mentioned automatic interface layout generation system to implement the above-mentioned automatic interface layout generation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a workflow diagram of a method for automatically generating an interface layout provided by an embodiment of the present invention;
[0055] Figure 2 It is a schematic diagram of the division of the basic grid and interface partitions provided by an embodiment of the present invention;
[0056] Figure 3 It is a schematic diagram of generating a graph interface provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following specifically illustrates the implementation mode of the present invention in conjunction with the accompanying drawings. The embodiments are provided for illustrative purposes only and are not to be construed as limitations of the present invention. The accompanying drawings are provided for reference and illustration only and do not constitute limitations on the scope of patent protection of the present invention, because many changes may be made to the present invention without departing from the spirit and scope of the present invention.
[0058] An embodiment of the present invention provides a method for automatically generating an interface layout, such as Figure 1 As shown, in this embodiment, steps S1 to S5 are included:
[0059] S1. Obtain interface resolution parameters and calculate style configuration parameters, including:
[0060] Get the horizontal resolution Y, vertical resolution X, and screen width L and height H of the entire display interface as interface resolution parameters;
[0061] According to the horizontal resolution Y and the vertical resolution X, the horizontal border ratio parameter PEy, the vertical border ratio parameter PEx, the horizontal grid ratio PGy, and the vertical grid ratio PGx are calculated and recorded as setting parameters in the style configuration.
[0062] Among them, see Figure 2 :
[0063] PEy is the ratio of the vertical pixels Ey (the number of pixels that can be displayed in the vertical direction) of the horizontal border of the user interface to the vertical resolution Y (the ability to distinguish the minimum interval between two adjacent geological bodies) of the entire interface, that is, PEy=Ey / Y;
[0064] PEx is the ratio of the horizontal pixels Ex (the number of pixels that can be displayed in the horizontal direction) of the vertical border of the user interface to the horizontal resolution X of the entire interface, that is, PEx=Ex / X;
[0065] PGy is the ratio of the vertical spacing pixel Gy of the basic grid to the vertical resolution Y of the entire interface, that is, PGy=Gy / Y;
[0066] PGx is the ratio of the horizontal interval pixel Gx of the basic grid to the horizontal resolution X of the entire interface, that is, PGx=Gx / X.
[0067] Through these four parameters, the number and position of the basic grid of the picture can be determined. As the basis of layout, the specific number also depends on the number of rows and columns, which is strongly related to the style.
[0068] The proportion of left-right alignment is ALy, the proportion of top-bottom alignment is ALx, and the number of partitions is represented by Zn.
[0069] For example, based on the button sizes under various horizontal screen interface sizes and combined with the best user experience size, the basic grid ratio is calculated to be 0.74% horizontally (that is, the ratio of the horizontal gap to the basic grid) and 0.21% vertically (that is, the ratio of the vertical gap to the basic grid). The horizontal screen interface uses 4px as the basic grid rule, and the fixed vertical and horizontal spacing between elements and components in the layout is arranged in multiples of 4px (4 pixels) to ensure the rhythm and consistency of the interface design.
[0070] This embodiment calculates the style configuration parameters according to the interface resolution parameters of the actual vehicle to provide a basis for subsequent automatic interface production, so as to adapt to the existing vehicle-mounted system and implement system updates by inserting a software program without the need for additional replacement of the display system.
[0071] S2. Determine the element parameters corresponding to the current interface style, including S21~S23:
[0072] S21, obtaining at least one style classification data of user preferences, application scenarios and user individual characteristics; identifying user preferences and user individual characteristics to obtain user characteristics;
[0073] S22, setting at least two different style interfaces according to the style classification data, and setting the number and size of elements in the screen;
[0074] For example, you can set two different interface styles: business style and casual style. The interface elements (such as pictures) and element sizes of these two styles can be set to two different specifications according to actual needs.
[0075] S23. According to the current interface style, the number and size of corresponding display elements are obtained to obtain corresponding element parameters.
[0076] For example, elements include buttons, pictures, dialog boxes, etc., where the number of buttons is represented by Nb, the number of pictures is represented by Pn, and the number of dialog boxes is represented by Dn.
[0077] The width and height of a button are represented as Bh and Bl respectively, the width and height of a picture are represented as Ph and Pl respectively, and the width and height of a dialog box are represented as Dh and Dl respectively.
[0078] This embodiment is based on the fact that the application display style in the actual application scenario depends on style classification data such as user preferences, application scenarios and user individual characteristics. Therefore, user preferences, application scenarios and user individual characteristics are collected to design a style interface that meets the needs of different users in different scenarios, thereby optimizing the user experience.
[0079] S3. Combining the above element parameters and style configuration parameters, calculate the layout parameters of the basic grid in the current interface layout, including:
[0080] S31. Obtain the sizes of all display elements in the current interface from the element parameters, and determine the number of rows and columns in the basic grid layout.
[0081] In this embodiment, the number of rows and columns in the basic grid layout is determined specifically by reading the sizes of all display elements in the current interface, and calculating the greatest common divisor of the widths and heights of all display elements respectively as the number of rows and columns in the basic grid layout.
[0082] Specifically, taking all display elements in the current interface including buttons, pictures, and dialog boxes as an example: take the greatest common divisor of Bh, Ph, and Dh as the number of rows Nl in the basic layout, and take the greatest common divisor of Bl, Pl, and Dl as the number of columns Nc in the basic layout.
[0083] This embodiment calculates the greatest common divisor of the widths and heights of all display elements to obtain the number of rows and columns in the basic grid layout, so that the basic grid can adapt to the layout adjustment of all elements in the current interface while ensuring the rhythm and consistency of the interface design.
[0084] S32, calculating the horizontal pixels and vertical pixels of each basic grid in the current interface layout according to the number of rows, the number of columns and the style configuration parameters;
[0085] In this embodiment, the calculation formulas for the horizontal pixels and the vertical pixels of the basic grid are as follows:
[0086] layy=(Y*(1-PEy*2) / Nc)*(1-PGy)
[0087] layx=(X*(1-PEx*2) / Nl)*(1-PGx)
[0088] Where layy and layx are the horizontal and vertical pixels of the basic grid respectively; Nl and Nc are the number of rows and columns in the basic layout respectively.
[0089] S33, calculating the distribution quantity of the basic grid in the current interface layout according to the above-mentioned horizontal pixels and vertical pixels.
[0090] In this embodiment, the calculation formula for the distribution quantity of the basic grid is as follows:
[0091] Nuy=(Y*(1-PEy*2) / Nc) / (layx / (1-PGy))
[0092] Nux=(X*(1-PEx*2) / Nl) / (layy / (1-PGx))
[0093] Where layy and layx are the horizontal and vertical pixels of the basic grid respectively; Nuy and Nux are the distribution numbers of the basic grid in the horizontal and vertical directions respectively; Nl and Nc are the number of rows and columns in the basic layout respectively.
[0094] After calculating the number of rows and columns in the basic layout, this embodiment incorporates the horizontal border ratio parameter PEy, the vertical border ratio parameter PEx, the horizontal grid ratio PGy, and the vertical grid ratio PGx to fully consider the size of the grid gap, and accurately calculates the actual pixel coordinates (horizontal pixels, vertical pixels) of the basic grid in the current interface, so as to further grid the display interface and obtain the distribution number of basic grids in the horizontal and vertical directions, providing basic partition data for subsequent interface partitioning, simplifying the difficulty of partition calculation through grid partitioning, and improving the efficiency of interface generation.
[0095] S4. Allocate the interface proportion of each application interface based on the current scenario and / or user characteristics, and partition the basic grid to determine the interface partition of each application interface, including:
[0096] Obtain all application interfaces in the current scene, and determine the partition order and partition ratio corresponding to each application interface based on scene attributes and / or user characteristics;
[0097] The basic grid is partitioned according to the partition ratio to obtain at least two interface partitions, and the interface partitions are arranged and distributed according to the partition sorting to determine the position coordinates of each interface partition.
[0098] The priorities of different application interfaces may be determined according to user characteristics and / or according to the particularity of the current scene. For example, the highest priority may be set to be related to driving safety (fault alarm).
[0099] For example, see Figure 3 The current scenario is: the user in the driving seat is listening to music and navigation while driving, and the user in the front passenger seat is playing games. At this time, the front-end perception system finds that the user in the driving seat now needs to join a scheduled online meeting. At this time, the scenario changes, and the interface adapts to the changes in the business meeting.
[0100] Then, the conference interface has the highest priority and is allocated a higher interface ratio. At this time, the interface partition ratios are Scbp (conference interface), Scpp (game interface), Scrp (cinema interface), and Scdp (navigation interface). According to the individual characteristics of the user (driver), Scdp (navigation interface) is adjusted to the second position from left to right. At the same time, according to the individual characteristics of other users (co-pilot passenger), Scpp (game interface) is adjusted to be close to the co-pilot seat.
[0101] The entire basic network is partitioned according to the partition ratio of each interface partition. The starting grid numbers Eb, Ed, Er, and Ep of each interface partition are determined according to the following formula, and they are arranged in order from the driver to the co-pilot side according to the priority Eb>Ed>Er>Ep (business>driving>leisure>entertainment).
[0102] Eb=0;
[0103] Ed = Nuy * Scdp;
[0104] Er=Nuy*(Scdp+Scbp);
[0105] Ep=Nuy*(1-Scpp);
[0106] Here, we can find the interface partitions based on the number of Zn. For example, if there are two interface partitions, we can find two.
[0107] When generating the interface layout, this embodiment, on the one hand, identifies the scene attributes of the current scene, so as to provide a display interface suitable for the current scene in a targeted manner for the convenience of users; on the other hand, obtains user characteristics and performs personalized layouts for different users; and then performs partition sorting and partition ratio adjustment of the application interface, so as to provide a good driving experience while ensuring driving safety.
[0108] S5. Calculate the layout coordinates of each element in the corresponding application interface according to the interface partitions, and generate a display interface, including:
[0109] A. For image elements, the predefined edges are used as restrictions, and the starting pixel and the ending pixel of each image element are calculated as the layout coordinates;
[0110] Given the width and height of the image element, determine the starting pixels Pxs and Pys according to the following formula:
[0111] Pys= Y*(PEy+PAly),Pxs= Eb+X*(PAlx)
[0112] Among them, PAly represents the ratio of the vertical pixels Ply between the top of the picture and the upper border of the partition to the vertical resolution Y of the entire interface, that is, PAly=Ply / Y; PAlx represents the ratio of the vertical pixels Plx between the left side of the picture and the left border of the interface to the horizontal resolution X of the entire interface, that is, PAlx=Plx / X.
[0113] Determine the end pixel points Pxe and Pye of the image according to the following formula:
[0114] Pxe=xs+Pl;Pye=ys+Ph;
[0115] B. For button elements, the predefined edges are used as restrictions and the starting pixel of each button element is calculated as the layout coordinates;
[0116] The starting position of the button is determined by the following formula:
[0117] Bxs= Y*(PEy+BAly)
[0118] Bys = Eb+X*(BAlx)
[0119] Among them, BAly represents the ratio of the vertical pixels Bly between the top of the button and the upper border of the partition to the vertical resolution Y of the entire interface, that is, BAly=Bly / Y; BAlx represents the ratio of the vertical pixels Blx between the left side of the button and the left border of the interface to the horizontal resolution X of the entire interface, that is, BAlx=Blx / X.
[0120] The predefined edge includes at least one of the edge of the application interface corresponding to the interface partition and the layout edge of other elements in the application interface. For example, if only the edge of the interface partition is used as a restriction, the layout positions of multiple elements are not considered, and they can be displayed in an interlaced or overlapping manner; if the layout edge of other elements is used as a restriction, horizontal or vertical arrangement of multiple elements can be achieved.
[0121] C. Arrange elements based on element priority and layout coordinates to generate a screen layout for the display interface;
[0122] For example, picture > dialog box > button, or dialog box > picture > button. The specific element priority can be set according to user preferences or scenarios.
[0123] This embodiment further performs targeted layout adjustments on each element in each application interface based on the interface partitions and / or edge restrictions of other elements corresponding to the current application, so as to achieve tiling, layering, and overlapping display effects between multiple elements, optimize the interface layout, and further adapt to the user's usage habits.
[0124] The embodiment of the present invention is a method for automatically generating a loading interface layout in an existing in-vehicle intelligent system, which directly obtains the interface resolution parameters of the current interface, calculates the style configuration parameters, and then calculates the layout parameters of the basic grid in the current interface layout in combination with the element parameters corresponding to the current interface style, thereby determining the layout parameters of the current display interface (i.e., the display area); at this time, the interface proportion of each application interface is allocated based on the current scene and / or user characteristics, and the basic grid is partitioned to obtain interface partitions, and the application interface is laid out according to user needs; then the layout coordinates of each element in the application interface are further calculated, so as to automatically generate the layout, elements, etc. of the UI screen according to the user's preferences, changes in usage scenarios, etc., to provide users with a flexible, diverse, and intelligent experience that meets their needs.
[0125] Example 2
[0126] The embodiment of the present invention provides an automatic generation system of interface layout, including a collection module, a processor, a display module and a storage module;
[0127] The acquisition module is used to obtain at least one style classification data of user preferences, application scenarios and user individual characteristics;
[0128] The storage module is used to store computer program codes, where the computer program codes include computer instructions;
[0129] The processor is used to run the computer instructions in the storage module to execute an automatic interface layout generation method provided in the above embodiment 1;
[0130] The display module is used to produce a display interface according to the control instructions of the processor;
[0131] The acquisition module includes at least one of image acquisition, voice acquisition, and key input acquisition.
[0132] The system composed of various modules provided in the embodiment of the present invention is used to provide a basic environment for implementing the above method.
[0133] The automatic interface layout generation system of this embodiment uses an adaptive algorithm to identify user preferences, user current usage scenarios, user individual characteristics (driver, passenger), etc. through the acquisition module (front-end perception module), call the parameters in the matching configuration file, and calculate the layout and style of the screen through the algorithm to achieve adaptive changes in the screen and enhance the active intelligent experience.
[0134] Example 3
[0135] An embodiment of the present invention also provides a storage medium on which a computer program is stored, characterized in that: the computer program is used to be loaded by an interface layout automatic generation system of the above embodiment 2 to implement an interface layout automatic generation method of the above embodiment 1.
[0136] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A method for automatically generating an interface layout, characterized in that: include: Get the interface resolution parameters and calculate the style configuration parameters; Determine the element parameters corresponding to the current interface style; Combine the above element parameters and style configuration parameters to calculate the layout parameters of the basic grid in the current interface layout; Allocate an interface proportion of each application interface based on the current scenario and / or user characteristics, and partition the basic grid to determine the interface partition of each application interface; Calculating the layout coordinates of each element in the application interface according to the interface partitions, and generating a display interface; The obtaining of the interface resolution parameter and the calculation of the style configuration parameter include: Get the horizontal resolution Y, vertical resolution X, and screen width L and height H of the entire display interface as interface resolution parameters; According to the horizontal resolution Y and the vertical resolution X, the horizontal border ratio parameter PEy, the vertical border ratio parameter PEx, the horizontal grid ratio PGy, and the vertical grid ratio PGx are calculated and recorded as setting parameters in the style configuration; Determining the element parameters corresponding to the current interface style includes: At least one style classification data of user preferences, application scenarios and user individual characteristics is obtained; the user preferences and user individual characteristics are identified to obtain user characteristics; At least two different style interfaces are set according to the style classification data, and the number and size of elements in the screen are set; According to the current interface style, obtain the number and size of corresponding display elements and obtain the corresponding element parameters; The calculation of the layout parameters of the basic grid in the current interface layout by combining the above element parameters and style configuration parameters includes: Obtaining the sizes of all display elements in the current interface from the element parameters, and determining the number of rows and columns in the basic grid layout; Calculate the horizontal pixels and vertical pixels of each basic grid in the current interface layout according to the number of rows, the number of columns and the style configuration parameters; The distribution quantity of the basic grid in the current interface layout is calculated according to the horizontal pixels and vertical pixels.
2. The method for automatically generating an interface layout according to claim 1, characterized in that: The determining of the number of rows and columns in the basic grid layout is specifically as follows: reading the sizes of all display elements in the current interface, and respectively calculating the greatest common divisor of the widths and heights of all display elements as the number of rows and columns in the basic grid layout.
3. The method for automatically generating an interface layout according to claim 2, characterized in that: The calculation formulas for the horizontal pixels and vertical pixels of the basic grid are as follows: layy=(Y*(1-PEy*2) / Nc)*(1-PGy) layx=(X*(1-PEx*2) / Nl)*(1-PGx) The calculation formula for the distribution quantity of the basic grid is as follows: Nuy=(Y*(1-PEy*2) / Nc) / (layx / (1-PGy)) Nux=(X*(1-PEx*2) / Nl) / (layy / (1-PGx)) Where layy and layx are the horizontal and vertical pixels of the basic grid respectively; Nuy and Nux are the distribution numbers of the basic grid in the horizontal and vertical directions respectively; Nl and Nc are the number of rows and columns in the basic grid layout respectively.
4. The method for automatically generating an interface layout according to claim 1, characterized in that: The allocating the interface proportion of each application interface based on the current scenario and / or user characteristics, partitioning the basic grid, and determining the interface partition of each application interface includes: Obtain all application interfaces in the current scene, and determine the partition order and partition ratio corresponding to each application interface based on scene attributes and / or user characteristics; The basic grid is partitioned according to the partition ratio to obtain at least two interface partitions, and the interface partitions are arranged and distributed according to the partition sorting to determine the position coordinates of each of the interface partitions.
5. The method for automatically generating an interface layout according to claim 1, characterized in that: The calculating the layout coordinates of each element in the corresponding application interface according to the interface partitions and generating a display interface includes: For the image elements, the predefined edges are used as restrictions, and the starting pixel and the ending pixel of each image element are calculated as the layout coordinates; For button elements, the predefined edges are used as restrictions, and the starting pixel of each button element is calculated as the layout coordinates; Arrange elements based on element priority and layout coordinates to generate a screen layout for the display interface; The predefined edge includes at least one of an edge of the application interface corresponding to the interface partition and a layout edge of other elements in the application interface.
6. An automatic interface layout generation system, characterized by: It includes an acquisition module, a processor, a display module and a storage module; The acquisition module is used to obtain at least one style classification data of user preferences, application scenarios and user individual characteristics; The storage module is used to store computer program codes, and the computer program codes include computer instructions; The processor is used to run the computer instructions in the storage module to execute the method for automatically generating an interface layout according to any one of claims 1 to 5; The display module is used to produce a display interface according to the control instructions of the processor; The acquisition module includes at least one of image acquisition, voice acquisition, and key input acquisition.
7. A storage medium having a computer program stored thereon, characterized in that: The computer program is used to be loaded by an automatic interface layout generation system as described in claim 6 to implement an automatic interface layout generation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Control method of electronic equipment, equipment and storage medium
CN115904187A
Method and device for automatically adjusting page layout
CN103941963A
Visual monitoring interface response type layout method
CN117971369A
Cited By
An interface layout generation method based on an intelligent gateway and an intelligent gateway
CN120675889B
