CN110569493B - Method and system for adjusting planar design framework - Google Patents

Method and system for adjusting planar design framework Download PDF

Info

Publication number
CN110569493B
CN110569493B CN201911070968.0A CN201911070968A CN110569493B CN 110569493 B CN110569493 B CN 110569493B CN 201911070968 A CN201911070968 A CN 201911070968A CN 110569493 B CN110569493 B CN 110569493B
Authority
CN
China
Prior art keywords
frame
score
template
template frame
determining
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
Application number
CN201911070968.0A
Other languages
Chinese (zh)
Other versions
CN110569493A (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.)
Guangdong Bozhilin Robot Co Ltd
Original Assignee
Guangdong Bozhilin Robot 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 Guangdong Bozhilin Robot Co Ltd filed Critical Guangdong Bozhilin Robot Co Ltd
Priority to CN201911070968.0A priority Critical patent/CN110569493B/en
Publication of CN110569493A publication Critical patent/CN110569493A/en
Application granted granted Critical
Publication of CN110569493B publication Critical patent/CN110569493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method and a system for adjusting a planar design frame, which are used for acquiring frame information of the planar design frame to be adjusted; determining a plurality of template frames in a template frame database, wherein the matching degree of the template frames and the frame information is greater than a threshold value; determining a first score for the template frame; determining whether the first score is greater than or equal to a first score threshold; if not, adjusting the frame parameters of the template frame, and re-grading; if yes, determining a second score of the template frame; determining whether the second score is greater than or equal to a second score threshold; if not, adjusting the frame parameters of the template frame, and re-grading; if yes, determining the template frame as the template frame conforming to the frame information. According to the scheme, the template frames with the matching degree larger than the threshold value with the frame information are obtained from the template frame database, the template frames are scored, the template frames with the scoring larger than or equal to the scoring threshold value are determined to be the template frames meeting the frame information, and the quality of the template frames matched with the frame information is improved.

Description

Method and system for adjusting planar design framework
Technical Field
The invention relates to the technical field of plane design, in particular to a method and a system for adjusting a plane design frame.
Background
With the development of scientific technology, the flat design frame has wider and wider application, for example, the flat design frame is applied to commodity signs, publications, billboards, posters and the like.
Under different application scenes, the planar design framework corresponds to various different sizes. When designing a flat design frame, it usually involves multi-dimensional extension of the flat design frame, and the current way to adjust the flat design frame is: and matching the corresponding template for the image-text elements in the plane design frame by using the template database. However, because the number and time of designers are limited, the number and style of templates in the constructed template database are not perfect, and the quality of templates matched with the image-text elements in the planar design frame is low, that is, the templates matched with the image-text elements in the planar design frame have the phenomena of incomplete characters, incomplete figures, too small elements, discordance in planar layout and the like.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and a system for adjusting a plane design frame, so as to solve the problem of low quality of a template for matching image-text elements in the plane design frame.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
the first aspect of the embodiment of the invention discloses a method for adjusting a planar design frame, which comprises the following steps:
acquiring frame information and a size to be adjusted of a planar design frame to be adjusted, wherein the frame information at least comprises: element types and layer widths and heights;
determining a plurality of template frames with matching degree with the frame information larger than a threshold value in a preset template frame database, wherein the size of each template frame is the size to be adjusted;
determining a first score for each of the template frames using a first scoring rule;
for each template frame, judging whether a first score of the template frame is greater than or equal to a first score threshold value;
if the first score is smaller than the first score threshold value, adjusting the frame parameters of the template frame based on a preset adjusting strategy, and returning to execute the step of determining the first score;
if the first score is larger than or equal to the first score threshold value, determining a second score of the template frame by using a second scoring rule;
determining whether a second score of the template frame is greater than or equal to a second score threshold;
if the second score is smaller than the second score threshold value, adjusting the frame parameters of the template frame based on the adjusting strategy, and returning to execute the step of determining the second score;
and if the second score is greater than or equal to the second score threshold value, determining that the template frame is the template frame conforming to the frame information.
Preferably, the determining a first score of each template frame by using a first scoring rule includes:
scoring each template frame by utilizing a plurality of preset scoring indexes, and determining a first score of each template frame, wherein the plurality of scoring indexes comprise: text alignment, region whiteout, text element overlap, text element layout, text out of bounds, text size, and graphics size.
Preferably, the adjusting the frame parameters of the template frame based on the adjustment strategy includes:
adjusting the frame parameters of the template frame by using a plurality of preset adjustment rules, wherein the plurality of preset adjustment rules comprise: at least two of text alignment adjustment, overlap removal adjustment, balance adjustment, image-text element size adjustment, white space removal adjustment and text space adjustment;
alternatively, the first and second electrodes may be,
determining an optimal image-text element adjustment path of the template frame by utilizing a preset reinforcement learning adjustment strategy;
and adjusting the frame parameters of the template frame based on the optimal image-text element adjusting path.
Preferably, the determining a second score of the template frame by using a second scoring rule includes:
and scoring the template frame by using a preset soft rule scoring network, and determining a second score of the template frame.
Preferably, the determining an optimal image-text element adjustment path of the template frame by using a preset reinforcement learning adjustment strategy includes:
adjusting the image-text elements of the template frame based on a preset step length;
if the score corresponding to the template frame is higher, adding positive reward for the template frame, wherein the score corresponding to the template frame is the first score or the second score;
if the score corresponding to the template frame becomes low, adding a negative reward to the template frame;
and on the premise of taking the reward added each time as positive, determining an adjusting path with the highest accumulated reward as the optimal image-text element adjusting path of the template frame.
A second aspect of the embodiments of the present invention discloses an adjustment system for a planar design frame, the system including:
the acquiring unit is used for acquiring the frame information and the size to be adjusted of the planar design frame to be adjusted, and the frame information at least comprises: element types and layer widths and heights;
the first determining unit is used for determining a plurality of template frames, the matching degree of which with the frame information is greater than a threshold value, in a preset template frame database, and the size of each template frame is the size to be adjusted;
a first scoring unit for determining a first score of each of the template frames using a first scoring rule;
the first judging unit is used for judging whether a first score of each template frame is greater than or equal to a first score threshold value or not, if the first score is smaller than the first score threshold value, the adjusting unit is executed, and if the first score is greater than or equal to the first score threshold value, the second scoring unit is executed;
the adjusting unit is used for adjusting the frame parameters of the template frame based on a preset adjusting strategy and returning to execute the first scoring unit;
the second scoring unit is used for determining a second score of the template frame by using a second scoring rule;
a second judging unit, configured to judge whether a second score of the template frame is greater than or equal to a second score threshold, if the second score is smaller than the second score threshold, execute the adjusting unit to adjust the frame parameter of the template frame, return to execute the second scoring unit, and if the second score is greater than or equal to the second score threshold, execute a second determining unit;
the second determining unit is used for determining that the template frame is the template frame conforming to the frame information.
Preferably, the first scoring unit is specifically configured to: scoring each template frame by utilizing a plurality of preset scoring indexes, and determining a first score of each template frame, wherein the plurality of scoring indexes comprise: text alignment, region whiteout, text element overlap, text element layout, text out of bounds, text size, and graphics size.
Preferably, the adjusting unit is specifically configured to: adjusting the frame parameters of the template frame by using a plurality of preset adjustment rules, wherein the plurality of preset adjustment rules comprise: at least two of text alignment adjustment, overlap removal adjustment, balance adjustment, image-text element size adjustment, white space removal adjustment and text space adjustment;
alternatively, the first and second electrodes may be,
and determining an optimal image-text element adjusting path of the template frame by utilizing a preset reinforcement learning adjusting strategy, and adjusting the frame parameters of the template frame based on the optimal image-text element adjusting path.
Preferably, the second scoring unit is specifically configured to: and scoring the template frame by using a preset soft rule scoring network, and determining a second score of the template frame.
Preferably, the adjusting unit includes:
the adjusting module is used for adjusting the image-text elements of the template frame based on a preset step length;
the adding module is used for adding positive reward for the template frame if the score corresponding to the template frame is higher, wherein the score corresponding to the template frame is the first score or the second score;
the scoring module is used for adding a reward of a negative score to the template frame if the score corresponding to the template frame becomes lower;
and the determining module is used for determining an adjusting path with the highest accumulated reward as the optimal image-text element adjusting path of the template frame on the premise that the reward added each time is positive.
Based on the above method and system for adjusting a planar design frame provided by the embodiments of the present invention, the method includes: acquiring frame information and a size to be adjusted of a planar design frame to be adjusted; determining a plurality of template frames in a template frame database, wherein the matching degree of the template frames and the frame information is greater than a threshold value; determining a first score for each template frame; determining whether a first score of the template frame is greater than or equal to a first score threshold; if not, adjusting the frame parameters of the template frame based on a preset adjusting strategy, and returning to execute the step of determining the first score; if yes, determining a second score of the template frame; determining whether a second score of the template frame is greater than or equal to a second score threshold; if not, adjusting the frame parameters of the template frame, and returning to the step of determining the second score; if yes, determining the template frame as the template frame conforming to the frame information. According to the scheme, a plurality of template frames with the matching degree of the frame information of the planar design frame to be adjusted larger than a threshold value are obtained from a template frame database. And scoring each template frame, adjusting the frame parameters of the template frames with the scores smaller than the score threshold value until the scores are larger than or equal to the score threshold value, determining the template frames with the scores larger than or equal to the score threshold value as the template frames meeting the frame information, and improving the quality of the template frames matched with the frame information of the planar design frame to be adjusted.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an adjusting method of a flat panel design framework according to an embodiment of the present invention;
fig. 2 is a flowchart of obtaining an optimal image-text element adjustment path according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an adjusting method of a flat panel design framework according to an embodiment of the present invention;
fig. 4 is a block diagram of an adjusting system of a flat panel design framework according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
As can be seen from the background art, when adjusting a flat design frame, the number and time of designers are limited, the number and style of templates in the constructed template database are not perfect, and the quality of templates matching the graphic and text elements in the flat design frame is low.
Therefore, the embodiment of the invention provides a method and a system for adjusting a planar design frame, which are used for acquiring a plurality of template frames with the frame information matching degree of the planar design frame to be adjusted larger than a threshold value from a template frame database. And scoring each template frame, adjusting the frame parameters of the template frames with the scores smaller than the score threshold until the scores are larger than or equal to the score threshold, and determining the template frames with the scores larger than or equal to the score threshold as the template frames conforming to the frame information so as to improve the quality of the template frames matched with the frame information of the plane design frames to be adjusted.
Referring to fig. 1, a flowchart of an adjusting method of a flat design framework according to an embodiment of the present invention is shown, where the adjusting method includes the following steps:
step S101: and acquiring the frame information and the size to be adjusted of the planar design frame to be adjusted.
In the process of implementing step S101 specifically, the image-text element layout corresponding to the planar design frame to be adjusted is obtained, that is, the frame information of the planar design frame to be adjusted is obtained. And acquiring the size to be adjusted of the planar design frame to be adjusted, namely adjusting the size of the planar design frame to be adjusted to the size to be adjusted.
It should be noted that the frame information includes, but is not limited to: element layout such as element types, layer width and height, blank areas and the like.
Step S102: and determining a plurality of template frames in a preset template frame database, wherein the matching degree of the template frames and the frame information is greater than a threshold value.
In the process of implementing step S102 specifically, it can be known from the foregoing that the size of the planar design frame to be adjusted needs to be adjusted to the size to be adjusted, the matching degree between the frame information and each template frame to be adjusted in the template frame database is calculated, and a plurality of template frames with the matching degree greater than the threshold are obtained.
The process of calculating the matching degree of the frame information with each of the template frames to be resized is described in detail in process A1-A5:
a1, determining whether the element type of the planar design frame to be adjusted is matched with the template frame to be adjusted in size, and if so, executing the following processes A2-A5.
And A2, calculating the matching degree of the layer width and the height of the planar design frame to be adjusted and the template frame to be adjusted in size.
And A3, calculating the size of the overlapping area occupying the background.
And A4, calculating the size of the margin area in the background.
And A5, overlapping the layer similarity, namely overlapping the results obtained by the calculation in the processes A2 to A4 to obtain the matching degree of the frame information and the template frame with the size to be adjusted.
Step S103: a first score for each of the template frames is determined using a first scoring rule.
In the process of implementing step S103, each template frame is scored by using a plurality of preset scoring indexes, and a first score of each template frame is determined.
The specific scoring process is as follows: and scoring the template framework by using each scoring index to obtain a score corresponding to each scoring index, wherein the sum of the scores corresponding to each scoring index is the first score of the template framework. The multiple scoring metrics include, but are not limited to: text alignment, region whiteout, text element overlap, text element layout, text out of bounds, text size, and graphics size.
It should be noted that the above-mentioned scoring indexes are only used for illustration, and the specific scoring indexes are set by the skilled person according to the actual situation.
To better explain how to score the template framework by using each of the scoring indicators, a score corresponding to each of the scoring indicators is obtained, which is described in detail below.
And (3) image-text element layout scoring: and scoring the uniformity and symmetry of the element arrangement in the template frame, wherein the more balanced the visual effect, the higher the image-text element layout score.
It should be noted that 6 alignment modes of the text elements are as follows: upper, lower, left, right, X axis and Y axis.
Text alignment score: in the template framework, the alignment degree of the text elements is cumulatively scored according to 6 alignment modes of the text elements to obtain the text alignment score, wherein the higher the alignment degree of the text elements is, the higher the score is.
Area whiteout score: since too much or too little margin affects the visual effect, a margin threshold value for indicating an optimum margin degree is determined in advance. In the template framework, the area whiteout score is determined by comparing the whiteout degree with the whiteout threshold value, i.e. the closer the whiteout degree is to the whiteout threshold value, the higher the area whiteout score is.
And (3) overlapping score of image-text elements: and in the template frame, scoring the overlapping degree of the image-text elements to obtain the overlapping score of the image-text elements, wherein the higher the overlapping degree is, the lower the overlapping score of the image-text elements is.
Text out of bounds score: and in the template framework, the degree of the text element exceeding the boundary is scored to obtain the score of the text exceeding the boundary, and the more the part of the text element exceeding the boundary, the lower the score of the text exceeding the boundary.
Text size score: since there is an optimal text size threshold for different types of text elements, the text size score is obtained in the template framework by comparing the size of the text element to the size of the text size threshold. For a type of text element, the closer the size of the text element is to its corresponding text size threshold, the higher the score.
Graph size scoring: since there is an optimal graphic size threshold for different types of graphic elements, the graphic size score is obtained in the template frame by comparing the size of the graphic element to the size of the graphic size threshold. For a type of graphic element, the closer the size of the graphic element is to its corresponding graphic size threshold, the higher the score.
Step S104: for each of the template frames, determining whether a first score of the template frame is greater than or equal to a first score threshold. If the first score is smaller than the first score threshold, step S105 is performed, and if the first score is greater than or equal to the first score threshold, step S106 is performed.
In the process of implementing step S104, it is determined whether the first score of the template frame is greater than a first score threshold, and if the first score is greater than or equal to the first score threshold, the template frame is further scored using a second scoring rule to obtain a second score of the template frame. If the first score is smaller than the first score threshold value, the frame parameters of the template frame are adjusted, and the template frame is scored again by using the first scoring rule until the first score of the template frame is larger than or equal to the first score threshold value.
Step S105: and adjusting the frame parameters of the template frame based on a preset adjusting strategy, and returning to execute the step S103.
In the process of implementing step S105, adjusting the frame parameters of the template frame includes, but is not limited to, the following two adjusting manners.
The first adjustment mode is as follows: and adjusting the frame parameters of the template frame by utilizing a plurality of preset adjustment rules. The preset adjustment rules comprise: at least two of text alignment adjustment, overlap removal adjustment, balance adjustment, image-text element size adjustment, white space removal adjustment and text space adjustment.
The second adjustment mode is as follows: and determining the optimal image-text element adjusting path of the template frame by utilizing a preset reinforcement learning adjusting strategy. And adjusting the frame parameters of the template frame based on the optimal image-text element adjusting path.
Step S106: determining a second score for the template frame using a second scoring rule.
In the process of implementing step S106, the template frame is scored using a preset soft rule scoring network, and a second score of the template frame is determined.
It should be noted that the soft rule scoring network is an automatic scoring network trained by a technician according to scoring criteria.
Step S107: and judging whether the second score of the template frame is greater than or equal to a second score threshold, if so, executing step S108, and if so, executing step S109.
In the process of implementing step S107 specifically, it is determined whether the second score of the template frame is greater than a second score threshold, and if the second score is greater than or equal to the second score threshold, the template frame is determined to be the template frame conforming to the frame information. If the second score is smaller than the second score threshold, adjusting the frame parameters of the template frame, and scoring the template frame again by using the second score rule until the second score of the template frame is larger than or equal to the second score threshold.
Step S108: and adjusting the frame parameters of the template frame based on the adjusting strategy, and returning to execute the step S106.
In the process of implementing step S108 specifically, the manner of adjusting the frame parameters of the template frame may refer to the adjustment manner shown in step S105, and is not described herein again.
Step S109: and determining the template frame as the template frame conforming to the frame information.
In the process of implementing step S109, template frames with the first score greater than or equal to the first score threshold and the second score greater than or equal to the second score threshold are determined as template frames meeting the frame information.
In the embodiment of the invention, a plurality of template frames with the frame information matching degree of the plane design frame to be adjusted larger than the threshold value are obtained from the template frame database. And scoring each template frame, adjusting the frame parameters of the template frames with the scores smaller than the score threshold value until the scores are larger than or equal to the score threshold value, determining the template frames with the scores larger than or equal to the score threshold value as the template frames meeting the frame information, and improving the quality of the template frames matched with the frame information of the planar design frame to be adjusted.
In the above embodiment of the present invention, referring to fig. 2, the process of determining the optimal teletext element adjustment path of the template frame in step S105 and step S108 in fig. 1 shows a flowchart for obtaining the optimal teletext element adjustment path according to the embodiment of the present invention, which includes the following steps:
step S201: and adjusting the image-text elements of the template frame based on a preset step length.
In the process of implementing step S201, the graphic element of the template frame is moved according to a preset step length, or the graphic element of the template frame is scaled. And after the image-text elements of the template frame are adjusted each time, the template frame needs to be scored, and the score corresponding to the template frame is the first score or the second score.
In the above-mentioned embodiment of the present invention, in step S105 in fig. 1, after adjusting the image-text elements of the template frame each time, the template frame needs to be scored by using the first scoring rule, so as to obtain a first score of the template frame.
In step S108 in fig. 1 of the above embodiment of the present invention, after adjusting the image-text elements of the template frame each time, the template frame needs to be scored by using the second scoring rule, so as to obtain a second score of the template frame.
Step S202: and if the score corresponding to the template frame is higher, adding positive reward for the template frame.
In the process of implementing step S202, it can be known from the foregoing that, after the image-text elements of the template frame are adjusted each time, the template frame needs to be scored. And when the score corresponding to the template frame becomes high, adding positive reward points to the template frame, and when the score corresponding to the template frame becomes low, adding negative reward points to the template frame.
For example: when the image-text element of the template frame is adjusted for the nth time, the score of the template frame is SnThe score of the template frame after the previous adjustment is Sn-1. If SnGreater than Sn-1Adding a positive award to the template frame, if SnLess than Sn-1Then a negative reward is added to the template frame.
Step S203: and if the score corresponding to the template frame becomes lower, adding a negative reward to the template frame.
Step S204: and on the premise of taking the reward added each time as positive, determining an adjusting path with the highest accumulated reward as the optimal image-text element adjusting path of the template frame.
In the process of specifically implementing step S204, it should be noted that there are multiple adjustment paths for adjusting the image-text elements of the template frame, and on the premise that the reward added each time is positive, the adjustment path with the highest accumulated reward is determined as the optimal image-text element adjustment path of the template frame.
In the embodiment of the invention, the graphic and text elements of the template frame are adjusted for multiple times by using the preset step length, and after each adjustment, if the score of the template frame is higher, the reward of a positive score is added, and if the score of the template frame is lower, the reward of a negative score is added. And on the premise of taking the added reward as positive, determining an adjusting path with the highest accumulated reward as an optimal image-text element adjusting path, and adjusting the template framework by using the optimal image-text element adjusting path to enable the score of the template framework to be larger than or equal to a score threshold value. And determining the template frame with the score larger than or equal to the score threshold value as the template frame conforming to the frame information, and improving the quality of the template frame matched with the frame information of the plane design frame to be adjusted.
To better explain the contents of the steps in fig. 1 and fig. 2 in the above embodiment of the present invention, the method is exemplified by a flow chart of an adjusting method of a flat design framework shown in fig. 3, in which fig. 3 includes the following steps:
step S301: and calculating the similarity of the template frame in the template frame database and the frame information of the planar design frame to be adjusted.
Step S302: and acquiring a plurality of template frames with similarity greater than a threshold value.
Step S303: and scoring the plurality of template frames by using a hard rule evaluation system to obtain a first score of each template frame.
In the process of implementing step S303, the hard rule evaluation system is the first scoring rule mentioned in fig. 1 in the above embodiment of the present invention.
Step S304: and judging whether the first score meets a threshold value, if so, executing step S306, and if not, executing step S305.
In the process of implementing step S304, the threshold is the first scoring threshold mentioned in fig. 1 of the embodiment of the present invention.
Step S305: and adjusting the frame parameters of the template frame and returning to execute the step S303.
Step S306: and grading the template frame by using a soft rule evaluation network to obtain a second grade of the template frame.
In the process of implementing step S306, the soft rule evaluation network is the second scoring rule mentioned in fig. 1 in the above embodiment of the present invention.
Step S307: and judging whether the second score of the template frame is a high score, if so, executing step S309, and if not, executing step S308.
In the process of implementing step S307, the score is the second score threshold mentioned in fig. 1 of the embodiment of the present invention.
Step S308: adjusting the frame parameters of the template frame and returning to execute the step S306.
Step S309: inputting the template frame with a second score of high score.
It should be noted that the execution principle of step S301 to step S309 can refer to the content of each step in fig. 1 and fig. 2 in the above embodiment of the present invention, and details are not repeated herein.
In the embodiment of the invention, a plurality of template frames with the frame information similarity of the plane design frame to be adjusted larger than a threshold value are obtained from the template frame database. And scoring each template frame by using a hard rule evaluation system to obtain a first score. And grading the template frame with the first grade larger than the first grade threshold value by using a soft rule evaluation network to obtain a second grade, outputting the template frame with the second grade larger than the second grade threshold value, and improving the quality of the template frame matched with the frame information of the plane design frame to be adjusted.
Corresponding to the adjusting method of the planar design frame provided in the embodiment of the present invention, referring to fig. 4, an embodiment of the present invention further provides a structural frame of an adjusting system of the planar design frame, where the adjusting system includes: an acquisition unit 401, a first determination unit 402, a first scoring unit 403, a first judgment unit 404, an adjustment unit 405, a second scoring unit 406, a second judgment unit 407, and a second determination unit 408;
an obtaining unit 401, configured to obtain frame information and a size to be adjusted of a planar design frame to be adjusted, where the frame information at least includes: element types and layer width and height.
A first determining unit 402, configured to determine a plurality of template frames in a preset template frame database, where a matching degree with the frame information is greater than a threshold, where a size of the template frame is the size to be adjusted.
A first scoring unit 403, configured to determine a first score of each of the template frames by using a first scoring rule.
In a specific implementation, the first scoring unit 403 is specifically configured to: scoring each template frame by utilizing a plurality of preset scoring indexes, and determining a first score of each template frame, wherein the plurality of scoring indexes comprise: text alignment, region whiteout, text element overlap, text element layout, text out of bounds, text size, and graphics size.
A first determining unit 404, configured to determine, for each template frame, whether a first score of the template frame is greater than or equal to a first score threshold, if the first score is less than the first score threshold, execute an adjusting unit 405, and if the first score is greater than or equal to the first score threshold, execute a second scoring unit 406.
An adjusting unit 405, configured to adjust the frame parameters of the template frame based on a preset adjusting policy, and return to execute the first scoring unit 403.
In a specific implementation, the adjusting unit 405 is specifically configured to: adjusting the frame parameters of the template frame by using a plurality of preset adjustment rules, wherein the plurality of preset adjustment rules comprise: at least two of text alignment adjustment, overlap removal adjustment, balance adjustment, image-text element size adjustment, white space removal adjustment and text space adjustment.
Alternatively, the first and second electrodes may be,
and determining an optimal image-text element adjusting path of the template frame by utilizing a preset reinforcement learning adjusting strategy, and adjusting the frame parameters of the template frame based on the optimal image-text element adjusting path.
A second scoring unit 406 for determining a second score of the template frame using a second scoring rule.
In a specific implementation, the second scoring unit 406 is specifically configured to: and scoring the template frame by using a preset soft rule scoring network, and determining a second score of the template frame.
A second determining unit 407, configured to determine whether a second score of the template frame is greater than or equal to a second score threshold, if the second score is less than the second score threshold, execute the adjusting unit 405 to adjust the frame parameters of the template frame, return to execute the second scoring unit 406, and if the second score is greater than or equal to the second score threshold, execute a second determining unit 408.
A second determining unit 408 for determining the template frame as a template frame conforming to the frame information.
In the embodiment of the invention, a plurality of template frames with the frame information matching degree of the plane design frame to be adjusted larger than the threshold value are obtained from the template frame database. And scoring each template frame, adjusting the frame parameters of the template frames with the scores smaller than the score threshold value until the scores are larger than or equal to the score threshold value, determining the template frames with the scores larger than or equal to the score threshold value as the template frames meeting the frame information, and improving the quality of the template frames matched with the frame information of the planar design frame to be adjusted.
Preferably, with reference to fig. 4, the adjusting unit 405 shown in the embodiment of the present invention includes: the device comprises an adjusting module, an adding module, a subtracting module and a determining module. The execution principle of each module is as follows:
and the adjusting module is used for adjusting the image-text elements of the template frame based on the preset step length.
And the adding module is used for adding positive reward for the template frame if the score corresponding to the template frame becomes higher, and the score corresponding to the template frame is the first score or the second score.
And the scoring module is used for adding a reward of a negative score for the template frame if the score corresponding to the template frame becomes low.
And the determining module is used for determining an adjusting path with the highest accumulated reward as the optimal image-text element adjusting path of the template frame on the premise that the reward added each time is positive.
In the embodiment of the invention, the graphic and text elements of the template frame are adjusted for multiple times by using the preset step length, and after each adjustment, if the score of the template frame is higher, the reward of a positive score is added, and if the score of the template frame is lower, the reward of a negative score is added. And on the premise of taking the added reward as positive, determining an adjusting path with the highest accumulated reward as an optimal image-text element adjusting path, and adjusting the template framework by using the optimal image-text element adjusting path to enable the score of the template framework to be larger than or equal to a score threshold value. And determining the template frame with the score larger than or equal to the score threshold value as the template frame conforming to the frame information, and improving the quality of the template frame matched with the frame information of the plane design frame to be adjusted.
In summary, the embodiments of the present invention provide a method and a system for adjusting a planar design frame, where the method includes: acquiring frame information and a size to be adjusted of a planar design frame to be adjusted; determining a plurality of template frames in a template frame database, wherein the matching degree of the template frames and the frame information is greater than a threshold value; determining a first score for each template frame; determining whether a first score of the template frame is greater than or equal to a first score threshold; if not, adjusting the frame parameters of the template frame based on a preset adjusting strategy, and returning to execute the step of determining the first score; if yes, determining a second score of the template frame; determining whether a second score of the template frame is greater than or equal to a second score threshold; if not, adjusting the frame parameters of the template frame, and returning to the step of determining the second score; if yes, determining the template frame as the template frame conforming to the frame information. According to the scheme, a plurality of template frames with the matching degree of the frame information of the planar design frame to be adjusted larger than a threshold value are obtained from a template frame database. And scoring each template frame, adjusting the frame parameters of the template frames with the scores smaller than the score threshold value until the scores are larger than or equal to the score threshold value, determining the template frames with the scores larger than or equal to the score threshold value as the template frames meeting the frame information, and improving the quality of the template frames matched with the frame information of the planar design frame to be adjusted.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for adjusting a planar design frame is used for improving the quality of a template frame matched with frame information of the planar design frame to be adjusted, and comprises the following steps:
acquiring frame information and a size to be adjusted of a planar design frame to be adjusted, wherein the frame information at least comprises: element types, layer width and height and white areas;
determining a plurality of template frames with matching degree with the frame information larger than a threshold value in a preset template frame database, wherein the size of each template frame is the size to be adjusted;
determining a first score for each of the template frames using a first scoring rule;
for each template frame, judging whether a first score of the template frame is greater than or equal to a first score threshold value;
if the first score is smaller than the first score threshold, adjusting the frame parameters of the template frame based on a preset adjusting strategy, including: adjusting the frame parameters of the template frame by using a plurality of preset adjustment rules, wherein the plurality of preset adjustment rules comprise: at least two of text alignment adjustment, overlap removal adjustment, balance adjustment, image-text element size adjustment, white space removal adjustment and text space adjustment;
or, determining an optimal image-text element adjustment path of the template frame by using a preset reinforcement learning adjustment strategy; adjusting frame parameters of the template frame based on the optimal image-text element adjusting path, and returning to the step of determining a first score;
if the first score is larger than or equal to the first score threshold value, determining a second score of the template frame by using a second scoring rule;
determining whether a second score of the template frame is greater than or equal to a second score threshold;
if the second score is smaller than the second score threshold value, adjusting the frame parameters of the template frame based on a preset adjusting strategy, and returning to execute the step of determining the second score;
and if the second score is greater than or equal to the second score threshold value, determining that the template frame is the template frame conforming to the frame information.
2. The method of claim 1, wherein determining a first score for each of the template frames using a first scoring rule comprises:
scoring each template frame by utilizing a plurality of preset scoring indexes, and determining a first score of each template frame, wherein the plurality of scoring indexes comprise: text alignment, region whiteout, text element overlap, text element layout, text out of bounds, text size, and graphics size.
3. The method of claim 1, wherein determining a second score for the template frame using a second scoring rule comprises:
and scoring the template frame by using a preset soft rule scoring network, and determining a second score of the template frame.
4. The method of claim 1, wherein determining the optimal teletext element adjustment path of the template frame using a preset reinforcement learning adjustment strategy comprises:
adjusting the image-text elements of the template frame based on a preset step length;
if the score corresponding to the template frame is higher, adding positive reward for the template frame, wherein the score corresponding to the template frame is the first score or the second score;
if the score corresponding to the template frame becomes low, adding a negative reward to the template frame;
and on the premise of taking the reward added each time as positive, determining an adjusting path with the highest accumulated reward as the optimal image-text element adjusting path of the template frame.
5. An adjustment system of a flat design frame for improving quality of a template frame matched with frame information of a flat design frame to be adjusted, the adjustment system comprising:
the acquiring unit is used for acquiring the frame information and the size to be adjusted of the planar design frame to be adjusted, and the frame information at least comprises: element types, layer width and height and white areas;
the first determining unit is used for determining a plurality of template frames, the matching degree of which with the frame information is greater than a threshold value, in a preset template frame database, and the size of each template frame is the size to be adjusted;
a first scoring unit for determining a first score of each of the template frames using a first scoring rule;
the first judging unit is used for judging whether a first score of each template frame is greater than or equal to a first score threshold value or not, if the first score is smaller than the first score threshold value, the adjusting unit is executed, and if the first score is greater than or equal to the first score threshold value, the second scoring unit is executed;
the adjusting unit is configured to adjust a frame parameter of the template frame based on a preset adjusting policy, and the adjusting unit is specifically configured to: adjusting the frame parameters of the template frame by using a plurality of preset adjustment rules, wherein the plurality of preset adjustment rules comprise: at least two of text alignment adjustment, overlap removal adjustment, balance adjustment, image-text element size adjustment, white space removal adjustment and text space adjustment; or determining an optimal image-text element adjusting path of the template frame by using a preset reinforcement learning adjusting strategy, and adjusting frame parameters of the template frame based on the optimal image-text element adjusting path; returning to execute the first scoring unit;
the second scoring unit is used for determining a second score of the template frame by using a second scoring rule;
a second judging unit, configured to judge whether a second score of the template frame is greater than or equal to a second score threshold, if the second score is smaller than the second score threshold, execute the adjusting unit to adjust the frame parameter of the template frame, return to execute the second scoring unit, and if the second score is greater than or equal to the second score threshold, execute a second determining unit;
the second determining unit is used for determining that the template frame is the template frame conforming to the frame information.
6. The system of claim 5, wherein the first scoring unit is specifically configured to: scoring each template frame by utilizing a plurality of preset scoring indexes, and determining a first score of each template frame, wherein the plurality of scoring indexes comprise: text alignment, region whiteout, text element overlap, text element layout, text out of bounds, text size, and graphics size.
7. The system of claim 5, wherein the second scoring unit is specifically configured to: and scoring the template frame by using a preset soft rule scoring network, and determining a second score of the template frame.
8. The system of claim 5, wherein the adjustment unit comprises:
the adjusting module is used for adjusting the image-text elements of the template frame based on a preset step length;
the adding module is used for adding positive reward for the template frame if the score corresponding to the template frame is higher, wherein the score corresponding to the template frame is the first score or the second score;
the scoring module is used for adding a reward of a negative score to the template frame if the score corresponding to the template frame becomes lower;
and the determining module is used for determining an adjusting path with the highest accumulated reward as the optimal image-text element adjusting path of the template frame on the premise that the reward added each time is positive.
CN201911070968.0A 2019-11-05 2019-11-05 Method and system for adjusting planar design framework Active CN110569493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911070968.0A CN110569493B (en) 2019-11-05 2019-11-05 Method and system for adjusting planar design framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911070968.0A CN110569493B (en) 2019-11-05 2019-11-05 Method and system for adjusting planar design framework

Publications (2)

Publication Number Publication Date
CN110569493A CN110569493A (en) 2019-12-13
CN110569493B true CN110569493B (en) 2020-11-06

Family

ID=68786084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911070968.0A Active CN110569493B (en) 2019-11-05 2019-11-05 Method and system for adjusting planar design framework

Country Status (1)

Country Link
CN (1) CN110569493B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111242691A (en) * 2020-01-14 2020-06-05 广东博智林机器人有限公司 Method and device for generating advertisement poster, storage medium and terminal equipment
CN112184660A (en) * 2020-09-25 2021-01-05 大方众智创意广告(珠海)有限公司 Design image evaluation method and device and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9342498B2 (en) * 2014-06-12 2016-05-17 Synergy Platform Pty Ltd System and method for generating a design template based on graphical input
CN106886917B (en) * 2017-01-19 2021-02-09 浙江大学 Method and device for generating advertisement
CN107301566A (en) * 2017-06-19 2017-10-27 郑州航空工业管理学院 A kind of advertisement design multimedia information system
CN108427828B (en) * 2018-02-07 2022-04-26 李荣陆 Device for automatically evaluating layout quality and optimizing planar design
CN109492757A (en) * 2018-11-28 2019-03-19 中科赛诺(北京)科技有限公司 Data integrates method and device
CN109688166B (en) * 2019-02-28 2021-06-04 新华三信息安全技术有限公司 Abnormal outgoing behavior detection method and device
CN110223217A (en) * 2019-06-11 2019-09-10 长春工程学院 A kind of planar design automatic addition decorative element information processing system and method

Also Published As

Publication number Publication date
CN110569493A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
JP4321549B2 (en) Document creation system, document creation method, program, and storage medium
US20200050632A1 (en) Method and apparatus for generating knowledge graph, device and computer readable storage medium
CN110569493B (en) Method and system for adjusting planar design framework
US20050223319A1 (en) Layout-rule generation system, layout system, layout-rule generation program, layout program, storage medium, method of generating layout rule, and method of layout
JP2007133832A (en) System, method and program for creating digital content
US20210141999A1 (en) Method for displaying handwritten note in electronic book, electronic device and computer storage medium
CN110245640A (en) For being automatically positioned the method and work correction method, system and storage medium of topic in work correction
CN106599940A (en) Picture character identification method and apparatus thereof
CN106484382B (en) A kind of method and apparatus for playing frame and showing
CN107315682A (en) Test browser-safe method, device, storage medium and electronic equipment
CN114626477A (en) Target detection method, device and equipment
JP2013171310A (en) Character recognition method, character recognition device using the same and program
CN105389308B (en) Webpage display processing method and device
CN110674811B (en) Image recognition method and device
CN106651803B (en) Method and device for identifying house type data
US11763065B2 (en) Font feature selection for text layout
US20230306193A1 (en) Information processing apparatus, non-transitory computer readable medium, and method for processing information
CN110780872A (en) Element arrangement method and device, computer readable storage medium and equipment
JP7234495B2 (en) Image processing device and program
CN110489933B (en) Method and system for generating planar design framework
CN111899283B (en) Video target tracking method
CN114186863A (en) Index data processing method and device, storage medium and electronic equipment
US5883637A (en) Kerning method and a typographic apparatus utilizing same
CN110619671B (en) Design framework generation determination method and device
CN113886578A (en) Form classification method and device

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