Method and system for processing a concatenation of segments, and electronic device

CN122733262APending Publication Date: 2026-09-11SHANGHAI TOSUN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610873738.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2026-01-27
Filing Date
2026-06-16
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

这导致公共重合段被多次绘制,增加了渲染计算量,影响绘制性能;同时在视觉上产生多条线重叠显示的现象,降低了模型设计框图的可读性和清晰度

Benefits of technology

[0013] The beneficial effects of this invention are that, when a module or its connecting line is dragged to the target position, the overlapping segment processing method of this invention first detects whether there are overlapping segments in the set of connecting lines related to the current dragging behavior. Once an overlapping segment is detected, redundant path merging is performed. After the redundant path merging is performed, the next overlapping segment is detected. By adopting an iterative "detection-processing-re-detection" approach, redundant overlapping segments related to the current dragging behavior can be reduced. Through redundant path merging, the overlapping segments are optimized, reducing the overhead of repeated rendering and repeated storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122733262A_ABST
    Figure CN122733262A_ABST
Patent Text Reader

Abstract

The present application relates to model design technology, in particular to a kind of wire coincident segment processing method and system, electronic equipment, wherein the wire coincident segment processing method includes: when module itself or module connection is dragged to target position, whether there is coincident segment in the wire set related to current drag action by model design unit according to signal flow direction, it is detected section by section;After detecting a coincident segment, the coincident segment is processed by model design unit Redundant path merging, then continue to detect and process the next coincident segment, until all the coincident segments in the wire set related to current drag action are processed.
Need to check novelty before this filing date? Find Prior Art

Description

Cross-reference to related applications

[0001] This application is based on and claims priority to Chinese Patent Application No. 2026101073394, filed on January 27, 2026. The entire contents of the aforementioned application are incorporated herein by reference. Technical Field

[0002] This invention relates to model design technology, and more particularly to a method and system for processing overlapping segments of lines, and an electronic device. Background Technology

[0003] During the model design process, when users align and arrange multiple functional modules by dragging, the connecting lines between these modules tend to share the same path segments in order to make the layout neat and aesthetically pleasing. This results in overlapping segments that originate from the same source point or converge to the same point. In addition, users often adjust certain connecting lines to achieve a neat and aesthetically pleasing design layout. During the adjustment process, common overlapping segments often appear, which are redundant in terms of visual appearance and data structure.

[0004] Existing technical solutions typically involve repeatedly drawing overlapping line segments at the drawing layer or performing pixel-level deduplication during the rendering stage, without addressing overlapping line segments between branches at the topology level. This results in common overlapping segments being drawn multiple times, increasing rendering computation and impacting drawing performance; it also visually creates the phenomenon of multiple lines overlapping, reducing the readability and clarity of the model design diagram.

[0005] Therefore, there is an urgent need for a solution that can eliminate overlapping line segments and optimize the connection structure from the topological root.

[0006] It should be noted that the information disclosed in this background section is only for understanding the background technology of this application concept and is not considered to constitute prior art information. Summary of the Invention

[0007] The purpose of this invention is to provide a method, system, and electronic device for processing overlapping segments of wires.

[0008] To solve the above-mentioned technical problems, the present invention provides a method for processing overlapping segments of lines, including: When the module itself or the module connection is dragged to the target position, the model design unit checks segment by segment whether there are overlapping segments in the set of connections related to the current dragging behavior according to the signal flow direction. After each overlapping line segment is detected, the model design unit performs redundant path merging on the overlapping line segment, and then continues to detect and process the next overlapping line segment until all overlapping line segments in the connection set related to the current dragging behavior have been processed.

[0009] In another aspect, the present invention also provides a system for processing overlapping segments of interconnections, comprising: A computer device configured to run a model design unit deployed in a model design system, the model design unit being configured to include: The detection module is configured to detect, segment by segment, whether there are overlapping segments in the set of connections related to the current dragging behavior, according to the signal flow direction when the module itself or the module connection is dragged to the target position. The optimization module is configured to perform redundant path merging on each overlapping line segment detected, and then continue to detect and process the next overlapping line segment until all overlapping line segments in the connection set related to the current dragging behavior have been processed.

[0010] Thirdly, the present invention also provides a non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the connection overlap segment processing method as described above.

[0011] Fourthly, the present invention also provides an electronic device, comprising: Non-transitory computer-readable storage medium; processor; The non-transitory computer-readable storage medium stores instructions that, when executed by a processor, cause the processor to perform the connection overlap segment processing method as described above.

[0012] Fifthly, the present invention also provides a computer program product, including instructions that, when executed by a processor, cause the processor to perform the interconnection overlap segment processing method as described above.

[0013] The beneficial effects of this invention are that, when a module or its connecting line is dragged to the target position, the overlapping segment processing method of this invention first detects whether there are overlapping segments in the set of connecting lines related to the current dragging behavior. Once an overlapping segment is detected, redundant path merging is performed. After the redundant path merging is performed, the next overlapping segment is detected. By adopting an iterative "detection-processing-re-detection" approach, redundant overlapping segments related to the current dragging behavior can be reduced. Through redundant path merging, the overlapping segments are optimized, reducing the overhead of repeated rendering and repeated storage.

[0014] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.

[0015] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 The diagram illustrates the steps of a method for processing overlapping segments of lines according to some embodiments; Figure 2 The diagram illustrates a first case of the method for handling overlapping segments of lines according to some embodiments, before the dragging behavior occurs; Figure 3 The diagram illustrates the first case of dragging behavior after the handling of overlapping segments in some embodiments of the line connection method. Figure 4 The diagram illustrates the first case of the dragging behavior ending at the end of the method for handling overlapping segments of lines according to some embodiments; Figure 5 This diagram illustrates a second case of the method for handling overlapping segments of lines in some embodiments, before the dragging behavior occurs; Figure 6 The diagram illustrates a second case of dragging behavior after the processing of overlapping segments in some embodiments of the method. Figure 7 The diagram illustrates the second case of the dragging behavior ending at the end of the method for handling overlapping segments of lines according to some embodiments; Figure 8 A schematic diagram of a connection overlap segment processing system according to some embodiments is shown; Figure 9 Block diagrams of electronic devices involved in some embodiments are shown. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Existing technical solutions typically involve repeatedly drawing overlapping line segments at the drawing layer or performing pixel-level deduplication during the rendering stage, without addressing overlapping line segments between branches at the topology level. This results in common overlapping segments being drawn multiple times, increasing rendering computation and impacting drawing performance; it also visually creates the phenomenon of multiple lines overlapping, reducing the readability and clarity of the model design diagram.

[0020] Therefore, at least one embodiment provides a method for processing overlapping segments of connections, including: when the module itself or the module connection is dragged to the target position, the model design unit detects segment by segment whether there are overlapping segments in the connection set related to the current dragging behavior according to the signal flow direction; after each overlapping segment is detected, the model design unit performs redundant path merging processing on the overlapping segment, and then continues to detect and process the next overlapping segment, until all overlapping segments in the connection set related to the current dragging behavior are processed.

[0021] The overlapping segment processing method in this embodiment first detects whether there are overlapping segments in the set of connections related to the current dragging behavior when the module itself or the module connection is dragged to the target position. Once an overlapping segment is detected, redundant path merging is performed. After the redundant path merging is performed, the next overlapping segment is detected. By adopting an iterative "detect-process-re-detect" method, redundant overlapping segments related to the current dragging behavior can be reduced. Through redundant path merging, the overlapping segments are optimized, reducing the overhead of repeated rendering and repeated storage.

[0022] The various non-limiting embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings.

[0023] like Figure 1 As shown, some embodiments provide a method for processing overlapping segments of lines, including: Step S101: When the module itself or the module connection is dragged to the target position, the model design unit detects whether there are overlapping segments in the connection set related to the current dragging behavior according to the signal flow direction. In step S102, after each overlapping line segment is detected, the redundant path merging process is performed on the overlapping line segment by the model design unit. Then, the overlapping line segment is detected and processed again until all overlapping line segments in the connection set related to the current dragging behavior are processed.

[0024] Specifically, module connection refers to the connection that connects to the input or output port of a module; dragging behavior refers to dragging the module connection or the module itself in the model design interface; the end of dragging behavior refers to releasing the dragging behavior after dragging the module itself or the module connection to the target position.

[0025] Specifically, the set of connections related to the current dragging behavior refers to the set of connections that include the currently dragged module itself and the connections that may overlap due to the current dragging behavior.

