CN113220349B - Semantic ontology model-based adaptation method for instrument heterogeneous peripheral - Google Patents

Semantic ontology model-based adaptation method for instrument heterogeneous peripheral Download PDF

Info

Publication number
CN113220349B
CN113220349B CN202110301631.7A CN202110301631A CN113220349B CN 113220349 B CN113220349 B CN 113220349B CN 202110301631 A CN202110301631 A CN 202110301631A CN 113220349 B CN113220349 B CN 113220349B
Authority
CN
China
Prior art keywords
model
instrument
interface
peripheral
adaptation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110301631.7A
Other languages
Chinese (zh)
Other versions
CN113220349A (en
Inventor
陈俊华
刘然
黄学达
张珈铜
范伟红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202110301631.7A priority Critical patent/CN113220349B/en
Publication of CN113220349A publication Critical patent/CN113220349A/en
Application granted granted Critical
Publication of CN113220349B publication Critical patent/CN113220349B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention belongs to the technical field of intelligent instruments and meters and embedding, and particularly relates to an adaptation method of a heterogeneous meter peripheral based on a semantic ontology model, which comprises the following steps: obtaining heterogeneous equipment information of the instrument, and judging the type of the instrument according to the obtained information; different instrument types execute different instrument heterogeneous peripheral dynamic adaptation modes; the types of the instruments comprise resource-limited instruments and resource-rich instruments, the resource-limited instruments execute a static compiling adaptation mode, and the resource-rich instruments execute a dynamic running adaptation mode; the invention provides a set of lightweight peripheral interface information ontology model aiming at a heterogeneous peripheral automatic resource adaptation method of a highly integrated instrument special microcontroller chip, and provides a dynamic adaptation method of an instrument heterogeneous peripheral based on the model.

Description

Semantic ontology model-based adaptation method for instrument heterogeneous peripheral
Technical Field
The invention belongs to the technical field of intelligent instruments and meters and embedding, and particularly relates to an adaptation method of instrument heterogeneous peripherals based on a semantic ontology model.
Background
With the deep integration of microelectronic technology, computer technology and Instrument products, a core Chip (IMC) of a new-generation industrial automation Instrument needs to integrate multiple functions of communication, acquisition, processing, storage and the like, so that the core Chip has a development trend of high integration level, high reliability and high performance. Meanwhile, the digitalization, networking and intellectualization of the instrument become a core technology for improving the comprehensive competitiveness of enterprises and the production efficiency. The dynamic adaptation technology of the instrument with multiple protocols, multiple services and multiple senses is used for giving intelligence to the instrument and giving energy to the industry. The traditional development mode of the instrument equipment respectively designs different hardware interface circuits according to the requirements of specific product forms, and develops corresponding external equipment drivers and function modules, but the instrument development system has high structural coupling degree, resources cannot be effectively managed and efficiently reused, and the development mode cannot meet the requirements of multi-protocol, multi-service, multi-perception and multi-series rapid development of the instrument equipment.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides an adaptation method of instrument heterogeneous peripheral based on a semantic ontology model, which comprises the following steps: acquiring heterogeneous equipment information of the instrument, and judging the type of the instrument according to the acquired information; executing different instrument heterogeneous peripheral adaptation modes according to the types of the instruments; the types of the meters include a resource-restricted type and a resource-rich type; the resource-limited instrument executes a static compiling adaptation mode, and the resource-rich instrument executes a dynamic running adaptation mode; in the adaptation process, dynamic adaptation is carried out by adopting a semantic ontology model.
Preferably, the process of determining the type of the meter includes: judging the resource abundance degree of the instrument equipment, and determining the type of the instrument according to the resource abundance degree of the instrument equipment; the process of judging the resource abundance degree of the instrument comprises the steps of calculating the ratio of the average resource occupation of the current instrument in stable operation to the total resource of the instrument, and if the ratio is not more than 65%, the resource abundance degree of the instrument is rich; if the ratio is not less than 90%, the device resources are limited.
Preferably, the specific process of executing the static compilation adaptation mode includes:
step 1: acquiring peripheral interface information of instrument equipment; constructing an instrument equipment interface model according to the acquired interface information;
and 2, step: adopting an instrument checking tool to check whether a corresponding peripheral interface model exists in the semantic body model pool, if not, creating a corresponding instrument equipment interface model and storing the instrument equipment interface model in the semantic body model pool, and then executing the step 4; if yes, executing step 3;
and 3, step 3: if the corresponding peripheral interface model has the corresponding model instance, importing the instance, and if the corresponding instance does not exist, executing the step 4;
and 4, step 4: loading a corresponding peripheral interface model by using a special instrument development tool, writing information into corresponding subclasses and attributes in an instrument equipment interface model by using a graphical editor and a modeling manager according to specific instrument information, and creating an example; exporting the instantiated instrument equipment interface model to obtain a required model instance;
and 5: inputting the obtained instance into a model analyzer for analyzing and loading to generate a peripheral adaptation code;
step 6: and assembling the peripheral adaptation codes into a static compilation project to complete static adaptation.
Further, acquiring peripheral interface information of the instrument device, wherein the acquired information comprises one-to-one mapping relation between the identifier of each device interface and the physical interface; identifying the equipment interface in the model by adopting a character string formed by splicing an interface standard name and an interface serial number; and acquiring the interface standard and specific IMC physical interface information according to the interface name instrument special development tool, and identifying the IMC peripheral interface according to the information.
Further, the process of constructing the interface model of the instrumentation device includes:
step 1: acquiring hardware information of instrument equipment;
and 2, step: checking whether the same similar or instrument equipment interface model exists in the model pool; if the same model exists, finishing constructing the interface model of the instrument equipment; if the similar model exists, extracting the model to the current working area, and then executing the step 4; if no similar or same model exists, executing step 3;
and step 3: newly building a blank model in the current working area, and adding a protocol module and an identification module by using a graphical editor and a modular manager;
and 4, step 4: adding or deleting equipment interface types to the model in the current working area by using a graphical editor and a modular manager according to the acquired equipment hardware information, newly building or editing an interface name module and a driving module, and adding or changing subclasses and attributes of the interface name module and the driving module;
and 5: and adding or changing interface function modules to the equipment interface classes one by one according to the acquired equipment interface information, and adding or changing subclasses and attributes of the equipment interface modules.
Further, the specific process of loading and parsing the captured instance in the file system by the model parser includes:
step 1: importing the model instance into a file system, automatically detecting and capturing the model instance by a model instance detector, and sending the model instance to a model analyzer;
step 2: after the model resolver acquires the captured instances, generating a target blank program module list;
and step 3: the model analyzer analyzes the identification module in the instance, so that the equipment and the IMC are identified, and corresponding component resources are taken out from the instrument component library according to the identification result;
and 4, step 4: the model analyzer reads the protocol classes in the examples and loads the corresponding protocol code modules in the communication protocol pool in the instrument component library into the program module list one by one;
and 5: analyzing all the peripheral interface classes in the model example one by one, wherein the analysis content comprises all the subclasses of interface name class, interface driving class, interface type class, interface attribute class, interface function class and the like; loading a specified code module from the instrument component library into a program module list according to the analysis content;
and 6: the model analyzer compares the model examples with the information in the program module list one by one, and the generated program module list is confirmed to be accurate;
and 7: and after the information is confirmed to be correct, the program module list can be exported, and the process of analyzing the model instance by the model analyzer is ended.
Preferably, the specific process of executing the dynamic operation adaptation mode includes:
step 1: acquiring instrument interface information;
and 2, step: judging whether an instrument interface dynamic expansion model example exists according to the instrument interface information; if yes, executing step 7, and if not, executing step 3;
and step 3: obtaining IMC peripheral interface information;
and 4, step 4: processing the IMC peripheral interface information by adopting a special development tool for an instrument, and establishing a peripheral interface model;
and 5: judging whether a corresponding peripheral interface model exists in a model pool of the instrument special development tool; if yes, executing step 6, if not, storing the peripheral interface model of step 4 into a model pool of the instrument special development tool, and executing step 6;
step 6: establishing an instrument equipment interface extension model example;
and 7: and importing the instrument equipment interface extension model instance into a file system to automatically adapt the inside and the outside of the instrument.
Further, the IMC peripheral interface includes an interface type and an interface class, and the interface type includes a data interface, a control interface, and a collaboration interface.
Preferably, the process of dynamically adapting by using the semantic ontology model includes:
step 1: importing the model instance into a file system, automatically detecting and capturing the model instance by a model instance detector, and transmitting the model instance to a model analyzer;
step 2: after the model parser obtains the captured instances, a target blank program module list is generated;
and step 3: the model analyzer analyzes the model instance, finally generates and exports a required program module list, and sends the program module list to the peripheral automatic adapter;
and 4, step 4: the peripheral automatic adapter scans the modules in the program module list one by one, detects whether conflicts exist with the current system environment, and executes the step 5 if the conflicts exist; if no conflict exists, executing step 6;
and 5: retrieving information of two parties with conflict; and reporting to a system notification;
step 6: the created system process submits a program module installation task;
and 7: checking the adaptation progress of the program module list, and if the adaptation progress is not finished, executing the step 4; and if the completion is finished, reporting to a system notification.
The invention provides a lightweight peripheral interface information body model and a matched instrument development kit aiming at a heterogeneous peripheral automatic resource adaptation method of a microcontroller chip special for a highly integrated instrument, and provides a heterogeneous peripheral dynamic adaptation method (comprising a static compiling adaptation mode and a dynamic operation adaptation mode) of the instrument based on the model and the tool. Because the peripheral adaptation codes are generated by using the semantic ontology technology and matched tools, the development personnel can be prevented from manually writing huge and complex equipment tree files in the traditional development mode. Compared with the traditional development mode, the method greatly reduces the manpower and material resource investment of a product manufacturer in the product design stage, shortens the research and development period of the instrument product, and has good practical significance and application value.
Drawings
FIG. 1 is a schematic diagram of an IMC-O ontology model;
FIG. 2 is a diagram illustrating an IMC core module peripheral interface description;
FIG. 3 is a diagram of the interface classes of the present invention;
FIG. 4 is a schematic view of a development tool specific to a meter;
FIG. 5 is a schematic diagram of a peripheral dynamic adaptation toolset within a meter;
FIG. 6 is a diagram illustrating static compilation adaptation;
FIG. 7 is a flow chart illustrating adaptation for static compilation;
FIG. 8 is a flow chart illustrating a dynamic operation adaptation scheme;
FIG. 9 is a diagram of a static compilation adaptation mode meter peripheral interface;
FIG. 10 is a diagram of an example interface model for a static compiled adapted case meter;
FIG. 11 is a schematic diagram of a dynamic operation adaptation case meter peripheral interface;
fig. 12 is a schematic diagram of an example interface model for a dynamically runtime adaptable case meter.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
A method for adapting a heterogeneous instrument peripheral based on a semantic ontology model comprises the following steps: acquiring heterogeneous equipment information of the instrument, and judging the type of the instrument according to the acquired information; different instrument types execute different instrument heterogeneous peripheral adaptation modes; the types of the instruments comprise resource-limited instruments and resource-rich instruments, the resource-limited instruments execute a static compiling adaptation mode, and the resource-rich instruments execute a dynamic running adaptation mode; in the adaptation process, a semantic ontology model is adopted for dynamic adaptation.
The process of judging the type of the instrument comprises the following steps: judging the resource abundance degree of the instrument equipment, and determining the type of the instrument according to the resource abundance degree of the instrument equipment; the process of judging the resource abundance degree of the instrument comprises the steps of calculating the ratio of the average resource occupation of the current instrument in stable operation to the total resource of the instrument, and if the ratio is not more than 65%, the resource abundance degree of the instrument is rich; if the ratio is not less than 90%, the device resources are limited. The System resources may be described by hardware resources such as a Microcontroller (MCU) or a System on Chip (SoC), a Random Access Memory (RAM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Flash Memory (Flash Memory), and an Analog-to-Digital converter (ADC).
As shown in fig. 1, the peripheral interface information ontology model is a schematic diagram developed based on a semantic ontology technology, and is roughly divided into five parts, namely a protocol module, an identification module, an interface name module, a driver module and a function module.
The multi-protocol description module can describe the required industrial communication protocol of the instrument chip through the protocol class (IMC-O), and can support the HART (Highway Addressable Remote controller), the Profibus (Process Field Bus), the Foundation Fieldbus (FF), the Modbus communication protocol and the like. In the development process of the instrument and the meter, a multi-protocol description module in the peripheral interface information ontology model can be sensed by using a special development tool for the instrument and the meter, and then the dynamic adaptation of the IMC core module on the industrial communication protocol is completed.
In the process of identifying the unique identities of the instrument IMC chip and different peripherals, the identifiers provided by the IMC chip, the instrument equipment and the peripheral device suppliers need to be analyzed and processed. Different peripheral devices may adopt different identification systems (such as Ecode, Handle, OID, or custom ID), and when the identity of the IMC peripheral is identified, the model provides an identity description of the identification system and specific codes. In the model, the device ID (PIIO: Devic-ID) and IMC ID (PIIO: IMC-ID) classes have two identical sub-attributes, namely IdType and Idcode, respectively, the former describes the adopted identification system, and the latter encodes a specific ID.
Since IMCs require multiple interface standards, and the same standard may have multiple implementation interfaces, the interface core module in the model describes all the interfaces in a given IMC one by one. The interface core module can be divided into three parts of an interface name class (IMC-O: InterfaceName), an interface driver class (IMC-O: Requireddrivers) and an interface type class (IMC-O: InterfaceType). The Interface name part is mainly used for describing the Interface position, the Interface name is formed by splicing an Interface standard and a character string of an Interface Serial number, for example, "SPI-01" represents a first Serial Peripheral Interface (SPI) in the IMC. Through the description of the interface name, the instrument special development tool can obtain the interface standard and the specific IMC physical interface mapping so as to complete the identification of the IMC peripheral interface.
And the functional module of the peripheral interface describes the functional requirements of the specified interface through the interface type and the subclass. Currently, the types of peripheral interfaces include three types, namely, an IMC-O (data interface), an IMC-O (control interface), and an IMC-O (collaborative interface), and all have the same interface attribute class (IMC-O: interface properties) for describing the relevant attributes of the interface, such as resolution, data type, and data unit. And the function pool subclass in the interface attribute class is used for describing the function requirement of the specified interface, and the function pool comprises the functions of displaying, controlling, communicating, acquiring, storing, diagnosing and the like. With this functional description, the instrument specific development tool can map, combine, and configure from the reusable component library to accomplish functional program adaptation to a specified interface.
Fig. 2 is a schematic diagram illustrating a peripheral interface description of an IMC core module, where fig. 2 is a schematic diagram illustrating an interface type and fig. 3 is a schematic diagram illustrating an interface class. The IMC core module peripheral interface comprises: data interface, control interface, cooperation interface. The data interface is used for transmitting data information with peripheral equipment, such as sensor and display screen data; the control interface is used for transmitting control information of an external controlled assembly, such as the state of an indicator light and the action of an electric actuator; and the IMC core module is connected with an external computing unit through the interface to cooperatively complete instrument data processing, such as an AI chip.
As shown in fig. 4, in the design stage of a specific instrument product, after the instrument interface model information is analyzed and given according to the product requirements, the instrument-specific development tool is used to configure the corresponding software resources. The instrument-specific development tool is shown in fig. 4, in which the visual peripheral adaptation tool can implement peripheral interface information ontology model establishment and peripheral adaptation code generation. The visual peripheral adaptation tool comprises tools such as an instrument component library, a graphical editor, a modeling manager, a model parser and the like, and realizes a visual assembly development process from components to an instrument. And obtaining peripheral adaptation codes through a visual peripheral adaptation tool, manually loading the peripheral adaptation codes into an embedded system image file, programming the embedded system image file into a special instrument hardware platform for debugging and evaluation, and finally programming the embedded system image file into an instrument after further completion, so that the peripheral adaptation can be completed.
Fig. 5 shows a peripheral dynamic adaptation tool set in a meter, where tools including a model instance detector, a model parser, a peripheral automatic adapter, and the like are all run in an embedded system of an intelligent meter. When the instrument equipment runs, the model instance detection program finds the model instance, and then the peripheral equipment is automatically driven, matched with the function and the communication protocol through the instrument component library, the model analyzer and the peripheral equipment automatic adapter.
As shown in fig. 6, a static compilation adaptation approach. The method comprises the steps of constructing an instrument device interface model according to the hardware interface adaptation requirements of a specific instrument product, automatically selecting and configuring corresponding component library resources (a driving module, a functional module and a protocol module) according to the interface model by using a software construction tool, constructing a software system project by combining an instrument device bottom operating system, adding an instrument application program, obtaining an instrument executable image file through static compiling, and finally programming the instrument executable image file into an IMC module. The method has the advantage of saving system hardware resources.
As shown in fig. 7, when a meter device manufacturer develops a new product based on an IMC chip, first, peripheral interface information required by the meter device, such as a mapping relationship between an abstract interface identifier and a specific physical interface, is obtained. Further, according to the product demand analysis of the instrument device, a device interface model is constructed by simple configuration using a tool dedicated to the instrument. And automatically checking whether a corresponding peripheral interface model exists in the body model pool by the instrument special tool, and if the corresponding model does not exist, manually establishing the model by a developer by using the instrument special tool and storing the model into the model pool so as to be used again later. Then, the instrument equipment developer creates a required model instance according to the established model and the peripheral interface information of the instrument, and if the corresponding model exists, whether the corresponding model instance exists is checked; if not, the creation is needed manually. And finally, a developer opens the model parser, loads the model instance, the instrument development tool selects corresponding resources from the instrument component library to automatically generate the peripheral adaptation codes, and assembles the codes into the static compilation engineering. Next, an instrument product application developer can dynamically adapt to a software project based on the heterogeneous peripheral, develop an instrument application program, and finally form complete instrument equipment software after the project is compiled.
Because the resource-rich instrument has abundant system hardware resources, a dynamic operation adaptation mode can be adopted. Compared with a static compiling adaptation mode, the dynamic running adaptation mode takes the application scenes that some peripheral components of the instrument equipment can be replaced and increased and decreased into consideration, and the main peripheral adaptation function is built in the instrument equipment and is automatically completed. The peripheral dynamic adaptation tool set in the instrument runs in an embedded system of the instrument equipment. Modeling and model instantiation are carried out through a special instrument development tool, then, the peripheral interface information ontology model instance is put into a file system in an embedded system, the instance is found through a model instance detection program, and then, peripheral equipment is automatically driven through a model resolver, an instrument component library and a peripheral equipment automatic adapter, and functions and communication protocol are adapted. In brief, the peripheral dynamic adaptation tool set in the instrument is a daemon process running in an embedded system, and aiming at the intelligent instrument with abundant resources, when the instrument works, the peripheral dynamic adaptation tool set in the instrument updates automatic detection hardware, and automatically configures and loads software modules such as a driver and a function according to model example information.
As shown in fig. 8, a developer constructs a dynamic extension model of an instrument device interface through a special instrument development tool and instantiates the model, puts an instance of a peripheral interface information ontology model into a file system of an embedded system, and finally automatically adapts a heterogeneous peripheral through an internal instrument adaptation tool.
The content of the static compiling adaptation mode comprises the following steps: after the related design drawing of the new instrument is completed, specific peripheral adaptation requirements, such as specific drivers, functional programs, communication protocols and the like, can be obtained. According to peripheral adaptation requirements and relevant design principle drawings, a special instrument can be used for modeling and model instantiation. The static compiling adaptation mode instrument peripheral interface is shown in fig. 9, and the instrument equipment only needs to adapt to the electric valve and the pressure sensor.
An example of a meter interface ontology model is shown in fig. 10, the meter supports HART, FF and Profibus industrial communication protocols, and the IDs of the meters and IMCs are coded in Ecode.
According to the model example, the instrument device is provided with two SPI interfaces which are a data interface and a control interface respectively, and the two interfaces are both required to be configured with SPI drivers. Through the interface attribute class of the SPI-01 interface, the special development tool for the instrument can know that the interface is connected with the peripheral equipment of the pressure sensor, the physical unit of the sensing data value is megapascal (MPa), the data type is floating point type (float), the resolution of the sensor is 0.01MPa and the like. The function description subclass describes specific function requirements, and the function description subclass (IMC-O: function) obtains the function requirements with "sampling", while the parent class (IMC-O: interface properties) provides the attribute information required for function implementation. Similarly, the SPI-02 interface needs an SPI driver, and the interface is connected to an electric valve device, and the physical unit of control information is volt (Voltage), the type of control data is integer (int), and the resolution of the sensor is 1V.
After the model is instantiated, the obtained instance can generate a peripheral adaptation code through a special instrument development tool, the peripheral adaptation code is integrated into instrument equipment software system engineering, after an instrument application program is further added, all software codes are statically compiled to obtain an instrument executable image file, and finally the instrument executable image file is burnt and written into an IMC module.
In the following, an application case of the dynamic operation adaptation mode will be explained.
Similar to the static compiling adaptation mode, the dynamic running adaptation mode requires that peripheral interface related information including information of equipment ID, interface standard, function and the like is acquired according to the definition of the instrument product. Assuming that the peripheral interfaces of the instrument product are as shown in fig. 11, the device needs to be adapted to three peripheral interfaces, the peripheral interface on the left side of the IMC is connected with a pressure sensor, and in the use process of the instrument device, the peripheral pressure sensor 1 assembled when the instrument product leaves a factory can be replaced by a pressure sensor 2 of a different model; the display screen peripheral in the virtual frame on the right side of the IMC is not installed when the instrument leaves a factory, and a user of the instrument equipment can add or remove the display peripheral according to needs in the using process.
An example of designing an equipment interface model according to the requirements of the instrument peripheral case is shown in fig. 12, and compared with a static compiling adaptation case, the SPI-01 interface in the example is redundantly adapted to two pressure sensors, and the LCD-01 interface is redundantly adapted to a display screen peripheral (not installed when leaving a factory). When the peripheral dynamic adaptation tool detects that the peripheral interface SPI-01 or LCD-01 has connection change, the peripheral dynamic adaptation tool set automatically loads related resources (such as a driver library, protocol software, a function package and the like) according to the model. Aiming at the intelligent instrument with abundant resources, the dynamic operation adaptation mode brings flexible expansion for instrument developers and product users.
In the process of carrying out a static compiling adaptation mode and a dynamic running adaptation mode, the semantic ontology model is adopted for adaptation, and the specific process of adaptation comprises the following steps:
step 1: importing the model instance into a file system, automatically detecting and capturing the model instance by a model instance detector, and transmitting the model instance to a model analyzer;
step 2: after the model parser obtains the captured instances, a target blank program module list is generated;
and step 3: the model analyzer analyzes the model instance, and finally generates and derives a required program module list and sends the required program module list to the peripheral automatic adapter;
and 4, step 4: the peripheral automatic adapter scans the modules in the program module list one by one, detects whether conflicts exist with the current system environment, and executes the step 5 if the conflicts exist; if no conflict exists, executing step 6;
and 5: retrieving information of both parties with conflict; and reporting to a system notification;
step 6: the created system process submits a program module installation task;
and 7: checking the adaptation progress of the program module list, and if the adaptation progress is not finished, executing the step 4; and if the completion is finished, reporting to a system notification.
The above-mentioned embodiments, which further illustrate the objects, technical solutions and advantages of the present invention, should be understood that the above-mentioned embodiments are only preferred embodiments of the present invention, and should not be construed as limiting the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A semantic ontology model-based adaptation method for instrument heterogeneous peripherals is characterized by comprising the following steps: acquiring heterogeneous equipment information of the instrument, and judging the type of the instrument according to the acquired information; executing different instrument heterogeneous peripheral adaptation modes according to the types of the instruments; the types of the meters include a resource-restricted type and a resource-rich type; the resource-limited instrument executes a static compiling adaptation mode, and the resource-rich instrument executes a dynamic running adaptation mode; in the adaptation process, adapting the heterogeneous peripheral equipment of the instrument by adopting a semantic ontology model;
the specific process of executing the static compilation adaptation mode comprises the following steps:
step 1: acquiring peripheral interface information of instrument equipment; constructing an instrument equipment interface model according to the acquired interface information;
and 2, step: adopting an instrument checking tool to check whether a corresponding peripheral interface model exists in the semantic body model pool, if not, creating a corresponding instrument equipment interface model and storing the instrument equipment interface model in the semantic body model pool, and then executing the step 4; if yes, executing step 3;
and step 3: if the corresponding peripheral interface model has the corresponding model instance, importing the instance, and if the corresponding instance does not exist, executing the step 4;
and 4, step 4: loading a corresponding peripheral interface model by using a special development tool for the instrument, writing information into corresponding subclasses and attributes in an interface model of instrument equipment by using a graphical editor and a modeling manager according to specific instrument information, and creating an example; exporting the instantiated instrument equipment interface model to obtain a required model instance;
and 5: inputting the obtained instance into a model analyzer for analyzing and loading to generate a peripheral adaptation code;
and 6: assembling the peripheral adaptation codes into a static compilation project to complete static adaptation;
the specific process for executing the dynamic operation adaptation mode comprises the following steps:
step 1: acquiring instrument interface information;
step 2: judging whether an instrument interface dynamic expansion model example exists according to the instrument interface information; if yes, executing step 7, and if not, executing step 3;
and step 3: obtaining IMC peripheral interface information;
and 4, step 4: processing the IMC peripheral interface information by adopting a special development tool for an instrument, and establishing a peripheral interface model;
and 5: judging whether a corresponding peripheral interface model exists in a model pool of the instrument special development tool; if yes, executing step 6, if not, storing the peripheral interface model of step 4 into a model pool of the instrument special development tool, and executing step 6;
step 6: establishing an instrument equipment interface extension model example;
and 7: importing the instrument device interface expansion model instance into a file system to automatically adapt to the internal and external instruments;
the process of adapting by adopting the semantic ontology model comprises the following steps:
step 1: importing the model instance into a file system, automatically detecting and capturing the model instance by a model instance detector, and transmitting the model instance to a model analyzer;
and 2, step: after the model parser obtains the captured instances, a target blank program module list is generated;
and step 3: the model analyzer analyzes the model instance, finally generates and exports a required program module list, and sends the program module list to the peripheral automatic adapter;
and 4, step 4: the peripheral automatic adapter scans the modules in the program module list one by one, detects whether conflicts exist with the current system environment, and executes the step 5 if the conflicts exist; if no conflict exists, executing step 6;
and 5: retrieving information of two parties with conflict; and reporting to a system notification;
step 6: the created system process submits a program module installation task;
and 7: checking the adaptation progress of the program module list, and if the adaptation progress is not finished, executing the step 4; and if the completion is finished, reporting to a system notification.
2. The method for adapting the heterogeneous instrument peripheral based on the semantic ontology model according to claim 1, wherein the process of judging the instrument type comprises: judging the resource abundance degree of the instrument equipment, and determining the type of the instrument according to the resource abundance degree of the instrument equipment; the process of judging the resource abundance degree of the instrument comprises the steps of calculating the ratio of the average resource occupation of the current instrument in stable operation to the total resource of the instrument, and if the ratio is not more than 65%, the resource abundance degree of the instrument is rich; if the ratio is not less than 90%, the device resources are limited.
3. The method for adapting the heterogeneous instrument peripheral based on the semantic ontology model according to claim 1, wherein the information of the instrument peripheral interfaces is obtained by mapping one-to-one correspondence between identifiers of the respective equipment interfaces and physical interfaces; identifying the equipment interface in the model by adopting a character string formed by splicing an interface standard name and an interface serial number; and acquiring the interface standard and specific IMC physical interface information according to the interface name instrument special development tool, and identifying the IMC peripheral interface according to the information.
4. The adaptation method of the instrument heterogeneous peripheral based on the semantic ontology model, according to claim 1, wherein the process of constructing the instrument device interface model comprises:
step 1: acquiring hardware information of instrument equipment;
step 2: checking whether the same similar or instrument equipment interface model exists in the model pool; if the same model exists, finishing constructing the interface model of the instrument equipment; if the similar model exists, extracting the model to the current working area, and then executing the step 4; if no similar or identical model exists, executing step 3;
and step 3: newly building a blank model in the current working area, and adding a protocol module and an identification module by using a graphical editor and a modular manager;
and 4, step 4: adding or deleting equipment interface types to the model in the current working area by using a graphical editor and a modular manager according to the acquired equipment hardware information, newly building or editing an interface name module and a driving module, and adding or changing subclasses and attributes of the interface name module and the driving module;
and 5: and adding or changing interface function modules to the equipment interface classes one by one according to the acquired equipment interface information, and adding or changing subclasses and attributes of the interface function modules.
5. The adaptation method of the instrument heterogeneous peripheral based on the semantic ontology model as claimed in claim 1, wherein the specific process of loading and parsing the captured instances in the file system by the model parser comprises:
step 1: importing the model instance into a file system, automatically detecting and capturing the model instance by a model instance detector, and sending the model instance to a model analyzer;
step 2: after the model resolver acquires the captured instances, generating a target blank program module list;
and 3, step 3: the model analyzer analyzes the identification module in the instance, so that the equipment and the IMC are identified, and corresponding component resources are taken out from the instrument component library according to the identification result;
and 4, step 4: the model analyzer reads the protocol classes in the examples and loads the corresponding protocol code modules in the communication protocol pool in the instrument component library into a program module list one by one;
and 5: analyzing all the peripheral interface classes in the model example one by one, wherein the analysis content comprises all the subclasses of interface name class, interface driving class, interface type class, interface attribute class, interface function class and the like; loading a specified code module from the instrument component library into a program module list according to the analysis content;
step 6: the model analyzer compares the model instance with the information in the program module list one by one to confirm that the generated program module list is accurate and correct;
and 7: and after the information is confirmed to be correct, the program module list can be exported, and the process of analyzing the model instance by the model analyzer is ended.
6. The method for adapting the heterogeneous instrument peripheral based on the semantic ontology model according to claim 1, wherein the IMC peripheral interface comprises an interface type and an interface class, and the interface type comprises a data interface, a control interface and a collaboration interface.
CN202110301631.7A 2021-03-22 2021-03-22 Semantic ontology model-based adaptation method for instrument heterogeneous peripheral Active CN113220349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110301631.7A CN113220349B (en) 2021-03-22 2021-03-22 Semantic ontology model-based adaptation method for instrument heterogeneous peripheral

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110301631.7A CN113220349B (en) 2021-03-22 2021-03-22 Semantic ontology model-based adaptation method for instrument heterogeneous peripheral

Publications (2)

Publication Number Publication Date
CN113220349A CN113220349A (en) 2021-08-06
CN113220349B true CN113220349B (en) 2022-09-02

Family

ID=77084051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110301631.7A Active CN113220349B (en) 2021-03-22 2021-03-22 Semantic ontology model-based adaptation method for instrument heterogeneous peripheral

Country Status (1)

Country Link
CN (1) CN113220349B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8793198B1 (en) * 2011-11-16 2014-07-29 The United States Of America As Represented By The Secretary Of The Navy Autonomous semantic software agents and design method therefor, and online simulation apparatus using an inference engine
CN104699518A (en) * 2015-03-19 2015-06-10 烟台海颐软件股份有限公司 Multi-purpose meter reading machine adapter based on microkernel plug-in and realization method thereof
CN105829869A (en) * 2013-12-23 2016-08-03 赛默科技便携式分析仪器有限公司 Adaptation of field use spectroscopy equipment
CN108459574A (en) * 2018-03-27 2018-08-28 重庆邮电大学 It is a kind of that system is managed based on the semantic field device information with OPC UA
CN110460483A (en) * 2019-09-25 2019-11-15 重庆邮电大学 A kind of Profinet and Modbus equipment isomery network-building method based on SDN
CN112379653A (en) * 2020-12-01 2021-02-19 国能信控互联技术有限公司 Smart power plant management and control system based on micro-service architecture
CN112486690A (en) * 2020-12-11 2021-03-12 重庆邮电大学 Edge computing resource allocation method suitable for industrial Internet of things

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100131482A1 (en) * 2008-11-26 2010-05-27 General Electric Company Adaptive user interface systems and methods for healthcare applications

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8793198B1 (en) * 2011-11-16 2014-07-29 The United States Of America As Represented By The Secretary Of The Navy Autonomous semantic software agents and design method therefor, and online simulation apparatus using an inference engine
CN105829869A (en) * 2013-12-23 2016-08-03 赛默科技便携式分析仪器有限公司 Adaptation of field use spectroscopy equipment
CN104699518A (en) * 2015-03-19 2015-06-10 烟台海颐软件股份有限公司 Multi-purpose meter reading machine adapter based on microkernel plug-in and realization method thereof
CN108459574A (en) * 2018-03-27 2018-08-28 重庆邮电大学 It is a kind of that system is managed based on the semantic field device information with OPC UA
CN110460483A (en) * 2019-09-25 2019-11-15 重庆邮电大学 A kind of Profinet and Modbus equipment isomery network-building method based on SDN
CN112379653A (en) * 2020-12-01 2021-02-19 国能信控互联技术有限公司 Smart power plant management and control system based on micro-service architecture
CN112486690A (en) * 2020-12-11 2021-03-12 重庆邮电大学 Edge computing resource allocation method suitable for industrial Internet of things

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"LTE-A终端系统分组数据汇聚协议层与无线链路控制层的实现与测试";方一鸣;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180415;I136-1861 *
"uCOS-Ⅱ NOHZ动态高分辨率时钟系统实现方法";陈俊华等;《2017中国自动化大会(CAC2017)暨国际智能制造创新大会(CIMIC2017)论文集》;20171020;第643-647页 *
"实时天文元数据归档系统的设计与实现";郭航;《中国优秀硕士学位论文全文数据库 基础科学辑》;20200115;A007-6 *

Also Published As

Publication number Publication date
CN113220349A (en) 2021-08-06

Similar Documents

Publication Publication Date Title
Cavalieri et al. Asset administration shell for PLC representation based on IEC 61131–3
Balanyi et al. Mining design patterns from C++ source code
US7334223B2 (en) Apparatus and method for automatically migrating client server applications to other architectures and platforms
US10606562B2 (en) Method and system for generating PLC code with a connectivity model
EP2169547B1 (en) Compilation model for programmable logic controllers (PLC).
CN112688865B (en) Design method of OPC UA gateway for graphical online modeling
Fuchs et al. Formal description of a generic multi-model
CN100351785C (en) Method for debuging embedded system and equipment
CN103197654A (en) Monitoring system of standard semiconductor equipment based on organic photo conductor (OPC)
CN1737755A (en) Modeling and code generating method of embedded real-time operating system
CN110874213B (en) Runtime type extension and reflection method of static strong type language
CN113220349B (en) Semantic ontology model-based adaptation method for instrument heterogeneous peripheral
Ning et al. An architecture-driven, business-specific, and component-based approach to software engineering
Do et al. Object-oriented software design with axiomatic design
CN116257244A (en) Flow code conversion system for chip manufacturing EAP system
Alkan et al. Assessing complexity of component-based control architectures used in modular automation systems
CN107291435B (en) Quantitative analysis method for hybrid AADL model in uncertain environment
Thramboulidis Towards an Object-Oriented extension for IEC 61131
CN112685031A (en) Analysis method and system for DBC file of fuel cell test system
CN115698939A (en) System and method for engineering a technical system
Johannsen et al. Supporting knowledge elicitation and analysis for business process improvement through a modeling tool
CN111639128A (en) E-commerce data integration system and method based on distribution
WO2008015110A2 (en) Methods, apparatus and computer programs for modelling computer programs
CN112327740B (en) Embedded motion controller integrated with Tango equipment service
CN116431142B (en) High-efficiency programming method capable of being quickly constructed and not prone to error

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant