CN107369192B - Connection relation processing method and device - Google Patents

Connection relation processing method and device Download PDF

Info

Publication number
CN107369192B
CN107369192B CN201710401219.6A CN201710401219A CN107369192B CN 107369192 B CN107369192 B CN 107369192B CN 201710401219 A CN201710401219 A CN 201710401219A CN 107369192 B CN107369192 B CN 107369192B
Authority
CN
China
Prior art keywords
nodes
layer
connection relation
adjusted
relation graph
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
CN201710401219.6A
Other languages
Chinese (zh)
Other versions
CN107369192A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201710401219.6A priority Critical patent/CN107369192B/en
Publication of CN107369192A publication Critical patent/CN107369192A/en
Application granted granted Critical
Publication of CN107369192B publication Critical patent/CN107369192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/39Circuit design at the physical level
    • G06F30/392Floor-planning or layout, e.g. partitioning or placement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0633Workflow analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Hardware Design (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Tourism & Hospitality (AREA)
  • Development Economics (AREA)
  • Signal Processing (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Educational Administration (AREA)
  • General Business, Economics & Management (AREA)
  • Architecture (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

The embodiment of the application discloses a method and a device for processing a connection relationship, wherein the method comprises the following steps: based on the connection relation graph of the multi-layer nodes to be adjusted, adjusting the distribution sequence of each layer of nodes in the connection relation graph to be adjusted at least once in an alternate mode of reverse adjustment and forward adjustment according to a preset adjustment strategy; wherein the reverse adjustment comprises: in a reverse order mode, adjusting the distribution order of the nodes of the previous layer according to the distribution order of the nodes of the current layer, wherein the forward adjustment comprises the following steps: adjusting the distribution sequence of the nodes of the next layer in a positive sequence mode according to the distribution sequence of the nodes of the current layer; acquiring the number of cross connections in the connection relation graph after each forward or reverse adjustment; and taking the adjusted connection relation graph with the number of the cross connections meeting the preset condition as a target connection relation graph. By utilizing the method and the device, the target connection relation graph containing as few cross connections as possible can be conveniently and quickly obtained, and therefore the processing efficiency of the connection relation is improved.

Description

Connection relation processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a connection relationship.
Background
With the continuous development of network and electronic technology and the improvement of informatization level of each field of society, the generated data is continuously increased, and the relationship among the data is complex and various. In order to clear the relationship between data, different workflow diagrams are required to be established according to complex business logic to describe different operation flows.
Generally, the logical relationship between data and data (or node and node, etc.) can be visually and clearly shown through a manual layout connection relationship diagram (such as a flow chart). Taking the connection relation graph as a program flow chart as an example, a user distributes and arranges processing symbols or data (namely nodes) representing actual processing operation and streamline symbols (namely connecting lines or directional connecting lines) representing control flows according to a preset execution sequence (or rule) of a program, and finally, draws and adjusts all possible execution paths into a complete program flow chart.
However, although the manual layout method can lay out any desired connection diagram according to the user's mind, the connection processing method consumes more human resources and a lot of processing time, thereby making the connection processing inefficient.
Disclosure of Invention
An embodiment of the present invention provides a method and an apparatus for processing a connection relationship, so as to solve the problem that in the prior art, a large amount of labor cost and a large amount of processing time are required to be consumed, so that the processing efficiency of the connection relationship is low.
In order to solve the above technical problem, the embodiment of the present application is implemented as follows:
the connection relation processing method provided by the embodiment of the application comprises the following steps:
based on the connection relation graph of the multi-layer nodes to be adjusted, adjusting the distribution sequence of each layer of nodes in the connection relation graph to be adjusted at least once in an alternate mode of reverse adjustment and forward adjustment according to a preset adjustment strategy; the nodes which are related to each other in two adjacent layers in the connection relation graph to be adjusted are connected, and the connection relation graph to be adjusted comprises cross connection; wherein the reverse adjustment comprises: adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode according to the distribution sequence of the nodes of the current layer; wherein the forward adjustment comprises: adjusting the distribution sequence of the nodes of the next layer in a positive sequence mode according to the distribution sequence of the nodes of the current layer;
acquiring the number of cross connections in the connection relation graph after each forward or reverse adjustment;
and taking the adjusted connection relation graph with the number of the cross connections meeting the preset condition as a target connection relation graph.
Optionally, before the adjusting the distribution order of the nodes in each layer in the connection relationship graph at least once in an alternating manner of a reverse adjustment and a forward adjustment based on the connection relationship graph of the nodes in multiple layers to be adjusted, the method further includes:
and determining the distribution sequence of the next layer of nodes from the first layer of nodes according to the nodes of the current layer in sequence, and connecting the nodes which are correlated with each other in the two adjacent layers of nodes to generate the connection relation graph to be adjusted, wherein the connection relation graph comprises a plurality of layers of nodes.
Optionally, the performing reverse adjustment on the distribution sequence of each layer of nodes in the connection relationship diagram to be adjusted includes:
based on the connection relation graph of the multilayer nodes to be adjusted, starting from the last layer in the connection relation graph of the multilayer nodes to be adjusted, sequentially adjusting the distribution sequence of the nodes in the previous layer in a reverse order mode, and sequentially connecting the nodes which are correlated with each other in the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the method for forward adjustment of the distribution sequence of each layer of nodes in the connection relation graph to be adjusted comprises the following steps:
and starting from the first layer in the connection relation graph after the reverse adjustment, sequentially adjusting the distribution sequence of the nodes in the next layer in a positive sequence mode, and sequentially connecting the mutually associated nodes in the two adjacent layers of nodes to obtain the connection relation graph after the forward adjustment.
Optionally, the performing reverse adjustment on the distribution sequence of each layer of nodes in the connection relationship diagram to be adjusted includes:
determining a layer containing cross connection from a connection relation graph of a plurality of layers of nodes to be adjusted;
sequentially adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode from the lowest layer of the obtained layers containing the cross connection, and sequentially connecting the mutually associated nodes of the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the method for forward adjustment of the distribution sequence of each layer of nodes in the connection relation graph to be adjusted comprises the following steps:
and starting from the first layer containing cross connection in the connection relation graph after the reverse adjustment, sequentially adjusting the distribution sequence of the nodes of the next layer in a positive sequence mode, and sequentially connecting the mutually associated nodes in the two adjacent layers of nodes to obtain the connection relation graph after the forward adjustment.
Optionally, the determining, starting from the first-layer node, a distribution order of the next-layer node according to the node of the current layer in sequence, and connecting the nodes associated with each other in the two adjacent layers of nodes to generate the connection relationship graph to be adjusted, which includes multiple layers of nodes, includes:
dividing a plurality of layers for the nodes according to the information of the nodes and the logic relation information among the nodes, and taking a root node in the nodes as the first layer node;
and according to the logic relationship information among the nodes, expanding from the root node to leaf nodes in the nodes along a connecting line so as to generate the connection relationship graph to be adjusted, wherein the connection relationship graph comprises a plurality of layers of nodes.
Optionally, the method further includes, according to the information of the logical relationship between the nodes, extending from the root node along a connecting line until after a leaf node in the nodes, and further including:
and adjusting the positions of the nodes in the same layer so that the nodes in the same layer do not contain the nodes which are overlapped with each other.
Optionally, the taking the adjusted connection relation graph in which the number of cross connections meets the preset condition as the target connection relation graph includes:
and taking the connection relation graph with the minimum number of cross connections in the adjusted connection relation graph as the target connection relation graph.
Optionally, the preset adjustment policy includes: and performing forward adjustment or reverse adjustment for a preset number of times, or stopping performing the forward adjustment or reverse adjustment when the number of the cross connections in the current adjusted connection relation graph is larger than the number of the cross connections in the previous adjusted connection relation graph.
An embodiment of the present application provides a connection relation processing apparatus, where the apparatus includes:
the adjusting module is used for adjusting the distribution sequence of each layer of nodes in the connection relation graph to be adjusted at least once according to a preset adjusting strategy in a reverse adjusting and forward adjusting alternate mode on the basis of the connection relation graph of the plurality of layers of nodes to be adjusted; the nodes which are related to each other in two adjacent layers in the connection relation graph to be adjusted are connected, and the connection relation graph to be adjusted comprises cross connection; wherein the reverse adjustment comprises: adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode according to the distribution sequence of the nodes of the current layer; wherein the forward adjustment comprises: adjusting the distribution sequence of the nodes of the next layer in a positive sequence mode according to the distribution sequence of the nodes of the current layer;
the number acquisition module is used for acquiring the number of the cross connections in the connection relation graph after each forward or reverse adjustment;
and the target graph determining module is used for taking the adjusted connection relation graph of which the number of the cross connections meets the preset condition as the target connection relation graph.
Optionally, the apparatus further comprises:
and the relation graph generating module is used for determining the distribution sequence of the next layer of nodes in sequence from the first layer of nodes according to the nodes of the current layer and connecting the nodes which are related to each other in the two adjacent layers of nodes to generate the connection relation graph containing the plurality of layers of nodes and to be adjusted.
Optionally, the adjusting module is configured to sequentially adjust, based on the connection relationship diagram of the to-be-adjusted multilayer node, a distribution sequence of the node in the previous layer from the last layer in the connection relationship diagram of the to-be-adjusted multilayer node in a reverse order manner, and sequentially connect mutually associated nodes in two adjacent layers of nodes to obtain a connection relationship diagram after reverse adjustment;
the adjusting module is further configured to sequentially adjust the distribution sequence of the nodes in the next layer in a positive sequence manner from the first layer in the connection relationship diagram after the reverse adjustment, and sequentially connect the nodes associated with each other in the two adjacent layers of nodes to obtain the connection relationship diagram after the forward adjustment.
Optionally, the adjusting module is configured to determine a layer including cross connection from a connection relation graph of a plurality of layers of nodes to be adjusted; sequentially adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode from the lowest layer of the obtained layers containing the cross connection, and sequentially connecting the mutually associated nodes of the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the adjusting module is further configured to sequentially adjust a distribution sequence of nodes in a next layer according to a positive sequence manner from a first layer including cross connections in the connection relationship graph after the backward adjustment, and sequentially connect mutually associated nodes in two adjacent layers of nodes to obtain the connection relationship graph after the forward adjustment.
Optionally, the relationship diagram generating module includes:
the hierarchical unit is used for dividing a plurality of layers for the nodes according to the information of the nodes and the logic relation information among the nodes, and taking a root node in the nodes as the first layer node;
and the relation graph generating unit is used for expanding from the root node to a leaf node in the nodes along a connecting line according to the logic relation information among the nodes so as to generate the connection relation graph to be adjusted, wherein the connection relation graph comprises a plurality of layers of nodes.
Optionally, the apparatus further comprises:
and the position adjusting module is used for adjusting the positions among the nodes in the same layer so as to ensure that the nodes in the same layer do not contain the nodes which are mutually overlapped.
Optionally, the target graph determining module is configured to use the connection relationship graph with the minimum number of cross connections in the adjusted connection relationship graph as the target connection relationship graph.
Optionally, the preset adjustment policy includes: and performing forward adjustment or reverse adjustment for a preset number of times, or stopping performing the forward adjustment or reverse adjustment when the number of the cross connections in the current adjusted connection relation graph is larger than the number of the cross connections in the previous adjusted connection relation graph.
As can be seen from the above technical solutions provided by the embodiments of the present application, in the embodiments of the present application, through a connection relationship diagram of a plurality of layers of nodes to be adjusted, two adjacent layers of nodes associated with each other are connected in an alternate manner of reverse adjustment and forward adjustment according to a preset adjustment policy, and a distribution order of each layer of nodes in the connection relationship diagram to be adjusted including cross connection is adjusted at least once, so as to obtain the number of cross connections in the connection relationship diagram after each forward or reverse adjustment, and use an adjusted connection relationship diagram in which the number of cross connections satisfies a preset condition as a target connection relationship diagram, so that the connection relationship diagram to be adjusted can be laid out as a target connection relationship diagram including cross connections as little as possible without manual involvement by reverse adjustment and forward adjustment, thereby saving human resources, the consumption of processing time is reduced, and the processing efficiency of the connection relation is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a diagram illustrating an embodiment of a connection relationship processing method according to the present application;
FIG. 2 is a diagram of a connection relationship to be adjusted according to the present application;
FIGS. 3A-3C are schematic diagrams of a reverse adjustment process according to the present application;
FIGS. 4A-4C are schematic diagrams illustrating a forward adjustment process according to the present application;
FIGS. 5A-5C are schematic diagrams of another reverse tuning process of the present application;
FIG. 6 is a diagram illustrating another embodiment of a method for processing connection relationships according to the present application;
FIGS. 7A to 7C are schematic diagrams illustrating a generation process of a connection relation graph to be adjusted according to the present application;
FIG. 8 is a diagram illustrating an embodiment of a connection relationship processing apparatus according to the present application;
fig. 9 is an embodiment of a connection relation processing apparatus according to the present application.
Detailed Description
The embodiment of the application provides a connection relation processing method and device.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
Example one
As shown in fig. 1, an execution main body of the method may be a server or a terminal device, where the terminal device may be a personal computer, a mobile phone, or a tablet computer, and this embodiment takes the terminal device as an example for description. The method can be used for laying out the nodes in the connection relationship diagram so as to make the nodes in the connection relationship diagram uniformly distributed, and the like, and specifically comprises the following steps:
in step S101, based on the connection relationship diagram of the multi-layer nodes to be adjusted, the distribution order of each layer of nodes in the connection relationship diagram to be adjusted is adjusted at least once in an alternate manner of reverse adjustment and forward adjustment according to a preset adjustment policy.
The connection relation diagram to be adjusted may be any diagram having a mutual connection relation, for example, a flow diagram, a block diagram, a circuit diagram, or a network diagram formed by connecting network devices, and the like, where a process corresponding to the flow diagram or the block diagram may be a process flow on an actual production line, or a management process necessary for completing a task, and the like, and the circuit diagram may be a circuit diagram connected between any power supply and an electrical appliance, such as a circuit diagram inside a certain device, and a connection circuit diagram of the device and an external power supply, and the like, or a circuit diagram in a PCB circuit board, and the like. The connection relation graph to be adjusted may include a plurality of layers, each layer may include one or more nodes, and a certain step or a certain block (e.g., a square or a rectangular block) in the flowchart or the block diagram may be used as a node. And connecting the nodes which are correlated with each other in two adjacent layers in the connection relation graph to be adjusted, wherein the connection relation graph to be adjusted comprises cross connection. The cross connection may be a connection in which a connection line between certain nodes crosses another connection line in the process of connecting the nodes to each other. The reverse adjustment comprises the following steps: and in a reverse order mode, adjusting the distribution order of the nodes of the previous layer according to the distribution order of the nodes of the current layer, wherein the current layer can be the layer being processed. The forward adjustment comprises: and adjusting the distribution sequence of the nodes of the next layer according to the distribution sequence of the nodes of the current layer in a positive sequence mode. The preset adjustment policy may include the number of forward adjustments and/or reverse adjustments, specifically 10 times or 5 times, or may include a threshold of cross connection, specifically 0 or 3, or may include other related information of a preset condition, and the like.
In implementation, the connection relationship graph of the multilayer node to be adjusted may be obtained in a variety of ways, for example, a user may pre-draw any connection relationship graph that needs to be adjusted, and after the drawing is completed, the drawn connection relationship graph that needs to be adjusted may be input to the terminal device, so as to obtain the connection relationship graph of the multilayer node to be adjusted, or the connection relationship graph may be preliminarily constructed as the connection relationship graph of the multilayer node to be adjusted by using a forward adjustment way through the logical relationship between the information of each node and the node. In practical applications, whether the flow chart, the block diagram, the circuit diagram, or the network diagram formed by the connections between the network devices, it is required that the number of cross connections in the connection relationship diagram is as small as possible, and especially, the circuit diagram in the PCB should avoid the existence of cross connections, so that it is required to reduce the number of cross connections in the connection relationship diagram to be adjusted as much as possible, and therefore, the number of cross connections in the connection relationship diagram to be adjusted can be adjusted by means of reverse adjustment and forward adjustment. Specifically, in the multilayer structure in the connection relationship diagram to be adjusted, the nodes may be arranged into corresponding layers according to the distribution of the nodes in the connection relationship diagram to be adjusted, as shown in fig. 2, the connection relationship diagram to be adjusted includes 3 layers, a first layer includes node 11, node 12, node 13, node 14 and node 15, a second layer includes node 21 and node 22, and a third layer includes node 31, node 32, node 33 and node 34. The connection relationship diagram to be adjusted shown in fig. 2 may be adjusted in a reverse direction first, that is, in a reverse manner, from the last layer in the connection relationship diagram to be adjusted, the distribution order of the nodes in the last layer is adjusted sequentially upward, as shown in fig. 3A, based on the distribution order of the current node in the third layer of fig. 2, that is, the distribution order of the node 34, the node 33, the node 31, and the node 32 is not changed, so as to determine the distribution order of the nodes in the second layer, as shown in fig. 3B, and then determine the distribution order of the nodes in the first layer based on the obtained distribution order of the nodes 22 and 21, as shown in fig. 3C, to obtain the distribution order of the nodes 11, 13, 14, 12, and 15.
If there is still cross-connection in the connection relationship graph obtained by the reverse adjustment, the connection relationship graph after adjustment may be adjusted in a forward direction, specifically, in a forward order manner, starting from the first layer in the connection relationship graph after reverse adjustment, the node distribution order is adjusted in a downward order in sequence according to the distribution order of the nodes in the first layer, as shown in fig. 4A, based on the distribution order of the current node in the first layer in fig. 3C, that is, the distribution order of the nodes 11, 13, 14, 12, and 15 is not changed, and thus, the distribution order of the nodes in the second layer is determined, as shown in fig. 4B, the distribution order of the nodes in the second layer is obtained, as shown in fig. 4B, and then the distribution order of the nodes in the third layer is determined based on the distribution order of the nodes 22 and 21, as shown in fig. 34, 33, 31, and 31, The distribution order of the nodes 32 is as shown in fig. 4C.
It should be noted that, the above-mentioned reverse adjustment and forward adjustment are performed under the condition that the hierarchical relationship is fixed (i.e. the nodes included in each layer are not changed, and only the distribution order of the nodes in each layer is changed), in practical application, the hierarchical relationship may not be fixed, i.e. the positions of the layers are not changed, but the nodes included therein are changed, for example, when performing the reverse adjustment, the current distribution order of the nodes may be obtained from the third layer in fig. 2, the nodes in the third layer are set to the first layer according to the current distribution order, as shown in fig. 5A, the distribution order of the nodes in the first layer is sequentially adjusted based on the distribution order of the nodes in the first layer to determine the distribution order of the nodes in the second layer, the distribution order of the nodes 22 and 21 is obtained, as shown in fig. 5B, and then the distribution order of the nodes in the third layer is determined based on the distribution order of the nodes 22 and 21 obtained, the distribution sequence of the nodes 11, 13, 14, 12 and 15 is obtained, as shown in fig. 5C. Because the connection relation graph obtained after the reverse adjustment is placed in an inverted manner, and the distribution sequence of the nodes in the third layer is changed relative to the distribution sequence of the nodes in the first layer in the graph 2, the connection relation graph after the reverse adjustment can be adjusted in a forward direction, namely, the distribution order of the current node can be obtained from the third layer of the connection relation graph after reverse adjustment, setting the nodes in the third layer to the first layer according to the current distribution sequence, sequentially adjusting the node distribution sequence based on the distribution sequence of the nodes in the first layer, to determine the distribution sequence of the nodes of the second layer, to obtain the distribution sequence of the nodes 22 and 21, then, the distribution order of the nodes in the third layer is determined based on the obtained distribution order of the nodes 22 and 21, so as to obtain the distribution order of the nodes 34, 33, 31 and 32, which can be seen in fig. 4A to 4C. Thus, when performing the reverse adjustment and the forward adjustment, it is necessary to perform the reverse adjustment, then perform the forward adjustment, and repeat the operations alternately.
If there is still cross connection in the connection relationship diagram obtained by the reverse adjustment and the forward adjustment, the reverse adjustment and the forward adjustment may be repeatedly performed on the connection relationship diagram after adjustment, and the following processing of step S102 and step S103 may be performed in the process of performing the reverse adjustment and the forward adjustment.
In step S102, the number of cross-connections in the connection relationship diagram adjusted in each forward or reverse direction is acquired.
In the implementation, since the purpose of the forward adjustment and the reverse adjustment is to reduce the number of cross connections in the connection relationship diagram, in order to determine which adjusted connection relationship diagram satisfies the preset condition in time, after each forward or reverse adjustment, the number of cross connections included in the adjusted connection relationship diagram may be obtained, and the obtained number of cross connections may be recorded in the terminal device.
In step S103, the adjusted connection relationship diagram in which the number of cross connections satisfies the preset condition is taken as the target connection relationship diagram.
The preset condition may be determined according to an actual situation, specifically, for example, a preset threshold is set, when the number of cross connections is less than or equal to the preset threshold, a subsequent corresponding operation is performed, or an adjustment number is set, and a minimum value of the number of cross connections is searched from the number of cross connections included in the connection relationship diagram obtained by multiple adjustments, and the like.
In the implementation, it may be set that the terminal device needs to repeatedly execute the alternation process of the reverse adjustment and the forward adjustment in step S101 for a predetermined number of times (for example, 50 times or 100 times, etc.), and after each forward adjustment or the reverse adjustment, obtain and record the number of cross connections included in the adjusted connection relationship diagram, when the number of times of executing the process reaches the predetermined number, obtain the number of recorded cross connections, compare the number of cross connections with each other, find the minimum value of the number of cross connections from the number of cross connections, and may use the adjusted connection relationship diagram corresponding to the minimum value as the target connection relationship diagram. The terminal device may output the target connection relationship diagram, and the target connection relationship diagram may be displayed to the user as an optimal result after the connection relationship processing.
The embodiment of the application provides a connection relation processing method, which connects two adjacent layers of interrelated nodes according to a preset adjustment strategy by a connection relation graph of a plurality of layers of nodes to be adjusted in a reverse adjustment and forward adjustment alternate mode, and adjusts the distribution sequence of each layer of nodes in the connection relation graph to be adjusted, including cross connection, at least once to obtain the number of cross connections in the connection relation graph after each forward or reverse adjustment, and takes the adjusted connection relation graph with the number of cross connections meeting the preset conditions as a target connection relation graph, so that the connection relation graph to be adjusted can be laid out into the target connection relation graph containing cross connections as little as possible by the reverse adjustment and the forward adjustment without manual participation, thereby saving human resources and reducing the consumption of processing time, the processing efficiency of the connection relation is improved.
Example two
As shown in fig. 6, an execution main body of the method may be a server or a terminal device, where the terminal device may be a personal computer, a mobile phone, a tablet computer, or the like, and this embodiment takes the terminal device as an example for description. The method can be used for laying out the nodes in the connection relation graph to enable the nodes in the connection relation graph to be uniformly distributed, and the like, and the method can be embodied in various ways, for example, an application program corresponding to the method can be written based on a Javascript programming language, and the application program can be packaged into a corresponding application tool, and the application tool can assist an application to complete a corresponding function, for example, the application tool is a plug-in, the application is a browser, and the like, or can be used as an independent application. The method may specifically comprise the steps of:
in step S601, starting from the first-layer node, the distribution order of the next-layer node is determined sequentially according to the nodes of the current layer, and the nodes associated with each other in the two adjacent layers of nodes are connected to generate a connection relation graph to be adjusted, which includes multiple layers of nodes.
In implementation, since the connection relationship diagram to be adjusted is a hierarchical structure, if the relevant information of the node of one of the layers is known, the distribution order of the other nodes may be determined accordingly, and considering that the connection relationship between the node of the first layer and the node of the last layer is relatively small, the relevant information of the node of the first layer may be obtained, or considering that the number of the node of the last layer is likely to be small under normal conditions, the relevant information of the node of the first layer may be used as the known information, so as to determine the connection relationship diagram to be adjusted. The acquisition of the related information of the first-layer node may be input by a user, or may be selected by the terminal device from a preset information base, and the like. After the related information of the first layer of nodes is obtained, the distribution sequence of the second layer of nodes can be determined according to the related information of the first layer of nodes, then the distribution sequence of the third layer of nodes is determined according to the related information of the second layer of nodes, and so on, the distribution sequence of the last layer of nodes can be finally obtained, if the obtained connection relation graph comprises cross connection, the obtained connection relation graph can be used as a connection relation graph to be adjusted, wherein in the connection relation graph to be adjusted, the nodes which are related to each other in the two adjacent layers of nodes are connected.
The processing manner of the step S601 may be various, and the following alternative processing manner may not specifically include the following step one and step two:
step one, according to the information of the nodes and the logic relation information among the nodes, a plurality of layers are divided for the nodes, and a root node in the nodes is used as a first layer node.
The information of the nodes may include names, codes, and the like of the nodes, and the logical relationship information between the nodes may include information of connection relationships between the nodes, for example, the node 11 is connected with the node 21, the node 21 is connected with the node 33, and the like. The root node may be a node where only an output interface exists and no input interface exists.
In implementation, the terminal device may be provided with an application program for performing connection relation processing, the application program may be provided with an information input key, when a user needs to obtain a certain connection relation diagram, the user may click the information input key, the terminal device pops up an information input box, and the user may input information of each node and logical relation information between nodes in the information input box. After the input is finished, the user can click the determination key, and the terminal equipment can acquire the information of the nodes input by the user and the logic relationship information among the nodes.
The terminal device may analyze the information of the nodes and the logical relationship information between the nodes, and determine the number of layers included in the finally generated connection relationship graph. Based on the obtained number of layers, a drawing area (which may be referred to as a canvas) where the connection relation diagram to be adjusted is located may be divided into a plurality of parts, for example, if the obtained number of layers is 5, the drawing area may be divided into 5 parts on average, or 3 parts as shown in fig. 2, etc. After the drawing area is divided into a plurality of parts, the nodes may not be divided into corresponding layers, so as to perform preliminary layout of the nodes, specifically, a node having only an output interface and no input interface, that is, a root node, may be searched from the logical relationship information between the nodes, and if the root node is found, the root node is taken as a first layer node, as shown in fig. 7A, the root node is nodes 11 to 16. If no root node is found, any node can be taken as a first-layer node. In the embodiment of the present application, the root node is found as an example for explanation.
And step two, expanding the nodes along the connecting line from the root node to leaf nodes in the nodes according to the logic relationship information among the nodes so as to generate a connection relationship graph to be adjusted, wherein the connection relationship graph comprises a plurality of layers of nodes.
The leaf node may be a node without a child node, that is, a node having only an input interface but no input interface.
In implementation, considering that nodes in the same layer may include a plurality of nodes, in order to make the nodes in the same layer not include nodes that overlap with each other, positions between the nodes in the same layer may be adjusted, and based on this, the root nodes may be uniformly distributed to the first layer in order according to their logical size relationship, as shown in fig. 7. The logical relationship information including the root node can be searched from the logical relationship information among the nodes, and based on the logical relationship information including the root node and the root node, the logical relationship information and the root node can respectively start from the root node and extend downwards along the connecting line to obtain the distribution sequence of the second layer node and the second layer node, wherein the distribution sequence and the position of the second layer node can be determined in the following way: when a certain node in the second layer of nodes is connected to only one root node, the node in the second layer has the same lateral coordinates as the root node, such as node 11 and node 21 in fig. 7A; when a certain node in the second layer node is connected to two or more root nodes, the horizontal coordinate of the node in the second layer may be an average value of the horizontal coordinates of the two or more root nodes, such as node 12, node 14, node 15, and node 23, and node 13, node 16, and node 22 in fig. 7A, at this time, in order to avoid the situation that the nodes in the same layer overlap with each other, the position of the node in the second layer may be adjusted, that is, the nodes are uniformly distributed in the order of the horizontal coordinates from small to large, as shown in fig. 7B. Then, based on the distribution sequence of the second layer of nodes, the nodes may be sequentially expanded downward along the connection line to obtain the distribution sequence of the third layer of nodes and the third layer of nodes, and the position adjustment is performed, and so on until the leaf node, as shown in fig. 7C, the connection relationship diagram obtained in the above manner may be the connection relationship diagram to be adjusted.
In step S602, based on the connection relationship diagram of the multilayer node to be adjusted, according to a preset adjustment policy, and based on the connection relationship diagram of the multilayer node to be adjusted, the distribution order of the nodes in the previous layer is sequentially adjusted in a reverse manner from the last layer in the connection relationship diagram of the multilayer node to be adjusted, and the mutually associated nodes in the two adjacent layers of nodes are sequentially connected, so as to obtain a connection relationship diagram after reverse adjustment.
Wherein, presetting the adjustment strategy includes: and performing forward adjustment or reverse adjustment for a preset number of times, or stopping performing the forward adjustment or reverse adjustment when the number of the cross connections in the current adjusted connection relation graph is larger than the number of the cross connections in the previous adjusted connection relation graph. The preset times can be determined according to actual conditions, specifically 50 times or 100 times.
In step S603, starting from the first layer in the connection relationship diagram after the reverse adjustment, the distribution order of the nodes in the previous layer is sequentially adjusted in a positive order manner, and the nodes associated with each other in the two adjacent layers of nodes are sequentially connected to obtain the connection relationship diagram after the forward adjustment.
The processing procedure of step S602 and step S603 may refer to relevant contents in the first embodiment, or may be executed based on the processing manners shown in fig. 3A to 3C and fig. 4A to 4C or fig. 5A to 5C and fig. 4A to 4C, and will not be described again here.
It should be noted that the reverse adjustment and the forward adjustment are not limited to be completed in the above manner, and an alternative processing manner is also provided below, which may specifically include the following steps one to three:
step one, determining a layer containing cross connection from a connection relation graph of a plurality of layers of nodes to be adjusted.
In implementation, after the processing of step S601, a connection relation diagram to be adjusted may be obtained, and it may be detected whether an intersection exists between any two adjacent layers of nodes in the connection relation diagram to be adjusted, if an intersection exists, it indicates that the connection relation diagram to be adjusted includes a cross connection, and if an intersection does not exist, it indicates that the connection relation diagram to be adjusted does not include a cross connection. If the connection relation graph to be adjusted includes the cross connection, the layer corresponding to the cross connection can be determined according to the connecting line where the cross point is located. For example, as shown in fig. 7C, the intersection is located between the first layer node and the second layer node, and it can be determined that the cross connection is generated between the first layer and the second layer through the connection line where the two intersections are located, so that it can be determined that the layers including the cross connection in the connection relation diagram to be adjusted are the first layer and the second layer.
And step two, starting from the lowest layer in the obtained layers containing the cross connection, sequentially adjusting the distribution sequence of the nodes in the previous layer in a reverse order mode, and sequentially connecting the mutually associated nodes in the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment.
In implementation, based on the example of step one above, as shown in fig. 7C, since there is no cross-connection between the third layer and the fourth layer, and between the second layer and the third layer, the third layer and the fourth layer can be omitted, and only the first layer and the second layer are considered, as shown in fig. 7B. The connection relationship diagram shown in fig. 7B may be reversely adjusted, specifically, the distribution order of the nodes in the previous layer is sequentially adjusted in a reverse order from the lowest layer (or the last layer) in the connection relationship diagram shown in fig. 7B, and the nodes associated with each other in the two adjacent layers of nodes are sequentially connected to obtain the connection relationship diagram after the reverse adjustment, which may specifically refer to the relevant contents in the first embodiment, or be executed based on fig. 3A to 3C or based on the processing manners shown in fig. 5A to 5C, and details are not repeated herein.
And step three, starting from the first layer containing cross connection in the connection relation graph after the reverse adjustment, sequentially adjusting the distribution sequence of the nodes of the next layer according to a positive sequence mode, and sequentially connecting the mutually associated nodes in the two adjacent layers of nodes to obtain the connection relation graph after the forward adjustment.
In implementation, for the case based on the processing method shown in fig. 3A to 3C, if the connection relationship diagram after reverse adjustment does not include cross-connection, the adjustment process is completed this time, and the adjusted distribution order of the nodes in the first layer and the second layer is spliced with the third layer and the fourth layer in the connection relationship diagram shown in fig. 7C, so as to obtain a complete connection relationship diagram. If the connection relationship diagram after the reverse adjustment further includes cross-connections, the method may continue to obtain layers including cross-connections as described above, and then sequentially adjust the distribution order of the nodes in the next layer in a forward order manner from the first layer including cross-connections, and sequentially connect the nodes associated with each other in the two adjacent layers of nodes to obtain the connection relationship diagram after the forward adjustment, which may specifically refer to the relevant contents in the first embodiment, or be performed based on the processing manners shown in fig. 4A to 4C, which is not described herein again.
For the case of the processing method shown in fig. 5A to 5C, after the reverse adjustment is completed, the forward adjustment is further required, and based on the first layer and the second layer after the reverse adjustment, the distribution order of the nodes in the next layer may be sequentially adjusted in a forward order manner from the first layer, and the nodes associated with each other in the two adjacent layers of nodes are sequentially connected to obtain the connection relationship diagram after the forward adjustment.
The above-described adjustment process may be performed a preset number of times by the processing alternately performed in the above-described step S602 and step S603, and after each adjustment, the processing of the below-described step S604 may be performed.
In step S604, the number of cross-connections in the connection relationship diagram adjusted in the forward direction or the reverse direction at a time is acquired.
The processing procedure of step S604 may refer to the relevant content of step S102 in the first embodiment, and is not described herein again.
In step S605, the connection relationship diagram with the smallest number of cross connections in the adjusted connection relationship diagram is set as the target connection relationship diagram.
In implementation, after the terminal device obtains the target connection relationship diagram, the target connection relationship diagram may be output as a final adjustment result, at this time, the user may input content into a corresponding node based on a frame of the target connection relationship diagram to finally obtain the connection relationship diagram required by the user, or each node in the target connection relationship diagram already includes corresponding content, at this time, the user may view the target connection relationship diagram, and may appropriately adjust or modify the target connection relationship diagram according to actual needs.
The embodiment of the application provides a connection relation processing method, which connects two adjacent layers of interrelated nodes according to a preset adjustment strategy by a connection relation graph of a plurality of layers of nodes to be adjusted in a reverse adjustment and forward adjustment alternate mode, and adjusts the distribution sequence of each layer of nodes in the connection relation graph to be adjusted, including cross connection, at least once to obtain the number of cross connections in the connection relation graph after each forward or reverse adjustment, and takes the adjusted connection relation graph with the number of cross connections meeting the preset conditions as a target connection relation graph, so that the connection relation graph to be adjusted can be laid out into the target connection relation graph containing cross connections as little as possible by the reverse adjustment and the forward adjustment without manual participation, thereby saving human resources and reducing the consumption of processing time, the processing efficiency of the connection relation is improved.
EXAMPLE III
Based on the same idea, the connection relation processing method provided in the embodiment of the present application further provides a connection relation processing apparatus, as shown in fig. 8.
The connection relation processing apparatus includes: an adjustment module 801, a number acquisition module 802, and a target map determination module 802, wherein:
an adjusting module 801, configured to perform at least one adjustment on a distribution sequence of each layer of nodes in a connection relationship diagram to be adjusted in an alternate manner of reverse adjustment and forward adjustment according to a preset adjustment policy based on the connection relationship diagram of the multiple layers of nodes to be adjusted; the nodes which are related to each other in two adjacent layers in the connection relation graph to be adjusted are connected, and the connection relation graph to be adjusted comprises cross connection; wherein the reverse adjustment comprises: adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode according to the distribution sequence of the nodes of the current layer; wherein the forward adjustment comprises: adjusting the distribution sequence of the nodes of the next layer in a positive sequence mode according to the distribution sequence of the nodes of the current layer;
a number obtaining module 802, configured to obtain the number of cross connections in the connection relationship graph after each forward or reverse adjustment;
and a target graph determining module 803, configured to use the adjusted connection relationship graph in which the number of cross connections meets the preset condition as a target connection relationship graph.
In an embodiment of the present application, the apparatus further includes:
and the relation graph generating module is used for determining the distribution sequence of the next layer of nodes in sequence from the first layer of nodes according to the nodes of the current layer and connecting the nodes which are related to each other in the two adjacent layers of nodes to generate the connection relation graph containing the plurality of layers of nodes and to be adjusted.
In this embodiment of the application, the adjusting module 801 is configured to, based on the connection relationship diagram of the multilayer node to be adjusted, sequentially adjust the distribution sequence of the node in the previous layer in a reverse order manner from the last layer in the connection relationship diagram of the multilayer node to be adjusted, and sequentially connect the nodes associated with each other in the two adjacent layers of nodes to obtain a connection relationship diagram after reverse adjustment;
the adjusting module 801 is further configured to, starting from the first layer in the connection relationship diagram after the reverse adjustment, sequentially adjust the distribution sequence of the nodes in the next layer in a positive sequence manner, and sequentially connect the nodes associated with each other in the two adjacent layers of nodes to obtain the connection relationship diagram after the forward adjustment.
In this embodiment of the present application, the adjusting module 801 is configured to determine a layer including cross connections from a connection relation graph of a plurality of layers of nodes to be adjusted; sequentially adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode from the lowest layer of the obtained layers containing the cross connection, and sequentially connecting the mutually associated nodes of the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the adjusting module 801 is further configured to sequentially adjust the distribution sequence of the nodes in the next layer in a positive sequence manner from the first layer including the cross connection in the connection relationship diagram after the backward adjustment, and sequentially connect the nodes associated with each other in the two adjacent layers of nodes to obtain the connection relationship diagram after the forward adjustment.
In an embodiment of the present application, the relationship diagram generating module includes:
the hierarchical unit is used for dividing a plurality of layers for the nodes according to the information of the nodes and the logic relation information among the nodes, and taking a root node in the nodes as the first layer node;
and the relation graph generating unit is used for expanding from the root node to a leaf node in the nodes along a connecting line according to the logic relation information among the nodes so as to generate the connection relation graph to be adjusted, wherein the connection relation graph comprises a plurality of layers of nodes.
In an embodiment of the present application, the apparatus further includes:
and the position adjusting module is used for adjusting the positions among the nodes in the same layer so as to ensure that the nodes in the same layer do not contain the nodes which are mutually overlapped.
In this embodiment of the application, the target graph determining module 803 is configured to use the connection relationship graph with the minimum number of cross connections in the adjusted connection relationship graph as the target connection relationship graph.
In an embodiment of the present application, the preset adjustment policy includes: and performing forward adjustment or reverse adjustment for a preset number of times, or stopping performing the forward adjustment or reverse adjustment when the number of the cross connections in the current adjusted connection relation graph is larger than the number of the cross connections in the previous adjusted connection relation graph.
The embodiment of the application provides a connection relation processing device, which connects two adjacent layers of interrelated nodes in a reverse adjustment and forward adjustment alternate mode according to a preset adjustment strategy through a connection relation graph of a plurality of layers of nodes to be adjusted, and adjusts the distribution sequence of each layer of nodes in the connection relation graph to be adjusted, including cross connection, at least once to obtain the number of cross connections in the connection relation graph after each forward or reverse adjustment, and uses the adjusted connection relation graph with the number of cross connections meeting preset conditions as a target connection relation graph, so that the connection relation graph to be adjusted can be laid out into the target connection relation graph containing cross connection as little as possible through the reverse adjustment and the forward adjustment without manual participation, thereby saving human resources and reducing the consumption of processing time, the processing efficiency of the connection relation is improved.
Example four
Based on the same idea, the connection relation processing apparatus provided in the embodiment of the present application further provides a connection relation processing device, as shown in fig. 9.
The connection relation processing device may be a server or a terminal device provided in the above embodiments.
The connection relation processing device may have a large difference due to different configurations or performances, and may include one or more processors 901 and a memory 902, where the memory 902 may store one or more stored applications or data. Memory 902 may be, among other things, transient storage or persistent storage. The application program stored in memory 902 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in a connection-relationship processing device. Still further, the processor 901 may be configured to communicate with the memory 902 to execute a series of computer-executable instructions in the memory 902 on a connected processing device. The connection relationship processing apparatus may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input-output interfaces 905, one or more keyboards 906.
In particular, in this embodiment, the connection relation processing apparatus includes a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the connection relation processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
based on the connection relation graph of the multi-layer nodes to be adjusted, adjusting the distribution sequence of each layer of nodes in the connection relation graph to be adjusted at least once in an alternate mode of reverse adjustment and forward adjustment according to a preset adjustment strategy; the nodes which are related to each other in two adjacent layers in the connection relation graph to be adjusted are connected, and the connection relation graph to be adjusted comprises cross connection; wherein the reverse adjustment comprises: adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode according to the distribution sequence of the nodes of the current layer; wherein the forward adjustment comprises: adjusting the distribution sequence of the nodes of the next layer in a positive sequence mode according to the distribution sequence of the nodes of the current layer;
acquiring the number of cross connections in the connection relation graph after each forward or reverse adjustment;
and taking the adjusted connection relation graph with the number of the cross connections meeting the preset condition as a target connection relation graph.
Optionally, the executable instructions, when executed, may further cause the processor to:
and determining the distribution sequence of the next layer of nodes from the first layer of nodes according to the nodes of the current layer in sequence, and connecting the nodes which are correlated with each other in the two adjacent layers of nodes to generate the connection relation graph to be adjusted, wherein the connection relation graph comprises a plurality of layers of nodes.
Optionally, the executable instructions, when executed, may further cause the processor to:
based on the connection relation graph of the multilayer nodes to be adjusted, starting from the last layer in the connection relation graph of the multilayer nodes to be adjusted, sequentially adjusting the distribution sequence of the nodes in the previous layer in a reverse order mode, and sequentially connecting the nodes which are correlated with each other in the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the method for forward adjustment of the distribution sequence of each layer of nodes in the connection relation graph to be adjusted comprises the following steps:
and starting from the first layer in the connection relation graph after the reverse adjustment, sequentially adjusting the distribution sequence of the nodes in the next layer in a positive sequence mode, and sequentially connecting the mutually associated nodes in the two adjacent layers of nodes to obtain the connection relation graph after the forward adjustment.
Optionally, the executable instructions, when executed, may further cause the processor to:
determining a layer containing cross connection from a connection relation graph of a plurality of layers of nodes to be adjusted;
sequentially adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode from the lowest layer of the obtained layers containing the cross connection, and sequentially connecting the mutually associated nodes of the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the method for forward adjustment of the distribution sequence of each layer of nodes in the connection relation graph to be adjusted comprises the following steps:
and starting from the first layer containing cross connection in the connection relation graph after the reverse adjustment, sequentially adjusting the distribution sequence of the nodes of the next layer in a positive sequence mode, and sequentially connecting the mutually associated nodes in the two adjacent layers of nodes to obtain the connection relation graph after the forward adjustment.
Optionally, the executable instructions, when executed, may further cause the processor to:
dividing a plurality of layers for the nodes according to the information of the nodes and the logic relation information among the nodes, and taking a root node in the nodes as the first layer node;
and according to the logic relationship information among the nodes, expanding from the root node to leaf nodes in the nodes along a connecting line so as to generate the connection relationship graph to be adjusted, wherein the connection relationship graph comprises a plurality of layers of nodes.
Optionally, the executable instructions, when executed, may further cause the processor to:
and adjusting the positions of the nodes in the same layer so that the nodes in the same layer do not contain the nodes which are overlapped with each other.
Optionally, the executable instructions, when executed, may further cause the processor to:
and taking the connection relation graph with the minimum number of cross connections in the adjusted connection relation graph as the target connection relation graph.
Optionally, the preset adjustment policy includes: and performing forward adjustment or reverse adjustment for a preset number of times, or stopping performing the forward adjustment or reverse adjustment when the number of the cross connections in the current adjusted connection relation graph is larger than the number of the cross connections in the previous adjusted connection relation graph.
The embodiment of the application provides a connection relation processing device, which connects two adjacent layers of interrelated nodes in a reverse adjustment and forward adjustment alternate mode according to a preset adjustment strategy through a connection relation graph of a plurality of layers of nodes to be adjusted, and adjusts the distribution sequence of each layer of nodes in the connection relation graph to be adjusted, including cross connection, at least once to obtain the number of cross connections in the connection relation graph after each forward or reverse adjustment, and uses the adjusted connection relation graph with the number of cross connections meeting preset conditions as a target connection relation graph, so that the connection relation graph to be adjusted can be laid out into the target connection relation graph containing cross connection as little as possible through the reverse adjustment and the forward adjustment without manual participation, thereby saving human resources and reducing the consumption of processing time, the processing efficiency of the connection relation is improved.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), Lava, Lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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 like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
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, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (16)

1. A method of connection relation processing, the method comprising:
based on the connection relation graph of the multi-layer nodes to be adjusted, adjusting the distribution sequence of each layer of nodes in the connection relation graph to be adjusted at least once in an alternate mode of reverse adjustment and forward adjustment according to a preset adjustment strategy; the nodes which are related to each other in two adjacent layers in the connection relation graph to be adjusted are connected, and the connection relation graph to be adjusted comprises cross connection; wherein the reverse adjustment comprises: sequentially adjusting the distribution sequence of the nodes of the previous layer from the bottommost layer to the first layer according to the distribution sequence of the nodes of the current layer in a reverse order mode; wherein the forward adjustment comprises: in a positive sequence mode, starting from the first layer, sequentially adjusting the distribution sequence of the nodes of the next layer according to the distribution sequence of the nodes of the current layer until the distribution sequence is adjusted to the bottommost layer; wherein the preset adjustment strategy comprises: carrying out forward adjustment or reverse adjustment for preset times;
acquiring the number of cross connections in the connection relation graph after each forward or reverse adjustment;
and taking the adjusted connection relation graph with the number of the cross connections meeting the preset condition as a target connection relation graph.
2. The method according to claim 1, before the adjusting the distribution order of the nodes in the connection relationship graph at least once in an alternating manner of a reverse adjustment and a forward adjustment based on the connection relationship graph of the nodes in multiple layers to be adjusted, further comprising:
and determining the distribution sequence of the next layer of nodes from the first layer of nodes according to the nodes of the current layer in sequence, and connecting the nodes which are correlated with each other in the two adjacent layers of nodes to generate the connection relation graph to be adjusted, wherein the connection relation graph comprises a plurality of layers of nodes.
3. The method according to claim 1, wherein the adjusting the distribution order of the nodes in each layer in the connection relation graph to be adjusted comprises:
based on the connection relation graph of the multilayer nodes to be adjusted, starting from the last layer in the connection relation graph of the multilayer nodes to be adjusted, sequentially adjusting the distribution sequence of the nodes in the previous layer in a reverse order mode, and sequentially connecting the nodes which are correlated with each other in the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the method for forward adjustment of the distribution sequence of each layer of nodes in the connection relation graph to be adjusted comprises the following steps:
and starting from the first layer in the connection relation graph after the reverse adjustment, sequentially adjusting the distribution sequence of the nodes in the next layer in a positive sequence mode, and sequentially connecting the mutually associated nodes in the two adjacent layers of nodes to obtain the connection relation graph after the forward adjustment.
4. The method according to claim 1, wherein the adjusting the distribution order of the nodes in each layer in the connection relation graph to be adjusted comprises:
determining a layer containing cross connection from a connection relation graph of a plurality of layers of nodes to be adjusted;
sequentially adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode from the lowest layer of the obtained layers containing the cross connection, and sequentially connecting the mutually associated nodes of the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the method for forward adjustment of the distribution sequence of each layer of nodes in the connection relation graph to be adjusted comprises the following steps:
and starting from the first layer containing cross connection in the connection relation graph after the reverse adjustment, sequentially adjusting the distribution sequence of the nodes of the next layer in a positive sequence mode, and sequentially connecting the mutually associated nodes in the two adjacent layers of nodes to obtain the connection relation graph after the forward adjustment.
5. The method according to claim 2, wherein the determining, from a node of a first layer, a distribution order of nodes of a next layer according to a node of a current layer in sequence, and connecting mutually associated nodes in two adjacent layers of nodes to generate the connection relationship graph to be adjusted, which includes a plurality of layers of nodes, includes:
dividing a plurality of layers for the nodes according to the information of the nodes and the logic relation information among the nodes, and taking a root node in the nodes as the first layer node;
and according to the logic relationship information among the nodes, expanding from the root node to leaf nodes in the nodes along a connecting line so as to generate the connection relationship graph to be adjusted, wherein the connection relationship graph comprises a plurality of layers of nodes.
6. The method of claim 5, wherein the method further comprises, according to the logical relationship information between the nodes, extending from the root node along a connecting line until after a leaf node of the nodes:
and adjusting the positions of the nodes in the same layer so that the nodes in the same layer do not contain the nodes which are overlapped with each other.
7. The method according to any one of claims 1 to 6, wherein the step of taking the adjusted connection relation graph with the number of cross connections satisfying the preset condition as the target connection relation graph comprises the following steps:
and taking the connection relation graph with the minimum number of cross connections in the adjusted connection relation graph as the target connection relation graph.
8. The method of claim 1, the preset adjustment strategy comprising: and stopping the forward adjustment or the reverse adjustment when the number of the cross connections in the current adjusted connection relation graph is larger than that in the previous adjusted connection relation graph.
9. A connection relation processing apparatus, the apparatus comprising:
the adjusting module is used for adjusting the distribution sequence of each layer of nodes in the connection relation graph to be adjusted at least once according to a preset adjusting strategy in a reverse adjusting and forward adjusting alternate mode on the basis of the connection relation graph of the plurality of layers of nodes to be adjusted; the nodes which are related to each other in two adjacent layers in the connection relation graph to be adjusted are connected, and the connection relation graph to be adjusted comprises cross connection; wherein the reverse adjustment comprises: sequentially adjusting the distribution sequence of the nodes of the previous layer from the bottommost layer to the first layer according to the distribution sequence of the nodes of the current layer in a reverse order mode; wherein the forward adjustment comprises: in a positive sequence mode, starting from the first layer, sequentially adjusting the distribution sequence of the nodes of the next layer according to the distribution sequence of the nodes of the current layer until the distribution sequence is adjusted to the bottommost layer; wherein the preset adjustment strategy comprises: carrying out forward adjustment or reverse adjustment for preset times;
the number acquisition module is used for acquiring the number of the cross connections in the connection relation graph after each forward or reverse adjustment;
and the target graph determining module is used for taking the adjusted connection relation graph of which the number of the cross connections meets the preset condition as the target connection relation graph.
10. The apparatus of claim 9, the apparatus further comprising:
and the relation graph generating module is used for determining the distribution sequence of the next layer of nodes in sequence from the first layer of nodes according to the nodes of the current layer and connecting the nodes which are related to each other in the two adjacent layers of nodes to generate the connection relation graph containing the plurality of layers of nodes and to be adjusted.
11. The apparatus according to claim 9, wherein the adjusting module is configured to, based on the connection relationship diagram of the multilayer nodes to be adjusted, sequentially adjust, starting from a last layer in the connection relationship diagram of the multilayer nodes to be adjusted, a distribution order of nodes in a previous layer in a reverse order manner, and sequentially connect mutually associated nodes in two adjacent layers of nodes to obtain a connection relationship diagram after reverse adjustment;
the adjusting module is further configured to sequentially adjust the distribution sequence of the nodes in the next layer in a positive sequence manner from the first layer in the connection relationship diagram after the reverse adjustment, and sequentially connect the nodes associated with each other in the two adjacent layers of nodes to obtain the connection relationship diagram after the forward adjustment.
12. The apparatus of claim 9, the adjusting module is configured to determine a layer containing cross-connections from a connection relation graph of a plurality of layers of nodes to be adjusted; sequentially adjusting the distribution sequence of the nodes of the previous layer in a reverse order mode from the lowest layer of the obtained layers containing the cross connection, and sequentially connecting the mutually associated nodes of the two adjacent layers of nodes to obtain a connection relation graph after reverse adjustment;
the adjusting module is further configured to sequentially adjust a distribution sequence of nodes in a next layer according to a positive sequence manner from a first layer including cross connections in the connection relationship graph after the backward adjustment, and sequentially connect mutually associated nodes in two adjacent layers of nodes to obtain the connection relationship graph after the forward adjustment.
13. The apparatus of claim 10, the relationship graph generation module, comprising:
the hierarchical unit is used for dividing a plurality of layers for the nodes according to the information of the nodes and the logic relation information among the nodes, and taking a root node in the nodes as the first layer node;
and the relation graph generating unit is used for expanding from the root node to a leaf node in the nodes along a connecting line according to the logic relation information among the nodes so as to generate the connection relation graph to be adjusted, wherein the connection relation graph comprises a plurality of layers of nodes.
14. The apparatus of claim 13, the apparatus further comprising:
and the position adjusting module is used for adjusting the positions among the nodes in the same layer so as to ensure that the nodes in the same layer do not contain the nodes which are mutually overlapped.
15. The apparatus according to any of claims 9-14, wherein the target graph determining module is configured to use the connection relation graph with the smallest number of cross connections in the adjusted connection relation graph as the target connection relation graph.
16. The apparatus of claim 9, the preset adjustment strategy comprising: and stopping the forward adjustment or the reverse adjustment when the number of the cross connections in the current adjusted connection relation graph is larger than that in the previous adjusted connection relation graph.
CN201710401219.6A 2017-05-31 2017-05-31 Connection relation processing method and device Active CN107369192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710401219.6A CN107369192B (en) 2017-05-31 2017-05-31 Connection relation processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710401219.6A CN107369192B (en) 2017-05-31 2017-05-31 Connection relation processing method and device

Publications (2)

Publication Number Publication Date
CN107369192A CN107369192A (en) 2017-11-21
CN107369192B true CN107369192B (en) 2021-02-05

Family

ID=60305447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710401219.6A Active CN107369192B (en) 2017-05-31 2017-05-31 Connection relation processing method and device

Country Status (1)

Country Link
CN (1) CN107369192B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981311B (en) * 2017-12-27 2022-04-12 阿里巴巴集团控股有限公司 Method and device for realizing graph layout
CN111359210B (en) * 2020-03-05 2023-03-24 深圳市腾讯计算机系统有限公司 Data processing method and device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6175957B1 (en) * 1997-12-09 2001-01-16 International Business Machines Corporation Method of, system for, and computer program product for providing efficient utilization of memory hierarchy through code restructuring
CN101876900B (en) * 2009-11-24 2014-01-08 恒生电子股份有限公司 Method for automatically adjusting and distributing flow chart and device thereof
CN102222124B (en) * 2011-03-22 2012-11-21 北京航空航天大学 Platform and method for automatically generating design schematic diagram of automatic test system
CN103399979B (en) * 2013-07-04 2016-02-10 电子科技大学 A kind of board-level circuit testability model automatic forming method
CN103473265B (en) * 2013-07-25 2018-01-23 深圳市华傲数据技术有限公司 The analysis method and device of a kind of layout of flow chart
CN103473388B (en) * 2013-07-25 2018-01-23 深圳市华傲数据技术有限公司 The method and device of implementation process figure autoplacement

Also Published As

Publication number Publication date
CN107369192A (en) 2017-11-21

Similar Documents

Publication Publication Date Title
KR102125177B1 (en) Blockchain-based data processing method and device
KR20190094191A (en) Blockchain based data processing method and apparatus
CN107562777B (en) Data processing method and apparatus thereof
CN105335389B (en) A kind of business method for visualizing and system
CN107622080B (en) Data processing method and equipment
CN111026494B (en) Business process processing method, device and equipment
CN108614693A (en) It is a kind of for the processing method of page assembly, device and equipment
CN107369192B (en) Connection relation processing method and device
CN109271587A (en) A kind of page generation method and device
CN114970439A (en) Automatic wiring method, device, computer equipment and storage medium
CN111158650B (en) Report template and report generation method and device
CN110069523A (en) A kind of data query method, apparatus and inquiry system
CN105159669A (en) Method and system for orderly processing multiple Ajax data sources
CN109614609B (en) Model building method and device
WO2014196889A1 (en) Method of generating a target layout on the basis of a source layout
CN116245051A (en) Simulation software rendering method and device, storage medium and electronic equipment
CN113419722B (en) Ladder diagram editing method and device, electronic equipment and storage medium
CN104750691A (en) User-defined webpage generation method and user-defined webpage generation device
CN111179175B (en) Image processing method and device based on convolutional neural network and storage medium
CN105938431A (en) Web page developing method and device
CN114520770B (en) Topology diagram generation method, device, equipment and medium of network equipment
CN105354295A (en) Dynamic display apparatus and method for three-dimensional dynamic plotted-point label
CN111880922A (en) Processing method, device and equipment for concurrent tasks
CN110502589A (en) A kind of node genetic connection determines method, apparatus and electronic equipment
CN107783761B (en) Interface construction method, device and equipment

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant