CN113987618B - Line drawing method and device of model line diagram and electronic equipment - Google Patents

Line drawing method and device of model line diagram and electronic equipment Download PDF

Info

Publication number
CN113987618B
CN113987618B CN202111274854.5A CN202111274854A CN113987618B CN 113987618 B CN113987618 B CN 113987618B CN 202111274854 A CN202111274854 A CN 202111274854A CN 113987618 B CN113987618 B CN 113987618B
Authority
CN
China
Prior art keywords
model
line
models
synthesizer
model group
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
CN202111274854.5A
Other languages
Chinese (zh)
Other versions
CN113987618A (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.)
Beijing Shi Guan Jin Yang Technology Development Co ltd
Original Assignee
Beijing Shi Guan Jin Yang Technology Development 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 Beijing Shi Guan Jin Yang Technology Development Co ltd filed Critical Beijing Shi Guan Jin Yang Technology Development Co ltd
Priority to CN202111274854.5A priority Critical patent/CN113987618B/en
Publication of CN113987618A publication Critical patent/CN113987618A/en
Application granted granted Critical
Publication of CN113987618B publication Critical patent/CN113987618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/12Geometric CAD characterised by design entry means specially adapted for CAD, e.g. graphical user interfaces [GUI] specially adapted for CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Abstract

The application discloses a line drawing method and device of a model line diagram and electronic equipment, wherein the method comprises the following steps: obtaining setting parameters of a plurality of models in a model circuit diagram, wherein the setting parameters represent setting states of the models in the model circuit diagram; according to the setting parameters, a line synthesizer and a corresponding line decomposer are arranged for the model on the model line diagram, the input end of the line synthesizer is connected with the output ends of at least two models, the output end of the line synthesizer is connected with the input end of the line decomposer, and the output end of the line decomposer is connected with the input ends of at least two models.

Description

Line drawing method and device of model line diagram and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for line drawing of a model line diagram, and an electronic device.
Background
The development concept of the model relates to various fields, such as the development field of simulation models.
In the model development process of each field, the input-output relationship between each model is provided through the model line graph, so that the input-output relationship between the models determines the line connection relationship between each model in the model line graph.
Often, large development projects include multiple models, and input-output relationships between models are complex. The cluttered input-output relationship leads to more cluttered lines between models in the model line graph, so that the readability of the model line graph is poor.
Disclosure of Invention
In view of the above, the present application provides a line drawing method, device and electronic equipment for a model line graph, which are used for solving the technical problem of poor readability of the current model line graph.
One aspect of the present application provides a line drawing method of a model line graph, including:
obtaining setting parameters of a plurality of models in a model circuit diagram, wherein the setting parameters represent setting states of the models in the model circuit diagram;
according to the setting parameters, a line synthesizer and a corresponding line decomposer are arranged for the model on the model line diagram, the input end of the line synthesizer is connected with the output ends of at least two models, the output end of the line synthesizer is connected with the input end of the line decomposer, and the output end of the line decomposer is connected with the input ends of at least two models.
In the above method, preferably, according to the setting parameters, setting a line synthesizer and a corresponding line decomposer for the model on the model line graph includes:
Grouping the models to obtain at least one model group, wherein the model group comprises at least two models;
setting a circuit synthesizer for the model group according to the setting parameters, wherein the input end of the circuit synthesizer is connected with the output end of the model in the model group;
according to the setting parameters, a line decomposer is arranged for the line synthesizer, the input end of the line decomposer is connected with the output end of the line synthesizer, the output end of the line decomposer is connected with a first model, and the first model is a model of which the input end corresponds to the output end of the model in the model group.
The method, preferably, groups the models to obtain at least one model group, including:
and grouping the models according to the current positions of the models in the setting state to obtain at least one model group, wherein the current positions of the models in the same model group meet the position grouping condition.
In the above method, preferably, the location grouping condition includes: a plurality of models in the model group are preset target shapes based on layout shapes formed by the current positions of the models; alternatively, the distances between the current positions of the plurality of models in the model set are less than a preset distance threshold.
The method, preferably, groups the models to obtain at least one model group, including:
grouping the models according to the connection relation between the models and other models in the setting state to obtain at least one model group, wherein the connection relation between the models and other models in the same model group meets connection grouping conditions, and the connection grouping conditions comprise: the direction of the output end of each model in the model group is the same.
The method, preferably, groups the models to obtain at least one model group, including:
receiving at least one packet input operation, the packet input operation comprising at least a plurality of selected models;
dividing the selected model into a model group according to the grouping input operation to obtain at least one model group.
In the above method, preferably, the line synthesizer is located at a first position, and the first position is related to a position of a model in a model group connected with the line synthesizer;
the line splitter is in a second position, the second position being associated with the first position and the second position being associated with the position of the first model.
In the above method, preferably, the line synthesizer has a synthesis attribute set based on the number of the plurality of models in the model group;
the line splitter has a splitting attribute set based on at least an output variable of a model to which the line combiner is connected and an input variable of a first model to which an output of the line splitter is connected.
Another aspect of the present application provides a line drawing apparatus of a model line drawing, including:
a parameter obtaining unit, configured to obtain setting parameters of a plurality of models in a model line graph, where the setting parameters characterize a setting state of the models in the model line graph;
the circuit drawing unit is used for setting a circuit synthesizer and a corresponding circuit decomposer for the model on the model circuit diagram according to the setting parameters, wherein the input end of the circuit synthesizer is connected with the output ends of at least two models, the output end of the circuit synthesizer is connected with the input end of the circuit decomposer, and the output end of the circuit decomposer is connected with the input ends of at least two models.
Another aspect of the present application provides an electronic device, including:
A memory for storing an application program and data generated by the operation of the application program;
a processor for executing the application program to realize: obtaining setting parameters of a plurality of models in a model circuit diagram, wherein the setting parameters represent setting states of the models in the model circuit diagram; according to the setting parameters, a line synthesizer and a corresponding line decomposer are arranged for the model on the model line diagram, the input end of the line synthesizer is connected with the output ends of at least two models, the output end of the line synthesizer is connected with the input end of the line decomposer, and the output end of the line decomposer is connected with the input ends of at least two models.
According to the technical scheme, in the line drawing method, the line drawing device and the electronic equipment of the model line graph, the setting parameters of a plurality of models in the model line graph are obtained, and then the line synthesizer and the corresponding line decomposer are arranged for the models, so that lines between the models are combined and decomposed through the line synthesizer and the line decomposer, and therefore the lines in the model line graph are simplified through the combined lines, accurate line connection is achieved through the decomposed lines, and further the lines in the model line graph are simplified under the condition that the accurate line connection is guaranteed, and the purpose of improving the readability of the model line graph is achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a line drawing method of a model line diagram according to a first embodiment of the present application;
FIGS. 2-4 are diagrams illustrating line optimization in accordance with embodiments of the present application;
FIG. 5 is a partial flowchart of a circuit drawing method of a model circuit diagram according to a first embodiment of the present application;
FIGS. 6-11 are diagrams illustrating another example of line optimization in accordance with embodiments of the present application;
fig. 12 is a schematic structural diagram of a circuit drawing device for a model circuit diagram according to a second embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device according to a third embodiment of the present application;
FIG. 14 is an exemplary model route diagram without route optimization by the present application;
FIG. 15 is an exemplary model route diagram for route optimization via the present application;
Fig. 16 to 27 are respectively exemplary diagrams of line optimization of a model line graph with poor readability by adopting the technical scheme of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Example 1
Referring to fig. 1, a flowchart of a line drawing method for a model line drawing according to an embodiment of the present application is shown, and the method may be applied to an electronic device capable of drawing a graph, such as a mobile phone, a pad, a computer, etc. with a line drawing application program installed. The line drawing application program can provide an operation interface for a user so as to facilitate the user to draw the model line graph, and the technical scheme of the application is mainly used for automatically adjusting the drawn model line graph so as to simplify the lines in the model line graph and further improve the readability of the model line graph.
Specifically, the method in this embodiment may include the following steps:
step 101: setting parameters of a plurality of models in a model wiring diagram are obtained.
The setting parameters obtained in the embodiment include respective setting parameters of each model in the model circuit diagram, and the setting parameters of each model respectively represent the setting state of the model in the model circuit diagram.
Specifically, the setting parameters of the model may include the following: the current position of the model in the model line graph, the input variables of the model, the output variables of the model and the line connection relationship between the model and other models.
The current position of the model in the model line graph can be represented by coordinate values of icons corresponding to the model in the model line graph, wherein the coordinate values take a coordinate system in the model line graph as a reference, and the coordinate system takes a target point in the model line graph as an origin. As shown in fig. 2, the current position of the model 1 in the model line diagram is the coordinate value of the icon of the model 1 in the coordinate system with the lower left corner vertex of the diagram as the origin of the coordinate system in the model line diagram.
The input variables of the model and the output variables of the model may be represented by variable names. In a particular implementation, the variable names of the input variables of a model may be named by the model name of the model connected to the input of the model, while the variable names of the output variables of the model may be named by the model name of the model itself. For example, the output of model 1 is connected to one input of model 2, the output variable of model 1 is denoted by 1, and the input variable of model 2 is denoted by the name 1 of model 1 to which the input of model 2 is connected.
The line connection relationship here includes: the relationship of the output of the model to which it is connected and/or the relationship of the input of the model to which it is connected.
In one case, only the output of the model is connected with other models;
in another case, only the input of the model is connected with other models;
in another case, the output end and the output end of the model are connected with other models.
Specifically, the variable name of the output variable of the model is consistent with the variable name of the input variable of the model connected with the output end of the model; the variable names of the input variables of the model are consistent with the variable names of the output variables of the model connected to the input end of the model.
For example, the output of model 1 is connected to one input of model 2, the output of model 3 is connected to the other input of model 2, and the output of model 2 is connected to model 4. At this time, the output variable of model 1 is consistent with one input variable of model 2, the output variable of model 3 is consistent with the other input variable of model 2, and the output variable of model 2 is consistent with the input variable of model 4.
Step 102: and setting a line synthesizer and a corresponding line decomposer for the model on the model line diagram according to the setting parameters.
The input end of the line synthesizer is connected with the output ends of at least two models, the output end of the line synthesizer is connected with the input end of the line decomposer, and the output end of the line decomposer is connected with the input ends of at least two models.
It should be noted that the line synthesizer has a plurality of input terminals, each input terminal of the line synthesizer is connected to an output terminal of one model, the line synthesizer has an output terminal, and the line resolver has an input terminal and a plurality of output terminals, and each output terminal of the line resolver is connected to an input terminal of one model.
Moreover, the line synthesizer and the line splitter are present in groups. That is, there is a line synthesizer to which there must be a line splitter.
In addition, a line connection relationship exists between the model connected to the line synthesizer and the model connected to the line decomposer, that is, the input variable of the model connected to the line decomposer is consistent with the output variable of the model connected to the line synthesizer, thereby ensuring accurate connection between the models.
The circuit synthesizer is of a rectangular structure, one long side is an input end, and the other long side is an output end. The circuit decomposer is also of a rectangular structure, one long side is an input end, and the other long side is an output end.
For example, the output of the model 1 is connected to one input of the model 2, the output of the model 3 is connected to the other input of the model 2, the output of the model 2 is connected to the model 4, the output of the model 5 is connected to the input of the model 6, and the output of the model 7 is connected to the input of the model 8, based on which, after the line synthesizer and the line splitter are provided for the model in the model line diagram, the outputs of the model 1, the model 3, the model 5 and the model 7 are connected to the input of the line synthesizer, the output of the line synthesizer is connected to the input of the line splitter, and the four outputs of the line splitter are connected to the two inputs of the model 2, the model 6 and the model 8, respectively, whereby the model line diagram is transformed from the line connection state shown in fig. 3 to the line connection state shown in fig. 4, whereby the purpose of simplifying the model line diagram is achieved by merging the lines and splitting the lines.
Further, in this embodiment, the model circuit diagram may be output to a display device, and the display device may be a structure embedded in an electronic device, such as a display screen in a notebook, or the display device may be a structure independent of the electronic device, such as a projection screen independent of the notebook, and so on. Thus, the input-output relationship between the models is provided for the user by outputting the model wiring diagram.
According to the technical scheme, in the line drawing method of the model line graph provided by the embodiment of the application, the setting parameters of a plurality of models in the model line graph are obtained, and then the line synthesizer and the corresponding line decomposer are arranged for the models, so that the lines between the models are combined and decomposed through the line synthesizer and the line decomposer, and therefore, the lines in the model line graph are simplified through the combined lines, and accurate line connection is realized through the decomposed lines, and further, the lines in the model line graph are simplified under the condition of ensuring accurate line connection, so that the purpose of improving the readability of the model line graph is achieved.
In one implementation, when the line synthesizer and the line splitter are set for the model according to the setting parameters in step 102, this may be achieved as shown in fig. 5 by:
step 501: the models are grouped to obtain at least one model set.
Wherein the model group comprises at least two models. Grouping of models may be implemented in this embodiment by any one or any of a plurality of different manners, so that models satisfying respective grouping conditions are divided into the same model group:
In one implementation, in step 501, the models may be grouped according to the current positions of the models in the setting state, so as to obtain at least one model group, where the current positions of the models in the same model group satisfy the position grouping condition.
In one example, the location grouping condition includes: the plurality of models in the model group are preset target shapes based on the layout shapes formed at the current positions thereof. For example, a plurality of models in the same model group present the shape of a vertical bar, a horizontal bar, or an L, etc. at the respective current positions on the model wiring diagram.
For example, as shown in fig. 6, the model 1, the model 3, the model 5, and the model 7 in the model group form a vertical bar shape of the upper and lower rows in the model wiring diagram; as another example, as shown in fig. 7, the model 1, the model 3, the model 5, and the model 7 in the model group form a horizontal bar shape of one row left and right in the model line diagram; as another example, as shown in fig. 8, the model 1, the model 3, the model 5, and the model 7 in the model group form an L shape in the model wiring diagram.
Based on this, in the present embodiment, after the current position of each model in the model route diagram is obtained, the model whose layout shape is the specified target shape may be divided into the same model group according to the recognition result by recognizing the layout shape formed by each model according to the current position, thereby obtaining one or more model groups.
In another example, the location grouping condition includes: the distance between the current positions of the plurality of models in the model set is less than a preset distance threshold. That is, multiple models in a model set are in the same region of proximity. For example, as shown in fig. 3, the distances between adjacent models in the model line graph of model 1, model 3, model 5, and model 7 in the model group are smaller than the distance threshold value, so that these several models are all intensively distributed in the region on the left side of the model line graph.
Based on this, in the present embodiment, after the current position of each model in the model route map is obtained, the relative distance between each model is calculated based on the current position of each model, so that models in which the distance between adjacent models is smaller than the distance threshold value are divided into the same model group, thereby obtaining one or more model groups.
In one implementation, in step 501, the models may be grouped according to the connection relationships between the models in the setting state and other models, so as to obtain at least one model group, where the connection relationships between the models in the same model group and other models satisfy the connection grouping condition.
Wherein the connection grouping condition may include: the direction of the output of each model in the set of models is the same. The direction of the output end refers to the direction of the output end relative to the model, such as the left side of the model, the right side of the model, and the like. For example, as shown in fig. 3, the outputs of each of model 1, model 3, model 5, and model 7 in the model group are all on the right side of the model.
In another implementation, step 501 may implement grouping of models according to a grouping input operation of a user, and may specifically be:
first, at least one packet input operation is received, where the packet input operation includes at least a plurality of selected models. Specifically, in this embodiment, the packet input operation performed by the user on the model line graph may be collected. For example, as shown in fig. 9, a model route diagram including a plurality of models is output on a display, and the user can select and group the models on the model route diagram, based on which the group input operation of the user is acquired in the present embodiment.
Then, the selected model is divided into a model group according to the grouping input operation to obtain at least one model group. For example, as shown in fig. 9, after a grouping input operation by the user on the model line diagram output by the display is acquired, the models selected in the grouping input operation, such as model 1, model 3, model 5, and model 7, are divided into one model group, thereby obtaining one model group.
Step 502: and setting a line synthesizer for the model group according to the setting parameters.
Wherein the input end of the line synthesizer is connected with the output end of the model in the model group.
Specifically, in this embodiment, according to the setting parameters, the output end and the output variable of each model in the model group are obtained, so as to set a line synthesizer for the model group, where the input end of the line synthesizer is connected to the output end of each model in the model group. For example, as shown in fig. 10, a line synthesizer is provided for a model group consisting of model 1, model 3, model 5, and model 7, and the respective outputs of model 1, model 3, model 5, and model 7 are connected to the inputs of the line synthesizer, respectively.
Step 503: and setting a line decomposer for the line synthesizer according to the setting parameters.
The input end of the line decomposer is connected with the output end of the line synthesizer, the output end of the line decomposer is connected with the first model, and the first model is a model of which the input end corresponds to the output end of the model in the model group.
Specifically, in this embodiment, according to the setting parameters, a first model connected to the output end of each model in the model group is obtained, and then the output end of the line decomposer corresponding to the line synthesizer is respectively connected to the input end of the first model, so that the combination and decomposition of the lines are realized between the models of the model group and the first model through the line synthesizer and the line decomposer.
For example, as shown in fig. 10, a line synthesizer and a corresponding line resolver are provided for a model group consisting of a model 1, a model 3, a model 5, and a model 7, the respective output terminals of the model 1, the model 3, the model 5, and the model 7 are connected to the input terminal of the line synthesizer, the output terminal of the line synthesizer is connected to the input terminal of the line resolver, and the output terminal of the line resolver is connected to the two input terminals of the model 2, the model 6, and the model 8, respectively, thereby achieving the purpose of simplifying the line.
Further, the line synthesizer is in a first position of the model line map, the first position being related to a position of the model in the set of models to which the line synthesizer is connected.
The first position where the line synthesizer is located may be a position on an output side of a model in the model group in the model line diagram. For example, as shown in fig. 10, the line synthesizer is at the right side of the model 1, i.e., at the output side of the model 1.
Accordingly, the line splitter is in a second position, the second position being associated with the first position and the second position being associated with the position of the first model. That is, the line splitter is disposed at a position opposite to the line combiner, and the second position where the line splitter is disposed corresponds to the first model to which the output terminal thereof is connected. For example, as shown in fig. 10, the line splitter is disposed on the right side of the line combiner, and the line splitters are disposed on the left sides of the models 2, 6, and 8.
Further, the specific positions of the line synthesizer and the line splitter can be set according to the principle that the total length of the line is the shortest. For example, the line synthesizer is disposed near the model group to which it is connected, and the line decomposer is disposed near the first model to which it is connected, whereby the purpose of further simplifying the model line drawing is achieved by lengthening the synthesized line and shortening the decomposed line. For example, as shown in fig. 10, the line synthesizer is disposed near the model 1, the model 3, the model 5, and the model 7, and the line decomposer is disposed near the model 2, the model 6, and the model 8.
In one implementation, the line synthesizer has a synthesized attribute that may be generated with the line synthesizer set to the model set, the synthesized attribute set based on a number of models in the model set, or set according to an attribute input operation of the user. The composite attribute may include the number of lines that it synthesizes, and further may also include the output variable of the model corresponding to each synthesized line. For example, as shown in FIG. 11, the line synthesizer contains a synthesis attribute characterizing that 4 lines are synthesized, model 1, model 3, model 5, and model 7, respectively, as output variables.
In addition, the line splitter has a splitting attribute that can be generated in a case where the line splitter is set to the line splitter and the corresponding first model, the splitting attribute being set based on at least an output variable of the model to which the line splitter is connected and an input variable of the first model to which an output terminal of the line splitter is connected, or according to an attribute input operation of a user. The decomposition attribute may include an output variable of a model connected to the line synthesizer and an input variable of a first model connected to an output end of the line decomposer, where the output variable in the decomposition attribute is an input signal of the line decomposer, and the input variable in the decomposition attribute is an output signal of the line decomposer. The order between the output variables in the decomposition attribute characterizes the relative position between the models of the input of the line synthesizer to which the line decomposer corresponds, and the order between the input variables in the decomposition attribute characterizes the relative position between the first models of the output of the line decomposer. For example, as shown in fig. 11, the line decomposer has a decomposition attribute including the output variables of the model 1, the model 3, the model 5, and the model 7, that is, the input signals of the line decomposer, and further, the decomposition attribute includes the two input variables of the model 2, the input variable of the model 6, and the input variable of the model 8, that is, the output signals of the line decomposer, the order between the input signals coincides with the order of the model 1, the model 3, the model 5, and the model 7 in the model line diagram from top to bottom, and the order between the output signals coincides with the order of the model 2, the model 6, and the model 8 in the model line diagram from top to bottom.
Example two
Referring to fig. 12, a schematic structural diagram of a circuit drawing device for a model circuit diagram according to a second embodiment of the present application may be configured on an electronic device capable of drawing a pattern, such as a mobile phone, pad, computer, etc. with a circuit drawing application program installed thereon. The line drawing application program can provide an operation interface for a user so as to facilitate the user to draw the model line graph, and the technical scheme of the application is mainly used for automatically adjusting the drawn model line graph so as to simplify the lines in the model line graph and further improve the readability of the model line graph.
Specifically, the apparatus in this embodiment may include the following units:
a parameter obtaining unit 1201 configured to obtain setting parameters of a plurality of models in a model line graph, the setting parameters characterizing a setting state of the models in the model line graph;
the circuit drawing unit 1202 is configured to set, on the model circuit diagram, a circuit synthesizer and a corresponding circuit resolver for the models according to the setting parameters, where an input end of the circuit synthesizer is connected to an output end of at least two models, an output end of the circuit synthesizer is connected to an input end of the circuit resolver, and an output end of the circuit resolver is connected to an input end of at least two models.
It can be seen from the above technical solution that, in the line drawing device for a model line graph provided in the second embodiment of the present application, by obtaining setting parameters of a plurality of models in the model line graph, and further by setting a line synthesizer and a corresponding line decomposer for the models, lines between the models are combined and decomposed by the line synthesizer and the line decomposer, so that lines in the model line graph are simplified by combining the lines and accurate line connection is achieved by decomposing the lines, and further lines in the model line graph are simplified under the condition of ensuring accurate line connection, so as to achieve the purpose of improving the readability of the model line graph.
In one implementation, the circuit drawing unit 1202 is specifically configured to: grouping the models to obtain at least one model group, wherein the model group comprises at least two models; setting a circuit synthesizer for the model group according to the setting parameters, wherein the input end of the circuit synthesizer is connected with the output end of the model in the model group; according to the setting parameters, a line decomposer is arranged for the line synthesizer, the input end of the line decomposer is connected with the output end of the line synthesizer, the output end of the line decomposer is connected with a first model, and the first model is a model of which the input end corresponds to the output end of the model in the model group.
Specifically, the line drawing unit 1202 may group the models according to the current positions of the models in the setting state, so as to obtain at least one model group, where the current positions of the models in the same model group satisfy the position grouping condition. Wherein the location grouping condition includes: a plurality of models in the model group are preset target shapes based on layout shapes formed by the current positions of the models; alternatively, the distances between the current positions of the plurality of models in the model set are less than a preset distance threshold.
Specifically, the line drawing unit 1202 may group the models according to the connection relationship between the model and other models in the setting state, so as to obtain at least one model group, where the connection relationship between the model in the same model group and other models satisfies a connection grouping condition, and the connection grouping condition includes: the direction of the output end of each model in the model group is the same.
Specifically, the line drawing unit 1202 may receive at least one packet input operation including at least a plurality of selected models; dividing the selected model into a model group according to the grouping input operation to obtain at least one model group.
In one implementation, the line synthesizer is in a first position, the first position being related to a position of a model in a set of models to which the line synthesizer is connected; the line splitter is in a second position, the second position being associated with the first position and the second position being associated with the position of the first model.
In one implementation, the line synthesizer has a synthetic attribute that is set based on a number of the plurality of models in the model set; the line splitter has a splitting attribute set based on at least an output variable of a model to which the line combiner is connected and an input variable of a first model to which an output of the line splitter is connected.
It should be noted that, the specific implementation of each unit in this embodiment may refer to the corresponding content in the foregoing, which is not described in detail herein.
Example III
Referring to fig. 13, a schematic structural diagram of an electronic device according to a third embodiment of the present application may be an electronic device capable of performing graphics drawing, such as a mobile phone, a pad, a computer, or other terminals with a line drawing application installed thereon. The line drawing application program can provide an operation interface for a user so as to facilitate the user to draw the model line graph, and the technical scheme of the application is mainly used for automatically adjusting the drawn model line graph so as to simplify the lines in the model line graph and further improve the readability of the model line graph.
Specifically, the electronic device in this embodiment may include the following structure:
a memory 1301 for storing an application program and data generated by the running of the application program;
a processor 1302, configured to execute the application program to implement: obtaining setting parameters of a plurality of models in a model circuit diagram, wherein the setting parameters represent setting states of the models in the model circuit diagram; according to the setting parameters, a line synthesizer and a corresponding line decomposer are arranged for the model on the model line diagram, the input end of the line synthesizer is connected with the output ends of at least two models, the output end of the line synthesizer is connected with the input end of the line decomposer, and the output end of the line decomposer is connected with the input ends of at least two models.
It can be seen from the above technical solution that, in the electronic device provided in the third embodiment of the present application, by obtaining the setting parameters of multiple models in the model line graph, and further by setting a line synthesizer and a corresponding line decomposer for the models, the lines between the models are combined and decomposed by the line synthesizer and the line decomposer, so that the lines in the model line graph are simplified by combining the lines and the accurate line connection is realized by decomposing the lines, and further the lines in the model line graph are simplified under the condition of ensuring that the line connection is accurate, so as to achieve the purpose of improving the readability of the model line graph.
It should be noted that, the specific implementation of the processor in this embodiment may refer to the corresponding content in the foregoing, which is not described in detail herein.
Taking the model circuit diagram shown in fig. 14 as an example, the technical scheme of the application is adopted to perform circuit optimization so as to obtain the model circuit diagram shown in fig. 15, so as to achieve the purpose of simplifying the model circuit diagram and further improve the readability of the model circuit diagram. In a specific implementation, the implementation of the automatic optimized connection logic in this embodiment may be as follows:
1. the number of output variables of the models in the model group is used for determining the number of input ends of the circuit synthesizer mux, as shown in fig. 16, the left side of the circuit synthesizer is the input end of the circuit synthesizer, and the left side of the circuit synthesizer corresponds to the output variables of the models in the model group one by one;
2. the number of input variables of the first model corresponding to the models in the model group is used for determining the number of output ends of the line decomposer demux, as shown in fig. 17, the right side of the line decomposer is the output end of the line decomposer, and the input variables of the first model corresponding to the models in the model group are in one-to-one correspondence;
3. the connection relation between the models is used for determining the line connection relation between the line synthesizer, the line decomposer and the models;
The setting of the line synthesizer needs to use a model and output variables thereof; the setting of the line decomposer needs to use a model, an output variable, an input variable and a line connection relation of the output variable and the input variable, wherein the output end of the line decomposer represents the arrangement of the input variable, and is determined according to the position of the input variable of the first model, and the principle is that the line decomposer is firstly up and down, and is firstly left and right. In addition, the setting of the line connection relationship between the line synthesizer and the line resolver requires the use of the line connection relationship between the output variable and the input variable.
4. The three dimensions of the position of the model, the position of the input variable and the position of the output variable are used for determining the actual graph sizes and positions of the line synthesizer and the line decomposer, so that the model line graph is more attractive, and the specific logic is as follows:
(1) If the models where the output variables are located are arranged vertically, a line synthesizer capable of containing the output variables can be automatically generated, as shown in fig. 18, after three models distributed vertically are selected and the output ends of the models are also selected, a selection box appears on the right key, wherein one option is "use synthesizer and decomposer to optimize automatically", after the models are generated on the right side of the models, the connection lines are automatically generated, as shown in fig. 19, the same logic as that of the line decomposer is generated on the right side of the model where the input variables are located, except that the line decomposer is generated on the right side of the models where the input variables are located.
(2) If the models where the output variables are located are arranged left and right, the line synthesizer is not generated as the up-down phenomenon, and the line synthesizer is generated on the right side of the model where the output variables are located according to the principle of the minimum graph size, and the graph of the line synthesizer automatically generated in fig. 10 is relatively smaller than the graph of fig. 19 as shown in fig. 20 and 21, which is the principle of the minimum graph size, except that the line synthesizer is generated on the right side of the model where the input variables are located.
(3) The model to be automatically optimized has the vertical arrangement and the left-right arrangement, and the position is automatically generated at the upper left corner or the upper right corner according to the minimum graph size principle.
The following describes a specific implementation procedure of the line optimization, taking the model line diagram in fig. 14 as an example:
as shown in fig. 14, it can be seen that in the design scenario where the line synthesizer and the line decomposer are not used, the variable input-output relationship between the models is relatively disordered and is not easy to be clarified, wherein the output connection lines of the six models (initial_ acceleration, initial _ velocity, initial _ displacement, mass, damping _ coefficient, spring _constant respectively) on the leftmost side have an overlapping phenomenon, and the output connection lines of the three models (mul_3 and Integrator, integrator _2 respectively) on the right side have an overlapping phenomenon. The wire disorder causes poor design scene readability, and the technical scheme of the application is adopted to solve the problem by introducing a wire synthesizer and a wire decomposer.
First, the graphs and properties of the line synthesizers are shown in fig. 16 and 22, respectively. As shown in fig. 16, the left input end of the line synthesizer may be connected to a plurality of output variables, and these lines may be synthesized into a bundle of lines according to the connection lines, and the transmitted lines may be decomposed into the required output variables as required by the line decomposer. Fig. 22 shows a property diagram of the line synthesizer, and only the number of input terminals of the line synthesizer itself can be seen, in this embodiment, after the number of input terminals of the line synthesizer is automatically generated, the number of input terminals on the left side of the line synthesizer can be adjusted by the user according to the requirement, and fig. 22 shows 2 input terminals.
And the data decomposer and the graph and attributes are shown in fig. 17 and 23, respectively. As shown in fig. 17, the right side of the line splitter may connect the split lines to the multiple models, split the transmitted line into the required single line, split the line according to the requirement in the model design process, split the multiple lines, or split only one line. Fig. 23 is a diagram showing the properties of the line splitter, the left side input signal representing the output variables of the transmitted model, and the right side representing the input variables of the connected model, which are split as needed to connect to the corresponding model. In this embodiment, after the input signal and the output signal of the line splitter are automatically generated, the user may adjust the input signal and the output signal according to the requirements.
First, the automatic generation steps of the first set of line synthesizers and line splitters are as follows:
(1) Determining the relation of the models to be adjusted, as shown in fig. 11, six models (initial_ acceleration, initial _ velocity, initial _ displacement, mass, damping _ coefficient, spring _constant) in the left frame conform to the principle of up-down arrangement, and all the models have output lines, and the models can be automatically integrated into a bundle of lines by using a line synthesizer mux;
(2) The output variables of six models (initial_ acceleration, initial _ velocity, initial _ displacement, mass, damping _ coefficient, spring _constant) in the left frame are respectively related to the input variables of four models (mul_div, mul_2, mul_3 and Integrator), the output variables of six models, the input variables of four models and the connecting lines between the four models are respectively selected, the line synthesized by the line synthesizer mux can be automatically decomposed by using the line decomposer demux, and the sequence of the variables represented by the output end of the line decomposer is the input_ velocity, damping _ coefficient, initial _ displacement, spring _ constant, mass, initial of the line decomposer according to the input variable positions of the four models (mul_div, mul_2, mul_3 and Integrator) in the order of two inputs of muldiv_div, two inputs of mul_2, one input of mul_3 and one input of Integrator according to the principle of top and bottom, left and right. Based on this, a first set of line synthesizers and line splitters patterns are shown in fig. 24.
Wherein the internal data contained in the decomposition attribute inside the line decomposer is shown in fig. 25.
Next, the steps of automatically generating the second set of line synthesizers and line splitters are as follows:
(1) As shown in fig. 11, the three models (mul_3, integrator, integrator _2) in the right frame conform to the left-right arrangement principle and all have output variables, which can be automatically integrated into one bundle line using the line synthesizer mux_2.
2) The input variables of the three models (initial_ acceleration, initial _ velocity, initial _displacement) in the left frame are respectively in a connection relationship with the output variables of the three models (mul_3, integrator, integrator _2) on the right, the input variables of the three models on the left, the output variables of the three models on the right and the connection between each other are respectively selected, the line decomposer demux_3 can be used for automatically decomposing the line synthesized by the line decomposer, and the input variable positions of the three models (initial_ acceleration, initial _ velocity, initial _displacement) are used for sequentially selecting the input variables of the three models in the order of one input of initial_acceletion, one input of initial_displacement and one input of the Integrator according to the principle of first-up and then-down, left-right, and the variable sequence represented by the output end of the line decomposer is mul_3, integrator, integrator _2 according to the connection relationship. Based on this, the patterns of the second group of line synthesizers and line splitters are shown in fig. 26. The internal data included in the decomposition attribute in the line decomposer is shown in fig. 27.
Based on the above line optimization, a simplified model line diagram as shown in fig. 15 is obtained, so that the line display between the optimized models is more visual, concise and convenient, one-to-one or one-to-many line operation between the output variable and the input variable can be realized in the technical scheme of the application, the accurate and rapid operation of a designer is facilitated, the layout design of an interface is optimized, and further, the design method for automatically optimizing the line logic in the application can enable the designer to automatically optimize own design model diagram scenes without excessive design.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
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 elements and steps are described above generally in terms of functionality in order to clearly illustrate the 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 solution. 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 application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. 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 application. Thus, the present application 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 (7)

1. A line drawing method of a model line drawing, characterized by comprising:
obtaining setting parameters of a plurality of models in a model circuit diagram, wherein the setting parameters represent setting states of the models in the model circuit diagram;
Grouping the models to obtain at least one model group, wherein the model group comprises at least two models; setting a circuit synthesizer for the model group according to the setting parameters, wherein the input end of the circuit synthesizer is connected with the output end of the model in the model group; according to the setting parameters, a line decomposer is arranged for the line synthesizer, the input end of the line decomposer is connected with the output end of the line synthesizer, the output end of the line decomposer is connected with a first model, and the first model is a model of which the input end corresponds to the output end of the model in the model group; the line synthesizer is in a first position, the first position being related to the position of a model in a set of models to which the line synthesizer is connected; the line splitter is in a second position, the second position being associated with the first position and the second position being associated with the position of the first model;
said grouping of said models to obtain at least one model group comprising: grouping the models according to the connection relation between the models and other models in the setting state to obtain at least one model group, wherein the connection relation between the models and other models in the same model group meets connection grouping conditions, and the connection grouping conditions comprise: the direction of the output end of each model in the model group is the same.
2. The method of claim 1, wherein grouping the models to obtain at least one model set comprises:
and grouping the models according to the current positions of the models in the setting state to obtain at least one model group, wherein the current positions of the models in the same model group meet the position grouping condition.
3. The method of claim 2, wherein the location grouping condition comprises: a plurality of models in the model group are preset target shapes based on layout shapes formed by the current positions of the models; alternatively, the distances between the current positions of the plurality of models in the model set are less than a preset distance threshold.
4. The method of claim 1, wherein grouping the models to obtain at least one model set comprises:
receiving at least one packet input operation, the packet input operation comprising at least a plurality of selected models;
dividing the selected model into a model group according to the grouping input operation to obtain at least one model group.
5. The method of claim 1, wherein the line synthesizer has a synthetic attribute that is set based on a number of the plurality of models in the model set; the line splitter has a splitting attribute set based on at least an output variable of a model to which the line combiner is connected and an input variable of a first model to which an output of the line splitter is connected.
6. A line drawing apparatus of a model line drawing, comprising:
a parameter obtaining unit, configured to obtain setting parameters of a plurality of models in a model line graph, where the setting parameters characterize a setting state of the models in the model line graph;
the line drawing unit is used for grouping the models to obtain at least one model group, wherein the model group comprises at least two models; setting a circuit synthesizer for the model group according to the setting parameters, wherein the input end of the circuit synthesizer is connected with the output end of the model in the model group; according to the setting parameters, a line decomposer is arranged for the line synthesizer, the input end of the line decomposer is connected with the output end of the line synthesizer, the output end of the line decomposer is connected with a first model, and the first model is a model of which the input end corresponds to the output end of the model in the model group; the line synthesizer is in a first position, the first position being related to the position of a model in a set of models to which the line synthesizer is connected; the line splitter is in a second position, the second position being associated with the first position and the second position being associated with the position of the first model;
Said grouping of said models to obtain at least one model group comprising: grouping the models according to the connection relation between the models and other models in the setting state to obtain at least one model group, wherein the connection relation between the models and other models in the same model group meets connection grouping conditions, and the connection grouping conditions comprise: the direction of the output end of each model in the model group is the same.
7. An electronic device, comprising:
a memory for storing an application program and data generated by the operation of the application program;
a processor for executing the application program to realize: obtaining setting parameters of a plurality of models in a model circuit diagram, wherein the setting parameters represent setting states of the models in the model circuit diagram; grouping the models to obtain at least one model group, wherein the model group comprises at least two models; setting a circuit synthesizer for the model group according to the setting parameters, wherein the input end of the circuit synthesizer is connected with the output end of the model in the model group; according to the setting parameters, a line decomposer is arranged for the line synthesizer, the input end of the line decomposer is connected with the output end of the line synthesizer, the output end of the line decomposer is connected with a first model, and the first model is a model of which the input end corresponds to the output end of the model in the model group; the line synthesizer is in a first position, the first position being related to the position of a model in a set of models to which the line synthesizer is connected; the line splitter is in a second position, the second position being associated with the first position and the second position being associated with the position of the first model;
Said grouping of said models to obtain at least one model group comprising: grouping the models according to the connection relation between the models and other models in the setting state to obtain at least one model group, wherein the connection relation between the models and other models in the same model group meets connection grouping conditions, and the connection grouping conditions comprise: the direction of the output end of each model in the model group is the same.
CN202111274854.5A 2021-10-29 2021-10-29 Line drawing method and device of model line diagram and electronic equipment Active CN113987618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111274854.5A CN113987618B (en) 2021-10-29 2021-10-29 Line drawing method and device of model line diagram and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111274854.5A CN113987618B (en) 2021-10-29 2021-10-29 Line drawing method and device of model line diagram and electronic equipment

Publications (2)

Publication Number Publication Date
CN113987618A CN113987618A (en) 2022-01-28
CN113987618B true CN113987618B (en) 2023-10-20

Family

ID=79744616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111274854.5A Active CN113987618B (en) 2021-10-29 2021-10-29 Line drawing method and device of model line diagram and electronic equipment

Country Status (1)

Country Link
CN (1) CN113987618B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201689421U (en) * 2009-12-30 2010-12-29 上海迦美信芯通讯技术有限公司 Generation device for circuit diagram of package model
CN105243607A (en) * 2015-09-30 2016-01-13 北京恒华伟业科技股份有限公司 Engineering circuit diagram generation method and apparatus
CN111368497A (en) * 2020-03-13 2020-07-03 浪潮商用机器有限公司 Circuit board schematic diagram design method and device, electronic equipment and storage medium
CN112861382A (en) * 2021-03-17 2021-05-28 广东电网有限责任公司 Method and device for drawing power line diagram in power system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201439801A (en) * 2013-04-08 2014-10-16 Hon Hai Prec Ind Co Ltd Design system and method of power source
TWI646440B (en) * 2017-07-03 2019-01-01 和碩聯合科技股份有限公司 Circuit comparison method and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201689421U (en) * 2009-12-30 2010-12-29 上海迦美信芯通讯技术有限公司 Generation device for circuit diagram of package model
CN105243607A (en) * 2015-09-30 2016-01-13 北京恒华伟业科技股份有限公司 Engineering circuit diagram generation method and apparatus
CN111368497A (en) * 2020-03-13 2020-07-03 浪潮商用机器有限公司 Circuit board schematic diagram design method and device, electronic equipment and storage medium
CN112861382A (en) * 2021-03-17 2021-05-28 广东电网有限责任公司 Method and device for drawing power line diagram in power system

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
PSCAD中的频变参数线路模型(Frequency-Dependent (Phase) Line Model);一一数二三;CSND;1-3 *
基于组合图元的输电网单线图自动布局方法;赵冬梅 等;电网技术(10);1-6 *
用Excel2003绘制电子线路图;梁成升;通信技术(第3期);1-3 *
用于无绳电话的嵌入式锁相频率合成器;乔娟,邵丙铣;微电子学(06);1-6 *
绘制电子线路图程序系统;贺先枫;计算机应用(01) *

Also Published As

Publication number Publication date
CN113987618A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
CN102222124B (en) Platform and method for automatically generating design schematic diagram of automatic test system
CN104217046B (en) Wiring method and device
US7788076B2 (en) Interference analysis method, interference analysis device, interference analysis program and recording medium with interference analysis program recorded thereon
CN104077446B (en) The method and system of two-dimentional electrical construction document are extracted from digital three-dimemsional model
JP2008165753A (en) Cad apparatus and cad program
CN115017860B (en) Incremental layout optimization method and device for layout and wiring synchronization and computer equipment
CN107797804A (en) The method and apparatus for generating front end interactive interface
JP4962285B2 (en) CAD apparatus and CAD program
CN109359281A (en) Dynamic list generation method and device
US8863062B2 (en) Methods and apparatus for floorplanning and routing co-design
CN113268303A (en) Interface element configuration method and device, storage medium and electronic equipment
CN106294916A (en) A kind of automatic graph generation method of cable system circuit diagram
CN116151179A (en) Layout planning method of chip design and related equipment
CN113987618B (en) Line drawing method and device of model line diagram and electronic equipment
CN112003729A (en) Heterogeneous cloud platform resource topology display method, system, terminal and storage medium
JP5050809B2 (en) Mating Check Support Device and Mating Check Support Program
US8250516B2 (en) Printed circuit board layout system and method for merging overlapping polygons into irregular shapes
CN110059306A (en) Processing method, device, equipment and the computer readable storage medium of online table
US8234613B2 (en) Program, design apparatus, and design method for dynamic reconfigurable circuit
CN114781300B (en) Editable logic array wiring method, device, equipment and storage medium
CN116362190A (en) Interactive layout planning method for chip design and related equipment
CN116227407A (en) Method for forming module boundary of physical layout and related equipment
JP4918907B2 (en) Test data generation program, test data generation device, and test data generation method
CN110244895A (en) Control method, apparatus, the mobile terminal, storage medium of input method banner position
CN112395657A (en) Box construction method, device, system and computer readable medium

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