Equipment management method, device and equipment based on multi-level object model mapping
Through the equipment management method based on multi-level object model mapping, the complex problem of object model management is solved, the reuse of attributes, services and transactions is realized, the reconstruction workload is reduced, and management efficiency is improved.
Patent Information
- Application Number
- CN202411619861.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, object model management is complex and it is difficult to reuse attributes, services and transactions, resulting in large reconstruction workload and high management difficulty.
Through the equipment management method based on multi-level object model mapping, the device object model of the corresponding type of slave devices is determined, the attribute list, device list and transaction reporting queue are established, and the creation and management of object models are realized.
Reduces reconstruction workload, simplifies material model management, improves management efficiency, and supports the reuse of attributes, services and transactions.
Smart Images

Figure CN119520562A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a device management method, apparatus and equipment based on multi-level object model mapping. Background Art
[0002] With the rise and development of the Industrial Internet of Things, it has become a requirement to digitally represent and manage the equipment entities used in industrial sites (such as various sensors, mechanical and electrical equipment, PLCs, IOT gateway factories, etc.) as object models in the cloud. At present, the common management method is to manage the object model through a json configuration file. Using this method to manage the object model, on the one hand, during the modeling process, the object model is separated from the device and the subordinate devices cannot be classified and managed. On the other hand, the use of configuration files will lead to illegality in processing device data, making such a design unintuitive for the management of the object model and subordinate model functions, and increasing the complexity of the object model, which makes the management of multi-level object models more complicated.
[0003] Therefore, how to provide a simple management method to promote the reuse of attributes, services, and transactions in the object model to reduce the reconstruction work has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] The present invention provides a device management method, apparatus and equipment based on multi-level physical model mapping, which are used to solve the defect of complex physical model management in the prior art.
[0005] In a first aspect, the present invention provides a device management method based on multi-level object model mapping, comprising:
[0006] Determine a device object model of a corresponding type of the slave device, wherein the device object model includes attributes, services, and transactions of the corresponding type of the slave device;
[0007] Establishing an attribute list of the slave device, selecting required attribute fields from the attributes of the device object model of the corresponding type of slave device and assigning update parameters according to the current scenario requirements and the slave hardware devices used;
[0008] Establish a device list of the slave device, list the function list required by the slave device according to the current scenario requirements, and select the service required to call to implement the corresponding function from the service of the device object model of the corresponding type of slave device according to the function list;
[0009] Establishing a transaction reporting queue for the slave device, listing information that the slave device needs to actively report according to current scenario requirements, and selecting corresponding transactions from the transactions of the device object model of the corresponding type of slave device for subscription according to the information list;
[0010] The creation of the object model is completed by establishing the attribute list, the device list and the transaction reporting queue;
[0011] The object model is managed through attributes, actions, transactions and objects.
[0012] According to a device management method based on multi-level object model mapping provided by the present invention, the device object model of the corresponding type of the subordinate device is determined, including:
[0013] Querying in the database whether a device object model of a subordinate device of the same type has been created;
[0014] If yes, then retrieve the device object model from the database;
[0015] If not, create a device object model of the corresponding type of slave device.
[0016] According to a device management method based on multi-level object model mapping provided by the present invention, the attribute management of the object model includes:
[0017] When new information and status appear in the slave device upgrade, the attributes of the existing object model are updated synchronously and correspondingly, including: defining the attribute name, setting the corresponding data type and verifying the compliance of the data type. When the compliance check of the data type passes, the corresponding existing object model is updated;
[0018] When there are useless attributes in the attributes of the existing object model, delete the device attributes and key values in the existing object model, and update the corresponding existing object model;
[0019] When any attribute value in the attributes of an existing object model needs to be updated, the device attributes and key values in the existing object model are modified, including resetting the corresponding data type and verifying the compliance of the data type. When the compliance check of the data type passes, the corresponding existing object model is updated.
[0020] According to a device management method based on multi-level object model mapping provided by the present invention, the action management of the object model includes:
[0021] When a new instruction or method is available for invocation during the upgrade of the slave device, the device list of the existing object model is updated synchronously, including defining the action method, setting the corresponding configuration items, and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated;
[0022] When there is an invalid device in the device list of an existing object model, deleting the corresponding service in the existing object model, and updating the corresponding existing object model;
[0023] When the configuration items of any service in the device list of an existing object model are adjusted, the corresponding service in the existing object model is modified, including resetting the corresponding configuration items and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated.
[0024] According to a device management method based on multi-level object model mapping provided by the present invention, the transaction management of the object model includes:
[0025] When new reportable status alarm information appears during the upgrade of the slave device, the transaction reporting queue of the existing object model is updated synchronously, including defining the transaction name, setting the corresponding configuration items, and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated;
[0026] When there are useless transactions in the transaction reporting queue of the existing object model, the corresponding transactions in the existing object model are deleted, and the corresponding existing object model is updated;
[0027] When the configuration item of any transaction in the transaction reporting queue of the existing object model is adjusted, the corresponding transaction in the existing object model is modified, including resetting the corresponding configuration item and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated.
[0028] According to a device management method based on multi-level physical model mapping provided by the present invention, the physical model management of the physical model includes:
[0029] When a physical model of the same type as the slave device is created again, the physical model of the slave device is copied, and the properties, services and transactions of the physical model are operated according to the specific needs of the slave device, and the operations include creation, deletion and modification.
[0030] According to a device management method based on multi-level object model mapping provided by the present invention, the attribute management, action management and transaction management of the object model include:
[0031] View all property information, service information, and transaction information included in the existing object model.
[0032] According to the present invention, a device management method based on multi-level object model mapping also includes:
[0033] The attributes, services and transactions in the object model are reused.
[0034] In a second aspect, the present invention further provides a device management apparatus based on multi-level object model mapping, comprising:
[0035] A determination module, used to determine a device object model of a corresponding type of the slave device, wherein the device object model includes attributes, services and transactions of the corresponding type of the slave device;
[0036] Establishing a module, used to establish an attribute list of the slave device, select the required attribute fields in the attributes of the device object model of the corresponding type of slave device according to the current scenario requirements and the slave hardware devices used, and assign update parameters; establish a device list of the slave device, list the function list required by the slave device according to the current scenario requirements, and select the service that needs to be called to implement the corresponding function from the service of the device object model of the corresponding type of slave device according to the function list; establish a transaction reporting queue of the slave device, list the information list that needs to be actively reported by the slave device according to the current scenario requirements, and select the corresponding transaction to subscribe from the transaction of the device object model of the corresponding type of slave device according to the information list; complete the creation of the object model by establishing the attribute list, the device list and the transaction reporting queue;
[0037] The management module is used to perform attribute management, action management, transaction management and object model management on the object model.
[0038] In a third aspect, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the device management method based on multi-level object model mapping as described above is implemented.
[0039] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a device management method based on multi-level object model mapping as described in any one of the above.
[0040] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described device management methods based on multi-level object model mapping.
[0041] The device management method, apparatus and equipment based on multi-level object model mapping provided by the present invention include: determining the device object model of the corresponding type of the subordinate device, the device object model includes the attributes, services and transactions of the corresponding type of subordinate device; establishing an attribute list of the subordinate device, selecting the required attribute fields in the attributes of the device object model of the corresponding type of subordinate device according to the current scene requirements and the subordinate hardware devices used, and assigning update parameters; establishing a device list of the subordinate device, listing the function list required by the subordinate device according to the current scene requirements, and selecting the service required to implement the corresponding function in the service of the device object model of the corresponding type of subordinate device according to the function list. services; establish a transaction reporting queue for slave devices, list the information that needs to be actively reported by the slave devices according to the current scenario requirements, and select the corresponding transaction in the transaction of the device object model of the corresponding type of slave device for subscription according to the information list; complete the creation of the object model by establishing an attribute list, a device list and a transaction reporting queue; perform attribute management, action management, transaction management and object model management on the object model. Since the attributes, services and transactions in the object model can be reused, the workload of reconstruction can be reduced, and the cloud only needs to focus on the functional services without paying attention to the device entity itself, which simplifies the management difficulty of the object model and improves the management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 is a flow chart of a device management method based on multi-level object model mapping provided in this embodiment;
[0044] Figure 2 is a structural diagram of a device management device based on multi-level object model mapping provided in this embodiment;
[0045] Figure 3 It is a schematic diagram of the structure of the electronic device provided in this embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Figure 1 It is a flowchart of the device management method based on multi-level object model mapping provided in this embodiment.
[0048] like Figure 1 As shown, the device management method based on multi-level object model mapping provided by the embodiment of the present invention is applicable to the object model management of the slave device by the edge device, and mainly includes the following steps:
[0049] 101. Determine a device object model of a corresponding type of a slave device, where the device object model includes attributes, services, and transactions of the corresponding type of slave device.
[0050] In a specific implementation process, it is necessary to first create a physical model of a specific device. Specifically, a corresponding physical model is created for the newly added slave device in the edge device. The premise of creating a physical model is to first create a device physical model, that is, to query in the database whether a device physical model of the same type of slave device has been created; if it has been created, the corresponding device physical model is retrieved from the database; if it has not been created, a device physical model of the corresponding type of slave device is created. The device physical model includes the attributes, services, and transactions of the corresponding type of slave device.
[0051] The attributes of the object model are used to describe the status or configuration information of the device. Attributes can be read-write or read-only, and are used to reflect the real-time status or configuration parameters of the device. For example, the current ambient temperature of an environmental monitoring device, the switch status of a smart light, etc.
[0052] Transactions in the physical model are information that devices actively report to the cloud under specific conditions, usually including information, alarms, and faults that need to be sensed and processed externally. Transactions can be subscribed and pushed to notify cloud devices of certain specific transactions, such as task completion and device failure.
[0053] Services in the object model define the instructions or methods that devices can call externally, including synchronous and asynchronous calling methods. Services allow the cloud to send instructions to devices to perform specific operations, such as turning devices on / off, adjusting device parameters, etc. Services implement complex business logic by setting input and output parameters. Compared with properties, services can complete more complex tasks with one instruction.
[0054] The object model realizes the comprehensive mapping of physical devices in the digital world through the three dimensions of attributes, transactions, and services, simplifies the device access and development process, and supports remote monitoring, control, and intelligent management of devices.
[0055] 102. Establish an attribute list of the slave device, select the required attribute fields in the attributes of the device object model of the corresponding type of slave device and assign values to update parameters according to the current scenario requirements and the slave hardware devices used.
[0056] The attribute list is an important part of device management and control, covering various characteristics and status information of the device. It usually includes the device's identification information, configuration parameters, operating status, etc., which is crucial for realizing remote monitoring, control and data analysis of the device. It mainly includes device ID, service data, transaction time, working status, location information and configuration parameters.
[0057] The establishment of the attribute list mainly involves first determining the current scenario requirements and subordinate hardware devices, and then selecting the corresponding attribute fields in the attributes of the device object model based on the specific method of the scenario requirements and the specific parameters of the subordinate hardware devices, and assigning corresponding contents to complete the establishment of the attribute list.
[0058] 103. Establish a device list of slave devices, list the functions required by the slave devices according to the current scenario requirements, and select the services that need to be called to implement the corresponding functions from the services of the device object model of the corresponding type of slave device according to the function list.
[0059] As the application layer of IoT technology, IoT services are designed to help users better understand and utilize the data generated by IoT devices to achieve a more efficient and smarter way of living and working. The device list mainly includes: data analysis, data visualization, positioning services and security services.
[0060] The list of functions includes device access management, data storage and processing, device status management, information security, etc. The Internet of Things is a network of interconnected smart devices, sensors and other physical objects that can collect and exchange data to achieve intelligent management and operation.
[0061] After determining the function list, you can select the service that needs to be called to implement the corresponding function from the service of the device object model of the subordinate device, thereby completing the creation of the device list.
[0062] 104. Establish a transaction reporting queue for the slave device, list the information that the slave device needs to actively report according to the current scenario requirements, and select the corresponding transaction in the transaction of the device object model of the corresponding type of slave device for subscription according to the information list.
[0063] A transaction is a communication method between tasks. Different from semaphores and mutexes, a transaction allows a task to wait for multiple transactions to occur at the same time, or a task waiting for the same transaction to be unblocked when the transaction occurs. A transaction group is a 32-bit number, each bit corresponds to a transaction flag, and the transaction flag has only two states. This mechanism enables IoT devices to communicate and coordinate more efficiently, especially when multiple devices or components need to work together.
[0064] Similarly, the transaction reporting queue also needs to determine the list of information to be actively reported based on the scenario requirements, and then select the corresponding transaction in the transaction of the corresponding device object model for subscription based on the determined information list, thereby completing the establishment of the transaction reporting queue.
[0065] It should be noted that the establishment of the attribute list, the device list and the transaction reporting queue does not distinguish a specific order.
[0066] 105. Complete the creation of the object model by establishing a property list, a device list, and a transaction reporting queue.
[0067] After completing the establishment of the attribute list, device list and transaction reporting queue, the physical model of the newly added slave device is created, so that the physical model of the slave device can be managed through the edge device.
[0068] 106. Perform attribute management, action management, transaction management and object model management on the object model.
[0069] Attribute management, action management, transaction management and physical model management are performed on the physical model to improve the management efficiency of the device model and the flexibility of the system.
[0070] Object model attribute management involves operations such as adding, deleting, modifying, and querying attributes defined in the device model. These attributes are usually used to describe static information of the device (such as device model), dynamic data (such as real-time collected data), and calculation parameters (such as values calculated by services). The main operations include:
[0071] Create properties: On the object model property list page, click the Add button to add new properties and set the corresponding data type, default value, unit and other parameters.
[0072] Edit properties: Select a created property and edit it to modify its parameter settings.
[0073] Deleting properties: When a property is no longer needed, it can be deleted from the object model.
[0074] Attribute grouping: For easier management, you can group attributes by physical location or functional type, create attribute groups, and assign attributes.
[0075] Object model action management focuses on the services that the device model can provide and its management. This includes data reporting, command issuance, status query, etc. The main operations include:
[0076] Service definition: Define the service interface in the object model, including the service name, input parameters, output parameters, etc.
[0077] Service implementation: Implement these service interfaces on the device side to ensure that the device can respond to service requests and return corresponding results.
[0078] Service call: Call the services in the object model through the IoT platform or application to achieve remote control and data interaction of devices.
[0079] Service monitoring: Monitor the service call process to ensure the stability and reliability of the service.
[0080] The physical model transaction management is used to handle transactions generated during device operation, such as task completion, fault alarm, etc. Transactions can be subscribed and pushed to respond to device status changes in a timely manner. The main operations include:
[0081] Transaction definition: Define the transaction type, transaction name, transaction identifier, and output parameters in the object model.
[0082] Transaction triggering: When the device meets specific conditions (such as excessive temperature, abnormal negative pressure, etc.), the corresponding transaction is automatically triggered.
[0083] Transaction subscription: Subscribe to a device's transactions through the IoT platform to receive notifications when transactions occur.
[0084] Transaction push: When a transaction is triggered, the IoT platform pushes the transaction information to subscribers for timely processing.
[0085] Object model management is the management of the entire object model life cycle, including the creation, editing, deletion and version control of object models. The main operations include:
[0086] Create a thing model: Create a new thing model in the IoT platform to define the properties, services, and transactions of the device.
[0087] Edit object model: modify the existing object model, such as adding new attributes, services or transactions, modifying the parameter settings of existing attributes, services or transactions, etc.
[0088] Deleting a thing model: When a thing model is no longer needed, it can be deleted from the IoT platform.
[0089] The device management method based on multi-level object model mapping in this embodiment can reduce the workload of reconstruction because the attributes, services and transactions in the object model can be reused. The cloud only needs to provide functional services and does not need to pay attention to the device entity itself, making the management of the object model simpler and more direct.
[0090] Further, on the basis of the above-mentioned embodiment, the property management of the object model in this embodiment includes: when new information and status appear in the upgrade of the subordinate device, the properties of the existing object model are synchronously updated, including: defining the property name, setting the corresponding data type and verifying the compliance of the data type. When the compliance check of the data type passes, the corresponding existing object model is updated; when there are useless properties in the properties of the existing object model, the device properties and key values in the existing object model are deleted, and the corresponding existing object model is updated; when any property value in the properties of the existing object model needs to be updated, the device properties and key values in the existing object model are modified, including resetting the corresponding data type and verifying the compliance of the data type. When the compliance check of the data type passes, the corresponding existing object model is updated. It also includes checking the specific information of all properties included in the existing object model.
[0091] Specifically, attribute management can accurately collect and monitor data, ensure good security, accurately troubleshoot and maintain, and provide scalability and interoperability to better optimize resource allocation. Attribute management provides comprehensive management and control of devices, ensures data security and device reliability, optimizes resource allocation, and thus improves the overall performance and user experience of the IoT system.
[0092] Furthermore, the action management of the object model in this embodiment includes: when a new instruction or method is available for call during the upgrade of the subordinate device, the device list of the existing object model is updated synchronously, including defining the action method, setting the corresponding configuration item and verifying the compliance of the parameter. When the compliance check of the parameter is passed, the corresponding existing object model is updated; when there is an invalid device in the device list of the existing object model, the corresponding service in the existing object model is deleted, and the corresponding existing object model is updated; when the configuration item of any service in the device list of the existing object model is adjusted, the corresponding service in the existing object model is modified, including resetting the corresponding configuration item and verifying the compliance of the parameter. When the compliance check of the parameter is passed, the corresponding existing object model is updated. It also includes viewing the specific information of all services included in the existing object model.
[0093] Specifically, the updating of the object model is better realized through action management, which ensures that when there is a parameter update in the device list, the corresponding service can be adjusted in time, thereby ensuring the timeliness and accuracy of the service.
[0094] Furthermore, the transaction management of the physical model in this embodiment includes: when a new reportable status alarm information appears during the upgrade of the subordinate device, the transaction reporting queue of the existing physical model is updated synchronously, including defining the transaction name, setting the corresponding configuration items, and verifying the compliance of the parameters. When the compliance check of the parameters is passed, the corresponding existing physical model is updated; when there are useless transactions in the transaction reporting queue of the existing physical model, the corresponding transactions in the existing physical model are deleted, and the corresponding existing physical model is updated; when the configuration items of any transaction in the transaction reporting queue of the existing physical model are adjusted, the corresponding transaction in the existing physical model is modified, including resetting the corresponding configuration items and verifying the compliance of the parameters. When the compliance check of the parameters is passed, the corresponding existing physical model is updated. It also includes viewing the specific information of all transactions included in the existing physical model.
[0095] Specifically, transaction management can ensure the accuracy of the physical model. When updates or other transactions occur, corresponding operations can be completed in a timely manner through transaction management, which can ensure the accuracy of subsequent management through the physical model.
[0096] Furthermore, the physical model management of the physical model in this embodiment includes: when creating a physical model of the same type as the slave device again, copying the physical model of the slave device, and operating the attributes, services and transactions of the physical model according to the specific needs of the slave device, and the operations include creation, deletion and modification.
[0097] Specifically, through attribute management, action management and transaction management, the deletion, modification and sealing of the object model can be better realized, ensuring the timeliness and accuracy of the object model.
[0098] Based on the same general inventive concept, the present invention also protects an equipment management device based on multi-level object model mapping. The equipment management device based on multi-level object model mapping provided by the present invention is described below. The equipment management device based on multi-level object model mapping described below and the equipment management method based on multi-level object model mapping described above can be referenced to each other.
[0099] Figure 2 It is a structural diagram of the equipment management device based on multi-level object model mapping provided in this embodiment.
[0100] like Figure 2 As shown, this embodiment provides a device management apparatus based on multi-level object model mapping, including:
[0101] A determination module 201 is used to determine a device object model of a corresponding type of a slave device, wherein the device object model includes attributes, services and transactions of a corresponding type of slave device;
[0102] Establishing module 202, used to establish an attribute list of slave devices, select the required attribute fields in the attributes of the device object model of the corresponding type of slave devices according to the current scenario requirements and the slave hardware devices used, and assign update parameters; establish a device list of slave devices, list the function list required by the slave devices according to the current scenario requirements, and select the service that needs to be called to implement the corresponding function in the service of the device object model of the corresponding type of slave devices according to the function list; establish a transaction reporting queue of the slave devices, list the information list that needs to be actively reported by the slave devices according to the current scenario requirements, and select the corresponding transaction in the transaction of the device object model of the corresponding type of slave devices according to the information list to subscribe; by establishing the attribute list, the device list and the transaction reporting queue, the creation of the object model is completed;
[0103] The management module 203 is used to perform attribute management, action management, transaction management and object model management on the object model.
[0104] Furthermore, the determination module in this embodiment is specifically used for:
[0105] Querying in the database whether a device object model of a subordinate device of the same type has been created;
[0106] If yes, then retrieve the device object model from the database;
[0107] If not, create a device object model of the corresponding type of slave device.
[0108] Furthermore, the management module 203 in this embodiment is specifically used for:
[0109] When new information and status appear in the slave device upgrade, the attributes of the existing object model are updated synchronously and correspondingly, including: defining the attribute name, setting the corresponding data type and verifying the compliance of the data type. When the compliance check of the data type passes, the corresponding existing object model is updated;
[0110] When there are useless attributes in the attributes of the existing object model, delete the device attributes and key values in the existing object model, and update the corresponding existing object model;
[0111] When any attribute value in the attributes of an existing object model needs to be updated, the device attributes and key values in the existing object model are modified, including resetting the corresponding data type and verifying the compliance of the data type. When the compliance check of the data type passes, the corresponding existing object model is updated.
[0112] Furthermore, the management module 203 in this embodiment is specifically used for:
[0113] When a new instruction or method is available for invocation during the upgrade of the slave device, the device list of the existing object model is updated synchronously, including defining the action method, setting the corresponding configuration items, and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated;
[0114] When there is an invalid device in the device list of an existing object model, deleting the corresponding service in the existing object model, and updating the corresponding existing object model;
[0115] When the configuration items of any service in the device list of an existing object model are adjusted, the corresponding service in the existing object model is modified, including resetting the corresponding configuration items and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated.
[0116] Furthermore, the management module 203 in this embodiment is specifically used for:
[0117] When new reportable status alarm information appears during the upgrade of the slave device, the transaction reporting queue of the existing object model is updated synchronously, including defining the transaction name, setting the corresponding configuration items, and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated;
[0118] When there are useless transactions in the transaction reporting queue of the existing object model, the corresponding transactions in the existing object model are deleted, and the corresponding existing object model is updated;
[0119] When the configuration item of any transaction in the transaction reporting queue of the existing object model is adjusted, the corresponding transaction in the existing object model is modified, including resetting the corresponding configuration item and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated.
[0120] Furthermore, the management module 203 in this embodiment is specifically used for:
[0121] When a physical model of the same type as the slave device is created again, the physical model of the slave device is copied, and the properties, services and transactions of the physical model are operated according to the specific needs of the slave device, and the operations include creation, deletion and modification.
[0122] Furthermore, the management module 203 in this embodiment is specifically used for:
[0123] View all property information, service information, and transaction information included in the existing object model.
[0124] Figure 3 It is a schematic diagram of the structure of the electronic device provided in this embodiment.
[0125] like Figure 3 As shown, the electronic device may include: a processor (processor) 310, a communication interface (Communications Interface) 320, a memory (memory) 330 and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call the logic instructions in the memory 330 to execute the device management method based on multi-level object model mapping, the method comprising: determining a device object model of a corresponding type of a slave device, the device object model comprising attributes, services and transactions of a corresponding type of slave device; establishing an attribute list of the slave device, selecting required attribute fields in the attributes of the device object model of the corresponding type of slave device according to current scenario requirements and the slave hardware device in use and assigning update parameters; establishing a device list of the slave device, listing a function list required by the slave device according to current scenario requirements, and selecting a service required to implement a corresponding function in the service of the device object model of the corresponding type of slave device according to the function list; establishing a transaction reporting queue of the slave device, listing an information list that needs to be actively reported by the slave device according to current scenario requirements, and selecting a corresponding transaction in the transaction of the device object model of the corresponding type of slave device for subscription according to the information list; completing the creation of the object model by establishing the attribute list, the device list and the transaction reporting queue; performing attribute management, action management, transaction management and object model management on the object model.
[0126] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0127] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the device management method based on multi-level object model mapping provided by the above methods, the method comprising: determining a device object model of a corresponding type of a slave device, the device object model including attributes, services and transactions of the corresponding type of slave device; establishing an attribute list of the slave device, selecting required attribute fields from the attributes of the device object model of the corresponding type of slave device and assigning update parameters according to current scenario requirements and the slave hardware devices used; establishing the slave device object model. A device list of subordinate devices is established, and a function list required by the subordinate devices is listed according to the current scenario requirements. According to the function list, the service required to implement the corresponding function is selected from the services of the device object model of the corresponding type of subordinate devices; a transaction reporting queue of the subordinate devices is established, and a list of information that needs to be actively reported by the subordinate devices is listed according to the current scenario requirements. According to the information list, the corresponding transaction is selected to be subscribed from the transactions of the device object model of the corresponding type of subordinate devices; the object model is created by establishing the attribute list, the device list and the transaction reporting queue; and the object model is managed in terms of attributes, actions, transactions and objects.
[0128] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the device management method based on multi-level object model mapping provided by the above-mentioned methods, the method comprising: determining a device object model of a corresponding type of a slave device, the device object model comprising attributes, services and transactions of a corresponding type of slave device; establishing an attribute list of the slave device, selecting required attribute fields from the attributes of the device object model of the corresponding type of slave device and assigning update parameters according to current scenario requirements and the slave hardware devices used; establishing a device list of the slave device, Scenario requirements, list the functions required by the slave device, and according to the function list, select the service that needs to be called to implement the corresponding function from the services of the device object model of the corresponding type of slave device; establish a transaction reporting queue for the slave device, and according to the current scenario requirements, list the information list that the slave device needs to actively report, and according to the information list, select the corresponding transaction to subscribe to in the transactions of the device object model of the corresponding type of slave device; complete the creation of the object model by establishing the attribute list, the device list and the transaction reporting queue; perform attribute management, action management, transaction management and object model management on the object model.
[0129] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0130] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A device management method based on multi-level object model mapping, characterized in that: include: Determine a device object model of a corresponding type of the slave device, wherein the device object model includes attributes, services, and transactions of the corresponding type of the slave device; Establishing an attribute list of the slave device, selecting required attribute fields from the attributes of the device object model of the corresponding type of slave device and assigning update parameters according to the current scenario requirements and the slave hardware devices used; Establish a device list of the slave device, list the function list required by the slave device according to the current scenario requirements, and select the service required to call to implement the corresponding function from the service of the device object model of the corresponding type of slave device according to the function list; Establishing a transaction reporting queue for the slave device, listing information that the slave device needs to actively report according to current scenario requirements, and selecting corresponding transactions from the transactions of the device object model of the corresponding type of slave device for subscription according to the information list; The creation of the object model is completed by establishing the attribute list, the device list and the transaction reporting queue; The object model is managed through attributes, actions, transactions and objects.
2. The device management method based on multi-level object model mapping according to claim 1 is characterized in that: The determining of the device object model corresponding to the type of the slave device includes: Querying in the database whether a device object model of a subordinate device of the same type has been created; If yes, then retrieve the device object model from the database; If not, create a device object model of the corresponding type of slave device.
3. The device management method based on multi-level object model mapping according to claim 1 is characterized in that: The performing attribute management on the object model includes: When new information and status appear in the slave device upgrade, the attributes of the existing object model are updated synchronously and correspondingly, including: defining the attribute name, setting the corresponding data type and verifying the compliance of the data type. When the compliance check of the data type passes, the corresponding existing object model is updated; When there are useless attributes in the attributes of the existing object model, delete the device attributes and key values in the existing object model, and update the corresponding existing object model; When any attribute value in the attributes of an existing object model needs to be updated, the device attributes and key values in the existing object model are modified, including resetting the corresponding data type and verifying the compliance of the data type. When the compliance check of the data type passes, the corresponding existing object model is updated.
4. The device management method based on multi-level object model mapping according to claim 1 is characterized in that: The performing action management on the object model includes: When a new instruction or method is available for invocation during the upgrade of the slave device, the device list of the existing object model is updated synchronously, including defining the action method, setting the corresponding configuration items, and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated; When there is an invalid device in the device list of an existing object model, deleting the corresponding service in the existing object model, and updating the corresponding existing object model; When the configuration items of any service in the device list of an existing object model are adjusted, the corresponding service in the existing object model is modified, including resetting the corresponding configuration items and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated.
5. The device management method based on multi-level object model mapping according to claim 1 is characterized in that: The performing transaction management on the object model includes: When new reportable status alarm information appears during the upgrade of the slave device, the transaction reporting queue of the existing object model is updated synchronously, including defining the transaction name, setting the corresponding configuration items, and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated; When there are useless transactions in the transaction reporting queue of the existing object model, the corresponding transactions in the existing object model are deleted, and the corresponding existing object model is updated; When the configuration item of any transaction in the transaction reporting queue of the existing object model is adjusted, the corresponding transaction in the existing object model is modified, including resetting the corresponding configuration item and verifying the compliance of the parameters. When the compliance check of the parameters passes, the corresponding existing object model is updated.
6. The device management method based on multi-level object model mapping according to claim 1 is characterized in that: The performing physical model management on the physical model includes: When a physical model of the same type as the slave device is created again, the physical model of the slave device is copied, and the properties, services and transactions of the physical model are operated according to the specific needs of the slave device, and the operations include creation, deletion and modification.
7. The device management method based on multi-level object model mapping according to any one of claims 1 to 6, characterized in that: The performing of attribute management, action management and transaction management on the object model includes: View all property information, service information, and transaction information included in the existing object model.
8. The device management method based on multi-level object model mapping according to any one of claims 1 to 6, characterized in that: Also includes: The attributes, services and transactions in the object model are reused.
9. A device management device based on multi-level object model mapping, characterized in that: include: A determination module, used to determine a device object model of a corresponding type of the slave device, wherein the device object model includes attributes, services and transactions of the corresponding type of the slave device; An establishment module, used to establish an attribute list of the slave device, select required attribute fields from the attributes of the device object model of the corresponding type of slave device and assign values to update parameters according to current scene requirements and the slave hardware devices used; Establish a device list of the slave device, list the function list required by the slave device according to the current scenario requirements, and select the service required to call to implement the corresponding function from the service of the device object model of the corresponding type of slave device according to the function list; Establishing a transaction reporting queue for the slave device, listing information that the slave device needs to actively report according to current scenario requirements, and selecting corresponding transactions from the transactions of the device object model of the corresponding type of slave device for subscription according to the information list; The creation of the object model is completed by establishing the attribute list, the device list and the transaction reporting queue; The management module is used to perform attribute management, action management, transaction management and object model management on the object model.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the device management method based on multi-level object model mapping as described in any one of claims 1 to 8 is implemented.