[0026] In some embodiments, when a module itself or a module connection is dragged to a target position, a method is used by a model design unit to detect, segment by segment, whether there are overlapping segments in the connection set related to the current dragging behavior according to the signal flow direction. This includes: at the end of the dragging behavior, the model design unit divides each connection in the connection set related to the current dragging behavior into several segments according to the signal flow direction, and detects whether the corresponding segments of each connection in the signal flow direction sequence form a group of segments that are collinear and have overlapping projections. If so, the overlapping projection of the segment group is determined as a candidate overlapping segment, and the overlapping starting point of the overlapping projection in the signal flow direction sequence is taken as the overlapping starting point of the candidate overlapping segment; the candidate overlapping segment is included in a candidate set; and if the segments corresponding to a candidate overlapping segment are collinear, have the same signal flow direction, and the same length, the overlapping endpoint of the segment group corresponding to the candidate overlapping segment is recorded as the latest overlapping endpoint, and the next candidate segment is determined from the latest overlapping endpoint. If the segments corresponding to the selected overlapping line segments are collinear, have the same signal flow direction, and the same length, then the process continues to determine the candidate overlapping line segments and updates the latest overlapping endpoint. This continues until the segments corresponding to a candidate overlapping line segment are not all collinear, have different signal flow directions, or any segment has no next segment. In this case, the latest overlapping endpoint recorded is taken as the overlapping endpoint of the current round of detection, and the interval from the initial overlapping starting point of the round of detection to the overlapping endpoint of the round of detection is determined as the overlapping part of the line segments detected in this round. The remaining branch lines after reaching the overlapping endpoint of the round of detection are classified as exiting branch lines, or the only remaining branch line on the current path after reaching the overlapping endpoint of the round of detection is classified as exiting branch lines. The overlapping interval of corresponding line segments that still extend in the same direction from the overlapping endpoint of the round of detection and have no less than two lines is classified as candidate overlapping line segments for the detection of the overlapping part of the line segments in the next round.

[0027] In some embodiments, after detecting each overlapping segment, a method for redundancy path merging of the overlapping segment by a model design unit includes: after detecting an overlapping segment, deleting the geometric path of the overlapping segment by a model design unit, while maintaining the signal attributes of each original connection and the binding relationship between each original connection and the source port and the target port; creating a host branch, and creating a mapping relationship between the host branch and each original connection identifier and its corresponding source port, target port and the remaining branch path of each connection; and connecting the exit branch connection to the endpoint of the host branch.

[0028] In some embodiments, the method for processing overlapping segments further includes: updating the candidate set after completing the redundant path merging process for an overlapping segment; If the updated candidate set is not empty, the updated candidate overlapping segments are continued to be detected and processed according to the connection topology order until the candidate set is empty.

[0029] Specifically, the following case study details the process of handling overlapping segments in a connection.

[0030] like Figure 2 As shown, in a model design interface, the model designed by the user includes: the output port Out1 of module A (hereinafter referred to as A.Out1 in this case) is connected to the input port In1 of module B (hereinafter referred to as B.In1 in this case) and the input port In1 of module C (hereinafter referred to as C.In1 in this case) respectively. The connection between module A and module B is represented by L_AB; the connection between module A and module C is represented by L_AC.

[0031] Drag the module connection line B1 (from point P1 to the input port B.In1 of module B) connected to module B to the right as shown. Figure 3 When the target position is shown, the set of connections related to the current dragging behavior includes connection L1 and connection L2 (where L1 corresponds to the original connection identifier L_AB, and L2 corresponds to the original connection identifier L_AC). The model design unit, according to the direction of signal flow from module A to module B and module C respectively, splits connection L1 into line segment D1 (horizontal segment from point P1 to point P2), line segment D2 (vertical segment from point P2 upwards to the inflection point), and line segment D3 (horizontal segment from the inflection point to the input port B.In1 of module B), and splits connection L2 into line segment D4 (horizontal segment from point P1 to point P2), line segment D5 (vertical segment from point P2 downwards to the inflection point), and line segment D6 (horizontal segment from the inflection point to the input port C.In1 of module C), and then detects each connection. The test checks whether the line segments forming the corresponding line segments in the signal flow sequence are collinear and whether their projections overlap. Specifically, it checks the first line segment D1 of line L1 and the first line segment D4 of line L2. After detection, it is found that line segments D1 and D4 are collinear and their projections overlap. The overlap between line segments D1 and D4 is divided into candidate overlapping line segments, and the overlap starting point P1 is used as the overlap starting point P1 of the candidate overlapping line segment. In this case, the overlap starting point P1 is also the initial overlap starting point P1 of this round of detection. Next, it checks the second line segment D2 of line L1 and the second line segment D5 of line L2. It is found that line segments D2 and D5 are not collinear and have no overlap, so the detection stops. Then, the detected candidate overlapping line segment is added to the candidate set.

[0032] Next, it is determined that the line segment D1 and line segment D4 corresponding to the candidate overlapping line segment are collinear, have the same signal flow direction, and have the same length. Therefore, their overlapping endpoint P2 is recorded as the latest overlapping endpoint. Since there is only this one overlapping segment in this case, the judgment ends. The latest overlapping endpoint is also the overlapping endpoint P2 of the current round of detection. The interval from the initial overlapping starting point P1 of the current round of detection to the overlapping endpoint P2 of the current round of detection is determined as the overlapping part of the line segment detected in this round.

[0033] like Figure 4 As shown, the redundant paths of the overlapping line segments detected in this round are then merged. This involves deleting the geometric paths of the overlapping segments and creating a host branch H01 as a shared geometric path. The starting point of the host branch H01 replaces the initial overlapping starting point P1 of this round of detection. It is then connected to the output port A.Out1 of module A via module connection point P0. The ending point of the host branch H01 replaces the overlapping ending point P2 of this round of detection and is connected to the remaining branches of lines L1 and L2 respectively. Finally, at the end of the dragging action, the host branch H01 displays the common geometric path from point P1 to point P2. Line L1 displays the remaining branches from point P2 to B.In1, and line L2 displays the remaining branches from point P2 to C.In1. (It should be noted that the line segment from point P0 to point P1 is a module-outgoing line segment and does not participate in the detection and processing of overlapping segments.)

[0034] In this case, the metadata of the original connection from module A to module B and the original connection from module A to module C includes the following table: When the model design unit creates the host branch H01, it records the host branch H01 as a shared geometric path, not a separate service signal connection object. The host branch H01 only stores the shared geometric path from point P1 to point P2. The source port, destination port, and signal attributes of the connections L_AB and L_AC remain bound to the original connection identifiers L_AB and L_AC, respectively, and are not changed due to the creation of the host branch.

[0035] In this case, the mapping relationship between the host branch and each original connection identifier, its corresponding source port, destination port, and the remaining branch paths of each connection is shown in the following table: Through the above mapping relationship, when saving the model, only one copy of the geometric path of the host branch H01 and the above mapping relationship table need to be saved. When loading the model, the model design unit restores the model according to the mapping relationship table: the connection identifier L_AB still represents the connection from A.Out1 to B.In1, and the connection identifier L_AC still represents the connection from A.Out1 to C.In1.

[0036] After completing the redundant path merging process for the overlapping segments in this round, the candidate set is updated. If the candidate set is found to be empty, the current detection and processing ends.

[0037] In this case, after dragging the module to connect line B1, the two original lines form the same geometric path between points P1 and P2. To avoid this geometric path being repeatedly saved and drawn, the model design unit deletes the overlapping portion of the line segments between points P1 and P2, and optimizes the overlapping portion by creating a host branch H01. This ensures that when the dragging action ends, the overlapping portion is handled solely by the host branch, while the remaining branches of the non-overlapping portions of the original lines are displayed separately. This ensures that there are no redundant overlapping portions in the line structure after the redundant paths are merged, and maintains the original topology, thereby improving the readability and drawing performance of the lines.

[0038] Specifically, the following case study will describe in detail the process of handling overlapping segments in the connection.

[0039] like Figure 5 As shown, in a model design interface, the user-designed model includes: the output port Out1 of module A1 (hereinafter referred to as A1.Out1 in this case) is connected to the input ports In1 (hereinafter referred to as B1.In1), In2 (hereinafter referred to as B1.In2), and In3 (hereinafter referred to as B1.In3 in this case) of module B1 and the input port In1 of module C1 (hereinafter referred to as C1.In1 in this case). The connection identifiers from module A1 to module B1 are L_AB1, L_AB2, and L_AB3; the connection identifier from module A1 to module C1 is L_AC.

[0040] Drag the module connection line X1 (from point P1 to the input port C1.In1 of module C1) connected to module C1 to the right as shown. Figure 6When the target position is shown, the set of connections related to the current dragging behavior includes connection L1, connection L2, connection L3, and connection L4 (where L1 corresponds to the original connection identifier L_AB3, L2 corresponds to the original connection identifier L_AB2, L3 corresponds to the original connection identifier L_AB1, and L4 corresponds to the original connection identifier L_AC). The model design unit, according to the signal flow from module A1 to module B1 and module C1 respectively, splits connection L1 into line segment D1 (horizontal segment from point P1 to point P2), line segment D2 (vertical segment from point P2 to point P3), and line segment D3 (horizontal segment from point P3 to the input port B1.In3 of module B1). Similarly, it splits connection L2 into line segment D4 (horizontal segment from point P1 to point P2), line segment D5 (horizontal segment from point P2 to...). The line L3 is divided into line segments D8 (the vertical segment from point P1 to point P2), D9 (the vertical segment from point P2 to point P3), D10 (the vertical segment from point P3 to point P4), D11 (the vertical segment from point P4 to point P5), and D12 (the horizontal segment from point P5 to the input port B1.In1 of module B1). The line L4 is divided into line segments D13 (the horizontal segment from point P1 to point P2), D14 (the vertical segment from point P2 to point P3), D15 (the vertical segment from point P3 to point P4), and D16 (the horizontal segment from point P4 to point P5). The system detects whether the line segments formed by the corresponding line segments in the signal flow sequence of each connection are collinear and whether their projections overlap. Specifically, it detects the first line segments D1, D4, D8, and D13 of the connection from L1 to L4. After detection, it finds that line segments D1, D4, D8, and D13 are collinear and their projections overlap. The overlapping area of ​​line segments D1, D4, D8, and D13 is divided into the first candidate overlapping line segments, and the overlapping starting point P1 is used as the overlapping starting point P1 of the first candidate overlapping line segments. In this case, the overlapping starting point P1 is also the initial overlapping starting point P1 of this round of detection. Candidate overlapping line segments are added to the candidate set; then, the second line segment D2, line segment D5, line segment D9, and line segment D14 connecting line L1 to line L4 are detected. It is found that line segments D2, D5, D9, and D14 are also collinear and their projections have overlapping intervals. The overlapping interval of line segments D2, D5, D9, and D14 is also classified as the second candidate overlapping line segment, and the overlapping starting point P2 is used as the overlapping starting point P2 of the second candidate overlapping line segment. The second candidate overlapping line segment is also added to the candidate set; then, the third line segment D3, line segment D6, line segment D10, and line segment D15 connecting line L1 to line L4 are detected. It is found that line segment D3 has no overlapping interval with line segments D6, D10, and D15, so the detection stops.

[0041] Then, it is determined that line segments D1, D4, D8, and D13, corresponding to the first candidate overlapping line segment, are collinear, have the same signal flow direction, and are of the same length. Therefore, their overlapping endpoint P2 is recorded as the latest overlapping endpoint. Next, it is determined that line segments D2, D5, D9, and D14, corresponding to the second candidate overlapping line segment, are also collinear, have the same signal flow direction, and are of the same length. Therefore, their overlapping endpoint P3 is updated and recorded as the latest overlapping endpoint. At this point, all candidate overlapping line segments have been determined, so this round of detection ends. The latest overlapping endpoint is also the overlapping endpoint P3 of this round of detection, and the initial overlapping starting point P of this round of detection is set. The interval from point 1 to the endpoint P3 of the current detection is determined as the overlapping part of the line segments detected in this round. In addition, since the remaining branch lines of line L1 are no longer collinear with other remaining branch lines in the current path direction after reaching the endpoint P3 of the current detection, line L1 is classified as an exiting branch line and will not participate in the subsequent detection process. At the same time, the overlapping interval of the first line segment D6, line segment D10 and line segment D15 corresponding to the remaining branch lines of lines L2, L3 and L4 extending in the same direction from the endpoint P3 of the current detection is classified as the third candidate overlapping line segment for the detection of the overlapping part of the line segments in the next round.

[0042] like Figure 7 As shown, the redundant paths of the overlapping parts of the line segments detected in this round are then merged, that is, the geometric paths of the overlapping parts of the line segments are deleted, and a host branch H01 is created as a shared geometric path. The starting point of the host branch H01 replaces the initial overlapping starting point P1 of this round of detection and is connected to the output port A1.Out1 of module A1. The ending point of the host branch H01 replaces the overlapping ending point P3 of this round of detection and is connected to the remaining branch lines from line L1 to line L4 respectively.

[0043] After completing the redundant path merging processing for the overlapping segments detected in this round, the candidate set is updated. It is found that the updated candidate set is not empty and contains a third candidate overlapping segment corresponding to the overlapping intervals of segments D6, D10, and D15. Furthermore, the overlapping endpoint P3 from the previous round serves as the initial overlapping starting point P3 for this third candidate overlapping segment in this round of detection. Therefore, this third candidate overlapping segment is further detected and processed according to the connection topology order. Figure 6As shown, after the processing of overlapping segments in the previous round is completed, it is determined that segments D6, D10, and D15, corresponding to the current third candidate overlapping segment, are collinear, have the same signal flow direction, and are of the same length. Therefore, their overlapping endpoint P4 is recorded as the latest overlapping endpoint. Next, the second segment D7 of the remaining branch connecting line L2 to line L4 is checked with segments D11 and D16. It is found that segments D7, D11, and D16 are not collinear, so this round of judgment ends. The latest overlapping endpoint, which is also the overlapping endpoint P4 detected in this round, is recorded, and the initial overlapping starting point P3 of this round of detection is recorded. The interval leading to the endpoint P4 of this round of detection is determined as the overlapping part of the line segments detected in this round. In addition, since the remaining branch lines of line L2 are no longer collinear with other remaining branch lines in the current path direction after reaching the endpoint P4 of this round of detection, line L2 is classified as an exiting branch line and will not participate in the subsequent detection process. At the same time, the overlapping interval of the first line segment D11 and line segment D16 corresponding to the remaining branch lines of line L3 and line L4 extending in the same direction from the endpoint P4 of this round of detection is classified as the fourth candidate overlapping line segment for the detection of the overlapping part of the line segments in the next round.

[0044] Similarly, as Figure 7 As shown, the redundant paths of the overlapping segments detected in this round are then merged, that is, the overlapping segments are deleted, and a host branch H02 is created as a shared geometric path. The starting point of the host branch H02 replaces the initial overlapping starting point P3 of this round of detection and connects it with the ending point of the host branch H01. The ending point of the host branch H02 replaces the overlapping ending point P4 of this round of detection and connects it with the remaining branch lines from line L2 to line L4.

[0045] After the overlapping segments detected in this round are processed, the candidate set is updated again. It is found that the updated candidate set is not empty and contains a fourth candidate overlapping segment corresponding to the overlapping interval of segments D11 and D16. Furthermore, the overlapping endpoint P4 from the previous round is used as the initial overlapping starting point P4 of this fourth candidate overlapping segment in this round of detection. Therefore, this fourth candidate overlapping segment is further detected and processed according to the connection topology order. Figure 6As shown, after the processing of the overlapping part of the line segments in the previous round is completed, it is determined that the line segments D11 and D16 corresponding to the current candidate overlapping line segments are collinear, have the same signal flow direction, and have the same length. Therefore, their overlapping endpoint P5 is recorded as the latest overlapping endpoint. Then, the second line segment D12 and line segment D17 of the remaining branch line from line L3 to line L4 are detected. It is found that line segments D12 and D17 are not collinear, so this round of judgment ends. The latest overlapping endpoint is recorded as the overlapping endpoint P5 of this round of detection. The interval from the initial overlapping starting point P4 of this round of detection to the overlapping endpoint P5 of this round of detection is determined as the overlapping part of the line segments detected in this round. In addition, since after reaching the overlapping endpoint P5 of this round of detection, line L3 and line L4 are no longer collinear with other lines, line L3 and line L4 are also classified as exiting branch lines. There are fewer than two lines extending in the same direction from the overlapping endpoint P5 of this round of detection. The entire detection process ends here.

[0046] Similarly, as Figure 7 As shown, the redundant paths of the overlapping line segments detected in this round are then merged. This involves deleting the overlapping line segments detected in this round and creating a host branch H03 as a shared geometric path. The starting point of the host branch H03 replaces the initial overlapping starting point P4 of this round and connects it to the ending point of the host branch H02. The ending point of the host branch H03 replaces the overlapping ending point P5 of this round and connects it to the remaining branches of the connecting lines L3 and L4, respectively. This completes all the processing.

[0047] Finally, at the end of the dragging behavior, the host branch H01 carries the common geometric path from point P1 to point P3, the host branch H02 carries the common geometric path from point P3 to point P4, and the host branch H03 carries the common geometric path from point P4 to point P5. The connecting lines L1 to L4 respectively display the remaining branches after they exit the overlapping part of the line segment.

[0048] In this case, it can be seen that when the dragging behavior ends, the model design unit does not perform a full comparison of all the connections in the entire model. Instead, it first splits the affected connections related to the dragging behavior within the same source signal tree into several segments according to the signal flow direction. Then, it determines the candidate overlapping segments based on collinearity, overlapping projection intervals, and the same signal direction. Any subsequent candidate overlapping segments can only be judged in the remaining connection intervals after the previous round of segment overlap detection and processing, and cannot cross back to the connection intervals that have already been detected and processed.

[0049] Specifically, a common source signal tree refers to a tree or mesh topology set in the model design that shares the same logical signal source (such as the same output port or the same signal source module) and that the signal is transmitted downstream through the connection and its lower branches.

[0050] like Figure 8 As shown, some embodiments also provide a connection overlap segment processing system, including: a computer device configured to run a model design unit deployed in a model design system, the model design unit being configured to include: The detection module is configured to detect, segment by segment, whether there are overlapping segments in the set of connections related to the current dragging behavior, according to the signal flow direction when the module itself or the module connection is dragged to the target position. The optimization module is configured to perform redundant path merging on each overlapping line segment detected, and then continue to detect and process the next overlapping line segment until all overlapping line segments in the connection set related to the current dragging behavior have been processed.

[0051] The specific implementation functions of the detection and processing modules can be found in the aforementioned method for handling overlapping segments of lines, and will not be repeated here.

[0052] The electronic devices in the embodiments of this disclosure are described below from the perspective of hardware processing: The embodiments disclosed herein do not limit the specific implementation of the electronic device.

[0053] like Figure 9 As shown, some embodiments also provide an electronic device, including: a processor, a non-transitory computer-readable storage medium, a communication bus, and a communication interface; wherein the processor, the non-transitory computer-readable storage medium, and the communication interface communicate with each other through the communication bus; the non-transitory computer-readable storage medium stores instructions that, when executed by the processor, cause the processor to perform the previously described method for processing overlapping connection segments.

[0054] In some embodiments, computer devices, industrial control computers, and bus adapters may also be considered as electronic devices.

[0055] Figure 9 The diagram shows a schematic structure of an electronic device, which is for illustration only and does not constitute a limitation on the electronic device. The electronic device may include fewer or more components than shown, or may combine components, or may use different component arrangements.

[0056] In some embodiments, the communication interface may include physical interfaces such as RS-232, RS-485, and USB (including Type-C) for connecting external devices or bus adapters; it may also include wired network interfaces such as Ethernet, or wireless network interfaces such as Wi-Fi and Bluetooth for establishing communication connections between computer devices and other electronic devices.

[0057] In some embodiments, non-transitory computer-readable storage media include, but are not limited to, flash memory, hard disks, magnetic storage, magnetic disks, optical disks, and card-type storage (e.g., multimedia cards, secure digital storage (SD) cards, etc.). In some embodiments, the storage medium can serve as an internal storage unit of a computer device, such as a built-in hard disk; in other embodiments, it can serve as an external storage device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital storage (SD) card, a flash memory card, etc. Furthermore, the storage medium may also include both internal storage units and external storage devices. This storage medium can be used to store application software and various types of data (e.g., computer program code) installed on the computer device, and can also be used to temporarily store data that has been output or will be output.

[0058] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, used to run program code in a storage medium and / or process data, such as executing a computer program.

[0059] In some embodiments, the communication bus can be an input / output bus, such as a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This bus can be categorized into an address bus, a data bus, and a control bus.

[0060] Optionally, the computer device also includes a user interface. The user interface may include a display, an input unit (e.g., a keyboard), and standard wired and / or wireless interfaces. Optionally, the display (or display module) may be an LED display, a liquid crystal display, a touch-screen liquid crystal display, or an OLED display. The display (or display module) may also be referred to as a screen or display unit, used to display information processed by the computer device and present a visual user interface.

[0061] When the processor executes the program, it implements the above. Figure 1 The steps in the embodiment of the method for processing overlapping segments of the connected lines are shown. Alternatively, the processor executes a computer program to implement the functions of each module or unit in the above-described device embodiments.

[0062] Some embodiments also provide a non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the interconnection segment processing method described above.

[0063] Please refer to the detailed description of the method for handling overlapping segments of lines based on model design; it will not be repeated here.

[0064] Some embodiments also provide a computer program product including instructions that, when executed by a processor, cause the processor to perform the aforementioned method for processing overlapping connection segments.

[0065] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of a code program containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0066] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0067] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a non-transitory computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0068] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A method for processing overlapping segments in a connection, characterized in that, include: When the module itself or the module connection is dragged to the target position, the model design unit checks segment by segment whether there are overlapping segments in the set of connections related to the current dragging behavior according to the signal flow direction. After each overlapping line segment is detected, the model design unit performs redundant path merging on the overlapping line segment, and then continues to detect and process the next overlapping line segment until all overlapping line segments in the connection set related to the current dragging behavior have been processed.

2. The method for processing overlapping segments of a connection according to claim 1, characterized in that, When a module or its connecting wires are dragged to a target position, a method is used by the model design unit to detect, segment by segment, whether there are overlapping segments in the set of connecting wires related to the current dragging behavior, according to the signal flow direction. This includes: When the dragging behavior ends, the model design unit splits each connection in the connection set related to the current dragging behavior into several line segments according to the signal flow direction, and detects whether the line segment groups formed by the corresponding line segments of each connection in the signal flow direction are collinear and have overlapping intervals in their projections. If so, the overlapping interval of the line segment group is determined as a candidate overlapping line segment, and the overlapping starting point of the overlapping interval in the signal flow direction is taken as the overlapping starting point of the candidate overlapping line segment. Include candidate overlapping line segments into a candidate set; and If all segments corresponding to a candidate overlapping line segment are collinear, have the same signal flow direction, and have the same length, then the overlapping endpoint of the line segment group corresponding to the candidate overlapping line segment is recorded as the latest overlapping endpoint. Then, it is determined whether the segments corresponding to the next candidate overlapping line segment that proceeds from the latest overlapping endpoint are collinear, have the same signal flow direction, and have the same length. If so, the next candidate overlapping line segment is determined and the latest overlapping endpoint is updated. This continues until all segments corresponding to a candidate overlapping line segment are not collinear, have different signal flow directions, or any segment has no next segment. Then, the latest overlapping endpoint recorded is taken as the overlapping endpoint of the current round of detection, and the interval from the initial overlapping starting point of the current round of detection to the overlapping endpoint of the current round of detection is determined as the overlapping part of the line segments detected in this round. The remaining branch lines that are no longer collinear with other remaining branch lines on the current path after reaching the overlapping endpoint of the current detection round are classified as exit branch lines; or the only remaining branch line on the current path after reaching the overlapping endpoint of the current detection round is classified as an exit branch line; and The overlapping intervals of corresponding line segments that still extend in the same direction from the overlapping endpoint of the previous round of detection and have at least two connecting lines are divided into candidate overlapping line segments for the detection of overlapping parts of line segments in the next round.

