System platform and heterogeneous model decoupling method and device, computer equipment and medium
By extracting the public data structures and attributes of heterogeneous models, building standardized data structures, and uniformly encapsulated, the problems of high system complexity and high maintenance costs are solved, seamless integration and collaborative operation of heterogeneous models are achieved, and the flexibility and performance of the system are improved.
Patent Information
- Application Number
- CN202510287286.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the system is complex and has high maintenance costs, and there is a general decoupling method that can seamlessly integrate heterogeneous models developed by different languages into a unified system platform.
By obtaining metadata from each heterogeneous model, analyzing the metadata, extracting public data structures and attributes, building a standardized heterogeneous model data structure, and unified packaging of the heterogeneous model based on this, building a driver module with a unified data interface to realize data interaction between the heterogeneous model and the system platform.
It realizes unified processing of data from different sources and formats, reduces system complexity and maintenance difficulty, enhances system flexibility and interoperability, enables different heterogeneous models to collaborate seamlessly in the same system, and improves the overall performance and practicality of the system.
Smart Images

Figure CN119806637A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology, and in particular to a method, device, computer equipment and medium for decoupling a system platform from heterogeneous models. Background Art
[0002] In modern software systems, it has become common to integrate multiple heterogeneous models (such as machine learning models, physical simulation models, optimization algorithms, etc.). These models may be developed in different programming languages (such as Python, Java, C++, etc.) and run on different hardware platforms (such as CPU, GPU, TPU, etc.). Traditional integration methods usually require the development of specific interfaces for each model, resulting in high system complexity, high maintenance costs, and difficulty in expansion.
[0003] In the existing technology, there is a lack of a universal decoupling method that can seamlessly integrate heterogeneous models developed in different languages into a unified system platform. Therefore, a new technical solution is urgently needed to solve the above problems. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method for decoupling a system platform from a heterogeneous model to solve the technical problems of high system complexity and high maintenance cost in the prior art. The method includes: Obtain metadata from each heterogeneous model, analyze the metadata, and extract common data structures and attributes, including: using ETL tools to extract metadata files; performing structural analysis on the extracted metadata files, and using structural matching algorithms to extract common data structures in each heterogeneous model; performing attribute analysis on the extracted metadata files, and using semantic matching algorithms to extract common attributes in each heterogeneous model; Constructing a standardized heterogeneous model data structure, wherein the common data structure and attributes provide basic fields and data types for the standardized heterogeneous model data structure; Based on the standardized heterogeneous model data structure, the heterogeneous models are uniformly encapsulated; A driver module with a unified data interface is constructed, and the encapsulated heterogeneous models interact with the system platform through the driver module to achieve collaborative simulation operation.
[0005] The embodiment of the present invention also provides a system platform and heterogeneous model decoupling device to solve the technical problems of high system complexity and high maintenance cost in the prior art. The device includes: The extraction module is used to obtain metadata from various heterogeneous models, analyze the metadata, and extract common data structures and attributes, including: using ETL tools to extract metadata files; performing structural analysis on the extracted metadata files, and using structural matching algorithms to extract common data structures in various heterogeneous models; performing attribute analysis on the extracted metadata files, and using semantic matching algorithms to extract common attributes in various heterogeneous models; A standardized construction module, used to construct a standardized heterogeneous model data structure, wherein the common data structure and attributes provide basic fields and data types for the standardized heterogeneous model data structure; An encapsulation module, used for uniformly encapsulating heterogeneous models based on the standardized heterogeneous model data structure; The interaction module is used to construct a driver module with a unified data interface. The encapsulated heterogeneous model interacts with the system platform through the driver module to achieve collaborative simulation operation.
[0006] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned system platform and heterogeneous model decoupling methods to solve the technical problems of high system complexity and high maintenance cost in the prior art.
[0007] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program for executing any of the above-mentioned system platform and heterogeneous model decoupling methods to solve the technical problems of high system complexity and high maintenance cost in the prior art.
[0008] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above technical solutions adopted in the embodiments of this specification include at least: obtaining metadata from each heterogeneous model, analyzing the metadata, and extracting common data structures and attributes; constructing a standardized heterogeneous model data structure, and the common data structure and attributes provide basic fields and data types for the standardized heterogeneous model data structure; based on the standardized heterogeneous model data structure, the heterogeneous models are uniformly encapsulated; a driver module with a unified data interface is constructed, and the encapsulated heterogeneous model interacts with the system platform through the driver module to realize the collaborative operation of simulation. The present application defines a standardized data structure so that data from different sources and formats can be processed uniformly. Even if a new model is introduced or a new data type needs to be supported, it is only necessary to update the standardized data structure and mapping rules, thereby improving the flexibility of the system; the standardized data structure also avoids the situation where each model needs to design and implement data processing logic separately, reducing the overall complexity of the system and reducing the difficulty of maintenance; through a unified data interface, different models can work together on the same platform, providing a stable data interaction mechanism, ensuring the reliability and accuracy of data transmission, and enhancing the interoperability of the system, so that different heterogeneous models can work seamlessly in the same system, improving the overall performance and practicality of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0010] Figure 1 is a flow chart of a method for decoupling a system platform and a heterogeneous model provided by an embodiment of the present invention; Figure 2 is a structural block diagram of a computer device provided by an embodiment of the present invention; Figure 3 It is a structural block diagram of a system platform and heterogeneous model decoupling device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0011] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0012] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0013] In an embodiment of the present invention, a method for decoupling a system platform from a heterogeneous model is provided, such as Figure 1 As shown, the method includes: Step S101, obtaining metadata from each heterogeneous model, analyzing the metadata, and extracting common data structures and attributes, including: using an ETL tool to extract metadata files; performing structural analysis on the extracted metadata files, and using a structural matching algorithm to extract common data structures in each heterogeneous model; performing attribute analysis on the extracted metadata files, and using a semantic matching algorithm to extract common attributes in each heterogeneous model; Step S102: construct a standardized heterogeneous model data structure, wherein the common data structure and attributes provide basic fields and data types for the standardized heterogeneous model data structure; Step S103: based on the standardized heterogeneous model data structure, uniformly encapsulate the heterogeneous models; Step S104: construct a driver module with a unified data interface, and the encapsulated heterogeneous model interacts with the system platform through the driver module to achieve collaborative simulation operation.
[0014] In this embodiment, by defining a standardized data structure, data from different sources and formats can be processed in a unified manner. Even if a new model is introduced or a new data type needs to be supported, it is only necessary to update the standardized data structure and mapping rules, thereby improving the flexibility of the system. The standardized data structure also avoids the situation where each model needs to design and implement data processing logic separately, thereby reducing the overall complexity of the system and the difficulty of maintenance. Through a unified data interface, different models can work together on the same platform, providing a stable data interaction mechanism, ensuring the reliability and accuracy of data transmission, and enhancing the interoperability of the system, enabling different heterogeneous models to work seamlessly together in the same system, thereby improving the overall performance and practicality of the system.
[0015] In one embodiment, obtaining metadata from each heterogeneous model, analyzing the metadata, and extracting common data structures and attributes includes: Use ETL tools to extract metadata files; Perform structural analysis on the extracted metadata files and use the structural matching algorithm to extract the common data structures in each heterogeneous model; The extracted metadata files are subjected to attribute analysis, and the common attributes in various heterogeneous models are extracted using a semantic matching algorithm.
[0016] In this embodiment, the ETL (Extract, Transform, Load) tool is used to automatically extract metadata files, reducing the workload and error rate of manual operations. By analyzing the structure and attributes of the extracted metadata files, the data structure and attributes of all models can be centrally managed, simplifying the data management process; after extracting common data structures and attributes, duplicate definitions and redundant data can be reduced, reducing maintenance costs.
[0017] In specific implementation, the structure matching algorithm is used to identify similar structures (such as field names, data types, etc.) between different data models, so as to extract common data structures. The algorithm can compare the data structures of different models to find common points based on pattern matching or graph matching technology. For example, by performing simple string matching or extension rules on field names (such as timestamp and time), and checking the consistency of data types.
[0018] The semantic matching algorithm is used to identify the semantic similarity of fields between different data models (i.e., the actual meaning of the fields). The algorithm can compare the semantic similarity of field names and descriptions based on natural language processing (NLP) technologies, such as the word vector model (Word2Vec), BERT model, etc. For example, by calculating the cosine similarity of field descriptions, semantically similar fields can be found and classified as common attributes.
[0019] The combination of the structure matching algorithm and the semantic matching algorithm can effectively extract the common data structure and attributes from various heterogeneous models, thereby achieving data standardization and unified management. This approach not only improves the flexibility and scalability of the system, but also enhances the system's interoperability and data consistency.
[0020] In one embodiment, the ETL tool is set to Apache NiFi, and the use of the ETL tool to extract the metadata file includes: Configure Apache NiFi; Creating a data flow includes: in the Apache NiFi interface, dragging a GetFile processor onto the canvas, the GetFile processor is used to read the metadata files of each heterogeneous model; dragging a processor for parsing metadata files of corresponding data formats; adding an AttributesToJSON processor, the AttributesToJSON processor is used to convert the parsed fields into JSON format; adding a PutFile processor, the PutFile processor saves the processed metadata to a specified directory; Configure each processor separately; Connect all processors to form a complete data flow; Start the data flow and monitor the processing to ensure that metadata is correctly extracted and preserved.
[0021] In specific implementation, for the processor used to parse the metadata file of the corresponding data format, the corresponding processor can be selected according to the format of the metadata file. For example, when the metadata file is in JSON format, the JsonTreeReader processor is used, and when the metadata file is in XML format, the XMLReader processor is used.
[0022] In this embodiment, by using the automation tool of Apache NiFi, manual operations are reduced and the efficiency of data extraction is improved; it supports multiple data formats and is easy to expand and adapt to new needs; it ensures that the output format of all metadata files is consistent, which is convenient for subsequent processing; it provides an intuitive graphical interface for convenient monitoring and debugging; it supports persistent storage and retry mechanism to ensure the reliability of data processing; it supports cluster deployment and is suitable for large-scale data processing.
[0023] In one embodiment, the step of uniformly encapsulating heterogeneous models based on the standardized heterogeneous model data structure includes: Set up a unified encapsulation interface for each heterogeneous model; Mapping the data of each heterogeneous model to the standardized heterogeneous model data structure to complete the data format conversion; A packaging layer is developed for each heterogeneous model after data format conversion, and the unified packaging interface is connected to the interface of the system platform.
[0024] In specific implementation, setting up a unified encapsulation interface includes: defining a unified interface, which usually includes input parameters, output results, error handling, etc., which can be implemented using protocols such as REST API and gRPC; writing detailed interface documents to ensure that each heterogeneous model can be called according to unified standards.
[0025] The following is a simple example to illustrate the encapsulation of heterogeneous models, taking heterogeneous models A and Model B as examples, including: Unified encapsulation interface: Use the Flask framework to define a simple REST API / standardized_data to receive standardized data; Data mapping and format conversion: The map_model_a_to_standard function maps the data of Model A to a standardized data structure; the map_model_b_to_standard function maps the data of Model B to a standardized data structure and performs necessary unit conversions (such as converting centimeters to meters).
[0026] Develop the encapsulation layer: ModelAWrapper and ModelBWrapper classes encapsulate the data sending logic of Model A and Model B respectively, and send the standardized data to the unified encapsulation interface through the requests.post method.
[0027] By uniformly encapsulating heterogeneous models, it ensures that data from different sources can be processed and interacted according to unified standards. This approach not only improves the flexibility and scalability of the system, but also enhances the system's interoperability and data consistency.
[0028] In one embodiment, mapping the data of each heterogeneous model to the standardized heterogeneous model data structure includes: Defining mapping rules, wherein the mapping rules include corresponding relationships of field names, conversion relationships of data types, and retention rules of semantic information; When the input and output data of the heterogeneous model are mapped to the standardized heterogeneous model data structure, the field name and data type are converted according to the mapping rule, and the consistency of the semantic information is maintained.
[0029] In specific implementation, the correspondence of field names is used to ensure that fields in different models can correctly correspond to fields in the standardized data structure. If the field names of two models are the same or very similar (such as timestamp and time), they can be directly mapped; for fields with different names, mapping rules can be defined. For example, measurement corresponds to value, and location corresponds to extra_fields.location.
[0030] The conversion relationship of data types is used to ensure that data types in different models can be correctly converted to data types in standardized data structures, such as basic type conversion: string to date, integer to floating point number, etc. For example, "2023-10-01T12:00:00Z" is converted to datetime type, 12345 is converted to float type; unit conversion: such as converting centimeters to meters, for example, 12345 centimeters is converted to 123.45 meters.
[0031] The semantic information preservation rules are used to ensure that semantic information is not lost during the conversion of field names and data types. Implementation methods may include description consistency: preserving semantic information through field descriptions or annotations, for example, timestamp and time both represent the recording time; and preserving extended fields: for fields that cannot be directly mapped, their semantic information can be preserved through extended fields (such as extra_fields).
[0032] By defining detailed mapping rules, including the correspondence between field names, the conversion relationship between data types, and the preservation rules of semantic information, the data of various heterogeneous models can be effectively mapped to the standardized heterogeneous model data structure. This approach not only improves the overall performance and practicality of the system, but also lays a solid foundation for future expansion and development. It ensures the consistency and accuracy of data, enhances the flexibility and scalability of the system, and simplifies data management and maintenance.
[0033] In one embodiment, the step of constructing a driver module with a unified data interface includes: Construct a data conversion submodule, wherein the data conversion submodule is provided with a data serialization interface and a data deserialization interface, wherein the data serialization interface is used to convert the output data of the encapsulated heterogeneous model into a format recognizable by the system platform, and the data deserialization interface is used to convert the input data of the system platform into a format acceptable to the encapsulated heterogeneous model; Construct a protocol adapter module, which is used for parsing and encapsulating different communication protocols between the encapsulated heterogeneous model and the system platform. The protocol adapter module is provided with a protocol configuration interface and a callback interface. The protocol configuration interface is used for users to dynamically select a communication protocol, and the callback interface is used for asynchronous data reception and processing; Constructing an error handling submodule, wherein the error handling submodule is provided with an error handling interface, and the error handling interface is used for capturing and transmitting error information; A log recording submodule is constructed, and the log recording submodule is used to record the operating status and data interaction process of the driver module for debugging and performance analysis. The protocol adapter submodule is provided with a log configuration interface, and the log configuration interface is used for users to dynamically adjust the log level and output location.
[0034] In this embodiment, specifically, when sending data, it is first serialized by the data conversion submodule, and then the protocol adapter submodule selects the appropriate communication protocol for transmission; when receiving data, the protocol adapter submodule first receives and parses the data, and then deserializes it by the data conversion submodule. The user can dynamically select the communication protocol (such as HTTP, gRPC, MQTT, etc.). The error handling submodule captures and handles errors in all modules and records them in the logging submodule. The logging submodule records all key steps and state changes to facilitate subsequent debugging and performance analysis.
[0035] The various sub-modules in this embodiment cooperate with each other to improve the interoperability and compatibility of the system: ensuring that data between different models can interact seamlessly and supporting multiple communication protocols. Simplified data management and maintenance: through standardized formats and logging, the data management process is simplified and maintenance costs are reduced. Improved system reliability and stability: through effective error handling mechanisms and detailed logging, the reliability and stability of the system are enhanced. Enhanced system flexibility and scalability: support dynamic selection of communication protocols and flexible data format conversion to adapt to future changes in demand. Promote data analysis and decision support: provide standardized data structures and accurate semantic information to facilitate subsequent data analysis and decision support. Reduced development and maintenance costs: by defining common mapping rules and flexible protocol adaptation, the workload of repeated development is reduced, and development and maintenance costs are reduced.
[0036] In one embodiment, the method further comprises: An extensible field based on a nested object form or a key-value pair form is reserved in the standardized heterogeneous model data structure, and the extensible field is used to store a non-public data structure.
[0037] In this embodiment, different models may contain different non-public data structures. The reserved extensible fields can accommodate these differentiated data, and the system can easily adapt to future changes in demand without modifying the core data structure. By reserving extensible fields, new data fields can be added quickly, reducing the workload of subsequent development. By reserving extensible fields, more detailed information can also be recorded to facilitate debugging and performance analysis.
[0038] In this embodiment, a computer device is provided, such as Figure 2 As shown, it includes a memory 201, a processor 202, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned system platform and heterogeneous model decoupling methods is implemented.
[0039] Specifically, the computer device may be a computer terminal, a server or a similar computing device.
[0040] In this embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program for executing any of the above-mentioned methods for decoupling a system platform from a heterogeneous model.
[0041] Specifically, computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0042] Based on the same inventive concept, an embodiment of the present invention also provides a system platform and heterogeneous model decoupling device, as described in the following embodiments. Since the principle of solving the problem by the system platform and heterogeneous model decoupling device is similar to the system platform and heterogeneous model decoupling method, the implementation of the system platform and heterogeneous model decoupling device can refer to the implementation of the system platform and heterogeneous model decoupling method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0043] Figure 3 is a structural block diagram of a system platform and heterogeneous model decoupling device according to an embodiment of the present invention, such as Figure 3 As shown, it includes: an extraction module 301, a standardization construction module 302, an encapsulation module 303 and an interaction module 304. The structure is described below.
[0044] The extraction module 301 is used to obtain metadata from each heterogeneous model, analyze the metadata, and extract common data structures and attributes, including: using ETL tools to extract metadata files; performing structural analysis on the extracted metadata files, and using structural matching algorithms to extract common data structures in each heterogeneous model; performing attribute analysis on the extracted metadata files, and using semantic matching algorithms to extract common attributes in each heterogeneous model; A standardization construction module 302 is used to construct a standardized heterogeneous model data structure, wherein the common data structure and attributes provide basic fields and data types for the standardized heterogeneous model data structure; The encapsulation module 303 is used to uniformly encapsulate the heterogeneous models based on the standardized heterogeneous model data structure; The interaction module 304 is used to construct a driver module with a unified data interface. The encapsulated heterogeneous model interacts with the system platform through the driver module to achieve collaborative simulation operation.
[0045] In one embodiment, the extraction module 301 is further used to: Configure Apache NiFi; Creating a data flow includes: in the Apache NiFi interface, dragging a GetFile processor onto the canvas, the GetFile processor is used to read the metadata files of each heterogeneous model; dragging a processor for parsing metadata files of corresponding data formats; adding an AttributesToJSON processor, the AttributesToJSON processor is used to convert the parsed fields into JSON format; adding a PutFile processor, the PutFile processor saves the processed metadata to a specified directory; Configure each processor separately; Connect all processors to form a complete data flow; Start the data flow and monitor the processing to ensure that metadata is correctly extracted and preserved.
[0046] In one embodiment, the encapsulation module 303 is further used to: Set up a unified encapsulation interface for each heterogeneous model; Mapping the data of each heterogeneous model to the standardized heterogeneous model data structure to complete the data format conversion; A packaging layer is developed for each heterogeneous model after data format conversion, and the unified packaging interface is connected to the interface of the system platform.
[0047] In one embodiment, the encapsulation module 303 is further used to: Defining mapping rules, wherein the mapping rules include corresponding relationships of field names, conversion relationships of data types, and retention rules of semantic information; When the input and output data of the heterogeneous model are mapped to the standardized heterogeneous model data structure, the field name and data type are converted according to the mapping rules, and the consistency of the semantic information is maintained.
[0048] In one embodiment, the interaction module 304 is further configured to: Construct a data conversion submodule, wherein the data conversion submodule is provided with a data serialization interface and a data deserialization interface, wherein the data serialization interface is used to convert the output data of the encapsulated heterogeneous model into a format recognizable by the system platform, and the data deserialization interface is used to convert the input data of the system platform into a format acceptable to the encapsulated heterogeneous model; Construct a protocol adapter module, which is used for parsing and encapsulating different communication protocols between the encapsulated heterogeneous model and the system platform. The protocol adapter module is provided with a protocol configuration interface and a callback interface. The protocol configuration interface is used for users to dynamically select a communication protocol, and the callback interface is used for asynchronous data reception and processing; Constructing an error handling submodule, wherein the error handling submodule is provided with an error handling interface, and the error handling interface is used for capturing and transmitting error information; A log recording submodule is constructed, and the log recording submodule is used to record the operating status and data interaction process of the driver module for debugging and performance analysis. The protocol adapter submodule is provided with a log configuration interface, and the log configuration interface is used for users to dynamically adjust the log level and output location.
[0049] In one embodiment, the apparatus further comprises: An extensible field reservation module is used to reserve extensible fields based on nested object form or key-value pair form in the standardized heterogeneous model data structure, and the extensible fields are used to store non-public data structures.
[0050] The embodiment of the present invention achieves the following technical effects: obtaining metadata from each heterogeneous model, analyzing the metadata, extracting common data structures and attributes; constructing a standardized heterogeneous model data structure, the common data structure and attributes provide basic fields and data types for the standardized heterogeneous model data structure; based on the standardized heterogeneous model data structure, the heterogeneous models are uniformly encapsulated; a driver module with a unified data interface is constructed, and the encapsulated heterogeneous model interacts with the system platform through the driver module to realize the collaborative operation of simulation. The present application defines a standardized data structure so that data from different sources and formats can be processed uniformly. Even if a new model is introduced or a new data type needs to be supported, it is only necessary to update the standardized data structure and mapping rules, thereby improving the flexibility of the system; the standardized data structure also avoids the situation where each model needs to design and implement data processing logic separately, reducing the overall complexity of the system and reducing the difficulty of maintenance; through a unified data interface, different models can work together on the same platform, providing a stable data interaction mechanism, ensuring the reliability and accuracy of data transmission, and enhancing the interoperability of the system, so that different heterogeneous models can work seamlessly in the same system, improving the overall performance and practicality of the system.
[0051] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0052] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for decoupling a system platform from a heterogeneous model, characterized in that: include: Obtain metadata from each heterogeneous model, analyze the metadata, and extract common data structures and attributes, including: using ETL tools to extract metadata files; performing structural analysis on the extracted metadata files, and using structural matching algorithms to extract common data structures in each heterogeneous model; performing attribute analysis on the extracted metadata files, and using semantic matching algorithms to extract common attributes in each heterogeneous model; Constructing a standardized heterogeneous model data structure, wherein the common data structure and attributes provide basic fields and data types for the standardized heterogeneous model data structure; Based on the standardized heterogeneous model data structure, the heterogeneous models are uniformly encapsulated; A driver module with a unified data interface is constructed, and the encapsulated heterogeneous models interact with the system platform through the driver module to achieve collaborative simulation operation.
2. The method for decoupling a system platform from a heterogeneous model according to claim 1, characterized in that: The ETL tool is set to Apache NiFi, and the use of the ETL tool to extract metadata files includes: Configure Apache NiFi; Creating a data flow includes: in the Apache NiFi interface, dragging a GetFile processor onto the canvas, the GetFile processor is used to read the metadata files of each heterogeneous model; dragging a processor for parsing metadata files of corresponding data formats; adding an AttributesToJSON processor, the AttributesToJSON processor is used to convert the parsed fields into JSON format; adding a PutFile processor, the PutFile processor saves the processed metadata to a specified directory; Configure each processor separately; Connect all processors to form a complete data flow; Start the data flow and monitor the processing to ensure that metadata is correctly extracted and preserved.
3. The method for decoupling a system platform from a heterogeneous model according to claim 1, characterized in that: The step of uniformly encapsulating heterogeneous models based on the standardized heterogeneous model data structure includes: Set up a unified encapsulation interface for each heterogeneous model; Mapping the data of each heterogeneous model to the standardized heterogeneous model data structure to complete the data format conversion; A packaging layer is developed for each heterogeneous model after data format conversion, and the unified packaging interface is connected to the interface of the system platform.
4. The method for decoupling a system platform from a heterogeneous model as claimed in claim 3, characterized in that: Mapping the data of each heterogeneous model to the standardized heterogeneous model data structure includes: Defining mapping rules, wherein the mapping rules include corresponding relationships of field names, conversion relationships of data types, and retention rules of semantic information; When the input and output data of the heterogeneous model are mapped to the standardized heterogeneous model data structure, the field name and data type are converted according to the mapping rule, and the consistency of the semantic information is maintained.
5. The method for decoupling a system platform from a heterogeneous model according to claim 1, characterized in that: The construction of a driver module with a unified data interface includes: Construct a data conversion submodule, wherein the data conversion submodule is provided with a data serialization interface and a data deserialization interface, wherein the data serialization interface is used to convert the output data of the encapsulated heterogeneous model into a format recognizable by the system platform, and the data deserialization interface is used to convert the input data of the system platform into a format acceptable to the encapsulated heterogeneous model; Construct a protocol adapter module, which is used for parsing and encapsulating different communication protocols between the encapsulated heterogeneous model and the system platform. The protocol adapter module is provided with a protocol configuration interface and a callback interface. The protocol configuration interface is used for users to dynamically select a communication protocol, and the callback interface is used for asynchronous data reception and processing; Constructing an error handling submodule, wherein the error handling submodule is provided with an error handling interface, and the error handling interface is used for capturing and transmitting error information; A log recording submodule is constructed, and the log recording submodule is used to record the operating status and data interaction process of the driver module for debugging and performance analysis. The protocol adapter submodule is provided with a log configuration interface, and the log configuration interface is used for users to dynamically adjust the log level and output location.
6. The method for decoupling a system platform from a heterogeneous model according to claim 1, characterized in that: The method further comprises: An extensible field based on a nested object form or a key-value pair form is reserved in the standardized heterogeneous model data structure, and the extensible field is used to store a non-public data structure.
7. A system platform and heterogeneous model decoupling device, characterized in that: include: The extraction module is used to obtain metadata from various heterogeneous models, analyze the metadata, and extract common data structures and attributes, including: using ETL tools to extract metadata files; performing structural analysis on the extracted metadata files, and using structural matching algorithms to extract common data structures in various heterogeneous models; performing attribute analysis on the extracted metadata files, and using semantic matching algorithms to extract common attributes in various heterogeneous models; A standardized construction module, used to construct a standardized heterogeneous model data structure, wherein the common data structure and attributes provide basic fields and data types for the standardized heterogeneous model data structure; An encapsulation module, used for uniformly encapsulating heterogeneous models based on the standardized heterogeneous model data structure; The interaction module is used to construct a driver module with a unified data interface. The encapsulated heterogeneous model interacts with the system platform through the driver module to achieve collaborative simulation operation.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for decoupling a system platform and heterogeneous models described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method for decoupling a system platform and heterogeneous models according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for realizing standardized input and output of model and interface thereof
CN112131184A
Multi-professional heterogeneous model unified packaging method based on data model
CN112364538A
Method and device for accessing heterogeneous data source of decoupling computing engine
CN118245044A
Metadata management system and method oriented to heterogeneous data sources
CN118796903A
Joint simulation method, system and equipment for two types of heterogeneous systems and medium
CN118965799A
Cited By
Simulation fusion modeling method and system for information physical multi-heterogeneous system
CN121325647A