WO2023245985A1 - 一种基于物模型的智慧网关适配系统及其运行方法 - Google Patents

一种基于物模型的智慧网关适配系统及其运行方法 Download PDF

Info

Publication number
WO2023245985A1
WO2023245985A1 PCT/CN2022/134878 CN2022134878W WO2023245985A1 WO 2023245985 A1 WO2023245985 A1 WO 2023245985A1 CN 2022134878 W CN2022134878 W CN 2022134878W WO 2023245985 A1 WO2023245985 A1 WO 2023245985A1
Authority
WO
WIPO (PCT)
Prior art keywords
adapter
object model
business
information
business subsystem
Prior art date
Application number
PCT/CN2022/134878
Other languages
English (en)
French (fr)
Inventor
陈雪萍
赵桥
黄晓艳
王华民
Original Assignee
武汉虹信技术服务有限责任公司
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
Priority claimed from CN202210697250.XA external-priority patent/CN115150226B/zh
Application filed by 武汉虹信技术服务有限责任公司 filed Critical 武汉虹信技术服务有限责任公司
Publication of WO2023245985A1 publication Critical patent/WO2023245985A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0843Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Definitions

  • the present invention relates to the technical field of intelligent building Internet of Things, and more specifically, to an intelligent gateway adaptation system based on an object model and an operating method thereof.
  • IoT Internet of Things
  • 5G Fifth Generation
  • cloud computing Currently, the Internet of Things (IoT) is combined with emerging technologies such as 5G and cloud computing. IoT can improve operational efficiency, reduce costs, improve decision-making and enhance customer experience, and can become a key driver of digital transformation in various industries.
  • the present invention provides a smart gateway adaptation system based on the object model to solve the problem of low level of sharing of existing achievements and the expansion of personnel as the number of projects continues to increase. , low-level duplication, technical problems that cannot be improved in quality, schedule and cost control.
  • the present invention provides a smart gateway adaptation system based on the object model, which is used to adapt equipment with different design standards from different manufacturers in various business subsystems of smart construction projects.
  • the object model generation module is used to import the object model configuration template of each business subsystem, generate a data exchange format file and import it into the database, and generate the object model of each business subsystem;
  • the database management module is used to store and manage the object model and device data of each business subsystem, build a database definition table, and provide data definition and deployment data storage and management for the adapter system;
  • the adapter system is used to design the object model structure code of the corresponding adapter's business subsystem based on the object model of each business subsystem generated by the object model generation module, and abstract devices of different manufacturers of the same business subsystem into attributes, For services and events, the device identification mapping relationship templates on the adapter side and the third-party application platform system side are configured at the same time to realize the adaptation of devices of different standards from different manufacturers.
  • the object model generation module first performs template configuration on the object model of each business subsystem, including the configuration of the business subsystem object model, the configuration of the equipment object model, the configuration of the business subsystem object model and the configuration of the equipment object model. It also includes the configuration of attributes, services and events; then, import the object model configuration template, generate the object model data exchange format file of each business subsystem and import it into the database; finally, configure the template and database according to the object model
  • the object model in the object model generates the object model structure code of each business subsystem, provides business service interface calls for the adapters of each business subsystem, and reports events and attribute definitions.
  • an adapter management platform which can import device information for adapters that cannot automatically obtain device information.
  • Configuration items for device information import include device identification, network address, port, original manufacturer identification, and manufacturer code. , one or more of the following: business subsystem code, group code, parent device identification, manufacturer, device serial number, device location, connection status, device description, and all attribute information under the device; the device information is configured through the device identification It communicates with the interface gateway module to realize the communication between each business subsystem adapter and the third-party application platform, and realizes the communication between all manufacturer adapters and the manufacturer's equipment or platform through the manufacturer's original identification.
  • the adapter management platform can also import attribute information for certain business subsystems that use industrial control protocols for docking.
  • the configuration items for attribute information import include business subsystem code, manufacturer code, group code, device identification, and attribute keys. , one or more of attribute object identification, data type, attribute connection string and remarks; through the configuration of attribute information, each adapter and manufacturer can communicate through attribute point identification.
  • an interface document generation tool which generates interface documents for each business subsystem to interface with the third-party application platform based on the object model of each business subsystem generated by the object model generation module;
  • the interface document includes one or more of attribute information, service information and event information.
  • the database definition table includes one of a business subsystem coding definition table, a manufacturer coding definition table, a physical model table, a disaster recovery table, an adapter running table, an adapter definition table, a device table, an attribute mapping table, and a record table. or more; the business subsystem coding definition table, the manufacturer coding definition table and the object model table all provide the adapter system with business subsystem, manufacturer and device definition information as well as attribute, service and event definition information.
  • the disaster recovery table is used to cache device exception information;
  • the adapter operation table is used to display the operation information of the adapter;
  • the adapter definition table is used to display the correspondence between adapters of different manufacturers and dynamic libraries and interface classes;
  • the equipment table is used to display the associated information of all equipment of the manufacturer;
  • the attribute mapping table is used to display the equipment attribute mapping information of certain industrial control protocol docking manufacturers that only dock attribute point information;
  • the record table can display that some manufacturers have recorded information , to prevent duplication of records and to store records in case of reported loss.
  • the object model configuration template includes attributes, services and events of each business subsystem and device;
  • the service is a service interface of the adapter system that the third-party application platform calls through the interface gateway module;
  • the event is that the adapter system reports changes in the status of the manufacturer's equipment and transmits alarm and notification information to the third-party application platform.
  • the device object model includes one or more of attributes, event and service names, identification keys, data types, specifications, whether it is readable and writable, parameter types, belonging keys, belonging names, and event types.
  • the structure code in services and events includes one or more of name, identification key, data type and specification.
  • the adapter management platform also supports restarting the adapter by configuring the adapter daemon policy so that once an adapter process is interrupted, the adapter will be automatically restarted.
  • the present invention provides an operation method of an intelligent gateway adaptation system based on an object model, including the steps:
  • the business subsystem object model includes the services, events and attributes of the business subsystem;
  • the services of the business subsystem refer to the business service interface of the business subsystem, and the events of the business subsystem include the service status of the business subsystem All events of change notifications are reported to the third-party application platform through the interface gateway module.
  • the attributes of the business subsystem refer to all attribute information of the business subsystem;
  • the device object model includes the services, events and attributes of the device;
  • the service of the device refers to the business service interface of the device, and the events of the device include device alarms, notifications and attributes and are reported to the third-party application platform through the interface gateway module All events, device attributes refer to all attribute information of the device;
  • Import the object model configuration template of each business subsystem generate the data exchange format file of the object model and import it into the database, and generate the object model structure code of each business subsystem based on the object model configuration template and the object model in the database;
  • Each business subsystem adapter generates independent adapter main process code through the object model structure code
  • the third-party application platform calls the adapter system service interface through the interface gateway module to implement downstream business processing; the adapter reports attributes, events and notifications to implement upstream business processing.
  • This invention refines the different adaptation systems of multiple existing projects into an independent adaptation system based on the Internet of Things to serve more subsequent project businesses, thereby improving the efficiency of development and operation and maintenance, and saving effective costs. cost.
  • the present invention is implemented using an adaptation system based on object models, which can cross business scenarios and cross-platforms, thus supporting the docking of multiple manufacturers' various 4G and 5G devices, and solving the problems caused by multiple manufacturers and multiple projects. Device connection issues.
  • the present invention uses the object model configuration template to import the database and convert it into the object model structure code, so that each business subsystem The system's business interface implementation is more independent and concise.
  • the present invention uses an adapter management platform to uniformly manage adapters.
  • the same manufacturer can configure multiple adapters; when the equipment cannot be automated, equipment information can be imported manually.
  • the system can implement attribute import configuration to solve docking problems.
  • interface document generation tools are used to achieve this, thereby improving the efficiency of docking with third-party application platforms.
  • Figure 1 is a system framework diagram of an object model-based smart gateway adaptation system provided by an embodiment of the present invention
  • Figure 2 is a flow chart of an adapter base class implementation provided by an embodiment of the present invention.
  • Figure 3 is an implementation flow chart of the adapter management platform provided by an embodiment of the present invention.
  • Figure 4 is a flow chart of attribute reporting in the adapter system provided by an embodiment of the present invention.
  • Figure 5 is a flow chart for setting attributes in the adapter system provided by an embodiment of the present invention.
  • Figure 6 is a flow chart for implementing an adapter reconnection mechanism provided by an embodiment of the present invention.
  • an object model-based smart gateway adaptation system is used in various business subsystems of smart construction projects (smart parks, smart communities, smart buildings, etc.) Adapt to equipment with different design standards from different manufacturers.
  • the smart gateway adaptation system based on the object model mainly includes seven components: database management module, object model generation module, adapter management platform, interface (API) document generation tool, interface gateway module (Broker module), adapter system and public module .
  • the smart gateway adaptation system based on the object model adopts a design model in which each module is independent of each other, and realizes the excel writing (attributes of each business subsystem (systems corresponding to various services such as access control, parking and video in smart construction projects) of the object model) , services and events), json is generated and stored in the database, and API documents are generated and provided to third-party interfaces; the adapter management platform is implemented, the manufacturer dynamic library of multiple adapters is managed, the manufacturer information of each business subsystem is configured, device and attribute information is imported, and the adapter is implemented Startup, restart and guard strategy configuration. Realize that each manufacturer's adapter shares a common business interface, connects to the manufacturer's platform, initializes the device, starts the reconnection mechanism, and reports attributes and alarm information.
  • the database management module includes database tools and small databases.
  • the database management module implements database initialization tasks through database tools, writing business subsystem codes, manufacturer codes, object models, adapter definition tables, device information tables, etc.; the database management module uses small databases such as MySql to implement various business subsystems from different manufacturers.
  • Physical model and device data management construct database definition tables including business subsystem coding table, manufacturer coding table, physical model table, disaster recovery table, adapter running table, adapter definition table, device table, attribute mapping table and record table, etc. , provides storage and management of data definition and deployment data for the adapter system.
  • the business subsystem coding definition table, manufacturer coding definition table and object model table all provide the adapter system with business subsystem, manufacturer and device definitions as well as attribute, service and event definition information; the disaster recovery table is used to cache device exception information; the adapter runs The table is used to display adapter running information; the adapter definition table displays the correspondence between adapters of different manufacturers and dynamic libraries and interface classes; the device table displays the associated information of all devices of the manufacturer, including IP, port, object model information, etc.; the attribute mapping table displays a certain Some industrial control protocol docking manufacturers only dock device attribute mapping information of attribute point information; the record table shows that some manufacturers have recorded information to prevent duplication of records and to store the loss of reported records.
  • the object model generation module includes an object model import tool, an object model generation json tool, and an object model enumeration code tool.
  • Object model import tool responsible for importing the object model excel (object model configuration template) of each business subsystem
  • object model generation json tool imports the object model excel document, generates a json file (data exchange format file), and then imports it into the database
  • objects Model enumeration code tool Generate the object model structure code of each business subsystem to facilitate the use of each adapter module of the adapter system.
  • the object model generation module first configures excel templates for the object models of each business subsystem, including the configuration of the business subsystem object model and the configuration of the equipment object model.
  • the configuration of the business subsystem and equipment object models also includes attributes. , service and event configuration; then import the object model configuration excel to generate the object model json of each business subsystem; finally, import the generated object model txt of each business subsystem into the adapter system to provide object models for each business subsystem adapter
  • the structure calls the service and reports events and attribute definitions.
  • the physical model configuration template includes the attributes, services and events of each business subsystem and equipment; the service means that the third-party application platform calls the service interface of the adapter system through the Broker module, and the event means that the adapter system reports the manufacturer's equipment status changes, alarms and notifications and other information to Third-party application platform.
  • the device object model includes attributes, event and service names, identification keys (identification keys), data types, specifications, whether it is readable and writable, parameter types (0 input parameters, 1 output parameters), and belonging Keys (service and event specific). ), its name (specific for services and events) and event type; in addition, the structures in services and events include names, identification keys, data types and specifications.
  • Adapter management platform supports adding, deleting and modifying adapters, adapter operation and maintenance; supports device configuration import and attribute configuration import of industrial control protocols, thereby providing preliminary preparation and monitoring functions for the operation of each adapter in the adapter system; loading the console program, Manufacturer environment download.
  • modifying the adapter can modify the connection string for docking with the manufacturer; continuously update and import configurations according to the changing device information of the field project, rather than just based on the manufacturer's platform (sometimes there may be missed ones) equipment, and also obtain device information for some manufacturer equipment that does not have a manufacturer platform); for some manufacturers that use industrial control protocols to connect and only provide attribute point IDs and attribute values, attribute configuration information is imported to solve the problem of adapters and manufacturer equipment. docking problem.
  • the adapter management platform can import device information for adapters that cannot automatically obtain device information.
  • the device information import configuration items include device identification, network address, port, manufacturer original ID, manufacturer code, business subsystem code, group code, parent device identification, Manufacturer, device serial number, device location, connection status, device description and properties.
  • the configuration of device information can realize communication between each business subsystem adapter and the corresponding manufacturer's equipment, and communicate through the device identification and Broker module.
  • the adapter management platform needs to import attribute configuration information for some business subsystems that use industrial control protocols.
  • the attribute configuration template includes business subsystem code, manufacturer code, group code, device identification, attribute key (attribute key), and attribute object ID. (attribute object identifier), data type, attribute connection string and remarks.
  • attribute point ID attribute point identification
  • the adapter management platform also supports restarting the adapter.
  • the adapter daemon policy By configuring the adapter daemon policy, once an adapter process is interrupted, the adapter will be automatically restarted.
  • API (interface) document generation tool Generates interface documents for connecting each business subsystem of the adapter system with third-party application platforms to facilitate the development and use of third-party applications.
  • the API document generation tool generates API documents that interface with third-party application platforms based on the object model exported by the object model generation module; the API document content includes attribute information, service information, and event information. Attribute information includes key (key or key value), attribute name, readable (r)/writable (w), data type and description; service information includes interface prototype, request parameters, return parameters and related structure information; event information Including interface prototype, reported parameters and related structure information.
  • Adapter system implements the general functions and special business functions of each business subsystem, designs the corresponding object model, abstracts devices from different manufacturers into attributes, services and events, and configures the device identification mapping relationship template between the adapter side and the system side. Implement the same interfaces from different manufacturers and implement interfaces for adding, deleting and modifying devices to facilitate later expansion; implement the log function and support modifying adapters in batches.
  • the adapter system is used to design the corresponding adapter business object model structure code based on the object model of each business subsystem generated by the object model generation module, and abstract the subsystem services and equipment services of different manufacturers of the same business subsystem into attributes. , services and events, while configuring the device identification mapping relationship templates on the adapter side and the third-party application platform system side, realizing the same business interfaces and independent business interfaces of different manufacturers, and adding, deleting and modifying device interfaces.
  • the API gateway module uses broker open source software based on the open source MQTT protocol to provide subscription and publication of instruction data and device data to the uplink service center (third-party application platform) and downlink adapter system.
  • Public modules are used to assist other modules and provide public interfaces and method calls for other modules.
  • FIG. 2 is an implementation flow chart of the adapter system framework according to the embodiment of the present invention. Follow the following process steps to introduce the adapter initialization process.
  • Step S100 decompose the connection string, initialize the SDK, etc.
  • Step S101 log in to the manufacturer platform, initialize the device, and report device offline or online recovery alarms;
  • Step S102 during the execution of initializing the device, if the device can be automatically initialized, it is necessary to add new devices to the database, update existing devices in the database, delete redundant devices, and finally query the database device table as a cache;
  • Step S103 if the device cannot be automatically initialized, query the database device table as cache;
  • step S104 and step S101 are completed successfully, the manufacturer platform online alarm and operation log are reported;
  • Step S106 if step S101 is not connected to the manufacturer's platform but directly connected to the device, a device offline alarm needs to be reported when the device is offline, and a clear alarm is reported when the device changes from online to offline, even if the device returns online;
  • Step S101 will be called repeatedly in the disconnected state.
  • FIG. 3 is a flow chart of the implementation of the adapter management platform according to the embodiment of the present invention. The process specifically includes the following steps:
  • Step S201 add an adapter, including adapter name, business subsystem, manufacturer, main program and group coding, etc.;
  • Step S202 If you add a manufacturer for the first time, you need to download the manufacturer's SDK package. If there is no manufacturer SDK package or if you add it for the second time, you do not need to download it;
  • Step S203 configure manufacturer information, including IP, port number, user name and password, and save;
  • Step S204 if the adapter supports automatic device acquisition, the manufacturer's device information is automatically obtained through the program and stored in the database;
  • Step S205 otherwise it is necessary to obtain the device import template and import all device data into the database
  • Step S206, step S204 and step S205 are followed by starting the adapter
  • Step S207 if some business subsystems support industrial control protocols, attribute configuration needs to be imported;
  • Step S208 if some business subsystems do not need to import attribute configuration, ignore it;
  • Step S209 start the adapter
  • Step S210 Delete some unnecessary adapters
  • Step S211 if necessary, you can configure a daemon policy and select auto-start at boot or adapter daemon (once an adapter process dies, the adapter will be automatically restarted).
  • the configuration of the energy consumption statistics business subsystem is as shown in the following table:
  • Example of imported attribute configuration in step S207 The configuration of the energy consumption statistics business subsystem based on the modbus protocol is as shown in the following table:
  • Figure 4 is a flow chart of attribute reporting in the adapter system according to the embodiment of the present invention. The process specifically includes the following steps:
  • Step S301 initialize the startup timer (base class Timer);
  • Step S302 determine whether 5-minute polling reporting is required; (ReportAttr, that is: report attribute, attribute report)
  • Step S303 if 5-minute polling reporting is not required, leave it blank, configure the polling time to 0, and terminate unnecessary polling;
  • Step S304 if polling reporting is required for 5 minutes, report service attributes, such as temperature, humidity, brightness, etc.;
  • Step S305 Report status attributes, such as connection status, etc. (ReportAlarm, namely: alarm report)
  • FIG. 5 is a flow chart of setting attributes in the adapter system according to the embodiment of the present invention. The flow specifically includes the following steps:
  • Step S401 call the set property function (SetProperties);
  • Step S402 determine whether the Device Id (device identification) is valid, and if it is invalid, throw (discard the invalid exception information);
  • Step S403 if valid, determine whether the incoming attribute propertyKey (property key) is valid and writable;
  • Step S404 if the attribute propertyKey is invalid, throw (discard the invalid property key);
  • Step S405 if valid, change the attribute.
  • Figure 6 is a flow chart of the adapter reconnection mechanism according to the embodiment of the present invention. The process specifically includes the following steps:
  • Step S501 initialize the startup timer
  • Step S502 determine whether it is online. If it is directly connected to the manufacturer's device, True will be returned if the device is reconnected successfully;
  • Step S503 if the connection to the manufacturer's platform is successful, the platform is online and no operation is required;
  • Step S504 If the connection to the manufacturer's platform fails and the platform is offline, the reconnection mechanism is activated;
  • Step S505 Call the ConnectVendor function.
  • Step S1 Configure the business subsystem object model, including services, events and attributes; service refers to the business service interface of the business subsystem, and events include business subsystem service status change notifications and all other information reported to the third-party application platform through the interface gateway module Events and attributes refer to all attributes of the business subsystem;
  • Step S2 Configure the device object model, including services, events and attributes; service refers to the business service interface of the device, events include all events reported to the third-party platform through the interface gateway module such as device alarms, notifications and attributes, and attributes refer to the device All properties;
  • Step S3 The database management module initializes the database, builds a database definition table, manages equipment data and dynamic data of multiple business subsystems, and persists part of the data;
  • Step S4 Import the physical model configuration template of each business subsystem through the physical model generation module, generate the data exchange format file of the physical model, import the file into the database, and generate each business subsystem based on the physical model configuration template and the physical model in the database
  • the object model structure code
  • Step S5 Each business subsystem adapter quickly generates independent adapter main process code through the object model structure code
  • Step S6 Create a single adapter, obtain the dynamic library for some SDK manufacturers, and configure the manufacturer information
  • Step S7 For adapters from manufacturers that cannot automatically obtain device information, device information needs to be imported manually; in addition, for business subsystem manufacturers that interface with industrial control protocols, attribute information needs to be imported manually;
  • Step S8 Start the adapter
  • Step S9 The third-party application platform calls the adapter system service interface through the interface gateway module to implement downlink business processing; the adapter reports attributes, events, notifications and other messages to implement uplink business processing;
  • Step S10 The adapters in step S9 all call public open interfaces.
  • each business subsystem also has a special business interface, and the adapter implements its own special business processing.
  • each functional module in various embodiments of the present invention can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more components for implementing the specified logical function(s). Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures.
  • each block in the block diagram or flowchart illustration, and combinations of blocks in the block diagram or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or may be implemented by special purpose hardware-based systems that perform the specified functions or operations. Achieved by a combination of specialized hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种基于物模型的智慧网关适配系统,该系统包括数据库管理模块、物模型生成模块、适配器管理平台、接口文档生成工具、接口网关模块、适配器系统和公共模块。该系统将现有多个项目的不同适配系统提炼为一个独立的基于物联网的适配系统,以服务后续更多的项目业务,从而提高了开发和运维的效率,节约了成本;该系统采用基于物模型的适配系统来实现跨业务场景和跨平台,从而可支持多个厂商多种4G、5G等设备的对接,从而解决了因项目多带来的各种厂商和多种设备的对接问题;该系统采用物模型配置模板导入数据库,并转换成物模型结构体代码,从而使各个业务子系统的业务接口实现更加独立和简要,减少了代码冗余。

Description

一种基于物模型的智慧网关适配系统及其运行方法 【技术领域】
本发明涉及智能楼宇物联网技术领域,更具体地,涉及一种基于物模型的智慧网关适配系统及其运行方法。
【背景技术】
当前,物联网(IoT)结合5G和云计算等新兴技术,物联网可以提高运营效率、降低成本、改进决策并增强客户体验,可以成为各个行业数字化转型的关键推动因素。
目前公司所有的智慧管理项目中,需要用到与设备交互的底层实现,老一套的适配系统不仅庞大笨重,而且难用。每次对接一个新的项目时,都需要花费很多精力来修改这些代码,修改数据库,使之适用于新的应用场景。随着智慧园区、智慧社区、智慧建筑系统等4G和5G业务的增多,出现了这样一种情况:一个又一个项目地持续操作使得旧系统的规模日益庞大。
规模日益庞大的旧系统的共享已有成果的程度很低,且随着项目的不断增多,使得人员膨胀,低水平重复,质量、进度和成本控制始终得不到好转。项目多也会带来各种厂商和多种设备的对接问题。门禁、停车和视频等各个业务子系统的业务接口实现的代码也很冗余。
【发明内容】
针对现有技术的至少一个缺陷或改进需求,本发明提供了一种基于物模型的智慧网关适配系统,用以解决共享已有成果的程度很低,随着项目的不断增多,导致人员膨胀、低水平重复,质量、进度和成本控制始终得不到好转的技术问题。
为实现上述目的,第一方面,本发明提供了一种基于物模型的智慧网关适配系统,用于对智慧建设项目的各个业务子系统中的不同厂商的不同设计标准 的设备进行适配,包括:数据库管理模块、物模型生成模块和适配器系统;
所述物模型生成模块用于导入各个业务子系统的物模型配置模板,生成数据交换格式文件并导入数据库,生成各个业务子系统的物模型;
所述数据库管理模块用于对各个业务子系统的物模型和设备数据进行存储和管理,构建数据库定义表,并为所述适配器系统提供数据定义以及部署数据的存储和管理;
所述适配器系统用于根据物模型生成模块生成的各个业务子系统的物模型,设计相应的适配器的业务子系统的物模型结构体代码,将相同业务子系统的不同厂商的设备抽象成属性、服务和事件,同时配置适配器端和第三方应用平台系统端的设备标识映射关系模板,实现不同厂商的不同标准的设备的适配。
进一步地,所述物模型生成模块首先对各个业务子系统的物模型做模板配置,包括业务子系统物模型的配置、设备物模型的配置,业务子系统物模型的配置和设备物模型的配置中又包括属性、服务和事件的配置;然后,导入所述物模型配置模板,生成各个业务子系统的物模型数据交换格式文件并导入所述数据库;最后,根据所述物模型配置模板和数据库中的物模型生成各个业务子系统的物模型结构体代码,为各个业务子系统的适配器提供业务服务接口调用,上报事件和属性定义。
进一步地,还包括适配器管理平台,所述适配器管理平台针对不能自动获取设备信息的适配器可以进行设备信息的导入,设备信息导入的配置项包括设备标识、网络地址、端口、厂商原始标识、厂商编码、业务子系统编码、分组编码、父设备标识、厂商、设备序列号、设备位置、连接状态、设备描述和设备下所有属性信息中的一种或多种;设备信息的配置通过所述设备标识和接口网关模块的通信来实现各个业务子系统适配器和第三方应用平台通信,通过厂商原始标识实现所有厂商适配器与厂商设备或平台的通信。
进一步地,所述适配器管理平台还针对某些采用工控协议对接的业务子系统可以进行属性信息的导入,属性信息导入的配置项包括业务子系统编码、厂商编码、分组编码、设备标识、属性键、属性对象标识、数据类型、属性连接 字符串和备注中的一种或多种;通过属性信息的配置可以实现各个适配器和厂商通过属性点位标识进行通信。
进一步地,还包括接口文档生成工具,所述接口文档生成工具根据所述物模型生成模块生成的各个业务子系统的物模型,生成各个业务子系统与所述第三方应用平台对接的接口文档;所述接口文档包括属性信息、服务信息和事件信息中的一种或多种。
进一步地,所述数据库定义表包括业务子系统编码定义表、厂商编码定义表、物模型表、灾备表、适配器运行表、适配器定义表、设备表、属性映射表和记录表中的一种或多种;所述业务子系统编码定义表、所述厂商编码定义表和所述物模型表都是为所述适配器系统提供业务子系统、厂商和设备定义信息以及属性、服务和事件定义信息;所述灾备表用于缓存设备异常信息;所述适配器运行表用于显示适配器的运行信息;所述适配器定义表用于显示不同厂商的适配器和动态库、接口类的对应关系;所述设备表用于显示厂商所有设备的关联信息;所述属性映射表用于显示某些工控协议对接厂商只对接属性点位信息的设备属性映射信息;所述记录表能够显示某些厂商有记录信息,防止记录重复以及为记录上报丢失的情况做存储。
进一步地,所述物模型配置模板包括各个业务子系统和设备的属性、服务和事件;所述服务为所述第三方应用平台通过所述接口网关模块调用所述适配器系统的服务接口;所述事件为所述适配器系统上报厂商设备状态的变化,将告警和通知的信息传送给所述第三方应用平台。
进一步地,所述设备物模型包括属性、事件和服务的名称、标识键、数据类型、规格说明、是否可读可写、参数类型、所属键、所属名称和事件类型中的一种或多种;服务和事件中的结构体代码包括名称、标识键、数据类型和规格说明中的一种或多种。
进一步地,所述适配器管理平台还支持重启适配器,通过配置适配器守护策略,使得一旦某个适配器进程中断,将自动重启该适配器。
为实现上述目的,第二方面,本发明提供了一种基于物模型的智慧网关适 配系统的运行方法,包括步骤:
配置业务子系统物模型;业务子系统物模型包括业务子系统的服务、事件和属性;业务子系统的服务指该业务子系统的业务服务接口,业务子系统的事件为包括业务子系统服务状态变更通知的通过接口网关模块上报给第三方应用平台的所有事件,业务子系统的属性指业务子系统的所有属性信息;
配置设备物模型;设备物模型包括设备的服务、事件和属性;设备的服务指该设备的业务服务接口,设备的事件为包括设备告警、通知和属性的通过接口网关模块上报给第三方应用平台的所有事件,设备的属性指设备的所有属性信息;
对数据库进行初始化,构建数据库定义表;
导入各个业务子系统的物模型配置模板,生成物模型的数据交换格式文件并导入数据库,根据所述物模型配置模板和数据库中的物模型生成各个业务子系统的物模型结构体代码;
各个业务子系统适配器通过所述物模型结构体代码生成独立的适配器主体流程代码;
创建单个适配器,获取动态库,配置厂商信息;
针对不能自动获取设备信息的厂商适配器,手动导入设备信息;针对工控协议对接的业务子系统厂商,手动导入属性信息;然后,启动适配器;
第三方应用平台通过接口网关模块调用适配器系统服务接口,实现下行业务处理;适配器上报属性、事件和通知,实现上行业务处理。
总体而言,通过本发明所构思的以上技术方案与现有技术相比,能够取得下列有益效果:
(1)本发明将现有多个项目的不同适配系统提炼为一个独立的基于物联网的适配系统,以服务后续更多的项目业务,从而提高了开发和运维效率,节约了有效成本。
(2)本发明采用基于物模型的适配系统来实现,可以跨业务场景和跨平台,从而支持多个厂商多种4G、5G设备的对接,解决了项目多带来的各种厂商和 多种设备的对接问题。
(3)为了解决门禁、停车和视频等各个业务子系统业务接口的定义实现,减少代码冗余,本发明采用物模型配置模板导入数据库,并转换成物模型结构体代码,从而使各个业务子系统的业务接口实现更加独立和简要。
(4)本发明采用适配器管理平台统一管理适配器,针对特殊场景,可以实现同一个厂商配置多个适配器;在设备不能自动化的情况下,可以手动实现设备信息导入,针对基于工控协议的特殊业务子系统可以实现属性导入配置来解决对接问题。
(5)为了解决快速直接给第三方应用平台提供清晰的对接业务接口,采用接口文档生成工具来实现,从而提高了与第三方应用平台对接的效率。
【附图说明】
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的基于物模型的智慧网关适配系统的系统框架图;
图2为本发明实施例提供的适配器基类实现流程图;
图3为本发明实施例提供的适配器管理平台实现流程图;
图4为本发明实施例提供的适配器系统中属性上报的流程图;
图5为本发明实施例提供的适配器系统中设置属性的流程图;
图6为本发明实施例提供的实现适配器重连机制的流程图。
【具体实施方式】
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实 施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。
本申请的说明书、权利要求书或上述附图中的术语“包括”或“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备并没有限定于已列出的步骤或单元,而是可选地还可以包括没有列出的步骤或单元,或可选地还可以包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
如图1所示,在一个实施例中,一种基于物模型的智慧网关适配系统,用于对智慧建设项目(智慧园区、智慧社区和智慧建筑等类型的项目)的各个业务子系统中的不同厂商的不同设计标准的设备进行适配。该基于物模型的智慧网关适配系统主要包括数据库管理模块、物模型生成模块、适配器管理平台、接口(API)文档生成工具、接口网关模块(Broker模块)、适配器系统和公共模块这7个部件。该基于物模型的智慧网关适配系统采用各个模块互相独立的设计模式,实现了各个业务子系统(智慧建设项目中的门禁、停车和视频等各个业务对应的系统)物模型的excel编写(属性、服务和事件),json生成入库,API文档生成提供给第三方接口;实现适配器管理平台,管理多个适配器的厂商动态库,配置各个业务子系统厂商信息,设备和属性信息导入,实现适配器的启动、重启和守护策略配置。实现各个厂商适配器共有公共业务接口,连接厂商平台,初始化设备,启动重连机制,上报属性和告警信息。
数据库管理模块包括数据库工具和小型数据库。数据库管理模块通过数据库工具实现数据库初始化任务,写入业务子系统编码、厂商编码、物模型、适配器定义表、设备信息表等;数据库管理模块通过采用MySql等小型数据库来实现各个业务子系统不同厂商的物模型和设备数据管理,构建包括业务子系统编码表、厂商编码表、物模型表、灾备表、适配器运行表、适配器定义表、设备表、属性映射表和记录表等的数据库定义表,为适配器系统提供数据定义和部署数据的存储和管理。
业务子系统编码定义表、厂商编码定义表和物模型表都是为适配器系统提供业务子系统、厂商和设备定义以及属性、服务和事件定义信息;灾备表用来 缓存设备异常信息;适配器运行表用来显示适配器运行信息;适配器定义表显示不同厂商适配器和动态库、接口类的对应关系;设备表显示厂商所有设备的关联信息,包括IP、端口、物模型信息等;属性映射表显示某些工控协议对接厂商只对接属性点位信息的设备属性映射信息;记录表显示某些厂商有记录信息,防止记录重复以及为记录上报丢失的情况做存储。
物模型生成模块包括物模型导入工具、物模型生成json工具和生成物模型枚举代码工具。物模型导入工具:负责各个业务子系统物模型excel(物模型配置模板)的导入;物模型生成json工具:导入物模型excel文档,生成json文件(数据交换格式文件),再导入数据库;生成物模型枚举代码工具:生成各个业务子系统的物模型结构体代码,方便适配器系统的各个适配器模块使用。
更具体地,物模型生成模块先对各个业务子系统的物模型做excel模板配置,包括业务子系统物模型的配置、设备物模型的配置,业务子系统和设备物模型的配置中又包括属性、服务和事件的配置;然后导入物模型配置excel,生成各个业务子系统的物模型json;最后,将生成的各个业务子系统的物模型txt导入适配器系统,为各个业务子系统适配器提供物模型结构体调用服务,上报事件和属性定义。
物模型配置模板包括各个业务子系统和设备的属性、服务和事件;服务即第三方应用平台通过Broker模块调用适配器系统的服务接口,事件即适配器系统上报厂商设备状态变化,告警和通知等信息给第三方应用平台。设备物模型包括属性、事件和服务的名称、标识Key(标识键)、数据类型、规格说明、是否可读可写、参数类型(0入参、1出参)、所属Key(服务、事件专用)、所属Name(服务、事件专用)和事件类型;另外服务和事件中的结构体包括名称、标识key、数据类型和规格说明。
适配器管理平台:支持添加、删除和修改适配器,适配器运维;支持设备配置导入和工控协议的属性配置导入,从而为适配器系统中各个适配器的运行提供前期准备工作和监测功能;加载控制台程序,厂商环境下载。
由于厂商连接信息可能有变化,修改适配器可以修改与厂商对接的连接字 符串;针对现场项目不断变化的设备信息做不断更新和导入配置,而不是仅仅根据厂商平台(有时候也会有漏掉的设备,还针对某些没有厂商平台的厂商设备)获取设备信息;针对某些厂商用工控协议来对接,只提供属性点位ID和属性值的情况,采取属性配置信息导入来解决适配器和厂商设备的对接问题。
适配器管理平台针对不能自动化获取设备信息的适配器可以实现设备信息导入,设备信息导入配置项包括设备标识、网络地址、端口、厂商原始ID、厂商编码、业务子系统编码、分组编码、父设备标识、厂商、设备序列号、设备位置、连接状态、设备描述和属性。设备信息的配置可以实现各个业务子系统适配器和对应厂商设备的通信,并通过设备标识和Broker模块进行通信。
适配器管理平台针对某些采用工控协议对接的业务子系统需要进行属性配置信息导入,属性配置模板内容包括业务子系统编码、厂商编码、分组编码、设备标识、属性key(属性键)、属性对象ID(属性对象标识)、数据类型、属性连接字符串和备注。通过属性配置信息,可以实现各个适配器和厂商通过属性点位ID(属性点位标识)进行通信。
优选的,适配器管理平台还支持重启适配器,通过配置适配器守护策略,使得一旦某个适配器进程中断,将自动重启该适配器。
API(接口)文档生成工具:生成适配器系统各个业务子系统与第三方应用平台对接的接口文档,方便第三方应用开发使用。
API文档生成工具根据物模型生成模块导出的物模型,生成与第三方应用平台对接的API文档;API文档内容包括属性信息、服务信息和事件信息。属性信息包括key(键或键值)、属性名称、可读(r)/可写(w)、数据类型和说明;服务信息包括接口原型、请求参数、返回参数和相关结构体信息;事件信息包括接口原型、上报参数和相关结构体信息。
适配器系统:实现各个业务子系统的通用功能和特殊业务功能,设计对应的物模型,将不同厂商的设备抽象成属性、服务和事件,配置适配器端和系统端的设备标识映射关系模板。实现不同厂商的相同接口,实现设备的增加、删除和修改接口,方便后期扩展;实现日志功能,支持分批次修改适配器。
所述适配器系统用于根据物模型生成模块生成的各个业务子系统的物模型,设计相应的适配器业务物模型结构体代码,将相同业务子系统的不同厂商的子系统业务和设备业务抽象成属性、服务和事件,同时配置适配器端和第三方应用平台系统端的设备标识映射关系模板,实现不同厂商的相同业务接口和独立业务接口,并实现增加、删除和修改设备接口。
API网关模块(broker模块)采用基于开源的MQTT协议实现的broker开源软件,用来给上行服务中心(第三方应用平台)和下行适配器系统提供指令数据和设备数据的订阅和发布。
公共模块用来辅助其他各个模块,为其他各个模块提供公共接口和方法调用。
图2为本发明实施例的适配器系统框架实现流程图。按照以下流程步骤,介绍适配器初始化的流程。
步骤S100,分解连接字符串,初始化SDK等;
步骤S101,登录厂商平台,初始化设备,上报设备离线或在线恢复告警;
步骤S102,初始化设备执行过程中,如果能自动初始化设备,则需要新增设备入库,更新数据库已有设备,删除多余设备,最后查询数据库设备表作为缓存;
步骤S103,如果不能自动初始化设备,则查询数据库设备表作为缓存;
步骤S104,步骤S101都完成成功后,上报厂商平台上线告警和运行日志;
步骤S105,步骤S101都完成失败后,上报厂商平台离线告警和运行日志;
步骤S106,如果步骤S101不是连接厂商平台,而是直连设备,则需要在设备离线时上报设备离线告警,设备由在线变为离线时上报清除告警,即使设备恢复在线;
步骤S101在断连状态下会重复调用。
图3为本发明实施例的适配器管理平台实现流程图,该流程具体包括以下步骤:
步骤S201,添加适配器,包括适配器名称、业务子系统、厂商、主程序和 分组编码等;
步骤S202,首次添加某个厂商需要下载厂商SDK包,没有厂商SDK包或第二次添加的不需要下载;
步骤S203,配置厂商信息,包括IP、端口号、用户名和密码,并且保存;
步骤S204,如果适配器支持自动化获取设备,则通过程序自动获取厂商设备信息入库;
步骤S205,否则需要获取设备导入模板,导入所有设备数据入库;
步骤S206,步骤S204和步骤S205之后是启动适配器;
步骤S207,如果某些业务子系统支持工控协议,需要导入属性配置;
步骤S208,如果某些业务子系统不需要导入属性配置,则忽略;
步骤S209,启动适配器;
步骤S210,针对某些不需要的适配器,可以进行删除操作;
步骤S211,如果需要可以配置守护策略,选择开机自启动,或者适配器守护(一旦某个适配器进程挂掉,将自动重启该适配器)。
步骤S205的设备信息导入模块举例:能耗统计业务子系统配置如下表所示:
Figure PCTCN2022134878-appb-000001
Figure PCTCN2022134878-appb-000002
步骤S207的导入属性配置举例:基于modbus协议的能耗统计业务子系统配置如下表所示:
Figure PCTCN2022134878-appb-000003
图4为本发明实施例的适配器系统中属性上报流程图,该流程具体包括以下步骤:
步骤S301,初始化启动时间定时器(基类Timer);
步骤S302,判断需不需要5分钟轮询上报;(ReportAttr,即:report attribute,属性报告)
步骤S303,如果不需要5分钟轮询上报,则留空,将轮询时间配置为0, 终止不必要的轮询;
步骤S304,如果需要5分钟轮询上报,则上报业务属性,比如温度、湿度和亮度等;
步骤S305,上报状态属性,比如连接状态等。(ReportAlarm,即:告警报告)
图5为本发明实施例的适配器系统中设置属性流程图,该流程具体包括以下步骤:
步骤S401,调用设置属性函数(SetProperties);
步骤S402,判断Device Id(设备标识)是否有效,如果无效则throw(抛弃无效的异常信息);
步骤S403,如果有效则判断传入属性propertyKey(属性键)是否有效,且可写;
步骤S404,如果属性propertyKey无效,则throw(抛弃无效的属性键);
步骤S405,如果有效则更改属性。
图6为本发明实施例的适配器重连机制流程图,该流程具体包括以下步骤:
步骤S501,初始化启动时间定时器;
步骤S502,判断是否在线,如果是直连厂商设备,设备重连成功则返回True;
步骤S503,如果连接厂商平台成功,平台在线,无需任何操作;
步骤S504,如果连接厂商平台失败,平台掉线,启动重连机制;
步骤S505,调用连接厂商(ConnectVendor)函数。
一种基于物模型的智慧网关适配系统的运行方法的主要步骤如下:
步骤S1:配置业务子系统物模型,包括服务、事件和属性;服务指该业务子系统的业务服务接口,事件包括业务子系统服务状态变更通知等通过接口网关模块上报给第三方应用平台的所有事件,属性指业务子系统的所有属性;
步骤S2:配置设备物模型,包括服务、事件和属性;服务指该设备的业务服务接口,事件包括设备告警、通知和属性等通过接口网关模块上报给第三方平台的所有事件,属性指设备的所有属性;
步骤S3:数据库管理模块对数据库进行初始化,构建数据库定义表,管理多个业务子系统的设备数据和动态数据,并且持久化一部分数据;
步骤S4:通过物模型生成模块导入各个业务子系统的物模型配置模板,生成物模型的数据交换格式文件,将该文件导入数据库,根据物模型配置模板和数据库中的物模型生成各个业务子系统的物模型结构体代码;
步骤S5:各个业务子系统适配器通过物模型结构体代码快速生成独立的适配器主体流程代码;
步骤S6:创建单个适配器,针对某些SDK厂商需要获取动态库,配置厂商信息;
步骤S7:针对不能自动获取设备信息的厂商适配器,需要手动导入设备信息;另外,针对工控协议对接的业务子系统厂商,还需要手动导入属性信息;
步骤S8:启动适配器;
步骤S9:第三方应用平台通过接口网关模块调用适配器系统服务接口,实现下行业务处理;适配器上报属性、事件和通知等消息,实现上行业务处理;
步骤S10:步骤S9中的适配器都调用公共开放接口,另外每个业务子系统都还有特殊业务接口,适配器实现自己的特殊业务处理。
需要说明的是,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来。
附图中的流程图或框图,图示了按照本公开各种实施例的系统、方法或计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应 当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。还要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,即使这样的组合或结合没有明确记载于本公开中。特别的,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,所有这些组合和/或结合均落入本公开的范围。
尽管已经参照本公开的特定示例性实施例示出并描述了本公开,但是本领域技术人员应该理解,在不背离所附权利要求及其等同物限定的本公开的精神和范围的情况下,可以对本公开进行形式和细节上的多种改变。因此,本公开的范围不应该限于上述实施例,而是应该不仅由所附权利要求来进行确定,还由所附权利要求的等同物来进行限定。

