Search

CN-121257049-B - Operation analysis method and system for CAD (computer aided design) path finding algorithm connecting program

CN121257049BCN 121257049 BCN121257049 BCN 121257049BCN-121257049-B

Abstract

The invention discloses an operation analysis method and system for a CAD road finding algorithm connecting program, which belong to the technical field of program operation analysis and comprise the steps of constructing a static complexity scoring function, optimally setting initial working parameters of the CAD road finding algorithm connecting program based on static complexity scoring of a target execution file, constructing an operation pressure scoring function, determining a first execution path of the CAD road finding algorithm connecting program, executing working parameter optimization adjustment of the CAD road finding algorithm connecting program according to a preset parameter adjustment sequence, and determining a second execution path of the CAD road finding algorithm connecting program. The invention ensures that the routing connection program can keep stable and efficient execution state under the drawings with different complexity, improves the accuracy and drawing efficiency of wiring results, effectively balances the occupation of system resources and the response speed of the program, and ensures that the connection operation in complex design tasks is smoother and more reliable.

Inventors

  • HUANG ZHIXUAN
  • LIU ZHIGANG

Assignees

  • 珠海奥图创科技有限公司

Dates

Publication Date
20260505
Application Date
20250919

Claims (10)

  1. 1. The running analysis method for the CAD routing algorithm connecting program is characterized by comprising the following steps of: Recording a CAD file to be executed with the CAD routing algorithm connecting program as a target execution file, constructing a static complexity scoring function, outputting the static complexity score of the target execution file, and optimally setting initial working parameters of the CAD routing algorithm connecting program based on the static complexity score of the target execution file before executing the CAD routing algorithm connecting program; executing a CAD (computer aided design) path finding algorithm connecting program based on initial working parameters of the CAD path finding algorithm connecting program, monitoring the running pressure of the CAD path finding algorithm connecting program in real time in the executing process, constructing a running pressure scoring function, and outputting a running pressure score, thereby determining a first executing path of the CAD path finding algorithm connecting program; When the first execution path of the CAD routing algorithm connecting program is the execution of the optimization adjustment of the working parameters, the optimization adjustment of the working parameters of the CAD routing algorithm connecting program is executed according to the preset parameter adjustment sequence, and the adjustment effect analysis is carried out after each optimization adjustment is completed, so that the second execution path of the CAD routing algorithm connecting program is determined.
  2. 2. The operation analysis method for CAD routing algorithm connection program according to claim 1, wherein the step of constructing a static complexity scoring function and outputting a static complexity score of the target execution file comprises the following steps: Comparing the number of the image blocks, the total number of the image elements, the number of the main lines and the number of the endpoints with corresponding reference values respectively, introducing complexity allocation coefficients to carry out weighted coupling processing on comparison processing results, and carrying out coupling processing on the weighted coupling processing results by combining the image element type weights, thereby constructing a static complexity scoring function; Acquiring the number of blocks, the total number of primitives, the number of main lines, the number of endpoints and the primitive type weight of a target execution file, and inputting the number of blocks, the total number of primitives, the number of endpoints and the primitive type weight as input data into a static complexity scoring function, so as to output the static complexity score of the target execution file; The static complexity score of the target execution file is the quantitative representation of the complexity of the target execution file, which is jointly performed by the number of blocks, the total number of primitives, the number of main lines, the number of endpoints and the primitive type weight.
  3. 3. The operation analysis method for CAD routing algorithm connection program according to claim 2, wherein the initial working parameters of the CAD routing algorithm connection program are set based on the static complexity score optimization of the target execution file, and the specific analysis process is as follows: Inquiring a history cache by taking the static complexity score of the target execution file as an inquiring key, and taking the working parameter corresponding to the static complexity score of the target execution file stored in the history cache as the initial working parameter of the CAD routing algorithm connecting program if the history cache exists; if the history cache does not exist, taking the static complexity score of the target execution file as a query key, querying working parameters from a static complexity score-working parameter setting matching table, and recording the working parameters as initial working parameters of a CAD routing algorithm connecting program; The initial working parameters of the CAD routing algorithm connecting program comprise an orthogonal algorithm initial working parameter and a Di Jie Style algorithm initial working parameter; the initial working parameters of the orthogonal algorithm comprise path merging tolerance and batch drawing element number of the orthogonal algorithm; the initial operating parameters of the Di-Jie-St-Lag algorithm comprise the graph refreshing interval, the path merging tolerance and the number of batch drawing elements of the Di-Jie-St-Lag algorithm.
  4. 4. The operation analysis method for CAD routing algorithm connection program according to claim 3, wherein the CAD routing algorithm connection program is executed based on initial operating parameters of the CAD routing algorithm connection program, and the specific execution process is as follows: a1, analyzing each graphic element of a target execution file and constructing a connection relation graph; a2, generating an orthogonal path based on an orthogonal connection algorithm, ensuring that the connection lines accord with a horizontal-vertical broken line rule, automatically avoiding obstacles, and staggering overlapped connection; a3, searching a shortest path in the constructed connection relation diagram based on a Dijiestra algorithm, and selecting an optimal path according to a preset rule; And A4, converting the generated optimal path into a graphic element which can be drawn by CAD, thereby drawing the optimal path into a drawing.
  5. 5. The operation analysis method for CAD routing algorithm connection program according to claim 1, wherein the construction of the operation pressure scoring function and the output of the operation pressure score comprise the following steps: comparing the single-frame drawing updating time consumption, the single-frame primitive number and the UI thread blocking time length with corresponding reference values respectively, and introducing a pressure distribution factor to couple the comparison processing results, thereby constructing an operation pressure scoring function; acquiring single-frame drawing updating time consumption, single-frame primitive number and UI thread blocking time length of a target execution file according to a preset monitoring period, and inputting the single-frame drawing updating time consumption, the single-frame primitive number and the UI thread blocking time length as input data into a running pressure scoring function so as to output a running pressure score; and the operation pressure score is a quantitative basis for the influence degree of single-frame drawing update time consumption, single-frame primitive number and UI thread blocking duration on the CAD routing algorithm line program operation pressure.
  6. 6. The method for analyzing the operation of the CAD routing algorithm wiring program according to claim 5, wherein the determining the first execution path of the CAD routing algorithm wiring program comprises the following specific analysis process: extracting an ideal running pressure scoring interval preset in a database; If the running pressure score is in the ideal running pressure score interval, marking a first execution path of the CAD routing algorithm connecting line program as a routing connecting line of the continuous target execution file; if the running pressure score is not in the ideal running pressure score interval, marking a first execution path of the CAD routing algorithm connecting program as executing the optimization adjustment of the working parameters, and analyzing the optimization adjustment direction information of the working parameters, wherein the specific process is as follows: If the operating pressure score is lower than the lower limit value of the operating pressure score ideal interval, marking the information of the optimal adjustment direction of the working parameters as high-efficiency adjustment; and if the operating pressure score is higher than the upper limit value of the operating pressure score ideal interval, marking the information of the operating parameter optimization adjustment direction as low-load adjustment.
  7. 7. The operation analysis method for CAD routing algorithm wiring program according to claim 1, wherein the operation parameter optimization adjustment of the CAD routing algorithm wiring program is performed in a preset parameter adjustment sequence, and the specific analysis process is as follows: when high-efficiency adjustment is performed, performing difference processing on the lower limit value of the ideal interval of the running pressure score and the running pressure score to obtain a first running pressure score deviation value; when the low load is regulated, performing difference processing on the operating pressure score and the upper limit value of the operating pressure score ideal interval to obtain a second operating pressure score deviation value; taking the first operating pressure scoring deviation value or the second operating pressure scoring deviation value as a query key value, and querying from the operating pressure scoring deviation-operating parameter adjustment matching table to obtain an operating parameter optimization adjustment set; The working parameter optimization adjustment set comprises an orthogonal algorithm working parameter optimization adjustment set and a Di Jie St Law algorithm working parameter optimization adjustment set; the orthogonal algorithm working parameter optimization adjustment set comprises a batch drawing element quantity optimization adjustment value, a path merging tolerance optimization adjustment value and an algorithm rollback threshold optimization adjustment value of an orthogonal algorithm; The Di-Jie-St algorithm working parameter optimization adjustment set comprises a lot drawing element number optimization adjustment value, a path merging tolerance optimization adjustment value, a graph refreshing interval optimization adjustment value and an algorithm rollback threshold optimization adjustment value of the Di-Jie-St algorithm; and executing the working parameter optimization adjustment of the CAD routing algorithm connecting program based on the working parameter optimization adjustment set according to a preset parameter adjustment sequence.
  8. 8. The method for analyzing the operation of the CAD routing algorithm wiring program according to claim 1, wherein the adjusting effect analysis is performed after each optimization adjustment is completed, thereby determining a second execution path of the CAD routing algorithm wiring program, and the specific analysis process is as follows: Taking the first operating pressure scoring deviation value or the second operating pressure scoring deviation value as a query key value, querying from an operating pressure scoring deviation-monitoring duration matching table to obtain a monitoring duration, and querying from the operating pressure scoring deviation-ideal optimizing effect matching table to obtain an operating pressure scoring ideal change interval; re-analyzing to obtain an operating pressure score based on the monitoring time length, and marking the operating pressure score as a first operating pressure score; If the first running pressure score is smaller than the running pressure score after low-load adjustment or is larger than the running pressure score during high-efficiency adjustment, marking a second execution path of the CAD routing algorithm connecting program as a rollback mechanism entering instruction, and synchronously generating early warning prompt information; If the first operating pressure score is not less than the operating pressure score after low load adjustment or is not greater than the operating pressure score during high efficiency adjustment, a third operating pressure score deviation value is obtained; if the third running pressure scoring deviation value is not in the running pressure scoring ideal change interval, marking a second execution path of the CAD routing algorithm connecting line program as executing slight fine adjustment; If the third running pressure scoring deviation value is in the ideal running pressure scoring change interval, the second execution path of the CAD routing algorithm connecting line program is recorded to generate an adjustment completion signal, the current working parameter setting is recorded, and the configuration cache is written.
  9. 9. The method for analyzing the operation of the CAD routing algorithm wiring program according to claim 8, wherein the performing of the light fine-tuning is specifically performed as follows: if the third operating pressure scoring deviation value is smaller than the lower limit value of the operating pressure scoring ideal change interval, subtracting the third operating pressure scoring deviation value from the lower limit value of the operating pressure scoring ideal change interval to obtain a first regulating effect characterization factor; For high efficiency adjustment, querying a batch drawing element number supplemental adjustment value set with a first adjustment effect characterization factor, thereby performing a light fine adjustment; the batch drawing element quantity regulating value set comprises a batch drawing element quantity supplementing regulating value of an orthogonal algorithm and a batch drawing element quantity supplementing regulating value of a Dijiestra algorithm; For low load adjustment, querying a batch drawing element quantity reduction adjustment value set with a second adjustment effect characterization factor as a query key value, thereby performing a light fine adjustment; the batch drawing element number adjustment value set comprises a batch drawing element number reduction adjustment value of an orthogonal algorithm and a batch drawing element number reduction adjustment value of a Dijiestra algorithm; if the third operating pressure scoring deviation value is larger than the upper limit value of the operating pressure scoring ideal change interval, subtracting the upper limit value of the operating pressure scoring ideal change interval from the third operating pressure scoring deviation value to obtain a second regulating effect characterization factor; For high-efficiency adjustment, querying a batch drawing element quantity reduction adjustment value set by taking a second adjustment effect characterization factor as a query key value, thereby performing light fine adjustment; For low load adjustments, the set of adjustment values is supplemented by the number of query batch drawing elements with the second adjustment effect characterization factor as a query key value, thereby performing a light fine adjustment.
  10. 10. An operation analysis system for a CAD routing algorithm wiring program for implementing the operation analysis method for a CAD routing algorithm wiring program according to any one of claims 1 to 9, wherein the system comprises an initial operation parameter optimization setting module, a first execution path determining module, and a second execution path determining module; The initial working parameter optimization setting module is used for marking a CAD file which is to be executed with the CAD routing algorithm connecting program as a target execution file, constructing a static complexity scoring function, outputting the static complexity score of the target execution file, and optimally setting the initial working parameter of the CAD routing algorithm connecting program based on the static complexity score of the target execution file before executing the CAD routing algorithm connecting program; The first execution path determining module is used for executing the CAD routing algorithm connecting program based on the initial working parameters of the CAD routing algorithm connecting program, monitoring the running pressure of the CAD routing algorithm connecting program in real time in the execution process, constructing a running pressure scoring function, outputting a running pressure score, and determining a first execution path of the CAD routing algorithm connecting program; and the second execution path determining module is used for executing the working parameter optimization adjustment of the CAD routing algorithm connecting program according to the preset parameter adjustment sequence when the first execution path of the CAD routing algorithm connecting program is the execution of the working parameter optimization adjustment, and carrying out adjustment effect analysis after each optimization adjustment is completed, so as to determine the second execution path of the CAD routing algorithm connecting program.

Description

Operation analysis method and system for CAD (computer aided design) path finding algorithm connecting program Technical Field The invention relates to the technical field of program operation analysis, in particular to an operation analysis method and system for a CAD routing algorithm connecting program. Background At present, CAD software is widely used for path layout and equipment connection in the scenes of industrial design, electric power construction drawing, intelligent wiring, building mechanical and electrical integration and the like. In order to improve drawing efficiency and path rationality, more and more systems in recent years integrate an automatic path-finding algorithm to assist in wiring design of drawings. The system not only needs to accurately generate the connection path, but also needs to ensure the response fluency and interface stability of the system in the graphic processing process, so that the analysis and regulation of the running state of the system become key research directions gradually. In the execution process of the wiring program, the operation analysis mainly focuses on the parameters such as the calculation amount, the iteration times, the memory occupation, the path feasibility judgment and the like of path searching. The existing analysis method generally establishes operation performance indexes by recording data such as node expansion condition, path search time, wiring success rate and the like in the path searching process, thereby providing reference basis for algorithm optimization and wiring quality evaluation. A program static analysis method and system based on LLVM disclosed in Chinese patent with bulletin number of CN 119883861B comprises converting source file into LLVMIR file with active level debugging information, traversing LLVMIR file module, function, basic block and instruction to obtain static tracking information of objective function, constructing LLVMIR basic block level control flow graph of file, labeling related information, identifying and labeling circulation information when traversing path to obtain circulation annotation execution path, replacing basic block in execution path with corresponding memory access information to generate circulation annotation static memory tracking, and calculating memory access reuse distance distribution by recursion algorithm based on circulation annotation static memory tracking. For example, the chinese patent publication number CN114207594B discloses a static analysis and runtime analysis of a computer program system, including identifying static dependencies between ecosystem elements, including computer programs and data resources associated with the computer programs, based on values of parameters in a parameter set associated with the ecosystem. The method includes performing runtime analysis of the ecosystem, including identifying elements utilized during execution of the ecosystem to process the data records. The method includes performing a scheduling analysis of the ecosystem, including identifying a computer program having a scheduling dependency on another computer program. The method includes identifying a subset of the elements as ecosystem units based on the results of the static analysis, the runtime analysis, and the scheduling analysis, and migrating an ecosystem unit from a first computer system to a second computer system, testing the ecosystem unit, or both. The above technology has at least the following technical problems: The existing program analysis algorithm focuses on static tracking (such as instruction level control flow analysis and memory access rule calculation) of a code logic structure, cross-program ecological dependency relationship identification (such as association of a program and data resources and scheduling dependency analysis) or runtime performance optimization (such as cyclic execution efficiency and memory reuse rate improvement) of a general program, functional correctness of a core around a code layer and resource scheduling efficiency of a general system are developed, special analysis logic is not designed aiming at the running characteristics of a specific program in a CAD field, but for a CAD routing algorithm connecting program, the core function is realized by relying on an ObjectARX interface to complete graphic interaction, the process can trigger graphic redrawing operation during each connection or route searching calculation, frequent graphic metadata update and dynamic refreshing can be directly caused, especially when a CAD file is in a high-resolution display mode or contains a large number of graphic layers and complex graphic elements (such as graphic blocks and cross line segments), the data quantity to be processed in a single redrawing mode is exponentially increased, the load of the refreshing is rapidly increased, and obvious refreshing delay of the program is finally caused. Disclosure of Invention In order to solve the technica