CN115202661B - A hybrid generation method with hierarchical layout and related equipment - Google Patents
A hybrid generation method with hierarchical layout and related equipment Download PDFInfo
- Publication number
- CN115202661B CN115202661B CN202211121484.6A CN202211121484A CN115202661B CN 115202661 B CN115202661 B CN 115202661B CN 202211121484 A CN202211121484 A CN 202211121484A CN 115202661 B CN115202661 B CN 115202661B
- Authority
- CN
- China
- Prior art keywords
- nodes
- node
- branch
- leaf
- layout
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 82
- 230000003993 interaction Effects 0.000 claims abstract description 18
- 238000005457 optimization Methods 0.000 claims abstract description 13
- 230000006870 function Effects 0.000 claims description 36
- 238000004364 calculation method Methods 0.000 claims description 16
- 238000003860 storage Methods 0.000 claims description 15
- 238000004422 calculation algorithm Methods 0.000 claims description 13
- 239000011159 matrix material Substances 0.000 claims description 13
- 230000001186 cumulative effect Effects 0.000 claims description 4
- 238000012217 deletion Methods 0.000 claims description 4
- 230000037430 deletion Effects 0.000 claims description 4
- 238000012549 training Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 4
- 238000013135 deep learning Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 238000000844 transformation Methods 0.000 description 2
- 238000012800 visualization Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 239000000969 carrier Substances 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/11—Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
- G06F17/12—Simultaneous equations, e.g. systems of linear equations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Analysis (AREA)
- Computational Mathematics (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Operations Research (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机图形学技术领域,尤其涉及一种具有层次结构布局的混合生成方法、系统、终端及计算机可读存储介质。The invention relates to the technical field of computer graphics, in particular to a hybrid generation method, system, terminal and computer-readable storage medium with hierarchical layout.
背景技术Background technique
二维布局广泛应用于网页、海报、杂志等信息载体上。不同的信息模块可以通过布局来划分,从而得到一个内容呈现排版。合理的布局能符合用户的阅读习惯,方便用户快速获取关键信息。因此,探究如何生成二维布局并将其应用在信息展现上是一件很有意义的工作。Two-dimensional layouts are widely used in information carriers such as web pages, posters, and magazines. Different information modules can be divided by layout, so as to obtain a content presentation layout. Reasonable layout can meet the user's reading habits, so that users can quickly obtain key information. Therefore, it is very meaningful to explore how to generate two-dimensional layout and apply it to information display.
对于不同形式的布局生成主要有以下的实现形式:第一种是将元素间关系作为约束求解优化生成。例如,(1)要求输入一系列元素之间存在的可替代关系、元素的大小范围以及显示界面的大小,将元素之间的多种关系通过“或”约束连接起来,整体作为一个硬约束求解就可以生成自适应各种显示设备大小的布局。(2)提出了一种方法可以自动探测元素之间可能存在的诸如对齐、等大小之类的关系,并允许用户通过交互的方式手动编辑元素之间的关系,最后将这些元素的位置和大小作为软约束元素之间的关系作为硬约束求解优化就可以生成一个规整的布局。(3)提出了一个可以混合插值具有相似结构三维建筑物布局的框架,该工作输入的是多个建筑物布局,这些布局元素之间是有明确对应的,并将建筑物布局边界作为硬约束,房间的采光、高度以及院落等作为软约束。硬约束与软约束相结合定义了“好布局”的标准,然后通过线性插值的方式生成与输入布局具有相同结构的新布局。另一种则是基于深度学习自动生成布局的方式。(4)利用深度神经网络训练出生成模型后再结合用户的输入约束可以自动地生成二维的户型图布局。(5)提出了一个全新的框架,该框架利用自注意力机制去学习布局元素之间的上下文关系然后用于新布局的生成。There are mainly the following implementation forms for different forms of layout generation: the first one is to generate the relationship between elements as a constraint solution optimization. For example, (1) It is required to input a series of substitutable relationships between elements, the size range of elements and the size of the display interface, connect multiple relationships between elements through "or" constraints, and solve the whole as a hard constraint A layout that adapts to the size of various display devices can be generated. (2) A method is proposed to automatically detect possible relationships between elements such as alignment and equal size, and allow users to manually edit the relationship between elements in an interactive way, and finally the position and size of these elements As a soft constraint, the relationship between elements is optimized as a hard constraint to generate a regular layout. (3) A framework that can interpolate 3D building layouts with similar structures is proposed. The input of this work is multiple building layouts. There is a clear correspondence between these layout elements, and the building layout boundaries are used as hard constraints. , the lighting, height and courtyard of the room are used as soft constraints. The combination of hard constraints and soft constraints defines the criteria of a "good layout", and then generates a new layout with the same structure as the input layout by means of linear interpolation. The other is a way to automatically generate layouts based on deep learning. (4) Using the deep neural network to train the generative model and then combining the user's input constraints can automatically generate a two-dimensional floor plan layout. (5) A new framework is proposed, which uses the self-attention mechanism to learn the contextual relationship between layout elements and then use it to generate new layouts.
上述方法存在一定缺陷,例如(1)和(3)在做布局生成时,它们要求输入布局元素之间是有明确对应的;(2)需要用户手动编辑元素之间的关系;(4)和(5)这些基于深度学习的布局生成工作往往需要一个大数据集用于训练模型,此类方法需要大量的计算资源。The above methods have certain defects, such as (1) and (3) when doing layout generation, they require a clear correspondence between the input layout elements; (2) require the user to manually edit the relationship between elements; (4) and (5) These deep learning-based layout generation work often requires a large data set for training the model, and such methods require a large amount of computing resources.
因此,现有技术还有待于改进和发展。Therefore, the prior art still needs to be improved and developed.
发明内容Contents of the invention
本发明的主要目的在于提供一种具有层次结构布局的混合生成方法、系统、终端及计算机可读存储介质,旨在解决现有技术中进行信息展示时生成新布局过于复杂的问题。The main purpose of the present invention is to provide a hybrid generation method, system, terminal and computer-readable storage medium with a hierarchical layout, aiming at solving the problem in the prior art that generating a new layout is too complicated for information display.
为实现上述目的,本发明提供一种具有层次结构布局的混合生成方法,所述具有层次结构布局的混合生成方法包括如下步骤:In order to achieve the above object, the present invention provides a hybrid generation method with a hierarchical layout, and the hybrid generation method with a hierarchical layout includes the following steps:
接收用户输入的多个布局模板,所述布局模板使用多叉树结构表示,所述多叉树结构中的叶子节点代表所述布局模板中的单个元素,根据节点对应规则计算元素之间的对应关系,得到对应信息;Receive multiple layout templates input by the user, the layout template is represented by a multi-fork tree structure, the leaf nodes in the multi-fork tree structure represent a single element in the layout template, and the correspondence between elements is calculated according to the node correspondence rule relationship, get the corresponding information;
根据对应信息建立一棵组合树,基于所述组合树根据节点类型并结合用户交互时产生的参数动态确定中间状态元素以及元素之间应满足的关系;Establish a combination tree according to the corresponding information, and dynamically determine the intermediate state elements and the relationship between the elements according to the node type and the parameters generated during user interaction based on the combination tree;
将节点的位置和大小作为软约束,节点之间应满足的关系作为硬约束,优化目标函数,优化求解完成后生成新的多样性布局。The location and size of nodes are used as soft constraints, and the relationship between nodes is used as hard constraints, the objective function is optimized, and a new diversity layout is generated after the optimization solution is completed.
可选地,所述的具有层次结构布局的混合生成方法,其中,所述节点对应规则包括第一对应规则、第二对应规则、第三对应规则和第四对应规则;Optionally, in the hybrid generation method with hierarchical layout, the node correspondence rules include a first correspondence rule, a second correspondence rule, a third correspondence rule and a fourth correspondence rule;
所述第一对应规则包括:The first corresponding rule includes:
两个具有相似几何信息的叶子节点趋向对应在一起;Two leaf nodes with similar geometric information tend to correspond together;
两个具有相似子结构的分支节点趋向对应在一起;Two branch nodes with similar substructures tend to correspond together;
两个具有不同语义信息的叶子节点不能对应在一起;Two leaf nodes with different semantic information cannot correspond together;
所述第二对应规则包括:The second corresponding rule includes:
叶子节点和分支节点允许对应为空;Leaf nodes and branch nodes are allowed to be empty;
所述第三对应规则包括:The third corresponding rule includes:
如果两个分支节点和对应在一起,则子树中的节点只能对应子树中的节点或者对应空;If two branch nodes and Corresponding together, the subtree Nodes in can only correspond to subtrees The node in or corresponds to empty;
所述第四对应规则包括:The fourth corresponding rule includes:
两个处在不同层级的节点允许对应在一起;Two nodes at different levels are allowed to correspond together;
其中,叶子节点的父节点为分支节点。Wherein, the parent node of the leaf node is a branch node.
可选地,所述的具有层次结构布局的混合生成方法,其中,所述根据节点对应规则计算元素之间的对应关系,得到对应信息,之前还包括:Optionally, in the hybrid generation method with a hierarchical layout, wherein the calculation of the correspondence between elements according to the node correspondence rules to obtain the correspondence information also includes:
使用递归的方法定义两个节点之间以及节点与空之间计算对应损失的函数;Use the recursive method to define the function of calculating the corresponding loss between two nodes and between nodes and space;
两个叶子节点对应代价定义两个节点位置差的二范式加上大小差的二范式再加上一个与语义信息相关的第一惩罚项,第一惩罚项的引入使得两个语义信息不同的节点不能对应在一起,为以下形式:The corresponding cost of two leaf nodes defines the second normal form of the position difference of the two nodes plus the second normal form of the size difference plus a first penalty item related to semantic information , the introduction of the first penalty item makes it impossible for two nodes with different semantic information to correspond together, which is in the following form:
; ;
; ;
其中,和分别表示两个叶子节点;是计算两个叶子节点对应代价的函数;和分别表示两个叶子节点的位置;和分别表示两个叶子节点的大小;和分别表示两个叶子节点对应的语义信息;in, and represent two leaf nodes respectively; is a function to calculate the corresponding cost of two leaf nodes; and represent the positions of the two leaf nodes respectively; and respectively represent the size of the two leaf nodes; and respectively represent the semantic information corresponding to the two leaf nodes;
叶子节点对应空的代价为该叶子节点对应一个大小为0的节点的损失,具体为该节点大小与0差的二范式再加上一个第二惩罚项,为:Leaf node corresponds to the empty cost The loss of the leaf node corresponding to a node with a size of 0, specifically the second normal form of the difference between the size of the node and 0 plus a second penalty item ,for:
; ;
其中,设定;Among them, set ;
分支节点对应空的代价定义为该分支内所有叶子节点对应空的代价的累积和,为:The cost corresponding to the null of a branch node is defined as the cumulative sum of the costs corresponding to the null of all leaf nodes in the branch, which is:
; ;
其中,是计算分支节点与空对应代价的函数,是该分支节点下的叶子节点;in, is a function to calculate the cost corresponding to the branch node and empty, is the leaf node under the branch node;
分支节点对应叶子节点的代价:递归调用计算损失方法来计算该分支节点的孩子节点与叶子节点的代价,计算该分支节点的孩子节点对空的代价以及叶子节点对空的代价;用计算出的代价值构建一个二维矩阵并通过匈牙利算法求解得到一个最小的损失以及最优的匹配结果。The cost of the branch node corresponding to the leaf node: recursively call the calculation loss method to calculate the cost of the child node of the branch node and the leaf node, calculate the cost of the child node of the branch node and the cost of the leaf node to the null; use the calculated The cost value constructs a two-dimensional matrix and solves it through the Hungarian algorithm to obtain a minimum loss and an optimal matching result.
可选地,所述的具有层次结构布局的混合生成方法,其中,所述分支节点对应分支节点的计算代价包括:Optionally, in the hybrid generation method with hierarchical layout, the calculation costs of the branch nodes corresponding to the branch nodes include:
两个分支节点都不下沉;递归调用计算损失方法来计算第一个分支节点的孩子节点与另一分支节点的孩子节点之间的代价;计算第一个分支节点的孩子节点对空的代价以及第二个分支节点的孩子节点对空的代价;用计算出的代价值构建一个二维矩阵并通过匈牙利算法求解就得到一个损失值记为;Neither branch node sinks; recursively calls the compute loss method to compute the cost between the child node of the first branch node and the child node of the other branch node; computes the cost of the child node of the first branch node against null and The cost of the child node of the second branch node to the null; use the calculated cost value to construct a two-dimensional matrix and solve it through the Hungarian algorithm to obtain a loss value recorded as ;
第一个分支节点下沉一级,第二个分支节点不下沉;递归调用计算损失方法来计算第一个分支节点与另一分支节点的孩子节点之间的代价;计算第一个分支节点对空的代价以及第二个分支节点的孩子节点对空的代价;用计算出的代价值构建一个二维矩阵并通过匈牙利算法求解得到一个损失值记为;The first branch node sinks one level, and the second branch node does not sink; recursively call the calculation loss method to calculate the cost between the first branch node and the child node of another branch node; calculate the pair of the first branch node Null cost and the cost of the child node of the second branch node to the null; use the calculated cost value to construct a two-dimensional matrix and solve it through the Hungarian algorithm to obtain a loss value denoted as ;
第一个分支节点不下沉,第二个分支节点下沉一级;递归调用计算损失方法来计算第一个分支节点的孩子节点与另一分支节点之间的代价;计算第一个分支节点的孩子节点对空的代价以及第二个分支节点对空的代价;用计算出的代价值构建一个二维矩阵并通过匈牙利算法求解得到一个损失值记为;The first branch node does not sink, and the second branch node sinks one level; recursively call the calculation loss method to calculate the cost between the child node of the first branch node and another branch node; calculate the cost of the first branch node The cost of the child node to the null and the cost of the second branch node to the null; use the calculated cost value to construct a two-dimensional matrix and solve it through the Hungarian algorithm to obtain a loss value recorded as ;
则最终损失值,两个分支节点内的元素对应结果等于损失值最小的对应的匹配;将两个布局的根节点作为参数传入定义的递归函数中得到总体的对应损失值以及两个布局元素之间的对应信息。then the final loss value , the corresponding result of the elements in the two branch nodes is equal to the corresponding matching with the smallest loss value; pass the root nodes of the two layouts as parameters into the defined recursive function to obtain the overall corresponding loss value and the correspondence between the two layout elements information.
可选地,所述的具有层次结构布局的混合生成方法,其中,所述基于所述组合树根据节点类型并结合用户交互时产生的参数动态确定中间状态元素以及元素之间应满足的关系,具体包括:Optionally, the hybrid generation method with hierarchical layout, wherein, based on the combination tree, according to the node type and in combination with the parameters generated during user interaction, the intermediate state elements and the relationship that should be satisfied between the elements are dynamically determined, Specifically include:
所述组合树包括三类节点,第一类节点是在两棵树中都有对应的节点;第二类节点是只在第一棵树中有对应的节点;第三类节点是只在第二棵树中有对应的节点;The combined tree includes three types of nodes. The first type of nodes has corresponding nodes in both trees; the second type of nodes only has corresponding nodes in the first tree; the third type of nodes only has corresponding nodes in the first tree. There are corresponding nodes in the two trees;
分别针对第二类节点和第三类节点按照所在的层级均匀地分配一个删除阈值,根据输入的参数动态确定中间状态的树结构以及兄弟节点之间应满足的关系;For the second type of nodes and the third type of nodes, a deletion threshold is evenly assigned according to the level where they are located, and the tree structure of the intermediate state and the relationship that should be satisfied between sibling nodes are dynamically determined according to the input parameters;
其中,兄弟节点之间的关系包括等大小、等间距和对齐。Among them, the relationship between sibling nodes includes equal size, equal spacing and alignment.
可选地,所述的具有层次结构布局的混合生成方法,其中,所述将节点的位置和大小作为软约束,节点之间应满足的关系作为硬约束,优化目标函数,具体包括:Optionally, the hybrid generation method with hierarchical layout, wherein the position and size of nodes are used as soft constraints, and the relationship that should be satisfied between nodes is used as hard constraints to optimize the objective function, specifically including:
当输入的参数值小于0.5时,用第一棵树中的关系,否则,用第二树中的关系;When the input parameter value When it is less than 0.5, use the relationship in the first tree, otherwise, use the relationship in the second tree;
求解时将位置和大小作为软约束,节点之间应满足的关系作为硬约束,要优化的目标函数如下:When solving, the position and size are used as soft constraints, and the relationship that should be satisfied between nodes is used as hard constraints. The objective function to be optimized is as follows:
; ;
其中,是度量位置差的能量方程,是度量大小差的能量方程;in, is the energy equation to measure the position difference, is the energy equation to measure the magnitude difference;
; ;
; ;
其中,是中间状态树中的一个节点;代表该节点要求解的位置量;代表该节点要求解的大小值;如果为空,则指示函数,否则;表示节点对应在第一棵树中的节点的位置;表示节点的大小;表示节点对应在第二棵树中的节点的位置;表示节点的大小;在一系列硬约束下最小化目标函数。in, is a node in the intermediate state tree; Represents the position quantity that the node needs to solve; Represents the size value of the node to be solved; if is empty, the indicator function ,otherwise ; represents a node corresponds to the node in the first tree s position; represents a node the size of; represents a node corresponds to the node in the second tree s position; represents a node The size of ; minimizes the objective function under a set of hard constraints.
可选地,所述的具有层次结构布局的混合生成方法,其中,所述具有层次结构布局的混合生成方法还包括:Optionally, the hybrid generation method with hierarchical layout, wherein, the hybrid generation method with hierarchical layout further includes:
若两个节点是竖直对齐的话,则有:If the two nodes are vertically aligned, then:
; ;
; ;
其中,表示节点对应元素的横坐标;表示节点对应元素的宽度;表示节点对应元素的横坐标;表示节点对应元素的宽度。in, represents a node The abscissa of the corresponding element; represents a node The width of the corresponding element; represents a node The abscissa of the corresponding element; represents a node Corresponds to the width of the element.
此外,为实现上述目的,本发明还提供一种具有层次结构布局的混合生成系统,其中,所述具有层次结构布局的混合生成系统包括:In addition, in order to achieve the above object, the present invention also provides a hybrid generation system with a hierarchical layout, wherein the hybrid generation system with a hierarchical layout includes:
所述具有层次结构布局的混合生成系统包括:The hybrid build system with hierarchical layout includes:
信息计算模块,用于接收用户输入的多个布局模板,所述布局模板使用多叉树结构表示,所述多叉树结构中的叶子节点代表所述布局模板中的单个元素,根据节点对应规则计算元素之间的对应关系,得到对应信息;The information calculation module is used to receive multiple layout templates input by the user, the layout templates are represented by a multi-fork tree structure, and the leaf nodes in the multi-fork tree structure represent a single element in the layout template, according to the node corresponding rules Calculate the corresponding relationship between elements to obtain corresponding information;
关系确定模块,用于根据对应信息建立一棵组合树,基于所述组合树根据节点类型并结合用户交互时产生的参数动态确定中间状态元素以及元素之间应满足的关系;The relationship determination module is used to establish a combination tree according to the corresponding information, based on the combination tree, according to the node type and in combination with the parameters generated during user interaction, dynamically determine the intermediate state elements and the relationship that should be satisfied between the elements;
优化生成模块,用于将节点的位置和大小作为软约束,节点之间应满足的关系作为硬约束,优化目标函数,优化求解完成后生成新的多样性布局。The optimization generation module is used to use the position and size of nodes as soft constraints, and the relationship that should be satisfied between nodes as hard constraints, optimize the objective function, and generate a new diversity layout after the optimization solution is completed.
此外,为实现上述目的,本发明还提供一种终端,其中,所述终端包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的具有层次结构布局的混合生成程序,所述具有层次结构布局的混合生成程序被所述处理器执行时实现如上所述的具有层次结构布局的混合生成方法的步骤。In addition, in order to achieve the above object, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a hybrid generator with a hierarchical layout stored on the memory and operable on the processor A program, when the hybrid generation program with a hierarchical layout is executed by the processor, the steps of the above-mentioned hybrid generation method with a hierarchical layout are implemented.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,其中,所述计算机可读存储介质存储有具有层次结构布局的混合生成程序,所述具有层次结构布局的混合生成程序被处理器执行时实现如上所述的具有层次结构布局的混合生成方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a hybrid generation program with a hierarchical layout, and the hybrid generation program with a hierarchical layout is The processor executes the steps to implement the hybrid generation method with hierarchical layout as described above.
本发明中,接收用户输入的多个布局模板,所述布局模板使用多叉树结构表示,所述多叉树结构中的叶子节点代表所述布局模板中的单个元素,根据节点对应规则计算元素之间的对应关系,得到对应信息;根据对应信息建立一棵组合树,基于所述组合树根据节点类型并结合用户交互时产生的参数动态确定中间状态元素以及元素之间应满足的关系;将节点的位置和大小作为软约束,节点之间应满足的关系作为硬约束,优化目标函数,优化求解完成后生成新的多样性布局。本发明只需要输入少量的布局模板而不需要大的数据集用于训练,节约了计算资源,使得用户通过简单的交互就能够生成出全新的多样性布局。In the present invention, a plurality of layout templates input by the user are received, and the layout template is represented by a multi-fork tree structure, and the leaf nodes in the multi-fork tree structure represent a single element in the layout template, and the elements are calculated according to the node corresponding rules According to the corresponding relationship between them, the corresponding information is obtained; a combination tree is established according to the corresponding information, based on the combination tree, the intermediate state elements and the relationship that should be satisfied between the elements are dynamically determined according to the node type and combined with the parameters generated during user interaction; The position and size of nodes are used as soft constraints, and the relationship between nodes is used as hard constraints. The objective function is optimized, and a new diversity layout is generated after the optimization solution is completed. The present invention only needs to input a small number of layout templates and does not need a large data set for training, which saves computing resources and enables users to generate brand new and diverse layouts through simple interaction.
附图说明Description of drawings
图1是本发明具有层次结构布局的混合生成方法的较佳实施例的流程图;Fig. 1 is the flow chart of the preferred embodiment of the hybrid generating method with hierarchical layout of the present invention;
图2是本发明具有层次结构布局的混合生成方法的较佳实施例中第一对应规则的示意图;Fig. 2 is a schematic diagram of the first corresponding rule in a preferred embodiment of the hybrid generation method with hierarchical layout in the present invention;
图3是本发明具有层次结构布局的混合生成方法的较佳实施例中第二对应规则的示意图;Fig. 3 is a schematic diagram of the second corresponding rule in a preferred embodiment of the hybrid generating method with hierarchical layout in the present invention;
图4是本发明具有层次结构布局的混合生成方法的较佳实施例中第三对应规则的示意图;Fig. 4 is a schematic diagram of the third corresponding rule in a preferred embodiment of the hybrid generation method with hierarchical layout in the present invention;
图5是本发明具有层次结构布局的混合生成方法的较佳实施例中第四对应规则的示意图;Fig. 5 is a schematic diagram of the fourth corresponding rule in a preferred embodiment of the hybrid generation method with hierarchical layout in the present invention;
图6是本发明具有层次结构布局的混合生成方法的较佳实施例中根据对应信息创建出的组合树的示意图;Fig. 6 is a schematic diagram of a combination tree created according to corresponding information in a preferred embodiment of the hybrid generation method with hierarchical layout in the present invention;
图7是本发明具有层次结构布局的混合生成方法的较佳实施例中动态确定中间状态的树结构过程的示意图;Fig. 7 is a schematic diagram of the tree structure process of dynamically determining the intermediate state in the preferred embodiment of the hybrid generation method with hierarchical structure layout in the present invention;
图8是本发明具有层次结构布局的混合生成方法的较佳实施例中用户生成的布局以及其对应的可视化结果的示意图;Fig. 8 is a schematic diagram of user-generated layouts and their corresponding visualization results in a preferred embodiment of the hybrid generation method with hierarchical layouts in the present invention;
图9是本发明具有层次结构布局的混合生成系统的较佳实施例的原理示意图;Fig. 9 is a schematic diagram of the principle of a preferred embodiment of the hybrid generation system with hierarchical layout in the present invention;
图10为本发明终端的较佳实施例的运行环境示意图。FIG. 10 is a schematic diagram of an operating environment of a preferred embodiment of the terminal of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention more clear and definite, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明使得用户通过简单的交互就能够生成出全新的布局,进行混合插值前首先要计算布局元素之间的对应,将计算出的对应信息与布局的划分结构保持一致;根据对应信息建立出组合树后制定合适的节点删除策略并根据输入的参数确定中间变量以及变量之间应满足的约束关系;本发明的方法针对元素之间没有明确对应的情况下也能计算出最优的对应,且元素对应结果与布局的划分结构保持一致,也就能用来做混合插值;只需要用户输入至少两个布局模板并通过简单的交互就可以生成出新的布局,生成结果可以用于后续设计师创作等。The invention enables the user to generate a brand new layout through simple interaction. Before performing mixed interpolation, the correspondence between the layout elements must be calculated first, and the calculated corresponding information is consistent with the division structure of the layout; a combination is established according to the corresponding information. Formulate a suitable node deletion strategy after the tree, and determine the intermediate variables and the constraint relationships that should be satisfied between the variables according to the input parameters; the method of the present invention can also calculate the optimal correspondence when there is no clear correspondence between elements, and The element corresponding result is consistent with the division structure of the layout, and can also be used for hybrid interpolation; only need the user to input at least two layout templates and a new layout can be generated through simple interaction, and the generated results can be used by subsequent designers creation etc.
本发明较佳实施例所述的具有层次结构布局的混合生成方法,如图1所示,所述具有层次结构布局的混合生成方法包括以下步骤:The hybrid generation method with hierarchical structure layout described in the preferred embodiment of the present invention, as shown in Figure 1, the described hybrid generation method with hierarchical structure layout includes the following steps:
步骤S10、接收用户输入的多个布局模板,所述布局模板使用多叉树结构表示,所述多叉树结构中的叶子节点代表所述布局模板中的单个元素,根据节点对应规则计算元素之间的对应关系,得到对应信息。Step S10: Receive a plurality of layout templates input by the user, the layout templates are represented by a multi-fork tree structure, and the leaf nodes in the multi-fork tree structure represent individual elements in the layout template, and calculate the relationship between the elements according to the node corresponding rules Correspondence between the corresponding information.
具体地,首先用多叉树结构表示用户输入的布局模板(无论是输入布局还是输出布局均是用多叉树表示),多叉树结构中的叶子节点代表布局中的单个元素,分支节点是其孩子节点的包围盒,叶子节点的父节点为分支节点,例如:有两个兄弟节点(孩子节点)分别对应布局中的两个元素,那么这两个兄弟节点的父节点(分支节点))就是一个方框,该方框刚好能完全“包裹”住那两个元素。做混合插值前首先要计算元素之间的对应,因此预先定义了一系列的节点对应规则。Specifically, firstly, the layout template input by the user is represented by a multi-fork tree structure (both the input layout and the output layout are represented by a multi-fork tree), the leaf nodes in the multi-fork tree structure represent a single element in the layout, and the branch nodes are The bounding box of its child nodes, the parent node of the leaf node is a branch node, for example: if there are two sibling nodes (child nodes) corresponding to two elements in the layout, then the parent node (branch node) of the two sibling nodes) It is a box that just "wraps" those two elements completely. Before doing hybrid interpolation, the correspondence between elements must be calculated first, so a series of node correspondence rules are pre-defined.
其中,所述节点对应规则包括第一对应规则、第二对应规则、第三对应规则和第四对应规则。Wherein, the node correspondence rules include a first correspondence rule, a second correspondence rule, a third correspondence rule and a fourth correspondence rule.
如图2所示,所述第一对应规则包括:As shown in Figure 2, the first corresponding rule includes:
(a)两个具有相似几何信息的叶子节点趋向对应在一起;(a) Two leaf nodes with similar geometric information tend to correspond together;
(b)两个具有相似子结构的分支节点趋向对应在一起;(b) Two branch nodes with similar substructures tend to correspond together;
(c)两个具有不同语义信息的叶子节点不能对应在一起。(c) Two leaf nodes with different semantic information cannot correspond together.
如图3所示,所述第二对应规则包括:As shown in Figure 3, the second corresponding rules include:
(a)叶子节点和分支节点允许对应为空。(a) Leaf nodes and branch nodes are allowed to be empty.
如图4所示,所述第三对应规则包括:As shown in Figure 4, the third corresponding rule includes:
(a)如果两个分支节点和对应在一起,则子树中的节点只能对应子树中的节点或者对应空。(a) If two branch nodes and Corresponding together, the subtree Nodes in can only correspond to subtrees Nodes in or correspond to empty.
如图5所示,所述第四对应规则包括:As shown in Figure 5, the fourth corresponding rule includes:
(a)两个处在不同层级的节点允许对应在一起。(a) Two nodes at different levels are allowed to correspond together.
其中,叶子节点的父节点是分支节点;图2-图5中的圆圈就是节点(分支节点或叶子节点),如果圆圈下面有线,那么该圆圈代表分支节点,圆圈下面没有线,那么该圆圈代表叶子节点;那些不同颜色的矩形框就是布局中的元素,用节点来表示。Among them, the parent node of the leaf node is a branch node; the circle in Figure 2-Figure 5 is a node (branch node or leaf node). Leaf nodes; those rectangular boxes of different colors are the elements in the layout, represented by nodes.
在对应规则的指导下,用递归的方法定义了两个节点之间以及节点与空之间计算对应损失的函数。Under the guidance of the corresponding rules, a recursive method is used to define the function of calculating the corresponding loss between two nodes and between nodes and space.
首先两个叶子节点对应代价定义两个节点位置差的二范式加上大小差的二范式再加上一个与语义信息相关的第一惩罚项,第一惩罚项的引入使得两个语义信息不同的节点不能对应在一起,为以下形式:First, the corresponding cost of two leaf nodes defines the second normal form of the position difference of the two nodes plus the second normal form of the size difference plus a first penalty item related to semantic information , the introduction of the first penalty item makes it impossible for two nodes with different semantic information to correspond together, which is in the following form:
; ;
; ;
其中,和分别表示两个叶子节点;是计算两个叶子节点对应代价的函数;和分别表示两个叶子节点的位置;和分别表示两个叶子节点的大小;和分别表示两个叶子节点对应的语义信息。in, and represent two leaf nodes respectively; is a function to calculate the corresponding cost of two leaf nodes; and represent the positions of the two leaf nodes respectively; and respectively represent the size of the two leaf nodes; and respectively represent the semantic information corresponding to the two leaf nodes.
叶子节点对应空的代价为该叶子节点对应一个大小为0的节点的损失,具体为该节点大小与0差的二范式再加上一个第二惩罚项,为:Leaf node corresponds to the empty cost The loss of the leaf node corresponding to a node with a size of 0, specifically the second normal form of the difference between the size of the node and 0 plus a second penalty item ,for:
; ;
其中,设定。Among them, set .
分支节点对应空的代价定义为该分支内所有叶子节点对应空的代价的累积和,为:The cost corresponding to the null of a branch node is defined as the cumulative sum of the costs corresponding to the null of all leaf nodes in the branch, which is:
; ;
其中,是计算分支节点与空对应代价的函数,是该分支节点下的叶子节点。in, is a function to calculate the cost corresponding to the branch node and empty, It is the leaf node under the branch node.
分支节点对应叶子节点的代价:递归调用先前定义的计算损失方法来计算该分支节点的孩子节点与叶子节点的代价;同理,计算该分支节点的孩子节点对空的代价以及叶子节点对空的代价;然后用计算出的代价值构建一个二维矩阵并通过匈牙利算法求解就可以得到一个最小的损失以及最优的匹配结果。The cost of the branch node corresponding to the leaf node: recursively call the previously defined calculation loss method to calculate the cost of the child node of the branch node and the leaf node; similarly, calculate the cost of the child node of the branch node and the cost of the leaf node to the null cost; then use the calculated cost value to construct a two-dimensional matrix and solve it through the Hungarian algorithm to get a minimum loss and the best matching result.
分支节点对应分支节点的计算代价分三种情况:The calculation cost of the branch node corresponding to the branch node is divided into three cases:
(1)两个分支节点都不下沉;递归调用先前定义的计算损失方法来计算第一个分支节点的孩子节点与另一分支节点的孩子节点之间的代价;计算第一个分支节点的孩子节点对空的代价以及第二个分支节点的孩子节点对空的代价;用计算出的代价值构建一个二维矩阵并通过匈牙利算法求解就得到一个损失值记为;(1) Both branch nodes are not sinking; recursively call the previously defined calculation loss method to calculate the cost between the child node of the first branch node and the child node of the other branch node; calculate the child of the first branch node The cost of the node to the null and the child node of the second branch node to the null; construct a two-dimensional matrix with the calculated cost value and solve it by the Hungarian algorithm to obtain a loss value recorded as ;
(2)第一个分支节点下沉一级,第二个分支节点不下沉;递归调用先前定义的计算损失方法来计算第一个分支节点与另一分支节点的孩子节点之间的代价;计算第一个分支节点对空的代价以及第二个分支节点的孩子节点对空的代价;用计算出的代价值构建一个二维矩阵并通过匈牙利算法求解得到一个损失值记为;(2) The first branch node sinks one level, and the second branch node does not sink; recursively call the previously defined calculation loss method to calculate the cost between the first branch node and the child node of another branch node; calculate The cost of the first branch node to the null and the child node of the second branch node to the null; use the calculated cost value to construct a two-dimensional matrix and solve it through the Hungarian algorithm to obtain a loss value recorded as ;
(3)第一个分支节点不下沉,第二个分支节点下沉一级;递归调用先前定义的计算损失方法来计算第一个分支节点的孩子节点与另一分支节点之间的代价;计算第一个分支节点的孩子节点对空的代价以及第二个分支节点对空的代价;用计算出的代价值构建一个二维矩阵并通过匈牙利算法求解得到一个损失值记为;(3) The first branch node does not sink, and the second branch node sinks one level; recursively call the previously defined calculation loss method to calculate the cost between the child node of the first branch node and another branch node; calculate The cost of the child node of the first branch node to the null and the cost of the second branch node to the null; use the calculated cost value to construct a two-dimensional matrix and solve it through the Hungarian algorithm to obtain a loss value recorded as ;
那么,最终损失值,这两个分支节点内的元素对应结果等于损失值最小的对应的匹配;将两个布局的根节点作为参数传入定义的递归函数中得到总体的对应损失值以及两个布局元素之间的对应信息。Then, the final loss value , the corresponding result of the elements in these two branch nodes is equal to the corresponding match with the smallest loss value; pass the root nodes of the two layouts as parameters into the defined recursive function to get the overall corresponding loss value and the relationship between the two layout elements corresponding information.
步骤S20、根据对应信息建立一棵组合树,基于所述组合树根据节点类型并结合用户交互时产生的参数动态确定中间状态元素以及元素之间应满足的关系。Step S20, build a combination tree according to the corresponding information, based on the combination tree, dynamically determine the intermediate state elements and the relationship between the elements according to the node type and in combination with the parameters generated during user interaction.
具体地,根据计算出的元素之间的对应,建立出一棵组合树;如图6所示,所述组合树包括三类节点,第一类节点是在两棵树中都有对应的节点,例如节点[15,16];第二类节点是只在第一棵树中有对应的节点,例如节点[10,];第三类节点是只在第二棵树中有对应的节点,例如节点[,7]。Specifically, according to the calculated correspondence between elements, a combined tree is established; as shown in Figure 6, the combined tree includes three types of nodes, and the first type of nodes has corresponding nodes in both trees , such as node [15, 16]; the second type of node has a corresponding node only in the first tree, such as node [10, ]; the third type of node is a node that only has a corresponding node in the second tree, such as node [ , 7].
如图7所示,分别针对第二类节点和第三类节点按照所在的层级均匀地分配一个删除阈值,然后根据输入的参数动态确定中间状态的树结构以及兄弟节点(有相同的父节点的节点即是兄弟节点,例如,在图6左上角的那棵树中,节点10和节点11就是兄弟节点)之间应满足的关系。As shown in Figure 7, a deletion threshold is evenly assigned to the second type of nodes and the third type of nodes according to the level they are in, and then the tree structure of the intermediate state and sibling nodes (with the same parent node) are dynamically determined according to the input parameters. Nodes are sibling nodes. For example, in the tree in the upper left corner of Figure 6,
其中,兄弟节点之间的关系包括等大小、等间距和对齐。Among them, the relationship between sibling nodes includes equal size, equal spacing and alignment.
步骤S30、将节点的位置和大小作为软约束,节点之间应满足的关系作为硬约束,优化目标函数,优化求解完成后生成新的多样性布局。Step S30 , taking the positions and sizes of nodes as soft constraints, and the relationship that should be satisfied between nodes as hard constraints, optimizing the objective function, and generating a new diversity layout after the optimization solution is completed.
具体地,当输入的参数值小于0.5时,用第一棵树(图6左上,即输入的第一个布局)中的关系,否则,用第二树中(图6右上,即输入的第二个布局)的关系。Specifically, when the input parameter value When it is less than 0.5, use the relationship in the first tree (upper left in Figure 6, that is, the first input layout), otherwise, use the relationship in the second tree (upper right in Figure 6, that is, the second input layout).
求解时将位置和大小作为软约束,节点之间应满足的关系作为硬约束,要优化的目标函数如下:When solving, the position and size are used as soft constraints, and the relationship that should be satisfied between nodes is used as hard constraints. The objective function to be optimized is as follows:
; ;
其中,是度量位置差的能量方程,是度量大小差的能量方程。in, is the energy equation to measure the position difference, is the energy equation that measures the magnitude difference.
; ;
; ;
其中,是中间状态树中的一个节点;代表该节点要求解的位置量;代表该节点要求解的大小值;如果为空,则指示函数,否则;表示节点对应在第一棵树中的节点的位置;表示节点的大小;表示节点对应在第二棵树中的节点的位置;表示节点的大小;在一系列硬约束下最小化目标函数。in, is a node in the intermediate state tree; Represents the position quantity that the node needs to solve; Represents the size value that the node needs to solve; if is empty, the indicator function ,otherwise ; represents a node corresponds to the node in the first tree s position; represents a node the size of; represents a node corresponds to the node in the second tree s position; represents a node The size of ; minimizes the objective function under a set of hard constraints.
例如,若两个节点是竖直对齐的话,则有:For example, if two nodes are vertically aligned, then:
; ;
; ;
其中,表示节点对应元素的横坐标;表示节点对应元素的宽度;表示节点对应元素的横坐标;表示节点对应元素的宽度。in, represents a node The abscissa of the corresponding element; represents a node The width of the corresponding element; represents a node The abscissa of the corresponding element; represents a node Corresponds to the width of the element.
同理,其它硬约束也可以写成类似的线性等式形式,求解该二次规划问题就可以得到每个节点的位置和大小。Similarly, other hard constraints can also be written in a similar linear equation form, and the position and size of each node can be obtained by solving the quadratic programming problem.
如图8所示,邀请多名实验者参与到交互系统的体验之中,实验者从候选布局模板集中挑选三个布局模板作为输入,通过本发明的方法自动生成布局。实验者从生成的结果中挑选5个不同的布局保存下来,上述过程重复5次。最后对实验者进行了用户调研,实验者表示使用本发明的工具(方法)可以生成多样、合理、美观的布局。本发明进而将这些结果用于海报等内容的制作,取得了美观的可视化效果。As shown in Figure 8, a number of experimenters are invited to participate in the experience of the interactive system, and the experimenters select three layout templates from the set of candidate layout templates as input, and the layout is automatically generated by the method of the present invention. The experimenter selected 5 different layouts from the generated results and saved them, and the above process was repeated 5 times. Finally, a user survey was conducted on the experimenters, and the experimenters indicated that various, reasonable and beautiful layouts can be generated by using the tool (method) of the present invention. The present invention further applies these results to the production of content such as posters, and obtains beautiful visualization effects.
本发明提出方法只需要输入少量的布局模板而不需要大的数据集用于训练,节约了计算资源;方便用户通过简单的交互就可以生成多样性的布局。The method proposed by the invention only needs to input a small number of layout templates and does not need a large data set for training, which saves computing resources; it is convenient for users to generate diverse layouts through simple interaction.
本发明的主要内容是具有层次结构布局的混合生成方法,用户输入多个布局模板后,本发明可以自动计算元素之间的对应,然后根据对应信息建立一棵组合树,结合用户交互时产生的参数动态决定中间状态元素以及元素之间应满足的关系,最后优化求解生成新的布局。进一步还提供局部编辑功能,用户可以固定或单独改变生成结果的某一部分用于增加生成布局的多样性。The main content of the present invention is a hybrid generation method with a hierarchical structure layout. After the user inputs multiple layout templates, the present invention can automatically calculate the correspondence between elements, and then build a combined tree according to the corresponding information, combined with the user interaction generated The parameters dynamically determine the intermediate state elements and the relationship between the elements, and finally optimize the solution to generate a new layout. Further, a local editing function is also provided, and the user can fix or change a certain part of the generated result separately to increase the diversity of the generated layout.
进一步地,如图9所示,基于上述具有层次结构布局的混合生成方法,本发明还相应提供了一种具有层次结构布局的混合生成系统,其中,所述具有层次结构布局的混合生成系统包括:Further, as shown in FIG. 9 , based on the above hybrid generation method with hierarchical layout, the present invention also provides a hybrid generation system with hierarchical layout, wherein the hybrid generation system with hierarchical layout includes :
信息计算模块51,用于接收用户输入的多个布局模板,所述布局模板使用多叉树结构表示,所述多叉树结构中的叶子节点代表所述布局模板中的单个元素,根据节点对应规则计算元素之间的对应关系,得到对应信息;The
关系确定模块52,用于根据对应信息建立一棵组合树,基于所述组合树根据节点类型并结合用户交互时产生的参数动态确定中间状态元素以及元素之间应满足的关系;The
优化生成模块53,用于将节点的位置和大小作为软约束,节点之间应满足的关系作为硬约束,优化目标函数,优化求解完成后生成新的多样性布局。The
进一步地,如图10所示,基于上述具有层次结构布局的混合生成方法和系统,本发明还相应提供了一种终端,所述终端包括处理器10、存储器20及显示器30。图10仅示出了终端的部分组件,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Further, as shown in FIG. 10 , based on the above hybrid generation method and system with hierarchical layout, the present invention also provides a terminal correspondingly, and the terminal includes a
所述存储器20在一些实施例中可以是所述终端的内部存储单元,例如终端的硬盘或内存。所述存储器20在另一些实施例中也可以是所述终端的外部存储设备,例如所述终端上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(SecureDigital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器20还可以既包括所述终端的内部存储单元也包括外部存储设备。所述存储器20用于存储安装于所述终端的应用软件及各类数据,例如所述安装终端的程序代码等。所述存储器20还可以用于暂时地存储已经输出或者将要输出的数据。在一实施例中,存储器20上存储有具有层次结构布局的混合生成程序40,该具有层次结构布局的混合生成程序40可被处理器10所执行,从而实现本申请中具有层次结构布局的混合生成方法。The
所述处理器10在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行所述存储器20中存储的程序代码或处理数据,例如执行所述具有层次结构布局的混合生成方法等。In some embodiments, the
所述显示器30在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。所述显示器30用于显示在所述终端的信息以及用于显示可视化的用户界面。所述终端的部件10-30通过系统总线相互通信。In some embodiments, the
在一实施例中,当处理器10执行所述存储器20中具有层次结构布局的混合生成程序40时实现所述具有层次结构布局的混合生成方法的步骤。In one embodiment, when the
本发明还提供一种计算机可读存储介质,其中,所述计算机可读存储介质存储有具有层次结构布局的混合生成程序,所述具有层次结构布局的混合生成程序被处理器执行时实现如上所述的具有层次结构布局的混合生成方法的步骤。The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a hybrid generation program with a hierarchical layout, and when the hybrid generation program with a hierarchical layout is executed by a processor, the above Steps of the hybrid generative method with hierarchical layout described above.
综上所述,本发明提供一种具有层次结构布局的混合生成方法及相关设备,所述方法包括:接收用户输入的多个布局模板,所述布局模板使用多叉树结构表示,所述多叉树结构中的叶子节点代表所述布局模板中的单个元素,根据节点对应规则计算元素之间的对应关系,得到对应信息;根据对应信息建立一棵组合树,基于所述组合树根据节点类型并结合用户交互时产生的参数动态确定中间状态元素以及元素之间应满足的关系;将节点的位置和大小作为软约束,节点之间应满足的关系作为硬约束,优化目标函数,优化求解完成后生成新的多样性布局。本发明只需要输入少量的布局模板而不需要大的数据集用于训练,节约了计算资源,使得用户通过简单的交互就能够生成出全新的多样性布局。To sum up, the present invention provides a hybrid generation method with a hierarchical layout and related equipment, the method includes: receiving multiple layout templates input by the user, the layout templates are represented by a multi-fork tree structure, and the multiple The leaf nodes in the fork tree structure represent a single element in the layout template, and calculate the corresponding relationship between elements according to the node corresponding rules to obtain corresponding information; establish a combination tree according to the corresponding information, and based on the combination tree according to the node type Combined with the parameters generated during user interaction, the intermediate state elements and the relationship that should be satisfied between the elements are dynamically determined; the position and size of the nodes are used as soft constraints, and the relationship that should be satisfied between nodes is used as hard constraints, the objective function is optimized, and the optimization solution is completed Then generate a new diversity layout. The present invention only needs to input a small number of layout templates and does not need a large data set for training, which saves computing resources and enables users to generate brand new and diverse layouts through simple interaction.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者终端中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or terminal comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or terminal. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article or terminal comprising the element.
当然,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关硬件(如处理器,控制器等)来完成,所述的程序可存储于一计算机可读取的计算机可读存储介质中,所述程序在执行时可包括如上述各方法实施例的流程。其中所述的计算机可读存储介质可为存储器、磁碟、光盘等。Of course, those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be realized by instructing related hardware (such as processors, controllers, etc.) through computer programs, and the programs can be stored in a In the computer-readable computer-readable storage medium, the program may include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium described herein may be a memory, a magnetic disk, an optical disk, and the like.
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that the application of the present invention is not limited to the above examples, and those skilled in the art can make improvements or transformations according to the above descriptions, and all these improvements and transformations should belong to the protection scope of the appended claims of the present invention.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211121484.6A CN115202661B (en) | 2022-09-15 | 2022-09-15 | A hybrid generation method with hierarchical layout and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211121484.6A CN115202661B (en) | 2022-09-15 | 2022-09-15 | A hybrid generation method with hierarchical layout and related equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115202661A CN115202661A (en) | 2022-10-18 |
CN115202661B true CN115202661B (en) | 2022-11-29 |
Family
ID=83571840
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211121484.6A Active CN115202661B (en) | 2022-09-15 | 2022-09-15 | A hybrid generation method with hierarchical layout and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115202661B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116933713A (en) * | 2022-03-30 | 2023-10-24 | 华为技术有限公司 | Module arrangement method of chip and related equipment |
CN117058491B (en) * | 2023-10-12 | 2024-04-02 | 深圳大学 | Structured grid layout generation method and device based on recursive neural network |
CN117828701B (en) * | 2024-03-05 | 2024-05-24 | 中国石油大学(华东) | Engineering drawing layout optimization method, system, equipment and medium |
CN119248856B (en) * | 2024-11-26 | 2025-03-11 | 恒生电子股份有限公司 | Report generation method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101339571A (en) * | 2007-11-01 | 2009-01-07 | 复旦大学 | A Realization Method of Concentration Constraints in VLSI Layout Planning |
CN111354076A (en) * | 2020-02-29 | 2020-06-30 | 北京航空航天大学 | Single-image three-dimensional part combined modeling method based on embedding space |
CN111625235A (en) * | 2020-04-17 | 2020-09-04 | 北京大学 | Method and system for constructing and deconstructing tree visualization form based on descriptive language |
CN113420804A (en) * | 2021-06-18 | 2021-09-21 | 工业互联网创新中心(上海)有限公司 | Data processing method, device, network equipment and storage medium |
CN113688593A (en) * | 2021-08-11 | 2021-11-23 | 上海交通大学 | Hybrid bonding layout and wiring optimization method among three-dimensional integrated circuit chips |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9350641B2 (en) * | 2011-11-01 | 2016-05-24 | Alcatel Lucent | IP fast reroute scheme offering full protection |
US11710033B2 (en) * | 2018-06-12 | 2023-07-25 | Bank Of America Corporation | Unsupervised machine learning system to automate functions on a graph structure |
-
2022
- 2022-09-15 CN CN202211121484.6A patent/CN115202661B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101339571A (en) * | 2007-11-01 | 2009-01-07 | 复旦大学 | A Realization Method of Concentration Constraints in VLSI Layout Planning |
CN111354076A (en) * | 2020-02-29 | 2020-06-30 | 北京航空航天大学 | Single-image three-dimensional part combined modeling method based on embedding space |
CN111625235A (en) * | 2020-04-17 | 2020-09-04 | 北京大学 | Method and system for constructing and deconstructing tree visualization form based on descriptive language |
CN113420804A (en) * | 2021-06-18 | 2021-09-21 | 工业互联网创新中心(上海)有限公司 | Data processing method, device, network equipment and storage medium |
CN113688593A (en) * | 2021-08-11 | 2021-11-23 | 上海交通大学 | Hybrid bonding layout and wiring optimization method among three-dimensional integrated circuit chips |
Non-Patent Citations (2)
Title |
---|
Efficient tree layout in a multilevel memory hierar;Alstrup, S 等;《arXiv preprint cs》;20021231;全文 * |
基于O-TREE树表示的总线约束在VLSI/PCB布局中的应用;李煜 等;《成都信息工程学院学报》;20051020;第20卷(第03期);291-296 * |
Also Published As
Publication number | Publication date |
---|---|
CN115202661A (en) | 2022-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115202661B (en) | A hybrid generation method with hierarchical layout and related equipment | |
CN101971204B (en) | Arranging graphic objects on a page with relative position based control | |
Boudon et al. | Interactive design of bonsai tree models | |
US6823299B1 (en) | Modeling objects, systems, and simulations by establishing relationships in an event-driven graph in a computer implemented graphics system | |
CN102193786B (en) | Device and method for constructing self-adaptive graphic user interface (GUI) | |
US11557088B2 (en) | Generating space models from map files | |
WO2015196784A1 (en) | Visual software modeling method based on software meta-view for constructing software view | |
CN109933311A (en) | A kind of information system creation method and relevant apparatus | |
US20240420083A1 (en) | Digital work collaborative creation method, electronic device and computer-readable storage medium | |
WO2015196788A1 (en) | Visual interface modelling editor for constructing interface model | |
Tsandilas | StructGraphics: Flexible visualization design through data-agnostic and reusable graphical structures | |
US11880378B2 (en) | Data visualization analytical canvas with functionally independent visual containers | |
Li et al. | HiTailor: Interactive transformation and visualization for hierarchical tabular data | |
CN117631618B (en) | A real-time optimization method and system for DCS logic configuration screen connection | |
Huang et al. | Plantography: Incorporating iterative design process into generative artificial intelligence for landscape rendering | |
US20240168966A1 (en) | Data Visualization Analytical Canvas with Functionally Independent Visual Containers | |
WO2015196785A1 (en) | Visual software modelling editor for constructing software model | |
Schindler et al. | Multiverse data-flow control | |
Lipp et al. | Local editing of procedural models | |
CN117828701B (en) | Engineering drawing layout optimization method, system, equipment and medium | |
Henry | Interactive graph layout: The exploration of large graphs | |
CN114117645A (en) | Ship overall performance prediction integrated application system | |
Cruz et al. | Drawing graphs by example efficiently: Trees and planar acyclic digraphs | |
Paetzold et al. | RectEuler: visualizing intersecting sets using rectangles | |
Van Ommering et al. | Languages for formalizing, visualizing and verifying software architectures |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |