A message translation code generation method based on association graph

By constructing a message translation code generation method based on an association graph, the problem of inconsistent communication and data formats in heterogeneous system integration is solved, efficient message translation and rapid integration between heterogeneous systems are achieved, and system complexity and maintenance costs are reduced.

CN120469825BActive Publication Date: 2025-10-0310TH RES INST OF CETC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510955638.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-10-03
Estimated Expiration
2045-07-11

AI Technical Summary

Technical Problem

In the integration of heterogeneous systems on complex functional platforms, existing technologies are unable to effectively solve the problems of inconsistent communication protocols, data formats, and data types between heterogeneous systems, resulting in high system integration complexity, high maintenance costs, and degraded performance.

Method used

A message translation code generation method based on association graph is adopted. By constructing a message normalization semantic description model and a message translation association graph, the Dijkstra shortest path algorithm is used to query the optimal translation path and automatically generate interactive message translation code.

Benefits of technology

It achieves efficient translation and integration of messages between heterogeneous systems, reduces development and maintenance costs, improves system maintainability and scalability, and supports fast and efficient system integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469825B_ABST
    Figure CN120469825B_ABST
Patent Text Reader

Abstract

This application discloses a method for generating message translation code based on an association graph, which includes: establishing a semantic ontology library, obtaining a standardized semantic description model of messages of the current system, using the source message / destination message data to be translated as input, querying the message conversion path set in the message translation association graph, and obtaining the optimal translation path; aligning and updating the element ontology through text description information matching and a structure-based method, finding the node with the strongest correlation in the current message translation association graph, establishing a new mapping relationship between messages, updating the message translation association graph, and generating interactive message translation code for heterogeneous functional systems based on the message conversion code generation logic for each message element in the target message. This application improves the speed of message translation and the accuracy of element translation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of heterogeneous system integration, and in particular to a message translation code generation method based on an association graph. Background Art

[0002] The development of complex functional platforms, such as smart cars and aircraft, requires the integration of multiple heterogeneous subsystems to achieve increasingly rich platform functionality. These platforms are primarily composed of multiple heterogeneous systems. However, because these systems are developed by different individuals and organizations and come in varying versions, the interaction between components within these systems becomes extremely complex, making system integration a key component in building these platforms. To ensure efficient integration and stable operation of these platforms, numerous researchers have designed frameworks and methods to achieve this goal. However, these integration methods require the translation of messages between heterogeneous systems to enable message sharing and interaction between heterogeneous subsystems.

[0003] The current methods for heterogeneous system integration mainly include Enterprise Integration Patterns (EIP), Web service-based methods, and message-based integration methods. (1) The EIP method implements interaction and communication between different heterogeneous systems by defining a series of patterns such as message passing, message conversion, and message routing. This method provides a set of standardized integration patterns, reduces the complexity of integration, and improves the maintainability and scalability of the system; through the middleware or service bus method, it achieves loose coupling between systems and reduces system dependencies; it can support multiple demand scenarios and can flexibly respond to different business processes and data interaction methods. However, the design and definition of integration patterns in EIP increases the requirements for developers and the construction of integration frameworks such as message middleware and service bus is relatively complex. (2) The Web service-based integration method defines standard Web service interfaces so that different systems can communicate and exchange data through the network, and uses standard protocols such as XML, SOAP, and WSDL to achieve system interoperability. This method is based on widely recognized standard protocols, has good interoperability, and can achieve communication between different platforms and languages; it provides simple and easy-to-use interface definitions and calling methods, reducing the difficulty of system integration; it can quickly and easily add new functions and services to meet changing business needs. However, when processing large amounts of data, the Web service integration method may cause system performance to decline due to the parsing and transmission of XML data; it needs to solve security issues such as identity authentication, authorization, and data encryption to ensure data security; it has a strong dependence on the network, and network problems may affect the system integration effect. (3) The integration method based on the message mechanism uses message middleware to achieve communication between different systems. The systems send and receive messages through communication modes such as publish / subscribe and point-to-point to achieve data interaction and sharing. This method uses message middleware to achieve a high degree of decoupling between heterogeneous subsystems, reduce system dependencies, and provide a flexible way to add new systems and nodes to expand the scope of system integration; the message middleware provides message persistence, confirmation mechanism and other capabilities to ensure the reliable transmission of messages. However, the need to manage and maintain the message middleware increases the complexity of the system. In the case of high concurrency and large data volumes, problems such as message backlogs and delays may occur. In addition, the need to understand the configuration and use of the message middleware brings additional learning costs to developers.

[0004] The aforementioned methods, when integrating heterogeneous systems, often encounter inconsistencies in communication protocols, data formats, and data types. Message translation is needed to achieve information mapping, hiding the details of different systems. This makes system integration more flexible and improves maintainability and scalability. Message translation for heterogeneous system integration can be categorized into field-mapping-based message translation, middleware-based message translation, global information model-based message translation, and adapter-based message translation.

[0005] Field-mapping-based message translation defines the mapping relationships between message fields, converting data fields in one system into corresponding fields in another. This method typically implements these mapping relationships through configuration files and implements the specific conversion logic in code. Field-mapping-based methods are simple, straightforward, and easy to implement, making them suitable for scenarios where field mapping relationships are clear and simple. However, maintenance costs are high when field mapping relationships are complex or frequently changing. Furthermore, this method only applies to field-level conversions and cannot handle semantic differences.

[0006] Middleware-based message translation methods leverage existing middleware or add functionality to achieve automatic message translation and conversion. Message-based middleware generally provides a rich set of data processing and conversion capabilities, supports multiple data formats and protocols, and is easy to scale and maintain. However, this method requires technical personnel to learn the relevant middleware, and the use of middleware can introduce message latency and other issues, introducing additional performance overhead.

[0007] Message translation based on a global information model defines a global information model, converts data from heterogeneous systems into this model, and then converts data from this model into the target system's data format. This approach provides a standardized conversion method, reduces inter-system dependencies, and facilitates the addition of new systems and nodes, expanding the scope of integration. However, building and maintaining the global information model is complex.

[0008] Adapter-based message translation involves developing dedicated adapters for each system to address protocol and data format differences between systems, enabling inter-system communication and data conversion. In the integration of complex functional platforms, adapters can be customized to meet the specific needs of heterogeneous systems, and these systems communicate through adapters. This provides a high degree of decoupling and flexibility. However, the development of customized adapters also comes with high development and maintenance costs. Summary of the Invention

[0009] In view of this, the present application provides a message translation code generation method based on an association graph.

[0010] The present application discloses a method for generating message translation code based on an association graph, which includes:

[0011] Step 1: Based on the domain knowledge involved in complex systems, combined with the abstract data modeling method and ontology description method of information systems, following the abstract hierarchy of elements, use the conceptual data model, logical data model, and physical data model to model message elements. Describe the relevance of message elements and mark their conversion methods to achieve standardized semantic description of messages. Provide a description / calculation basis for the similarity, convertibility, and relevance between messages, and establish a semantic ontology library.

[0012] Step 2: Based on the semantic ontology library, obtain the message normalization semantic description model of the current system;

[0013] Step 3: Based on the mapping relationship between the messages of the heterogeneous functional modules to be integrated, a message translation association graph is established. With relevant factors as constraints, the weights of the message conversion edges in the message translation association graph are constructed through a correlation calculation method. The message translation association graph is converted into a directed weighted graph. The source message / destination message data to be translated is used as input. The message conversion path set in the message translation association graph is queried using the Dijkstra shortest path algorithm to obtain the optimal translation path. The relevant factors include the conversion path length and conversion accuracy loss.

[0014] Step 4: When a new heterogeneous system message is added, the heterogeneous system message and the message elements in the message and the corresponding semantic ontology library are extracted. Based on the established message standardization semantic description model, based on the ontology semantic description and ontology connection structure of the message and message elements, the element ontology is aligned and updated through text description information matching and structure-based methods. With the help of the correlation calculation method in step 3, the node with the strongest correlation with the current message translation association map is found, a new mapping relationship between messages is established, and the message translation association map is updated;

[0015] Step 5: For each message element in the target message, generate the interactive message translation code of the heterogeneous functional system based on the message conversion code generation logic.

[0016] Furthermore, the step 1 includes:

[0017] The message semantic ontology library is modeled for the content of the interactive messages of the integrated heterogeneous functional systems and the knowledge fields involved. First, based on the abstract model construction method of the information system, the conceptual data model CDM ontology, the logical data model LDM ontology and the physical data model PDM ontology are constructed. The conceptual data model CDM ontology is used to define the concepts, attributes and association relationships involved in the heterogeneous functional systems; the logical data model LDM ontology is used to refine the conceptual data model CDM ontology, adding units, value ranges, measurement accuracy and conversion relationships between logical elements; combined with the physical platform characteristics of the heterogeneous functional systems, the physical model is used to perform relevant processing on each logical data element to form a message semantic ontology library; the relevant processing includes adding the physical data type of the value range.

[0018] Furthermore, the step 2 includes:

[0019] Establish and determine the internal relationships between ontologies in the semantic ontology library; internal relationships include similarity, convertibility, and non-conversion;

[0020] Traverse all message elements in the current heterogeneous system interaction messages, use the ontology description method to add semantic description information and object attributes based on the abstract data model to the message elements in the message, form a standardized semantic description model of the current system's messages, and perform subsequent correlation analysis of messages between heterogeneous systems.

[0021] Furthermore, in the message normalization semantic description model, each interactive message is composed of multiple message elements, each message element corresponds to an ontology element; the message normalization semantic description model is vertically decomposed into three levels: CDM ontology, LDM ontology and PDM ontology, and the elements between each level have an intrinsic relationship:

[0022] Analyze whether the top-level CDM ontology corresponding to the message element is consistent. If so, the CDM ontology-level similarity is 1. Otherwise, determine whether the two CDM ontologies have object attributes to describe the similarity between them. If not, the similarity between the two message element ontologies is 0.

[0023] Analyze whether the LDM ontologies corresponding to the message elements are consistent. If the CDM ontologies are unrelated, the LDM ontology similarity is directly judged to be 0. Otherwise, the similarity between the two LDM ontologies is judged. If they correspond to the same LDM ontology, the similarity at the LDM ontology level is 1. Otherwise, determine whether the two LDM ontologies have object attributes to describe the similarity between them. If not, the similarity between the two LDM ontologies is 0. Otherwise, the similarity at the LDM ontology level is defined based on the similarity described by the object attributes.

[0024] Analyze whether the PDM ontologies corresponding to message elements are consistent. PDM ontologies are mainly used to describe the data types of message elements. During the message element translation process, if the PDM ontologies are of the same type, they can be converted from the data type level without paying attention to the similarity of the top-level CDM and LDM ontologies. If the PDM ontologies are of different types, the similarity between the two PDM ontologies is determined from the data type level based on the object attributes between them.

[0025] Based on the similarity of CDM ontology, LDM ontology and PDM ontology, the similarity scores of the final two message elements are calculated uniformly. At the same time, according to the similarity comparison with the hierarchy, the details of the similarity comparison of the two message elements are given.

[0026] Furthermore, in step 3, the process of establishing the message translation association graph includes:

[0027] Message nodes and message group nodes are the basic elements of the message translation association graph. The main description content of the message node includes the message node name and the message element list. The element list contains the name of each element item, as well as the element type and semantic ontology model / conceptual data model CDM ontology of each element. The element type is an interpretable type name used to mark the data type corresponding to the element. The semantic ontology model / conceptual data model CDM ontology is used to describe the semantic information of the element. The element is an ontology and also the conceptual data model CDM ontology in the abstract data model. The message group node contains several messages. Each message in the message conversion group is associated with its specific description information. The message translation association graph is established based on the message translation group.

[0028] Translation nodes are another important type of node in the message translation graph. Message groups are connected through translation nodes and are used to describe the corresponding conversion model between message groups. The model is encapsulated by the translation node and is used to identify the specific translation information that needs to be executed during the translation process of the message group.

[0029] The translation node parses several input messages and processes the elements according to the agreed arithmetic, logic or remote procedure call functions. It starts field parsing and translation processing and generates output messages only after receiving all input messages within the specified timing requirements.

[0030] By analyzing the integration objects of complex system platforms, that is, the heterogeneous functional modules to be integrated, and constructing the relevant components involved, the interaction information of various heterogeneous functional systems is modeled on this basis, and the message translation logic based on the association graph is obtained, that is, the message translation association graph, whose basic node is the message group, and all messages appear in the form of message groups; the relevant components include messages, message groups, and translation units.

[0031] Furthermore, in step 3, the message translation path query process of the message translation association graph is:

[0032] Search the input source message / message group in the message translation association graph. If it can be found, continue; otherwise, end.

[0033] Search the input destination message in the message translation association graph. If it can be found, continue; otherwise, end.

[0034] Starting from the corresponding source message group in the message graph, obtain all its associated translation nodes in the message graph, requiring the association direction to be from the source message group to the translation node;

[0035] Determine whether the translation node type is single-input single-output or multiple-input single-output mode. If not, skip the translation node and continue to determine other translation nodes; if yes, continue;

[0036] Get the destination message connected to the translation node and determine whether the destination message is the input destination message. If so, generate a path from the source message / message group to the destination message. If not, continue;

[0037] The translation node and its connected destination message are stored in a stack, and each translation chain path is stored separately in the stack. For each path, the destination message is read from the stack, and all its associated translation nodes are searched in the message translation association graph. Then, the process jumps to the previous order and continues to obtain its associated translation node type and destination message until all message paths are processed.

[0038] If the path cannot find the destination message at the end, the path is discarded; finally, until all chains are processed, the path that can find the destination message is stored and output. This path is the translation chain path from the source message / message group to the destination message.

[0039] Furthermore, the step 4 includes:

[0040] When a new heterogeneous system has the message AR.Sensor2.OutputMsg, take the message element Altitude as an example. The message elements include the CDM ontology observable Altitude, the LDM ontology measurement Altitude_AGL_Meter, and the PDM ontology Long Alitutde_Long. The currently constructed message semantic ontology library is traversed, starting from the CDM ontology observable Altidude, to find the message element Height in the AR.Tracker.InputMsg message.

[0041] In the abstract data model ontology semantic description, the LDM ontology Altitude_AGL_M_Real in the message normalization semantic description model and the newly added LDM ontology Altitude_AGL_Meter both have the same CMD ontology and PDM ontology, and both can be converted with the existing LDM ontology Altitude_AGL_M_Real in the message normalization semantic description model;

[0042] Based on the high similarity of the attribute text descriptions between the LDM ontology Altitude_AGL_M_Real and the newly added LDM ontology Altitude_AGL_Meter, a high confidence level of the match is obtained, and it is considered that the LDM ontology Altitude_AGL_Meter and the LDM ontology Altitude_AGL_M_Real match and refer to the same ontology;

[0043] After the integration of the ontology semantics of the newly added heterogeneous system messages with the existing semantic ontology library is completed, a conversion edge between AR.Senor2.OutputMsg and AR.Tracker.InputMsg is established based on the correlation calculation method.

[0044] Furthermore, the step 4 includes:

[0045] The message translation association graph models the message translation relationship between existing associations to form a knowledge base. For newly added translations, the path results can be directly fed back through message path search without having to establish conversion relationships between all message groups or messages. The message translation path query problem is abstracted as finding the path from the source message group to the destination message group in the message translation association graph based on user input. The input is: source message group, destination message group, message translation association graph; the output is: path number and corresponding node sequence; when a new message node is added, the correlation between the new node and the existing nodes in the message translation association graph is analyzed and the conversion correlation coefficient is calculated, and a translation edge is established between the nodes with the strongest correlation.

[0046] Furthermore, based on the message elements, the correlation coefficient between the source message and the target message is:

[0047]

[0048] in, Indicates the source message With target message the correlation between them; express Towards The surjective condition of the translation function is: if it is surjective, then is 1, otherwise is 0; express The i-th message element in and The jth message element in The convertibility between them, i and j are and The sequence number of the message element, m and n represent and The total number of message elements in ; if and Convertible, then is 1, otherwise is 0; express and The loss of precision during translation, is a positive real number greater than or equal to 1, when there is no loss of precision, is 1; if If it is 0, it means and Cannot convert between If it is 1, it means and can be converted between them without loss of precision; if If it is greater than 1, it means and Problems may arise during the conversion process; these problems include semantic deviation or loss of precision.

[0049] Furthermore, in step 5, the process of automatically generating the message translation code is as follows:

[0050] Get all message elements in the destination message and push them into the storage stack;

[0051] Pop up the message elements one by one, and for each message element, determine the translation path type of the message element. The translation path types include pure arithmetic / logic type, pure remote procedure call function, and mixed type.

[0052] If the message element translation path is of pure algorithm / logic type, then according to the nested optimization criteria, starting from the source message element, the operations of the previous steps are substituted as parameters into the subsequent steps in sequence until the destination message element is reached and the optimized and merged algorithm / logic formula is output to generate code; if the translation path type is a pure remote procedure call function, then the path is not optimized, and each remote procedure call function in the translation path is called in sequence in the generated code; if the translation path type is a mixed type, then the translation path is scanned to obtain path fragments with more than two consecutive arithmetic / logic operations in the transfer path, and the nested optimization method is used to merge the conversion functions of each fragment. After traversing all fragments, starting from the translation path, each remote procedure call function is generated in sequence, and the code of the nested optimized arithmetic / logic operation is nested.

[0053] Due to the adoption of the above technical solution, this application has the following advantages:

[0054] 1. The message normalization semantic description model method proposed in this application can construct a multi-level structure for the message elements of the interaction between heterogeneous functional systems through the information system abstract data model to achieve a layer-by-layer description method, and give a detailed description of each detail related to the message elements through the logical model and the physical model. With the help of the ontology description method, the ontology element description and the object attribute description are added to provide a basis for correlation analysis, support the similarity calculation between message elements, and realize the qualitative analysis and modeling of messages and the quantitative calculation of the relationship between messages.

[0055] 2. The message conversion association graph proposed in this application uses messages as nodes and the translation process between message elements as connections from a topological structure perspective to graph model the message interaction relationship of heterogeneous functional systems, providing a formal description method for the conversion process of message interaction messages between heterogeneous systems. Based on the graph theory method, it can realize operations such as insertion of new message nodes, deletion of obsolete message nodes, calculation of inter-node correlation, path query and path optimization of source message nodes / target message nodes, and characterization of system structures with complex structures and their interaction messages.

[0056] 3. The translation chain optimization method proposed in this application can improve the speed of message translation and the accuracy of element translation by classifying the translation chains between message elements and nesting and merging the operations in the translation chains according to the characteristics of the translation chain types.

[0057] 4. This application is suitable for modeling the message translation process and automatically generating message translation codes during the integration of complex heterogeneous functional systems. It can be widely used in fields such as embedded systems, avionics equipment, and smart cars, and can be used to design and develop fast and efficient system integration without modifying existing subsystems.

[0058] 5. This application uses ontology description methods and abstract data models to construct global data constraints and provide a computational basis for data semantic association analysis. It constructs a graph model to map the interaction relationship between heterogeneous subsystems and a graph data structure to map the interaction relationship between messages between heterogeneous functional systems. It implements complex logic such as adding message nodes, analyzing the correlation of message nodes, and querying the translation path of message nodes, optimizes the message conversion code generation logic, and provides a more efficient solution for message translation in the current heterogeneous system integration.

[0059] 6. This application proposes a message standardization semantic description model to support the global unified standard description, flexible matching and quantitative correlation analysis of messages between heterogeneous subsystems, construct a message translation association map to the interactive conversion relationship between messages, realize the automatic conversion process of messages, optimize the message conversion relationship to realize the automatic generation of message translation code, and overcome the current problems of difficulty in defining global standards and lack of support for heterogeneous system interaction in the functional interaction information processing of heterogeneous systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0061] Figure 1 This is a flowchart of the message normalization semantic description of an embodiment of the present application;

[0062] Figure 2 This is a schematic diagram of an example of a normalized semantic description of a message according to an embodiment of the present application;

[0063] Figure 3 This is a schematic diagram of semantic ontology fusion and message association analysis of newly added heterogeneous system messages in an embodiment of the present application;

[0064] Figure 4 This is a schematic diagram of messages and message group nodes in an embodiment of the present application;

[0065] Figure 5 This is a schematic diagram of a message translation node and its translation process in an embodiment of the present application;

[0066] Figure 6 This is a schematic diagram of the message translation association map in the embodiment of this application;

[0067] Figure 7 This is a message translation flow chart in an embodiment of the present application;

[0068] Figure 8 This is a flowchart for automatically generating message translation code in an embodiment of this application. DETAILED DESCRIPTION

[0069] The present application is further described with reference to the accompanying drawings and embodiments. The embodiments described are only a part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.

[0070] See also Figure 1 The present application provides an embodiment of a method for generating message translation code based on an association graph, which includes:

