CN111200545B - Intelligent device access method and device - Google Patents
Intelligent device access method and device Download PDFInfo
- Publication number
- CN111200545B CN111200545B CN201811368854.XA CN201811368854A CN111200545B CN 111200545 B CN111200545 B CN 111200545B CN 201811368854 A CN201811368854 A CN 201811368854A CN 111200545 B CN111200545 B CN 111200545B
- Authority
- CN
- China
- Prior art keywords
- attribute information
- binding
- page
- accessed
- intelligent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L12/2807—Exchanging configuration information on appliance services in a home automation network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L12/283—Processing of data at an internetworking point of a home automation network
- H04L12/2834—Switching of information between an external network and a home network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2854—Wide area networks, e.g. public data networks
- H04L12/2856—Access arrangements, e.g. Internet access
-
- 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/22—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- 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/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Automation & Control Theory (AREA)
- Computing Systems (AREA)
- Power Engineering (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention relates to the field of intelligent home furnishing, in particular to an intelligent device access method and an intelligent device access device, wherein an identifier of an intelligent device to be accessed is obtained, an attribute information description file of the intelligent device to be accessed is obtained according to a preset mapping relation between the identifier of the intelligent device and the attribute information description file, and an access type and a device type of the intelligent device to be accessed are obtained; determining a binding page template corresponding to the intelligent equipment to be accessed according to a preset mapping relation between the access type and the binding page template, and determining a control page template corresponding to the intelligent equipment to be accessed according to a mapping relation between the equipment type of the intelligent equipment and the control page template; the intelligent device to be accessed is accessed based on the corresponding binding page template, the corresponding control page template and the corresponding attribute information description file, so that the binding page template and the control page template are set to form an access specification, and only corresponding information needs to be input in advance according to the template specification, thereby improving the reusability and reducing the cost.
Description
Technical Field
The invention relates to the field of smart home, in particular to an intelligent device access method and an intelligent device access device.
Background
Along with the continuous development of information technology, the smart home greatly facilitates the life of users, more and more manufacturers are invested in the development of the smart devices, and the users can access the smart devices through Application (APP) software, so that the purpose of remotely controlling the smart devices is achieved. At present, when an APP is generally accessed into a smart device, it is necessary to make clear the device operation that the smart device needs to be accessed by a user, and to make clear the management and control instruction of the device and the state after the management and control, so as to perform corresponding binding and management and control page development for the smart device.
In the prior art, the following two access modes are mainly provided: 1) the method comprises the steps that a client code is accessed, a research and development staff of an android or apple Operating System (ios) client develops a binding page and a control page according to the characteristics of intelligent equipment, a distribution network interface is independently realized, and meanwhile, a control instruction is processed according to information differentiation provided by a manufacturer. 2) HyperText Markup Language 5(HyperText Markup Language 5, HTML5.0, abbreviated as H5) + native hybrid access, H5 is a binding and control page for intelligent device development, ios and android can be used simultaneously, the function of binding the device is provided by a client, and H5 binds and controls the final device by calling the function developed by the client.
However, in the access mode in the prior art, for different intelligent devices, because the access mode is different and the management and control instruction is different, each access to one intelligent device requires developers to redevelop binding and management and control pages, so that the reusability is low, the cost is increased, and the efficiency is also reduced.
Disclosure of Invention
The embodiment of the invention provides an intelligent device access method and device, and aims to solve the problems that in the prior art, different intelligent devices need to redevelop binding and management and control pages, and the reusability is low.
The embodiment of the invention provides the following specific technical scheme:
the embodiment of the invention provides an intelligent device access method, which comprises the following steps:
acquiring an identifier of an intelligent device to be accessed, acquiring an attribute information description file of the intelligent device to be accessed according to a preset mapping relation between the identifier of the intelligent device and the attribute information description file, and acquiring an access type and a device type of the intelligent device to be accessed;
determining a binding page template corresponding to the intelligent equipment to be accessed according to a preset mapping relation between the access type and the binding page template, and determining a control page template corresponding to the intelligent equipment to be accessed according to a mapping relation between the equipment type of the intelligent equipment and the control page template;
and accessing the intelligent equipment to be accessed based on the corresponding binding page template, the corresponding control page template and the corresponding attribute information description file.
Optionally, the attribute information description file includes a plurality of tag fields, and each tag field corresponds to one attribute information; the attribute information includes, but is not limited to, one or any combination of the following: and the name, the value type, the value range and the value enumeration of the attribute information of the intelligent equipment.
Optionally, further comprising:
if the fact that a label representing a public attribute information file exists in an attribute information description file corresponding to the equipment to be accessed is determined, the corresponding public attribute information file is obtained according to the label representing the public attribute information file, and public attribute information in the obtained public attribute information file is used as attribute information of the equipment to be accessed; wherein the common attribute information file is composed of a plurality of tag fields of the same attribute information that a plurality of smart devices have.
Optionally, the binding page template at least includes a plurality of binding pages, each binding page corresponds to one page tag, each page tag corresponds to one page element list, and one page element list at least includes a plurality of binding operation elements, where the binding operation elements at least include pictures and word descriptions.
Optionally, each page tag further corresponds to a binding state identifier, where the binding state identifier indicates a current binding state.
Optionally, the management and control page template includes at least one management and control page, and each management and control page includes at least management and control state information of multiple attributes.
Another embodiment of the present invention provides an intelligent device access apparatus, including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring an identifier of the intelligent equipment to be accessed, acquiring an attribute information description file of the intelligent equipment to be accessed according to a preset mapping relation between the identifier of the intelligent equipment and the attribute information description file, and acquiring an access type and an equipment type of the intelligent equipment to be accessed;
the determining module is used for determining a binding page template corresponding to the intelligent equipment to be accessed according to a preset mapping relation between an access type and the binding page template, and determining a control page template corresponding to the intelligent equipment to be accessed according to a mapping relation between an equipment type of the intelligent equipment and the control page template;
and the access module is used for accessing the intelligent equipment to be accessed based on the corresponding binding page template, the corresponding control page template and the corresponding attribute information description file.
Optionally, the attribute information description file includes a plurality of tag fields, and each tag field corresponds to one attribute information; the attribute information includes, but is not limited to, one or any combination of the following: and the name, the value type, the value range and the value enumeration of the attribute information of the intelligent equipment.
Optionally, the obtaining module is further configured to:
if the fact that a label representing a public attribute information file exists in an attribute information description file corresponding to the equipment to be accessed is determined, the corresponding public attribute information file is obtained according to the label representing the public attribute information file, and public attribute information in the obtained public attribute information file is used as attribute information of the equipment to be accessed; wherein the common attribute information file is composed of a plurality of tag fields of the same attribute information that a plurality of smart devices have.
Optionally, the binding page template at least includes a plurality of binding pages, each binding page corresponds to one page tag, each page tag corresponds to one page element list, and one page element list at least includes a plurality of binding operation elements, where the binding operation elements at least include pictures and word descriptions.
Optionally, each page tag further corresponds to a binding state identifier, where the binding state identifier indicates a current binding state.
Optionally, the management and control page template includes at least one management and control page, and each management and control page includes at least management and control state information of multiple attributes.
An electronic device, comprising:
at least one memory for storing a computer program;
at least one processor configured to implement the steps of any of the above-described smart device access methods when executing the computer program stored in the memory.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of any of the above-mentioned smart device access methods.
In the embodiment of the invention, an identifier of intelligent equipment to be accessed is obtained, an attribute information description file of the intelligent equipment to be accessed is obtained according to a preset mapping relation between the identifier of the intelligent equipment and the attribute information description file, and an access type and an equipment type of the intelligent equipment to be accessed are obtained; determining a binding page template corresponding to the intelligent equipment to be accessed according to a preset mapping relation between the access type and the binding page template, and determining a control page template corresponding to the intelligent equipment to be accessed according to a mapping relation between the equipment type of the intelligent equipment and the control page template; the intelligent device to be accessed is accessed based on the corresponding binding page template, the control page template and the corresponding attribute information description file, thus, a template specification description mode is provided for different intelligent device accesses, the binding page template and the control page template are preset, when the intelligent device is accessed, the corresponding control page template and the binding page template can be determined according to the device type and the access type, the functional logic of the control page template and the binding page template is executed according to the corresponding information of the template, the access, specification binding flow and control operation of the intelligent device are further completed, the access specification is formed, the intelligent device can be accessed, the access can be used for various intelligent device accesses, the corresponding information is input according to the template specification in advance, the code is not required to be changed, the control page and the binding page are not required to be redeveloped, the reusability is improved, the efficiency is improved, the method is more convenient and effective, and the redevelopment cost is reduced.
Drawings
Fig. 1 is a flowchart of an intelligent device access method in an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a binding page execution logic in the intelligent device access method according to the embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an execution logic of a management and control page in the access method of the smart device according to the embodiment of the present invention;
fig. 4 is a schematic structural diagram of an intelligent device access apparatus in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be 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.
At present, the smart machine demand is more and more, and it is also more and more extensive to use, and the user can reach remote control smart machine's purpose through the different smart machine of Application (APP) access, mainly has following two kinds of access methods among the prior art: client code access, and H5+ native hybrid access. However, since the access modes of the intelligent devices are different, the control instructions are also different, and the states after control are different, the binding and control pages of the intelligent devices of different manufacturers or the intelligent devices of the same type need to be developed independently. In the client code access mode, the client code needs to be redeveloped and compiled every time one intelligent device is accessed, so that the size of an APP software package is continuously increased along with the continuous access of more and more different intelligent devices, the number of the intelligent devices is more and more, the probability of problems is higher, and the access to a new intelligent device can be completed only by an APP development version; although the H5+ native hybrid access mode does not have the problem that the size of an APP software package is continuously increased, binding and control pages also need to be separately re-developed for different intelligent devices, which results in an intelligent device access method, that is, the reusability of the binding and control pages is low, binding and control pages need to be re-developed by developers for different intelligent devices, so that the cost is increased, and the efficiency is reduced.
Therefore, in the embodiment of the present invention, the access flow of the smart device is mainly templated, the normalization is performed on the attribute information, the binding operation flow, the control instruction and the elements in the control page of the smart device, and the corresponding templates are set, for example, the Extensible Markup Language (XML) description file is used to implement, and finally the attribute information XML description file, the binding page XML description file and the control page XML description file are formed, so that when a new smart device is accessed, the page does not need to be redeveloped, only corresponding information needs to be input for different templates, and thus the configuration can be performed according to the specification agreed by the templates, and the parsing display is performed at the accessed APP client, and the implementation of the binding and the control page of the smart device can be completed, the access of the smart device to the APP is completed, the reusability is high, and the cost of redevelopment of the new page is also reduced, the efficiency is improved.
Of course, in the embodiment of the present invention, access to the smart device is not limited, and the method may be applied to similar scenarios and problems, in the embodiment of the present invention, only the smart device is taken as an example for schematic illustration, and in the embodiment of the present invention, the template and normalization are also taken as an example for illustration only by using XML description.
Referring to fig. 1, in the embodiment of the present invention, a specific process of an intelligent device access method is as follows:
step 100: the method comprises the steps of obtaining an identification of the intelligent device to be accessed, obtaining an attribute information description file of the intelligent device to be accessed according to a preset mapping relation between the identification of the intelligent device and the attribute information description file, and obtaining an access type and a device type of the intelligent device to be accessed.
The intelligent device may be any intelligent device such as an intelligent switch, an intelligent socket, an intelligent air conditioner, an intelligent door lock, an intelligent television, an intelligent refrigerator, and the like, which is not limited in the embodiment of the present invention.
The identifier of the intelligent device to be accessed may be configured for each intelligent device in advance, and may uniquely identify each intelligent device. In the embodiment of the invention, considering that the intelligent devices are various, the attributes of different intelligent devices are different, the access types are different, and the control functions are also different, the mapping relation between the intelligent devices and the attribute information XML description file, the binding page XML description file, the control page XML description file and the like is established by setting the Identification (ID) of the intelligent devices according to the ID, so that an XML description method is provided for different intelligent devices, and the access specification can be formed.
When step 100 is executed, the method specifically includes:
firstly, an identifier of the intelligent device to be accessed is obtained.
For example, a user selects an intelligent device that the user wants to access from the APP, and then can obtain an identifier of the intelligent device.
And then, acquiring an attribute information description file to be accessed into the intelligent equipment according to a preset mapping relation between the identifier of the intelligent equipment and the attribute information description file.
The attribute information description file comprises a plurality of label fields, and each label field corresponds to one attribute information; the attribute information includes, but is not limited to, one or any combination of the following: and the name, the value type, the value range and the value enumeration of the attribute information of the intelligent equipment.
That is to say, in the embodiment of the present invention, data normalization is performed on the attribute information, and the specification file includes the identifier of the smart device and various attribute tag fields. Therefore, for different intelligent devices, only the specific content information of the intelligent device aiming at the attribute tag field needs to be input according to the setting of the attribute tag field, and thus, all the attribute information of the intelligent device to be accessed can be obtained by reading the attribute information description file.
Further, there may be a case where tag fields of attribute information of a plurality of intelligent devices are the same, and in order to improve reusability, in the embodiment of the present invention, common attribute information may be extracted and stored in a single file for use by the intelligent devices having the same common attribute information, which specifically provides a possible implementation manner: if the fact that the label representing the public attribute information file exists in the attribute information description file corresponding to the equipment to be accessed is determined, the corresponding public attribute information file is obtained according to the label representing the public attribute information file, and the public attribute information in the obtained public attribute information file is used as the attribute information of the equipment to be accessed; the public attribute information file is composed of a plurality of label fields of the same attribute information which are possessed by a plurality of intelligent devices.
That is to say, before accessing, it is necessary to enter relevant attribute information of the to-be-accessed intelligent device with respect to a preset attribute information data specification, and the following specifically describes an intelligent device information XML data specification, including the following aspects:
1) and inputting information such as identification, manufacturer, name and the like of the intelligent equipment.
2) The attribute information of the intelligent device is entered, and corresponding information is entered according to different attribute label fields and preset requirements thereof, for example, the set attribute label fields and the preset requirements thereof are as follows:
(1) attribute name: is an English character string.
(2) The attribute value types are as follows: including reshape, Boolean, string, floating point, etc.
(3) The value range of the attribute is as follows: the possible value range of the attribute is defined, which is suitable for the case that the value is more, but in a certain range, for example, the value range can be set to be 0-100 for the volume attribute.
(4) Value enumeration of attributes: the possible values of the attribute value are defined, which is suitable for the situation that only limited values exist, for example, for the on-off state attribute, the value enumeration can be set to only have two values, namely on and off.
Therefore, after the data standard is set, for different intelligent devices, corresponding values are input according to the data standard.
3) And inputting all the attribute information of the intelligent equipment into the corresponding label field, namely completing the input of the attribute information description file of the intelligent equipment.
For example, the set tag field is a property tag field, and one property information corresponds to one property tag field, that is, a property information description file of one smart device includes a plurality of property tag fields.
4) For example, different smart devices of the same type of the same manufacturer may have the same properties, and therefore, in the embodiment of the present invention, the repeated and same property information is extracted into a single XML file as a common property information file, and a tag may be used to represent the common property information file, for example, by using a subdevice XML tag identifier, the subdevice XML tag stores the extracted common property information and the name of the XML file, so that it is convenient to search, and when parsing the property information description file of the smart device to be accessed, if the subdevice XML tag is parsed, the public property information XML file corresponding to the tag value may be directly read and parsed.
Therefore, the repeated attribute information of different intelligent devices is extracted into independent XML files, so that in the attribute information description file of the intelligent device with the same attribute information, only the subdevice Xml label needs to be added for identification, repeated entry is not needed, and the error probability can be reduced.
Step 110: determining a binding page template corresponding to the intelligent device to be accessed according to the mapping relation between the preset access type and the binding page template, and determining a control page template corresponding to the intelligent device to be accessed according to the mapping relation between the device type of the intelligent device and the control page template.
When step 110 is executed, the following two aspects can be divided:
in a first aspect: and determining a binding page template corresponding to the intelligent equipment to be accessed according to the mapping relation between the preset access type and the binding page template.
The binding page template at least comprises a plurality of binding pages, each binding page corresponds to one page tag, each page tag corresponds to one page element list, and each page element list at least comprises a plurality of binding operation elements, wherein the binding operation elements at least comprise pictures and word descriptions.
Furthermore, each page tag also corresponds to a binding state identifier, wherein the binding state identifier represents the current binding state.
In the embodiment of the invention, the binding operation flows of different intelligent devices are summarized and summarized, and the corresponding binding operation flows of different access types are different, so that in the embodiment of the invention, corresponding binding page templates are respectively set for different access types, so that when the intelligent device to be accessed is bound, the corresponding binding page template is obtained only according to the access type, the binding operation flow corresponding to the binding page template is executed according to a binding page XML description file input by the intelligent device to be accessed aiming at the binding page template, and the binding page is displayed, so that the binding process of the intelligent device to be accessed can be realized.
The following describes the XML data specification for binding page templates, specifically:
1) and inputting information such as identification and name of the intelligent equipment.
2) And inputting the access type information of the intelligent equipment.
For example, the access type may use a guideType tag identifier, a value of which is an int type, and a value of the guideType indicates an access mode of the smart device.
The access type includes, for example, zigbee access, and link (andlink) wireless access, andlink wired access, and wireless Access Point (AP) access, a mapping relationship between a value of GuideType and the access type may be set, for example, a GuideType value of 1 indicates zigbee access, a value of 2 indicates andlink wireless access, and the embodiment of the present invention is not limited in this embodiment.
Therefore, different binding page templates are extracted and set according to different access modes because the access modes are different and the binding flows which need to be operated by users in the access are different.
3) And (4) entering information of the binding page of the intelligent equipment.
In the embodiment of the present invention, the binding page template at least includes a plurality of binding pages, the binding pages may be identified by a guideppage tag, and include a page element list, for example, the page element list may be identified by a GuideTipList tag, the GuideTipList includes a plurality of binding operation elements, for example, steps for entering user operations and corresponding guide pictures, a user may configure one to a plurality of binding operation elements, and the pictures and the text description may be set according to actual requirements.
For example, in a binding operation flow of a certain smart device, a plurality of binding pages may be used to enable a user to perform corresponding operations according to pictures or text descriptions displayed on the binding pages, for example, a binding page may be displayed on the binding page, and the user may register or input a user name or a password according to a prompt, so that the user may log in.
Therefore, in the embodiment of the present invention, multiple guidepages may be configured, and the app client may display one or more guided binding pages to the user according to the number of guidepages.
4) Each page tag also corresponds to a binding state identifier, the binding state identifier can be identified by a guideppage tag, and the binding state identifier is added, so that the current binding state can be displayed, and the user can conveniently check the current binding state, for example, the binding state is guiding, connection, wifi input, failure and the like.
In a second aspect: and determining a control page template corresponding to the intelligent device to be accessed according to the mapping relation between the device type of the intelligent device and the control page template.
The management and control page template at least comprises one management and control page, and each management and control page at least comprises management and control state information of a plurality of attributes.
The control state information represents current state information of an attribute corresponding to a control instruction that is operable or exposable by a user, for example, for a certain intelligent switch, the control state information is on or off.
In the embodiment of the invention, different management and control page templates are set mainly according to the management and control instructions and the managed and controlled states of different intelligent devices, and because the different types of the devices have larger difference of the management and control pages, the different management and control page templates are set based on different types of the devices, which can also be called as management and control types.
The following description of the XML data specification for the template of the managed page, specifically:
1) and inputting information such as identification and name of the intelligent equipment.
2) And entering the equipment type information of the intelligent equipment.
For example, the setting type may be identified by a ControlType tag, the device type is different, the management and control page is different, and based on this, different management and control page templates are extracted and identified by the device type.
3) The control page template at least comprises a control page, a control model label identifier can be adopted, different values of the control model are determined, page elements displayed in the control page template are determined, the page elements can display different states when information of the intelligent device changes, and corresponding display is carried out according to the state of attribute information of the intelligent device.
Step 120: and accessing the intelligent equipment to be accessed based on the corresponding binding page template, the corresponding control page template and the corresponding attribute information description file.
Specifically, the method comprises the following steps: displaying a binding page to be accessed into the intelligent equipment based on the corresponding binding page template and the binding page information of the intelligent equipment to be accessed; displaying a control page to be accessed into the intelligent equipment based on the corresponding control page template and corresponding attribute state information in the attribute description information file to be accessed into the intelligent equipment; and accessing the intelligent equipment to be accessed based on the binding page and the control page.
That is to say, in the embodiment of the present invention, after the binding page template and the control page template are determined, the binding page XML description file and the control page XML description file corresponding to the to-be-accessed intelligent device may be determined according to the information correspondingly entered according to the template data specification, so that the functional logic corresponding to the binding page template and the control page template is executed according to the binding page XML description file and the control page XML description file, the binding page and the control page are displayed, the binding and the control function of the intelligent device is realized, and the access of the intelligent device is realized.
Therefore, according to the embodiment of the invention, the corresponding binding page template and the corresponding control page template can be determined according to the access type and the device type, developers do not need to develop the binding page and the control page again, the reusability is higher, the access of the intelligent device can be realized according to the binding page template, the control page template and the attribute information description file, the efficiency is higher, and the cost is also reduced.
The following specific application scenario is adopted for specific explanation, when the specific implementation is realized, when an intelligent device is accessed, the attribute information, the guiding binding page information and the control page information of the intelligent device are input into the corresponding XML description file, when the intelligent device is accessed to an APP client, the APP client code analyzes the corresponding XML description file, and a binding page object GuidImodel, a control page object ControlModel and an intelligent device object DeviceModel when the intelligent device is accessed can be generated.
In this way, the access type may be determined according to the guideType in the guideemodel, a specific binding page template is skipped to, the content of the binding page template is filled with specific information in the guideemodel, a specific binding function logic of the binding page template is executed, and communication binding between the app and the smart device is performed, which is specifically shown in fig. 2, and is a binding page execution logic diagram in the smart device access method in the embodiment of the present invention, which specifically includes:
step 200: and acquiring the DeviceTypeId of the intelligent equipment according to the intelligent equipment selected by the user.
Step 201: and analyzing the corresponding XML description file according to the DeviceTypeId to generate a binding page object GuideModel.
Step 202: and determining an access type GuideType, and performing different treatments according to the value of the GuideType.
The method is divided into the following cases, taking the values of the guideType as 1-6 respectively as an example, and divided into the steps 203-214.
Step 203: the value is 1: zigbee access.
Step 204: and determining the corresponding zigbee binding page template.
Step 205: the value is 2: and performing wireless access on the andlink.
Step 206: and determining the corresponding wireless binding page template of the andlink.
Step 207: the value is 3: andlink wired access.
Step 208: and determining the corresponding andlink cable binding page template.
Step 209: the value is 4: and accessing by the AP.
Step 210: and determining the corresponding AP mode binding page template.
Step 211: the value is 5: and the cloud gateway is in wired access.
Step 212: and determining the corresponding wired binding page template of the cloud gateway.
Step 213: the value is 6: and the cloud gateway is in wireless access.
Step 214: and determining the corresponding wireless binding page template of the cloud gateway.
And then, according to different binding page templates and corresponding input XML description files of the intelligent equipment, the function logic of the binding page templates is executed, the binding page information of the intelligent equipment is displayed, and the binding of the intelligent equipment is realized.
Moreover, a device type, that is, a control type, may also be determined according to a ControlType in the ControlModel, where the control type specifically refers to an operable and displayable function of the smart device, and according to different control types, different control page templates are selected for jumping, and a corresponding control capability is executed according to specific attribute information of the smart device, as shown in fig. 3, which is a schematic diagram of a control page execution logic in the smart device access method in the embodiment of the present invention, and specifically includes:
step 300: and acquiring the DeviceTypeId of the intelligent equipment according to the intelligent equipment selected by the user.
Step 301: and analyzing the corresponding XML description file according to the DeviceTypeId to generate a control page object ControlModel.
Step 302: and determining the equipment type ControlType, and performing different processing according to the value of the ControlType.
The method is divided into the following cases, taking the values of ControlType as 1-5 respectively as an example, and divided into steps 303-312.
Step 303: the value is 1: socket, row of inserting.
Step 304: and displaying the current equipment state, switch, timing and other capabilities.
Step 305: the value is 2: and (4) switching.
Step 306: and displaying the current equipment state, switch, timing and other capabilities.
Step 307: the value is 3: security devices such as door magnets, smoke sensors, etc.
Step 308: and displaying the switching on and off of the equipment, the alarm state and the arming and disarming capabilities.
Step 309: the value is 4: emergency button, doorbell.
Step 310: and displaying the online state and the switching capability of the equipment.
Step 311: the value is 5: PM2.5 detection device.
Wherein PM2.5 refers to particulate matter with an aerodynamic equivalent diameter of less than or equal to 2.5 microns in the atmosphere.
Step 312: and displaying the values of PM2.5, temperature, humidity and the like in an online state and an offline state of the equipment.
In the embodiment of the present invention, a corresponding control page template may be determined according to different device types, a page element on the control page template is displayed, and a corresponding control capability is executed according to a current specific attribute value of the smart device, for example, if the smart device is a switch, the control page template corresponding to the switch is determined, the current device state, the capabilities of switching, timing, and the like are displayed by calling the control page template, and if the current switch state attribute value is determined to be on according to the current attribute value, the switch is in an on state according to the control instruction.
Of course, it is noted that in the embodiments corresponding to fig. 2 and fig. 3, values of different guidetypes, mapping relationships between the values of the guidetypes and the access types, and mapping relationships between the values of the different controltypes and the mapping relationships between the values of the controltypes and the device types are only one possible embodiment, and may also include more other different access types and device types, and may also set different mapping relationships, which is not limited in the embodiment of the present invention.
Based on the above embodiments, referring to fig. 4, in an embodiment of the present invention, an intelligent device access apparatus specifically includes:
the acquiring module 40 is configured to acquire an identifier of the to-be-accessed intelligent device, acquire an attribute information description file of the to-be-accessed intelligent device according to a mapping relationship between a preset identifier of the intelligent device and the attribute information description file, and acquire an access type and a device type of the to-be-accessed intelligent device;
the determining module 41 is configured to determine a binding page template corresponding to the to-be-accessed intelligent device according to a preset mapping relationship between an access type and the binding page template, and determine a control page template corresponding to the to-be-accessed intelligent device according to a mapping relationship between a device type of the intelligent device and the control page template;
and the access module 42 is configured to access the to-be-accessed intelligent device based on the corresponding binding page template, the corresponding management and control page template, and the corresponding attribute information description file.
Optionally, the attribute information description file includes a plurality of tag fields, and each tag field corresponds to one attribute information; the attribute information includes, but is not limited to, one or any combination of the following: and the name, the value type, the value range and the value enumeration of the attribute information of the intelligent equipment.
Optionally, the obtaining module 40 is further configured to: if the fact that a label representing a public attribute information file exists in an attribute information description file corresponding to the equipment to be accessed is determined, the corresponding public attribute information file is obtained according to the label representing the public attribute information file, and public attribute information in the obtained public attribute information file is used as attribute information of the equipment to be accessed; wherein the common attribute information file is composed of a plurality of tag fields of the same attribute information that a plurality of smart devices have.
Optionally, the binding page template at least includes a plurality of binding pages, each binding page corresponds to one page tag, each page tag corresponds to one page element list, and one page element list at least includes a plurality of binding operation elements, where the binding operation elements at least include pictures and word descriptions.
Optionally, each page tag further corresponds to a binding state identifier, where the binding state identifier indicates a current binding state.
Optionally, the management and control page template includes at least one management and control page, and each management and control page includes at least management and control state information of multiple attributes.
Referring to fig. 5, in an embodiment of the invention, a structural schematic diagram of an electronic device is shown.
An embodiment of the present invention provides an electronic device, which may include a processor 510 (CPU), a memory 520, an input device 530, an output device 540, and the like, wherein the input device 530 may include a keyboard, a mouse, a touch screen, and the like, and the output device 540 may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), and the like.
acquiring an identifier of an intelligent device to be accessed, acquiring an attribute information description file of the intelligent device to be accessed according to a preset mapping relation between the identifier of the intelligent device and the attribute information description file, and acquiring an access type and a device type of the intelligent device to be accessed;
determining a binding page template corresponding to the intelligent equipment to be accessed according to a preset mapping relation between the access type and the binding page template, and determining a control page template corresponding to the intelligent equipment to be accessed according to a mapping relation between the equipment type of the intelligent equipment and the control page template;
and accessing the intelligent equipment to be accessed based on the corresponding binding page template, the corresponding control page template and the corresponding attribute information description file.
Optionally, the attribute information description file includes a plurality of tag fields, and each tag field corresponds to one attribute information; the attribute information includes, but is not limited to, one or any combination of the following: and the name, the value type, the value range and the value enumeration of the attribute information of the intelligent equipment.
Optionally, the processor 510 is further configured to:
if the fact that a label representing a public attribute information file exists in an attribute information description file corresponding to the equipment to be accessed is determined, the corresponding public attribute information file is obtained according to the label representing the public attribute information file, and public attribute information in the obtained public attribute information file is used as attribute information of the equipment to be accessed; wherein the common attribute information file is composed of a plurality of tag fields of the same attribute information that a plurality of smart devices have.
Optionally, the binding page template at least includes a plurality of binding pages, each binding page corresponds to one page tag, each page tag corresponds to one page element list, and one page element list at least includes a plurality of binding operation elements, where the binding operation elements at least include pictures and word descriptions.
Optionally, each page tag further corresponds to a binding state identifier, where the binding state identifier indicates a current binding state.
Optionally, the management and control page template includes at least one management and control page, and each management and control page includes at least management and control state information of multiple attributes.
Based on the foregoing embodiments, in the embodiments of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the intelligent device access method in any of the above method embodiments.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.
Claims (14)
1. An intelligent device access method is characterized by comprising the following steps:
acquiring an identifier of an intelligent device to be accessed, acquiring an attribute information description file of the intelligent device to be accessed according to a preset mapping relation between the identifier of the intelligent device and the attribute information description file, and acquiring an access type and a device type of the intelligent device to be accessed;
determining a binding page template corresponding to the intelligent equipment to be accessed according to a preset mapping relation between the access type and the binding page template, and determining a control page template corresponding to the intelligent equipment to be accessed according to a mapping relation between the equipment type of the intelligent equipment and the control page template;
and accessing the intelligent equipment to be accessed based on the corresponding binding page template, the corresponding control page template and the corresponding attribute information description file.
2. The method of claim 1, wherein the attribute information description file includes a plurality of tag fields, each tag field corresponding to one attribute information; the attribute information includes, but is not limited to, one or any combination of the following: and the name, the value type, the value range and the value enumeration of the attribute information of the intelligent equipment.
3. The method of claim 1 or 2, further comprising:
if the fact that a label representing a public attribute information file exists in an attribute information description file corresponding to the equipment to be accessed is determined, the corresponding public attribute information file is obtained according to the label representing the public attribute information file, and public attribute information in the obtained public attribute information file is used as attribute information of the equipment to be accessed; wherein the common attribute information file is composed of a plurality of tag fields of the same attribute information that a plurality of smart devices have.
4. The method of claim 1, wherein the binding page template comprises at least a plurality of binding pages, each binding page corresponds to a page tag, each page tag corresponds to a page element list, and a page element list comprises at least a plurality of binding operation elements, wherein a binding operation element comprises at least a picture or a text description.
5. The method of claim 4, wherein each page tag further corresponds to a binding state identifier, wherein the binding state identifier indicates a current binding state.
6. The method of claim 1, wherein the administration page template comprises at least one administration page, and each administration page comprises at least administration state information of a plurality of attributes.
7. An intelligent device access apparatus, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring an identifier of the intelligent equipment to be accessed, acquiring an attribute information description file of the intelligent equipment to be accessed according to a preset mapping relation between the identifier of the intelligent equipment and the attribute information description file, and acquiring an access type and an equipment type of the intelligent equipment to be accessed;
the determining module is used for determining a binding page template corresponding to the intelligent equipment to be accessed according to a preset mapping relation between an access type and the binding page template, and determining a control page template corresponding to the intelligent equipment to be accessed according to a mapping relation between an equipment type of the intelligent equipment and the control page template;
and the access module is used for accessing the intelligent equipment to be accessed based on the corresponding binding page template, the corresponding control page template and the corresponding attribute information description file.
8. The apparatus of claim 7, wherein the attribute information description file includes a plurality of tag fields, each tag field corresponding to one attribute information; the attribute information includes, but is not limited to, one or any combination of the following: and the name, the value type, the value range and the value enumeration of the attribute information of the intelligent equipment.
9. The apparatus of claim 7 or 8, wherein the obtaining module is further to:
if the fact that a label representing a public attribute information file exists in an attribute information description file corresponding to the equipment to be accessed is determined, the corresponding public attribute information file is obtained according to the label representing the public attribute information file, and public attribute information in the obtained public attribute information file is used as attribute information of the equipment to be accessed; wherein the common attribute information file is composed of a plurality of tag fields of the same attribute information that a plurality of smart devices have.
10. The apparatus of claim 7, wherein the binding page template comprises at least a plurality of binding pages, each binding page corresponds to a page tag, each page tag corresponds to a page element list, and each page element list comprises at least a plurality of binding operation elements, wherein a binding operation element comprises at least a picture or a text description.
11. The apparatus of claim 10, wherein each page tag further corresponds to a binding state identifier, wherein the binding state identifier indicates a current binding state.
12. The apparatus of claim 7, wherein the managed page template comprises at least one managed page, and each managed page comprises at least managed state information of a plurality of attributes.
13. An electronic device, comprising:
at least one memory for storing a computer program;
at least one processor adapted to implement the steps of the method according to any of claims 1-6 when executing a computer program stored in a memory.
14. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program realizing the steps of the method according to any one of claims 1-6 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811368854.XA CN111200545B (en) | 2018-11-16 | 2018-11-16 | Intelligent device access method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811368854.XA CN111200545B (en) | 2018-11-16 | 2018-11-16 | Intelligent device access method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111200545A CN111200545A (en) | 2020-05-26 |
CN111200545B true CN111200545B (en) | 2021-11-30 |
Family
ID=70746027
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811368854.XA Active CN111200545B (en) | 2018-11-16 | 2018-11-16 | Intelligent device access method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111200545B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112184144A (en) * | 2020-09-08 | 2021-01-05 | 杭州涂鸦信息技术有限公司 | Intelligent equipment delivery method and system in network-free environment |
CN112328245A (en) * | 2020-10-30 | 2021-02-05 | 深圳优美创新科技有限公司 | Page display method, system, electronic equipment and storage medium |
CN112711410A (en) * | 2020-12-17 | 2021-04-27 | 浙江高速信息工程技术有限公司 | Construction method of tunnel intelligent monitoring system, electronic device and medium |
CN113052442A (en) * | 2021-03-09 | 2021-06-29 | 合安科技技术有限公司 | Equipment information management method, equipment information acquisition method, related terminal and system |
CN113535132B (en) * | 2021-07-26 | 2024-05-07 | 中移(杭州)信息技术有限公司 | Equipment access method, device, terminal equipment and storage medium |
CN114040419B (en) * | 2021-11-29 | 2023-07-11 | 四川虹美智能科技有限公司 | ZigBee equipment network distribution method based on H5 |
CN114024851B (en) * | 2021-12-01 | 2024-08-02 | 深圳绿米联创科技有限公司 | Network access configuration information generation method, network access configuration device and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138609A (en) * | 2015-08-04 | 2015-12-09 | 广东瑞德智能科技股份有限公司 | XML language based household appliance description method |
CN105306676A (en) * | 2015-09-14 | 2016-02-03 | 北京奇虎科技有限公司 | Method, apparatus and system for accessing intelligent device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8739178B2 (en) * | 2006-07-21 | 2014-05-27 | Schweitzer Engineering Laboratories, Inc. | Method of configuring intelligent electronic devices to facilitate standardized communication messages among a plurality of IEDS within a network |
CN103761472B (en) * | 2014-02-21 | 2017-05-24 | 北京奇虎科技有限公司 | Application program accessing method and device based on intelligent terminal |
-
2018
- 2018-11-16 CN CN201811368854.XA patent/CN111200545B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138609A (en) * | 2015-08-04 | 2015-12-09 | 广东瑞德智能科技股份有限公司 | XML language based household appliance description method |
CN105306676A (en) * | 2015-09-14 | 2016-02-03 | 北京奇虎科技有限公司 | Method, apparatus and system for accessing intelligent device |
Also Published As
Publication number | Publication date |
---|---|
CN111200545A (en) | 2020-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111200545B (en) | Intelligent device access method and device | |
US10824691B2 (en) | Page rendering method, device, and data storage medium | |
US11163851B2 (en) | Method, apparatus, computer device and storage medium of page displaying | |
US10284705B2 (en) | Method and apparatus for controlling smart device, and computer storage medium | |
CN110673847A (en) | Configuration page generation method and device, electronic equipment and readable storage medium | |
CN110297637B (en) | Resource file hot-reloading development tool and method applicable to full-platform client software | |
CN103823676A (en) | Display control method, display control device and client side | |
CN110866152A (en) | Fault code retrieval method and device, electronic equipment and readable storage medium | |
CN110647278A (en) | Method and device for controlling plug-in display, computing equipment and storage medium | |
CN112417515B (en) | Configuration software protocol processing method and system | |
CN112306594A (en) | Rendering method and device based on mobile terminal and storage medium | |
CN107797805B (en) | Code packaging method and device and computer readable storage medium | |
CN113703781A (en) | Storage system interface generation method and device, electronic equipment and readable storage medium | |
CN115712422A (en) | Form page generation method and device, computer equipment and storage medium | |
CN113688423A (en) | Data management method, system and equipment of mobile vaccination vehicle | |
CN112597023A (en) | Case management method and device based on guide picture, computer equipment and storage medium | |
CN116431200A (en) | Configuration method, device, equipment and storage medium for application data configuration information | |
CN110928801A (en) | Role authority test method and device, computer medium and electronic equipment | |
CN113971019B (en) | Data type creation method, device, server and medium | |
US20210334076A1 (en) | System for providing software development environment, method for providing software development environment, and non-transitory computer readable medium | |
CN113918194A (en) | Page component display method and device, electronic equipment and storage medium | |
CN104780148A (en) | Server, terminal, system and method for document online operation | |
CN113971028B (en) | Data processing method, apparatus, device, storage medium and computer program product | |
CN118444943B (en) | Container image creation method, device, electronic equipment and storage medium | |
CN111190872B (en) | Inheritable and extensible data processing method and application thereof to analysis log |
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 |