Internet of Things device list rendering method, device, system and readable storage medium
By responding to the IoT device list rendering operation instructions, obtaining and using customized tiles to replace the general tiles, and dynamically rendering the IoT device list, the problem of single function and poor user experience in the existing technology is solved, and the device list is realized. Intelligent rendering and maintenance convenience.
Patent Information
- Application Number
- CN202011573084.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-12-25
AI Technical Summary
The existing IoT device list has a single function and cannot effectively respond dynamically to changes in device status, resulting in poor user experience.
By responding to the IoT device list rendering operation command, it determines that the target device list card is the card corresponding to the smart single device, requests the cloud server to obtain customized tiles, replaces the general tiles, and dynamically renders the device list through MQTT information.
It implements customized rendering of the IoT device list, generates custom cards based on the status of smart single products, optimizes user experience and decouples the relationship between the device list and smart single products to facilitate subsequent maintenance.
Smart Images

Figure CN112631705B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things, and in particular to a method, device, system and readable storage medium for rendering a list of Internet of Things devices. Background Art
[0002] In the prior art, with the rapid development of IoT communication technology, more and more smart single devices are added to the IoT device group. Users manage the IoT device group through mobile terminals. However, the IoT device list in the existing mobile terminal has a single function and can only simply control the IoT devices. The presentation method of smart single products in the IoT device list is also relatively simple, and it cannot effectively follow the status changes of the IoT devices and dynamically respond, resulting in poor user experience. Summary of the invention
[0003] The main purpose of the present invention is to provide a method for rendering a list of IoT devices, aiming to solve technical problems that cannot be solved by the prior art.
[0004] To achieve the above object, the present invention provides a method for rendering an IoT device list, comprising the following contents:
[0005] In response to the IoT device list rendering operation instruction, determine the target device list card that needs to be rendered, where the target device list card is the device list card corresponding to the smart single product device in the IoT device list;
[0006] Requesting a cloud server to obtain a customized tile of the smart single product device, wherein the customized tile is a preset custom tile reflecting the current operation information of the smart single product device;
[0007] The customized tile is used to replace the generic tile of the target device list card.
[0008] Wherein, before the step of responding to the IoT device list rendering operation instruction and determining the target device list card to be rendered, the step further includes:
[0009] Obtaining locally stored at least one piece of smart single product equipment information pushed by an Internet of Things management application;
[0010] A universal tile is used as the device list card of the smart single product device.
[0011] Wherein, responding to the IoT device list rendering operation instruction and determining the step of rendering the target device list card to be performed also includes:
[0012] Obtain the application uniform resource locator of the smart single product device corresponding to the target device list card pushed by the Internet of Things management application, access the application uniform resource locator to obtain the object model of the smart single product device, and parse the object model to obtain the operation information of the smart single product device.
[0013] The step of requesting the cloud server to obtain the customized magnetic tile of the smart single product device includes:
[0014] Initiate a request to the cloud server to obtain the customized magnetic tile of the smart single product device;
[0015] Receive a request response status code returned by the cloud server, wherein the request response status code response status is a successful request;
[0016] Receive customized tiles for real-time smart single-product devices asynchronously sent back by the cloud server.
[0017] The step of requesting the cloud server to obtain the customized magnetic tile of the smart single product device includes:
[0018] Initiate a request to the cloud server to obtain the customized magnetic tile of the smart single product device;
[0019] Receive the request response status code asynchronously returned by the cloud server, where the response status of the request response status code is request failure;
[0020] The device list card of the smart product is marked as a general product card, and rendering of the general product is stopped.
[0021] The step of requesting the cloud server to obtain the customized magnetic tile of the smart single product device also includes:
[0022] Detecting the operating status of the smart single product device;
[0023] If the smart product is in the power-on state, request and obtain the customized animation file of the device list card of the smart product device from the cloud server;
[0024] The customized animation file is loaded to render the device list card of the smart single product device.
[0025] Wherein, after the step of replacing the general tile of the target device list card with the customized tile, the method further includes:
[0026] Obtain the MQTT information carrying the status information of the smart single product device transmitted by the IoT management application, trigger the pre-subscribed events related to the smart single product device information, and transmit the MQTT information to the corresponding target device list card for re-rendering.
[0027] In addition, to achieve the above-mentioned purpose, the present invention also provides an Internet of Things device list rendering device, which includes: a memory, a processor, and an Internet of Things device list rendering program stored in the memory and executable on the processor. When the Internet of Things device list rendering program is executed by the processor, the steps of the above-mentioned Internet of Things device list rendering method are implemented.
[0028] The present invention also provides an Internet of Things device list rendering system, the Internet of Things device list rendering system comprising:
[0029] A smart single-product device group is a plurality of smart single-product devices that mutually constitute the Internet of Things;
[0030] The WIFI module is used to parse the data reported by the smart single product in the smart single product device group, obtain the status information of the smart single product device, or parse the operation instructions issued by the cloud server, translate and send them to the device;
[0031] The cloud server acts as a message broker in the IoT device list rendering system to publish MQTT messages;
[0032] An IoT device list rendering device, installed with the IoT management application, used to obtain the status information of the smart single product device group and dynamically render the IoT device list;
[0033] The IoT device list rendering system implements the steps of the IoT device list rendering method described above when executed.
[0034] The present invention also provides a computer-readable storage medium, on which an Internet of Things device list rendering program is stored. When the Internet of Things device list rendering program is executed by a processor, the steps of the Internet of Things device list rendering method described above are implemented.
[0035] An embodiment of the present invention proposes a method for rendering an IoT device list. The method determines the target device list card that needs to be rendered by responding to an IoT device list rendering operation instruction. The target device list card is the device list card corresponding to the smart single product device in the IoT device list. The method requests a cloud server to obtain a customized tile for the smart single product device. The customized tile is a preset custom tile that reflects the current operating information of the smart single product device. The method uses the customized tile to replace the general tile of the target device list card. The method realizes the rendering of the IoT device list and enables the device list card of the IoT device list to be specially rendered according to a specific smart single product device, thereby generating a customized target device list card. At the same time, the relationship between the IoT device list and the smart single product is decoupled, which is convenient for subsequent maintenance and optimizes the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic diagram of the structure of an Internet of Things device list rendering device in a hardware operating environment involved in an embodiment of the present invention;
[0037] Figure 2 It is a schematic diagram of the process of the first embodiment of the present invention;
[0038] Figure 3 is a flow chart of a second embodiment of the present invention;
[0039] Figure 4 is a schematic diagram of a flow chart of a third embodiment of the present invention;
[0040] Figure 5 is a schematic diagram of a flow chart of a fourth embodiment of the present invention;
[0041] Figure 6 is a schematic diagram of a flow chart of a fifth embodiment of the present invention;
[0042] Figure 7 It is a schematic diagram of the structure of an Internet of Things device list rendering system in a hardware operating environment involved in an embodiment of the present invention.
[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0045] The main solution of the embodiment of the present invention is: responding to the IoT device list rendering operation instruction, determining the target device list card that needs to be rendered, the target device list card is the device list card corresponding to the smart single product device in the IoT device list; requesting the cloud server to obtain the customized tile of the smart single product device, the customized tile is a preset custom tile that reflects the current operating information of the smart single product device; using the customized tile to replace the general tile of the target device list card.
[0046] In the prior art, with the rapid development of IoT communication technology, more and more smart single devices are added to the IoT device group. Users manage the IoT device group through mobile terminals. However, the IoT device list in the existing mobile terminal has a single function and can only simply control the IoT devices. The presentation method of smart single products in the IoT device list is also relatively simple, and it cannot effectively follow the status changes of the IoT devices and dynamically respond, resulting in poor user experience.
[0047] The present invention provides a solution, which determines the target device list card that needs to be rendered by responding to the IoT device list rendering operation instruction, wherein the target device list card is the device list card corresponding to the smart single product device in the IoT device list; requests the cloud server to obtain the customized tile of the smart single product device, wherein the customized tile is a preset custom tile reflecting the current operation information of the smart single product device; and uses the customized tile to replace the general tile of the target device list card. The rendering of the IoT device list is realized, and the device list card of the IoT device list can be specially rendered according to the specific smart single product device, and a customized target device list card is generated. At the same time, the relationship between the IoT device list and the smart single product is decoupled, which is convenient for subsequent maintenance and optimizes the user experience.
[0048] Reference Figure 1 , Figure 1 It is a structural schematic diagram of an Internet of Things device list rendering device in a hardware operating environment involved in an embodiment of the Internet of Things device list rendering method of the present invention.
[0049] like Figure 1As shown, the IoT device list rendering device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0050] Optionally, the IoT device list rendering device may also include a tuner, a return channel, an RF (Radio Frequency) circuit, a sensor, an audio circuit, and the like.
[0051] Those skilled in the art will understand that Figure 1 The hardware structure of the IoT device list rendering device shown in the figure does not constitute a limitation on the IoT device list rendering device, and may include Figure 1 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.
[0052] like Figure 1 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and an IoT device list rendering program. The operating system is a program that manages and controls the IoT device list rendering device application program and supports the operation of the IoT device list rendering device application program.
[0053] exist Figure 1 In the hardware structure of the IoT device list rendering device shown, the network interface 1004 is mainly used to access the network, the user interface 1003 is mainly used to receive operation instructions issued by the user, and the processor 1001 can be used to call the IoT device list rendering program stored in the memory 1005 and perform the following operations:
[0054] In response to the IoT device list rendering operation instruction, determine the target device list card that needs to be rendered, where the target device list card is the device list card corresponding to the smart single product device in the IoT device list;
[0055] Requesting a cloud server to obtain a customized tile of the smart single product device, wherein the customized tile is a preset custom tile reflecting the current operation information of the smart single product device;
[0056] The customized tile is used to replace the generic tile of the target device list card.
[0057] Further, the processor 1001 may call the IoT device list rendering program in the memory 1005, and further perform the following operations:
[0058] Obtaining locally stored at least one piece of smart single product equipment information pushed by an Internet of Things management application;
[0059] A universal tile is used as the device list card of the smart single product device.
[0060] Further, the processor 1001 may call the IoT device list rendering program in the memory 1005, and further perform the following operations:
[0061] Obtain the application uniform resource locator of the smart single product device corresponding to the target device list card pushed by the Internet of Things management application, access the application uniform resource locator to obtain the object model of the smart single product device, and parse the object model to obtain the operation information of the smart single product device.
[0062] Further, the processor 1001 may call the IoT device list rendering program in the memory 1005, and further perform the following operations:
[0063] Initiate a request to the cloud server to obtain the customized magnetic tile of the smart single product device;
[0064] Receive a request response status code returned by the cloud server, wherein the request response status code response status is a successful request;
[0065] Receive customized tiles for real-time smart single-product devices asynchronously sent back by the cloud server.
[0066] Further, the processor 1001 may call the IoT device list rendering program in the memory 1005, and further perform the following operations:
[0067] Initiate a request to the cloud server to obtain the customized magnetic tile of the smart single product device;
[0068] Receive a request response status code asynchronously returned by the cloud server, wherein the request response status code response status is request failure;
[0069] The device list card of the smart product is marked as a general product card, and rendering of the general product is stopped.
[0070] Further, the processor 1001 may call the IoT device list rendering program in the memory 1005, and further perform the following operations:
[0071] Detecting the operating status of the smart single product device;
[0072] If the smart product is in the power-on state, request and obtain the customized animation file of the device list card of the smart product device from the cloud server;
[0073] The customized animation file is loaded to render the device list card of the smart single product device.
[0074] Further, the processor 1001 may call the IoT device list rendering program in the memory 1005, and further perform the following operations:
[0075] Obtain the MQTT information carrying the status information of the smart single product device transmitted by the IoT management application, trigger the subscription of the event related to the smart single product device information, transmit the MQTT information to the corresponding device list card, and re-render.
[0076] Based on the hardware structure of the IoT device list rendering device, various embodiments of the IoT device list rendering method of the present invention are proposed.
[0077] Reference Figure 2 , Figure 2 It is a flowchart of the first embodiment of the method for rendering a list of IoT devices of the present invention.
[0078] The embodiments of the present application provide an embodiment of a method for rendering a list of IoT devices. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown here.
[0079] In this embodiment, the method for rendering the IoT device list includes:
[0080] Step S10: responding to the IoT device list rendering operation instruction, determining the target device list card that needs to be rendered;
[0081] The Internet of Things is an emerging application model that is rapidly developing based on the popularization of information technology, in which information is exchanged and connected between users and smart single-product devices, and between smart single-product devices. Users can remotely control multiple smart single-product devices in the Internet of Things through the Internet of Things management application installed on the mobile terminal. Among them, multiple smart single-product devices in the Internet of Things can also obtain user operation instructions through communication methods such as WIFI modules, and perform corresponding operations according to the user's operation instructions. In a specific embodiment, the smart single-product device includes a smart door lock. The user remotely issues an unlocking instruction to the smart door lock through the smart terminal. The smart door lock accesses the network through WIFI, obtains the unlocking instruction issued by the user, and performs the corresponding unlocking operation.
[0082] Optionally, users can generate an IoT device list on a smart terminal. The IoT device list is built based on React Native (a hybrid mobile application development framework) and is composed of device list cards corresponding to all smart single-product devices in the IoT established by the user. The list can obtain status information of smart single-product devices in the IoT by interacting with the IoT management application, and send control commands to smart single-product devices in the IoT through the IoT management application to control the smart single-product devices to perform corresponding operations.
[0083] Optionally, after the user's mobile terminal with the IoT management application is started and connected to the Internet via WIFI, cellular communication network or other network connection methods, the IoT management application downloads the physical model of the interconnected smart single product devices in the IoT in the background, and obtains the functions and operating status of the interconnected smart single product devices in the IoT. Among them, the physical model is a digital representation of the physical device in the physical space stored in the cloud server, which abstracts the actual product into a JSON format data model composed of attributes, services and events, which is convenient for the cloud server to manage and interact with data.
[0084] When the IoT management application obtains the object model of the interconnected smart single product device in the IoT, it pushes the appUrl (application uniform resource locator) of the corresponding smart single product device to the IoT device list through the onRemoteMessage method. The IoT device list responds to the IoT device list rendering operation instruction, obtains the appUrl of the smart single product device pushed by the IoT management application by listening to the onRemoteMessage event, parses the appUrl of the smart single product device, and the device list card in the IoT device list connects to the corresponding smart single product device in the IoT management application according to the appUrl of the smart single product device, determines the device list card corresponding to the smart single product device, and marks the device list card as the target device list card that needs to be rendered.
[0085] Step S20: Requesting the cloud server to obtain the customized magnetic tile of the smart single product device;
[0086] The IoT device list obtains the appUrl (application uniform resource locator) of the smart single product device pushed by the IoT management application by listening to the onRemoteMessage event, and parses the appUrl of the smart single product device. The device list card in the IoT device list is connected to the corresponding smart single product device in the IoT management application according to the appUrl of the smart single product device. The IoT device list marks the device list card of the smart single product device corresponding to the obtained appUrl of the smart single product device as the target device list card. The IoT device list sends the status information event of the smart single product device corresponding to the target device list card to the cloud server, and remotely requests the cloud server to obtain the customized tile corresponding to the status information of the smart single product device. The customized tile is a custom tile corresponding to the preset smart single product device stored in the IoT smart single product device deployment directory in the cloud server. The customized tile can personalize the corresponding target device list card, so that the user can interact with the smart single product device by operating the customized tile to optimize the target device list card.
[0087] Specifically, after the IoT device list remotely requests the cloud server to obtain the customized tile corresponding to the device status information of the smart single product, the cloud server returns a request response status code (response status) with read-only attributes, and the IoT device list parses the request response status code to determine the request status for obtaining the customized tile. Optionally, in a specific embodiment, if the request response status code is 200, it means that the IoT device list successfully requests to obtain the customized tile corresponding to the device status information of the smart single product. The cloud server asynchronously returns the customized tile file, and the IoT device list obtains the customized tile asynchronously returned by the cloud server.
[0088] Step S30: using the universal tile as the device list card of the smart single device.
[0089] After the IoT device list obtains the customized tile returned by the cloud server, it executes the customized tile file. After the customized tile file is executed, a custom customized tile component will be generated. The customized tile component is a preset tile component corresponding to the current status information of the smart single product device, which can display the current status information of the smart single product. The IoT device list will replace the original universal tile of the target device list card with the generated customized tile component, and update the customized tile component to the current card tile of the target device list card. Optionally, the size of the updated target device list card can be the same as the universal tile area of the original target device list card; or the size of the updated target device list card is larger than the universal tile area of the original target device list card; or the size of the updated target device list card is smaller than the universal tile area of the original target device list card.
[0090] Optionally, after the customized tile component replaces the original universal tile of the IoT device list, a new target device list card is formed. Optionally, the current target device list card has a corresponding smart single device in the IoT, and the current target device list card is bound to the appUrl (application uniform resource locator) in the IoT management application of the corresponding smart single device. When the current target device list card is displayed in the IoT device list, the current target list card displays the object model of the corresponding smart single device, that is, the current target device list card displays the interactive items such as properties, services and events of the smart single device for users to interact.
[0091] Among them, the optional attribute items are the properties or characteristics of the smart single product device corresponding to the current target device list card, such as the model, device address, and device appearance of the smart single product device.
[0092] Optionally, the service is a control option for the smart single product device corresponding to the current target device list card, such as power on, power off, standby, pause, and other management options for the smart single product device.
[0093] Optionally, the event is the current operating status of the smart single product device corresponding to the current list card of the target device.
[0094] After the customized tile component renders the target device list card, the user can intuitively see the attribute information and current operation information of a specific smart single product device in the Internet of Things on the current list card, and the user can also interact through the service options in the current target device list card to control the corresponding smart single product device in the Internet of Things. After obtaining the user's operation instructions, the IoT device list connects to the appUrl of the smart single product device corresponding to the customized tile component in the IoT management application, and sends an MQTT (message queue telemetry transmission) control command to the IoT management application. The IoT management application reports the MQTT control command to the cloud server, and the cloud server sends the MQTT control command to the WIFI module. The WIFI module parses the MQTT control command issued by the cloud, and translates it and sends it to the smart single product device pointed to by the MQTT control instruction. Among them, MQTT is a client-server based message publishing / subscription transmission protocol, which is lightweight, simple, open and easy to implement.
[0095] The IoT device list of this embodiment obtains the appUrl of the smart single product device pushed by the IoT management application, requests the cloud server to obtain the customized tile of the smart single product device, and after obtaining the customized tile, executes the customized tile file to obtain the customized tile component, and replaces the universal tile preset as the target device list card in the IoT device list with the customized tile component to form a new target device list card. The object model of the smart single product device is displayed on the target device list card, so that the user can obtain the relevant information of the smart single product device from the target device list card, and can interact with the smart single product device through the target device list card to achieve remote control. After obtaining the control command issued by the user, the IoT device list accesses the appUrl corresponding to the smart single product device, sends the MQTT control command to the IoT application, and transmits the MQTT control command to the cloud server, which is transmitted and translated by the cloud server and the WIFI module, and finally sent to the smart single product device to control the smart single product device to perform the corresponding operation. The target device list card of the IoT device list is dynamically rendered, and the relationship between the IoT device list and the smart single product device is decoupled, which is convenient for users or relevant operation and maintenance personnel to maintain.
[0096] Further, refer to Figure 3 , a second embodiment of the method for rendering a list of IoT devices of this application is proposed.
[0097] The difference between the second embodiment of the method for rendering a list of IoT devices and the first embodiment of the method for rendering a list of IoT devices is that the first rendering of the list of IoT devices includes:
[0098] Step S01: obtaining at least one piece of smart device information stored locally and pushed by an Internet of Things management application;
[0099] Step S02: Use a universal tile as the device list card of the smart single device for initial rendering.
[0100] After the IoT device list rendering device is started, the IoT management application runs in the background. The IoT management application reads the locally stored smart single product device information in the IoT. The smart single product device information includes the name, model, connection status, etc. of the smart single product device in the IoT. The IoT management application converts the filtered local smart single product device information into a smart single product device information dialog box containing all smart single product device information. The IoT management application performs the confirmation operation to determine whether the IoT device list has subscribed to the onRemoteMessage event. If the IoT device list has subscribed to the onRemoteMessage event, the IoT management application sends a smart single product device information dialog box containing all smart single product device information to the IoT device list. The IoT device list obtains the smart single product device information dialog box sent by the IoT management application by listening to the onRemoteMessage event, and obtains the locally stored IoT smart single product device information.
[0101] Optionally, if the IoT device list has not subscribed to the onRemoteMessage event, the IoT management application pops up a prompt message on the display screen interface indicating that the IoT device list has not subscribed to the onRemoteMessage event, prompts the user and obtains the operation instruction issued by the user to control the IoT device list to subscribe to the onRemoteMessage event. After confirming that the control list has subscribed to the onRemoteMessage event, the IoT management application sends a smart single product device information dialog box containing all smart single product device information to the IoT device list.
[0102] The IoT device list parses the smart product device information dialog box sent by the IoT management application, obtains the locally stored smart product device information, verifies whether the smart product device information stored in the IoT device list is expired, and if the smart product device information stored in the IoT device list is expired, updates the smart product information stored in the IoT device list.
[0103] After the IoT device list is verified, the IoT device list performs initial rendering on the device list card in the IoT device list, where the device list card corresponds one-to-one to the smart single-product device in the IoT. The IoT device list extracts the preset universal tile and updates the universal tile to the card component of the device list card as the initial rendering, where the universal tile is a unified tile preset by the IoT device list, with uniform size and shape and does not distinguish between each smart single-product device.
[0104] In this embodiment, the smart single product device information dialog box is used to obtain the smart single product device information in the Internet of Things stored locally by the Internet of Things management application, obtain the locally stored smart single product device information of the Internet of Things, and verify whether the smart single product device information in the Internet of Things device list is expired, so as to update the smart single product devices in the Internet of Things device list, and use universal tiles to initially render the Internet of Things device list, and use universal tiles as device list cards.
[0105] Further, refer to Figure 4 , a third embodiment of the method for rendering a list of IoT devices of the present application is proposed.
[0106] The third embodiment of the method for rendering a list of Internet of Things devices is different from the above-mentioned embodiments of the method for rendering a list of Internet of Things devices in that the list of Internet of Things devices requests the corresponding animation file from the cloud.
[0107] Step S11: Detecting the reporting status of the smart single product device;
[0108] Step S21: if the smart product is in the power-on state, request and obtain the customized animation file of the target device list card of the smart product device from the cloud server;
[0109] Step S31: loading the customized animation file to render the target device list card of the smart single device.
[0110] When the IoT device list is initially rendered and uses a general tile as the device list card, the IoT device list obtains the operating status of the smart single product device by subscribing to at least one of the smart single product device status information change event, the smart single product device identification code event, and the parent node message event. Specifically, the smart single product device reports the reporting data of the smart single product device status to the WIFI module. Optionally, the reporting data includes the smart single product device name, identification code, power-on status and other status information. The WIFI module parses and encapsulates the data reported by the smart single product device and sends it to the cloud server. The cloud server publishes the reporting data of the smart single product device based on the MQTT protocol; the IoT management application triggers the subscription to the MQTT message, stores the reporting data of the smart single product locally, updates the status information of the smart single product, and sends the MQTT message to the IoT device list through onRemoteMessage. The IoT device list parses and obtains the reporting status of the smart single product device and the power-on status information of the smart single product.
[0111] Optionally, the power-on status information of the smart single-product device includes the power-on status or the power-off status. If the smart single-product device is in the power-on status, that is, after the IoT device list parses the reporting status of the smart single-product device, it is determined that the smart single-product device is in the power-on status. The IoT device list remotely requests the cloud server to obtain the customized animation file of the target device list card of the smart single-product device. The cloud server asynchronously returns the customized animation file, and the IoT device list obtains the customized animation file asynchronously returned by the cloud server.
[0112] After the IoT device list obtains the customized animation file returned by the cloud server, it parses the customized animation file, adds the customized animation file to the target device list card, calls the corresponding application for rendering, and enables the target device list card to present the corresponding animation effect, thereby achieving a better display effect of the smart single product device.
[0113] In this embodiment, the IoT device list obtains the reported information of the smart single product device to determine whether the smart single product device is in the power-on state. If the smart single product device is in the power-on state, the IoT device list requests the cloud server to obtain the customized animation file corresponding to the smart single product device, loads the customized animation file and adds it to the target device list card, so that the target device list card presents the corresponding animation effect, optimizes the display effect of the device list card, and also enables the user to clearly perceive the power-on status of the smart single product device, and more conveniently realizes the interaction with the smart single product device through the device list card, thereby optimizing the user experience.
[0114] Further, refer to Figure 5 , a fourth embodiment of the method for rendering a list of IoT devices of the present application is proposed.
[0115] The fourth embodiment of the method for rendering a list of IoT devices is different from the above-mentioned embodiments of the method for rendering a list of IoT devices in that the priority of smart single-product devices is set, and the device list cards are rendered differently according to the priority.
[0116] Step S22: initiating a request to the cloud server to obtain the customized magnetic tile of the smart single product device;
[0117] Step S23: receiving the request response status code asynchronously returned by the cloud server, wherein the response status of the request response status code is request failure;
[0118] Step S24: marking the device list card of the smart single product device as a general single product card, and stopping rendering of the general single product card.
[0119] In this embodiment, the IoT device list sets the priority of smart single-product devices according to the importance of the connected smart single-product devices in the IoT. Specifically, in a specific embodiment, the importance of smart door locks in the IoT system is higher than that of lighting, and the state changes of smart door locks are more than those of lighting, so the priority of smart door locks is higher than that of lighting. Devices with low importance and single state changes, such as lighting, are marked as general smart single-product devices. The cloud server sets the priority of smart single-product devices in the IoT, and does not preset customized tiles corresponding to the state information of the smart single-product devices.
[0120] The device list card corresponding to the universal smart single product device in the IoT device list remotely requests the cloud server to obtain the customized tile. After the cloud server obtains the request information, in order to search for the preset customized tile corresponding to the smart single product, the cloud server returns the request response status code to the IoT device list. The request response status code is 404, which indicates that the request to obtain the customized tile corresponding to the smart single product device failed. After the IoT device list obtains the request response status code, it parses the request response status identification code, marks the device list card corresponding to the smart single product device as a universal single product card, and stops rendering the universal single product card.
[0121] In this embodiment, by setting the priority of smart products and marking the general smart product devices, the device list cards in the IoT device list are rendered differently, so as to achieve targeted rendering of the IoT device list without affecting the user operation experience and save system resources.
[0122] Further, refer to Figure 6 , a fifth embodiment of the method for rendering a list of IoT devices of the present application is proposed.
[0123] A fifth embodiment of the method for rendering a list of IoT devices includes:
[0124] Step S40: Acquire the MQTT information carrying the status information of the smart single product device transmitted by the IoT management application, and trigger the pre-subscribed event related to the smart single product device information;
[0125] Step S50: transparently transmit the MQTT information to the corresponding target device list card for re-rendering.
[0126] During the operation of the Internet of Things, when the operating status of a smart single-product device changes, the operating status change data of the smart single-product device is reported to the WIFI module. The WIFI module parses and encapsulates the operating status change data reported by the smart single-product device and sends it to the cloud server. The cloud server publishes MQTT messages of the operating status change data of the smart single-product device based on the MQTT protocol. The network management application triggers the subscription to the MQTT message, obtains the operating status change data of the smart single-product device, and transparently transmits the MQTT message carrying the operating status change data of the smart single-product device to the Internet of Things device list. The Internet of Things device list transparently transmits the operating status change data of the smart single-product device to the corresponding target device list card. The target device list card receives the operating status change data of the smart single-product device through the props method (parent-child component communication), updates the target device list card component accordingly, updates the information about the operating status of the smart single product in the target device list card, and re-renders it as a new target device list card component.
[0127] In this embodiment, by obtaining the operating status change data of the smart single product device, the corresponding target device list card in the Internet of Things device list is updated accordingly, and the target device list card is re-rendered to update the smart single product operating status information in the target device list card, thereby realizing dynamic rendering of the target device list card.
[0128] Further, refer to Figure 7 , Figure 7 It is a schematic diagram of the structure of an Internet of Things device list rendering system in the operating environment involved in the embodiment of the present invention.
[0129] Based on the IoT device list rendering method in the above-mentioned embodiment of the present invention, the present invention also provides an IoT device list rendering system. In this embodiment, the IoT device list rendering system includes: an IoT device list rendering device 100, a smart single product device group 200, a WIFI module 300, and a cloud server 400.
[0130] Optionally, the IoT device list rendering device 100 is installed with the IoT management application, and is used to obtain the status information of the smart single product device group 200 and dynamically render the IoT device list;
[0131] The smart single product device group 200 is composed of a plurality of smart single product devices that form an Internet with each other;
[0132] The WIFI module 300 is used to parse the data reported by the smart single product in the smart single product device group 200, obtain the status information of the smart single product device, or parse the operation instructions issued by the cloud server 400, and translate and send them to the IoT device list rendering device 100;
[0133] The cloud server 400, as a message agent in the IoT device list rendering system, is used to publish MQTT messages.
[0134] When executed, the IoT device list rendering system implements any step in any of the above-mentioned IoT device list rendering method embodiments.
[0135] In addition, the present application also provides a computer-readable storage medium, on which an Internet of Things device list rendering program is stored. When the Internet of Things device list rendering program is executed by a processor, the steps of the Internet of Things device list rendering method as described above are implemented.
[0136] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, drug or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, drug or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, drug or system including the element.
[0137] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0139] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for rendering a list of IoT devices, characterized in that: The method for rendering the IoT device list comprises the following steps: In response to the IoT device list rendering operation instruction, the application uniform resource locator of the smart single product device corresponding to the target device list card pushed by the IoT management application is obtained, the application uniform resource locator is accessed to obtain the object model of the smart single product device, the object model is parsed to obtain the operation information of the smart single product device, the corresponding smart single product device in the IoT management application is connected according to the application uniform resource locator, the device list card corresponding to the smart single product device is determined, and the device list card is marked as the target device list card that needs to be rendered; Initiate a request to the cloud server to obtain the customized tile of the smart single product device; receive the request response status code returned by the cloud server, the request response status code response status is a successful request; receive the customized tile of the smart single product device asynchronously returned by the cloud server, the customized tile is a preset custom tile reflecting the current operation information of the smart single product device, the cloud server sets the device priority setting of the smart single product according to the importance of the smart single product in the Internet of Things, and for a device with low importance and a single status, does not preset a customized tile corresponding to the status information of the smart single product device; The customized tile is used to replace the generic tile of the target device list card.
2. The method for rendering a list of IoT devices according to claim 1, wherein: Before the step of determining the device list card corresponding to the smart single product device and marking the device list card as a target device list card that needs to be rendered, the step further includes: Obtaining locally stored at least one piece of smart device information pushed by an Internet of Things management application; A universal tile is used as the device list card of the smart single product device.
3. The method for rendering a list of IoT devices according to claim 1, wherein: After the step of initiating a request to the cloud server to obtain the customized magnetic tile of the smart single product device, the method further includes: Receive a request response status code asynchronously returned by the cloud server, wherein the request response status code response status is request failure; The device list card of the smart single product device is marked as a general single product card, and rendering of the general single product card is stopped.
4. The method for rendering a list of IoT devices according to claim 1, wherein: The step of initiating a request to the cloud server to obtain the customized magnetic tile of the smart single product device also includes: Detecting the reporting status of the smart single product device; If the smart product is in the power-on state, request and obtain the customized animation file of the target device list card of the smart product device from the cloud server; The customized animation file is loaded to render the target device list card of the smart single product device.
5. The method for rendering a list of IoT devices according to claim 1, wherein: After the step of replacing the universal tile of the target device list card with the customized tile, the method further includes: Obtain the MQTT information that carries the status information of the smart device transmitted by the IoT management application, and trigger the pre-subscribed events related to the smart device information; The MQTT information is transparently transmitted to the corresponding target device list card for re-rendering.
6. An IoT device list rendering device, characterized in that: The IoT device list rendering device includes a memory, a processor, and an IoT device list rendering program stored in the memory and executable on the processor. When the IoT device list rendering program is executed by the processor, the steps of the IoT device list rendering method according to any one of claims 1 to 5 are implemented.
7. An IoT device list rendering system, characterized in that: The IoT device list rendering system includes: A smart single-product device group is a plurality of smart single-product devices that mutually constitute the Internet of Things; The WIFI module is used to parse the data reported by the smart single product in the smart single product device group, obtain the status information of the smart single product device, or parse the operation instructions issued by the cloud server, translate and send them to the IoT device list rendering device; The cloud server acts as a message broker in the IoT device list rendering system to publish MQTT messages; An IoT device list rendering device, installed with the IoT management application, used to obtain the status information of the smart single product device group and dynamically render the IoT device list; The IoT device list rendering system implements the steps of the IoT device list rendering method according to any one of claims 1 to 5 when executed.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an Internet of Things device list rendering program, and when the Internet of Things device list rendering program is executed by the processor, the steps of the Internet of Things device list rendering method according to any one of claims 1 to 5 are implemented.