Claims (10)

  1. 一种基于物模型的智慧网关适配系统,用于对智慧建设项目的各个业务子系统中的不同厂商的不同设计标准的设备进行适配,其特征在于,包括:数据库管理模块、物模型生成模块和适配器系统;
    所述物模型生成模块用于导入各个业务子系统的物模型配置模板,生成数据交换格式文件并导入数据库,生成各个业务子系统的物模型;
    所述数据库管理模块用于对各个业务子系统的物模型和设备数据进行存储和管理,构建数据库定义表,并为所述适配器系统提供数据定义以及部署数据的存储和管理;
    所述适配器系统用于根据物模型生成模块生成的各个业务子系统的物模型,设计相应的适配器的业务子系统的物模型结构体代码,将相同业务子系统的不同厂商的设备抽象成属性、服务和事件,同时配置适配器端和第三方应用平台系统端的设备标识映射关系模板,实现不同厂商的不同标准的设备的适配。
  2. 如权利要求1所述的智慧网关适配系统,其特征在于,所述物模型生成模块用于对各个业务子系统的物模型做模板配置,包括业务子系统物模型的配置、设备物模型的配置,业务子系统物模型的配置和设备物模型的配置中又包括属性、服务和事件的配置;
    用于导入所述物模型配置模板,生成各个业务子系统的物模型数据交换格式文件并导入所述数据库;
    还用于根据所述物模型配置模板和数据库中的物模型生成各个业务子系统的物模型结构体代码,为各个业务子系统的适配器提供业务服务接口调用,上报事件和属性定义。
  3. 如权利要求1所述的智慧网关适配系统,其特征在于,还包括适配器管理平台,所述适配器管理平台针对不能自动获取设备信息的适配器可以进行设备信息的导入,设备信息导入的配置项包括设备标识、网络地址、端口、厂商原始标识、厂商编码、业务子系统编码、分组编码、父设备标识、厂商、设备 序列号、设备位置、连接状态、设备描述和设备下所有属性信息中的一种或多种;设备信息的配置通过所述设备标识和接口网关模块的通信来实现各个业务子系统适配器和第三方应用平台通信,通过厂商原始标识实现所有厂商适配器与厂商设备或平台的通信。
  4. 如权利要求3所述的智慧网关适配系统,其特征在于,所述适配器管理平台还针对某些采用工控协议对接的业务子系统可以进行属性信息的导入,属性信息导入的配置项包括业务子系统编码、厂商编码、分组编码、设备标识、属性键、属性对象标识、数据类型、属性连接字符串和备注中的一种或多种;通过属性信息的配置可以实现各个适配器和厂商通过属性点位标识进行通信。
  5. 如权利要求1所述的智慧网关适配系统,其特征在于,还包括接口文档生成工具,所述接口文档生成工具根据所述物模型生成模块生成的各个业务子系统的物模型,生成各个业务子系统与所述第三方应用平台对接的接口文档;所述接口文档包括属性信息、服务信息和事件信息中的一种或多种。
  6. 如权利要求1所述的智慧网关适配系统,其特征在于,所述数据库定义表包括业务子系统编码定义表、厂商编码定义表、物模型表、灾备表、适配器运行表、适配器定义表、设备表、属性映射表和记录表中的一种或多种;所述业务子系统编码定义表、所述厂商编码定义表和所述物模型表都是为所述适配器系统提供业务子系统、厂商和设备定义信息以及属性、服务和事件定义信息;所述灾备表用于缓存设备异常信息;所述适配器运行表用于显示适配器的运行信息;所述适配器定义表用于显示不同厂商的适配器和动态库、接口类的对应关系;所述设备表用于显示厂商所有设备的关联信息;所述属性映射表用于显示某些工控协议对接厂商只对接属性点位信息的设备属性映射信息;所述记录表能够显示某些厂商有记录信息,防止记录重复以及为记录上报丢失的情况做存储。
  7. 如权利要求2所述的智慧网关适配系统,其特征在于,所述物模型配置模板包括各个业务子系统和设备的属性、服务和事件;所述服务为所述第三方应用平台通过所述接口网关模块调用所述适配器系统的服务接口;所述事件为 所述适配器系统上报厂商设备状态的变化,将告警和通知的信息传送给所述第三方应用平台。
  8. 如权利要求2所述的智慧网关适配系统,其特征在于,所述设备物模型包括属性、事件和服务的名称、标识键、数据类型、规格说明、是否可读可写、参数类型、所属键、所属名称和事件类型中的一种或多种;服务和事件中的结构体代码包括名称、标识键、数据类型和规格说明中的一种或多种。
  9. 如权利要求4所述的智慧网关适配系统,其特征在于,所述适配器管理平台还支持重启适配器,通过配置适配器守护策略,使得一旦某个适配器进程中断,将自动重启该适配器。
  10. 一种基于物模型的智慧网关适配系统的运行方法,其特征在于,包括步骤:
    配置业务子系统物模型;业务子系统物模型包括业务子系统的服务、事件和属性;业务子系统的服务指该业务子系统的业务服务接口,业务子系统的事件为包括业务子系统服务状态变更通知的通过接口网关模块上报给第三方应用平台的所有事件,业务子系统的属性指业务子系统的所有属性信息;
    配置设备物模型;设备物模型包括设备的服务、事件和属性;设备的服务指该设备的业务服务接口,设备的事件为包括设备告警、通知和属性的通过接口网关模块上报给第三方应用平台的所有事件,设备的属性指设备的所有属性信息;
    对数据库进行初始化,构建数据库定义表;
    导入各个业务子系统的物模型配置模板,生成物模型的数据交换格式文件并导入数据库,根据所述物模型配置模板和数据库中的物模型生成各个业务子系统的物模型结构体代码;
    各个业务子系统适配器通过所述物模型结构体代码生成独立的适配器主体流程代码;
    创建单个适配器,获取动态库,配置厂商信息;
    针对不能自动获取设备信息的厂商适配器,手动导入设备信息;针对工控 协议对接的业务子系统厂商,手动导入属性信息;然后,启动适配器;
    第三方应用平台通过接口网关模块调用适配器系统服务接口,实现下行业务处理;适配器上报属性、事件和通知,实现上行业务处理。
PCT/CN2022/134878 2022-06-20 2022-11-29 一种基于物模型的智慧网关适配系统及其运行方法 WO2023245985A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210697250.X 2022-06-20
CN202210697250.XA CN115150226B (zh) 2022-06-20 一种基于物模型的智慧网关适配系统及其运行方法

Publications (1)

Publication Number Publication Date
WO2023245985A1 true WO2023245985A1 (zh) 2023-12-28

Family

ID=83407765

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/134878 WO2023245985A1 (zh) 2022-06-20 2022-11-29 一种基于物模型的智慧网关适配系统及其运行方法

Country Status (1)

Country Link
WO (1) WO2023245985A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117596157A (zh) * 2024-01-18 2024-02-23 厦门立林科技有限公司 物模型的动态构成方法
CN118175045A (zh) * 2024-05-14 2024-06-11 杭州逸琨科技有限公司 物联网的物模型确定方法、装置及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3065138A1 (en) * 2017-05-30 2018-12-06 Dimitris Lyras Microprocessor including a model of an enterprise
CN112202874A (zh) * 2020-09-28 2021-01-08 武汉虹信技术服务有限责任公司 一种可扩展的物联网底层设备适配器及构建方法
CN112714193A (zh) * 2021-03-26 2021-04-27 深圳佳兆业科技集团有限公司 基于物联网平台的社区数据处理系统、方法、装置和设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3065138A1 (en) * 2017-05-30 2018-12-06 Dimitris Lyras Microprocessor including a model of an enterprise
CN112202874A (zh) * 2020-09-28 2021-01-08 武汉虹信技术服务有限责任公司 一种可扩展的物联网底层设备适配器及构建方法
CN112714193A (zh) * 2021-03-26 2021-04-27 深圳佳兆业科技集团有限公司 基于物联网平台的社区数据处理系统、方法、装置和设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117596157A (zh) * 2024-01-18 2024-02-23 厦门立林科技有限公司 物模型的动态构成方法
CN117596157B (zh) * 2024-01-18 2024-05-14 厦门立林科技有限公司 物模型的动态构成方法、设备和存储介质
CN118175045A (zh) * 2024-05-14 2024-06-11 杭州逸琨科技有限公司 物联网的物模型确定方法、装置及电子设备

Also Published As

Publication number Publication date
CN115150226A (zh) 2022-10-04

Similar Documents

Publication Publication Date Title
WO2023245985A1 (zh) 一种基于物模型的智慧网关适配系统及其运行方法
CN100388675C (zh) 一种网管系统中实现对前台数据配置的方法
CN101163036B (zh) 实现网络设备管理软件双机热备份的方法
CN111274052A (zh) 数据分发方法、服务器及计算机可读存储介质
CN101257406B (zh) 网元发现方法和系统
CN110719311B (zh) 分布式协调服务方法、系统及计算机可读存储介质
JP7161560B2 (ja) 人工知能開発プラットフォームの管理方法及び装置、媒体
KR20220049498A (ko) 상태 기계 처리, 상태 처리 방법, 장치, 전자 설비 및 저장 매체
CN101202670B (zh) 一种网络管理拓扑的处理方法及系统
CN114565502A (zh) Gpu资源管理方法、调度方法、装置、电子设备及存储介质
CN103051478A (zh) 一种大容量电信网管系统及其设置和应用方法
CN113658351A (zh) 一种产品生产的方法、装置、电子设备及存储介质
CN111064643B (zh) 一种节点服务器及其数据交互方法和相关装置
CN112804099A (zh) 参数批量配置方法、装置、计算机设备和可读存储介质
CN112052104A (zh) 基于多机房实现的消息队列的管理方法及电子设备
CN102904739A (zh) 一种实现事件转发的方法及通用信息模型cim服务器
CN115964436A (zh) 一种数据库集群管理的方法和装置
CN101651701A (zh) 一种实现服务器管理终端设备的方法、系统及设备
CN112069160B (zh) 一种基于cap数据清洗同步方法
CN115167971A (zh) 一种基于云平台的高可用MySQL部署方法及系统
CN115150226B (zh) 一种基于物模型的智慧网关适配系统及其运行方法
CN112711466A (zh) 悬挂事务巡检方法和装置、电子设备和存储介质
CN116594848B (zh) 一种任务监控方法、装置、设备、终端设备及存储介质
CN116561106B (zh) 一种配置项数据管理方法及系统
CN115913922A (zh) 域名配置方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22947720

Country of ref document: EP

Kind code of ref document: A1