CN110222324A - A kind of autoplacement device based on text paragraph structure and font size change rate - Google Patents

A kind of autoplacement device based on text paragraph structure and font size change rate Download PDF

Info

Publication number
CN110222324A
CN110222324A CN201910421809.4A CN201910421809A CN110222324A CN 110222324 A CN110222324 A CN 110222324A CN 201910421809 A CN201910421809 A CN 201910421809A CN 110222324 A CN110222324 A CN 110222324A
Authority
CN
China
Prior art keywords
font size
block
priority
change rate
grid
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.)
Granted
Application number
CN201910421809.4A
Other languages
Chinese (zh)
Other versions
CN110222324B (en
Inventor
李荣陆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Agui Network Technology Co Ltd
Original Assignee
Shanghai Agui Network Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Agui Network Technology Co Ltd filed Critical Shanghai Agui Network Technology Co Ltd
Priority to CN201910421809.4A priority Critical patent/CN110222324B/en
Publication of CN110222324A publication Critical patent/CN110222324A/en
Application granted granted Critical
Publication of CN110222324B publication Critical patent/CN110222324B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The present invention relates to planar design technology fields, in particular to a kind of autoplacement device based on text paragraph structure and font size change rate, pass through the autoplacement device based on text paragraph structure and font size change rate, the text for needing to be laid out is carried out the confirmation of priority division and " block " size by user, so generate several layout trees, grid in layout tree can change automatically according to the change rate of text, therefore it does not need designer and repeats adjustment lattice dimensions, to substantially reduce the repeated work of designer, remove the trouble of repetition adjustment size and parameter from, improve out figure efficiency.

Description

A kind of autoplacement device based on text paragraph structure and font size change rate
Technical field
It is the present invention relates to planar design technology field, in particular to a kind of based on text paragraph structure and font size change rate Autoplacement device.
Background technique
When carrying out planar design, designer's common practice is to use a Background as background, is then looked for Then the foreground area of this back out places logo, decoration or text in these foreground areas.
These regions for being used to place text are referred to as " block " by we.Such as: with red dotted box mark in poster Region out is exactly " block ", and there are four " blocks " altogether in this poster.These " blocks " need a layout, so as to than Text is more aesthetically put into these regions.
Currently, the identification of the background and foreground area of a picture passes through these algorithms with the presence of a large amount of algorithm It can identify " block ".But the autoplacement of content in " block " is still solved the problems, such as without good algorithm.If this Problem is available preferably to be solved, and automatically generates such planar design then can realize along this thinking.
The present apparatus proposes a kind of autoplacement device based on text paragraph structure and font size change rate, may be implemented The autoplacement of word content in " block " has established certain basis for intelligent automation planar design.
Summary of the invention
Therefore, for above-mentioned problem, the present invention proposes a kind of automatic based on text paragraph structure and font size change rate Placement device, by the autoplacement device based on text paragraph structure and font size change rate, needs are laid out by user Text carries out the confirmation of priority division and " block " size, so generates several layout trees, and the grid in layout tree can basis The change rate of text changes automatically, therefore does not need designer and repeat adjustment lattice dimensions, to substantially reduce the repetition of designer Work removes the trouble of repetition adjustment size and parameter from, improves out figure efficiency.
To realize above-mentioned technical problem, the solution that the present invention takes are as follows: one kind is based on text paragraph structure and font size The autoplacement device of change rate, which is characterized in that including layout generator;The autoplacement method of the layout generator is such as Under:
Step (1) user carries out preferentially content to the customized input content of layout generator, while according to content design intention Grade setting, the priority level initializing rule are since P0, and number is smaller, represents that priority is higher, and the priority represents The relative size of text font size in grid, the high content of priority are bound to the font size bigger using the content lower than priority.
Step (2) layout generator generates layout tree to content according to priority level initializing, wherein the tree node of layout tree Grid is corresponding with priority-level to be generated;User can rotate the layout tree tree node of generation, adjust, and obtain different Layout.
After step (3) layout tree generates, specific lattice dimensions, the ruler for drawing grids are obtained according to the algorithm flow of grid Very little calculation method includes following process:
An initial size range S is arranged to P0 in process (1)a~Sb
The font size value S that P0 is arranged in process (2) is Sb
Process (3) calculates the font size value of different priorities according to the font size value and font size change rate function of P0;
Each grid is placed word content as independent one big section, according to process (3) by process (4);Difference is calculated Then the font size of priority puts these texts together, trial places them into " block ", is recycled according to result is put into It calculates, the circulation is as follows:
1. whole texts can be put into, and the area of remaining space is less than or equal to the k% of " block " gross area, then jumping to Process (5).
2. whole texts can be put into, and the area of remaining space is greater than the k% of " block " gross area, S is modifiedaValue For (Sb+Sa)/2 are rounded downwards, then branch to process (3);
3. can not be put into whole texts, the value for modifying Sb is (Sb+Sa)/2 round up, and then branch to process (3);
4. the font size of the condition of satisfaction can not be found, after whole texts can be put by selection, the area accounting of remaining space is most connect The font size of nearly k% is as calculated result;
Process (5) is accounted for according to the typesetting in process (4) as a result, calculating space of the text corresponding to each grid in " block " Than.
The corresponding font size size of each priority and accounting of each grid in " block " are obtained according to above-mentioned process, most Lattice dimensions are obtained eventually.
Further, the font size change rate functional relation includes:
Power function: f(x)=mxa, wherein m and a is empirical coefficient;
Exponential function: f(x)=lbx, wherein l and b is empirical coefficient;
Logarithmic function: f (x)=clog (x), wherein c is empirical coefficient.
By using preceding solution, the beneficial effects of the present invention are: being based on text paragraph structure and word as described above The autoplacement device of number change rate, client can first determine the size of one " block ", later can be according to the demand pair of client Text paragraph carries out priority distribution, selects distribution form further according to the hobby of oneself after distributing, at this time the grid in layout tree Lattice will will do it automatic variation, solve the current text layout that changes and need to carry out cumbersome operation, so that the work of designer The problem of decreasing efficiency.
Detailed description of the invention
Fig. 1 is the algorithm flow chart of lattice dimensions of the present invention.
Specific embodiment
Now in conjunction with the drawings and specific embodiments, the present invention is further described.
Embodiment 1
A kind of autoplacement device based on text paragraph structure and font size change rate, which is characterized in that including layout generator; The autoplacement method of the layout generator is as follows:
Step (1) user carries out preferentially content to the customized input content of layout generator, while according to content design intention Grade setting, the priority level initializing rule are since P0, and number is smaller, represents that priority is higher, and the priority represents The relative size of text font size in grid, the high content of priority are bound to the font size bigger using the content lower than priority.
Step (2) layout generator generates layout tree to content according to priority level initializing, wherein the tree node of layout tree Grid is corresponding with priority-level to be generated;User can rotate the layout tree tree node of generation, adjust, and obtain different Layout.
After step (3) layout tree generates, specific lattice dimensions, the ruler for drawing grids are obtained according to the algorithm flow of grid Very little calculation method includes following process:
An initial size range S is arranged to P0 in process (1)a~Sb.Generally we are by SaValue be 1, SbValue be 200. SaValue can also according to the size of " block " carry out one estimation;
The font size value S that P0 is arranged in process (2) is Sb
Process (3) calculates the font size value of different priorities according to the font size value and font size change rate function of P0.Wherein, font size becomes The predefined power function of system, exponential function, logarithmic function can be used in rate function, can also be determined by client oneself Justice.
Each grid is placed word content as independent one big section, according to process (3) by process (4);It is calculated Then the font size of different priorities puts these texts together, trial places them into " block ", carries out according to result is put into Cycle calculations, the circulation are as follows:
1. whole texts can be put into, and the area of remaining space is less than or equal to the k% of " block " gross area, then jumping to Process (5).Wherein k is empirical coefficient, generally 5.
2. whole texts can be put into, and the area of remaining space is greater than the k% of " block " gross area, S is modifiedaValue For (Sb+Sa)/2 are rounded downwards, then branch to process (3);
3. whole texts can not be put into, S is modifiedbValue be (Sb+Sa)/2 round up, and then branch to process (3);
4. the font size of the condition of satisfaction can not be found, after whole texts can be put by selection, the area accounting of remaining space is most connect The font size of nearly k% is as calculated result;
Process (5) is accounted for according to the typesetting in process (4) as a result, calculating space of the text corresponding to each grid in " block " Than.
The corresponding font size size of each priority and accounting of each grid in " block " are obtained according to above-mentioned process, most Lattice dimensions are obtained eventually.
Finally obtain the corresponding font size size of each priority and accounting of each grid in " block ".
Further, the font size change rate functional relation includes:
Power function: f(x)=mxa, wherein m and a is empirical coefficient;
Exponential function: f(x)=lbx, wherein l and b is empirical coefficient;
Logarithmic function: f (x)=clog (x), wherein c is empirical coefficient.
The foregoing descriptions are merely the embodiment using this origination techniques content, any those skilled in the art use this wound Make done modifications and changes, all belong to the scope of the patents of this creation opinion, and is not limited to those disclosed embodiments.

Claims (2)

1. a kind of autoplacement device based on text paragraph structure and font size change rate, which is characterized in that generated including layout Device;The autoplacement method of the layout generator is as follows:
Step (1) user carries out preferentially content to the customized input content of layout generator, while according to content design intention Grade setting, the priority level initializing rule are since P0, and number is smaller, represents that priority is higher, and the priority represents The relative size of text font size in grid, the high content of priority are bound to the font size bigger using the content lower than priority;
Step (2) layout generator generates layout tree to content according to priority level initializing, wherein the tree node grid of layout tree It is corresponding with priority-level to generate;User can rotate the layout tree tree node of generation, adjust, and obtain different cloth Office;
After step (3) layout tree generates, specific lattice dimensions are obtained according to the algorithm flow of grid, the lattice dimensions Calculation method includes following process:
An initial size range S is arranged to P0 in process (1)a~Sb
The font size value S that P0 is arranged in process (2) is Sb
Process (3) calculates the font size value of different priorities according to the font size value and font size change rate function of P0;
Each grid is placed word content as independent one big section by process (4), is calculated according to process (3) different excellent Then the font size of first grade puts these texts together, trial places them into " block ", carries out circulation meter according to result is put into It calculates, the circulation is as follows:
(1) whole texts are put into " block ", and the area of remaining space is less than or equal to the k% of " block " gross area, then jumping to Process (5);
(2) whole texts are put into " block ", and the area of remaining space is greater than the k% of " block " gross area, modify SaValue be (Sb +Sa)/2 are rounded downwards, then branch to process (3);
(3) whole texts can not be put into " block ", modify SbValue be (Sb+Sa)/2 round up, and then branch to process (3);
(4) font size of the condition of satisfaction can not be found, after whole texts can be put by selection, the area accounting of remaining space is most connect The font size of nearly k% is as calculated result;
Process (5) is accounted for according to the typesetting in process (4) as a result, calculating space of the text corresponding to each grid in " block " Than;
The corresponding font size size of each priority and accounting of each grid in " block " are obtained according to above-mentioned process, it is final to obtain Lattice dimensions out.
2. the autoplacement device based on text paragraph structure and font size change rate according to claim 1, which is characterized in that described Font size change rate functional relation includes:
Power function: f(x)=mxa, wherein m and a is empirical coefficient;
Exponential function: f(x)=lbx, wherein l and b is empirical coefficient;
Logarithmic function: f (x)=clog (x), wherein c is empirical coefficient.
CN201910421809.4A 2019-05-21 2019-05-21 Automatic layout device based on character paragraph structure and word size change rate Active CN110222324B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910421809.4A CN110222324B (en) 2019-05-21 2019-05-21 Automatic layout device based on character paragraph structure and word size change rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910421809.4A CN110222324B (en) 2019-05-21 2019-05-21 Automatic layout device based on character paragraph structure and word size change rate

Publications (2)

Publication Number Publication Date
CN110222324A true CN110222324A (en) 2019-09-10
CN110222324B CN110222324B (en) 2022-11-08

Family

ID=67821580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910421809.4A Active CN110222324B (en) 2019-05-21 2019-05-21 Automatic layout device based on character paragraph structure and word size change rate

Country Status (1)

Country Link
CN (1) CN110222324B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040252341A1 (en) * 2003-06-13 2004-12-16 Canon Kabushiki Kaisha Layout apparatus, layout method, and program product
CN101876967A (en) * 2010-03-25 2010-11-03 深圳市万兴软件有限公司 Method for generating PDF text paragraphs
JP2011103135A (en) * 2005-10-18 2011-05-26 Fujifilm Corp Album creating apparatus, album creating method and album creating program
CN102841888A (en) * 2012-09-14 2012-12-26 《中国学术期刊(光盘版)》电子杂志社 Rapid typesetting system and method
US20140289615A1 (en) * 2013-03-19 2014-09-25 Xiaomi Inc. Method and device for typesetting
CN104123269A (en) * 2014-07-16 2014-10-29 华中科技大学 Semi-automatic publication generation method and system based on template
CN104509078A (en) * 2012-08-09 2015-04-08 李永贵 Keyboard and mouse of cellular phone
CN104516891A (en) * 2013-09-27 2015-04-15 北大方正集团有限公司 Layout analyzing method and system
CN105045776A (en) * 2015-09-07 2015-11-11 武汉大学 Automatic page type setting method
US20150339841A1 (en) * 2014-05-22 2015-11-26 Microsoft Corporation Layout animation panel
US20160012465A1 (en) * 2014-02-08 2016-01-14 Jeffrey A. Sharp System and method for distributing, receiving, and using funds or credits and apparatus thereof
CN106066790A (en) * 2016-05-25 2016-11-02 乐视控股(北京)有限公司 A kind of method and apparatus that control halation is set
CN106326854A (en) * 2016-08-19 2017-01-11 掌阅科技股份有限公司 Open fixed-layout document paragraph identification method
CN108416827A (en) * 2018-02-11 2018-08-17 李荣陆 A kind of planar design autoplacement device and method analyzed based on data-driven and material
CN108597002A (en) * 2018-03-21 2018-09-28 李荣陆 A kind of autoplacement device based on deeply study
CN109062885A (en) * 2018-07-16 2018-12-21 广州视源电子科技股份有限公司 Method, device and equipment for adjusting layout of text box
CN109658329A (en) * 2018-11-30 2019-04-19 上海沐传工业设计有限公司 A kind of poster layout design tool tree-like based on grid

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040252341A1 (en) * 2003-06-13 2004-12-16 Canon Kabushiki Kaisha Layout apparatus, layout method, and program product
JP2011103135A (en) * 2005-10-18 2011-05-26 Fujifilm Corp Album creating apparatus, album creating method and album creating program
CN101876967A (en) * 2010-03-25 2010-11-03 深圳市万兴软件有限公司 Method for generating PDF text paragraphs
CN104509078A (en) * 2012-08-09 2015-04-08 李永贵 Keyboard and mouse of cellular phone
CN102841888A (en) * 2012-09-14 2012-12-26 《中国学术期刊(光盘版)》电子杂志社 Rapid typesetting system and method
US20140289615A1 (en) * 2013-03-19 2014-09-25 Xiaomi Inc. Method and device for typesetting
CN104516891A (en) * 2013-09-27 2015-04-15 北大方正集团有限公司 Layout analyzing method and system
US20160012465A1 (en) * 2014-02-08 2016-01-14 Jeffrey A. Sharp System and method for distributing, receiving, and using funds or credits and apparatus thereof
US20150339841A1 (en) * 2014-05-22 2015-11-26 Microsoft Corporation Layout animation panel
CN104123269A (en) * 2014-07-16 2014-10-29 华中科技大学 Semi-automatic publication generation method and system based on template
CN105045776A (en) * 2015-09-07 2015-11-11 武汉大学 Automatic page type setting method
CN106066790A (en) * 2016-05-25 2016-11-02 乐视控股(北京)有限公司 A kind of method and apparatus that control halation is set
CN106326854A (en) * 2016-08-19 2017-01-11 掌阅科技股份有限公司 Open fixed-layout document paragraph identification method
CN108416827A (en) * 2018-02-11 2018-08-17 李荣陆 A kind of planar design autoplacement device and method analyzed based on data-driven and material
CN108597002A (en) * 2018-03-21 2018-09-28 李荣陆 A kind of autoplacement device based on deeply study
CN109062885A (en) * 2018-07-16 2018-12-21 广州视源电子科技股份有限公司 Method, device and equipment for adjusting layout of text box
CN109658329A (en) * 2018-11-30 2019-04-19 上海沐传工业设计有限公司 A kind of poster layout design tool tree-like based on grid

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SM REBELO: "Exploring Automatic Fitness Evaluation for Evolutionary Typesetting", 《HTTPS://XUESHU.BAIDU.COM/USERCENTER/PAPER/SHOW?PAPERID=1P790GG02P5Q0AK0CA780620EC582412&SITE=XUESHU_SE》 *
李治江: "基于矩形Packing问题求解的页面自动排版方法", 《山东农业大学学报(自然科学版)》 *

Also Published As

Publication number Publication date
CN110222324B (en) 2022-11-08

Similar Documents

Publication Publication Date Title
CN110766799B (en) Virtual object hair processing method and device, electronic equipment and storage medium
CN104951844A (en) Layout optimization method of distribution network thematic maps
CN106612381B (en) Seat management method and device
Erlich et al. Solving the IEEE-CEC 2014 expensive optimization test problems by using single-particle MVMO
CN108830408A (en) A kind of equipment support task multi-objective planning method that oriented mission is resource matched
CN111049127A (en) Simulation method and system for active automatic control of flexible load participating power grid
CN109919485A (en) A kind of Multipurpose Optimal Method of the Water Resources Allocation based on NSGA-II
CN104537445B (en) One kind net saves many power supplys of two-stage and coordinates peak regulating method in short term
CN106026178B (en) A kind of more distributed generation resources self-discipline electricity-generating control methods in region and device
CN110222324A (en) A kind of autoplacement device based on text paragraph structure and font size change rate
CN114844118A (en) Multi-type equipment power coordination control method and system suitable for micro-grid
CN113572158A (en) Hydrogen production control method and application device thereof
CN105225016A (en) A kind of in the cloud computing system of renewable energy supply based on the energy distributing method of cooperative game
CN108234151B (en) Cloud platform resource allocation method
CN111145045B (en) VaR-considered power large-user flexible load assessment method and system
CN115983733B (en) Electric power market clear data processing method and device based on water level control
CN116231632B (en) Power regulation and control method and system for photovoltaic power station, electronic equipment and storage medium
CN111798060A (en) Power instruction optimal distribution method based on unit climbing rate estimation
CN113595152B (en) Power grid AGC instruction optimal allocation method and system based on thermal power generating unit speed regulation envelope curve
CN113015179B (en) Network resource selection method and device based on deep Q network and storage medium
CN101179322B (en) Method and apparatus for quantizing uplink/downlink time slot distribution cost, cross time slot cost
CN104570737B (en) PID controller parameter method for selecting based on random algorithm
CN113985196A (en) Power grid distributed fault positioning method, device, recording medium and system
CN106655189A (en) Virtual generator based optimal power flow coordinated optimization method
CN104219285B (en) The method for determining the mapping relations of communication agent node and virtual machine in cloud platform

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