CAD (Computer Aided Design) and CAE (Computer Aided Engineering) data association change method and transaction management system
By creating class attribute manuals and class association relationship tables in CAD and CAE software, the data association relationship is automatically updated, and the code reconstruction problem caused by complex data association relationships is solved, and development efficiency and flexibility are improved.
Patent Information
- Application Number
- CN202510231326.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-13
AI Technical Summary
In CAD and CAE software, the data relationship is complex, resulting in a large amount of code refactoring required every time the requirements change, which seriously affects the development efficiency.
By creating a class attribute manual and a class association relationship table for the data, the associated data is automatically determined and updated when data changes, reducing the workload of manually processing dependencies.
It significantly reduces the workload of application developers in processing dependencies between data, improves development efficiency, can quickly meet customer new needs and support development of complex functions.
Smart Images

Figure CN120144599A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly relates to a method for associative change of CAD and CAE data and a transaction management system. Background Art
[0002] In CAD and CAE integrated software, the associative relationship between data is very deep. Often, the deletion and change of one data will cause associative changes to its associated data. The current mainstream implementation solution is to develop separate processing logics for the changes of such associated data for different CAD and CAE services. The processing of these data relationships in CAD and CAE software is often very complex, and a large amount of code refactoring is required every time there is a requirement change, seriously affecting the development efficiency.
[0003] Since the software of traditional CAX manufacturers separates the functions of CAD and CAE software in design. Different from the product design concept of current mainstream large CAX software, there is already a product design solution that integrates the functions of CAD and CAE software into a single window interface. However, the product design solution requires that any operation related to CAD and CAE in the software may affect the change of CAD and CAE related data, and the product requirements of CAD and CAE are extremely complex, which leads to extremely complex processing of associated data inside the software. Summary of the Invention
[0004] The present invention provides a method for associative change of CAD and CAE data and a transaction management system, aiming to meet the complex requirements that various changes to associated data need to be displayed on the same interface in CAX software with integrated interfaces.
[0005] The present invention provides a method for associative change of CAD and CAE data, including the following steps: S1. Create a class attribute description and a class association relationship table for the data; S2. When changing CAD or CAE data, pass the changed data into a class updater; S3. After receiving the change command of the data, the class updater determines the associated data of the changed data and makes changes: S31. According to the class attribute description of the changed data, traverse the data members of the base class where the changed data is located, and find the associated data members that need to be processed synchronously within the base class; S32. Call the data association relationship table to find the chain association relationship between the data and the associated data members; S33. Repeat steps S31 to S32 until all the associated data members of the changed data and their corresponding association relationships are found and the changes are completed; S4. Obtain all the data that needs to be processed in the class updater and hand it over to the application layer to display the data results of CAD or CAE software according to the product requirements.
[0006] As a further improvement of the present invention, in the step S1, the creation process of the class attribute specification includes: establishing a base class of data, inheriting all CAD or CAE business data from this base class, setting a unique primary ID identifier for this base class, and setting a unique secondary ID identifier within the base class for each associated data member that needs to be associated and processed; writing a member attribute information for each associated data member, and the member attribute information includes the type of the referenced data and whether the referenced data needs to be associated and processed.
[0007] As a further improvement of the present invention, in the step S1, the class association relationship table is used to store the association relationships of the data within the base class, and the data structure of the class association relationship table includes two data mapping tables, where one data mapping table records the downward-dependent data association relationships and the other data mapping table records the upward-dependent data association relationships.
[0008] As a further improvement of the present invention, in the step S1, the creation process of the class association relationship table includes: when assigning values to the data members of the base class during the writing of the function assignment of the data members in the base class, nesting a layer of static data methods in the middle when assigning values to the data members of the base class, and establishing the assignment of the class data member functions and the association relationships inside the static data methods.
[0009] As a further improvement of the present invention, before the CAD or CAE data is changed, including the data creation process: the class attribute specification provides the information for creating a class, creates the class data members and the association relationships through the data creation search and deletion interface, stores them in the cache data manager after successful creation, and at the same time the data change recorder records the information of the data creation.
[0010] As a further improvement of the present invention, in the step S2, the process of passing the changed data into the class updater includes: obtaining the data that needs to be changed from the cache data manager, when the incoming data is the internal data of CAD or CAE, changing the obtained data and then passing it into the class updater, passing the changed data to the data change recorder through the class modification module, and recording the association relationship of this data through the class association relationship table.
[0011] As a further improvement of the present invention, in the step S33, if there are changes to the associated data, record the changed associated data members and their corresponding association relationships into the data change recorder.
[0012] As a further improvement of the present invention, in the step S3, after the class updater receives the data change command, it specifically further includes the following execution process: a1. Check whether the change attribute of the changed data is deletion or modification, and label the data as modified or deleted according to the change attribute; a2. By querying the class attribute specification, determine whether the data needs to be processed for association relationships. If there are association relationships that need to be processed for this data, execute step s3; a3. Obtain the unique first-level ID identifier of the base class where the data is located, use this first-level ID identifier to query the class attribute specification of the corresponding base class, and query through the class attribute specification whether there are associated data member variables in the base class that need to be changed for associated data; a4. If the associated data members need to be synchronously deleted, label them as deleted. If the associated data members need to be synchronously modified, label them as modified. After labeling, use the data to be deleted or modified to query the class attribute specification and continue the association relationship labeling process until all association relationships are found; a5. After the updater has completed all association relationship labeling, centrally process all association relationships in the class updater class. For the data labeled as deleted, perform a deletion operation. For the data labeled as modified, modify the data according to the business logic of the product and display it.
[0013] The present invention also provides a transaction management system for CAD and CAE data association changes, including: Class attribute specification module: Through the initialization of static variables at the program startup stage, load the class member information into memory when the program starts. The class member information includes the data types of class members and the association relationships of class members; Cached data management module: Manage the creation, deletion, lookup, and storage of data; Class association relationship table module: For class data members with association relationships between data, record the chained association relationships between class data members and class data members; Class updater module: Call the class attribute specification module, the cached data management module, and the class association relationship table module to complete the change of the association relationships for the class data members in the class that need to process the association relationships, and record all the changes of the association relationships, and hand them over to the application layer for result display.
[0014] As a further improvement of the present invention, the transaction management system for CAD and CAE data association changes further includes: Data change recorder module: Record the changes of data and the corresponding association relationships, and cooperate with the class association relationship table module to support the undo and redo of data; Class modification module: Independently process the incoming class data members of the type containing association relationships, and add the association relationships to the class association relationship table module; Data creation, lookup, and deletion interface: Provide a change channel for the creation, lookup, and deletion of data.
[0015] The beneficial effects of the present invention are as follows: From the perspective of the product, the invention can solve the problem of the difficulty in integrating the CAD and CAE functions in the CAX software on the same interface. From the perspective of software R & D, the invention can better present the data association relationship of the CAX software at the application layer, significantly reducing the workload of application developers in dealing with the dependency relationship between data. At the same time, the invention enables developers to quickly meet the development of a large number of new customer requirements and support the development of more complex functions to meet the more diversified needs of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic diagram of the functional combination between the main modules in the present invention; Figure 2 is a flowchart for establishing the class association relationship in the present invention; Figure 3 is a flowchart of the functions implemented between different modules when creating data in the present invention; Figure 4 is a flowchart of the functions implemented between different modules when changing data in the present invention; Figure 5 is a logic block diagram of the class attribute description module in the present invention; Figure 6 is a flowchart for using the class association relationship table in the present invention; Figure 7 is a flowchart for using the class updater during the operation of the CAX software in the present invention; Figure 8 is a working flowchart of the class updater in the present invention; Figure 9 is an application architecture diagram of CAX in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0018] The present invention proposes a set of processing technical methods for CAX associated data on the basis of the original architecture of the CAX software to meet the product requirements of users for the CAX software.
[0019] Specifically, as Figure 1 shown, a method for changing the CAD and CAE data association includes the following steps: S1. Create a class attribute description and a class association relationship table for the data.
[0020] S2. When changes are made to CAD or CAE data, the changed data is passed into the class updater. When the user makes changes to CAX data, the transaction management system first records the changes internally in the program and then passes the changes into the class updater.
[0021] S3. After receiving the data change command, the class updater determines the associated data of the changed data and makes changes: S31. According to the class attribute description of the changed data, traverse the data members of the base class where the changed data is located to find the associated data members that need to be processed synchronously within the base class; S32. Call the data association relationship table to find the chain association relationship between this data and the associated data members; S33. Repeat steps S31 - S32 until all the associated data members of the changed data and their corresponding association relationships are found and the changes are completed; In step S33, if there are changes to the associated data, record the changed associated data members and their corresponding association relationships in the data change recorder.
[0022] S4. Obtain all the data that needs to be processed in the class updater and hand it over to the application layer to display the data results of CAD or CAE software according to product requirements.
[0023] As Figure 5 shown, in step S1, the creation process of the class attribute description includes: Establish a base class for the data, inherit all CAD or CAE business data from this base class, set a unique first - level ID identifier for this base class, and set a unique second - level ID identifier within the base class for each associated data member that needs to be associated and processed; write a member attribute information for each associated data member, and the member attribute information includes the type of the referenced data and whether the referenced data needs to be associated and processed.
[0024] Each base class has a uniquely identified first - level ID. Each class data member does not necessarily have a second - level ID, but each class data member that needs to be associated and processed must have a second - level ID. The class attribute description can map the unique identifier of the base class to the unique identifier of the class data member and provide these mapping relationships to the class updater.
[0025] Among them, the second - level ID is the ID of each class member attribute. When processing this association relationship within the framework, this second - level ID needs to be called to query the attribute information of this class member to determine whether to perform the associated update of the class member data.
[0026] As Figure 6As shown in the figure, in step S1, the class association relationship table is used to store the association relationships of the data within the base class. The data structure of the class association relationship table includes two data mapping tables. One data mapping table records the downward-dependent data association relationships, and the other data mapping table records the upward-dependent data association relationships.
[0027] Downward dependence and upward dependence essentially record a kind of dependence relationship such that when the base class changes, this method can automatically find out which class data members will be affected when the base class changes.
[0028] The essential difference between downward dependence and upward dependence is a difference in the logical relationship at the business level. For example: Model A created in CAD is used to divide into mesh model B in CAE, and this mesh B model is used for simulation calculation in the multi-body calculation model C in CAE. Logically: A → B → C. Recording the reference of B in A and recording C in B is called downward dependence; conversely, recording being referenced by B in C and recording being referenced by A in B is called upward dependence.
[0029] In step S1, the creation process of the class association relationship table includes: when assigning values to the data members of the base class in the function assignment of the data members of the base class, a static data method is nested in the middle when assigning values to the data members of the base class, and the assignment of the class data member functions and the establishment of the association relationships are carried out inside the static data method.
[0030] For example, in the class function method in c++ code, when writing the code, instead of using namespaceBase{ void setValue(value) { this->m_value = value; } it uses the code implementation method of class Base { public: static void setValue(value) { / / Auxiliary function used to implement whether the association relationship is established processRelationship(value); this->m_value = value; } }.
[0031] Combined with Figure 2As shown, it can be seen from the above code that in this solution, when assigning values to class members, instead of directly assigning values, a static data method is called in the assignment function to process the association relationship. In this function, the secondary ID of the class is first called to query the attribute information of the member, and whether an association relationship needs to be established is obtained from the attribute information. If so, this key relationship is established. After this process is completed, the class members are assigned values.
[0032] As Figure 3 shown, before the CAD or CAE data is changed, including the data creation process: the class attribute specification provides information for creating a class, and the class data members and association relationships are created through the data creation search and delete interface. After successful creation, they are stored in the cache data manager, and at the same time, the data change recorder records the information of data creation.
[0033] As Figure 4 shown, in step S2, the process of passing the changed data into the class updater includes: obtaining the data to be changed from the cache data manager. When the passed-in data is CAD or CAE internal data, the obtained data is changed and then passed into the class updater. The changed data is passed to the data change recorder through the class modification module, and the association relationship of the data is recorded through the class association relationship table.
[0034] The cache data manager stores and manages the created CAX data in the actual CAX software. The software operates on this class for data creation, deletion, and change. Therefore, after data creation, it is stored in the cache data manager. When calling data for change, it is also retrieved from the cache data manager, and the changed data is also stored in the cache data manager.
[0035] As Figure 8 shown, in step S3, after the class updater receives the data change command, it specifically further includes the following execution process: a1. Check whether the change attribute of the changed data is deletion or modification, and label the data as modified or deleted according to the change attribute.
[0036] a2. By querying the class attribute specification, determine whether the data needs to be processed for the association relationship. If the data has an association relationship that needs to be processed, execute step s3; if there is no association relationship, it will be processed centrally at the end.
[0037] a3. Obtain the unique primary ID identifier of the base class where the data is located, use this primary ID identifier to query the class attribute specification of the corresponding base class, and query through the class attribute specification whether there are associated data member variables in the base class that need to be changed for the associated data.
[0038] a4. If the associated data members need to be deleted synchronously, mark them with the deletion tag. If the associated data members need to be modified synchronously, mark them with the modification tag. After marking, use the data to be deleted or modified to query the class attribute specification, and continue to process the tagging of the association relationship until all association relationships are found.
[0039] a5. After the updater has completed tagging all association relationships, centrally process all association relationships in the class updater class. For the data marked with the deletion tag, perform the deletion operation. For the data marked with the modification operation, modify the data according to the business logic of the product and display it.
[0040] When a developer makes changes to a data class: First, query the class member attribute specification of the variable being changed through the class attribute specification. The class attribute specification will tell the class updater whether this change will affect other member variables in the class. If this class is a pointer (i.e., the class has an association relationship) and points to a class pointer in the data transaction management system, the association relationship will also be found through this pointer, and these association relationships will be recorded in the class updater class. After that, as long as the developer calls the update function in the class updater, automatic update can be achieved.
[0041] For the developer who uses this method, a sample pseudo-code process is as follows: void setChangeValue() { PSItemA* iema; PSItemB* itemb; itemb->setRelData(iema); / / In this way, the associated change of the class can be achieved / / PSUpdator is the class updater class PSUpdator::getCurrent()::getInstance()->update(); } void delItem() { / / Pointer to the data to be deleted PSItemA* iema; / / PSDataManager is the interface for data creation, search, and deletion PSDataManager::getCurrent()::getInstance()->delete(iema); PSUpdator::getCurrent()::getInstance()->update(); } As can be seen from the pseudo-code in the above example, developers only need very little code to implement the associated changes and deletions of data.
[0042] The present invention also provides a transaction management system for associated changes of CAD and CAE data, including: Class attribute specification module: Through static variables, it is initialized at the program startup stage, and class member information is loaded into memory when the program starts. The class member information includes the data types of class members and the association relationships of class members. The association relationship is whether the members of the class are information for associated changes; this module can record the data member information in each C++ class and provide usage instructions for CAX software to process associated data.
[0043] Cached data management module: Manages the creation, deletion, lookup, and storage of data; the actual storage locations of each module in the computer cache.
[0044] Class association relationship table module: For class data members with an associated relationship between data, it provides a record of the data association relationship; records the chained association relationship between class data members and class data members, which is the core of implementing chained deletion.
[0045] Class updater module: As Figure 8 shown, it calls the class attribute specification module, the cached data management module, and the class association relationship table module to complete the change of the association relationship for class data members in the class that need to process the association relationship, and records all the changes of the association relationship for the developers at the application layer to do the upper-layer business. The class updater module can automatically update the data of pointer members in the class that need to process the association relationship according to the class association relationship table module and the class attribute specification module.
[0046] This transaction management system mainly constructs four modules: the class attribute specification module, the cached data management module, the class association relationship table module, and the class updater, and combines these four modules skillfully, which can realize the change of class association relationship and complete the display of various changes of associated data in CAX software on the same interface.
[0047] When a coder modifies a base class, essentially it is to modify the member functions of the base class. The present invention integrates the class attribute specification module and the class updater module in the data transaction system. When class data is modified and deleted, the class attribute specification module and the class updater module are called in the data transaction system to implement the processing of the association relationship of class data.
[0048] A thing management system for CAD and CAE data association changes, further comprising: Data change recorder module: Records the changes of data and the corresponding association relationships, and cooperates with the class association relationship table module to support the undo and redo of data; Class modification module: Separately processes the class data members of the incoming type with association relationships, and adds the association relationships to the class association relationship table module; Data creation, search, and deletion interface: Provides a change channel for data creation, search, and deletion.
[0049] By combining the functions of the class attribute specification module, cache data management class, data creation, search, and deletion interface, data change recorder module, and class modification module, the change of class association relationships can be achieved.
[0050] Such as Figure 9 As shown, the current mainstream CAX software generally adopts the MVC framework, and the specific software architecture is as shown in the above figure. The present invention mainly functions in the data abstraction layer and the data instruction layer. The class attribute specification module, cache data management module, class association relationship table module, class updater module, data change recorder module, class modification module, and data creation, search, and deletion interface of the thing management system belong to the data abstraction layer and need to be called in the data instruction layer.
[0051] In the data transaction management system, the class attribute specification class and the data updater class are added, and the automatic processing of class association relationships can be completed through these two added modules. The present invention is written in C++. In the past, the method of processing was to use virtual functions to obtain the association relationships of classes and then process them. This is a method-oriented programming. In the present invention, the core idea of the code is class data member-oriented programming. The data members of each class are abstracted as a kind of attribute, and this attribute is uniformly processed through the specific method in the present invention to achieve the purpose of automatically processing association relationships.
[0052] The above content is a further detailed description of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can still be made, and all should be regarded as belonging to the protection scope of the present invention.
Claims
1. A method for modifying the association between CAD and CAE data, characterized in that: The following steps are involved: S1. Create data class attribute description and class association table; S2. When changes are made to the CAD or CAE data, the changed data is passed to the class updater; S3. After receiving the data change command, the class updater determines the associated data of the changed data and makes the change: S31. According to the class attribute specification of the changed data, traverse the data members of the base class where the changed data is located, and find the associated data members in the base class that need to be processed synchronously; S32. Call the data association table to find the chain association relationship between the data and the associated data member; S33. Repeat steps S31 to S32 until all associated data members and their corresponding associations of the changed data are found and the change is completed; S4. Obtain all the data that needs to be processed in the class updater and hand it over to the application layer to display the data results of the CAD or CAE software according to the product requirements.
2. The method for modifying the association between CAD and CAE data according to claim 1, characterized in that: In step S1, the process of creating the class attribute specification includes: Establish a data base class, and let all CAD or CAE business data inherit the base class. Set a unique primary ID for the base class, and set a unique secondary ID in the base class for each associated data member that needs to be processed in an associated manner. Write a member attribute information to each associated data member, which includes the type of referenced data and whether the referenced data needs to be processed in an associated manner.
3. The method for modifying the association between CAD and CAE data according to claim 1, characterized in that: In step S1, the class association table is used to store the association relationship of data in the base class, and the data structure of the class association table includes two data mapping tables, one of which records the downward-dependent data association relationship, and the other records the upward-dependent data association relationship.
4. The method for modifying the association between CAD and CAE data according to claim 1, characterized in that: In step S1, the process of creating the class association relationship table includes: When writing the function assignment of the data members in the base class, a layer of static data methods is nested in the middle when assigning the data members of the base class, and the class data member function assignment and association relationship are established in the static data method.
5. The method for modifying the association between CAD and CAE data according to claim 1, characterized in that: Before CAD or CAE data is changed, the data creation process includes: The class attribute specification provides information for creating a class. Class data members and association relationships are created through the data creation, search and deletion interface. After successful creation, they are stored in the cache data manager. At the same time, the data change recorder records the data creation information.
6. The method for modifying the association between CAD and CAE data according to claim 5, characterized in that: In step S2, the process of transferring the changed data to the class updater includes: Get the data that needs to be changed from the cache data manager. When the incoming data is CAD or CAE internal data, change the acquired data and pass it to the class updater. Pass the changed data to the data change recorder through the class modification module, and record the association relationship of the data through the class association table.
7. The method for modifying the association between CAD and CAE data according to claim 1, characterized in that: In step S33, if there is a change in the associated data, the changed associated data members and their corresponding associated relationships are recorded in the data change recorder.
8. The method for modifying the association between CAD and CAE data according to claim 1, characterized in that: In step S3, after receiving the data modification command, the class updater specifically includes the following execution process: a1. Check whether the changed attribute of the changed data is deletion or modification, and label the data as modification or deletion according to the changed attribute; a2. By querying the class attribute specification, determine whether the data needs to be associated with the relationship processing. If the data needs to be associated, execute step s3; a3. Get the unique primary ID of the base class where the data is located, use the primary ID to query the class attribute specification of the corresponding base class, and query whether there are any associated data member variables in the base class that need to be modified through the class attribute specification; a4. If the associated data member needs to be deleted synchronously, a deletion tag is added; if the associated data member needs to be modified synchronously, a modification tag is added; after adding the tags, the class attribute specification is searched using the data to be deleted or modified, and the associated relationship tagging process is continued until all associated relationships are found; a5. After the updater has completed labeling all the relationships, it will centrally process all the relationships in the update class. For data marked with the delete tag, it will perform the delete operation. For data marked with the modify operation, it will modify the data according to the business logic of the product and display it.
9. A transaction management system for CAD and CAE data association changes, characterized in that: include: Class attribute specification module: static variables are initialized at the program startup stage, and class member information is loaded into the memory when the program starts. The class member information includes the data type of the class member and the relationship between the class member; Cache data management module: manages the creation, deletion, search and storage of data; Class association relationship table module: for class data members with association relationships between data, record the chain association relationship between class data members; Class updater module: calls the class attribute specification module, cache data management module, and class association table module to complete the association relationship changes for the class data members in the class that need to process the association relationship, and records all the changes in the association relationship and submits them to the application layer for result display.
10. The transaction management system for CAD and CAE data association and modification according to claim 9, characterized in that: Also includes: Data change recorder module: records changes in data and corresponding relationships, and cooperates with the class relationship table module to support data undo and redo; Class modification module: separately processes the class data members with association relationships as the incoming type, and adds the association relationships to the class association relationship table module; Data creation, search, and deletion interface: provides a change channel for data creation, search, and deletion.