Fusion semantic analysis process diagram automatic layout method
By introducing dual-channel feature processing and timing conflict adjustment mechanisms into the automatic flowchart layout, circular dependencies are identified and quantified, solving the problem of difficult identification of circular dependency paths in existing technologies. This improves the expandability and understandability of flowcharts and reduces reading and operational risks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN XUNSHENG INFORMATION TECH CO LTD
- Filing Date
- 2025-08-12
- Publication Date
- 2026-04-10
AI Technical Summary
Existing automatic layout technology for flowcharts that integrates semantic analysis fails to effectively handle business timing conflicts when faced with circular dependency nodes. This results in circular dependency paths being arranged adjacently in the layout, making them difficult to identify intuitively and increasing the risk of process understanding and operation.
By collecting text information and business time sequence labels of flowchart nodes, semantic vectors and time sequence vectors are generated using a dual-channel feature generation network. Loop dependency detection operator is used to identify loop dependencies. Weighted path consistency test algorithm is used to quantify the degree of conflict. A time sequence conflict penalty term is introduced into the clustering objective function. Combined with multi-objective force-oriented optimization and nonlinear Manhattan distance control, the semantic clustering structure and layout are adjusted.
It enables accurate identification and quantification of circular dependencies, improves the expandability and identifiability of process structures, ensures the spatial independence and visual salience of critical paths, reduces the cognitive burden on readers to understand the flow of circular dependencies, and improves the accuracy and security of business operations.
Smart Images

Figure CN120911475B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of flowchart automatic layout, in particular to a flowchart automatic layout method fusing semantic analysis. BACKGROUND
[0002] The flowchart automatic layout fusing semantic analysis is a technical method deeply combining natural language processing and graph layout algorithm, the core idea of which is that in the automatic arrangement process of flowchart nodes and lines, not only the aesthetic indicators in traditional graph theory (such as node spacing, edge crossing number, alignment, etc.) are considered, but also the semantic analysis and understanding of node text, type and context metadata are introduced, and the information such as semantic similarity, node importance, business role and process stage is converted into layout constraints or optimization targets, so as to realize the unification of semantic structure and graph structure. In the prior art, the flowchart automatic layout fusing semantic analysis usually includes four main links: firstly, the semantic analysis of nodes and lines is performed through text analysis, keyword extraction, word vector encoding or knowledge graph matching; secondly, the layout constraint rules or the cost function of multi-objective optimization are constructed according to the semantic similarity and business logic; thirdly, the layout scheme meeting the requirements of semantics and aesthetics is generated by using hierarchical layout, force-directed algorithm, constraint satisfaction solver or hybrid optimization algorithm; finally, in the rendering stage, the edge routing optimization, node alignment and user feedback adjustment are combined to realize the automatic arrangement of both aesthetics and semantic reasonableness.
[0003] The prior art has the following disadvantages:
[0004] In the semantic clustering process, when the semantic similarity of multiple nodes is high but their business time sequence labels present a ring-dependent relationship (for example, A→B→C→A), the nodes may be logically dependent on each other and form a closed loop; since the existing semantic clustering algorithm only optimizes based on semantic distance when constructing the clustering structure, the business time sequence relationship is not taken as a clustering constraint condition, so that the above ring-dependent nodes are closely gathered in the same cluster and arranged adjacent to each other in the layout, thereby compressing the unfolding of the flow and hiding the flow direction of the ring-dependent relationship in the visual presentation. The existing flowchart automatic layout technology fusing semantic analysis cannot adjust the semantic clustering structure according to the time sequence conflict under the condition that the nodes have a ring-dependent relationship, which causes the ring-dependent path in the layout result to be difficult to intuitively identify, and further makes it difficult for the reader to accurately understand the execution order of the business, thereby increasing the risk of flow understanding and operation.
[0005] The above information disclosed in the background section is only used to enhance the understanding of the background of the present disclosure, and therefore it can include information that does not constitute the prior art known to those of ordinary skill in the art. SUMMARY
[0006] The application aims to provide a flowchart automatic layout method integrating semantic analysis to solve the problems in the background art.
[0007] To achieve the above-mentioned purpose, the application provides the following technical solution: a flowchart automatic layout method integrating semantic analysis, specifically comprising the following steps:
[0008] S1, collecting text information and business time sequence labels of all nodes in the flowchart, generating semantic vectors and time sequence vectors through a double-channel feature generation network composed of a semantic vector encoder and a time sequence relationship encoder, and performing deep-first traversal and closed-loop detection in a directed graph composed of the time sequence vectors by using a closed-loop dependence detection operator to identify whether there is a business ring dependence situation of the nodes;
[0009] S2, inputting the node set with the business ring dependence situation into a time sequence conflict analysis engine, combining the semantic vectors and the time sequence vectors, and calculating a time sequence conflict index of the ring dependence set by using a weighted path consistency verification algorithm to determine the time sequence conflict degree under the business ring dependence situation of the nodes, and generating corresponding conflict description data;
[0010] S3, inputting the conflict description data and the semantic vectors into a conflict-aware clustering optimizer, introducing a time sequence conflict penalty term in a clustering objective function, and adjusting the cluster boundary of the ring dependence set by using a spectral clustering algorithm to adjust the semantic clustering structure according to the determination result;
[0011] S4, inputting the adjusted semantic clustering structure into a topology unfolding layout generator, combining the conflict description data and the cluster structure, and calculating the unfolding path and the node spacing of the ring dependence set by using a multi-objective force-directed optimization and a nonlinear Manhattan distance control;
[0012] S5, monitoring the visibility change of the ring dependence by a time sequence conflict saliency dynamic regulator after the layout is generated, and adjusting the node position, the line transparency, the flow direction mark and the color gradient according to a prediction model.
[0013] Preferably, S1 specifically comprises:
[0014] Collecting text information and business time sequence labels of all nodes in the flowchart, inputting the text information into a semantic vector encoder, generating semantic vectors through word segmentation processing, word vector mapping and context attention calculation, inputting the business time sequence labels into a time sequence relationship encoder, and generating time sequence vectors through position encoding, relationship matrix construction and self-attention calculation;
[0015] Synchronously processing the semantic vectors and the time sequence vectors in the double-channel feature generation network, and outputting the semantic vectors and the time sequence vectors of each node through vector splicing and normalization;
[0016] A directed graph is constructed based on time sequence vectors, where nodes correspond to process nodes, the direction of edges is determined by the execution order in the business time sequence labels, and the weight of edges is determined by the time interval in the business time sequence labels.
[0017] The directed graph is input into the loop dependency detection operator, and a depth-first traversal is performed to record the path node sequence. At the end of the traversal, the loop detection algorithm is used to determine whether the first node and the last node of the path are the same. If they are the same, the nodes in the path are identified as nodes with business circular dependencies and a unique dependency identifier is generated.
[0018] Preferably, S2 specifically includes the following steps:
[0019] S201. Input the set of nodes with circular business dependencies into the temporal conflict analysis engine. Within the engine, call the vector parsing unit to read the semantic vector and temporal vector of the node set respectively, and perform dimension alignment and numerical normalization on the semantic vector and temporal vector to generate input features that can be computed in parallel.
[0020] S202. Input features are fed into a weighted path consistency test algorithm. A directed subgraph of a circular dependency set is constructed based on the temporal vector. Each circular path in the subgraph is traversed sequentially. The temporal difference and semantic difference between adjacent nodes in the path are calculated and weighted according to the preset weight coefficient to obtain the path consistency score.
[0021] S203. Perform aggregation calculation on the consistency scores of all ring paths to generate a temporal conflict index. Based on the temporal conflict index, generate conflict description data containing conflict path identifiers, conflict degree values, and related node identifiers, providing input basis for subsequent adjustment of the semantic clustering structure based on the determined results.
[0022] Preferably, S202 specifically refers to:
[0023] The input features are fed into a weighted path consistency test algorithm. The directed subgraph of the circular dependency set is constructed using the node order value and time interval value contained in the time series vector, and the adjacency list structure is used to record the direction and weight between nodes.
[0024] In the directed subgraph, each circular path is traversed sequentially according to the starting point order of the circular path. Temporal difference and semantic difference are extracted for adjacent nodes within the path. The semantic difference is obtained by cosine similarity calculation, and the temporal difference is obtained by time interval difference calculation.
[0025] The temporal difference and semantic difference are linearly weighted and synthesized according to preset weight coefficients, and the path consistency score of each loop path is output and stored in the path score array, providing input data for the calculation of the temporal conflict index.
[0026] Preferably, S3 is as follows:
[0027] The conflict description data and the semantic vector are input into a conflict-aware clustering optimizer, field resolution, index alignment and scale unification are performed, the conflict degree value is mapped into a conflict intensity vector, and the composite vector is generated by splicing the conflict intensity vector and the corresponding semantic vector according to the dimension;
[0028] A time sequence conflict penalty term is introduced into a clustering target function, a penalty coefficient is calculated according to the conflict intensity vector, the weight of the similarity matrix is subjected to an increase-suppression transformation according to the penalty coefficient, and the penalty term is written into the regular part of the clustering target function to form a constraint expression;
[0029] The composite vector is processed by calling a spectral clustering algorithm, feature decomposition is performed on the similarity matrix and the Laplacian matrix, clustering division is performed based on feature embedding, cluster boundary adjustment is performed on the ring dependency set, and clustering labels after adjusting the semantic clustering structure according to the determination result are output.
[0030] Preferably, S4 specifically is:
[0031] The adjusted semantic clustering structure and the conflict description data are structurally merged to form a layout input matrix containing cluster structure, conflict path identification and conflict degree value, and path indexes are established for nodes of the ring dependency set according to the cluster structure to ensure the continuity of the unfolded path;
[0032] The layout input matrix and the cluster structure are input into a multi-objective force-directed optimization operation unit, a multi-objective optimization function containing node repulsive force components, inter-cluster attractive force components and conflict path tension components is constructed, and node position vectors are updated through iterative calculation to form a preliminary unfolded path of the ring dependency set in the layout plane;
[0033] Nonlinear Manhattan distance control is introduced on the basis of the multi-objective force-directed optimization operation result, the horizontal and vertical distances between adjacent nodes of the ring dependency set are calculated based on the node position vectors, coordinate redistribution operation is performed on node pairs with a distance less than a minimum distinguishable distance threshold, and the ring dependency set unfolded path and node distance that meet the distance constraint are generated.
[0034] Preferably, S5 specifically is:
[0035] The node positions, connection paths and ring dependency path identifications generated by the layout are input into a time sequence conflict saliency dynamic regulator, the visibility index of the ring dependency in the layout plane is calculated using the node position vectors and the connection geometry, and the visibility index is continuously sampled based on a time window to monitor the visibility change of the ring dependency;
[0036] The visibility change data and the annular dependency path identification are input into a prediction model, combined with the semantic vector, the time sequence vector and the conflict description data of the node, and a mode recognition algorithm and a regression analysis method are used to predict the visibility reduction area that may appear in the subsequent layout rendering process, and an adjustment instruction set containing the node position adjustment amount, the line transparency adjustment value, the flow direction mark rendering priority and the color gradient parameter is generated;
[0037] The adjustment instruction set is input into the layout rendering engine, the node position is subjected to micro-displacement operation according to the node position adjustment amount, the line is subjected to transparency gradient rendering according to the line transparency adjustment value, the key path direction identification is drawn according to the flow direction mark rendering priority, and the color gradient rendering is performed on the paths with different conflict degrees according to the color gradient parameter to complete the dynamic regulation and control.
[0038] In the above technical solution, the technical effects and advantages provided by the present application are as follows:
[0039] 1. The present application introduces a double-channel feature processing mechanism that fuses semantic analysis and business time sequence relationship in the automatic layout process of the flowchart, solves the defects of the prior art in annular dependency recognition and time sequence conflict processing. The semantic vector and the time sequence vector with high precision are generated by the semantic vector encoder and the time sequence relationship encoder, and the precise recognition of the business annular dependency situation is realized in combination with the closed-loop dependency detection operator, and the conflict degree is quantified by the weighted path consistency verification algorithm, so that the system can obtain clear and quantifiable conflict description data before layout. This accurate conflict recognition and quantification method lays a data foundation for introducing a time sequence conflict penalty term in subsequent clustering optimization, so that the semantic clustering structure can avoid the annular dependency compression layout problem in the construction stage, and the expandability and recognizability of the flow structure are fundamentally improved.
[0040] 2. The present application combines multi-target force guiding optimization and nonlinear Manhattan distance control, not only realizes the reasonable distribution of the distance between the annular dependency set nodes, but also ensures the spatial independence and visual saliency of the key path in the visualization layer. At the same time, the time sequence conflict saliency dynamic regulation and control mechanism is introduced, and the node position, line transparency, flow direction mark and color gradient are adjusted in real time by combining the prediction model, so that the layout still maintains high visibility and understandability of the annular dependency path under different interactive scenes and zooming states. This full-link “recognition-quantization-adjustment-optimization-dynamic regulation and control” technical closed loop not only improves the adaptability of automatic layout under complex business processes, but also significantly reduces the cognitive burden of the reader in understanding the annular dependency flow direction, improves the accuracy and safety of business operation. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed in the embodiments will be briefly introduced as follows. Obviously, the accompanying drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained based on these drawings.
[0042] Figure 1 A flowchart of a fusion semantic analysis process automatic layout method of the present application. DETAILED DESCRIPTION
[0043] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these example implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example implementations to those skilled in the art.
[0044] The present application provides a fusion semantic analysis process automatic layout method as shown in Figure 1 The method specifically comprises the following steps:
[0045] S1, collect the text information and business time sequence labels of all nodes in the process graph, generate semantic vectors and time sequence vectors through a double-channel feature generation network composed of a semantic vector encoder and a time sequence relationship encoder, and use a closed-loop dependency detection operator to perform depth-first traversal and closed-loop detection in a directed graph composed of the time sequence vectors to identify whether there is a business ring dependency situation for the nodes;
[0046] In this embodiment, S1 is specifically:
[0047] Collect the text information and business time sequence labels of all nodes in the process graph, input the text information into the semantic vector encoder, generate semantic vectors through word segmentation processing, word vector mapping and context attention calculation, input the business time sequence labels into the time sequence relationship encoder, and generate time sequence vectors through position encoding, relationship matrix construction and self-attention calculation;
[0048] The text information and business time sequence label of all nodes in the flowchart are collected, which refers to reading the name, description and other text content of the node from the flowchart data source, as well as the business execution order, time interval, priority and other time sequence information related to the node. When the text information is input into the semantic vector encoder, the text can be cut into word or sub-word units through word segmentation processing for subsequent calculation; word vector mapping refers to mapping the word segmentation results to a pre-trained word vector space (such as embedding vectors generated based on Word2Vec, GloVe or BERT model) for capturing semantic relationships between words; context attention calculation is based on attention mechanism to weight and sum the word vectors, so that the semantic vector of each node can reflect the semantic emphasis of the node text in the context. When the business time sequence label is input into the time sequence relationship encoder, the position encoding is used to map the position of the node in the business execution sequence to a vector form, the relationship matrix construction is used to generate a directed adjacency matrix according to the time sequence dependence between nodes, and the self-attention calculation is used to establish global dependence within the time sequence relationship features, so that the generated time sequence vector can reflect the time sequence and dependence strength between nodes.
[0049] In a specific embodiment, the flowchart file is first parsed into structured data, and the text content (such as “submit application” and “review data”) and business time sequence label (such as execution order number, execution time interval and priority value) of each node are extracted. The text content is first segmented by a BERT-based segmenter, the segmentation results are mapped to a BERT pre-trained word vector space, and context attention calculation is performed using a multi-head attention mechanism in the encoding layer to generate a node semantic vector with a dimension of 768. The business time sequence label is first mapped to a fixed dimension vector by position encoding, then a node relationship matrix is constructed according to the time sequence dependence, and global time sequence dependence features are calculated through a multi-layer self-attention network to output a time sequence vector with a dimension of 256. Finally, the semantic vector and the time sequence vector are saved in the corresponding channels of the dual-channel feature generation network, providing input basis for subsequent directed graph construction and closed-loop dependence detection.
[0050] The semantic vector and the time sequence vector are processed synchronously in the dual-channel feature generation network, and the semantic vector and the time sequence vector of each node are output through vector splicing and normalization;
[0051] Synchronizing the semantic vectors and the timing vectors in the dual-channel feature generation network refers to inputting the two types of vectors into a feature generation architecture composed of a semantic channel and a timing channel, and ensuring that the two types of data are consistent in the time dimension and processing batch. The semantic channel is used to receive and process the semantic vectors generated by the node text, and the timing channel is used to receive and process the timing vectors generated by the node business execution relationship. The core of the synchronization processing is to ensure that the semantic vectors and the timing vectors under the same node number are synchronized through the same batch index and data flow mechanism, so that they are one-to-one corresponding in the subsequent fusion. Vector splicing refers to directly merging the semantic vectors and the timing vectors in the feature dimension to form an extended feature vector containing double information; normalization refers to scaling the feature values after splicing to the same numerical range by using a standardization method (such as batch normalization or layer normalization), so as to eliminate the interference of the distribution difference of different channel features on the subsequent algorithm, and output the updated semantic vectors and timing vectors for downstream processing.
[0052] In one specific embodiment, first, the semantic vector of each node is input into the semantic channel, which is composed of three fully connected networks, each layer of which cooperates with the ReLU activation function to extract higher layer semantic features; at the same time, the timing vector of each node is input into the timing channel, which is composed of two one-dimensional convolutional networks, which are used to capture the local patterns and dependence strength of the timing features. The batch synchronization controller ensures that the semantic vectors and the timing vectors of the same node number are processed simultaneously in the same calculation batch. Subsequently, the outputs of the two channels are spliced in the feature dimension, for example, the 768-dimensional semantic vector and the 256-dimensional timing vector are merged into a 1024-dimensional extended feature vector, and the batch normalization is used to scale the feature values after merging to the range of zero mean and unit variance. Finally, the dual-channel feature generation network outputs the updated semantic vectors and timing vectors, and stores them in the semantic feature buffer area and the timing feature buffer area respectively, providing consistent and normalized feature input for directed graph construction and closed-loop dependence detection.
[0053] Based on the timing vector, a directed graph is constructed, the nodes correspond to the process nodes, the direction of the edges is determined by the execution order in the business timing label, and the weight of the edges is determined by the time interval in the business timing label;
[0054] The directed graph is constructed based on the time sequence vector, which means that the information such as the execution order, time interval and dependency direction contained in the time sequence vector of each node is used to generate a graph structure with directional connection relationship between nodes. In the graph, the nodes correspond to the process nodes one by one, and the direction of the edge is determined by the execution order in the business time sequence label, that is, from the node executed first to the node executed later; the weight of the edge is determined by the time interval in the business time sequence label, which can be an absolute time difference, a priority value or a weighted calculation result of the two. The implementation includes: first, parsing the order index in the time sequence vector to establish the sequence relationship between nodes; then, parsing the time interval parameter and assigning it as the weight of the edge; finally, recording the direction and weight of all nodes and edges in the graph data structure. The graph structure is usually stored in the form of adjacency list, adjacency matrix or sparse matrix, so as to facilitate the subsequent closed loop dependency detection and path traversal operation.
[0055] In a specific embodiment, first, the execution order number of each node is extracted from the time sequence vector, and the connection relationship between nodes is established according to the number size, for example, the node with execution order 1 points to the node with execution order 2. Then, the time interval value (unit: second) is read from the time sequence vector as the weight of the edge and directly stored in the graph structure; when the time interval is an interval value, the median of the interval is taken as the edge weight. Next, the data structure of the directed graph is constructed, which is stored in the form of adjacency list, wherein each node contains a list pointing to the subsequent node, and the target node ID and the corresponding edge weight are recorded in the list. Finally, all nodes and their corresponding outgoing edge information are organized into a directed graph object that can be read by the closed loop dependency detection operator to support the subsequent depth first traversal and closed loop detection operation.
[0056] The directed graph is input into the closed loop dependency detection operator, the depth first traversal is performed to record the path node sequence, and the closed loop detection algorithm is used to judge whether the head node and the tail node of the path are consistent at the end of the traversal. If they are consistent, the nodes in the path are identified as nodes with business ring dependency and a unique dependency identifier is generated.
[0057] The directed graph is input into a closed-loop dependency detection operator to identify the business logic loop dependency in the time sequence relationship of the process nodes, thereby providing accurate constraint information for subsequent cluster structure adjustment. The closed-loop dependency detection operator is an operation unit specially used for detecting closed-loop paths in a directed graph structure. The core process thereof is to perform a depth-first traversal (DFS) and record the path node sequence from a starting node to a current node. The depth-first traversal is a graph traversal strategy that explores as deeply as possible along a path and can completely record the node order that can form a closed loop. At the end of the traversal, a closed-loop detection algorithm is used to determine whether the head node and the tail node of the path are consistent. If they are consistent, it indicates that there is a path from a certain node to several nodes and then back to the node, i.e., a closed-loop dependency. The nodes in the path are identified as nodes in the business loop dependency situation, and a unique dependency identifier is generated, so that these nodes can be accurately located and processed as an independent dependency set in subsequent time sequence conflict analysis and layout optimization. The reason for this is that the loop dependency will cause a serious decline in the process expansion and readability if it is not identified in the layout, and the unique dependency identifier can avoid repeated detection and improve the subsequent processing efficiency.
[0058] In a specific embodiment, the directed graph constructed by the time sequence vector is input into a closed-loop dependency detection operator. The operator first initializes an empty path stack and a set of visited nodes. An unvisited starting node is selected as the traversal entrance, and a depth-first traversal is performed. Whenever a new node is entered, it is pushed into the path stack and recorded in the visited set. When a successor node is traversed, if the node already exists in the path stack, the sequence from the node to the top of the path stack constitutes a closed-loop path. The closed-loop detection algorithm checks whether the head node and the tail node ID of the path stack are consistent at the end of each traversal. If they are consistent, all the node IDs in the path stack are marked as loop dependency nodes, and a unique dependency identifier (for example, generated based on the timestamp and the set hash value) is assigned to the set. The final output result is a data structure containing all the loop dependency nodes and their dependency identifiers, which provides an input basis for the subsequent time sequence conflict analysis engine.
[0059] S2, input the node set in the business loop dependency situation into a time sequence conflict analysis engine, combine the semantic vector and the time sequence vector, and use a weighted path consistency verification algorithm to calculate the time sequence conflict index of the loop dependency set to determine the time sequence conflict degree in the node business loop dependency situation, and generate the corresponding conflict description data;
[0060] In this embodiment, S2 specifically includes the following steps:
[0061] S201, input the node set with business ring dependency into a timing conflict analysis engine, call a vector analysis unit in the engine to read semantic vectors and timing vectors of the node set respectively, and perform dimension alignment processing and numerical normalization processing on the semantic vectors and the timing vectors to generate input features that can be calculated in parallel;
[0062] Inputting the node set with business ring dependency into the timing conflict analysis engine refers to inputting the target node set obtained through ring dependency detection into a processing unit specially used for analyzing timing conflicts. In the timing conflict analysis engine, the vector analysis unit is responsible for reading the semantic vectors and timing vectors of each node. The semantic vectors contain high-dimensional representations of the text semantics of the nodes and are usually generated by a semantic vector encoder. The timing vectors contain the execution order, time interval, or priority information of the nodes in the business process and are generated by a timing relationship encoder. Dimension alignment processing refers to unifying the lengths of the semantic vectors and the timing vectors in the numerical dimension so that subsequent algorithms can be fused and calculated in the same feature space. Numerical normalization processing refers to adjusting the value range of the two types of vectors to a unified standardized interval (such as 0 to 1 or -1 to 1) to eliminate the influence of different features in the order of magnitude. The input features generated through these steps are unified data representations that contain both semantic and timing information and can be calculated in parallel in a multi-threaded or GPU environment, thereby accelerating the subsequent path consistency analysis.
[0063] In a specific embodiment, first, the ring dependency node set is transmitted into the timing conflict analysis engine in the form of a node ID list, and the vector analysis unit calls the semantic vector storage area and the timing vector storage area respectively to batch read the corresponding semantic vectors and timing vectors according to the node ID. Then, dimension alignment processing is performed: if the semantic vector is 300-dimensional and the timing vector is 128-dimensional, zeros are added to the end of the timing vector to make it 300-dimensional, ensuring that the lengths of the two are consistent. Next, numerical normalization processing is performed: each vector element is mapped to the [0, 1] interval according to the maximum and minimum normalization formula (x-min) / (max-min). After the above processing is completed, the semantic vectors and the timing vectors of each node are stored in the feature mapping table in the form of key-value pairs. This table supports batch loading into the GPU memory for parallel calculation, thereby providing an input feature data structure that can be directly operated for the weighted path consistency verification algorithm.
[0064] S202, input the input features into the weighted path consistency verification algorithm, construct a directed subgraph of the ring dependency set based on the timing vectors, traverse each ring path in the subgraph in turn, calculate the timing difference and semantic difference of adjacent nodes in the path, and weightedly combine them according to a preset weight coefficient to obtain a path consistency score;
[0065] S203, perform aggregation calculation on the consistency scores of all ring paths to generate a timing conflict index, and generate conflict description data containing conflict path identification, conflict degree value and related node identification according to the timing conflict index, to provide input basis for subsequent adjustment of semantic clustering structure according to the determination result.
[0066] Performing aggregation calculation on the consistency scores of all ring paths to generate a timing conflict index means that after obtaining the path consistency scores of all ring paths, the scores are converted into a global index that can reflect the timing conflict degree of the ring dependency set as a whole by mathematical aggregation method. Aggregation calculation can adopt weighted average, maximum value, minimum value, variance weighting and other ways, and different ways can highlight different conflict characteristics. For example, weighted average can balance the influence of multiple paths, and maximum value can quickly locate the most serious conflict path. The significance of the timing conflict index is to integrate the consistency performance of multiple paths into a numerical value, which is convenient for the subsequent clustering structure adjustment step to uniformly judge the conflict level. According to the timing conflict index, the conflict description data containing the conflict path identification, the conflict degree value and the related node identification can be generated, which can provide accurate positioning reference information when adjusting the semantic clustering structure, so that the adjustment process is not only based on the global conflict degree, but also can directly locate the specific path and node range of the conflict, thereby improving the pertinence and efficiency of layout optimization.
[0067] In one specific embodiment, first, the path score array is taken as input, and weighted average aggregation is performed on all path consistency scores in the array, and the weight is set according to the number of path nodes, so that the path with more nodes has a higher proportion in the conflict index. After calculation, the aggregation result obtained is taken as the timing conflict index, which is compared with the preset conflict level threshold table to determine the conflict level to which the conflict index belongs. Then, several paths with the lowest consistency scores are selected from the path score array, and their path identification and contained node identification are extracted, and the conflict description data is generated in combination with the timing conflict index. The conflict description data is stored in the form of structured record, and the fields include path identification, conflict level value, node identification list and corresponding conflict type mark, which provides accurate input for subsequent adjustment of semantic clustering structure according to the determination result.
[0068] In this embodiment, S202 specifically comprises:
[0069] The input features are sent into the weighted path consistency verification algorithm, the node order value and time interval value contained in the timing vector are used to construct the directed subgraph of the ring dependency set, and the adjacency list structure is used to record the direction and weight between nodes;
[0070] The input features are sent to the weighted path consistency checking algorithm, which means that the semantic vector and the time sequence vector that have completed dimension alignment and numerical normalization are used as input data of the algorithm for subsequent path consistency analysis. In this algorithm, the node order value and the time interval value contained in the time sequence vector are used to construct a directed subgraph of the ring dependency set. The node order value represents the execution order of each node in the business process, and the time interval value represents the execution time difference or waiting time between adjacent nodes. The process of constructing the directed subgraph is to take each node in the ring dependency set as a vertex of the graph, and create directed edges according to the business time sequence relationship. The direction of the edge is determined by the node order value, and the weight of the edge is given by the time interval value. Using the adjacency list structure to record the direction and weight between nodes can be more compact in storage, and can achieve constant level access complexity when traversing, thereby improving the efficiency of subsequent path retrieval and consistency calculation. This structured modeling method ensures that the ring dependency relationship is completely and efficiently represented, providing a data basis for subsequent traversal and consistency calculation.
[0071] In one specific embodiment, the input features are stored in the memory mapping table according to the node ID, and the node order value and the time interval value of the time sequence vector are directly extracted by parsing the feature field. Then an empty adjacency list is initialized, and each node ID corresponds to an ordered list containing the successor node ID and the corresponding time interval value connected to the current node. According to the node order value, the adjacent nodes are sequentially connected by directed edges, and the weight of the edge is set to the corresponding time interval value. If a node has multiple successor nodes, multiple records are added to the adjacency list in turn, each record containing the successor node ID and the weight value. After construction, the adjacency list structure is stored in association with the semantic vector index of the node, so that the weighted path consistency checking algorithm can efficiently access the next node according to the directed edge relationship when traversing, and can directly obtain the corresponding semantic and time sequence information when calculating the path consistency, realizing the integrated processing of data access and calculation.
[0072] In the directed subgraph, each ring path is traversed in the order of the starting point of the ring path, and the time sequence difference value and the semantic difference value are extracted for the adjacent nodes in the path, where the semantic difference value is obtained by cosine similarity calculation, and the time sequence difference value is obtained by time interval difference calculation;
[0073] Traversing each loop path in the directed subgraph in the order of the starting point of the loop path means taking each node in the loop dependency set as a possible starting point, and using the depth-first or backtracking traversal method to search all paths that can form a closed loop. In the traversal process, two types of numerical features need to be extracted for adjacent nodes in the path: one is the time difference value, and the other is the semantic difference value. The meaning of the time difference value is to calculate the difference between the time interval values recorded in the time sequence vector between adjacent nodes to reflect the change in the execution interval of adjacent business activities. The meaning of the semantic difference value is to calculate the similarity between the two vectors by the cosine similarity formula according to the semantic vector of the adjacent nodes, and then use 1-similarity as the difference value to measure the degree of semantic difference. The advantage of cosine similarity calculation is that it can efficiently reflect the similarity of text semantics in high-dimensional vector space, and the time interval difference calculation can capture the small fluctuations in the time sequence relationship. These two types of difference values are the core input of the subsequent weighted synthesis of path consistency scores, and directly determine the calculation result of the time sequence conflict index.
[0074] In a specific embodiment, first, the node with the smallest number in the loop dependency set is taken as the traversal starting point, and the recursive depth-first traversal method is used to visit the subsequent nodes along the directed edge, and the nodes are sequentially pushed into the path stack during the traversal process; when the traversal path returns to the starting node, a closed loop path is formed, and the node order of the path is fixed and recorded. Subsequently, for each pair of adjacent nodes in the path, the corresponding time interval value is extracted from the time sequence vector, and the time difference value is obtained by calculating the difference between the adjacent time intervals; at the same time, the semantic vector of the corresponding node is extracted from the semantic vector storage area, and the semantic similarity of the two semantic vectors is judged by comparing the direction closeness in high-dimensional space, and the similarity degree is converted into a numerical difference to represent the semantic difference value. All time difference values and semantic difference values are arranged in the order of the nodes in the path to form a feature sequence, which will be directly used as the input of the subsequent weighted operation to generate the path consistency score.
[0075] The time difference value and the semantic difference value are linearly weighted according to the preset weight coefficient to output the path consistency score of each loop path and store it in the path score array, providing input data for the time sequence conflict index calculation.
[0076] Linearly weighting and synthesizing the time difference value and the semantic difference value according to a preset weight coefficient refers to, after completing the traversal and feature extraction of the ring path, combining the time difference value and the semantic difference value of all adjacent nodes in each path to form a single path consistency score. The preset weight coefficient is a constant set in advance based on the business scenario and the layout optimization target, and is used to control the relative importance of the time factor and the semantic factor in the consistency evaluation. The meaning of linear weighting and synthesis is to multiply the time difference value and the semantic difference value by the corresponding weight coefficient, and then add the results to generate a value representing the overall consistency of the path. The output path consistency score not only reflects the coordination degree of the nodes in terms of time and semantics, but also quantifies the conflict degree of the ring path. Storing these scores in the path score array can directly call them in the subsequent calculation of the time conflict index, realizing batch processing and fast retrieval of data.
[0077] In one specific embodiment, first, weight coefficients are set for the time difference value and the semantic difference value, for example, in a scenario where the time constraint is more important, the time difference value weight is set to a higher value. Subsequently, the time difference value and the semantic difference value in the feature sequence of each ring path are read in turn, each pair of difference values is multiplied by the corresponding weight coefficient, and the sum of the two values is taken as the contribution value of the node pair to the path consistency. The contribution values of all node pairs in the path are added in turn to obtain the path consistency score of the path. The score is stored in the path score array in the form of a floating-point number and is indexed and sorted according to the starting point number of the path, so that the time conflict index calculation process can quickly read the corresponding path consistency score as needed, thereby realizing efficient conflict analysis and subsequent layout optimization.
[0078] S3, input the conflict description data and the semantic vector into the conflict-aware clustering optimizer, introduce a time conflict penalty term in the clustering objective function, and adjust the cluster boundary of the ring dependency set through a spectral clustering algorithm to adjust the semantic clustering structure according to the determination result;
[0079] In this embodiment, S3 is specifically:
[0080] The conflict description data and the semantic vector are input into the conflict-aware clustering optimizer, field analysis, index alignment and scale unification are performed, the conflict degree value is mapped into a conflict intensity vector, and the corresponding semantic vector is spliced according to the dimension to generate a composite vector;
[0081] The conflict description data and the semantic vector are input into the conflict-aware clustering optimizer to perform field resolution, index alignment and scale unification, so as to realize the structured fusion of two types of features with different sources before clustering calculation. The field resolution refers to the disassembly of the conflict path identifier, the conflict degree value and the related node identifier in the conflict description data according to the field type, and the extraction of the fields related to the clustering target. The index alignment refers to one-to-one matching of the node identifier in the conflict description data and the node index corresponding to the semantic vector, so as to ensure that the data rows and columns completely correspond in the subsequent vector splicing process. The scale unification refers to mapping the value interval of the conflict degree value and the semantic vector to the same dimension through normalization or standardization, so as to avoid that a certain feature dominates the result due to the scale difference in clustering. Mapping the conflict degree value to the conflict intensity vector can convert the original single numerical feature into a multi-dimensional representation that can participate in vector space calculation, facilitate the dimension-by-dimension splicing of the semantic vector to generate a composite vector, and thus reflect the semantic similarity and conflict degree difference in clustering at the same time, improving the ability to distinguish ring dependencies.
[0082] In a specific embodiment, the conflict description data is first read and separated into a conflict path identifier, a conflict degree value and a related node identifier through a structured analysis program. The conflict path identifier is used to record the path correspondence, and the node identifier is hashed matched with the index field of the semantic vector data table to realize the index alignment between nodes. Subsequently, the conflict degree value is mapped to the [0, 1] interval through the min-max normalization method, and then the single value is mapped to the conflict intensity vector containing the amplitude feature and the direction feature through the feature expansion based on the radial basis function. Finally, the conflict intensity vector and the semantic vector of the corresponding node are spliced in the same dimension space to generate a composite vector matrix, providing an input feature basis for the subsequent clustering objective function with a time sequence conflict penalty term.
[0083] The time sequence conflict penalty term is introduced into the clustering objective function, the penalty coefficient is calculated according to the conflict intensity vector, the weight of the similarity matrix is increased or decreased according to the penalty coefficient, and the penalty term is written into the regularization part of the clustering objective function to form a constraint expression;
[0084] A time conflict penalty term is introduced into the clustering objective function, aiming to directly embed the impact of ring dependency conflicts into the clustering optimization process, so that the clustering is not only driven by semantic similarity, but also constrained by conflict degree. The penalty coefficient is calculated according to the conflict intensity vector, which is mapped into an adjustable numerical parameter. This parameter is used to weaken the connection weight between high conflict nodes or enhance the aggregation trend of low conflict nodes in the clustering similarity calculation, so as to change the cluster boundary. The similarity matrix weight is adjusted according to the penalty coefficient, which means that the element value of the semantic similarity matrix is adjusted according to the penalty coefficient, so that the similarity between high conflict nodes is reduced and the similarity between low conflict nodes is moderately improved, so that the spatial distance between high conflict nodes and other nodes in the clustering result can be widened. The penalty term is written into the regularization part of the clustering objective function to form a constraint expression, which adds the conflict penalty as an additional regularization factor to the optimization objective, so that the clustering optimization minimizes the intra-cluster difference while maximizing the satisfaction of the conflict constraint, thereby balancing the semantic consistency and conflict separation in the mathematical optimization process.
[0085] In a specific embodiment, the conflict intensity vector is first converted into a penalty coefficient sequence between 0 and 1 through a linear mapping function, and a corresponding penalty coefficient matrix is generated for each pair of nodes. Then, each element of the original semantic similarity matrix is multiplied by the corresponding element of the penalty coefficient matrix to realize the suppression or enhancement of the weight, generating a weighted similarity matrix that integrates conflict information. Next, the weighted similarity matrix is used to construct the Laplacian matrix of spectral clustering, and a conflict constraint term based on the penalty coefficient is introduced into the regularization term of the clustering objective function, so that the optimization process considers both semantic similarity and conflict separation requirements during feature decomposition and cluster partitioning. In this way, high conflict nodes can be separated into different clusters in the final clustering structure, and low conflict nodes can be preferentially aggregated to form a semantic clustering result that meets the time conflict constraints.
[0086] The spectral clustering algorithm is called to process the composite vector, the feature decomposition is performed on the similarity matrix and the Laplacian matrix, the clustering partitioning is performed based on feature embedding, and the cluster boundary adjustment is performed on the ring dependency set, and the clustering label after adjusting the semantic clustering structure according to the determination result is output.
[0087] The spectral clustering algorithm is called to process the composite vector, so as to realize fine node division through a graph theory method in a multi-dimensional space in which semantic features and conflict features are fused. First, a similarity matrix is calculated based on the composite vector, and each element in the similarity matrix represents the comprehensive similarity of two nodes in the semantic and conflict dimensions. Then, the similarity matrix is converted into a Laplacian matrix, which is a core step of spectral clustering and can preserve the local connection structure of the graph and be used for feature decomposition. The purpose of performing feature decomposition is to map high-dimensional similarity information to a low-dimensional feature embedding space, in which the geometric position can better reflect the clustering potential between nodes. When clustering and division are performed based on the feature embedding, K-means or other clustering algorithms can be used to group the embedding vectors, and the cluster boundary is adjusted according to the conflict penalty term, so that the high-conflict nodes in the ring dependency set are separated in different clusters, thereby eliminating the problems of layout overlap and dependency folding in the structure. Finally, the adjusted clustering labels are output, providing clear structural guidance for subsequent layout generation.
[0088] In a specific embodiment, first, a cosine similarity matrix is calculated using the composite vector, and a weighted similarity matrix is obtained by combining the penalty coefficient matrix generated in the previous step. The weighted similarity matrix is converted into a standardized Laplacian matrix, and the feature vectors corresponding to the first k smallest eigenvalues are extracted through feature decomposition to form a low-dimensional feature embedding matrix. Then, the K-means clustering algorithm is used to divide the node groups in the feature embedding matrix, and the distribution of the ring dependency set in the clustering result is detected. For high-conflict nodes that are still clustered in the same cluster, a cluster boundary adjustment process is performed to pull apart the graph distance between nodes by reallocating edge nodes to adjacent clusters. Finally, an adjusted clustering label list is generated, so that the layout engine can generate a flowchart layout that meets the timing conflict constraints in subsequent steps according to the label.
[0089] S4, input the adjusted semantic clustering structure into the topology expansion layout generator, combine the conflict description data and the cluster structure, and use multi-objective force-directed optimization and nonlinear Manhattan distance control to calculate the expansion path and node spacing of the ring dependency set;
[0090] In this embodiment, S4 is specifically:
[0091] The adjusted semantic clustering structure and the conflict description data are structurally merged to form a layout input matrix containing cluster structure, conflict path identification and conflict degree value, and path indices are established for the nodes in the ring dependency set based on the cluster structure to ensure the continuity of the expansion path;
[0092] The core of this process is to fuse the semantic clustering structure that has been adjusted with the conflict description data to construct a layout input matrix that can reflect both semantic relationships and timing conflict characteristics. The semantic clustering structure contains cluster structure information, which describes the semantic affiliation of nodes; the conflict description data contains conflict path identifiers and conflict degree values, which reflect the conflict position and severity of the ring dependency path. Structure merging can establish a one-to-one correspondence between conflict path identifiers and corresponding node cluster structures through field alignment and key value mapping, and fill the conflict degree values into the corresponding matrix cells, thereby forming a multi-dimensional matrix that can both preserve cluster division information and express conflict characteristics. In order to ensure the integrity of the ring dependency path during the subsequent topology expansion process, a path index needs to be established for each node in the ring dependency set based on the cluster structure. The path index records the sequential position of the node in the ring dependency, which is used to maintain path continuity and avoid incorrect splitting or misalignment of nodes during the layout process.
[0093] In implementation, the semantic clustering structure file and the conflict description data file can be first read by the data parsing module, and the two types of data are matched according to the node unique identifier, and the matching results are stored in a two-dimensional array structure in the memory, which is the layout input matrix. When generating the layout input matrix, the cluster number, conflict path identifier and conflict degree value of each node are mapped to different dimensions of the matrix, so that the rows of the matrix represent nodes, and the columns represent semantic cluster numbers, path numbers and conflict weights. Subsequently, by traversing the cluster structure data, a path index number is generated for each node in the order of the ring dependency path, and the index number is appended to the attribute set of the corresponding node in the matrix. The layout input matrix generated in this way not only integrates semantic and conflict information at the numerical level, but also pre-establishes logical sequence constraints for the ring dependency path at the structural level, ensuring the continuity and accuracy of the path structure during subsequent layout generation.
[0094] The layout input matrix and the cluster structure are input into the multi-objective force-directed optimization calculation unit to construct a multi-objective optimization function that includes node repulsive components, inter-cluster attractive components and conflict path tension components. The node position vector is updated through iterative calculation to form a preliminary expansion path of the ring dependency set in the layout plane.
[0095] The core of this process is to consider the semantic clustering structure, the node physical layout characteristics and the conflict characteristics of the circular dependency path at the same time in the layout stage, and to realize the preliminary expansion of the circular dependency set through multi-objective force-directed optimization operation. The layout input matrix contains the cluster attribution information, the conflict path identification and the conflict degree value of the nodes, and the cluster structure provides the grouping relationship of the nodes in the semantic space. In the construction of the multi-objective optimization function, the repulsive force component of the nodes is used to maintain the minimum distance between the nodes to avoid overlapping; the attractive force component between clusters is used to maintain the relative concentration of the nodes in the same cluster to ensure the semantic correlation; and the tension component of the conflict path is used to apply stretching force in the direction of the circular dependency path to enhance the expansion effect of the circular dependency. The three types of force components are combined through weighted combination to form the optimization function, and the node position vector is updated through iteration to balance the aesthetics, semantic consistency and path readability of the layout.
[0096] In specific implementation, the layout input matrix and the cluster structure can be input into the multi-objective force-directed optimization operation unit together, and the node position is initialized as random distribution or initial coordinates based on the cluster center. The operation unit first calculates the repulsive force value between the nodes according to the layout input matrix, generates the repulsive force vector by using the Euclidean distance and the node distance constraint; then calculates the attractive force value between clusters according to the cluster structure, and pulls the nodes in the same cluster to the position of the cluster center; finally, the conflict path tension is calculated by using the conflict path identification and the conflict degree value, and an additional displacement trend is applied in the direction of the circular dependency path to promote the path expansion. The three force components are combined through weighted fusion to generate the total force vector of the nodes in each iteration, and the two-dimensional position coordinates of the nodes are updated. The iteration process continues until the node displacement change is lower than the set threshold, and the preliminary expansion layout of the circular dependency set is obtained, which lays a foundation for subsequent path distance optimization.
[0097] On the basis of the multi-objective force-directed optimization operation result, nonlinear Manhattan distance control is introduced, the horizontal and vertical distances between adjacent nodes of the circular dependency set are calculated based on the node position vector, and coordinate redistribution operation is performed on the node pairs whose distance is less than the minimum distinguishable distance threshold, to generate the expanded path and node distance of the circular dependency set that meet the distance constraint.
[0098] The core of this process is to further improve the node spacing and path expansion effect of the ring dependency set through nonlinear Manhattan distance control based on the result of multi-objective force-directed optimization operation. Although multi-objective force-directed optimization can achieve overall layout aesthetics and semantic consistency, in local areas, especially between adjacent nodes of ring dependency paths, there may still be cases of too small horizontal or vertical spacing, which affects legibility. Nonlinear Manhattan distance control can accurately identify overly compact node pairs by calculating the horizontal and vertical spacing of adjacent nodes based on node position vectors and comparing them with the minimum legibility distance threshold. For node pairs that do not meet the spacing requirements, coordinate redistribution operations are used to adjust the position in the horizontal or vertical direction by a nonlinear proportion while maintaining the path order and overall layout structure, thereby generating an expanded path and node spacing that meets the distance constraints and ensures visual clarity and readability of the path.
[0099] In specific implementation, the horizontal and vertical spacing of each pair of adjacent nodes can be calculated in order of ring dependency paths using node position vectors, and the two values are compared with the preset minimum legibility distance threshold to mark the node pairs with insufficient spacing. For marked node pairs, the horizontal or vertical coordinate is adjusted first according to the path direction, and the displacement value is calculated through a nonlinear proportion factor, so that the distance adjustment amount and the difference between the original spacing are in a nonlinear increasing relationship, to avoid large-scale displacement in dense areas and damage the overall stability of the layout. The path order index is maintained during the adjustment process to ensure that the order of the ring dependency path does not change after the node position adjustment. After the adjustment is completed, a new node position vector is generated and used as the final output of the ring dependency set expansion path and node spacing that meets the distance constraints.
[0100] S5, after layout generation, the visibility change of ring dependency is monitored by a timing conflict significance dynamic regulator, and the node position, wire transparency, flow direction marker and color gradient are adjusted according to the prediction model.
[0101] In this embodiment, S5 is specifically:
[0102] The node position, wire path and ring dependency path identifier generated by the layout are input into the timing conflict significance dynamic regulator, the visibility index of ring dependency in the layout plane is calculated using the node position vector and the wire geometry, and the visibility index is continuously sampled based on a time window to monitor the visibility change of ring dependency.
[0103] The core of this process is to input the node position, connection path and ring dependency path identification generated by the layout into the timing conflict significance dynamic regulator, so as to calculate the visibility index of ring dependency in the layout plane. The node position vector is used to accurately describe the coordinate position of each node in the two-dimensional layout plane, and the connection geometry includes curve control point, edge length, fold point coordinate and other information, which is used to judge the presentation characteristics of the path in the view. The calculation of the visibility index can be realized by path occlusion detection, node overlap detection and visual saliency weighting, so as to quantify the difficulty of quickly identifying a ring dependency in the current layout by the user. The purpose of continuous sampling based on time window is to capture the change trend of visibility with time in the dynamic layout process, so as to find out the sudden visibility decline problem caused by node position change or connection redraw, and to provide accurate input data for subsequent prediction and adjustment.
[0104] In specific implementation, first, the node position vector and connection geometry data are mapped to the standardized layout coordinate system, and the nodes and connections involved in the ring dependency path are quickly located through the spatial index structure. Then, the occlusion detection based on ray scanning is performed for each ring path to judge whether the nodes and connections are occluded by other elements, and the potential overlap is detected by calculating the minimum Euclidean distance and angle relationship between nodes. Subsequently, the visual saliency score is calculated by combining the node size, connection thickness and color contrast, and the above multiple indexes are combined into the overall visibility index according to the weight. In the sampling process, the visibility index is recalculated every fixed time interval, and the result is stored as time series data, so as to analyze and utilize the visibility change trend in the dynamic regulation link.
[0105] The visibility change data and ring dependency path identification are input into the prediction model, combined with the semantic vector, timing vector and conflict description data of the node, and the pattern recognition algorithm and regression analysis method are used to predict the visibility decline area that may appear in the subsequent layout rendering process, and to generate the adjustment instruction set including node position adjustment amount, connection transparency adjustment value, flow direction mark rendering priority and color gradient parameter;
[0106] The core of this process is to input the visibility change data and the ring dependency path identification into the prediction model, and combine it with the semantic vector, the time sequence vector and the conflict description data of the node, so as to predict the potential visibility drop area in advance before the layout rendering. The visibility change data reflects the visibility fluctuation trend of the ring dependency path in the time dimension, the ring dependency path identification is used to lock the specific range of the analysis object, the semantic vector and the time sequence vector provide the logical and sequential characteristics between nodes, and the conflict description data reveals the time sequence conflict strength in the path. The prediction model can detect the feature patterns in the historical visibility change through pattern recognition algorithm, and quantify the correlation between these patterns and the future visibility drop by using regression analysis method. The purpose of this is to actively identify the possible visibility problem area, so as to provide the basis for generating accurate adjustment instruction set, which includes node position adjustment amount, line transparency adjustment value, flow direction mark rendering priority and color gradient parameter, to ensure that the layout rendering stage can be optimized in a targeted manner.
[0107] In specific implementation, first, the visibility change data, ring dependency path identification, semantic vector, time sequence vector and conflict description data are mapped to a unified feature space and normalized to eliminate the dimensional differences between different features. Then, these features are input into the hybrid prediction model of fusion pattern recognition and regression analysis. The model can use deep convolution network to extract the time sequence pattern in the visibility change, and then calculate the visibility drop probability and influence range of the specific area in the future through gradient boosting regression tree. The prediction output result will mark the possible low visibility area, and generate the adjustment instruction set based on this. In the generation process, the node position adjustment amount is calculated according to the predicted spatial congestion degree, the line transparency adjustment value is allocated according to the importance of the path in the visual hierarchy, the flow direction mark rendering priority is determined by the path identification weight, and the color gradient parameter is set according to the logical importance and visibility target between nodes, so as to ensure that the visibility performance can be dynamically optimized in the subsequent layout rendering stage.
[0108] The adjustment instruction set is input into the layout rendering engine, the node position is executed micro displacement operation according to the node position adjustment amount, the line is executed transparency gradient rendering according to the line transparency adjustment value, the key path direction mark is drawn according to the flow direction mark rendering priority, and the color gradient rendering is executed on the paths with different conflict degrees according to the color gradient parameter to complete the dynamic regulation and control.
[0109] The core of this process is to input the adjustment instruction set into the layout rendering engine during the layout rendering stage, and to fine-tune the nodes, connections and paths according to different parameters to ensure the recognizability and hierarchy of the ring dependence in visual presentation. The node position adjustment amount is used for micro-displacement operation before rendering, which reduces overlap and congestion by slightly adjusting the node coordinates in the layout plane; the connection transparency adjustment value is used to realize transparency gradient rendering to weaken visual interference and highlight the key path; the flow direction mark rendering priority is used to control the drawing order of the direction mark, so that the key path is presented first in the visual hierarchy; the color gradient parameter is used to allocate color changes according to the conflict degree of the path, so that the path with high conflict intensity is more eye-catching in vision. This way can improve the readability and information carrying capacity of the layout without destroying the overall layout structure, while ensuring that the rendering effect is consistent with the timing conflict analysis result.
[0110] In specific implementation, first, the node position adjustment amount in the adjustment instruction set is mapped to a two-dimensional coordinate offset vector, and the plane position of the node is updated in real time in the rendering loop through interpolation algorithm; then the connection transparency adjustment value is applied to the material transparency parameter in the rendering pipeline, and the transparency change effect from the starting point to the ending point is generated through the gradient function to highlight or weaken the specific path; the flow direction mark rendering priority is used as a weight parameter in the rendering sorting queue, so that the flow direction mark with high priority covers the low priority mark in the rendering buffer; the color gradient parameter is calculated in the path vertex shading stage, and the color interpolation is used to generate smooth transition from low conflict color to high conflict color, so as to realize color gradient rendering based on conflict degree. The whole process is dynamically updated in the rendering engine in frame unit, so that the layout always maintains the best visibility and conflict expression effect during interaction or animation playing.
[0111] The above-described embodiments can be implemented in part or in whole through software, hardware, firmware or any combination thereof. When implemented in software, the above-described embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When loaded and executed by a computer, the computer instructions or computer programs cause the computer to perform all or part of the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.
[0112] It should be understood that the size of the sequence number of each process described above in various embodiments of the present application does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0113] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0114] In several embodiments provided in the present application, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described embodiments are only illustrative, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0115] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0116] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0117] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for automatic layout of flowcharts with semantic analysis, characterized in that, Specifically comprising the following steps: S1, collect the text information and business time sequence labels of all nodes in the flowchart, generate semantic vectors and time sequence vectors through a double-channel feature generation network composed of a semantic vector encoder and a time sequence relationship encoder, and perform deep-first traversal and closed loop detection in a directed graph composed of the time sequence vectors using a closed loop dependence detection operator to identify whether there is a business ring dependence situation for the nodes; S2, input the node set with the business ring dependence situation into a time sequence conflict analysis engine, combine the semantic vectors and the time sequence vectors, calculate the time sequence conflict index of the ring dependence set using a weighted path consistency verification algorithm to determine the time sequence conflict degree under the condition that the nodes have a business ring dependence situation, and generate corresponding conflict description data; S2 specifically comprises the following steps: S201, input the node set with the business ring dependence situation into the time sequence conflict analysis engine, call the vector analysis unit in the engine to read the semantic vectors and the time sequence vectors of the node set respectively, and perform dimension alignment processing and numerical normalization processing on the semantic vectors and the time sequence vectors to generate input features that can be calculated in parallel; S202, send the input features into the weighted path consistency verification algorithm, construct a directed subgraph of the ring dependence set based on the time sequence vectors, traverse each ring path in the subgraph in turn, calculate the time sequence difference value and the semantic difference value of adjacent nodes in the path, and weight and combine them according to the preset weight coefficient to obtain the path consistency score; S202 specifically comprises: Send the input features into the weighted path consistency verification algorithm, construct a directed subgraph of the ring dependence set using the node order value and the time interval value contained in the time sequence vectors, and record the direction and weight between nodes using an adjacency list structure; Traverse each ring path in the directed subgraph in turn according to the starting point order of the ring path, extract the time sequence difference value and the semantic difference value for adjacent nodes in the path, wherein the semantic difference value is obtained by cosine similarity calculation, and the time sequence difference value is obtained by time interval difference calculation; Linearly weight and combine the time sequence difference value and the semantic difference value according to the preset weight coefficient, output the path consistency score of each ring path and store it in the path score array to provide input data for the time sequence conflict index calculation; S203, perform aggregation calculation on the consistency scores of all ring paths to generate the time sequence conflict index, generate the conflict description data containing the conflict path identifier, the conflict degree value and the related node identifier according to the time sequence conflict index, and provide input basis for adjusting the semantic clustering structure according to the determination result; S3, input the conflict description data and the semantic vectors into the conflict-aware clustering optimizer, introduce a time sequence conflict penalty term into the clustering objective function, and adjust the cluster boundary of the ring dependence set through the spectral clustering algorithm to adjust the semantic clustering structure according to the determination result; S4, input the adjusted semantic clustering structure into the topology unfolding layout generator, combine the conflict description data and the cluster structure, and calculate the unfolding path and the node spacing of the ring dependence set using multi-objective force-directed optimization and nonlinear Manhattan distance control; S5, the visibility change of the ring-shaped dependence is monitored by a timing conflict saliency dynamic regulator after the layout is generated, and the node position, wire transparency, flow direction mark and color gradient are adjusted according to the prediction model.
2. The flow graph automatic layout method with fusion semantic analysis according to claim 1, characterized in that, S1 is specifically: Text information and business timing labels of all nodes in the flowchart are collected, the text information is input into a semantic vector encoder, semantic vectors are generated through word segmentation processing, word vector mapping and context attention calculation, the business timing labels are input into a timing relationship encoder, timing vectors are generated through position encoding, relationship matrix construction and self-attention calculation; The semantic vectors and timing vectors are synchronously processed in a double-channel feature generation network, and the semantic vectors and timing vectors of each node are output through vector splicing and normalization; A directed graph is constructed based on the timing vectors, the nodes correspond to the flow nodes, the direction of the edges is determined by the execution order in the business timing label, and the weight of the edges is determined by the time interval in the business timing label; The directed graph is input into a closed-loop dependence detection operator, a depth-first traversal is performed to record the path node sequence, and at the end of the traversal, a closed-loop detection algorithm is used to determine whether the head node and the tail node are consistent, if they are consistent, the nodes in the path are identified as nodes with business ring-shaped dependence and a unique dependence identifier is generated.
3. The flow graph automatic layout method with fusion semantic analysis according to claim 1, wherein, S3 is specifically: The conflict description data and the semantic vectors are input into a conflict perception clustering optimizer, field analysis, index alignment and scale unification are performed, the conflict degree value is mapped into a conflict intensity vector, and the composite vector is generated by splicing the conflict intensity vector and the corresponding semantic vector according to the dimension; A timing conflict penalty term is introduced into the clustering objective function, the penalty coefficient is calculated according to the conflict intensity vector, the weight of the similarity matrix is changed by the penalty coefficient, and the penalty term is written into the regular part of the clustering objective function to form a constraint expression; The composite vector is processed by calling a spectral clustering algorithm, the feature decomposition of the similarity matrix and the Laplacian matrix is performed, the clustering division is performed based on the feature embedding, the cluster boundary adjustment is performed on the ring-shaped dependence set, and the clustering label after adjusting the semantic clustering structure according to the determination result is output.
4. The flow graph automatic layout method with fusion semantic analysis according to claim 1, wherein, S4 is specifically: The adjusted semantic clustering structure and the conflict description data are structurally merged to form a layout input matrix containing cluster structure, conflict path identifier and conflict degree value, and path index is established for the nodes of the ring-shaped dependence set according to the cluster structure to ensure the continuity of the unfolded path; The layout input matrix and the cluster structure are input into a multi-objective force-directed optimization operation unit, a multi-objective optimization function containing node repulsive force component, inter-cluster attractive force component and conflict path tension component is constructed, and the node position vector is updated through iterative calculation to form a preliminary unfolded path of the ring-shaped dependence set in the layout plane; On the basis of the multi-objective force-directed optimization operation result, a nonlinear Manhattan distance control is introduced, the horizontal and vertical distances between adjacent nodes of the ring-shaped dependence set are calculated based on the node position vector, and coordinate redistribution operation is performed on the node pairs with a distance less than the minimum distinguishable distance threshold to generate the ring-shaped dependence set unfolding path and node distance meeting the distance constraint.
5. The flow graph automatic layout method with fusion semantic analysis according to claim 1, wherein, S5 is specifically: The node position, connection path and ring dependency path identification generated by the layout are input into the time sequence conflict dynamic regulation device, the visibility index of the ring dependency in the layout plane is calculated by using the node position vector and the connection geometry, and the visibility index is continuously sampled based on the time window to monitor the visibility change of the ring dependency; The visibility change data and the ring dependency path identification are input into the prediction model, the node semantic vector, the time sequence vector and the conflict description data are combined, the pattern recognition algorithm and the regression analysis method are used to predict the visibility decline area that may appear in the subsequent layout rendering process, and an adjustment instruction set containing the node position adjustment amount, the connection transparency adjustment value, the flow direction mark rendering priority and the color gradient parameter is generated; The adjustment instruction set is input into the layout rendering engine, the node position is subjected to micro-displacement operation according to the node position adjustment amount, the connection is subjected to transparency gradient rendering according to the connection transparency adjustment value, the key path direction identification is drawn according to the flow direction mark rendering priority, and the color gradient rendering is performed on the paths with different conflict degrees according to the color gradient parameter to complete the dynamic regulation.
Citation Information
Patent Citations
Digital twin substation spatial layout method fusing multi-dimensional semantic information
CN116384020A
Intelligent counter semantic interaction system based on knowledge graph
CN120162449A