[0071] See Figure 1 , to model the message semantic library for the content of the interactive messages of the integrated heterogeneous functional systems and the knowledge fields involved, firstly, based on the abstract model construction method of the information system, the conceptual data model CDM (Concept Data Model, CDM), the logical data model LDM (Logical Data Model, LDM) and the physical data model PDM (Physical Data Model, The concept data model (CDM) is used to define the concepts, attributes, and relationships involved in heterogeneous functional systems. A logical data model (LDM) is established to describe the CDM ontology, adding units, value ranges, measurement accuracy, and conversion relationships between logical elements. In combination with the physical platform characteristics of the heterogeneous functional system, a physical model is established to specify each logical data element, such as adding the physical data type of the value range, to form an abstract model of the heterogeneous functional system to be integrated. The CDM, LDM, and PDM of the abstract model are used as ontological concepts to construct a semantic ontology library, which provides a conceptual system and semantics for the messages and message elements interacting between the heterogeneous functional systems to be integrated. Internal relationships between ontologies are established, including similarity, convertibility, and non-convertibility, to determine the similarity between elements, whether they can be converted through functions, and the conversion functions. Then, all message elements in the current heterogeneous system interaction messages are traversed. Using the ontology description method, semantic description information and object attributes based on the abstract data model are added to the message elements in the messages, forming a standardized semantic description model of the current system messages. Subsequent correlation analysis of messages between heterogeneous systems is then carried out.

[0072] See Figure 2 , the message normalization semantic description model constructed in this application, each interactive message consists of multiple message elements, each message element corresponds to an ontology element, which can be decomposed vertically into: CDM ontology, LDM ontology and PDM ontology, and the elements between each level have an intrinsic correlation relationship. Specifically, Figure 2The Altitude element in the message AR.Sensor1.OutputMsg and the Height element in the AR.Tracker.InputMsg are described. These elements are associated with the CDM ontology observable Altitude, the LDM ontology measurement Altitude_AGL_CM_Real / Altitude_AGL_M_Real, and the PDM ontology Double Altitude_Double / Long Altitude_Long. The relationship diagram below the figure further describes the associations between different CDM ontologies, LDM ontologies, and PDM ontologies. These connection relationships can not only realize the semantic description of message elements, but also facilitate the analysis of the subsequent associations between different message elements and message levels through the association relationships between different ontologies. The relevance analysis of message elements is carried out according to the following process: First, the top-level CDM ontology corresponding to the message element is analyzed for consistency. If so, the similarity at the CDM ontology level is 1. Otherwise, it is determined whether the two CDM ontologies have object attributes to describe the similarity between them. If not, the similarity between the two message element ontologies is 0. Then, the LDM ontologies corresponding to the message element are analyzed for consistency. If the CDM ontologies are unrelated, the LDM ontology similarity is directly judged as 0. Otherwise, the similarity between the two LDM ontologies is determined. If they correspond to the same LDM ontology, the similarity at the LDM ontology level is 1. Otherwise, it is determined whether the two LDM ontologies have object attributes to describe the similarity between them. If not, the similarity between the two LDM ontologies is 0. Otherwise, the similarity at the LDM ontology level is defined based on the similarity described by the object attributes. Next, the PDM ontologies corresponding to the message element are analyzed for consistency. It should be emphasized here that the PDM ontology is mainly used to describe the data type of the message element. During the message element translation process, if the PDM ontology types are the same, they can be converted at the data type level. Therefore, there is no need to pay attention to the similarity between the top-level CDM ontology and the LDM ontology. If the PDM ontologies are of different types, the similarity between the two PDM ontologies must be determined based on their object attributes and data type. Ultimately, the similarity scores of the two message elements must be calculated based on the similarities of the CDM, LDM, and PDM ontologies. Furthermore, by comparing the similarities at the same level, the details of the similarity comparison between the two message elements can be determined.

[0073] Specifically, Figure 2, compare the similarity of the Altitude of AR.Sensor1.OutputMsg and the Hight of AR.Tracker.InputMsg. It can be seen that at the CDM ontology level, both the Altitude and Hight elements are associated with the CDM ontology observable quantity Altitude ontology, so the two elements have the same semantics at the top level and the similarity is 1; at the LDM ontology level, the Altitude element is associated with the measured quantity Altitude_AGL_CM_Real ontology, and the Hight element is associated with the measured quantity Altitude_AGL_M_Real (accuracy 1e-1), and the two correspond to different LDM ontologies, but the two LDM ontologies belong to the same CDM ontology, that is, the observable quantity Altitude ontology, so it can be seen that the two LDM ontologies are just different descriptions of the CMDAltitude ontology. Therefore, at the LDM ontology level, the similarity between the two ontologies can be judged through the object attributes between the two ontologies; at the PDM ontology layer, the Altitude element is associated with Double Altitude_Double, and Hight is associated with Long For the Altitude_Long association, although the two are associated with different PDM ontologies, the convertibility between the two data types can be judged based on the object properties between the two ontologies, such as the numerical length, and finally the similarity between the Altitude element and the Hight element can be obtained based on the similarity analysis between the CDM ontology, LDM ontology and PDM ontology, that is, the two have the same semantics, but there are differences between them in terms of data type and unit.

[0074] Furthermore, based on the message elements, this application defines the use of comparative analysis of their descriptive information in the analysis of the correlation between messages, including: (1) the integrity of the mapping of internal elements between messages, (2) the convertibility between internal elements between messages, and (3) the translatability of the conversion process between two message elements. Specifically, whether all elements in the target message can be mapped to the elements in the source message; (2) whether the mapped elements can be converted; (3) whether the accuracy and other properties of the translation process of the internal elements of the message meet the requirements. Therefore, the calculation of the correlation coefficient between the source message and the target message is defined as the following formula:

[0075]

[0076] in, Indicates the source message With target message the correlation between them; express Towards The surjective condition of the translation function is: if it is surjective, then is 1, otherwise is 0; express The i-th message element in and The jth message element in The convertibility between them, i and j are and The sequence number of the message element, m and n represent and The total number of message elements in ; if and Convertible, then is 1, otherwise is 0; express and The loss of precision during translation, is a positive real number greater than or equal to 1, when there is no loss of precision, is 1; if If it is 0, it means and Cannot convert between If it is 1, it means and can be converted between them without loss of precision; if If it is greater than 1, it means and Problems may arise during the conversion process; these problems include semantic deviation or loss of precision.

[0077] See Figure 3When a new heterogeneous system contains the message AR.Sensor2.OutputMsg, taking the message element Altitude as an example, the message element can be derived from the CDM ontology observable quantity Altitude, the LDM ontology measurement quantity Altitude_AGL_Meter, and the PDM ontology Long Alitutde_Long. By traversing the currently constructed meaning ontology library and starting from the CDM ontology objective measurement Altidude, the message element Height in the AR.Tracker.InputMsg message can be found. In the abstract data model ontology semantic description, the LDM ontology Altitude_AGL_M_Real and the newly added LDM ontology Altitude_AGL_Meter share the same CMD and PDM ontologies, and both can be converted to the LDM ontology Altitude_AGL_M_Real, thus having similar ontology connection structures. Subsequently, based on the high similarity between the two LDM ontologies, a high confidence level is obtained for the match, and it is assumed that the LDM ontology Altitude_AGL_Meter and the LDM ontology Altitude_AGL_M_Real match refer to the same ontology. Furthermore, after the ontology semantics of the newly added heterogeneous system messages are integrated with the existing ontology semantic library, a conversion edge between AR.Senor2.OutputMsg and AR.Tracker.InputMsg can be established based on the correlation calculation method.

[0078] See Figure 4 , message nodes and message group nodes are the basic elements of the message translation association map for heterogeneous functional systems. In this application, the main description content of the message node includes the message node name, and the list of elements of the message, which includes the name of each element item, and the element type of each element, the semantic ontology model / conceptual data model CDM ontology description, where the type item is an interpretable type name, which is used to mark the data type corresponding to the element, such as integer, floating point, etc. The semantic ontology model / conceptual data model CDM ontology is used to describe the semantic information of the element. The element is the ontology and the conceptual data model CDM ontology in the abstract data model; the message group node is a higher-level encapsulation based on the message description, which contains one or more messages. Each message in the message conversion group is associated with its specific description information, and the message translation association map is established based on the message translation group.

[0079] See Figure 5, translation nodes are another important type of nodes in the message translation association graph. Message groups must be connected through translation nodes, which are used to describe the corresponding conversion models between message groups. The models are encapsulated by translation nodes and are used to identify the translation information that needs to be specifically executed during the message group translation process. Complex functional platforms are usually composed of a large number of functional systems, and each functional subsystem communicates according to the agreed protocols and interactive interfaces; for various heterogeneous systems that need to be developed, when performing system integration, in order not to change their existing implementations, it is necessary to add a message translation system to convert the output messages of the source system into message inputs for the destination system through specific conversions. This process can be called message translation, and the translation nodes in this application represent this process. In actual environments, the message translation process needs to combine the interactive element mapping relationship between the source system and the destination system, the arrival sequence of data packets, and the state storage during operation, etc., to form a specific conversion model for adapting to message conversion in different scenarios. Generally, each translation node is interconnected with the input message group, output message group and storage unit. In actual situations, the input message group and output message combination storage unit are not necessary. In some cases, the input message group is not included, and in some deployments, the output message group is not included. The interaction forms between different heterogeneous functional systems vary greatly, which is closely related to the system's operating logic.

[0080] exist Figure 5 The message translation model shown in the example includes multiple inputs and one output message. In this model, the translation node parses and processes multiple input messages, performing element processing based on agreed-upon arithmetic, logical, or remote procedure call functions. Because this model requires multiple input messages to drive it, meaning that the translation node must cache information before and after receiving an input message, additional timing control and message caching units are required. Only after all input messages have been received within the specified timing requirements can field parsing and translation processing be initiated to generate the output message.

[0081] See Figure 6By analyzing the integration objects of a complex system platform, we construct the messages, message groups, and translation units involved. Based on this, we model the interaction information between various heterogeneous functional systems, resulting in a message translation logic based on an association graph, namely, a message association graph. Its basic node is the message group, and all messages must appear in this form. The message translation association graph models the message translation relationships between existing associations, forming a knowledge base. For new translations, we can directly return path results through message path search, without establishing translation relationships between all message groups or messages. The message translation path query problem can be abstracted as finding a path from a source message group to a destination message group in the message translation association graph based on user input. The inputs are: source message group, destination message group, and message translation association graph; the output is: path number and corresponding node sequence. When a new message node is added, the correlation between the new node and existing nodes in the association graph is analyzed and the conversion correlation coefficient is calculated. Translation edges are then established between nodes with the strongest correlation.

[0082] Figure 7 A message translation path query process based on the message association graph is given: first, the input source message / message group is searched in the message translation association graph. If it can be found, continue, otherwise end; then, the input destination message is searched in the message translation association graph. If it can be found, continue, otherwise end; next, starting from the corresponding source message group in the message graph, all its associated translation nodes are obtained in the message graph, and the association direction is required to be from the source message group to the translation node; next, determine whether the translation node type is single-input single-output or multi-input single-output mode. If not, skip the translation node and continue to determine other translation nodes; if yes, continue; next, obtain the destination message connected to the translation node and determine whether the destination message is the input destination message. message, if it is, a path from the source message / message group to the destination message can be generated, if not, continue; next, the translation node and the destination message connected to it are stored in a stack, and each translation chain path is stored separately in the stack; next, for each path, the destination message just found is read from the stack, all its associated translation nodes are found in the translation graph, and it jumps to the front order to continue to obtain its associated translation node type and destination message until all message paths are processed; next, if the path cannot find the destination message at the end, the path is discarded; finally, until all chains are processed, the paths that can find the destination message are stored and output, and these paths are all translation chain paths from the source message / message group to the destination message.

[0083] Figure 8A flowchart for the automatic generation of message translation code is given: first, all message elements in the target message are obtained and pushed into the storage stack; then, the message elements are popped out in sequence, and for each message element, the translation path type of the message element is determined, including pure arithmetic / logical type, pure remote procedure call function, and mixed type; when the message element translation path is pure algorithm / logical type, according to the nested optimization principle, starting from the source message element, the operations of the previous steps are substituted as parameters into the subsequent steps in sequence until the target message element is reached and the optimized and merged algorithm / logical formula is output to generate code; when the translation path type is pure remote procedure call function, the path is not optimized, and each remote procedure call function in the translation path is called in sequence in the generated code; when the translation path type is mixed type, the translation path is scanned to obtain path segments with more than two consecutive arithmetic / logical operations in the transfer path, and for each segment, the nested optimization method is used to merge the conversion functions. After traversing all segments, starting from the conversion path, each remote procedure call function is generated in sequence, and the code of the nested optimized arithmetic / logical operation is nested.

[0084] In the translation process from the message in the source message group to the destination message, message A is translated into message B and finally translated into message C. It is necessary to form an element translation chain for each element in the destination message. The specific conversion process corresponding to the element in the chain can be classified and analyzed by the element translation chain type, and a targeted element translation chain optimization method can be given. The conversion functions on the translation chain can be divided into three categories, including: ① arithmetic conversion functions (operating on formulas according to prescribed rules and sequences, such as addition, subtraction, multiplication, division, and open operations), ② logical conversion functions (Boolean operations), and ③ remote procedure call conversion functions (conversion methods that require complex function operations, and send parameters to the function implementer through remote procedure calls to obtain the results). If and only if there are continuous arithmetic conversion functions or logical conversion functions on the translation chain to form the conversion process, nested compression optimization of the translation chain can be performed. The nested compression algorithm of the translation chain is to compress the continuous algorithm conversion functions or logical conversion functions in the translation process, that is, given a message element translation chain. , which includes the conversion function , where the elements in the source message are , the elements in the target message are , directly bringing the previous operation as a parameter into the subsequent operation, reducing the number of function calls. Compared with calculating the intermediate values ​​of each stage separately, it can effectively improve the calculation efficiency. The translation process is directly represented by the following formula:

[0085]

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present application can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present application should be included in the scope of protection of the claims of the present application.

Claims

1. A message translation code generation method based on an association graph, characterized in that: include: Step 1: Based on the domain knowledge involved in complex systems, combined with the abstract data modeling method and ontology description method of information systems, following the abstract hierarchy of elements, use the conceptual data model, logical data model, and physical data model to model message elements. Describe the relevance of message elements and mark their conversion methods to achieve standardized semantic description of messages. Provide a description / calculation basis for the similarity, convertibility, and relevance between messages, and establish a semantic ontology library. Step 2: Based on the semantic ontology library, obtain the message normalization semantic description model of the current system; Step 3: Based on the mapping relationship between the messages of the heterogeneous functional modules to be integrated, a message translation association graph is established. With relevant factors as constraints, the weights of the message conversion edges in the message translation association graph are constructed through a correlation calculation method. The message translation association graph is converted into a directed weighted graph. The source message / destination message data to be translated is used as input. The message conversion path set in the message translation association graph is queried using the Dijkstra shortest path algorithm to obtain the optimal translation path. The relevant factors include the conversion path length and conversion accuracy loss. Step 4: When a new heterogeneous system message is added, the heterogeneous system message and the message elements in the message and the corresponding semantic ontology library are extracted. Based on the established message standardization semantic description model, based on the ontology semantic description and ontology connection structure of the message and message elements, the element ontology is aligned and updated through text description information matching and structure-based methods. With the help of the correlation calculation method in step 3, the node with the strongest correlation with the current message translation association map is found, a new mapping relationship between messages is established, and the message translation association map is updated; Step 5: For each message element in the target message, generate the interactive message translation code of the heterogeneous functional system based on the message conversion code generation logic.

2. The method according to claim 1, characterized in that The step 1 comprises: The message semantic ontology library is modeled for the content of the interactive messages of the integrated heterogeneous functional systems and the knowledge fields involved. First, based on the abstract model construction method of the information system, the conceptual data model CDM ontology, the logical data model LDM ontology and the physical data model PDM ontology are constructed. The conceptual data model CDM ontology is used to define the concepts, attributes and association relationships involved in the heterogeneous functional systems; the logical data model LDM ontology is used to refine the conceptual data model CDM ontology, adding units, value ranges, measurement accuracy and conversion relationships between logical elements; combined with the physical platform characteristics of the heterogeneous functional systems, the physical model is used to perform relevant processing on each logical data element to form a message semantic ontology library; the relevant processing includes adding the physical data type of the value range.

3. The method according to claim 1, characterized in that The step 2 includes: Establish and determine the internal relationships between ontologies in the semantic ontology library; internal relationships include similarity, convertibility, and non-conversion; Traverse all message elements in the current heterogeneous system interaction messages, use the ontology description method to add semantic description information and object attributes based on the abstract data model to the message elements in the message, form a standardized semantic description model of the current system's messages, and perform subsequent correlation analysis of messages between heterogeneous systems.

4. The method according to claim 1 or 3, characterized in that In the message normalization semantic description model, each interactive message consists of multiple message elements, each of which corresponds to an ontology element. The message normalization semantic description model is vertically decomposed into three levels: CDM ontology, LDM ontology, and PDM ontology. The elements in each level have an intrinsic relationship: Analyze whether the top-level CDM ontology corresponding to the message element is consistent. If so, the CDM ontology-level similarity is 1. Otherwise, determine whether the two CDM ontologies have object attributes to describe the similarity between them. If not, the similarity between the two message element ontologies is 0. Analyze whether the LDM ontologies corresponding to the message elements are consistent. If the CDM ontologies are unrelated, the LDM ontology similarity is directly judged to be 0. Otherwise, the similarity between the two LDM ontologies is judged. If they correspond to the same LDM ontology, the similarity at the LDM ontology level is 1. Otherwise, determine whether the two LDM ontologies have object attributes to describe the similarity between them. If not, the similarity between the two LDM ontologies is 0. Otherwise, the similarity at the LDM ontology level is defined based on the similarity described by the object attributes. Analyze whether the PDM ontologies corresponding to message elements are consistent. PDM ontologies are mainly used to describe the data types of message elements. During the message element translation process, if the PDM ontologies are of the same type, they can be converted from the data type level without paying attention to the similarity of the top-level CDM and LDM ontologies. If the PDM ontologies are of different types, the similarity between the two PDM ontologies is determined from the data type level based on the object attributes between them. Based on the similarity of CDM ontology, LDM ontology and PDM ontology, the similarity scores of the final two message elements are calculated uniformly. At the same time, according to the similarity comparison with the hierarchy, the details of the similarity comparison of the two message elements are given.

5. The method according to claim 1, wherein In step 3, the process of establishing the message translation association graph includes: Message nodes and message group nodes are the basic elements of the message translation association graph. The main description content of the message node includes the message node name and the message element list. The element list contains the name of each element item, as well as the element type and semantic ontology model / conceptual data model CDM ontology of each element. The element type is an interpretable type name used to mark the data type corresponding to the element. The semantic ontology model / conceptual data model CDM ontology is used to describe the semantic information of the element. The element is an ontology and also the conceptual data model CDM ontology in the abstract data model. The message group node contains several messages. Each message in the message conversion group is associated with its specific description information. The message translation association graph is established based on the message translation group. Translation nodes are another important type of node in the message translation graph. Message groups are connected through translation nodes and are used to describe the corresponding conversion model between message groups. The model is encapsulated by the translation node and is used to identify the specific translation information that needs to be executed during the translation process of the message group. The translation node parses several input messages and processes the elements according to the agreed arithmetic, logic or remote procedure call functions. It starts field parsing and translation processing and generates output messages only after receiving all input messages within the specified timing requirements. By analyzing the integration objects of complex system platforms, that is, the heterogeneous functional modules to be integrated, and constructing the relevant components involved, the interaction information of various heterogeneous functional systems is modeled on this basis, and the message translation logic based on the association graph is obtained, that is, the message translation association graph, whose basic node is the message group, and all messages appear in the form of message groups; the relevant components include messages, message groups, and translation units.

6. The method according to claim 1, wherein In step 3, the message translation path query process of the message translation association graph is as follows: Search the input source message / message group in the message translation association graph. If it can be found, continue; otherwise, end. Search the input destination message in the message translation association graph. If it can be found, continue; otherwise, end. Starting from the corresponding source message group in the message graph, obtain all its associated translation nodes in the message graph, requiring the association direction to be from the source message group to the translation node; Determine whether the translation node type is single-input single-output or multiple-input single-output mode. If not, skip the translation node and continue to determine other translation nodes. If yes, then continue; Get the destination message connected to the translation node and determine whether the destination message is the input destination message. If so, generate a path from the source message / message group to the destination message. If not, continue; The translation node and its connected destination message are stored in a stack, and each translation chain path is stored separately in the stack; For each path, the target message is read from the stack, and all its associated translation nodes are found in the message translation association graph. Then, the process jumps to the previous order and continues to obtain its associated translation node type and target message until all message paths are processed. If the destination message cannot be found at the end of the path, the path will be abandoned; Finally, after all chains are processed, the paths that can find the destination message are stored and output. These paths are translation chain paths from the source message / message group to the destination message.

7. The method according to claim 1, characterized in that The step 4 comprises: When a new heterogeneous system has the message AR.Sensor2.OutputMsg, take the message element Altitude as an example. The message elements include the CDM ontology observable Altitude, the LDM ontology measurement Altitude_AGL_Meter, and the PDM ontology LongAlitutde_Long. The currently constructed message semantic ontology library is traversed, starting from the CDM ontology observable Altidude, to find the message element Height in the AR.Tracker.InputMsg message. In the abstract data model ontology semantic description, the LDM ontology Altitude_AGL_M_Real in the message normalization semantic description model and the newly added LDM ontology Altitude_AGL_Meter both have the same CMD ontology and PDM ontology, and both can be converted with the existing LDM ontology Altitude_AGL_M_Real in the message normalization semantic description model; Based on the high similarity of the attribute text descriptions between the LDM ontology Altitude_AGL_M_Real and the newly added LDM ontology Altitude_AGL_Meter, a high confidence level of the match is obtained, and it is considered that the LDM ontology Altitude_AGL_Meter and the LDM ontology Altitude_AGL_M_Real match and refer to the same ontology; After the integration of the ontology semantics of the newly added heterogeneous system messages with the existing semantic ontology library is completed, a conversion edge between AR.Senor2.OutputMsg and AR.Tracker.InputMsg is established based on the correlation calculation method.

8. The method according to claim 1, characterized in that The step 4 comprises: The message translation association graph models the message translation relationship between existing associations to form a knowledge base. For newly added translations, the path results can be directly fed back through message path search without having to establish conversion relationships between all message groups or messages. The message translation path query problem is abstracted as finding the path from the source message group to the destination message group in the message translation association graph based on user input. The input is: source message group, destination message group, message translation association graph; the output is: path number and corresponding node sequence; when a new message node is added, the correlation between the new node and the existing nodes in the message translation association graph is analyzed and the conversion correlation coefficient is calculated, and a translation edge is established between the nodes with the strongest correlation.

9. The method according to claim 8, characterized in that Based on the message elements, the correlation coefficient between the source message and the target message is: in, Indicates the source message With target message the correlation between them; express Towards The surjective condition of the translation function is: if it is surjective, then is 1, otherwise is 0; express The i-th message element in and The jth message element in The convertibility between them, i and j are and The sequence number of the message element, m and n represent and The total number of message elements in ; if and Convertible, then is 1, otherwise is 0; express and The loss of precision during translation, is a positive real number greater than or equal to 1, when there is no loss of precision, is 1; if If it is 0, it means and Cannot convert between If it is 1, it means and can be converted between them without loss of precision; if If it is greater than 1, it means and Problems may arise during the conversion process; these problems include semantic deviation or loss of precision.

10. The method according to claim 1, characterized in that In step 5, the process of automatically generating the message translation code is as follows: Get all message elements in the destination message and push them into the storage stack; Pop up the message elements one by one, and for each message element, determine the translation path type of the message element. The translation path types include pure arithmetic / logic type, pure remote procedure call function, and mixed type. If the message element translation path is purely algorithmic / logical, then according to the nested optimization principle, starting from the source message element, the operations of the previous steps are substituted as parameters into the subsequent steps in sequence until the destination message element is reached and the optimized and merged algorithmic / logical formula is output to generate code; If the translation path type is a pure remote procedure call function, the path will not be optimized, and each remote procedure call function in the translation path will be called in sequence in the generated code; if the translation path type is a mixed type, the translation path will be scanned to obtain path segments that are greater than two consecutive arithmetic / logical operations in the transfer path, and the nested optimization method will be used to merge the conversion functions of each segment. After traversing all segments, starting from the translation path, each remote procedure call function will be generated in sequence, and the code for the arithmetic / logical operations after nesting optimization will be generated.

Citation Information

Patent Citations

  • Heterogeneous information model mapping-based distribution network information interaction method and system

    CN107315768A

  • Message conversion method and system based on data mapping graph and electronic equipment

    CN117891863A