3. The method for processing overlapping segments of a connection according to claim 2, characterized in that, After detecting each overlapping segment, the method of redundancy merging for that overlapping segment using the model design unit includes: After detecting an overlapping section of a line segment, the geometric path of this overlapping section is deleted through the model design unit, while keeping the signal attributes of each original connection and the binding relationship between each original connection and the source port and the target port unchanged. Create a host branch, and create a mapping relationship between the host branch and each original connection identifier and its corresponding source port, destination port, and the remaining branch paths of each connection; and Connect the exit branch to the end of the host branch.

4. The method for processing overlapping segments of a connection according to claim 3, characterized in that, Also includes: After completing the redundant path merging process for the overlapping part of a line segment, update the candidate set; If the updated candidate set is not empty, the updated candidate overlapping segments are continued to be detected and processed according to the connection topology order until the candidate set is empty.

5. A system for processing overlapping sections of a connection, characterized in that, include: A computer device configured to run a model design unit deployed in a model design system, the model design unit being configured to include: The detection module is configured to detect, segment by segment, whether there are overlapping segments in the set of connections related to the current dragging behavior, according to the signal flow direction when the module itself or the module connection is dragged to the target position. The optimization module is configured to perform redundant path merging on each overlapping line segment detected, and then continue to detect and process the next overlapping line segment until all overlapping line segments in the connection set related to the current dragging behavior have been processed.

6. The line overlap segment processing system according to claim 5, characterized in that, The detection module is configured to, when the module itself or its connecting lines are dragged to the target position, detect segment by segment, whether there are overlapping segments in the set of connecting lines related to the current dragging behavior, according to the signal flow direction, including: When the dragging action ends, each connection in the connection set related to the current dragging action is split into several line segments according to the signal flow direction. It is then checked whether the line segment groups formed by the corresponding line segments of each connection in the signal flow direction are collinear and whether their projections have overlapping intervals. If so, the overlapping interval of the line segment group is determined as a candidate overlapping line segment, and the overlapping starting point of the overlapping interval in the signal flow direction is taken as the overlapping starting point of the candidate overlapping line segment. Include candidate overlapping line segments into a candidate set; and If all segments corresponding to a candidate overlapping line segment are collinear, have the same signal flow direction, and have the same length, then the overlapping endpoint of the line segment group corresponding to the candidate overlapping line segment is recorded as the latest overlapping endpoint. Then, it is determined whether the segments corresponding to the next candidate overlapping line segment that proceeds from the latest overlapping endpoint are collinear, have the same signal flow direction, and have the same length. If so, the next candidate overlapping line segment is determined and the latest overlapping endpoint is updated. This continues until all segments corresponding to a candidate overlapping line segment are not collinear, have different signal flow directions, or any segment has no next segment. Then, the latest overlapping endpoint recorded is taken as the overlapping endpoint of the current round of detection, and the interval from the initial overlapping starting point of the current round of detection to the overlapping endpoint of the current round of detection is determined as the overlapping part of the line segments detected in this round. The remaining branch lines that are no longer collinear with other remaining branch lines on the current path after reaching the overlapping endpoint of the current detection round are classified as exit branch lines; or the only remaining branch line on the current path after reaching the overlapping endpoint of the current detection round is classified as an exit branch line; and The overlapping intervals of corresponding line segments that still extend in the same direction from the overlapping endpoint of the previous round of detection and have at least two connecting lines are divided into candidate overlapping line segments for the detection of overlapping parts of line segments in the next round.

7. The overlapping segment processing system according to claim 6, characterized in that, The optimization module is further configured to perform redundant path merging processing on each detected overlapping segment, including: After detecting an overlapping section of a line segment, delete the geometric path of the overlapping section while keeping the signal attributes of each original connection and the binding relationship between each original connection and the source port and the target port unchanged. Create a host branch, and create a mapping relationship between the host branch and each original connection identifier and its corresponding source port, destination port, and the remaining branch paths of each connection; and Connect the exit branch to the end of the host branch.

8. A non-transitory computer-readable storage medium, characterized in that, The system stores instructions that, when executed by a processor, cause the processor to perform the method for processing overlapping segments of a connection according to any one of claims 1-4.

9. An electronic device, characterized in that, include: Non-transitory computer-readable storage medium; processor; The non-transitory computer-readable storage medium stores instructions that, when executed by a processor, cause the processor to perform the connection overlap segment processing method according to any one of claims 1-4.

10. A computer program product, characterized in that, Includes instructions that, when executed by a processor, cause the processor to perform the connection overlap segment processing method according to any one of claims 1-4.