System and method for reducing complexity in integrating exposed information models with applications
Through mapping description and annotation technology, automatic integration and two-way synchronization of the internal information model and the exposed information model are achieved, solving the complex and error-prone problems of manual integration in the existing technology, and improving the flexibility and accuracy of integration.
Patent Information
- Application Number
- CN201980037707.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-07
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2039-06-07
AI Technical Summary
In the existing technology, the integration of applications and information models exposed on the network is performed manually, which is error-prone and complex. In particular, mapping the internal information model to the exposed information model requires a lot of manual programming, and it is difficult to achieve seamless integration and real-time synchronous.
Use mapping descriptions to expand application code, automatically expose information models through annotation types/categories, and perform introspection and modification at runtime to achieve two-way synchronization between internal information models and exposed information models, using known mechanisms such as Java persistence API and XML Integrated technologies.
It achieves seamless application information model integration, eliminates the need to manually create integration code, provides a robust model integration method, allows direct access and modification of the information model structure at runtime, and improves the flexibility and accuracy of integration.
Smart Images

Figure CN112166429B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to application integration with information models, and more particularly to synchronizing an application's internal information model (data model) with an exposed information model. Background Art
[0002] Currently, the integration of applications (on devices) with information models exposed on the network (e.g., OPC Unified Architecture (UA) models) is a manual task. This manual task is error-prone because the information models of modern applications can become complex, and the corresponding elements of the application data model often have cryptic names, making it difficult for human users to achieve a correct working configuration for the integration. Furthermore, changes in the application must be manually transferred to changes in the information model at design time, causing disruptions in the application execution.
[0003] Applications typically have embedded data models, which are defined as objects or data structures, for example, by programming languages. Such embedded models are referred to herein as internal information models. The challenge is to map such existing internal information models to corresponding exposed information models. Examples of exposed information models are OPC UA-based information models, as defined by IEC 62541-3, Edition 2.0, 2015-03, (OPC Unified Architecture – Part 3: Address Space Model) and IEC 62541-5, Edition 2.0, 2015-03, (OPC Unified Architecture – Part 5: Information Model), address spaces are equivalent to instances of exposed information models. The integration of information models with applications is a complex task, which typically requires a large amount of manual programming effort and additional components to manage the interaction between applications and externally exposed information models. Existing tools (SDKs or programming libraries) provide means for defining information models, but they lack the concept of how to migrate legacy data models defined within applications to information models that can be exposed on the network (e.g., processed by OPC UA services). Existing manual integration mechanisms are complex and error-prone for humans because developers need to have detailed knowledge of the target information modeling technology, the adopted SDK, and the conceptual mapping from the application data model to the target information model while preserving the semantics of the application. Summary of the invention
[0004] There is a need for systems and methods that provide flexibility for improving the integration of an application's internal information model with an exposed information model with reduced complexity to provide a more robust model integration approach.
[0005] The above technical problem is solved by a computer system, a computer implemented method and a computer program product having the features as claimed in the independent claims. The claimed embodiments allow seamless integration of information modeling with applications, thereby eliminating the need for manual creation of integration code. The claimed approach provides direct access to live values of application elements at runtime. It further allows introspection and modification of information model structures during application runtime.
[0006] To solve this technical problem, an application code (e.g., an internal information model (data model) of an application) is augmented with a mapping description to enable automatic exposure of annotated types / classes in an exposed information model. The augmentation code can be directly implemented in the code via annotations including the mapping description so as to reuse the application code for constituting the exposed information model. Alternatively, the mapping description can be stored separately from the code (e.g., in an XML file). The separately stored mapping description can be directly associated with the corresponding code portion. Annotations can be used like comments within the code to provide additional information required for integrating the code with the exposed information model. These annotations can be evaluated during runtime and combined with information implicitly provided by the code. For example, class signatures (name, inheritance, interface), field signatures (name, type, value), and method signatures (name, input and output parameters) can be used to constitute the exposed information model and integrate the exposed information model with the code or the internal information model. The integration of information modeling with application code can be based on the integration of information modeling with application code from established technologies that utilize annotations (e.g., such as Java Persistence API (JPA), Java Architecture for XML Binding (JAXB), or Java for RESTful / XML WEB services). The basic concepts used for annotations can be summarized as follows:
[0007] Category-tag: declares the associated element or category
[0008] Address: Relationship of an object within the target context
[0009] Identifier: Links an object to an entry
[0010] References: relate the structure of an exposed model element (e.g., a reference) to the structure of an internal model element (e.g., a field)
[0011] The exposed information model is self-contained in that it provides all the metadata required for the exposed information to be processed by the client / consumer. For example, the client / consumer can be another system interacting with the information model server, or it can be a human user interacting with the information model through an appropriate software application. This includes type declaration information. This also includes information related to the decoding and encoding of the transferred serialized data. The exposed information model basically follows the graph model composed of nodes and edges. Nodes and edges are always created based on predefined types (type-safe model). Edges are represented by references to associated nodes.
[0012] Through the exposed information model, the client / consumer can browse the actual configuration of the application, and then use the types / classes represented in the exposed model to create instances in the exposed information model when the application is running. In other words, the client / consumer can interact with the model elements via the exposed information model. These interactive elements have two main purposes: first, to allow the client / consumer to change the application data model of the application, and second, to make the client / consumer aware of the changes that have occurred in the application. Automatic mapping of models and object structures can be used to illustrate internal objects in the application accordingly during runtime. This automatic mapping allows bidirectional synchronization of elements of the information model. In one embodiment, handles on both sides can be used to manipulate requests and updates using additional business logic.
[0013] In one embodiment, a computer system is provided for automatic model integration of information models with corresponding applications. As used herein, model integration refers to model structure integration and / or model content integration, and occurs when the application is running. Model structure integration and model content integration are achieved by providing components that allow synchronization between the exposed information model of the application model structure and the internal information model or synchronization of content value changes that occur in any model of the information model. That is, changes that occur in the exposed information model will trigger updates in the corresponding internal information model, and vice versa.
[0014] The computer system includes an information model server, which is used to expose the information model to consumers. The information model server is a component that implements access to the exposed information model. The access functions implemented by the information model server may include services for browsing address spaces, reading and writing attribute values, creating or deleting references between model elements, obtaining event notifications, and creating and deleting exposed model elements.
[0015] In the field of software engineering and data modeling, information models are usually abstract formal representations of entity types, which may include their properties, relationships, and operations that can be performed on them. The entity types in the model can be the kinds of real-world objects (e.g., devices in a network or occurrences), or they themselves can be abstractions of entities used in, for example, a billing system. Typically, they are used to model constraint domains that can be described by closed sets of entity types, properties, relationships, and operations. Information models provide a formal system for describing the problem domain without constraining how that description is mapped to the actual implementation in the software. There may be many mappings of information models. Such mappings are usually referred to as data models, regardless of whether they are object models (e.g., using UML), entity-relationship models, or XML schemes. Application data models are also referred to as internal information models in this article.
[0016] A variety of information modeling languages exist, including but not limited to: entity-relationship (ER) graphical notation, Integrated Definition Language 1 Extension (IDEF1X), the EXPRESS language and the Unified Modeling Language (UML), the Object-Role Modeling Language (ORM), and Fully Communication-Oriented Information Modeling (FCO-IM). Some modeling languages refer to the term "type", while other languages use the term "class". For these reasons, the types / classes of information model elements are used synonymously in this article. The exposed information model has exposed model elements for exposing types to consumers and for exposing instances of types and their member values. The exposed model elements may have a type space for exposing types as part of the exposed information model, and may have an instance space for exposing instances of types and their member values.
[0017] An application component of a computer system provides application code augmented with a mapping description. Providing application code as used herein means providing components for accessing the application code from outside the application component. A mapping description defines how an internal information model of an application is mapped to an exposed information model. For example, a particular mapping description can be configured to select one or more type definitions (categories) of internal information to be exposed in the type space of an exposed information model.
[0018] The model integration component of the computer system registers the internal information model elements to be exposed. The model integration component can access the application code provided by the application component. The mapping description in the extension code is used to select the corresponding internal information model elements, which are registered in the registry of the system. The mapping module of the integration component maps the registered internal information model elements to the corresponding exposed information model elements according to the mapping description. The mapping module is configured to map the registered internal information model elements by parsing the fields and methods of the corresponding internal information model type (category) together with the corresponding mapping description, and map the instance-based exposed information model elements to the internal information model instances.
[0019] The synchronizer module of the model integration component can synchronize the content values of the exposed information model and the internal information model in both directions when the corresponding model elements change. It can further synchronize the model structure of the information model in both directions by creating or deleting the corresponding model elements. In other words, the synchronizer performs a bidirectional object model synchronization, which includes services for creating and deleting objects, reading and writing properties, forwarding events, and calling methods. This mechanism couples the information model exposed in real time with the application at runtime.
[0020] In order to synchronize changes associated with information model elements, the system detects changes to internal or exposed information model elements. For example, event listeners can be used to observe model elements and notify the synchronizer about any changes that occur to model elements. The synchronizer then determines the synchronization direction for propagating the detected changes in one of the information models (exposed / internal) to other information models (internal / exposed). For example, the synchronizer can compare the timestamps associated with the information model elements to determine whether the most recent change occurred to the internal information model element or to the exposed information model element. The information model with the most recent change is then used as the origin of the synchronization direction. In other words, if the most recent change is detected for the exposed model information element, the synchronization direction points to the corresponding element in the internal information model. If the most recent change is detected for the internal model information element, the synchronization direction points to the corresponding element in the exposed information model. The allowed synchronization directions can also be limited or defined by mapping descriptions. Alternatively, the way to trigger synchronization can be used to determine the synchronization direction. For example, the synchronizer module can provide a method for triggering updates. This method can also be parameterized to limit / define the synchronization direction.
[0021] The synchronizer has information about the coherence between a specific internal information model element and a specific exposed model element. In other words, the synchronizer can determine the corresponding model element related to the changed model element. For example, ID mapping can be used for this purpose. If the exposed model element is changed, the corresponding internal model element is determined, and vice versa.
[0022] Match-making of signatures of internal information model elements (e.g., class signatures (name, inheritance, interfaces), field signatures (name, type, value), or method signatures) combined with mapping descriptions is used to synchronize the structure of the exposed model elements with the structure of the internal information model, which may be necessary in cases where the content value corresponds to a complex object with sub-objects.
[0023] If the signatures of the exposed information model element and the related internal information model element match, the synchronizer synchronizes the exposed information model element and the related internal information model according to the determined synchronization direction. In other words, the synchronizer detects the synchronization direction and performs synchronization of content values or model structure elements based on the known coherence between the internal information model element and the exposed model element.
[0024] For example, in the case of detecting a change of a first exposed object, the synchronizer checks whether the first exposed object has an association with a second exposed object defined in the exposed information model. If such an association exists, the synchronizer further checks whether the internal object corresponding to the first exposed object matches the signature of the field of the second internal model element corresponding to the second exposed model element. If there is a signature match, the field value of the second internal model element is set to the field value of the second exposed model element. In the case of detecting a change of the first internal object, the synchronizer processes (e.g., parses) the field of the first internal object to determine the child object of the first internal object. The synchronizer then checks whether the first exposed object corresponding to the first internal object has an association with the second exposed object corresponding to the child object defined in the exposed information model. If the association matches the signature or mapping description at a specific field of the first internal object, a corresponding association is created accordingly in the internal information model.
[0025] In one embodiment, a computer-implemented method for synchronizing content values between an internal information model of an application and an exposed information model is provided while the application is running. Internal information model elements are mapped to exposed information model elements via application code including a mapping description (the mapping description defines how the application data model is mapped to the exposed information model). The method includes: detecting changes to exposed information model elements or internal information elements; determining a synchronization direction; performing pairing to determine a model element corresponding to the changed model element by using a signature of the related information model element combined with the mapping description; and synchronizing the content values of the corresponding internal information model element and the exposed information model element according to the determined synchronization direction if the signatures match.
[0026] In the case where the content value is a primitive value, the synchronizer can directly update the content value of the determined corresponding model element. A primitive value (or primitive data type) is a value that cannot be further divided (i.e., it has no other structure or methods). In the case where the content value represents an array (or aggregate, vector), the synchronizer compares the matching references for each array element and synchronizes with it. In the case where the content value is a non-primitive value associated with a complex object including sub-objects, the synchronizer recursively applies the steps of performing pairing and synchronizing the content value with all sub-objects of the complex object.
[0027] In another embodiment, a computer-implemented method for synchronizing information model structures during application runtime is provided. Internal information model elements are again synchronized using mapping descriptions. Description (The mapping description defines how the internal information model is (to be) mapped to the exposed information model) to map to the exposed information model elements. The method includes: detecting a model structure change in the instance space of the exposed information model, and propagating the detected model structure change to one or more internal objects of the internal information model based on the registered categories represented in the type space of the exposed information model; or detecting a model structure change among the internal objects of the internal information model, and propagating the detected change of the model structure to the corresponding one or more exposed objects in the instance space.
[0028] In other words, if an internal object is created or removed as a changed instance of the application while the application is running, the corresponding changes are propagated to the information model server and reflected in the exposed information model after synchronization. Likewise, if an exposed object is created or removed as a changed instance of the exposed information model while the application is running, the corresponding changes are propagated to the application components and reflected in the internal information model after synchronization.
[0029] The computer-implemented method can be performed by a computer system when a corresponding computer program is loaded into a memory of the computer system and said program is executed by one or more processors of the computer system.
[0030] Further aspects of the invention will be realized and attained by means of the elements and combinations particularly described in the appended claims.It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as described. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a block diagram of a computer system for automatic model integration of an information model with a corresponding application according to an embodiment;
[0032] Figure 2Ais a simplified flow chart of a computer-implemented method for synchronizing content values between an internal information model of an application and an exposed information model according to an embodiment;
[0033] Figure 2B is a simplified flow chart of a computer-implemented method for synchronizing information model structures of an internal information model of an application with an exposed information model according to an embodiment;
[0034] Figure 2C , Figure 2D illustrates two synchronization scenarios with associations between objects;
[0035] Figure 3A illustrates examples of application code annotations that can be used to define information models;
[0036] Figure 3B Figure 1 shows an example of application code using annotation classes that follow the OPC UA metamodel.
[0037] FIG. 4A to FIG. 4E illustrates an integration mechanism for integrating internal and exposed information models at application runtime according to five embodiments;
[0038] Figure 5 is a simplified diagram showing examples of a general purpose computer device and a general purpose mobile computer device that may be used with the techniques described herein. DETAILED DESCRIPTION
[0039] Figure 1 is a block diagram of an example embodiment of a computer system 100 for automatic model integration of information models with corresponding applications in accordance with an embodiment. Thus, model integration involves model structure integration or model content integration, and occurs while the application is running. In other words, in one aspect, model integration can manipulate the synchronization of values between an application's internal information model (sometimes also referred to as an application data model) and an exposed information model. In another aspect, model integration can manipulate the synchronization of model structure changes between two information models.
[0040] Figure 2A is a simplified flow diagram of a computer-implemented method 1000 for synchronizing content values between an application's internal information model and an exposed information model.
[0041] Figure 2B is a simplified flow chart of a computer-implemented method 2000 for synchronizing the information model structure of an internal information model of an application and an exposed information model. The computer system 100 is configured to perform both methods 1000, 2000 when synchronizing information models. Note that content value and model structure synchronization can occur separately in the system 100.
[0042] The computer system 100 is described in Figure 2A , Figure 2B The embodiments of the present invention are disclosed in the context of a flowchart of FIG. Figure 1 , Figure 2A and Figure 2B The computer system 100 includes three main components: an information model server 130, an application component 110, and a model integration component 120.
[0043] The information model server 130 has the function of exposing the information model to the consumer 200. The consumer is an external entity that accesses the exposed information model from outside the computer system 100. Such an external entity can be another computer system or a human user using a client computer. The human user can manually apply changes to the model. Another system can run a certain software (such as an engineering tool) that accesses the information model as part of its own logic (such as accessing a remote API). The exposed information model describes the standardized nodes of the address space of the information model server. These nodes are standardized types and standardized instances used for diagnosis or as entry points to specific nodes of the server. For example, the exposed information model can define the address space of an empty OPC unified architecture (OPC UA) server to achieve interoperability. In order to make the data exposed through the address space mutually understandable by different systems, the exposed information model standardizes the corresponding information representation as computer-centric data. This content can be used as a starting point for discovering all information related to any customer through browsing.
[0044] The exposed information model includes exposed model elements 131 for exposing types or classes and for exposing instances of types or classes (exposed objects) and their member values. Figure 1 In the implementation of , the exposed model element 131 has a type or class space 132 for exposing types or classes as components of the exposed information model, and has an instance space 134 for exposing instances of the types or classes and their member values. Consumers 200 can interact with the exposed information model by accessing the model and the exposed objects to perform actions (such as reading, writing, browsing, or subscribing). For example, a user of the system can send a request to the information model server 200 to create or delete exposed objects to adjust the model structure while the application is running.
[0045] The type space 132 may further include a handle 133. The handle is configured to notify the model integration component 350 about a create request by the consumer 200 for the creation of a new exposed object 134 based on the exposed type 132. This handle triggers the instantiation of the new corresponding internal object 114. Similar to the handle 133, the handle can also be a component of an internal model element to notify the logic implemented as a component of the internal model element about any changes in the content value or model structure. In the case of an internal model element, a normal interface as known in object-oriented programming languages is usually used to define the model integration component 350. Handle Interface. Known mechanisms of modeling technology (e.g. OPC UA subscriptions) can be used to notify clients / consumers about changes (value or structure changes) made in the exposed models. Whenever a change is synchronized, the OPC UA subscriptions associated with the exposed models (value changes and / or structure changes) are triggered accordingly.
[0046] The computer system 100 further includes an application component 110 for providing application code augmented with a mapping description 113 (the mapping description 113 defines how the internal information model of the application is mapped to the exposed information model). Figure 3B An example of a mapping description is described in detail in the description of . The application code defines an internal information model (application data model) including internal model elements 111. The internal model elements 111 use types / classes 112, with mapping descriptions 113 as part of the types / classes 112. Instances of the type / class definitions are created as internal objects 114 of the application.
[0047] The system 100 further has a model integration component 120 that provides functionality for integrating the internal information model with the exposed information model, since proper mapping between the information models allows consumers to interact with the application through the exposed information model.
[0048] To achieve this goal, the model integration component has a registry module 121, which is used to register 330 internal information model elements 111 for exposure in the exposed information model at the information model server 130. The registration can be triggered by the accessible code that can be parsed by the model integration component 120 to find the corresponding mapping description in the code and / or automatically. When parsing the application code, the registry 121 is aware of the exposed internal application types / classes 112 in the exposed information model (e.g., through the corresponding annotations that implement the mapping description). Thereby, a specific mapping description is used to select one or more internal model elements 111 for exposure in the type or class space 132 of the exposed information model.
[0049] The mapping module 122 of the module integration component 120 is then able to map the registered types / classes 112 to the exposed information model elements 131 such that the mapped types / classes are exposed 340 in the type space 132 of the exposed information model. In other words, the exposed model elements 131 have a type or class space 132 for exposing types or classes as part of the exposed information model. In addition, they have an instance space 134 for exposing instances of the types or classes and their member values. This mapping is performed according to the mapping description in the application code. For the mapping of exposed information model elements to corresponding internal information model elements 111, the mapping module is able to parse the fields and methods of the corresponding internal information model types / classes 112 together with the corresponding mapping descriptions 113, and map the instance-based exposed information model elements (exposed objects 134) to corresponding internal information model instances (internal objects 114). The handle 133 is a mechanism by which the model integration 120 is able to map the exposed information model elements (exposed objects 134) to the corresponding internal information model instances (internal objects 114) in the type space 132 (the type space 1 32 The type registration callback method in will be called by the information model server 130 whenever an instantiation of the corresponding type is requested by a consumer 200. This handle is used to register Figure 4C An “illustrative” method of the plant 124 is shown in FIG.
[0050] The synchronizer module 123 of the model integration component is implemented to synchronize 310 , 320 content values and / or model structure changes associated with information model elements on either side (ie, changes occurring within internal model elements 111 or exposed model elements 131 ).
[0051] To this end, the synchronizer 123 first detects changes to information model elements that are internal or exposed to 1100, 2100, 2300 while the application is running. Such a change may involve a change in the content value of a specific information model element, or it may involve a structural change in the corresponding information model (such as the creation of a new model instance / object or the removal of an existing model instance / object). If the change occurs within the exposed information model, the change is typically triggered by a corresponding action (such as create, update, delete) of the client / consumer 200 that interacts with the exposed information model. If the change occurs in the application component 110, the change can be triggered by a change in the field value of the corresponding internal object 114 (such as a change in the content value of a sensor value). Handles in the application's programming language can be used to react to changes on the internal information model (such as "hooking" getters and setters) and trigger synchronization from the internal to the exposed information model. Alternatively, the application can manually trigger a call such as Figure 4E The synchronization of the "update" method shown in .
[0052] The synchronizer 123 then determines 1200 the synchronization direction. In other words, the synchronizer detects in which information the change occurs and determines that the change needs to be propagated to other information models. There are different options available for deriving the synchronization direction. For example, the system can simply compare the timestamps associated with the information model elements to determine whether the most recent change occurred to the internal information model elements or to the exposed information model elements. The information model with the most recent change is then used as the origin of the synchronization direction. Alternatively, in the case where the information model server 130 that implements the exposed information model detects a change, the information server can correspondingly notify the synchronizer to set the exposed information model as the origin of the synchronization direction. In the case where the application component 110 that implements the internal information model detects a change, the application component can correspondingly notify the synchronizer to set the internal information model as the origin of the synchronization direction. For example, an application can trigger synchronization-for example, by using a method (at the synchronizer 123) that starts synchronization and defines a direction.
[0053] The synchronizer 123 further performs pairing 1300 to determine the model element corresponding to the changed model element by using the signature of the corresponding information model element combined with the mapping description. For example, the signature is determined based on the corresponding information in the code using introspection. For example, class signatures (name, inheritance, interface), field signatures (name, type, value), and method signatures (name, input and output parameters) can be used to compare information model elements and determine whether they correspond. The mapping description can provide additional information that can be useful for pairing. For example, an identifier of a type (object type or reference type) as defined in the exposed information model can be used within the mapping description to determine the corresponding object.
[0054] Once the synchronization direction is known and the corresponding information model elements are identified, the synchronizer can synchronize changes in the content values 1400 or the model structures 2200 , 2400 according to the determined synchronization direction.
[0055] In the case where the change occurs in the content value (which is a non-primitive value because the content value is a complex object including sub-objects), the pairing and synchronization steps are recursively applied to all sub-objects of the complex object. In other words, if a content change is detected for a complex object, there is no simple correspondence between the corresponding object in the instance space 134 and the internal object 114. Instead, the structure of the complex object needs to be parsed recursively, and for each identified sub-object, the corresponding object is identified through pairing. For each parsed sub-object, if the sub-object has a primitive value, the content value of the corresponding sub-object can be synchronized. If a specific sub-object is a complex object itself, the recursion is also applied to the specific sub-object.
[0056] In some cases where synchronization involves content values of complex objects, the changed structure of the complex objects needs to be propagated to the information model to be updated. Figure 2C and Figure 2D Two pairing / synchronization scenarios of complex objects including sub-objects are illustrated. The dot-dash double arrows indicate the correspondence between internal and exposed objects as known from the initial model mapping.
[0057] Figure 2C An example is illustrated in which a model structure change occurs in an exposed information model at the information model server 130. The system detects a change in a first exposed object E1 in the instance space 134. The system checks whether the exposed object E1 is a complex object by checking whether the first exposed object E1 has at least one (exposed) association EA1 defined in the exposed information model with at least a second exposed object E2. If such an association EA1 exists, the synchronizer checks whether a specific internal object I1 corresponding to the first exposed object E1 matches the signature of a field of a second internal model element I2, where this second internal model element I2 corresponds to the second exposed model element E2. If there is a signature match, the field value of the second internal model element I2 is set to the internal object I1. That is, for building the structure of the internal information model, the corresponding internal objects need to be associated via the (internal) association IA1. This is achieved by putting a complex internal object into a field of another internal object.
[0058] If, for example, a consumer wants to create a new state and add it to Figure 3B , the user instantiates a new exposed model element of the exposed type created by the class "StateMachineVariableType" and links it with a reference to the exposed model element (the exposed model element represents an instance of FiniteStateMachine). In this case, the new exposed model element representing the state is E2, and the exposed model element representing the FiniteStateMachine is E1. As a reaction to this change of the exposed information model, the synchronizer performs a synchronization from the exposed information model to the internal information model and identifies the internal object I1, which corresponds to E1 and is an instance of the class "StateMachineVariableType". Figure 3B In this class shown in , the synchronizer performs a pairing between the signatures of the fields of the inner object I1 and the outer object E2 together with the references between the outer objects E1 and E2. The annotations "@Reference" (see Figure 3B) indicates that the child object may be synchronized based on the exposed model element. Since neither annotation makes further specification of the reference type, a default reference type is used for pairing. Alternatively, it can be achieved that "any" reference type can match in this case. If the reference used to link E1 to E2 matches this default reference type, the pairing of the object types is completed. During the instantiation of E2, an internal object I2 is created based on the type / class 112 that was previously registered for type E2. If the class of I2 can be assigned to an actual field of I1 evaluated by the pairing process, I2 is added to the matching fields. In the example described, the two fields "currentState" and "states" match, but only the field "states" is allowed to be updated through the exposed information model - as defined by the mapping description by setting the property import to false.
[0059] Figure 2D An example is illustrated in which a change in the model structure of a complex object occurs in the internal information model at the application component 110. The synchronizer detects a change in the third internal object I3, and processes the fields of the third internal object I3 to determine the child object I4 of the third internal object. In other words, the synchronizer determines the (internal) association IA2. The synchronizer then checks whether the third exposed object E3 corresponding to the third internal object I3 has an association EA2 defined in the exposed information model with the fourth exposed object E4 corresponding to the child object I4. If no association is found that matches the signature and mapping description of the field where I4 is located, a target association EA2 between E3 and E4 is created. In the case where the change is related to the deletion of I4 (i.e., an empty field at I3), the matching association is removed accordingly.
[0060] Continuing with the above example: If the application adds an instance of StateMachineVariableType I4 to the field "states" of Finite-State-Machine I3, the synchronizer evaluates all existing associations (references) of this Finite-State-Machine E3's exposed instances. Since E4 is a newly created object, no matching references will exist up to this point in time. Therefore, a new reference EA2 between E3 and E4 is created. Figure 3B In the example above, the type is not further defined in the annotation @Reference at the actual field "states" and therefore the reference will have the default reference type.
[0061] When synchronizing model structure changes between information models, different types of changes can be distinguished. The most common model structure changes involve creating a new object (instance) in one of the information models or removing an existing object (instance) from one of the information models. The following describes in detail four update scenarios: an intention to create an internal object, an intention to create an exposed object, an intention to remove an exposed object, and an intention to remove an internal object. Reference numbers are hereby again referred to as Figure 1 .
[0062] In a first update scenario, the detected model structure change anticipates the creation of an internal object 114 from a created newly exposed object 134. For example, the consumer 200 sends a create command to the information model server to create a new object based on a certain type defined in the type space 132 of the exposed information model. The synchronizer determines the corresponding internal type / class 112 and creates a new internal object 114 of the corresponding type / class 112. The fields of the new internal object 114 are initialized with information from the corresponding created newly exposed object 134 by applying the corresponding mapping description.
[0063] Continuing with the state machine example above: if a consumer creates an instance of Finite-State-Machine in the exposed information model, then the registered type for the exposed type of Finite-State-Machine is created (see Figure 4A ) in the registered method in the Finite-State-Machine. The exposed object instance of the Finite-State-Machine can have child objects according to the exposed types of the Finite-State-Machine - for example it can be initialized with a collection of instances of StateMachineVariableType. In case of additional states created by the consumer in the exposed information model, the synchronizer recursively follows the structure of the exposed model elements of the Finite-State-Machine in order to create the corresponding internal objects for each state, initialize the values, and add them to the field "states" of the internal object created for the Finite-State-Machine.
[0064] In the second update scenario, the detected model structure change anticipates the creation of an exposed object 134 from a created new internal object 114 of a certain internal type / class 112. The synchronizer determines the corresponding type in the exposed type space 132 and adds the new exposed object 134 of the corresponding type to the instance space 134. If the created new internal object 114 is a complex object with one or more child objects, the content of the created new internal object 114 is recursively processed to create exposed model elements for the one or more child objects of the complex object.
[0065] Continuing with the state machine example above: If the application creates an instance of a Finite-State-Machine in the internal information model, instances of the exposed types created for the class of the Finite-State-Machine are created. The internal object instance of the Finite-State-Machine can be initialized with the sub-objects contained in the fields, for example it can be initialized with a certain collection of instances of StateMachineVariableTypes. In case of additional states created by the application in the internal information model, the synchronizer recursively follows the structure of the internal model elements of the Finite-State-Machine in order to create the corresponding exposed objects for each state, initialize the values and create the corresponding references between the Finite-State-Machine and its states in the field "states".
[0066] In the third update scenario, the detected model structure changes foresee the removal of exposed objects from the instance space 134. The synchronizer determines the corresponding internal objects 114 and removes the corresponding internal objects. If a complex object is to be removed, all associations and sub-objects are also removed by recursively processing the complex object.
[0067] Continuing with the above state machine example: If a consumer removes a state from the Finite-State-Machine, the corresponding internal object of this state is determined and the field of the corresponding internal object in the Finite-State-Machine is removed.
[0068] In a fourth update scenario, the detected model structure change envisions the removal of an internal object 114 from the internal information model. The synchronizer determines the corresponding exposed object in the instance space and removes it from the instance space 134. If the removed internal object 114 is a complex object with child objects, the contents of the removed internal object 114 are recursively processed to identify and remove exposed (child) objects created for the contents of the complex exposed object.
[0069] Continuing with the above state machine example: If the application removes a state from the Finite-State-Machine, the corresponding exposed object of this state is determined. The exposed object is removed, and all references matching the signature at the field of the corresponding internal object of the Finite-State-Machine are removed from the exposed object instance representing the Finite-State-Machine.
[0070] Figure 3AA table 310 is shown with an example of an annotation mechanism (column 1) and annotation examples (column 2) that can be used to define an information model. In this example, the annotation categories adhere to the OPC UA metamodel. Column 3 includes a description of the corresponding annotation with the rationale behind it.
[0071] Re-use of existing categories may require filtering of the categories that should be used for the exposed information model. The annotation @Node can be used to define related categories and distinguish between nodes and references following the RDF / OPC UA concept. The annotation @ID describes an identifier that allows objects to be identified in order to associate them with nodes in the information model. The annotation @Reference indicates the field of the object to be exposed as a (child) node. If a node is considered to be a (UA) variable, it can be exposed as the "value" of this (variable) node using the annotation @Value at the corresponding field. The annotation @Method allows methods to be exposed to embedded logic. Additional annotations (such as, for example, @BrowseName, @DisplayName, @Description, @DataType) can be used on fields to fill in the metadata of the corresponding (one or more) exposed nodes with their values. The list of examples is not intended to be complete. A person skilled in the art may define other useful annotations to define mapping descriptions.
[0072] Figure 3B An example node 320 is included that illustrates the use of an annotation class that follows the OPC UA metamodel to implement the FiniteStateMachineType annotation class of a PackML state machine. PackML (Packaging Machine Language) is an industrial technical standard for the control of packaging machines as an aspect of industrial automation. The following implementation example has previously been referred to as a state machine example. Thus, the example code (left column of table 320) utilizes Figure 3A The functionality of the various code parts is described in the descriptions given in the right column of Table 320. If no annotations are given (such as BrowseName, DisplayName or DataType), they can be automatically derived from the corresponding field name, field type or class name. Each annotation can hold additional properties to parameterize the mapping (if it is different from the automatic mapping): for example, @Reference on a field can be mapped to the hasComponent reference by default - but this can be overridden when another reference type is required, for example using the following notation: @Reference(refType=UAReferenceTypes.organizes)
[0073] The example implementation of a finite state machine inherits the implementation of a state machine—that is, the fields or methods exposed in that superclass are also considered.
[0074] Metadata describing the associated node can be obtained from the class or object. In the example, the browse and display names can be generated based on the value at the field "name". If no annotation is given, the automation tries to derive a meaningful name based on the class (or the field name of the parent containing this object).
[0075] A node identifier (ID) can also be generated based on the field value. However, if no annotation @ID is given (as in the example), an ID can be automatically generated.
[0076] In the example, the browse and display names are determined based on the value of the field "name". The "currentState" contains the additional (non-original) object. The @Reference annotation ensures that the additional object will also be processed and that the generated node will be referenced from the node representing the additional object.
[0077] The content of the aggregate "states" can be processed in the same way. In order to distinguish the content from the values of other fields (such as "currentState"), an intermediate node "states" can be inserted. It is possible to identify the object that has been processed (for example, if the current state is also part of the aggregate "states"). In such cases, the relevant node is created only once and referenced multiple times.
[0078] Implements the EventHandler interface - that is, calls the "handle" method whenever something happens on a node or object. EventHandler can also support subscriptions to other objects or nodes. This mechanism can be used within a state machine to observe properties or methods that should trigger state changes. That is, event objects are created in response to property value changes and passed to the handle() method as notifications. The contained business logic can then handle the transition and update the "currentState" accordingly.
[0079] Here are some concepts and their possible corresponding implementation / rationale:
[0080] Existing objects can be registered in the registry. Their fields and methods can then be exposed with a given annotation at the corresponding class. Annotations describe how the annotated element is represented in the information model (address space).
[0081] Type space factory / registrar: It is possible to register classes in the registry (using annotations). These types are then exposed in the type space of the information model. Through this factory (type-safe), instances can be created using a copy of the corresponding type definition as a basis.
[0082] Bidirectional synchronization: For each node, a wrapper is created that holds all the information needed to synchronize the object with related nodes and references. When an object changes, it can call an update method at the registry. The registry can determine the relevant wrapper for synchronizing related nodes and references. When a node or reference is added, removed or modified, the information model server can also call the corresponding update method, which in turn updates the object(s). A wrapper can be understood as a component that is aware of both sides of the synchronization and implements data exchange between the exposed information model and the internal information model. A wrapper is sometimes referred to as an association class that acts as a coupling object between information models.
[0083] Read, Write, Subscribe: Value changes at nodes or objects can also be handled via bidirectional synchronization. If supported by the modeling technology, a "subscription" can be established by the consumer - to notify the consumer about changes on the exposed information model (e.g. value / structure changes). Changes at the node are also exposed on the consumer's established subscription.
[0084] If the synchronizer updates the value or structure of the exposed information model, existing subscriptions can be processed / called accordingly to notify consumers (equivalent to the call of the update handler in the opposite direction).
[0085] Event handlers: Wrappers can monitor related nodes for changes to related objects. Objects can implement event handlers. For example, if changes at related nodes and references should be handled immediately in the business logic.
[0086] In the OPC UA core model, the basic types of state machines have been defined in the OPC UA specification version 1.02 (release) (Part 10: Programs, May 2012). However, the specification only targets the representation of state machines, and there is no means to manipulate transitions based on property changes. In contrast, the sample code 320 is established to manipulate the transition annotation class of the state machine. States and state transitions are provided in the sample code 320. The state machine knows its array of states, and such states know their transitions. For example, the number of transitions can be stored in the state machine through the following code section:
[0087] @Reference public ArrayList <transitiontype>transitions
[0088] Instance classes are annotated in the way they are registered to the associated types in OPC UA.
[0089] The EventHandlers of these objects are called whenever one of these classes is instantiated by the creation of OPC UA code or when a field on such an object changes due to a change in the UA Information Model (Mechanism 3). That is, when a UA Reference to a node representing a state is added to the state machine, the collective state is updated, and the handler is called. In such cases, the handler starts a process (e.g. checkState() in the example in Segmentation fault! Reference source not found (Fehler! Verweisquelle konnte nicht gefundenwerden).) that manipulates the changed object structure. In this process, the state machine subscribes to changes on currentState, states subscribe to changes on related transitions, and transitions subscribe to referenced (monitored) parameters and methods. Finally, changes in parameter values are propagated all the way to the state machine, which is able to evaluate the transition and eventually enter the next state. After entering the next state as the value of the field currentState, the state machine must use the update method on this field to update the representation in OPC UA (Mechanism 5).
[0090] FIG. 4A to FIG. 4E The diagram shows five integration mechanisms used to integrate internal and exposed information models at application runtime. Figure 1 The various modules in the model integration component 120 are collectively referred to as a factory 124.
[0091] Figure 4A The diagram illustrates a first integration scenario when registering a new application class in the internal information model of the application component 110. Using the method register(), the class can be registered at the factory 124. The class is resolved and the corresponding wrapper 125 is generated. The corresponding node is exposed in the type space 132 of the corresponding exposed model element. If a type 132-1 is created, the potential inheritance types can be analyzed by reflection in order to find an anchor within the type space 132, where this new type 132-1 can be registered as a subtype. Moreover, the object 116 can be registered as a type in the exposed information model (for example by using the deriveType() method). This can be advantageous when the pre-parameterized object is to be used as a template for instances (for example, Example_DeviceType can instantiate the corresponding DeviceType.class and, for example, predefine vendor-specific parameters).
[0092] Figure 4B The diagram shows a second integration scenario of an application object with an instance space 134 of exposed model elements. The factory 124 parses the object 116 according to the mapping description in the annotation of the relevant class 115 (and using introspection) to create a wrapper 125-1 for each node and reference required to represent the object 116. The generated wrapper 125-1 is registered, and the relevant nodes and references of the wrapper (instances 134-1, ...) are added to the instance space 134. When the wrapper is created, it is initialized. That is, the metadata of the node (such as node id, browse name and display name) is determined. In the case of node id and browse name, this can be done only once at the beginning, because such aspects of the node cannot be changed after creation. In the case of display name, for example, synchronization can also update the actual display name - for example if the value of the annotation field changes.
[0093] In the first and second integration scenarios, the factory 124 parses all fields and methods of the corresponding class or object to expose the contents of the object. Advantageously, this is performed recursively so that all contained sub-objects can be manipulated in the same way. Thus, registration of a class or instantiation of an object creates all wrappers and elements within the exposed information model that are required in order to comprehensively represent the object within the exposed information model.
[0094] Figure 4C The diagram illustrates a third integration scenario in which a consumer of an exposed information model creates an instance of a type of an exposed model element. When a consumer wishes to create an instance 134-2 of a type 132-2, the callback registered for this type 132-2 executes the instantiation process within the factory 124 (method instantiate()). The factory determines the relevant wrapper registered for that type (method lookup()). The factory then creates an instance of the relevant class 115-2 (method newInstance()) and processes the corresponding object 116-2 within the factory (method create() similar to the second integration scenario). Finally, the newly created node is added to the instance space (method add()) and it is used as the result of the consumer's initial call. The dotted arrows in the diagram represent "knows about" relationships:
[0095] - A wrapper for a type knows about categories and type nodes.
[0096] - The wrapper of an instance knows about the object in the instance node.
[0097] Figure 4D A fourth integration scenario is illustrated in which the exposed information model functions similarly to the front face of the associated application object. When a consumer accesses an instance 134-3 in the exposed information model, the associated wrapper (method access() and method lookup()) is obtained from the factory's registry. This wrapper contains a link to the associated object 116-3 in the application component 110. The access type of the (one or more) exposed model elements is passed to the associated object 116-3 (read, write, etc.). For example, in the case of a value read or a value write, an annotated field containing the actual value is accessed. If the object 116-3 implements the EventHandler interface, this handle (method handle()) is called before and / or after the object access (depending on the access mechanism). The result is returned to the consumer via the accessed instance 134-3.
[0098] Figure 4E The fifth integration scenario for synchronizing the exposed model elements with the internal model elements is illustrated. Whenever the object 116-4 is changed, the exposed information model can be synchronized with the changed object using the update() method in the factory 124. elephant Synchronize. As described in the previous scenario, an object can be related to multiple wrappers and elements in the exposed information model. The factory determines the relevant wrappers and processes them recursively (method recursive update()) in order to adjust the representation in the exposed information model to the actual state of the object (method sync()). In case a consumer is subscribed to a value or structure change, notifications are sent accordingly.
[0099] This synchronization can be performed bidirectionally. That is, when the exposed information model includes an element that matches the corresponding internal information model, the structure of the internal information model is updated accordingly. For example, if a node describing a parameter is added as an element of an additional node describing a parameter set, the field of the vector with the aggregate of the parameters holding the parameter set is updated.
[0100] Figure 5 900 and a general purpose mobile computer device 950 that can be used with the techniques described herein. In some embodiments, the computing device 900 may be related to the system 100 (see Figure 1 ). Computing device 950 is intended to represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, and other similar computing devices. In the context of the present disclosure, computing device 950 may allow a human user to interact with device 900. In other embodiments, the entire system 100 may be implemented on mobile device 950. The components shown here, their connections and relationships, and their functions are intended to be exemplary only and are not intended to limit implementations of the present inventions described and / or claimed in this document.
[0101] The computing device 900 includes a processor 902, a memory 904, a storage device 906, a high-speed interface 908 connected to the memory 904 and a high-speed expansion port 910, and a low-speed interface 912 connected to a low-speed bus 914 and the storage device 906. Each of the components 902, 904, 906, 908, 910 and 912 is interconnected using various buses and can be installed on a common motherboard or in other appropriate ways. The processor 902 is capable of processing instructions for execution within the computing device 900, including instructions stored in the memory 904 or on the storage device 906, which are used to display graphical information of a GUI on an external input / output device (e.g., a display 916 coupled to the high-speed interface 908). In other implementations, multiple processors and / or multiple buses can be appropriately used together with multiple memories and multiple types of memories. Moreover, multiple computing devices 900 can be connected, each of which provides a portion of the necessary operations (e.g., as a server group, a group of blade servers, or a multi-processor system).
[0102] The memory 904 stores information within the computing device 900. In one implementation, the memory 904 is one or more volatile memory units. In another implementation, the memory 904 is one or more non-volatile memory units. The memory 904 may also be another form of computer-readable medium, such as a magnetic or optical disk.
[0103] The storage device 906 can provide a mass storage device for the computing device 900. In one implementation, the storage device 906 can be or include a computer-readable medium, such as a floppy disk device, a hard disk device, an optical disk device or a tape device, a flash memory or other similar solid-state memory device or device array (including devices in a storage area network or other configuration). A computer program product can be tangibly embodied in an information carrier. The computer program product may also include instructions that, when run, perform one or more methods as described above. The information carrier is a computer or machine-readable medium, such as the memory 904, the storage device 906, or a memory on the processor 902.
[0104] The high-speed controller 908 manages bandwidth-intensive operations of the computing device 900, while the low-speed controller 912 manages less bandwidth-intensive operations. This allocation of functions is exemplary only. In one implementation, the high-speed controller 908 is coupled to the memory 904, the display 916 (e.g., through a graphics processor or accelerator), and to the high-speed expansion port 910 that can accommodate various expansion cards (not shown). In this implementation, the low-speed controller 912 is coupled to the storage device 906 and the low-speed expansion port 914. The low-speed expansion port, which may include various communication ports (e.g., USB, Bluetooth, Ethernet, wireless Ethernet), can be coupled to one or more input / output devices, such as a keyboard, a pointing device, a scanner, or a networking device (e.g., a switch or router), for example, through a network adapter.
[0105] The computing device 900 may be implemented in a variety of different forms, as shown in the figure. For example, it may be implemented as a standard server 920 or multiple times in a group of such servers. It may also be implemented as a component of a rack server system 924. In addition, it may be implemented in a personal computer (e.g., a laptop computer 922). Alternatively, components from the computing device 900 may be combined with other components (e.g., device 950) in a mobile device (not shown). Each of such devices may contain one or more of the computing devices 900, 950, and the entire system may be composed of multiple computing devices 900, 950 that communicate with each other.
[0106] The computing device 950 includes a processor 952, a memory 964, an input / output device (e.g., a display 954), a communication interface 966, and a transceiver 968, among other components. The device 950 may also be provided with a storage device (e.g., a microdrive or other device) to provide additional storage. Various buses are used to interconnect each of the components 950, 952, 964, 954, 966, and 968, and several of the components may be mounted on a common motherboard or in other suitable ways.
[0107] The processor 952 is capable of executing instructions within the computing device 950, including instructions stored in the memory 964. The processor may be implemented as a chipset including independent and multiple analog and digital processors. The processor may provide, for example, coordination of other components of the device 950, such as a user interface, applications executed by the device 950, and control of wireless communications performed by the device 950.
[0108] The processor 952 may communicate with a user via a control interface 958 and a display interface 956 coupled to a display 954. The display 954 may be, for example, a TFT LCD (thin film transistor liquid crystal display) or an OLED (organic light emitting diode) display or other appropriate display technology. The display interface 956 may include appropriate circuitry for driving the display 954 to present graphics and other information to the user. The control interface 958 may receive commands from the user and convert them for submission to the processor 952. In addition, an external interface 962 may be provided to communicate with the processor 952 so as to enable near-area communication of the device 950 with other devices. The external interface 962 may provide, for example, wired communication in some implementations or wireless communication in other implementations, and multiple interfaces may also be used.
[0109] The memory 964 stores information within the computing device 950. The memory 964 can be implemented as one or more of one or more computer-readable media, one or more volatile memory units, or one or more non-volatile memory units. An expansion memory 984 may also be provided and connected to the device 950 via an expansion interface 982 (the expansion interface 982 may include, for example, a SIMM (single in-line memory module) card interface). Such an expansion memory 984 may provide additional storage space for the device 950, or may also store applications or other information of the device 950. In particular, the expansion memory 984 may include instructions for executing or supplementing the above-mentioned processes, and may also include security information. Thus, for example, the expansion memory 984 may act as a security module for the device 950 and may be programmed with instructions that permit secure use of the device 950. In addition, a security application may be provided via a SIMM card together with additional information (e.g., placing identification information on the SIMM card in an invulnerable manner).
[0110] The memory may include, for example, flash memory and / or NVRAM memory, as described below. In one implementation, a computer program product is tangibly embodied in an information carrier. The computer program product contains instructions that, when executed, perform one or more methods such as those described above. The information carrier is a computer or machine readable medium, such as the memory 964, the expansion memory 984, or a memory on the processor 952, which may be received, for example, via the transceiver 968 or the external interface 962. .
[0111] The device 950 may communicate wirelessly via a communication interface 966, which may include digital signal processing circuitry, if necessary. The communication interface 966 may provide for communication in various modes or protocols, such as GSM voice calls, SMS, EMS or MMS messaging, CDMA, TDMA, PDC, WCDMA, CDMA2000, or GPRS, among others. Such communication may be performed, for example, via a radio frequency transceiver 968. Additionally, short-range communications may be performed, for example, using Bluetooth, WiFi, or other such transceivers (not shown). Additionally, a GPS (Global Positioning System) receiver module 980 may provide additional navigation and location-related wireless data to the device 950, which may be used appropriately by applications running on the device 950.
[0112] Device 950 may also communicate audibly using audio codec 960, which may receive spoken information from a user and convert it into usable digital information. Audio codec 960 may also generate audible sounds for the user, such as through a speaker in a handset of device 950. Such sounds may include sounds from voice phone calls, may include recorded sounds (e.g., voice messages, music files, etc.), and may also include sounds generated by applications operating on device 950.
[0113] The computing device 950 may be implemented in a variety of different forms, as shown in the figure. For example, it may be implemented as a cellular phone 980. It may also be implemented as a component of a smart phone 982, a personal digital assistant, or other similar mobile device.
[0114] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, specially designed ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include being implemented by one or more computer programs executable and / or interpretable in a programmable system comprising at least one programmable processor, at least one input device, and at least one output device coupled to receive data and instructions from a storage system and transmit data and instructions to the storage system.
[0115] These computer programs (also referred to as programs, software, software applications or codes) include machine instructions for programmable processors and can be implemented through high-level procedural and / or object-oriented programming languages and / or through assembly / machine languages. As used herein, the terms "machine-readable medium", "computer-readable medium" refer to any computer program product, device and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (mouse or trackball), through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with a user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and any form of input from the user can be received, including sound, voice, or tactile input.
[0117] The systems and techniques described herein can be implemented in a computing device that includes a back-end component (e.g., as a data server), or includes a middleware component (e.g., an application server), or includes a front-end component (e.g., a client computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), and the Internet.
[0118] Computing devices can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.< / transitiontype>
Claims
1. A computer system (100) for automatic model integration of an information model with a corresponding application, for consumers to directly access real-time values of application elements at runtime, the consumers being external entities outside the computer system, the system include: An information model server (130) configured to expose an information model to the consumer (200) so that the consumer can access the exposed information model from outside the computer system, wherein the exposed information model includes a model element (131) for exposing an entity type representing a device in a network and for exposing an instance of a type or a class and its member values to the consumer, wherein the exposed information model is configured to interact with the consumer to browse the actual configuration of an application and to create an instance in the exposed information model by using the type or class represented in the exposed information model when the application is running; an application component (110) configured to provide application code augmented with a mapping description (113) defining how an internal information model of the application is mapped to the exposed information model; and The model integration component (120) is configured to: Register the internal information model elements to be exposed; Mapping the registered internal information model elements (111) to the exposed information model elements (131) according to the mapping description; and The information model element is updated (310, 320) by the following steps: Detect changes to internal or exposed information model elements; Determine the synchronization direction; performing matching to determine a model element corresponding to the changed model element by using a signature of the corresponding information model element combined with the mapping description; The exposed information model elements and corresponding internal information model elements are synchronized according to the determined synchronization direction to propagate changes between the exposed information model accessed by the consumer and the internal information model of the application when the application is running.
2. The computer system according to claim 1, in, Synchronizing the model elements involves model structure synchronization or model content synchronization or both, and occurs when the application is running.
3. A computer system as claimed in claim 1 or 2, in, The exposed model element (131) has a type or class space (132) for exposing types or classes as a component of the exposed information model, and has an instance space for exposing instances of types or classes and their member values.
4. The computer system of claim 3, in, A specific mapping description is configured to select one or more elements (111) of the internal information model for exposure in the type or category space (132) of the exposed information model.
5. The computer system according to claim 1 or 2, in, The model integration component is configured to map the registered internal information model elements (111) by parsing the fields and methods of the corresponding internal information model types / classes together with the corresponding mapping descriptions, and map the instances of the exposed information model elements to the internal information model instances.
6. The computer system of claim 3, in, The model integration component is further configured to: detecting changes in an instance space of the exposed information model; Propagating the detected changes to corresponding one or more internal objects (114) of the internal information model based on the registered classes represented in the type space (132) of the exposed information model; and / or detecting changes among internal objects (114) of the internal information model; The detected changes are propagated to corresponding one or more exposed objects in the instance space.
7. The computer system according to claim 1 or 2, in, The model integration component is further configured to synchronize content values, which are non-primitive values associated with the complex object including the sub-objects, by recursively applying the steps of performing matching and synchronizing to all sub-objects of the complex object.
8. A computer-implemented method (1000) for providing consumers with direct access to real-time values of application elements of an application at runtime by synchronizing content values between an internal information model of the application and an exposed information model during application runtime, the consumer being an external entity outside a computer system, the consumer accessing the exposed information model from outside the computer system, wherein internal information model elements are mapped to exposed information model elements via application code, the application code comprising a mapping description (113) defining how an application data model is mapped to the exposed information model, the exposed information model comprising model elements for exposing entity types representing devices in a network and for exposing instances of types or classes and their member values to the consumer, the exposed information model being further configured to interact with the consumer to browse actual configurations of the application and to create instances in the exposed information model using types or classes represented in the exposed information model during application runtime, the method include: detecting (1100) changes in exposed information model elements or internal information elements; Determine (1200) the synchronization direction; performing a match (1300) to determine a model element corresponding to the changed model element by using a signature of the corresponding information model element combined with the mapping description; as well as The exposed information model element and the content value of the corresponding internal information model element are synchronized (1400) according to the determined synchronization direction to propagate changes between the exposed information model accessed by the consumer and the internal information model of the application when the application is running.
9. The method according to claim 8, in, The content value is a non-primitive value associated with a complex object including sub-objects, and the method further comprises: The steps of performing a match (1300) and synchronizing (1400) the content value to all child objects of the complex object are recursively applied.
10. The method according to claim 8 or 9, in, Determining (1200) the synchronization direction includes: Timestamps associated with information model elements are compared to determine whether a most recent change occurred to an internal information model element or to an exposed information model element, and the information model having the most recent change is used as an origin for the synchronization direction.
11. The method according to claim 8 or 9, in, Determining (1200) the synchronization direction includes: In case an information model server (130) implementing the exposed information model detects the change, setting the exposed information model as the origin of the synchronization direction; In case an application component (110) implementing the internal information model detects the change, the internal information model is set as the origin of the synchronization direction.
12. The method according to claim 8 or 9, in, The content values of performing matching (1300) and synchronization (1400) include: upon detecting a change of a first exposed object (E1), checking whether the first exposed object (E1) has an association (EA1) with a second exposed object defined in the exposed information model, and if there is an association, checking whether an internal object (I1) corresponding to the first exposed object (E1) matches the signature of a field of a second internal model element (I2) corresponding to the second exposed model element, and if there is a signature match, setting the field value of the second internal model element (I2) to the internal object I1; In case a change of a third internal object (I3) is detected, the fields of the third internal object (I3) are processed to determine one or more existing sub-objects (I4) of the third internal object, and it is checked whether a third exposed object (E3) corresponding to the third internal object (I3) has an association with a fourth exposed object (E4) corresponding to the one or more sub-objects (I4) defined in the exposed information model, and whether the association matches the signature or mapping description at a specific field of the third internal object (I3), and in case of a missing association, a corresponding association (EA2) in the exposed information model is created accordingly, and in case of an existing association but a missing sub-object (I4) at the specific field, the association is removed.
13. A computer-implemented method (2000) for providing a consumer with direct access to real-time values of application elements of an application at runtime by synchronizing an information model structure at application runtime, the consumer being an external entity accessing an exposed information model from outside a computer system, wherein internal information model elements are mapped to exposed information model elements via application code, the application code being augmented with a mapping description (113) defining how the internal information model is mapped to the exposed information model, the exposed information model comprising model elements for exposing entity types representing devices in a network and for exposing instances of types or classes and their member values to the consumer, the exposed information model being further configured to interact with the consumer to browse actual configuration of the application and to create instances in the exposed information model at application runtime using types or classes represented in the exposed information model, the method include: detecting (2100) model structure changes in the instance space of the exposed information model; Propagating (2200) the detected model structure changes to corresponding one or more internal objects (114) of the internal information model based on the registered classes represented in the type space (132) of the exposed information model; or detecting (2300) model structure changes in internal objects (114) of the internal information model; The detected schema structure changes are propagated (2400) to corresponding one or more exposed objects in the instance space when the application is running.
14. The method according to claim 13, in: If the detected model structure change foresees the creation of an internal object (114) from the created newly exposed object based on a certain type defined in the type space (132) of the exposed information model, determining a corresponding internal type / class (112), creating a new internal object (114) of the corresponding type / class (112), and initializing fields of the new internal object (114) with information from the corresponding created newly exposed object by applying a corresponding mapping description; If the detected model structure change anticipates the creation of an exposed object from the created new internal object (114) of a certain internal type / class (112), determining a corresponding type in the exposed type space (132) and adding the new exposed object of the corresponding type to the instance space, and if the created new internal object (114) is a complex object having one or more child objects, recursively processing the content of the created new internal object (114) to create exposed model elements for the one or more child objects; If the detected model structure change is expected to remove an exposed object from the instance space, determining and removing a corresponding internal object (114); If the detected model structure change is expected to remove an internal object (114) from the internal information model, a corresponding exposed object is determined and removed from the instance space, and if the removed internal object (114) is a complex object with sub-objects, the content of the removed internal object (114) is recursively processed to identify and remove the exposed object created for the content of the complex exposed object.
15. A computer program product comprising instructions which, when loaded into a memory of a computer system and executed by at least one processor of the computer system, cause the computer system to perform the method of any one of claims 8 to 12 or 13 to 14.
