Display method and device of multi-body dynamic model and electronic equipment
By adopting a hybrid architecture of C++ core computing and web front-end rendering, the problems of low user interface development efficiency and poor cross-platform compatibility in multibody dynamics applications are solved. It achieves high-efficiency loading and rendering performance, reduces maintenance costs, and meets the real-time requirements of simulation analysis.
Patent Information
- Application Number
- CN202511698653.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-17
AI Technical Summary
The existing client/server architecture of multibody dynamics applications results in low user interface development efficiency, long iteration cycles, high maintenance costs, and poor cross-platform compatibility. At the same time, the browser/server architecture has performance issues during loading, rendering, and interaction, making it difficult to meet real-time requirements.
It adopts a hybrid architecture of C++ core computing and web front-end rendering. Inter-process communication is achieved through Qt WebChannel, the UI logic is handled by the web front-end, and the core computing is completed by the C++ back-end. Standardized topology data is constructed and the model tree and force-directed graph are rendered and displayed on the web front-end.
It improves the loading and rendering performance of multibody dynamics models, reduces maintenance costs, increases development efficiency and cross-platform compatibility, and meets the real-time requirements of simulation analysis.
Smart Images

Figure CN121542522A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of simulation analysis, and in particular, to a display method and device of a multi-body dynamics model and an electronic device. BACKGROUND
[0002] A multi-body dynamics application (referred to as a multi-body dynamics application for short) is a key tool in the development of modern industrial products and has a wide range of applications in the fields of automobiles, aerospace, and mechanical manufacturing. It can be used for dynamic simulation analysis and viewing of the topology of a multi-body dynamics model.
[0003] At present, a multi-body dynamics application usually adopts a client / server (Client / Server) architecture and implements rendering of a topology graph based on a native application framework (such as Qt Widgets). The advantage of this architecture is high computing performance, which can efficiently process large-scale model data.
[0004] However, this architecture has the following defects: first, the development of a user interface depends heavily on C++ language and traditional UI frameworks, resulting in a large amount of code, a long iteration cycle, difficulty in quickly responding to changes in user requirements, and low development efficiency. Second, a large client software needs to be deployed on a terminal device, resulting in high maintenance costs and poor cross-platform compatibility. SUMMARY
[0005] The embodiments of the present application provide a display method and device of a multi-body dynamics model and an electronic device, which can improve computing capability, solve performance problems such as slow loading, rendering lag, and interactive response delay when loading, rendering, or interacting with large-scale models, meet the real-time requirements of simulation analysis, and improve development efficiency.
[0006] In a first aspect, the embodiments of the present application provide a display method of a multi-body dynamics model, applied to an electronic device, the electronic device including a multi-body dynamics application, the multi-body dynamics application including a loading module, a construction module, a native rendering module, and a web front-end interface. The method includes: the native rendering module displays a first interface of the multi-body dynamics application; in response to a loading operation for a target dynamics model acting on the first interface, the loading module obtains original model data of the target dynamics model; the construction module constructs standardized topology data based on the original model data, the standardized topology data including first topology data and second topology data, the first topology data being used for rendering a model tree of the target dynamics model, and the second topology data being used for rendering a force-directed graph of the target dynamics model; the web front-end interface obtains the standardized topology data through a web channel communication interface; and the web front-end interface renders and displays a second interface, and in the second interface, renders and displays the model tree based on the first topology data and renders and displays the force-directed graph based on the second topology data.
[0007] In a possible implementation, the target dynamic model includes a plurality of components; the model tree includes a plurality of tree nodes, the plurality of tree nodes include a root node and a plurality of child nodes at different levels, a node identifier of a tree node is a component identifier of a component corresponding to the tree node; the force-directed graph includes a plurality of graph nodes and a plurality of edges, an edge connects two graph nodes in the plurality of graph nodes; a node identifier of a graph node is a component identifier of a component corresponding to the graph node; after the web front-end interface renders and displays the second interface, the method further includes: in response to a selection operation on a first child node in the plurality of child nodes, the web front-end interface re-renders the model tree in the second interface, where the first child node is presented in a first display mode in the model tree; the web front-end interface determines a first node identifier corresponding to the first child node; the web front-end interface determines, according to the first node identifier, a first graph node corresponding to the first node identifier in the plurality of graph nodes; and the web front-end interface re-renders the force-directed graph in the second interface, where the first graph node is presented in the first display mode in the force-directed graph.
[0008] In a possible implementation, after the construction module constructs the standardized topological data based on the original model data, the method further includes: the native rendering module renders the model tree in the first interface according to the first topological data; after the first node identifier is determined, the web front-end interface sends a first update request to the native rendering module, and the first update request carries the first node identifier; and in response to the first update request, the native rendering module re-renders the model tree in the first interface, where the first child node is presented in the first display mode in the model tree.
[0009] In a possible implementation, after the web front-end interface renders and displays the second interface, the method further includes: in response to a selection operation on a second graph node in the plurality of graph nodes, the web front-end interface re-renders the force-directed graph in the second interface, where the second graph node is presented in the first display mode in the force-directed graph; the web front-end interface determines a second node identifier corresponding to the second graph node; the web front-end interface determines, according to the second node identifier, a second child node corresponding to the second node identifier in the plurality of child nodes; and the web front-end interface re-renders the model tree in the second interface, where the second child node is presented in the first display mode in the model tree.
[0010] In one possible implementation, after the building module constructs standardized topology data based on the original model data, the above method further includes: the native rendering module rendering the model tree in the first interface according to the first topology data; after determining the second node identifier, the web front-end interface sends a second update request to the native rendering module, the second update request carrying the second node identifier; in response to the second update request, the native rendering module re-renders the model tree in the first interface, wherein, in the model tree, the second child node is presented in a first display mode.
[0011] In one possible implementation, the original model data includes component data of each component in the target dynamics model and component relationship data of the multiple components. The component data includes component identifier, component name, component type, and component description information. The component relationship data is used to characterize the subordinate relationships, constraint relationships, and / or force element relationships between the components. The construction module constructs standardized topology data based on the original model data, including: the construction module constructs first topology data and second topology data based on the component data of each component and the component relationship data between the components; the construction module constructs standardized topology data based on the first topology data and the second topology data.
[0012] In one possible implementation, the construction module constructs first topology data based on the component data of each component and the component relationship data between each component, including: reorganizing the original model data according to the component data of each component and the subordinate relationship between each component to generate the first topology data; wherein, the model tree includes multiple tree nodes, the multiple tree nodes include a root node and multiple child nodes located at different levels, the node identifier of the tree node is the component identifier of the component corresponding to the tree node, and the node information of the tree node is determined according to the component name, component type and component description information of the component corresponding to the tree node.
[0013] In one possible implementation, the construction module constructs second topology data based on the component data of each component and the component relationship data between the components, including: reorganizing the original model data according to the component data of each component, the constraint relationship and / or force element relationship between the components, to generate the second topology data; wherein, the force-directed graph includes multiple graph nodes and multiple edges, and an edge connects two graph nodes among the multiple graph nodes to represent the constraint relationship and / or force element relationship between the two graph nodes; wherein, the node identifier of the graph node is the component identifier of the component corresponding to the graph node.
[0014] Secondly, embodiments of this application provide a display device for a multibody dynamics model, comprising:
[0015] The native rendering module is used to display the first interface for multibody dynamics applications;
[0016] The loading module is used to obtain the original model data of the target dynamics model in response to the loading operation of the target dynamics model performed on the first interface.
[0017] The building module is used to construct standardized topology data based on the original model data. The standardized topology data includes first topology data and second topology data. The first topology data is used to render the model tree of the target dynamics model, and the second topology data is used to render the force-directed graph of the target dynamics model.
[0018] The web front-end interface is used to obtain standardized topology data through the web channel communication interface;
[0019] The web front-end interface is also used to render and display the second interface, and in the second interface, the model tree is rendered and displayed based on the first topology data, and the force-guided graph is rendered and displayed based on the second topology data.
[0020] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0021] The memory stores the instructions that the computer executes;
[0022] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0023] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0024] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0025] In this embodiment, a first interface for multibody dynamics applications is displayed. In response to a loading operation on the target dynamics model applied to the first interface, the original model data of the target dynamics model is obtained. Based on the original model data, standardized topology data is constructed, including first topology data and second topology data. The web front-end interface obtains the standardized topology data through a web channel communication interface. The web front-end interface renders and displays a second interface, in which a model tree is rendered and displayed based on the first topology data, and a force-directed graph is rendered and displayed based on the second topology data. In other words, based on a hybrid architecture of C++ core computation and web front-end rendering, inter-process communication (IPC) is implemented through Qt WebChannel, allowing the UI logic to be handled by the web front-end, while the core computation is completed by the C++ back-end. This way, the C++ back-end handles computationally intensive tasks such as model parsing and topology data construction, ensuring high efficiency in large-scale model processing. The web front-end only receives lightweight topology data for rendering, avoiding performance bottlenecks caused by raw data parsing on the browser side. Furthermore, it improves development efficiency and flexibility. Also, users do not need to install a separate client; software deployment only requires updating web resource files, significantly reducing maintenance costs. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0027] Figure 1 This is a schematic diagram of the architecture of a multibody dynamics application according to an embodiment of this application;
[0028] Figure 2 A flowchart illustrating a method for displaying a multibody dynamics model provided in an embodiment of this application;
[0029] Figure 3 This application provides a schematic diagram of a standardized topology data data structure.
[0030] Figure 4 A schematic diagram of a second interface provided in an embodiment of this application;
[0031] Figure 5 A flowchart illustrating another method for displaying a multibody dynamics model provided in an embodiment of this application;
[0032] Figure 6 A schematic diagram of the structure of a display device for a multibody dynamics model provided in an embodiment of this application;
[0033] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0034] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0035] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0036] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0037] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0038] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0039] Multibody dynamics applications are key tools in the research and development of modern industrial products, and are widely used in fields such as automotive, aerospace, and machinery manufacturing. They can be used to perform dynamic simulation analysis and view the topology of multibody dynamics models.
[0040] Currently, multibody dynamics applications typically employ a client / server architecture, rendering the topology graph based on a native application framework. The advantage of this architecture lies in its high computational performance, enabling efficient processing of large-scale model data.
[0041] However, this architecture has the following drawbacks: First, the development of the user interface heavily relies on the C++ language and traditional UI frameworks, resulting in a large amount of code, long iteration cycles, difficulty in quickly responding to changes in user needs, and low development efficiency. Second, it requires deploying large client software on terminal devices, leading to high maintenance costs and poor cross-platform compatibility.
[0042] To address the aforementioned technical issues, in some embodiments, multibody dynamics applications employ a browser / server (B / S) architecture. Compared to a client / server (C / S) architecture, B / S-based applications move model rendering and interaction logic to the browser, eliminating the need to install client software on terminal devices, resulting in lower maintenance costs and resolving the issue of poor cross-platform compatibility.
[0043] However, due to limitations in network transmission bandwidth and browser local computing power, the B / S architecture suffers from performance issues such as slow loading, rendering stutters, and delayed interactive responses when loading, rendering, or interacting with large-scale models, making it difficult to meet the real-time requirements of simulation analysis.
[0044] In view of this, embodiments of this application provide a method for displaying a multibody dynamics model, which displays a first interface for multibody dynamics applications; in response to a loading operation on the target dynamics model acting on the first interface, the original model data of the target dynamics model is obtained; based on the original model data, standardized topology data is constructed, the standardized topology data including first topology data and second topology data; the web front-end interface obtains the standardized topology data through a web channel communication interface; the web front-end interface renders and displays a second interface, and in the second interface, a model tree is rendered and displayed based on the first topology data, and a force-directed graph is rendered and displayed based on the second topology data. That is, based on a hybrid architecture of C++ core computation and web front-end rendering, inter-process communication (IPC) is implemented through Qt WebChannel, the UI logic is handled by the web front-end, and the core computation is completed by the C++ back-end. In this way, the C++ back-end is responsible for computationally intensive tasks such as model parsing and topology data construction, ensuring the efficiency of large-scale model processing, while the web front-end only receives lightweight topology data for rendering, avoiding performance bottlenecks caused by raw data parsing on the browser side. Furthermore, it can improve development efficiency and flexibility. Furthermore, with the QtWebEngine's embedded browser, users do not need to install a separate client; software deployment only requires updating web resource files, significantly reducing maintenance costs.
[0045] Before introducing the display method of the multibody dynamics model provided in the embodiments of this application, the electronic equipment to which the display method of the multibody dynamics model provided in this application is applicable will be described first.
[0046] The multibody dynamics model display method provided in this application embodiment can be applied to electronic devices that can install applications, such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application embodiment does not impose any restrictions on the specific type of electronic device.
[0047] Figure 1 This is a schematic diagram of the software system architecture of an electronic device according to an embodiment of this application.
[0048] For example, such as Figure 1 As shown, the software system includes at least: an application layer (also referred to as the application layer), an application framework layer (also referred to as the framework layer), and a kernel layer.
[0049] The application layer is used to deploy the functions related to the electronic device. The application layer provides services and interfaces for applications so that the electronic device can run them. These applications can be applications that come with the operating system, such as user interface applications, or applications developed by third-party developers. In practice, the application packages in the application layer are not limited to the examples above.
[0050] For example, such as Figure 1 As shown, the application layer can include multibody dynamics applications. These applications can perform dynamic simulation analysis on simulated objects (such as vehicles) and view the topological structure of the multibody dynamics model of the simulated object, such as the model tree and force-directed graph.
[0051] The multibody dynamics application employs a Qt hybrid architecture. For example, the multibody dynamics application may include a main process (i.e., the C++ main program) and a web front-end interface. The web front-end interface responds to user actions on the application's interface and renders and displays the model viewing interface. For example, rendering the web front-end interface includes a communication proxy module, a visualization rendering engine, and an interactive control module.
[0052] The framework layer provides application programming interfaces (APIs) and a programming framework for applications. The application framework layer includes predefined functions. It acts as a central processing unit, determining the actions taken by applications within the application layer. Through the API, applications can access system resources and obtain system services during execution.
[0053] For example, such as Figure 1 As shown, the framework layer may include a topology data manager, a web engine container, and a web channel communication interface. For example, the web engine container may be a Qt web engine container. The Qt web engine container is embedded within the multibody dynamics application, providing a runtime environment for web content. In this embodiment, the Qt web engine container provides a runtime environment for the web front-end interface. The web channel communication interface is used to connect the C++ back-end and the web front-end. For example, the multibody dynamics application communicates with the web front-end interface running within the web engine container through the web channel communication interface.
[0054] like Figure 1 As shown, in some embodiments, the kernel layer is a functional layer situated between the hardware and software of an electronic device. The kernel layer can implement functions such as hardware abstraction, multitasking, and memory management.
[0055] Specifically, the main process (i.e., the C++ main program) is used to acquire the raw model data from the multibody dynamics module and parse it to obtain parsed data. The main process (i.e., the C++ main program) calls the topology data manager to reorganize the parsed data to construct a standardized topology data structure. The multibody dynamics application exposes the standardized topology data structure to the web engine container through a web channel communication interface. The communication proxy module acquires the standardized topology data structure through the web channel communication interface. The visualization rendering engine is used to render and display the model tree and force-directed graph of the multibody dynamics model based on the standardized topology data structure. The interactive control module is responsible for capturing and processing various user operations on the web front-end interface, generating corresponding business instructions, such as responding to user actions, and updating the model tree and force-directed graph of the rendered multibody dynamics model.
[0056] It should be noted that the above examples are merely a simple division of operating system functions and do not limit the specific form of the operating system of the electronic device in the embodiments of this application. Depending on factors such as the function of the display device and the type of the operating system, the number of layers and the specific type of the operating system may take other forms.
[0057] The following embodiments of this application will be used to illustrate having Figure 1 Taking the electronic device with the software architecture shown as an example, and in conjunction with the accompanying drawings and application scenarios, the display method of the multibody dynamics model provided in this application embodiment will be specifically described.
[0058] Figure 2 This is a flowchart illustrating a method for displaying a multibody dynamics model, as provided in an embodiment of this application. Figure 2 The method for displaying the multibody dynamics model may include the following steps:
[0059] S201 displays the first interface for multibody dynamics applications.
[0060] Specifically, in the multibody dynamics application, the native rendering module displays the first interface of the multibody dynamics application, that is, the main process of the multibody dynamics application calls the local native rendering module to display the first interface.
[0061] Among them, multibody dynamics can perform dynamic simulation analysis on simulation objects (such as vehicles) and view the topological structure of the multibody dynamics model (referred to as dynamic model) of the simulation object, such as model tree and force guidance graph.
[0062] The first interface can be the application interface of a multibody dynamics application, such as the initial application interface of a multibody dynamics application. For example, in response to a user's opening operation of the multibody dynamics application, the application starts and displays the first interface. For example, the first interface may include a menu bar, toolbar, etc. The menu bar may include topology viewing controls.
[0063] S202, in response to the viewing operation of the target dynamics model performed on the first interface, obtain the original model data of the target dynamics model.
[0064] Specifically, in response to the viewing operation of the target dynamics model on the first interface, the loading module in the multibody dynamics application obtains the original model data of the target dynamics model, that is, the main process of the multibody dynamics application obtains the original model data of the target dynamics model.
[0065] The target dynamics model refers to the multibody dynamics model that the user is currently viewing. A multibody dynamics model is a mathematical abstraction of a simulation object, which is composed of multiple rigid and / or flexible bodies connected by some form of constraint and force element.
[0066] Simulation objects can include a main assembly, which includes one or more subassemblies. A subassembly includes multiple parts (or components or geometries), and a subassembly can also include constraint pairs and force elements. Of course, a simulation object can also include an assembly without subassemblies.
[0067] Taking a vehicle system as the simulation object as an example, the vehicle system is a general assembly, which can include: front suspension system, such as MacPherson strut front suspension system (Font_macpherson_suspension_subsystem); rear suspension system, such as multi-link rear suspension system (Rear_multilink_suspension_subsystem); tire system (Tire_subsystem); body system (Body_system); braking system (Brake_subsystem); powertrain system, such as pure electric front drive powertrain system (Powertrain_Bev_FWD_subsystem); full vehicle handling test rig (Full_Vehicle_Handing_Testrig); steering system, such as rack and pinion steering system (Rack_pinion_steering_subsystem), and other sub-assemblies.
[0068] Taking the front suspension system as an example, the front suspension system can include a reference base component, namely the ground (or the ground surface). The front suspension system can also include left-side suspension components, such as the upper left shock absorber (gel_upper_strut), left steering knuckle (gel_upright), left wheel hub / spindle (gel_spindle), left steering tie rod (gel_tierod), and lower left control arm (gel_lower_control_arm). The front suspension system can also include right-side suspension components, such as the upper right shock absorber (ger_upper_strut), right steering knuckle (ger_upright), right wheel hub / spindle (ger_spindle), right steering tie rod (ger_tierod), and lower right control arm (ger_lower_control_arm).
[0069] Of course, subassemblies can also include constraint pairs and force elements. Constraint pairs define the kinematic relationships between entities, such as the allowed relative motion between two parts. For example, constraint pairs can include revolute joints, prismatic joints, cylindrical joints, spherical joints, fixed joints, etc. Force elements define the interaction forces between entities. For example, force elements can include force elements in a generalized sense, bushings, dampers, springs, bumpstops, reboundstops, etc.
[0070] Raw model data refers to the data used to describe the geometric, assembly relationships, and physical properties of a dynamic model. Raw model data includes component data of each component in a dynamic model (such as a target dynamic model) and component relationship data of multiple components. Component data includes component identifier, component name, component type, and component description information. Component relationship data is used to characterize the subordinate relationships, constraint relationships, and / or force element relationships between various components.
[0071] The component identifier (i.e., component ID) is used to uniquely identify the component. For example, component types may include rigid components, flexible components, constrained components, force components, and boundary condition components. Component description information is used to characterize the component's attributes.
[0072] In practice, the original model data can be files exported from 3D drawing software (such as SolidWorks, CATIA, NX, Creo) or specialized multibody dynamics processing software.
[0073] The viewing operation can refer to viewing the target dynamics model. For example, the viewing operation can be clicking the topology viewing control in the menu bar of the first interface, or selecting the original model data (i.e., model file) of the target dynamics model.
[0074] S203, Based on the original model data, construct standardized topological data for the target dynamics model. The standardized topological data includes first topological data and second topological data.
[0075] The first topology data is used to render the model tree of the target dynamics model. The model tree is used to represent the hierarchical assembly relationship of the target dynamics model (i.e., the simulation object).
[0076] For example, the model tree includes multiple tree nodes, each including a root node and multiple child nodes at different levels. The node identifier of a tree node is the component identifier of the corresponding component. The node information of a tree node is determined based on the component name, component type, and component description information of the component corresponding to the tree node. Correspondingly, the first topology data may include the node identifier and node information of each tree node, as well as the logical relationships between the tree nodes.
[0077] The second topology data is used to render the force-directed graph of the target dynamics model. The force-directed graph (i.e., topologygraph) is used to describe the connection relationships (such as constraint relationships and / or force element relationships) between the various parts.
[0078] For example, a force-directed graph may include multiple graph nodes and multiple edges. An edge connects two graph nodes and represents the constraint relationship and / or force element relationship between the two graph nodes. The node identifier of a graph node is the component identifier of the component corresponding to that graph node. The edge information refers to the constraint relationship and / or force element relationship information between the components corresponding to the two graph nodes.
[0079] In some embodiments, S203 may include the following steps:
[0080] S301, parse the original model data to obtain the component data of each component of the target dynamic model and the component relationship data between each component.
[0081] Specifically, the main process of the multibody dynamics model calls the parsing module to parse the original model data and obtain the component data of each component of the target dynamics model and the component relationship data between each component.
[0082] Among them, component relationship data is used to characterize the subordinate relationships, constraint relationships and / or force element relationships between various components.
[0083] S302, based on the component data of each component and the subordinate relationships between each component, reorganize the original model data to generate the first topology data.
[0084] The component data includes the component ID, component name, and component description information.
[0085] For example, traverse all components, designate the component without a lower-level component as the root component (i.e., the overall assembly), and create a root node for the root component. Identify the lower-level components (i.e., child assemblies) belonging to the root component, and create child nodes for each of the root component's lower-level components. For each lower-level component (i.e., child assembly), identify the components belonging to the lower-level components (i.e., child assemblies) of the root component (i.e., the lowest-level child components). Create child nodes for each child component. Specifically, based on the component type of the child components, classify multiple child components, determine group nodes, and designate child components belonging to the same component type as child nodes of the corresponding group nodes. This yields the model tree and generates the first topology data of the model tree.
[0086] S303, based on the component data of each component, the constraint relationships between each component and / or force element relationships, reorganize the original model data to generate second topology data.
[0087] For example, for each part, a graph node is created, and edges are added between the graph nodes corresponding to the two parts according to the constraint relationship and / or force element relationship between the two parts, thus obtaining the force-directed graph and generating the second topology data of the force-directed graph.
[0088] S304, Determine standardized topology data based on the first topology data and the second topology data.
[0089] For example, standardized topology data such as Figure 3 As shown.
[0090] In some embodiments, after constructing standardized topological data for the target dynamics model, the main process (i.e., the building module) of the multibody dynamics application registers the standardized topological data to the web engine container through the web channel communication interface.
[0091] S204, the web front-end interface obtains standardized topology data through the web channel communication interface.
[0092] Specifically, the web front-end interface for multibody dynamics applications obtains standardized topology data from the WebEngine container through the web channel communication interface.
[0093] S205, the web front-end interface renders and displays the second interface, and in the second interface, the model tree is rendered and displayed based on the first topology data, and the force-guided graph is rendered and displayed based on the second topology data.
[0094] For example, Figure 4 This is a schematic diagram of a second interface provided in an embodiment of this application. For example... Figure 4As shown, the model tree is displayed in the left area of the second interface. The force guidance diagram is displayed in the right area of the second interface.
[0095] For example, such as Figure 4 As shown, in the model tree, the root assembly is Assembly 11. Assembly 11 includes multiple sub-assemblies, as follows:
[0096] MacPherson strut front suspension system (Font_macpherson_suspension_subsystem);
[0097] Rear multilink suspension subsystem;
[0098] Tire subsystem;
[0099] Body system;
[0100] Brake subsystem;
[0101] Pure electric front-drive powertrain system (Powertrain_Bev_FWD_subsystem);
[0102] Full Vehicle Handling Test Rig;
[0103] Rack and pinion steering subsystem.
[0104] The MacPherson strut front suspension system includes several grouped files, as follows:
[0105] Rigid parts;
[0106] Flexible component (FlexPart);
[0107] Beam element;
[0108] Bushing;
[0109] Force element;
[0110] Shock absorber;
[0111] Joint;
[0112] BumpStop;
[0113] ReboundStop;
[0114] Spring.
[0115] Taking a rigid part as an example, a rigid part includes the following components:
[0116] Ground;
[0117] Upper left shock absorber support (gel_upper_strut);
[0118] Left steering knuckle (gel_upright);
[0119] Left hub / spindle (gel_spindle);
[0120] Left turn tie rod (gel_tierod);
[0121] Lower left control arm (gel_lower_control_arm);
[0122] Upper right shock absorber support (ger_upper_strut);
[0123] Right steering knuckle (ger_upright);
[0124] Right hub / spindle (ger_spindle);
[0125] Right turn tie rod (ger_tierod);
[0126] The lower right control arm (ger_lower_control_arm).
[0127] like Figure 4 As shown, the force guidance diagram includes multiple graph nodes, such as the right steering knuckle (ger_upright), and graph nodes for other parts related to the right steering knuckle (ger_upright), such as the upper right shock absorber support (ger_upper_strut), the right wheel hub / spindle (ger_spindle), the right steering tie rod (ger_tierod), the lower right control arm (ger_lower_control_arm), and the wheel (whr_wheel).
[0128] And the edge between the right steering knuckle (ger_upright) diagram node and the diagram nodes of other related parts.
[0129] In this embodiment, each tree node in the model tree and its corresponding graph node in the force-directed graph are associated through a node ID (i.e., a component ID). Based on this, in response to a user's selection of a tree node in the model tree, the model tree is updated to display the selected tree node in a first display mode, and the force-directed graph is synchronously updated based on the node identifier (i.e., the component identifier) corresponding to the tree node, so that the corresponding graph node is displayed in the force-directed graph in the first display mode. Similarly, in response to a user's selection of a graph node in the force-directed graph, the force-directed graph is updated to display the selected graph node in the force-directed graph in the first display mode, and the model tree is synchronously updated based on the node identifier (i.e., the component identifier) corresponding to the graph node, so that the corresponding tree node is displayed in the model tree in the first display mode.
[0130] In some embodiments, the method further includes:
[0131] S401, in response to the selection operation of the first child node among multiple child nodes, the web front-end interface re-renders the model tree in the second interface, where the first child node is presented in the first display mode in the model tree.
[0132] For example, the first child node is the tree node corresponding to the component (i.e. part) that the user wants to view.
[0133] For example, the first display method could be a highlight display method.
[0134] S402, the web front-end interface determines the first node identifier corresponding to the first child node.
[0135] The node identifier of a tree node refers to the component identifier of the component corresponding to that tree node. The first node identifier is the component identifier of the component corresponding to the first child node.
[0136] S403, the web front-end interface determines the first graph node corresponding to the first node identifier among multiple graph nodes based on the first node identifier.
[0137] In this embodiment, tree nodes in the model tree and graph nodes in the force-directed graph are associated through component identifiers. Tree nodes and graph nodes corresponding to the same component have the same node identifier. Therefore, after determining the node identifier of the selected tree node, the corresponding graph node in the force-directed graph can be determined based on that node identifier.
[0138] S404, the web front-end interface re-renders the force-directed graph in the second interface, where the first graph node is presented in the first display mode in the force-directed graph.
[0139] For example, such as Figure 4As shown, when the user selects the right steering knuckle (ger_upright) tree node in the model tree, the right steering knuckle (ger_upright) tree node is highlighted in the model tree, and the right steering knuckle (ger_upright) diagram node is highlighted in the force guidance diagram.
[0140] In this embodiment, tree nodes in the model tree and graph nodes in the force-directed graph are associated through component identifiers. Tree nodes and graph nodes corresponding to the same component have the same node identifier. Therefore, in response to a user's selection of a tree node in the model tree, the model tree is updated to display the selected tree node in a first display mode. Simultaneously, based on the node identifier (i.e., component identifier) of the tree node, the force-directed graph is updated to display the corresponding graph node in the first display mode. This enables the linked display of the model tree and the force-directed graph, facilitating user operation.
[0141] In some embodiments, after constructing standardized topology data based on the original model data, the method further includes: the native rendering module rendering the model tree in a first interface according to the first topology data.
[0142] In this embodiment, after determining the first node identifier, the web front-end interface sends a first update request to the native rendering module, the first update request carrying the first node identifier; in response to the first update request, the native rendering module re-renders the model tree in the first interface, wherein the first child node in the model tree is presented in a first display mode.
[0143] In this embodiment, when the user performs operations (such as selection) on the tree nodes of the model tree in the second interface (model viewing interface), the web front-end interface interacts with the back-end of the multibody dynamics application to update the model tree of the application interface (first interface) of the multibody dynamics application. This keeps the web front-end interface and the native interface synchronized, making it convenient for the user to view other simulation data of the selected part. The operation is simple and the user experience is better.
[0144] In some embodiments, the method further includes:
[0145] S501, in response to the selection operation of the second graph node among multiple graph nodes, the web front-end interface re-renders the force-directed graph in the second interface, wherein the second graph node is presented in the first display mode in the force-directed graph.
[0146] For example, the second graph node is the graph node corresponding to the component (i.e. part) that the user wants to view.
[0147] For example, the first display method could be a highlight display method.
[0148] S502, the web front-end interface determines the second node identifier corresponding to the second node in the second diagram.
[0149] The node identifier of a graph node refers to the component identifier of the component corresponding to that graph node. The second node identifier is the component identifier of the component corresponding to the second graph node.
[0150] S503, the web front-end interface determines the second child node corresponding to the second node identifier among multiple child nodes based on the second node identifier.
[0151] In this embodiment, tree nodes in the model tree and graph nodes in the force-directed graph are associated through component identifiers. Tree nodes and graph nodes corresponding to the same component have the same node identifier. Therefore, after determining the node identifier of the selected graph node, the corresponding tree node in the model tree can be determined based on that node identifier.
[0152] S504, the web front-end interface re-renders the model tree in the second interface, where the second child node in the model tree is presented in the first display mode.
[0153] For example, such as Figure 4 As shown, when the user selects the right steering knuckle (ger_upright) graph node in the force-guided graph, the right steering knuckle (ger_upright) graph node is highlighted in the force-guided graph, and the right steering knuckle (ger_upright) tree node is highlighted in the model tree.
[0154] In this embodiment, tree nodes in the model tree and graph nodes in the force-directed graph are associated through component identifiers. Tree nodes and graph nodes corresponding to the same component have the same node identifier. In response to a user's selection of a graph node in the force-directed graph, the force-directed graph is updated to display the selected graph node in a first display mode. Simultaneously, based on the node identifier (i.e., component identifier) corresponding to the graph node, the model tree is updated to display the corresponding tree node in the model tree in the first display mode. This enables the linked display of the model tree and the force-directed graph, facilitating user operation.
[0155] In some embodiments, after constructing standardized topology data based on the original model data, the method further includes: the native rendering module rendering the model tree in a first interface according to the first topology data.
[0156] In this embodiment, after determining the second node identifier, the web front-end interface sends a second update request to the native rendering module, the second update request carrying the second node identifier; in response to the second update request, the native rendering module re-renders the model tree in the first interface, wherein the second child node is presented in the model tree in a first display mode.
[0157] In this embodiment, when the user performs operations (such as selection) on the graph nodes in the force-directed graph of the second interface (model viewing interface), the web front-end interface interacts with the back-end of the multibody dynamics application to update the model tree of the application interface (first interface) of the multibody dynamics application. This keeps the web front-end interface and the native interface synchronized, making it convenient for the user to view other simulation data of the selected part. The operation is simple and the user experience is better.
[0158] In some embodiments, in response to a drag operation on a third graph node among a plurality of graph nodes, the web front-end interface re-renders the force-directed graph in the second interface to update the position of the third graph node in the force-directed graph.
[0159] In some embodiments, in response to the deletion operation of the fourth graph node among multiple graph nodes, the web front-end interface re-renders the force-directed graph in the second interface to delete the fourth graph node and its associated edges. Additionally, the web front-end interface re-renders the model tree in the second interface based on the node identifier of the fourth graph node to delete the tree node corresponding to that node identifier in the model tree.
[0160] Additionally, the web interface sends data update requests to the main process of the multibody dynamics application, which then updates the standardized topology data.
[0161] In some embodiments, in response to a deletion operation on a third tree node among multiple tree nodes, the web front-end interface re-renders the tree model in the second interface to delete the third tree node in the model tree. Additionally, the web front-end interface re-renders the force-directed graph in the second interface based on the node identifier of the third tree node to delete the graph node corresponding to that node identifier and its associated edges.
[0162] Additionally, the web interface sends data update requests to the main process of the multibody dynamics application, which then updates the standardized topology data.
[0163] The following is a specific example illustrating the method for displaying the multibody dynamics model provided in the embodiments of this application.
[0164] Figure 5 This is a flowchart illustrating another method for displaying a multibody dynamics model provided in an embodiment of this application.
[0165] like Figure 5 As shown, the method for displaying this multibody dynamics model includes the following steps:
[0166] S601, the main process of the multibody dynamics application receives user viewing operations on the target dynamics model.
[0167] S602, in response to the viewing operation, the main process loads the raw model data of the target dynamics model.
[0168] S603, the main process parses the original model data through the parsing module to obtain parsed data (i.e., component data of each component of the target dynamic model and component relationship data of each component).
[0169] S604, the main process sends parsed data to the topology data manager.
[0170] S605, the topology data manager reorganizes the parsed data to construct standardized topology data for the target dynamics model.
[0171] In S606, the topology data manager registers standardized topology data with the web engine container via a web channel.
[0172] Specifically, the main process registers the topology data manager as an accessible object through the Qt WebChannel communication framework.
[0173] S607 establishes a communication connection between the web front-end interface for multibody dynamics applications and the WebChannel communication interface.
[0174] The web front-end interface obtains the JavaScript proxy object for the topology data manager through the WebChannel communication interface.
[0175] S608, the web front-end interface sends a data acquisition request to the topology data manager through the WebChannel communication interface, requesting to obtain standardized topology data.
[0176] The web front-end application requests topology data by calling the getTopologyData() method through a JavaScript proxy object.
[0177] S609, in response to a data retrieval request, the topology data manager sends standardized topology data to the web front-end interface.
[0178] The S610 web front-end interface is based on standardized topology data and renders the model tree and force-directed graph (i.e., topology graph) of the target dynamics model.
[0179] In summary, this hybrid architecture, based on C++ core computation and web front-end rendering, utilizes Qt WebChannel for inter-process communication (IPC), delegating UI logic to the web front-end while core computation is handled by the C++ back-end. This allows the C++ back-end to handle computationally intensive tasks such as model parsing and topology data construction, ensuring high efficiency in large-scale model processing. The web front-end only receives lightweight topology data for rendering, avoiding performance bottlenecks caused by raw data parsing on the browser side. Furthermore, it improves development efficiency and flexibility. Additionally, by embedding a browser within Qt WebEngine, users do not need to install a separate client; software deployment only requires updating web resource files, significantly reducing maintenance costs.
[0180] This application also provides a display device for a multibody dynamics model. For example... Figure 6 As shown, the display device 600 for the multibody dynamics model includes a native rendering module 601, a loading module 602, a construction module 603, and a web front-end interface 604. The native rendering module 601 displays a first interface for the multibody dynamics application. The loading module 602, in response to a loading operation on the first interface targeting the dynamics model, acquires the original model data of the target dynamics model. The construction module 603, based on the original model data, constructs standardized topology data, including first topology data and second topology data. The first topology data is used to render the model tree of the target dynamics model, and the second topology data is used to render the force-directed graph of the target dynamics model. The web front-end interface 604 acquires the standardized topology data through a web channel communication interface. The web front-end interface 604 also renders and displays a second interface, where the model tree is rendered and displayed based on the first topology data, and the force-directed graph is rendered and displayed based on the second topology data.
[0181] The electronic device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0182] Figure 7 A schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 70 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the electronic device 70 further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.
[0183] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.
[0184] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0185] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0186] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0187] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0188] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0189] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0190] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0191] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0192] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0193] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0194] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0195] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0196] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0197] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for displaying a multibody dynamics model, characterized in that, The method, applied to an electronic device including a multibody dynamics application, wherein the multibody dynamics application includes a loading module, a building module, a native rendering module, and a web front-end interface, comprises: The native rendering module displays the first interface of the multibody dynamics application; In response to a loading operation on the first interface targeting the dynamic model, the loading module acquires the original model data of the target dynamic model; The construction module constructs standardized topology data based on the original model data. The standardized topology data includes first topology data and second topology data. The first topology data is used to render the model tree of the target dynamics model, and the second topology data is used to render the force-directed graph of the target dynamics model. The web front-end interface obtains the standardized topology data through a web channel communication interface; The web front-end interface renders and displays a second interface, and in the second interface, the model tree is rendered and displayed based on the first topology data, and the force-directed graph is rendered and displayed based on the second topology data.
2. The method according to claim 1, characterized in that, The target dynamics model includes multiple components; the model tree includes multiple tree nodes, each tree node including a root node and multiple child nodes at different levels, and the node identifier of each tree node is the component identifier of the corresponding component; the force-directed graph includes multiple graph nodes and multiple edges, with one edge connecting two graph nodes; the node identifier of each graph node is the component identifier of the corresponding component. After the web front-end interface renders and displays the second interface, the method further includes: In response to the selection operation of the first child node among the plurality of child nodes, the web front-end interface re-renders the model tree in the second interface, wherein the first child node is presented in a first display mode in the model tree; The web front-end interface determines the first node identifier corresponding to the first child node. The web front-end interface determines the first graph node corresponding to the first node identifier among the plurality of graph nodes based on the first node identifier; The web front-end interface re-renders the force-directed graph in the second interface, wherein the first graph node in the force-directed graph is presented in the first display mode.
3. The method according to claim 2, characterized in that, After the construction module constructs standardized topology data based on the original model data, the method further includes: The native rendering module renders the model tree in the first interface based on the first topology data; After determining the first node identifier, the web front-end interface sends a first update request to the native rendering module, the first update request carrying the first node identifier; In response to the first update request, the native rendering module re-renders the model tree in the first interface, wherein the first child node in the model tree is presented in the first display mode.
4. The method according to claim 2, characterized in that, After the web front-end interface renders and displays the second interface, the method further includes: In response to the selection operation of the second graph node among the plurality of graph nodes, the web front-end interface re-renders the force-directed graph in the second interface, wherein the second graph node is presented in the first display mode in the force-directed graph. The web front-end interface determines the second node identifier corresponding to the second graph node; The web front-end interface determines the second child node corresponding to the second node identifier among the plurality of child nodes based on the second node identifier; The web front-end interface re-renders the model tree in the second interface, wherein the second child node in the model tree is presented in the first display mode.
5. The method according to claim 4, characterized in that, After the construction module constructs standardized topology data based on the original model data, the method further includes: The native rendering module renders the model tree in the first interface based on the first topology data; After determining the second node identifier, the web front-end interface sends a second update request to the native rendering module, the second update request carrying the second node identifier; In response to the second update request, the native rendering module re-renders the model tree in the first interface, wherein the second child node in the model tree is presented in the first display mode.
6. The method according to claim 1, characterized in that, The original model data includes component data of each component in the target dynamic model and component relationship data of the multiple components. The component data includes component identifier, component name, component type and component description information. The component relationship data is used to characterize the subordinate relationship, constraint relationship and / or force element relationship between the components. The construction module constructs standardized topology data based on the original model data, including: The construction module constructs the first topology data and the second topology data based on the component data of each component and the component relationship data between each component; The construction module constructs the standardized topology data based on the first topology data and the second topology data.
7. The method according to claim 6, characterized in that, The construction module constructs the first topology data based on the component data of each component and the component relationship data between each component, including: Based on the component data of each component and the subordinate relationships between each component, the original model data is reorganized to generate the first topology data; The model tree includes multiple tree nodes, each including a root node and multiple child nodes at different levels. The node identifier of each tree node is the component identifier of the corresponding component. The node information of each tree node is determined based on the component name, component type, and component description information of the corresponding component.
8. The method according to claim 7, characterized in that, The construction module constructs the second topology data based on the component data of each component and the component relationship data between each component, including: Based on the component data of each component, the constraint relationships and / or force element relationships between each component, the original model data is reorganized to generate the second topology data; The force-guided graph includes multiple graph nodes and multiple edges. An edge connects two graph nodes and is used to characterize the constraint relationship and / or force element relationship between the two graph nodes. The node identifier of the graph node is the component identifier of the component corresponding to the graph node.
9. A display device for a multibody dynamics model, characterized in that, include: The native rendering module is used to display the first interface for multibody dynamics applications; A loading module is used to obtain the original model data of the target dynamics model in response to a loading operation on the first interface for the target dynamics model. A construction module is used to construct standardized topology data based on the original model data. The standardized topology data includes first topology data and second topology data. The first topology data is used to render the model tree of the target dynamics model, and the second topology data is used to render the force-directed graph of the target dynamics model. A web front-end interface is used to obtain the standardized topology data through a web channel communication interface; The web front-end interface is also used to render and display a second interface, and in the second interface, the model tree is rendered and displayed based on the first topology data, and the force-directed graph is rendered and displayed based on the second topology data.
10. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-8.