CN113572799A - Method and device for accessing equipment to control platform and server - Google Patents

Method and device for accessing equipment to control platform and server Download PDF

Info

Publication number
CN113572799A
CN113572799A CN202010359808.4A CN202010359808A CN113572799A CN 113572799 A CN113572799 A CN 113572799A CN 202010359808 A CN202010359808 A CN 202010359808A CN 113572799 A CN113572799 A CN 113572799A
Authority
CN
China
Prior art keywords
object model
target equipment
target
control platform
equipment
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.)
Granted
Application number
CN202010359808.4A
Other languages
Chinese (zh)
Other versions
CN113572799B (en
Inventor
迟雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010359808.4A priority Critical patent/CN113572799B/en
Publication of CN113572799A publication Critical patent/CN113572799A/en
Application granted granted Critical
Publication of CN113572799B publication Critical patent/CN113572799B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention provides a method, a device and a server for accessing equipment to a control platform, which comprises the steps of firstly obtaining the type and the function of target equipment to be accessed; determining an initial object model matched with the type of the target equipment; and according to the function of the target equipment, carrying out model description on the determined initial object model to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and services corresponding to the target equipment are provided for a preset user side. According to the method, the initial object model is determined based on the type of the target equipment, the final object model is obtained according to the function description of the target equipment, and the target equipment is accessed to the control platform through the final object model.

Description

Method and device for accessing equipment to control platform and server
Technical Field
The invention relates to the technical field of Internet of things, in particular to a method, a device and a server for accessing equipment to a control platform.
Background
The internet of things can connect the device with the internet to monitor or control the operation of the device through the internet. In the related art, a device is usually accessed to a service control platform, and a user can control the device accessed to the platform through the service control platform to provide corresponding services for the user. When the device is accessed to the service control platform, the devices of different brands, types and models need to be accessed separately, so that the time consumption of the device accessing the platform is long, and the access efficiency is low.
Disclosure of Invention
The invention aims to provide a method, a device and a server for accessing equipment to a control platform, so as to reduce the time for accessing the equipment to the platform and improve the equipment access efficiency.
In a first aspect, an embodiment of the present invention provides a method for accessing a device to a control platform, where the method is applied to a server running the device control platform; the method comprises the following steps: acquiring the type and the function of target equipment to be accessed; determining an initial object model matched with the type of the target equipment; and according to the function of the target equipment, performing model description on the determined initial object model to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and services corresponding to the target equipment are provided for a preset user side.
In an optional implementation manner, before the step of obtaining the type and the function of the target device to be accessed, the method further includes: acquiring a communication protocol of target equipment to be accessed; and establishing communication connection with the target device through the communication protocol of the target device.
In an optional implementation manner, the step of establishing a communication connection with the target device through a communication protocol of the target device includes: judging whether the communication protocol of the target equipment is a preset accessible protocol of the control platform; and if the protocol is the preset accessible protocol of the control platform, establishing communication connection with the target equipment.
In an alternative embodiment, the step of determining an initial object model matching the type of the target device includes: receiving a model selection instruction triggered by a user based on the type of the target equipment; the model selection instruction comprises an initial object model which is selected by a user and matched with the type of the target equipment; and acquiring an initial object model corresponding to the target equipment from the model selection instruction.
In an optional embodiment, an initial function corresponding to the type of the target device is preset in the initial object model; the step of performing model description on the determined initial object model according to the function of the target device to obtain a final object model corresponding to the target device includes: adjusting an initial function in the initial object model according to the function of the target equipment; and determining the adjusted initial object model as a final object model corresponding to the target equipment.
In an optional embodiment, the step of adjusting the initial function in the initial object model according to the function of the target device includes: adjusting the running state of the initial object model in each preset time period so as to enable the running state of the initial object model to be matched with the function of the target equipment; and/or adjusting control commands that the initial object model needs to identify, and adjusting the working parameters based on the control commands.
In an optional embodiment, after the step of obtaining the final object model corresponding to the target device, the method further includes: and if a service request aiming at the target equipment from the user side is received, controlling the target equipment to respond to the service request through the final object model of the target equipment.
In an optional embodiment, the user terminal is in communication connection with the control platform through a specified communication protocol; the step of controlling the target device to respond to the service request through the final object model of the target device if the service request for the target device is received from the user side includes: receiving a service request aiming at a target device from a user side through a specified communication protocol; and controlling the target equipment to respond to the service request by using the communication protocol of the target equipment through the final object model.
In an optional embodiment, after the step of obtaining the final object model corresponding to the target device, the method further includes: and monitoring the working state and the load parameters of the target equipment through the final object model.
In a second aspect, an embodiment of the present invention provides an apparatus for accessing a device to a control platform, where the apparatus is disposed in a server running the device control platform; the device includes: the data module is used for acquiring the type and the function of target equipment to be accessed; the model determining module is used for determining an initial object model matched with the type of the target equipment; and the access module is used for carrying out model description on the determined initial object model according to the function of the target equipment to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and the service corresponding to the target equipment is provided for a preset user side.
In a third aspect, an embodiment of the present invention provides a server, including a processor and a memory, where the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the method for accessing a control platform by a device according to any one of the foregoing embodiments.
In a fourth aspect, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement a method of accessing a control platform by a device according to any preceding embodiment.
The embodiment of the invention has the following beneficial effects:
the invention provides a method, a device and a server for accessing equipment to a control platform, which are characterized in that firstly, the type and the function of target equipment to be accessed are obtained; further determining an initial object model matched with the type of the target equipment; and then according to the function of the target equipment, carrying out model description on the determined initial object model to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and services corresponding to the target equipment are provided for a preset user side. According to the method, the initial object model is determined based on the type of the target equipment, the initial object model is further described according to the function of the target equipment, the final object model of the target equipment is obtained, and the target equipment is accessed to the control platform through the final object model.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention as set forth above.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art 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 can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a scenario in which a device accesses a control platform according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for accessing a device to a control platform according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for accessing a control platform by a device according to an embodiment of the present invention;
fig. 4 is a flowchart of another method for accessing a control platform by a device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for accessing a control platform by a device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For convenience of understanding, a scenario of accessing a device to a control platform is first shown, as shown in fig. 1, the scenario includes a plurality of devices, a control platform, and a user side, where the user side may be a mobile terminal (e.g., a mobile phone, a tablet computer, a smart band, etc.), or a computer; the device can be a household appliance, furniture and other devices which can access the Internet. Generally, a device is accessed to a control platform, and a user can control the accessed device through a user side control platform to provide corresponding services for the user. In the above manner, if the user wants to control the accessed device through the control platform, the user needs to submit a protocol matching with the brand, type, model, etc. of the accessed device, so that the user is difficult to operate when using the device.
Based on the above, the invention provides a method, a device and a server for accessing a device to a control platform, and the technology can be applied to platform access scenes of various devices, especially access scenes of household appliances. To facilitate understanding of the present embodiment, first, a method for accessing a device to a control platform disclosed in the embodiment of the present invention is described in detail, and as shown in fig. 2, the method is applied to a server running the device control platform, and the method includes the following steps:
step S202, the type and function of the target device to be accessed are obtained.
The target device to be accessed may be a device that needs to be accessed to the control platform, and the device may be a household, hotel or residential appliance, such as a lamp, an air conditioner, a television, a refrigerator, or an intelligent home, such as an intelligent curtain, an intelligent faucet, or the like. The type of the target device is a category to which the target device belongs, for example, both a hall lamp and a bedroom lamp belong to a category of lamps; moreover, lamps of different brands, different categories and different models all belong to the same category, so that the mode does not need to consider the brand, the category and the model of equipment to be accessed, and only needs to pay attention to the type and the function of the equipment.
The target device to be accessed is usually provided by a third party company, the function that can be realized by the target device is also provided by the third party company, and after the target device is connected with the control platform, the third party company can send the function and the type that can be realized by the target device to the server of the control platform through the terminal device. In specific implementation, the target device may be connected to the control platform through bluetooth, infrared, or a wireless lan.
And step S204, determining an initial object model matched with the type of the target equipment.
The control platform may be configured with a plurality of types of object models in advance according to the service requirements of the third-party company, and the object models may be preset with initial functions of corresponding types of devices, for example, functions of turning on, turning off, adjusting, and the like of the devices. The object model is generally used to describe what the device is, what it can do, and what services can be provided externally, and generally, the object model represents the function of the device, including at least one attribute, service or event; the attribute is generally used to describe the running state of the device, such as the current ambient temperature read by the environment monitoring device, and the application system can initiate a request for reading and setting the attribute; the service can be used for describing the capability or method that the device can be called externally, the settable input parameter and output parameter, etc., compared with the attribute, the service can realize more complex business logic through one instruction, such as executing a certain specific task; the event may be used to describe the time when the device runs, the event generally includes notification information that needs to be sensed and processed externally, may include a plurality of output parameters, such as information about completion of a certain task, or a temperature when the device fails or alarms, and the event may be subscribed and pushed.
In specific implementation, according to the type of the target device, an object model matched with the target device is determined from a plurality of types of object models preset by the control platform, and the object model is used as an initial object model, so that model description is performed through the initial object model.
And step S206, according to the functions of the target equipment, performing model description on the determined initial object model to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and services corresponding to the target equipment are provided for a preset user side.
Generally, an object model refers to a data model for digitizing an entity (corresponding to a target device) in a physical space and constructing the entity at a cloud end; in an internet of things platform (equivalent to the control platform), an object model, that is, a device function is defined, and after the function definition is completed, an object model corresponding to the device is automatically generated, which can also be understood as describing the function of the target device based on an initial object model corresponding to the target device according to the function of the target device, generally describing the function of the target device from three dimensions of attributes, services, and events, and obtaining a final object model corresponding to the target device after the function description is completed.
The final object model may access the corresponding target device to the control platform, that is, access the attribute, method, and time corresponding to the target device to the control platform, so that the control platform may control the target device to provide the service to the user by controlling the final object model. During specific implementation, a user can send a control instruction to the control platform through the user side, the control instruction carries services which the user needs to provide, and after receiving the control instruction, the control platform can control the target device corresponding to the final object model to provide the services which the user needs, such as turning on a light, turning on an air conditioner, adjusting the temperature of the air conditioner and the like.
The method for accessing the equipment to the control platform comprises the steps of firstly obtaining the type and the function of target equipment to be accessed; further determining an initial object model matched with the type of the target equipment; and then according to the function of the target equipment, carrying out model description on the determined initial object model to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and services corresponding to the target equipment are provided for a preset user side. According to the method, the initial object model is determined based on the type of the target equipment, the final object model of the target equipment is obtained according to the function description initial object model of the target equipment, and the target equipment is accessed to the control platform through the final object model.
The embodiment of the invention also provides another method for accessing the equipment to the control platform, which is realized on the basis of the method of the embodiment; the method focuses on a specific process of determining an initial object model matching the type of the target device (realized by steps S308-S310 described below); as shown in fig. 3, the method comprises the following specific steps:
step S302, a communication protocol of a target device to be accessed is obtained.
In specific implementation, the communication protocol of the target device may be acquired through an Application Programming Interface (API) of the device developed by the third party company. The communication protocol generally refers to the rules and conventions that must be followed by two entities to complete communication or service, and the protocol generally defines the format used by the data unit, the information and meaning that the information unit should contain, the connection mode, and the timing of sending and receiving information, so as to ensure that data in the network is smoothly transmitted to a certain place. The communication protocol may be a bluetooth communication protocol, an infrared communication protocol, a Zigbee protocol, an MQTT (Message Queuing Telemetry Transport) protocol, or the like.
The Bluetooth communication protocol is usually a short-distance communication protocol and is suitable for equipment with a short data transmission distance; the infrared communication protocol is generally a transmission technology based on infrared rays, which are not interfered by radio, but because the wavelength of the infrared rays is shorter and the diffraction capability to obstacles is poor, the infrared communication protocol is more suitable for point-to-point direct line data transmission in occasions requiring short-distance wireless communication; zigbee is generally an emerging short-distance, low-rate wireless network technology, and the Zigbee protocol has requirements of low cost, low energy, high fault tolerance, and the like; the MQTT protocol is generally an instant messaging protocol with low overhead and low bandwidth occupation, and can be widely applied to the aspects of internet of things, small-sized device application, mobile application and the like.
Step S304, establishing a communication connection with the target device through the communication protocol of the target device.
During specific implementation, the equipment for data transmission through the Bluetooth can establish communication connection with the control platform through a Bluetooth communication protocol; the device for data transmission through infrared rays can establish communication connection with the control platform through an infrared protocol; the equipment for data transmission through the wireless network can be connected with the control platform through a ZigBee protocol; in some embodiments, the connection may also be established with the control platform via other communication protocols. Usually, the target device may establish a connection with the control platform only when the communication protocol of the target device meets the access protocol of the control platform, and the access protocol may be various connectable communication protocols, such as a bluetooth communication protocol, an infrared communication protocol, a Zigbee protocol, an MQTT protocol, and the like, in order to meet the access requirements of various devices.
The step S304 can also be realized by the following steps 10-11:
and step 10, judging whether the communication protocol of the target equipment is a preset accessible protocol of the control platform.
And 11, if the protocol is a preset accessible protocol of the control platform, establishing communication connection with the target equipment. In specific implementation, if the access protocol is not the preset access protocol of the control platform, the communication connection is not established with the target device.
Step S306, the type and function of the target device that establishes the communication connection are acquired.
Step S308, receiving a model selection instruction triggered by a user based on the type of the target equipment; the model selection instructions include an initial object model selected by the user to match the type of target device.
In a specific implementation, when the type and the function of the target device are received, the function is usually a data form provided by a third party, the data form needs to be manually carded into a uniform format, and a user can select an initial object model matched with the type of the target device based on the type of the target device through a user side, and encapsulate the selected initial object model and the uniformly provided data form into a model selection instruction. For example, when the type of target device is a lamp, the user may select an initial object model corresponding to the lamp.
Step S310, obtaining an initial object model corresponding to the target device from the model selection command.
Step S312, according to the function of the target device, performing model description on the obtained initial object model to obtain a final object model corresponding to the target device, so as to access the target device to the control platform through the final object model, and provide a service corresponding to the target device to a preset user side.
During specific implementation, model description is carried out on the initial object model according to a data table with a uniform format corresponding to the functions of the target equipment, and a final object model is obtained. And obtaining the final object model, namely, accessing the target equipment to the control platform, and enabling a user to control the target equipment to provide services through the control platform.
And step S314, monitoring the working state and the load parameters of the target equipment through the final object model.
After the target device is accessed to the control platform, the working state and the load parameters of the target device can be monitored through a final object model corresponding to the target device, namely the working parameters and the load running parameters of the target device during running are monitored, and when the working parameters or the load parameters exceed a preset value, alarm information can be sent to a user side to ensure safe running of the target device.
In the method for accessing the equipment to the control platform, the target equipment establishes connection with the control platform through a communication protocol, and after the communication connection is established, the type and the function of the target equipment are obtained; further receiving a model selection instruction triggered by a user based on the type of the target equipment, and then acquiring an initial object model corresponding to the target equipment from the model selection instruction; and then according to the function of the target equipment, carrying out model description on the obtained initial object model to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and the working state and the load parameters of the target equipment are monitored. According to the method, the equipment is accessed into the control platform through the object model, the time for accessing the equipment is effectively shortened, the labor cost and the time cost are saved, meanwhile, the target equipment is controlled through the object model, and a user can call the control target equipment through simple operation, so that the calling process of the user is reduced, and the learning cost of equipment calling is also reduced.
The embodiment of the invention also provides another method for accessing the equipment to the control platform, which is realized on the basis of the method of the embodiment; the method mainly describes a specific process of performing model description on a determined initial object model according to the function of target equipment to obtain a final object model corresponding to the target equipment (realized by the following steps S406-S408); as shown in fig. 4, the method includes the following specific steps:
step S402, obtaining the type and function of the target device to be accessed.
Step S404, determining an initial object model matched with the type of the target equipment; wherein, the initial function corresponding to the type of the target equipment is preset in the initial object model.
The initial function corresponding to the initial object model is usually set with different operation instructions for different types of target devices, and the initial parameters corresponding to each type of target device, and generally the same type of device has the same initial parameters, and when the same type of device has a special function, the same type of device can be expanded or modified on the basis of the initial parameters. For example, the floor lamp of brand a and the bedside lamp of brand B to be switched in are of the same type of lamp, wherein for the on operation of the lamp, only one operation instruction needs to be set in the initial object model, that is, the control instructions of the floor lamp and the bedside lamp for the same operation are the same, and there is no need to distinguish the brand and the model.
Step S406, adjusting the initial function in the initial object model according to the function of the target device.
The initial parameters in the initial object model can be deactivated, activated or modified according to the function of the target device, for example, the yellow light set in the initial object model is sleep light, the yellow-white light set in the target device is sleep light, and the yellow light in the initial object model needs to be adjusted to be yellow-white light; the initial object model is provided with an alarm function of the target equipment, and alarm parameters, alarm modes and the like can be conditioned in the initial object model according to the alarm function of the target equipment. According to the function of the target device, the control command in the initial object model may be matched with the function of the target device, for example, the light-on command is corresponding to the light-on parameter in the target device.
In a specific implementation, the step 406 may be implemented only in the following first mode or second mode, or may be implemented in the following first mode and second mode:
in the first mode, the operation state of the initial object model in each preset time period is adjusted, so that the operation state of the initial object model is matched with the function of the target equipment.
The time periods can be time periods in a day or seasonal time periods in a year, the operation state is usually the state of the target device, and the operation state of the target device is usually different in each time period, for example, for a hall lamp, the color of the lamp light set in the evening (e.g., 18: 00-22: 00) is white light; the color of the lamplight set at night (for example, 22: 00-3: 00) is yellow light and the like. In a specific implementation, the operation state of the initial object model is adjusted to match the function of the target device, and it can also be understood that the operation state of the target device is described by the initial object model.
And secondly, adjusting the control instruction needing to be identified by the initial object model and adjusting the working parameter based on the control instruction.
The operating parameters in the initial object model generally correspond to the operating parameters of the target device, including the initial parameters. The control command may be sent by a developer, and the corresponding operating parameters may be adjusted according to the control command, for example, for the lamp, when the developer wants to set the white light in the initial object model to be yellow, the control command may be sent to modify the color of the lamp light. In specific implementation, a developer may add new working parameters according to requirements to add functions of the device or meet requirements of a user, for example, add alarm parameters.
By the second mode, the working parameters corresponding to the initial object model can be expanded or adjusted according to the change of the business requirements, and the corresponding functions of the working parameters are encapsulated, so that the business expansion is facilitated.
And step S408, determining the adjusted initial object model as a final object model corresponding to the target equipment.
Step S410, if a service request for the target device is received from the user side, controlling the target device to respond to the service request through the final object model of the target device.
The service request can be a request for opening, closing or adjusting the target device, the service request can be sent by a user through a user side, and in the scheme, the user can send the service request through a uniform interface provided by the control platform without sending the service request respectively for devices of different brands and different models, so that the user operation is simplified, and the experience of the user is improved.
During specific implementation, the user side is in communication connection with the control platform through a specified communication protocol; the specified communication protocol may be a protocol for uniformly providing services to the outside by the control platform, that is, the user side and the control platform may communicate through a uniform interface. The above step S410 can be realized by the following steps 20 to 21:
and step 20, receiving a service request aiming at the target equipment from the user terminal through the specified communication protocol.
And step 21, controlling the target device to respond to the service request by using the communication protocol of the target device through the final object model. The control platform may convert a service request of the target device received through the specified communication protocol into a service request that the target device may be another service request through the final object model, and respond to the service request through a communication protocol corresponding to the target device, that is, adjust or control the target device according to the service request, for example, the service request is to adjust the temperature of the air conditioner to 25 degrees, and the final object model is to set the air conditioner to 25 degrees through the communication protocol corresponding to the target device.
In specific implementation, the control of the target device through the final object model in the control platform is realized based on a micro-service architecture, which is generally a new technology for deploying applications and services in the cloud, in service disclosure, many services can be limited by internal independent processes, and in the micro-service architecture, only required functions need to be added in a specific certain service without affecting the architecture of the whole process. The micro service architecture comprises a domain model (equivalent to the initial object model) layer, a technical middle platform, a service layer and a gateway layer.
The micro-service architecture in the control platform can be preset with a plurality of domain models according to service forms, the domain models can be divided into gardens, projects, sub-projects, buildings and the like, and can also be divided into rooms, buildings, units, floors and the like, and the domain models and the functions of the domain models can be generally expanded according to service requirements; in the specific implementation, in the domain model layer, the level form of the domain is predefined according to the business form, and the device described by the access object model can be directly connected with the service using the scene. The linkage of a plurality of scenes is realized by matching with auxiliary capabilities of the scenes and the like. In the above technology, the station can convert the communication protocol, that is, convert the communication protocol corresponding to the target device into the specified communication protocol, so that when the user controls the target device, the user does not need to pay attention to the communication protocol for establishing communication connection with the target device, but only needs to control the target device through the specified communication protocol, and the specified communication protocol can provide an http request (equivalent to the service request) to the outside for the web page and the interface user. Meanwhile, the technical middle platform can also provide uniform working state, load bearing capacity and the like of the monitoring equipment to the outside.
The service layer can provide uniform service capability to provide external delivery capability, namely, provide uniform field model service (equivalent to providing service through the final object model), the field model can directly run the service of the target device by operating the final object model, and meanwhile, the field model also comprises the services of checking the final object model corresponding to the target device, pushing the state of the device and the like. The gateway layer is used for providing a unified login service for the user, when the user logs in the control platform to control the target equipment through a login page in the user side, the OAuth2 authentication page is skipped, and after the authentication is successful, the previous page is skipped. The OAuth (Open Authorization) is generally an Open standard that allows a developer to authorize a user application to access a function of a device provided by a third party company stored in a server corresponding to a control platform by the platform without providing a user name and a password to the third party company, and OAuth2.0 is a continuation version of the OAuth protocol.
The micro-service architecture generally has the functions of uniform gateway, uniform authentication, authentication service management and the like, wherein the uniform gateway can uniformly provide services to the outside through a service layer and a gateway layer, and uniformly receives requests and forwards the requests to corresponding micro-services; the unified authentication can realize the unified routing authentication function through a micro service gateway (Zuul), and the authentication function of the service can be accessed only after the user authentication is realized; the authentication service management can realize unified authentication service management of the third-party application needing single sign-on, and distribute configurations such as application identity (Client), secret key (secret) and the like.
In a specific implementation, the third-party company may access the operation capability of its own device to the control platform according to the control platform access protocol. In this process, the control platform needs to interface different devices of different brands, such as a floor lamp of brand a and a bedside lamp of brand B, and for the operation of the lamps, it needs to provide the same password for the external and service operations to operate the devices.
The method for accessing the control platform by the equipment aims at the problems that each brand, type and model are required to be accessed independently in the existing equipment access process, and manufacturers, types, models and the like of the equipment also need to be concerned in the use process.
Corresponding to the above embodiment of the method for accessing a device to a control platform, the embodiment of the present invention further provides a device for accessing a device to a control platform, as shown in fig. 5, the device is disposed in a server running with the device control platform; the device includes:
and a data module 50, configured to acquire the type and function of the target device to be accessed.
And a model determining module 51, configured to determine an initial object model matching the type of the target device.
And the access module 52 is configured to perform model description on the determined initial object model according to the function of the target device to obtain a final object model corresponding to the target device, so as to access the target device to the control platform through the final object model, and provide a service corresponding to the target device to a preset user side.
The device for accessing the equipment to the control platform firstly acquires the type and the function of target equipment to be accessed; further determining an initial object model matched with the type of the target equipment; and then according to the function of the target equipment, carrying out model description on the determined initial object model to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and services corresponding to the target equipment are provided for a preset user side. According to the method, the initial object model is determined based on the type of the target equipment, the final object model of the target equipment is obtained according to the function description initial object model of the target equipment, and the target equipment is accessed to the control platform through the final object model.
Further, the apparatus further comprises a connection module configured to: acquiring a communication protocol of target equipment to be accessed; and establishing communication connection with the target device through the communication protocol of the target device.
Specifically, the connection module is further configured to: judging whether a communication protocol of the target equipment is a preset accessible protocol of the control platform; and if the protocol is the preset accessible protocol of the control platform, establishing communication connection with the target equipment.
Further, the model determining module 51 is configured to: receiving a model selection instruction triggered by a user based on the type of the target equipment; the model selection instruction comprises an initial object model which is selected by a user and matched with the type of the target equipment; and acquiring an initial object model corresponding to the target equipment from the model selection instruction.
The initial function corresponding to the type of the target equipment is preset in the initial object model; the access module 52 is configured to: adjusting an initial function in the initial object model according to the function of the target equipment; and determining the adjusted initial object model as a final object model corresponding to the target equipment.
Further, the access module 52 is further configured to: adjusting the running state of the initial object model in each preset time period so as to enable the running state of the initial object model to be matched with the function of the target equipment; and/or adjusting control commands that the initial object model needs to identify, and adjusting the working parameters based on the control commands.
Further, the apparatus further includes a device control module configured to: and if a service request aiming at the target equipment from the user side is received, controlling the target equipment to respond to the service request through the final object model of the target equipment.
Specifically, the user terminal is in communication connection with the control platform through a specified communication protocol; the device control module is configured to: receiving a service request aiming at a target device from a user side through a specified communication protocol; and controlling the target equipment to respond to the service request by using the communication protocol of the target equipment through the final object model.
Specifically, the apparatus further includes a monitoring module, configured to: and monitoring the working state and the load parameters of the target equipment through the final object model.
The device for accessing a device to a control platform provided by the embodiment of the present invention has the same implementation principle and technical effect as those of the foregoing method embodiments, and for brief description, reference may be made to corresponding contents in the foregoing method embodiments for parts of embodiments of the device that are not mentioned.
An embodiment of the present invention further provides a server, which is shown in fig. 6, and the server includes a processor 101 and a memory 100, where the memory stores machine executable instructions that can be executed by the processor 101, and the processor 101 executes the machine executable instructions to implement the method for accessing the device to the control platform.
Further, the server shown in fig. 6 further includes a bus 102 and a communication interface 103, and the processor 101, the communication interface 103 and the memory 100 are connected through the bus 102.
The memory 100 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 6, but that does not indicate only one bus or one type of bus.
The processor 101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 101. The processor 101 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100, and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the method for accessing the device to the control platform.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus and/or the electronic device described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A method for accessing a device to a control platform is characterized in that the method is applied to a server running with the device control platform; the method comprises the following steps:
acquiring the type and the function of target equipment to be accessed;
determining an initial object model matched with the type of the target equipment;
according to the function of the target equipment, model description is carried out on the determined initial object model to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and services corresponding to the target equipment are provided for a preset user side.
2. The method of claim 1, wherein the step of obtaining the type and functionality of the target device to be accessed is preceded by the method further comprising:
acquiring a communication protocol of target equipment to be accessed;
and establishing communication connection with the target equipment through the communication protocol of the target equipment.
3. The method of claim 2, wherein the step of establishing a communication connection with the target device via the communication protocol of the target device comprises:
judging whether the communication protocol of the target equipment is a preset accessible protocol of the control platform;
and if the protocol is the preset accessible protocol of the control platform, establishing communication connection with the target equipment.
4. The method of claim 1, wherein the step of determining an initial object model that matches the type of the target device comprises:
receiving a model selection instruction triggered by a user based on the type of the target equipment; the model selection instruction comprises an initial object model selected by the user and matched with the type of the target device;
and acquiring an initial object model corresponding to the target equipment from the model selection instruction.
5. The method according to claim 1, wherein an initial function corresponding to the type of the target device is preset in the initial object model;
the step of performing model description on the determined initial object model according to the function of the target device to obtain a final object model corresponding to the target device includes:
adjusting an initial function in the initial object model according to the function of the target equipment;
and determining the adjusted initial object model as a final object model corresponding to the target equipment.
6. The method of claim 5, wherein the step of adjusting the initial function in the initial object model based on the function of the target device comprises:
adjusting the running state of the initial object model in each preset time period so as to enable the running state of the initial object model to be matched with the function of the target equipment;
and/or adjusting control commands needing to be identified by the initial object model and working parameters adjusted based on the control commands.
7. The method of claim 1, wherein after the step of obtaining the final object model corresponding to the target device, the method further comprises:
and if a service request aiming at the target equipment from the user side is received, controlling the target equipment to respond to the service request through the final object model of the target equipment.
8. The method of claim 7, wherein the user terminal is communicatively connected to the control platform via a specified communication protocol;
the step of controlling the target device to respond to the service request through the final object model of the target device if the service request aiming at the target device is received from the user side comprises the following steps:
receiving a service request aiming at the target equipment from the user terminal through the specified communication protocol;
and controlling the target equipment to respond to the service request by using the communication protocol of the target equipment through the final object model.
9. The method of claim 1, wherein after the step of obtaining the final object model corresponding to the target device, the method further comprises: and monitoring the working state and the load parameters of the target equipment through the final object model.
10. The device for accessing the equipment to the control platform is characterized in that the device is arranged on a server running with the equipment control platform; the device comprises:
the data module is used for acquiring the type and the function of target equipment to be accessed;
the model determining module is used for determining an initial object model matched with the type of the target equipment;
and the access module is used for carrying out model description on the determined initial object model according to the function of the target equipment to obtain a final object model corresponding to the target equipment, so that the target equipment is accessed to the control platform through the final object model, and the service corresponding to the target equipment is provided for a preset user side.
11. A server comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the method of any one of claims 1 to 9 for accessing a control platform by a device.
12. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of the device access control platform of any of claims 1 to 9.
CN202010359808.4A 2020-04-29 2020-04-29 Method and device for accessing equipment to control platform and server Active CN113572799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010359808.4A CN113572799B (en) 2020-04-29 2020-04-29 Method and device for accessing equipment to control platform and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010359808.4A CN113572799B (en) 2020-04-29 2020-04-29 Method and device for accessing equipment to control platform and server

Publications (2)

Publication Number Publication Date
CN113572799A true CN113572799A (en) 2021-10-29
CN113572799B CN113572799B (en) 2023-04-07

Family

ID=78158658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010359808.4A Active CN113572799B (en) 2020-04-29 2020-04-29 Method and device for accessing equipment to control platform and server

Country Status (1)

Country Link
CN (1) CN113572799B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422376A (en) * 2020-10-15 2021-02-26 招商华软信息有限公司 Method for automatically accessing non-standardized equipment to cloud platform, electronic equipment and storage medium
CN113949676A (en) * 2021-11-16 2022-01-18 云知声(上海)智能科技有限公司 Equipment access method of Internet of things platform
CN114793191A (en) * 2022-02-17 2022-07-26 江苏卓易信息科技股份有限公司 Internet of things integration system and method based on domain model
CN114839887A (en) * 2022-03-23 2022-08-02 青岛海尔科技有限公司 Equipment attribute configuration method and device, storage medium and electronic device
CN115801856A (en) * 2023-02-07 2023-03-14 深圳开鸿数字产业发展有限公司 Service processing method based on atomization service and related equipment
WO2023088469A1 (en) * 2021-11-19 2023-05-25 上海商汤智能科技有限公司 Device management method and apparatus, and electronic device, storage medium and program product
CN117118981A (en) * 2023-10-19 2023-11-24 广州翼辉信息技术有限公司 Industrial cloud platform communication method based on CODESYS programming environment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018072655A1 (en) * 2016-10-20 2018-04-26 中兴通讯股份有限公司 Method for implementing internet of things application, apparatus, related device and storage medium
WO2018202440A1 (en) * 2017-05-03 2018-11-08 Siemens Aktiengesellschaft Data transmission method and apparatus
CN110351257A (en) * 2019-06-27 2019-10-18 绿漫科技有限公司 A kind of distribution Internet of Things safety access system
CN110417783A (en) * 2019-07-30 2019-11-05 北京国信华源科技有限公司 A kind of data transmission method based on Internet of Things, device, storage medium and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018072655A1 (en) * 2016-10-20 2018-04-26 中兴通讯股份有限公司 Method for implementing internet of things application, apparatus, related device and storage medium
WO2018202440A1 (en) * 2017-05-03 2018-11-08 Siemens Aktiengesellschaft Data transmission method and apparatus
CN110351257A (en) * 2019-06-27 2019-10-18 绿漫科技有限公司 A kind of distribution Internet of Things safety access system
CN110417783A (en) * 2019-07-30 2019-11-05 北京国信华源科技有限公司 A kind of data transmission method based on Internet of Things, device, storage medium and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
晨之清风: "《http://blog.csdn.net/chentuo200/article》", 16 December 2019 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422376A (en) * 2020-10-15 2021-02-26 招商华软信息有限公司 Method for automatically accessing non-standardized equipment to cloud platform, electronic equipment and storage medium
CN113949676A (en) * 2021-11-16 2022-01-18 云知声(上海)智能科技有限公司 Equipment access method of Internet of things platform
WO2023088469A1 (en) * 2021-11-19 2023-05-25 上海商汤智能科技有限公司 Device management method and apparatus, and electronic device, storage medium and program product
CN114793191A (en) * 2022-02-17 2022-07-26 江苏卓易信息科技股份有限公司 Internet of things integration system and method based on domain model
CN114839887A (en) * 2022-03-23 2022-08-02 青岛海尔科技有限公司 Equipment attribute configuration method and device, storage medium and electronic device
CN115801856A (en) * 2023-02-07 2023-03-14 深圳开鸿数字产业发展有限公司 Service processing method based on atomization service and related equipment
CN117118981A (en) * 2023-10-19 2023-11-24 广州翼辉信息技术有限公司 Industrial cloud platform communication method based on CODESYS programming environment

Also Published As

Publication number Publication date
CN113572799B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN113572799B (en) Method and device for accessing equipment to control platform and server
US10764128B2 (en) Systems and methods for commissioning a smart hub device
US10397013B1 (en) User interfaces, systems and methods for configuring smart devices for interoperability with a smart hub device
US7136709B2 (en) Home appliance control system and methods in a networked environment
US7155305B2 (en) System and methods for home appliance identification and control in a networked environment
CN105471686B (en) Terminal control method, device and system
US10867507B2 (en) Set-top box gateway architecture for universal remote controller
WO2020223854A1 (en) Device network configuration method and apparatus, electronic device and storage medium
US20150006719A1 (en) LEVERAGING SYSTEM SIGNALING SERVICE ADVERTISEMENTS FOR APPLICATION-LAYER DISCOVERY AND CONNECTION MANAGEMENT IN AN INTERNET OF THINGS (IoT) ENVIRONMENT
US20150140990A1 (en) Method and apparatus for controlling home devices on group basis in a home network system
US20150121470A1 (en) Peer-to-peer onboarding of internet of things (iot) devices over various communication interfaces
JP2023029838A (en) Automated service enrollment in communication network
KR20150059081A (en) Method and apparatus for controlling a group of home devices in a home network system
WO2016169231A1 (en) Method and system for building steady piconet based on bluetooth
WO2020168568A1 (en) Data processing method and apparatus, electronic device and readable storage medium
CN111372222A (en) Device connection method and system, corresponding terminal device and server
CN113794996A (en) Device communication method, device control method, device communication apparatus, electronic device, and storage medium
CN112152827A (en) Management method and device of Internet of things equipment, gateway and readable storage medium
KR100377229B1 (en) Home network message system and method using a power line
US20170094035A1 (en) Management method and management device
EP4135265A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
KR100550774B1 (en) Reservation information processing apparatus for mobile home network system
KR20140139986A (en) Gateway and method for controlling thereof
EP2640137B1 (en) Method for attaching control devices to control system in mesh network
KR100550775B1 (en) Mobile agent module for mobile home network system

Legal Events

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