CN116319855A - Method, device, computer equipment and storage medium for constructing object model - Google Patents
Method, device, computer equipment and storage medium for constructing object model Download PDFInfo
- Publication number
- CN116319855A CN116319855A CN202310080707.7A CN202310080707A CN116319855A CN 116319855 A CN116319855 A CN 116319855A CN 202310080707 A CN202310080707 A CN 202310080707A CN 116319855 A CN116319855 A CN 116319855A
- Authority
- CN
- China
- Prior art keywords
- equipment
- library
- events
- object model
- internet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000004590 computer program Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 8
- 238000013480 data collection Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y30/00—IoT infrastructure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method, a device, computer equipment and a storage medium for constructing a model of a thing. Acquiring attribute information of equipment, wherein the attribute information comprises state information of the equipment; establishing an attribute library, a service library and an event library according to the attribute information; selecting attributes in an attribute library, services in a service library and events in an event library, and creating a thing model according to the attributes, the services and the events; the object model is stored in a database; and acquiring the equipment ID, and acquiring a corresponding object model according to the equipment ID. According to the method, the object model is built on the Internet of things platform, the object model of the internet of things platform can be built according to the correspondence of different devices, the reported attributes of the different devices can be flexibly compared, analyzed and stored, and different instructions and events can be flexibly issued to the different devices.
Description
Technical Field
The present invention relates to the technical field of object models, and in particular, to a method, an apparatus, a computer device, and a storage medium for constructing an object model.
Background
With the exponential increase of the connection quantity of the internet of things terminal and the internet of things, the operation and maintenance management pressure and workload of the internet of things terminal equipment can be increased unprecedentedly, so that the development of related business systems and internet of things business is restricted. More and more object model management devices are used at present, an object model comprises attributes, events, services and the like, when data reported by the devices are collected, the data are required to be collected according to the attributes, different devices have different attributes, and certain difficulty is brought to data collection.
Disclosure of Invention
The invention aims to solve the technical problem that the data collection of equipment corresponding to an object model in the prior art is difficult. To this end, the invention proposes a method, a device, a computer apparatus and a storage medium for constructing a model of a thing.
The technical scheme provided by the invention is as follows: a method of constructing a model of a construct, comprising:
acquiring attribute information of equipment, wherein the attribute information comprises state information of the equipment;
establishing an attribute library, a service library and an event library according to the attribute information;
selecting attributes in an attribute library, services in a service library and events in an event library, and creating a thing model according to the attributes, the services and the events; the object model is stored in a database;
and acquiring the equipment ID, and acquiring a corresponding object model according to the equipment ID.
Further, the attribute library comprises standard attributes and custom attributes, the service library comprises standard services and custom services, and the event library comprises standard events and custom events.
Further, a corresponding object model is acquired according to the device I D, specifically: the device sends a message to the internet of things platform through the registration component, after the internet of things platform receives registration information of the device, the device I D is searched in the server, and an object model corresponding to the device I D is obtained in the database.
Further, the method comprises the steps of: attributes, services and events in the object model are also used to send to the front-end presentation.
The technical scheme II provided by the invention is as follows: an apparatus for constructing a model of a construct, comprising: the system comprises a data processing module, an Internet of things platform and a database, wherein the Internet of things platform is connected with external equipment and used for acquiring attribute information of the equipment, the data processing module analyzes and processes the attribute information into data in a database storage format, and the Internet of things platform is used for constructing an object model.
Further, the system also comprises an MQTT instant messaging protocol, and the external equipment and the Internet of things platform are communicated through the MQTT instant messaging protocol.
The technical scheme III provided by the invention is as follows: a computer device comprising a memory and a processor coupled to the memory; the memory is used for storing a computer program; the processor is configured to run a computer program stored in the memory to perform the steps of any of the methods described above.
The technical scheme provided by the invention is as follows: a computer readable storage medium storing a computer program which, when executed by a processor, performs the steps of any of the methods described above on a computer device.
The beneficial effects of the invention are as follows:
the invention discloses a method, a device, computer equipment and a storage medium for constructing a model of a thing. Acquiring attribute information of equipment, wherein the attribute information comprises state information of the equipment; establishing an attribute library, a service library and an event library according to the attribute information; selecting attributes in an attribute library, services in a service library and events in an event library, and creating a thing model according to the attributes, the services and the events; the object model is stored in a database; the acquiring device I D acquires the corresponding object model according to the device I D. According to the method, the object model is built on the Internet of things platform, the object model of the internet of things platform can be built according to the correspondence of different devices, the reported attributes of the different devices can be flexibly compared, analyzed and stored, and different instructions and events can be flexibly issued to the different devices.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of a method of modeling a construct of the present invention;
FIG. 2 is a schematic diagram of the invention for acquiring a corresponding object model according to the apparatus I D;
FIG. 3 is a flow chart of a method of modeling a construct of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described by means of implementation examples with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
An embodiment of the invention discloses a method of constructing a model of a construct, referring to fig. 3, comprising:
acquiring attribute information of equipment, wherein the attribute information comprises state information of the equipment;
establishing an attribute library, a service library and an event library according to the attribute information;
selecting attributes in an attribute library, services in a service library and events in an event library, and creating a thing model according to the attributes, the services and the events; the object model is stored in a database;
the acquiring device I D acquires the corresponding object model according to the device I D.
And reporting different attributes according to different devices, further adding different attributes on the attribute page, and operating the service and the event.
The new additions to the attributes, services, events are correspondingly stored in the database. Different devices have the same attribute, so multiplexing can be realized, and the management of data is convenient.
For events, different devices may configure corresponding different events, so that the correspondingly configured events may be triggered by building an object model.
For services, different devices may be configured as well for different services.
Referring to fig. 1, when a user creates a product, a building model can be performed, attributes, services and events required by the corresponding product are checked, the computer creates the building model and then sends the building model to an internet of things platform, and when the product is stored, a back-end server can splice and store the attributes, services and events input, report data to subsequent equipment, issue instructions to the equipment and trigger corresponding different events, so that the building model has a rapid and convenient effect.
Further, the attribute library comprises standard attributes and custom attributes, the service library comprises standard services and custom services, and the event library comprises standard events and custom events. The standard attribute, the standard service and the standard event are created by an administrator, correspond to some common attributes, services and events, are created by a user in a self-defining way, correspond to the specific functions of part of equipment, and are convenient to perform unified management by setting two modes, namely standard and self-defining, so that the repeated storage of the attributes, the services and the events is avoided, and the efficiency is improved.
Further, referring to fig. 2, a corresponding object model is acquired according to the device I D, specifically: the equipment sends a message to an internet of things platform at regular time through a registration component EMQX (large-scale distributed internet of things message server), the internet of things platform forwards a back-end consumption MQTT (instant messaging protocol) message to a Kafka (real-time data processing system) queue through an MQTT subscription mode, the message is analyzed through the consumption Kafka (real-time data processing system) message to obtain corresponding equipment I D, a stored object model prof i e is obtained according to I D, analysis of corresponding data is carried out, finally the analyzed data is stored in a E l ast i cSearch (search server) library, and data in Red i s (open-source key value pair database server) are updated in time to serve as equipment shadow and provided for front-end calling display. In this way, the front end can see the device shadow and history data of the device. And the back end responds to the configured event according to the scene. Before a user issues an instruction to the device, the back end can carry out a matching object model on data sent by the user, then the data are assembled into a format corresponding to the data received by the device, the format is sent to the device through an MQTT (instant messaging protocol), and the device responds after receiving the corresponding data. In the whole process, the object model serves as a pivot of the equipment and the platform, so that convenience of the equipment for reporting data to the platform and simplicity of issuing instructions to the equipment are realized.
The technical scheme II provided by the invention is as follows: an apparatus for constructing a model of a construct, comprising: the system comprises a data processing module, an Internet of things platform and a database, wherein the Internet of things platform is connected with external equipment and used for acquiring attribute information of the equipment, the data processing module analyzes and processes the attribute information into data in a database storage format, and the Internet of things platform is used for constructing an object model.
The technical scheme III provided by the invention is as follows: a computer device comprising a memory and a processor coupled to the memory; the memory is used for storing a computer program; the processor is configured to run a computer program stored in the memory to perform the steps of any of the methods described above.
The technical scheme provided by the invention is as follows: a computer readable storage medium storing a computer program which, when executed by a processor, performs the steps of any of the methods described above on a computer device.
In the description of the present invention, the meaning of a number is one or more, the meaning of a number is two or more, and greater than, less than, exceeding, etc. are understood to exclude the present number, and the meaning of a number is understood to include the present number. The description of the first and second is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless explicitly defined otherwise, terms such as arrangement and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meaning of the terms in the present invention in combination with the specific contents of the technical scheme.
In the description of the present invention, a description of the terms "one embodiment," "some embodiments," "an exemplary embodiment," "an example," "a particular example," or "some examples," etc., means that a particular feature or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
Claims (8)
1. A method of constructing a model of a construct, comprising:
acquiring attribute information of equipment, wherein the attribute information comprises state information of the equipment;
establishing an attribute library, a service library and an event library according to the attribute information;
selecting attributes in an attribute library, services in a service library and events in an event library, and creating a thing model according to the attributes, the services and the events; the object model is stored in a database;
and acquiring the equipment ID, and acquiring a corresponding object model according to the equipment ID.
2. A method of constructing a model according to claim 1, wherein: the attribute library comprises standard attributes and custom attributes, the service library comprises standard services and custom services, and the event library comprises standard events and custom events.
3. A method of constructing a model according to claim 1, wherein the obtaining the corresponding model according to the device ID is specifically: the equipment sends a message to the internet of things platform through the registration component, and after receiving registration information of the equipment, the internet of things platform searches the equipment ID in the server and acquires an object model corresponding to the equipment ID in the database.
4. A method of constructing a model according to claim 1, wherein: the attributes, services and events in the object model are also used to send to the front-end presentation.
5. An apparatus for constructing a model of a structure, comprising: the system comprises a data processing module, an Internet of things platform and a database, wherein the Internet of things platform is connected with external equipment and used for acquiring attribute information of the equipment, the data processing module analyzes and processes the attribute information into data in a database storage format, and the Internet of things platform is used for constructing an object model.
6. The apparatus of claim 5, wherein the means for constructing a model comprises: the system also comprises an MQTT instant messaging protocol, and the external equipment and the Internet of things platform are communicated through the MQTT instant messaging protocol.
7. A computer device comprising a memory and a processor coupled to the memory; the memory is used for storing a computer program; the processor is configured to execute a computer program stored in the memory to perform the steps of the method according to any one of claims 1-4.
8. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1-4 on a computer device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310080707.7A CN116319855A (en) | 2023-02-03 | 2023-02-03 | Method, device, computer equipment and storage medium for constructing object model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310080707.7A CN116319855A (en) | 2023-02-03 | 2023-02-03 | Method, device, computer equipment and storage medium for constructing object model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116319855A true CN116319855A (en) | 2023-06-23 |
Family
ID=86819453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310080707.7A Pending CN116319855A (en) | 2023-02-03 | 2023-02-03 | Method, device, computer equipment and storage medium for constructing object model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116319855A (en) |
-
2023
- 2023-02-03 CN CN202310080707.7A patent/CN116319855A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106647586B (en) | A kind of virtual computer room visual control management system and method based on B/S framework | |
CN109408337B (en) | Interface operation and maintenance method and device | |
WO2021169268A1 (en) | Data processing method, apparatus and device, and storage medium | |
CN108170832B (en) | Monitoring system and monitoring method for heterogeneous database of industrial big data | |
CN112615743A (en) | Topological graph drawing method and device | |
CN110620699B (en) | Message arrival rate determination method, device, equipment and computer readable storage medium | |
CN110874272A (en) | Resource allocation method and device, computer readable storage medium and electronic device | |
CN112491617B (en) | Link tracking method, device, electronic equipment and medium | |
CN114090366A (en) | Method, device and system for monitoring data | |
CN109426597B (en) | Application performance monitoring method, device, equipment, system and storage medium | |
CN112052134A (en) | Service data monitoring method and device | |
CN113590437B (en) | Alarm information processing method, device, equipment and medium | |
CN116319855A (en) | Method, device, computer equipment and storage medium for constructing object model | |
CN114756301B (en) | Log processing method, device and system | |
CN110633191A (en) | Method and system for monitoring service health degree of software system in real time | |
CN116049285A (en) | Real-time index calculation method, system, equipment and medium based on stream data | |
CN116260702A (en) | Method, device, computer equipment and storage medium for data monitoring | |
CN115277355A (en) | Method, device, equipment and medium for processing state code data of monitoring system | |
CN112422314B (en) | Method and system for collecting and reporting alarm performance data | |
CN110300371B (en) | Computer equipment management method based on Internet of things equipment behaviors | |
CN112817938A (en) | General data service construction method and system based on data productization | |
CN106375116B (en) | Network element equipment configuration information viewing system and working method thereof | |
CN111756836A (en) | Information sending method and device based on event management model | |
CN114244740B (en) | Network data acquisition method and system | |
CN111654410B (en) | Gateway request monitoring method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |