Three-dimensional model concurrent analysis method and system based on multiple processes and medium

By introducing multi-process concurrency technology into the three-dimensional CAD plug-in, identifying computing types, analyzing hardware performance and formulating concurrency solutions, the problem of low parsing efficiency of single-threaded three-dimensional model is solved, and more efficient data processing and the construction of a unified product data pool are achieved.

CN120068278AInactive Publication Date: 2025-05-30CHENGDU AIRCRAFT INDUSTRY GROUP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510536037.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-05-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The current interactive single-threaded three-dimensional CAD plug-in extraction efficiency is low, resulting in slow data processing flow, affecting the timeliness and fluency of data integration.

Method used

The concurrent analysis method of three-dimensional model based on multi-process is adopted. Concurrent analysis of the three-dimensional model is realized by identifying the computing type, analyzing hardware performance, formulating concurrent operation schemes, generating multiple operator subprocesses, and using the process pool to summarize the operation results, the concurrent analysis of the three-dimensional model is realized.

Benefits of technology

It improves the analytical computing efficiency of the three-dimensional model, breaks the limitations of single thread, makes full use of the parallel computing power of multi-core processors, promotes the construction of a unified product data pool, and provides faster, complete and accurate data support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068278A_ABST
    Figure CN120068278A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional model concurrent analysis method and system based on multiple processes and a medium. The method comprises the steps that an analysis task is obtained, and an instance object of three-dimensional model analysis is obtained according to the type of the analysis task; according to the corresponding relation between the analysis task type and the calculation type, the calculation type of the analysis task is recognized, and a plurality of sub-tasks of the calculation type are obtained through decomposition according to the instance object; analyzing the performance of corresponding hardware according to the calculation type of the task; according to the hardware margin, a concurrent operation scheme of a plurality of subtasks of different calculation types is formulated; according to the concurrent operation scheme, generating a plurality of operator sub-processes and adding the operator sub-processes into a process pool; and starting the process pool, summarizing the operation result file of each arithmetic unit to obtain an operation result, and completing analytic operation. According to the method, the multi-process concurrency technology is introduced by formulating the concurrency operation scheme, so that the analysis operation efficiency of the three-dimensional model is improved, and the construction of a unified product data pool is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of aircraft manufacturing, and particularly relates to a multi-process-based concurrent parsing method, system and medium for three-dimensional models. Background Art

[0002] In today's aircraft manufacturing field, Model-Based Definition (MBD) has become a mainstream technical practice, which has greatly changed the entire process of aircraft design, manufacturing and testing. MBD is not only a data format, but also an integrated design concept that integrates information such as geometric models, engineering drawings, operation instructions and product specifications to form a comprehensive, accurate and consistent data source. Implementing MBD technology is a comprehensive technical challenge. Process engineers from different specialties need to accurately extract diverse product information from MBD according to their respective business scenarios and build a structured and professional product model attribute library.

[0003] Facing challenges such as numerous three-dimensional models, large file sizes, complex calculation tasks, and long calculation times, process engineers usually adopt a series of automated tools and processes to divide the overall product model into more manageable local models and run three-dimensional CAD plugins in an interactive single-threaded manner. Although customized three-dimensional CAD plugins play an important role in extracting local model attributes, they may also lead to the phenomenon of data islands, causing data isolation between different links and teams. This decentralized data storage method is not conducive to building a centralized and efficient product data pool, which is crucial for achieving data consistency, accessibility and reusability. For example, the underlying geometric solvers of commonly used three-dimensional CAD software in the current industry all adopt single-threaded operation methods. The common interactive single-threaded operation of three-dimensional CAD plugins has low parsing efficiency, low resource utilization rate and long time consumption, resulting in a long time for building a unified product data pool. This problem makes the data processing process slow and affects the timeliness and fluency of data integration. Summary of the Invention

[0004] The purpose of the present invention is to provide a multi-process-based concurrent parsing method, system and medium for three-dimensional models, aiming to solve the problem of low extraction efficiency of current interactive single-threaded operation of three-dimensional CAD plugins. The present invention uses concurrent technology to improve the parsing operation efficiency of three-dimensional models, which is conducive to promoting the construction of a unified product data pool.

[0005] The present invention is mainly realized through the following technical solutions: A multi-process-based concurrent parsing method for three-dimensional models, comprising the following steps: Step S1: Obtain a parsing task and obtain an instance object for three-dimensional model parsing according to the type of the parsing task; Step S2: Identify the calculation type of the parsing task according to the correspondence between the parsing task type and the calculation type, and decompose the instance object to obtain several subtasks of this calculation type; Step S3: Analyze the performance of the corresponding hardware according to the calculation type of the task; Step S4: Develop a concurrent operation plan for several subtasks of different calculation types according to the hardware margin; Step S5: Generate multiple arithmetic unit subprocesses according to the concurrent operation plan and add them to the process pool; Step S6: Start the process pool, summarize the operation result files of each arithmetic unit to obtain the operation result, and complete the parsing operation.

[0006] To better implement the present invention, further, in the step S2, the calculation types include memory-intensive and CPU-intensive; in the step S3, for the memory-intensive calculation type, analyze the memory performance of the current computer; for the CPU-intensive calculation type, analyze the CPU performance of the current computer.

[0007] To better implement the present invention, further, in the step S3, use the psutil library of Python to obtain the usage of system memory resources; use the psutil.virtual_memory().total function to obtain the total memory capacity of the current computer, and use the psutil.virtual_memory().used function to obtain the memory usage of the current computer.

[0008] To better implement the present invention, further, tasks with a memory-intensive calculation type include large data import and large data extraction.

[0009] To better implement the present invention, further, tasks with a CPU-intensive calculation type include data processing and geometric transformation.

[0010] To better implement the present invention, further, in the step S4, for several subtasks with a memory-intensive type, the steps for formulating a concurrent operation plan are as follows: Step A1: Sort several subtasks in descending order according to the memory requirements; Step A2: Summarize the memory requirements of all tasks to obtain the total memory requirement. If the total memory requirement is less than or equal to the remaining memory of the current computer, go to step A3; Step A3: Calculate the concurrency number K = the remaining memory of the current computer * the reserved coefficient / (the maximum subtask memory requirement + the CAD initial memory).

[0011] To better implement the present invention, further, in step S4, for several CPU-intensive subtasks, formulating a concurrent operation plan includes the following steps: Step B1: Sort several subtasks in descending order according to CPU resource requirements; Step B2: Aggregate the CPU resource requirements of all tasks to obtain the total CPU resource requirement. If the total CPU resource requirement is less than or equal to the total remaining CPU resource requirement of the current computer, then proceed to step B3; Step B3: Calculate the concurrent quantity K = total remaining CPU resource requirement of the current computer * reservation coefficient / (maximum subtask CPU resource requirement + CAD initial CPU resource requirement).

[0012] To better implement the present invention, further, in step S5, according to the calculated concurrent quantity K, generate K calculator subprocesses; use the Pool function in the multiprocessing module in Python to create a process pool, and use apply_async to submit the tasks of the subprocesses to the process pool.

[0013] The present invention is mainly implemented through the following technical solutions: A three-dimensional model concurrent parsing system based on multiple processes, which is carried out based on the above-mentioned three-dimensional model concurrent parsing method based on multiple processes, and includes a parsing task acquisition module, a task decomposition and calculation type recognition module, a hardware performance analysis module, a concurrent operation plan formulation module, a subprocess generation and start module, and a parsing summary module; The parsing task acquisition module is used to acquire the parsing tasks of three-dimensional models; The task decomposition and calculation type recognition module is used to obtain the calculation types of subtasks according to the correspondence between parsing task types and calculation types, and decompose a number of subtasks of this calculation type according to instance objects; The hardware performance analysis module is used to analyze the performance of corresponding hardware according to the calculation types of tasks; The concurrent operation plan formulation module is used to formulate a concurrent operation plan for several subtasks of different calculation types according to the hardware margin; The subprocess generation and start module is used to calculate the concurrent quantity and generate multiple calculator subprocesses according to the concurrent quantity, add the multiple calculator subprocesses to the process pool and start the process pool; The parsing summary module is used to aggregate the result files calculated by each calculator to obtain the calculation result.

[0014] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the above-mentioned three-dimensional model concurrent parsing method based on multiple processes.

[0015] The beneficial effects of the present invention are as follows: By formulating a concurrent operation plan and introducing multi-process concurrent technology, the present invention breaks through the limitation of single-threaded budgeting, makes full use of the parallel computing power of modern multi-core processors, helps to accelerate the construction of a unified product data pool, and provides faster, more complete, and more accurate data support for subsequent data analysis, product design, and manufacturing, with good practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flowchart of a three-dimensional model concurrent parsing method based on multi-processes; Figure 2 is a schematic diagram of concurrent operations of multiple arithmetic units. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] Embodiment 1: A three-dimensional model concurrent parsing method based on multi-processes, as Figure 1 shown, includes the following steps: Step 1: Obtain a parsing task, where the parsing task includes a three-dimensional model list, a parsing task type, and related parameters; Step 2: Decompose and identify the calculation types of subtasks: Decompose the task according to the input information and identify the calculation types of subtasks; Step 3: Analyze the performance of the corresponding hardware for tasks of different calculation types; specifically, for CPU-intensive tasks, analyze the current CPU performance; for memory-intensive tasks, analyze the current memory performance; Step 4: Formulate a concurrent operation plan for tasks of different calculation types according to the hardware margin; that is, formulate a concurrent execution plan according to the current CPU performance or the current memory performance respectively; Step 5: Generate multiple arithmetic unit sub-processes according to the formulated concurrent operation plan and add them to the process pool; Step 6: Start the process pool, as Figure 2 shown, and each arithmetic unit generates a result file for the corresponding operation.

[0018] Step 7: Summarize the result files to obtain the operation result and complete the parsing operation.

[0019] By formulating a concurrent operation plan and introducing multi-process concurrent technology, the present invention breaks through the limitation of single-threaded budgeting and makes full use of the parallel computing power of modern multi-core processors. The present invention helps to accelerate the construction of a unified product data pool and provides faster, more complete, and more accurate data support for subsequent data analysis, product design, and manufacturing.

[0020] Embodiment 2: A three-dimensional model concurrent parsing method based on multi-processes includes the following steps: Step 1: Obtain the parsing task. The user selects the folder where the 3D model related to the parsing task is stored through the software UI interface, selects the type of the parsing task, and configures relevant basic parameters. The path of the storage folder can be used to obtain the instance object for 3D model parsing. In this embodiment, the instance objects for parsing include 120 part models and 46 assembly models.

[0021] The type of the parsing task is related to the requirements for 3D model parsing. For example, it can be divided into "attribute parsing", "part feature recognition", and "interference analysis". In this embodiment, the "interference analysis" in the type of the parsing task is responsible for analyzing the interference situation between parts in the assembly. The basic parameters are closely related to the 3D model parsing method. For example, as shown in Table 1, the following information needs to be configured: the installation path of 3D CAD, the path of the batch processing program, the path for saving the operation log, the path for saving the operation result, the correspondence between the type of the parsing task and the calculation type, etc.

[0022] Step 2: Decompose and identify the sub-task types. In this step, according to the correspondence between the type of the parsing task and the calculation type configured in Step 1, the calculation type in this embodiment is obtained as "memory-intensive". In the folder where the 3D model is stored selected in this embodiment, there are 46 assembly models, so 46 "memory-intensive" sub-tasks are generated.

[0023] Step 3: Analyze the performance of the corresponding hardware for tasks of different calculation types. The calculation types include CPU-intensive and memory-intensive. Among them, CPU-intensive refers to tasks that require a large amount of CPU computing resources and usually occupy most of the CPU time. The characteristics of these tasks are that they have a high requirement for CPU usage and relatively low requirements for the rest of the hardware. For example, tasks such as data processing and geometric transformation. Memory-intensive refers to tasks that require a large amount of memory resources and usually occupy most of the memory space. The characteristics of these tasks are that they have a high demand for memory but relatively low requirements for the rest of the hardware. For example, importing a large amount of data and extracting a large amount of data. The user divides the corresponding calculation types according to the key hardware requirements of the parsing task.

[0024] The calculation type in this embodiment is "memory-intensive". The psutil library of Python is used to obtain the usage of the system memory resources. The psutil.virtual_memory().total function is used to obtain the total memory capacity, and the psutil.virtual_memory().used function is used to obtain the memory usage. In this embodiment, the computer memory is 64GB in total, 13.3GB has been used, and the remaining memory is 50.7GB.

[0025] Step 4: Develop a 3D model concurrent parsing solution. In currently commonly used 3D CAD software in the industrial field, the underlying geometric solvers all adopt single-threaded operation mode. Therefore, the parsing efficiency of common interactive single-threaded plugins is low, the resource utilization rate is low, and the time consumption is long. The development of the concurrent parsing solution in this embodiment includes the following steps: (1) Subtask sorting, sorting 46 subtasks from largest to smallest according to the memory requirements (model file synthesis). The memory requirements of the first 9 components in this embodiment are as follows: (2) Obtain the total memory requirement. Summarize the memory requirements of all tasks, which requires a total of 50.3 GB.

[0026] (3) Calculate the number of concurrency. The number of concurrency refers to the number of processes running simultaneously. According to the empirical formula, the number of concurrency K = the remaining memory of the current computer * the reserved coefficient / (the maximum subtask memory requirement + the initial CAD memory).

[0027] In this embodiment, in order to reserve memory resources for interference analysis calculation, the reserved coefficient is set to 0.8; considering that CAD itself occupies a certain amount of memory when starting up, the initial memory of 3D CAD is set to 12 GB. Therefore, in this embodiment, the number of concurrency K = 50.7 * 0.8 / (8.2 + 12) ≈ 2.

[0028] Step 5: Generate multiple calculator subprocesses to join the process pool and start the process pool.

[0029] Since all CAD software does not support multi-threaded operation, the present invention adopts a multi-process method to achieve concurrent operation. After analysis in Step 4, the number of concurrency is 2. Therefore, 2 subprocesses are constructed in the process pool, and each subprocess evenly divides the memory requirements. Use the Pool function in the multiprocessing module in Python to create the process pool, and use apply_async to submit the tasks of the subprocesses to the process pool. The tasks of the subprocesses start the CATIA plugin in batch mode and pass the component information to the plugin in the form of a string. Subsequently, the process pool will automatically start the operation.

[0030] Step 6: Each calculator generates a corresponding operation result file. To avoid conflicts caused by simultaneous file writing, each subprocess will generate a subfolder for the generated results and store them in the operation result storage folder. In this embodiment, each subprocess will generate 1 db file for storing parsing information. The operation result files are respectively: D:\result\1\1.db; D:\result\2\2.db.

[0031] Step 7: Summarize the operation results and complete the parsing operation. Summarize the information of each operation result file into the operation result folder respectively. In this embodiment, the db files adopt the same data structure, so use SQL statements to summarize the data of each subfolder into the final operation result file, such as: D:\result\result.db.

[0032] Table 1 Table 2 The above are only the preferred embodiments of the present invention, and do not impose any form of limitation on the present invention. Any simple modification or equivalent change made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A concurrent parsing method for a three-dimensional model based on multiple processes, characterized in that: The following steps are involved: Step S1: obtaining a parsing task, and obtaining an instance object of three-dimensional model parsing according to the type of the parsing task; Step S2: According to the correspondence between the parsing task type and the calculation type, the calculation type of the parsing task is identified, and a number of subtasks of the calculation type are obtained according to the instance object decomposition; Step S3: Analyze the performance of the corresponding hardware according to the computing type of the task; Step S4: formulating concurrent computing plans for several subtasks of different computing types according to the hardware margin; Step S5: Generate multiple operator subprocesses according to the concurrent computing scheme and add them to the process pool; Step S6: Start the process pool, aggregate the calculation result files of each operator to obtain the calculation results, and complete the analytical operation.

