Impeller machinery design software architecture and impeller machinery design method
By introducing an interface layer into the impeller mechanical design software and decoupling each functional module, the problem of low development efficiency caused by high coupling is solved, and the expansion and maintainability of the software are improved.
Patent Information
- Application Number
- CN202411524509.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-30
AI Technical Summary
Due to the high coupling between modules, impeller mechanical design software leads to low development efficiency, modifying code can easily cause problems with other modules, and the compilation efficiency is reduced.
An impeller mechanical design software architecture is designed, including application layer, business logic layer, data layer, algorithm layer and interface layer, and the various functional modules are decoupled through the interface layer to reduce the coupling degree.
It effectively improves the scalability, maintainability and compilation efficiency of software, and thus improves the efficiency of software development.
Smart Images

Figure CN119047096B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer-aided engineering, and in particular to an impeller machinery design software architecture and an impeller machinery design method. Background Art
[0002] In traditional application software development, especially in complex business processes, the interdependence problem between software modules is very common. Take the impeller machinery design software as an example. Its technical characteristics determine that in actual applications, it is necessary to process massive parameters, multiple trigger conditions and diverse algorithms, which makes the software large-scale and the amount of code can reach millions of lines.
[0003] At present, with the continuous development and iteration of impeller machinery design software, the software architecture is becoming more and more complex, and when there is mutual dependence between business processes, the coupling degree between modules will increase significantly. This high coupling degree not only makes it easy for code modifications during the development process to cause problems in other modules, but also reduces the compilation efficiency of the software, thus affecting the development and application of the software.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a turbomachinery design software architecture, thereby at least to a certain extent solving the problem in the related art of low software development efficiency due to high coupling between turbomachinery design software modules.
[0006] According to a first aspect of the present disclosure, there is provided a turbomachinery design software architecture, comprising:
[0007] The application layer is used to display the interactive interface of the impeller machinery design software and the design views generated during the impeller machinery design process;
[0008] The business logic layer is used to implement multiple functional modules of the impeller machinery design, wherein the multiple functional modules include at least one-dimensional design, detailed design, fluid simulation, structural simulation, discrete fitting and computer-aided manufacturing of the impeller machinery;
[0009] A data layer and an algorithm layer, wherein the data layer is used to display and provide the impeller machinery design data for the application layer, and the algorithm layer is used to provide the impeller machinery design algorithm corresponding to each of the functional modules for the business logic layer;
[0010] An interface layer, used to provide a corresponding interface for each of the functional modules, so that a function-dependent layer related to each of the functional modules can obtain corresponding impeller machinery design data from a function implementation layer through the interface and / or execute a corresponding impeller machinery design algorithm at the function implementation layer;
[0011] The function implementation layer and the function dependency layer include at least one layer among the application layer, the business logic layer, the data layer and the algorithm layer.
[0012] In an exemplary embodiment of the present disclosure, the interface layer includes an interface module corresponding to each of the functional modules, and each of the interface modules includes:
[0013] An interface establishment unit, used to define a corresponding business interface class for each of the functional modules;
[0014] A pointer creation unit, configured to create, in response to the running of the impeller machinery design software, an interface class object corresponding to each of the business interface classes in the function dependency layer implementation class;
[0015] A subclass construction unit, used for initializing a target function in a function implementation layer implementation class based on an interface function in the business interface class;
[0016] A business implementation unit is used to call the interface function in the business interface class through the interface class object, and call the target function in the function implementation layer implementation class according to the interface function, so that the function dependency layer uses the target function to obtain the corresponding impeller machinery design data from the function implementation layer and / or execute the corresponding impeller machinery design algorithm in the function implementation layer.
[0017] In an exemplary embodiment of the present disclosure, each of the interface modules further includes:
[0018] The virtual table creation unit is used to create a virtual table according to the interface function in the business interface class, and the virtual table at least includes the original virtual function and the corresponding original address used to implement the corresponding functional module.
[0019] In an exemplary embodiment of the present disclosure, the subclass construction unit includes:
[0020] A function construction subunit, used for initializing a target function in the implementation class of the function implementation layer according to the original virtual function in the virtual table;
[0021] The virtual table rewriting subunit is used to rewrite the original virtual function and the corresponding original address in the virtual table according to the target function and the corresponding target address.
[0022] In an exemplary embodiment of the present disclosure, the service implementation unit includes:
[0023] A virtual table determination subunit, used to determine the corresponding virtual table according to the interface class object, and call the interface function in the business interface class according to the interface class object;
[0024] The business implementation subunit is used to determine the target address corresponding to the current business type in the virtual table according to the interface function, and call the target function according to the target address to start the first business logic of obtaining the corresponding impeller machinery design data from the functional implementation layer and / or the second business logic of executing the corresponding impeller machinery design algorithm in the functional implementation layer.
[0025] According to a second aspect of the present disclosure, a turbomachinery design method is provided, which is implemented based on the turbomachinery design software architecture described in any one of the above items, and the method includes:
[0026] In response to a start-up operation for a target functional module in an interactive interface of the turbomachinery design software, determining a business interface provided by the interface layer for the target functional module;
[0027] The function dependency layer related to the target function module obtains the corresponding impeller machinery design data from the function implementation layer through the business interface and / or executes the corresponding impeller machinery design algorithm in the function implementation layer;
[0028] The function realization layer and the function dependency layer include at least one layer of the application layer, the business logic layer, the data layer and the algorithm layer.
[0029] In an exemplary embodiment of the present disclosure, the function dependency layer related to the target function module obtains corresponding impeller machinery design data from the function implementation layer through the business interface and / or executes the corresponding impeller machinery design algorithm at the function implementation layer, including:
[0030] In response to the running of the turbomachinery design software, creating an interface class object corresponding to the business interface class defined in the business interface in the function dependency layer implementation class;
[0031] Initialize the target function in the function implementation layer implementation class based on the interface function in the business interface class;
[0032] The interface function in the business interface class is called through the interface class object, and the target function in the function implementation layer implementation class is called according to the interface function, so as to start the first business logic of obtaining the corresponding impeller machinery design data from the function implementation layer and / or the second business logic of executing the corresponding impeller machinery design algorithm in the function implementation layer.
[0033] In an exemplary embodiment of the present disclosure, the method further includes:
[0034] The impeller machinery design data obtained from the function implementation layer and / or the design result after the impeller machinery design algorithm is executed in the function implementation layer are stored in the data layer and displayed through the application layer.
[0035] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements any of the above-mentioned impeller machinery design methods when executed by a processing unit.
[0036] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:
[0037] A processing unit; and a storage unit for storing executable instructions of the processing unit; wherein the processing unit is configured to execute any of the above-mentioned impeller machine design methods by executing the executable instructions.
[0038] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:
[0039] In the impeller machinery design software architecture provided in the exemplary embodiment of the present disclosure, the application layer is used to display the interactive interface of the impeller machinery design software and the design view generated in the impeller machinery design process; the business logic layer is used to implement multiple functional modules of the impeller machinery design; the data layer is used to provide the impeller machinery design data for the application layer display; the algorithm layer is used to provide the impeller machinery design algorithm corresponding to each functional module; the interface layer is used to provide a corresponding interface for each functional module, so that the function dependency layer related to each functional module obtains the corresponding impeller machinery design data from the function implementation layer through the interface and / or executes the corresponding impeller machinery design algorithm in the function implementation layer, wherein the function implementation layer and the function dependency layer include at least one layer of the application layer, the business logic layer, the data layer and the algorithm layer. The present disclosure can solve the problem of mutual dependence between the business logic layer, the application layer, the data layer and the algorithm layer used for the impeller machinery design by adding the interface layer, thereby reducing the coupling degree between the modules of the software, and can effectively improve the scalability, maintainability and compilation efficiency of the software in combination with the layered architecture formed based on the interface layer, thereby improving the software development efficiency.
[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0042] Figure 1 A schematic diagram of a turbomachinery design software architecture in an embodiment of the present disclosure is shown.
[0043] Figure 2 A structural schematic diagram of an interface layer in a turbomachinery design software architecture in an embodiment of the present disclosure is shown.
[0044] Figure 3 A flow chart of a turbomachinery design software method in an embodiment of the present disclosure is shown.
[0045] Figure 4 A schematic diagram showing the principle of interaction between the application layer and the business logic layer in a turbomachinery design software architecture in an embodiment of the present disclosure is shown.
[0046] Figure 5 A schematic diagram showing the principle of interaction between a business logic layer and a business logic layer in a turbomachinery design software architecture in an embodiment of the present disclosure is shown.
[0047] Figure 6 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown.
[0048] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0049] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0050] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0051] The exemplary embodiment of the present disclosure provides a turbomachinery design software architecture, referring to Figure 1 As shown, the impeller machinery design software architecture includes an application layer 101, a business logic layer 102, a data layer 103, an algorithm layer 104 and an interface layer 105. Among them, the application layer 101 is used to display the interactive interface of the impeller machinery design software and the design view generated during the impeller machinery design process. The business logic layer 102 is used to implement multiple functional modules of the impeller machinery design, and the multiple functional modules at least include one-dimensional design, detailed design, fluid simulation, structural simulation, discrete fitting and computer-aided processing and manufacturing of the impeller machinery. The data layer 103 is used to provide the impeller machinery design data for the application layer display, and the algorithm layer 104 is used to provide the impeller machinery design algorithm corresponding to each functional module for the business logic layer. The interface layer 105 is used to provide a corresponding interface for each functional module, so that the function dependency layer related to each functional module obtains the corresponding impeller machinery design data from the function implementation layer through the interface and / or executes the corresponding impeller machinery design algorithm in the function implementation layer.
[0052] It should be noted that the function implementation layer and the function dependency layer related to each function module include at least one of the application layer, the business logic layer, the data layer and the algorithm layer. Among them, for any function module in the impeller machinery design software architecture, the function implementation layer and the function dependency layer related to the function module may be the same or different, and the present disclosure does not limit this. For example, the function implementation layer related to the discrete fitting module may be the business logic layer 102, and the function dependency layer may be the application layer 101, so as to realize the interaction with the interactive interface in the discrete fitting process. For another example, the function implementation layer and the function dependency layer related to the detailed design module may both be the business logic layer 102. When entering the detailed design module through the discrete fitting operation interface, the business processing flow of the detailed design can be performed according to the impeller machinery design data obtained by the discrete fitting module.
[0053] Exemplarily, in the application layer 101, the interactive interface of the impeller machinery design software may include a menu bar, a navigation bar, a shortcut toolbar, and a dialog box, etc. Among them, the shortcut toolbar may include commonly used tool buttons such as creating new components, adding boundary conditions, and running simulation calculations, and the dialog box may be used for functions such as inputting parameters, setting options, and confirming operations. The design views generated during the impeller machinery design process may include meridian views, three-dimensional views, various views related to blade parameters such as blade thickness distribution diagrams, flow channel cross-section diagrams, residual curve diagrams of the solution process, cloud diagrams after solution such as pressure distribution diagrams, temperature distribution diagrams, and line diagrams such as pressure gradient diagrams along the blade surface.
[0054] In the business logic layer 102, the one-dimensional design module may include calculating the geometric data and aerodynamic data of the impeller machinery according to the aerodynamic parameters of the impeller machinery and the fluid working medium provided by the application layer 101; the detailed design module may include performing detailed design according to the blade flow channel data input by the one-dimensional design module; the fluid simulation module may include verifying whether the designed impeller machinery can achieve the expected performance effect through simulation calculation according to the blade data, flow channel data and aerodynamic data generated by the detailed design module; the structural simulation module may include generating a three-dimensional model according to the blade data and hub casing data generated by the detailed design module, as well as generating a grid and adding boundary conditions according to the three-dimensional model, and predicting and optimizing the structural design of the impeller machinery by simulating and analyzing the response of the impeller machinery structure under various working conditions through computer.
[0055] The data layer 103 includes at least various types of impeller machinery design data such as aerodynamic data, fluid data, flow channel parameter data, section data, blade data, flow channel data, grid data, boundary condition data and solution data. The algorithm layer 104 provides at least various impeller machinery design algorithms required for realizing impeller machinery design, such as basic geometry algorithm, three-dimensional modeling algorithm, flow channel geometry smoothing algorithm, structured grid generation algorithm, unstructured grid generation algorithm and surface discretization algorithm.
[0056] The interface layer 105 can separate the application layer 101, business logic layer 102, data layer 103 and algorithm layer 104 in the impeller machinery design software architecture, that is, the layers or modules with dependencies can exchange information indirectly through the interface provided by the interface layer 105. For example, for the discrete fitting module, the discrete function is started by the application layer 101, but the discrete fitting function is implemented by the business logic layer 102, and it is necessary to pick up the corresponding geometric elements from the model view displayed by the application layer 101 for discrete fitting. At this time, the interface layer 105 can be used to pick up the geometric elements from the application layer 101, and the interface layer 105 passes the obtained geometric elements to the business logic layer 102 for discrete fitting processing.
[0057] By adding the interface layer 105 to the impeller machinery design software architecture, not only the coupling relationship between the modules of each layer is solved, but also each part can work together correctly, thereby ensuring the stable application and upgrade of the software. In addition, the interface layer 105 provides a unified calling method for multiple functional modules in the impeller machinery design software architecture, so that new functional modules can be easily integrated into the existing system architecture, and it is also convenient for the old functional modules to be upgraded or replaced.
[0058] In the exemplary implementation of the present disclosure, the interface layer 105 includes interface modules corresponding to each functional module. Specifically, when building the interface layer 105, corresponding interface modules are established according to different functional modules. Figure 2 As shown, a schematic diagram of the structure of an interface layer is given, wherein the interface layer 105 includes a detailed design interface module, a fluid simulation interface module, a structural simulation interface module, a discrete fitting interface module, a geometric algorithm interface module, etc. Furthermore, by defining a specific interface in the interface module and establishing a connection with the corresponding layer through the interface, the direct dependency relationship between different modules in the software architecture can be changed, thereby achieving decoupling between the modules.
[0059] For each interface module, it includes an interface establishment unit, a pointer creation unit, a subclass construction unit and a business implementation unit. Among them, the interface establishment unit is used to define the corresponding business interface class for each functional module. The business interface class refers to the specific class that implements the interface and provides the specific implementation of the method declared in the interface. For example, for the discrete fitting module, the defined business interface class can be a discrete fitting operation interface class or a window interface class. It can be understood that for different business interface classes defined in the same functional module, the corresponding function implementation layer and function dependency layer can be the same or different. Still taking the discrete fitting module as an example, for the discrete fitting operation interface class defined in the module, the corresponding function implementation layer is the business logic layer, and the function dependency layer is the application layer, while for the window interface class, the corresponding function implementation layer is the application layer, and the function dependency layer is the business logic layer. It can be seen that the specific implementation of the methods provided by different business interface classes is also different, corresponding to different business processing modules.
[0060] Furthermore, the interface establishment unit also includes an interface description generation subunit, which is used to generate corresponding interface description documents according to the definition of each business interface class to facilitate development and maintenance.
[0061] Exemplarily, the interface description generation subunit uses the reflection mechanism to dynamically obtain interface information to ensure the accuracy of the interface information, and parses the metadata of the business interface class including the class name, method name, parameter type, return value type, comments, etc. The parsing result supports multiple document format outputs. In addition, a template engine can be provided to generate documents to ensure a unified document format. When the business interface class is modified, the interface description generation subunit can automatically update the document.
[0062] Based on the generated interface description document, developers can quickly understand the use of the interface and reduce errors caused by interface changes. Moreover, development can be based on the same interface document to reduce communication costs. At the same time, the automatic generation of documents reduces the workload of manual writing and the probability of errors, making the development process of impeller machinery design software more efficient and reliable.
[0063] It should be noted that each interface module also includes a virtual table creation unit, which is used to create a virtual table according to the interface function in the business interface class when creating the business interface class. The virtual table at least includes the original virtual function and the corresponding original address for implementing the corresponding functional module. Among them, since the interface function in the business interface class is a pure virtual function, the original address in the virtual table is empty accordingly. It should be noted that in actual use, the original address is empty, which means that the initialization or rewriting has not been completed during the construction process, and the address currently points to a default error handling function. Therefore, when constructing a subclass later, it is necessary to ensure that all interface functions are correctly initialized or rewritten to avoid errors at runtime.
[0064] The pointer creation unit is used to create interface class objects corresponding to each business interface class in the functional dependency layer implementation class in response to the operation of the impeller machinery design software. For example, for the discrete fitting operation interface class defined by the discrete fitting module, when the impeller machinery design software is running, a corresponding interface class object will be created in the functional dependency layer such as the application layer, recorded as m_pDispFitRun, where m represents a member variable in a class, which can store data or call functions in the class, p represents a pointer to an object or data structure, and DispFitRun represents the object type or function pointed to by the pointer, that is, m_pDispFitRun is a member variable in the discrete fitting operation interface class, which is used to point to the discrete fitting business module in the functional implementation layer such as the business logic layer.
[0065] The subclass construction unit is used to initialize the target function in the function implementation layer implementation class based on the interface function in the business interface class. In the exemplary implementation of the present disclosure, the subclass construction unit includes a function construction subunit and a virtual table rewriting subunit. Among them, the function construction subunit is used to initialize the target function in the function implementation layer implementation class according to the original virtual function in the virtual table, and the target function refers to the virtual function redefined in the function implementation layer implementation class. The virtual table rewriting subunit is used to rewrite the original virtual function and the corresponding original address in the virtual table according to the target function and the corresponding target address.
[0066] For example, when building a subclass, in addition to constructing member variables, the target function in the function implementation layer implementation class is initialized by rewriting the original virtual function in the virtual table. At the same time, the target function and target address in the implementation layer implementation class are used to replace the original virtual function and original address in the virtual table, thereby ensuring that the virtual function in the function implementation layer implementation class can be executed correctly during polymorphic calls.
[0067] The business implementation unit is used to call the interface function in the business interface class through the interface class object, and call the target function in the function implementation layer implementation class according to the interface function, so that the function dependency layer uses the target function to obtain the corresponding impeller machinery design data from the function implementation layer and / or execute the corresponding impeller machinery design algorithm in the function implementation layer.
[0068] In an example implementation, the business implementation unit includes a virtual table determination subunit and a business implementation subunit. The virtual table determination subunit is used to determine the corresponding virtual table according to the interface class object, and call the interface function in the business interface class according to the interface class object. For example, when calling the interface function in the business interface class through the interface class object, the virtual function pointer of the business interface class is first searched, and the corresponding virtual table is determined through the virtual function pointer.
[0069] The business implementation subunit is used to determine the target address corresponding to the current business type in the virtual table according to the interface function, and call the target function according to the target address to start the first business logic of obtaining the corresponding impeller machinery design data from the function implementation layer and / or the second business logic of executing the corresponding impeller machinery design algorithm in the function implementation layer. Among them, the current business type includes at least one of obtaining impeller machinery design data and executing the impeller machinery design algorithm. For example, if the current business type is to obtain impeller machinery design data, the target address of the specific implementation is found from the virtual table, and the corresponding target function is called, so that the correct function implementation is called according to the actual object type when the impeller machinery design software is running, that is, the target function for obtaining the impeller machinery design data is called, thereby realizing polymorphism and improving the flexibility of the impeller machinery design software architecture.
[0070] In the example implementation of the present disclosure, the interface functions in the business interface class defined in the interface layer implement the interface in the corresponding layer by deriving the subclass from the base class provided by the business interface. Since the interface methods in the business interface class are pure virtual methods, the interface layer can be independently compiled without relying on other modules in the software system when compiling, and there will be no compilation error problem. Moreover, when the entire software is compiled, the functional modules in the software system do not rely on other functional modules, but rely on the interface layer, so there will be no reverse dependency, thereby solving the problems of complex relationships between software modules, difficult system expansion, and difficult software maintenance due to reverse dependency of functional modules in the software architecture.
[0071] The exemplary embodiment of the present disclosure also provides a turbomachinery design software method, which is implemented based on the turbomachinery design software architecture. Figure 3 As shown, the method may include the following steps S310 and S320:
[0072] Step S310, in response to a start-up operation on a target functional module in an interactive interface of the turbomachinery design software, determining a business interface provided by the interface layer for the target functional module.
[0073] The target function module may be any module in the one-dimensional design, detailed design, fluid simulation, structural simulation, discrete fitting and computer-aided manufacturing of the impeller machinery, and may also be other function modules used for the impeller machinery design, which is not limited in the present disclosure. The start-up operation of the target function module may be any operation that acts on the interactive interface of the impeller machinery design software and can activate the target function module, such as starting the corresponding impeller machinery design function by clicking the function control corresponding to the target function module.
[0074] When the user starts the target function module, the application layer can convert the user request into a form recognizable within the software, thereby determining the business interface provided by the interface layer for the target function module, so as to realize information interaction between the function dependency layer and the function implementation layer related to the target function module through the business interface.
[0075] Step S320, the function dependency layer related to the target function module obtains the corresponding impeller machinery design data from the function implementation layer through the business interface and / or executes the corresponding impeller machinery design algorithm in the function implementation layer; wherein the function implementation layer and the function dependency layer include at least one layer of the application layer, the business logic layer, the data layer and the algorithm layer.
[0076] In the impeller machinery design software, the function dependency layer and the function implementation layer can be at least one of the application layer, business logic layer, data layer and algorithm layer, and of course can also be part of each layer. The function dependency layer relies on the services provided by the function implementation layer to perform corresponding processing or operations. The function implementation layer contains specific business logic, algorithm processing or data access logic to perform specific functions.
[0077] Exemplarily, in response to the running of the impeller machinery design software, an interface class object corresponding to the business interface class defined by the business interface can be first created in the function dependency layer implementation class, and the target function in the function implementation layer implementation class can be initialized based on the interface function in the business interface class. Then, the interface function in the business interface class is called through the interface class object, and the target function in the function implementation layer implementation class is called according to the interface function to start the first business logic of obtaining the corresponding impeller machinery design data from the function implementation layer and / or the second business logic of executing the corresponding impeller machinery design algorithm in the function implementation layer. Finally, the impeller machinery design data obtained from the function implementation layer and / or the design results after the impeller machinery design algorithm is executed in the function implementation layer can be stored in the data layer and displayed through the application layer.
[0078] The impeller machinery design software method provided by the exemplary embodiment of the present disclosure can, on the one hand, ensure that the communication between each functional module is carried out through a predetermined interface by defining a business interface, rather than directly accessing the internal implementation, thereby improving the modularity of the software and enabling each functional module to be independently developed, tested and maintained; on the other hand, the functional dependency layer and the functional implementation layer interact through the interface, thereby reducing the coupling between the two. When the functional implementation layer changes, as long as the interface definition remains unchanged, the functional dependency layer does not need to be changed, thereby reducing the risk caused by the modification; and, by introducing an interface layer between the functional dependency layer and the functional implementation layer, the robustness of the software can be increased. Even if the underlying data or algorithm changes, as long as the interface remains unchanged, it will not affect the upper-layer application logic. After the interface is defined, the functional dependency layer and the functional implementation layer can be developed in parallel, thereby improving the development efficiency; importantly, for complex impeller machinery design tasks, by decomposing the task into multiple functional modules and coordinating them through the interface layer, the design and implementation process of each module can be effectively simplified; on the other hand, the interface layer can be used as a barrier to protect the underlying data and algorithms from being directly accessed. Only authenticated and authorized requests can interact with the functional implementation layer through the interface layer, thereby improving the security of the software.
[0079] In a specific embodiment, taking the discrete fitting module in the impeller machinery design software architecture as an example, it is necessary to interact with the main interface of the program (that is, the interactive interface of the impeller machinery design software) during the discrete fitting process. First, the discrete fitting function is started by the application layer, and the discrete fitting function is implemented by the business logic layer. Among them, the discrete fitting business module in the business logic layer needs to rely on the three-dimensional view provided by the discrete fitting main window in the application layer to complete the selection operation of the geometric elements when executing the discrete fitting logic. Similarly, the discrete fitting main window also needs to rely on the discrete fitting business module to perform specific discrete calculations, so as to display the discrete fitting results.
[0080] refer to Figure 4 As shown in the figure, a schematic diagram of the interaction between the application layer and the business logic layer in the impeller machinery design software architecture is given. Figure 4 In the interface layer, two interface classes are defined, including IDispFitRunBase class (discrete fitting interface class) and IModelMainWindow class (window interface class). Therefore, when implementing the discrete fitting function, the interface class object m_pDispFitRun corresponding to the IDispFitRunBase class and the interface class object m_pDispFitWnd corresponding to the IModelMainWindow class can be used to decouple the application layer and the business logic layer.
[0081] In addition, the IDispFitRunBase class defines multiple interface functions including runPickFitEntity, and the IModelMainWindow class defines multiple interface functions including firePickFitEntity. Each interface function is used to define the basic behavior of discrete fitting business processing. Moreover, the DisperseFitRunModel (discrete fitting business module) class inherits from the IDispFitRunBase class, and the TurbDisperseFitWindow (discrete fitting main window) class inherits from the IModelMainWindow class. In other words, the DisperseFitRunModel class and the TurbDisperseFitWindow class both provide specific business logic implementations.
[0082] Specifically, when the impeller machinery design software is running, an interface class object m_pDispFitRun will be constructed in the application layer. The interface class object is a pointer to the DisperseFitRunModel class in the business logic layer. Taking the construction of the DisperseFitRunModel class as an example, it is necessary to first create the IDispFitRunBase class and the virtual table shown in Table 1. It should be noted that the calling function recorded in the virtual table is consistent with the interface function in the IDispFitRunBase class. Since the interface function in the IDispFitRunBase class is a pure virtual function, the calling function in the virtual table is the default purecall, indicating that no specific implementation has been provided.
[0083] Table 1
[0084]
[0085] After the IDispFitRunBase class is constructed, the DisperseFitRunModel class is constructed. At this time, in addition to constructing member variables, the virtual functions in the DisperseFitRunModel class are initialized by rewriting the virtual functions in the IDispFitRunBase class, and the specific function addresses implemented by them are replaced with the function addresses and call functions in the virtual table shown in Table 1, thereby obtaining a new virtual table as shown in Table 2. It should be noted that the function addresses in Table 2 are the function addresses in the DisperseFitRunModel class, so that the corresponding implementation methods in the DisperseFitRunModel class are called by calling the virtual methods in the IDispFitRunBase class.
[0086] Table 2
[0087]
[0088] During the operation of the impeller machinery design software, the discrete fitting main window calls the runPickFitEntity (run pick fitting entity) function in the IDispFitRunBase class through the interface class object m_pDispFitRun, but actually calls the runPickFitEntity function in the DisperseFitRunModel class, thereby starting the pick fitting entity process in the discrete fitting business module. In this process, the application layer no longer directly depends on the specific business processing implementation (i.e., the DisperseFitRunModel class), but indirectly accesses it through the interface.
[0089] In addition, in addition to setting the discrete parameters, it is also necessary to start the picking function of geometric elements on the three-dimensional entity when starting the process of picking and fitting entities. At this time, the discrete fitting business module accesses the firePickFitEntity (trigger picking and fitting entity) function in the IModelMainWindow class through the interface class object m_pDispFitWnd, thereby calling the firePickFitEntity function in the TurbDisperseFitWindow (discrete fitting main window) class, and starts executing the logic of picking entities at the application layer.
[0090] During the entire interaction process, access between modules is achieved through the interface layer, avoiding mutual dependence between the business logic layer and the application layer. The two modules are technically isolated, thereby reducing the coupling between modules. Each module can be modified or expanded independently without affecting other modules, thereby improving the maintainability and flexibility of the software system.
[0091] In another specific embodiment, the interaction between the discrete fitting module and the detailed design module in the impeller machinery design software architecture is taken as an example. Specifically, in the impeller machinery design process, after the blade section and other geometric data are generated according to the discrete point fitting of the model, it is necessary to enter the detailed design module to generate data related to the detailed design. At this time, there is a problem of mutual dependence between the discrete fitting business module and the detailed design business module.
[0092] refer to Figure 5 As shown in the figure, a schematic diagram of the interaction between different functional modules in the business logic layer of the impeller machinery design software architecture is given. Figure 5 In the interface layer, two interface classes are defined, including ITurbFit class (discrete fitting data interface class) and IDetailDesign class (detailed design interface class). When implementing the detailed design function, the interface class object m_pTurbFit corresponding to the ITurbFit class and the interface class object m_pDetailDesign corresponding to the IDetailDesign class can be used to decouple the detailed design business module and the discrete fitting data module in the business logic layer.
[0093] Specifically, the discrete fitting data module generates blade row section data through the genSectionRowSpans method in the IDetailDesign class. When generating blade row section data, the detailed design business module obtains the original section data and fitting parameter data in the discrete fitting data module through the getOriDataFile method in the ITurbFit class, so as to continue to generate blade data using the original section data and fitting parameter data. For example, when the IDetailDesign class processes the detailed design business function, it can access the business process in the ITurbFit class by calling the getOriDataFile method in the ITurbFit class through the interface class object m_pTurbFit.
[0094] In this example implementation, the coupling between the discrete fitting data module and the detailed design business module is also reduced through the interface layer, so that each module can be modified or expanded independently, improving the robustness and scalability of the impeller machinery design software. In addition, in the related art, the way to solve the coupling problem when entering the detailed design stage after the discrete fitting is to write to the disk file, for example, to initialize the detailed design module by reading the disk file. This process adds read and write steps and incurs additional time. In the example implementation of the present disclosure, although the amount of code is increased due to the addition of the interface layer, there is no read and write operation on the disk, so the overall efficiency is improved.
[0095] Finally, it should be noted that the example implementation of the present disclosure can solve the coupling relationship between the business logic layer and the business logic layer, the business logic layer and the application layer, the business logic layer and the algorithm layer, the business logic layer and the data layer, the application layer and the application layer, the algorithm layer and the application layer, the data layer and the application layer, the algorithm layer and the algorithm layer, the data layer and the data layer, and the data layer and the algorithm layer, which are related to different functional modules, and the present disclosure does not limit this. Among them, by establishing an interface module corresponding to each functional module, defining the corresponding business interface class and adding pure virtual methods in the interface module, the class in the functional implementation module inherits from the business interface class, thereby associating the pure virtual method of the business interface class with the specific implementation method, so that other modules that rely on the functional implementation module can achieve the expected calling effect through the interface module, thereby decoupling different functional modules with dependencies and improving software development efficiency.
[0096] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification. The program product can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this. In this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0097] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0098] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0099] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0100] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C#, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0101] The exemplary embodiment of the present disclosure also provides an electronic device capable of implementing the above method. Figure 6 The electronic device 600 according to this exemplary embodiment of the present disclosure is described. Figure 6 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0102] like Figure 6 As shown, the electronic device 600 may be in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), and a display unit 640.
[0103] The storage unit 620 stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 610 can execute Figure 3 The method steps in .
[0104] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 621 and / or a cache memory unit (Cache) 622 , and may further include a read-only memory unit (ROM) 623 .
[0105] The storage unit 620 may also include a program / utility 624 having a set (at least one) of program modules 625, such program modules 625 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0106] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0107] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication may be performed through an input / output (I / O) interface 650. In addition, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 through a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0108] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary implementation of the present disclosure.
[0109] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiment of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0110] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0111] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0112] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A turbomachinery design software architecture system, characterized in that: include: The application layer is used to display the interactive interface of the impeller machinery design software and the design views generated during the impeller machinery design process; The business logic layer is used to implement multiple functional modules of the impeller machinery design, wherein the multiple functional modules include at least one-dimensional design, detailed design, fluid simulation, structural simulation, discrete fitting and computer-aided manufacturing of the impeller machinery; A data layer and an algorithm layer, wherein the data layer is used to display and provide the impeller machinery design data for the application layer, and the algorithm layer is used to provide the impeller machinery design algorithm corresponding to each of the functional modules for the business logic layer; An interface layer, used to provide a corresponding interface for each of the functional modules, so that a function-dependent layer related to each of the functional modules can obtain corresponding impeller machinery design data from a function implementation layer through the interface and / or execute a corresponding impeller machinery design algorithm at the function implementation layer; The interface layer includes interface modules corresponding to the functional modules, and each interface module includes: An interface establishment unit, used to define a corresponding business interface class for each of the functional modules; A pointer creation unit, configured to create, in response to the running of the impeller machinery design software, an interface class object corresponding to each of the business interface classes in the function dependency layer implementation class; A subclass construction unit, used for initializing a target function in a function implementation layer implementation class based on an interface function in the business interface class; A business implementation unit, configured to call the interface function in the business interface class through the interface class object, and call the target function in the function implementation layer implementation class according to the interface function, so that the function dependency layer obtains the corresponding impeller machinery design data from the function implementation layer by using the target function and / or executes the corresponding impeller machinery design algorithm in the function implementation layer; The function implementation layer and the function dependency layer include at least one layer among the application layer, the business logic layer, the data layer and the algorithm layer.
2. The impeller machinery design software architecture system according to claim 1, characterized in that: Each of the interface modules further includes: The virtual table creation unit is used to create a virtual table according to the interface function in the business interface class, and the virtual table at least includes the original virtual function and the corresponding original address used to implement the corresponding functional module.
3. The impeller machinery design software architecture system according to claim 2, characterized in that: The subclass construction units include: A function construction subunit, used for initializing a target function in the implementation class of the function implementation layer according to the original virtual function in the virtual table; The virtual table rewriting subunit is used to rewrite the original virtual function and the corresponding original address in the virtual table according to the target function and the corresponding target address.
4. The impeller machinery design software architecture system according to claim 3, characterized in that: The business implementation unit includes: A virtual table determination subunit, used to determine the corresponding virtual table according to the interface class object, and call the interface function in the business interface class according to the interface class object; The business implementation subunit is used to determine the target address corresponding to the current business type in the virtual table according to the interface function, and call the target function according to the target address to start the first business logic of obtaining the corresponding impeller machinery design data from the functional implementation layer and / or the second business logic of executing the corresponding impeller machinery design algorithm in the functional implementation layer.
5. A turbomachinery design method, characterized in that: Based on the impeller machinery design software architecture system according to any one of claims 1 to 4, the method comprises: In response to a start-up operation for a target functional module in an interactive interface of the turbomachinery design software, determining a business interface provided by the interface layer for the target functional module; The function dependency layer related to the target function module obtains the corresponding impeller machinery design data from the function implementation layer through the business interface and / or executes the corresponding impeller machinery design algorithm in the function implementation layer; The function realization layer and the function dependency layer include at least one layer of the application layer, the business logic layer, the data layer and the algorithm layer.
6. The impeller machine design method according to claim 5, characterized in that: The function dependency layer related to the target function module obtains the corresponding impeller machinery design data from the function implementation layer through the business interface and / or executes the corresponding impeller machinery design algorithm at the function implementation layer, including: In response to the running of the turbomachinery design software, creating an interface class object corresponding to the business interface class defined in the business interface in the function dependency layer implementation class; Initialize the target function in the function implementation layer implementation class based on the interface function in the business interface class; The interface function in the business interface class is called through the interface class object, and the target function in the function implementation layer implementation class is called according to the interface function, so as to start the first business logic of obtaining the corresponding impeller machinery design data from the function implementation layer and / or the second business logic of executing the corresponding impeller machinery design algorithm in the function implementation layer.
7. The impeller machine design method according to claim 5, characterized in that: The method further comprises: The impeller machinery design data obtained from the function implementation layer and / or the design result after the impeller machinery design algorithm is executed in the function implementation layer are stored in the data layer and displayed through the application layer.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing unit, the method according to any one of claims 5 to 7 is implemented.
9. An electronic device, characterized in that: include: Processing unit; as well as A storage unit, used to store executable instructions of the processing unit; Wherein, the processing unit is configured to perform the method of any one of claims 5-7 by executing the executable instructions.
Citation Information
Patent Citations
Construction method of universal machine vision platform system for industrial detection
CN117406963A
Application development system, application development method and device, equipment and storage medium
CN117971183A