2. The method for concurrently analyzing a three-dimensional model based on multiple processes according to claim 1, characterized in that: In the step S2, the computing types include memory intensive and CPU intensive; in the step S3, for the memory intensive computing type, the memory performance of the current computer is analyzed; for the CPU intensive computing type, the CPU performance of the current computer is analyzed.

3. The method for concurrently analyzing a three-dimensional model based on multiple processes according to claim 2, characterized in that: In step S3, the psutil library of Python is used to obtain the usage of system memory resources; the psutil.virtual_memory().total function is used to obtain the total memory capacity of the current computer, and the psutil.virtual_memory().used function is used to obtain the memory usage of the current computer.

4. The method for concurrently analyzing a three-dimensional model based on multiple processes according to claim 2, characterized in that: Memory-intensive computing tasks include importing and extracting big data.

5. The method for concurrently analyzing a three-dimensional model based on multiple processes according to claim 2, characterized in that: CPU-intensive tasks include data processing and geometric transformations.

6. The method for concurrently analyzing a three-dimensional model based on multiple processes according to claim 2, characterized in that: In step S4, for a plurality of memory-intensive subtasks, formulating a concurrent computing plan includes the following steps: Step A1: sort several subtasks according to memory requirements from large to small; Step A2: Summarize the memory requirements of all tasks to obtain the total memory requirement. If the total memory requirement is less than or equal to the remaining memory of the current computer, proceed to step A3. Step A3: Calculate the number of concurrent tasks K = the current computer's remaining memory * reserved coefficient / (maximum subtask memory requirement + CAD initial memory).

7. The method for concurrently analyzing a three-dimensional model based on multiple processes according to claim 2, characterized in that: In step S4, for a plurality of CPU-intensive subtasks, formulating a concurrent computing plan includes the following steps: Step B1: sort several subtasks from largest to smallest according to CPU resource requirements; Step B2: Summarize the CPU resource requirements of all tasks to obtain the total CPU resource requirement. If the total CPU resource requirement is less than or equal to the total remaining CPU resource requirement of the current computer, proceed to step B3. Step B3: Calculate the number of concurrent tasks K = the total remaining CPU resource demand of the current computer * the reserved coefficient / (the maximum subtask CPU resource demand + the CAD initial CPU resource demand).

8. A three-dimensional model concurrent analysis method based on multiple processes according to claim 6 or 7, characterized in that: In the step S5, K operator subprocesses are generated according to the calculated concurrent number K; the Pool function in the multiprocessing module in Python is used to create a process pool, and apply_async is used to submit the tasks of the subprocesses to the process pool.

9. A three-dimensional model concurrent analysis system based on multiple processes, based on the three-dimensional model concurrent analysis method based on multiple processes according to any one of claims 1 to 8, characterized in that: It includes parsing task acquisition module, task decomposition and calculation type identification module, hardware performance analysis module, concurrent computing plan formulation module, sub-process generation and startup module and parsing summary module; The parsing task acquisition module is used to acquire the parsing task of the three-dimensional model; The task decomposition and calculation type identification module is used to obtain the calculation type of the subtask according to the corresponding relationship between the parsed task type and the calculation type, and to obtain a plurality of subtasks of the calculation type according to the instance object decomposition; The hardware performance analysis module is used to analyze the performance of the corresponding hardware according to the calculation type of the task; The concurrent computing scheme formulation module is used to formulate concurrent computing schemes for a plurality of subtasks of different computing types according to hardware margin; The subprocess generation and startup module is used to calculate the number of concurrent operations and generate multiple operator subprocesses according to the number of concurrent operations, add the multiple operator subprocesses to the process pool and start the process pool; The analysis and summary module is used to summarize the result files of each operator operation to obtain the operation results.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the concurrent three-dimensional model analysis method based on multiple processes described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Concurrence loading and rendering method of 3D (three-dimensional) models on multi-core mobile device

    CN103455356A

  • Power system static security analysis parallel computing system and method

    CN112148546A

  • Distributed aerial triangulation calculation task scheduling method and system

    CN114780235A

  • Three-dimensional CAD model parallel driving method based on process scheduling

    CN115509737A

  • Geological modeling parallel explicit sampling method, device and equipment and storage medium

    CN119478278A