Control method of Internet of Things equipment, storage medium and electronic device
By establishing a Bluetooth channel on the Internet of Things devices and sending control commands, the problem of device control in a networkless or weak network environment is solved, and efficient control of paired devices is achieved.
Patent Information
- Application Number
- CN202510099026.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-30
AI Technical Summary
It is difficult for the prior art to effectively control IoT devices in the absence or weak network scenarios.
By obtaining the list of paired devices, determine whether the Internet of Things device belongs to the device in the list of paired devices, establish a Bluetooth channel for the paired devices, and send control commands to the device through the Bluetooth channel.
It realizes that the device can be sent to the device without having to put the device in the distribution state, solving the problem of device control in the networkless or weak network scenarios.
Smart Images

Figure CN120065816A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart home, and more particularly, to a control method, a storage medium, and an electronic device for Internet of Things devices. Background Art
[0002] With the development of technology, the intelligent level of home devices is also constantly improving. Most Internet of Things devices can be controlled remotely. In the prior art, it is usually necessary to configure the network for the device before remotely controlling the device, and the network needs to be normally available during the control process. The above control method cannot effectively control the device in a scenario without network or with a weak network.
[0003] Correspondingly, there is a need in the art for a new control solution for Internet of Things devices to solve the above problems. Summary of the Invention
[0004] In order to overcome the above defects, the present application is proposed to solve or at least partially solve the problem that it is difficult to effectively control devices by existing methods in a scenario without network or with a weak network.
[0005] In a first aspect, a control method for Internet of Things devices is provided. The method includes: obtaining a list of paired devices; determining whether an Internet of Things device belongs to the devices in the list of paired devices; establishing a Bluetooth channel for the Internet of Things device belonging to the list of paired devices, where the list of paired devices includes Internet of Things devices that have completed Bluetooth pairing with the user; and sending a control command to the Internet of Things device through the Bluetooth channel.
[0006] In a technical solution of the above control method for Internet of Things devices, the method further includes: searching for Internet of Things devices in a controllable state through Bluetooth; screening the Internet of Things devices in the controllable state; performing Bluetooth pairing between the screened Internet of Things devices and the user; and saving the pairing relationship between the Internet of Things devices and the user to the list of paired devices.
[0007] In a technical solution of the above control method for Internet of Things devices, the screening of the Internet of Things devices in the controllable state includes: screening Internet of Things devices in the controllable state whose Bluetooth distance does not exceed a preset threshold and does not belong to the list of paired devices.
[0008] In a technical solution of the above control method for Internet of Things devices, the performing Bluetooth pairing between the screened Internet of Things devices and the user includes: connecting to the screened Internet of Things devices through a software development kit and a session key, and authenticating the connected Internet of Things devices.
[0009] In one technical solution of the above control method for Internet of Things devices, the method further includes: obtaining a user ID, where the user ID is the unique identity of the user; querying or deleting the Internet of Things devices paired with the user according to the user ID and the list of paired devices.
[0010] In one technical solution of the above control method for Internet of Things devices, sending a control command to the Internet of Things device through the Bluetooth channel includes: obtaining a control command; calculating and converting the control command through a software development kit to call a cloud platform interface to obtain a corresponding command code; sending the command code to the Internet of Things device through the Bluetooth channel.
[0011] In one technical solution of the above control method for Internet of Things devices, the method further includes: receiving attribute and alarm information returned by the Internet of Things device through the Bluetooth channel.
[0012] In one technical solution of the above control method for Internet of Things devices, the method further includes: calling a digital model of a cloud platform interface through a software development kit, where the digital model is used to simulate the operating state of the Internet of Things device; generating a detailed page interface of the Internet of Things device according to the digital model, the attribute, and the alarm information.
[0013] In a second aspect, a computer-readable storage medium is provided, where the computer-readable storage medium includes a stored program, and when the program runs, it executes the control method for Internet of Things devices in the above first aspect or any corresponding technical solution thereof.
[0014] In a third aspect, an electronic device is provided, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to execute the control method for Internet of Things devices in the above first aspect or any corresponding technical solution thereof through the computer program.
[0015] One or more of the above technical solutions of the present application have at least one or more of the following beneficial effects:
[0016] In implementing the technical solution of the present application, the binding with the Internet of Things device is realized through Bluetooth pairing. For the paired Internet of Things device, a Bluetooth channel is established with it through a software development kit, and a control command is sent to it through the Bluetooth channel, achieving the purpose of sending a control command to the device without the device being in a network configuration state, and solving the problem that it is difficult to effectively control the device in an offline or weak network scenario by the existing method.
[0017] In implementing the technical solution of the present application, the discovery and filtering of Internet of Things devices are achieved through Bluetooth search and device screening. By pairing the filtered Internet of Things devices with the user via Bluetooth and saving the pairing relationship to the paired device list, the purpose of pairing with reliable devices and timely updating the pairing relationship is realized.
[0018] In implementing the technical solution of the present application, connection with the device is made through a session key and the device is authenticated, achieving the purpose of ensuring the security and privacy of Bluetooth communication with Internet of Things devices.
[0019] In implementing the technical solution of the present application, by obtaining the attributes and alarm information returned by the Internet of Things device and calling the digital model of the cloud platform interface to generate the detailed page interface of the Internet of Things device based on the digital model, attributes, and alarm information, it helps users understand the device status in a timely manner, thereby enhancing the user experience. Brief Description of the Drawings
[0020] The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.
[0021] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 is a schematic diagram of the hardware environment of an interaction method for Internet of Things devices according to an embodiment of the present application;
[0023] Figure 2 is a schematic diagram of the main step flow of a control method for Internet of Things devices according to an embodiment of the present application;
[0024] Figure 3 is a timing diagram of Bluetooth search for Internet of Things devices according to an embodiment of the present application;
[0025] Figure 4 is a timing diagram of Bluetooth pairing of Internet of Things devices according to an embodiment of the present application;
[0026] Figure 5 is a timing diagram of paired device management according to an embodiment of the present application;
[0027] Figure 6 is a timing diagram of Bluetooth direct control device processing according to an embodiment of the present application;
[0028] Figure 7Schematic diagram of the framework for a small program to control Internet of Things devices according to an embodiment of the present application;
[0029] Figure 8 Schematic diagram of the connection relationship between the processor and the memory of an electronic device according to an embodiment of the present application. Detailed implementation manners
[0030] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices. The terms "mounted", "connected", and "coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and can also be the internal communication of two components. It can be a wireless connection or a wired connection.
[0032] In addition, a "module" and a "processor" can include hardware, software, or a combination of both. A module can include a hardware circuit, various suitable sensors, communication ports, memory, and can also include a software part, such as program code, and can also be a combination of software and hardware. A processor can be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor can be implemented in software, in hardware, or in a combination of both. A computer-readable storage medium includes any suitable medium that can store program code, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and the like.
[0033] In addition, if the meaning of "and / or" appears in this application, it includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or a solution that satisfies both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and can include only A, only B, or A and B. The singular terms "one" and "this" can also include plural forms.
[0034] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.
[0035] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.
[0036] According to one aspect of an embodiment of the present application, a method for interacting with a smart home device is provided. The method for interacting with a smart home device is widely used in smart home, smart home, smart home device ecosystem, smart home ecosystem and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the method for interacting with the smart home device can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0037] The above network may include, but is not limited to, at least one of the following: a wired network, a wireless network. The above wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, a local area network. The above wireless network may include, but is not limited to, at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart sound box, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart floor sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steam box, a smart microwave oven, a smart kitchen water heater, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0038] In this embodiment, a control method for an Internet of Things device is provided. Refer to the attached Figure 2 , Figure 2 which is a schematic diagram of the main steps of the control method for an Internet of Things device according to an embodiment of the present application. Optionally, this method can be executed by an application program (or applet) of a smart terminal (such as a mobile phone, a tablet). As Figure 2 shown, this method mainly includes the following steps S202 to step S208:
[0039] Step S202, obtain a list of paired devices.
[0040] In this embodiment, the list of paired devices is a list of (smart) devices that have completed Bluetooth pairing with the user, including the pairing relationship between the user and the Internet of Things device. Among them, the user and the Internet of Things device in the list of paired devices can be represented by identifiers such as a user name and a device name, a user ID and a device ID, etc. This embodiment does not make specific limitations on this.
[0041] Step S204, determine whether the Internet of Things device belongs to the devices in the list of paired devices.
[0042] In this embodiment, when controlling the Internet of Things device, it is necessary to first determine whether the Internet of Things device belongs to the devices in the list of paired devices, that is, to determine whether the Internet of Things device has completed Bluetooth pairing with the user.
[0043] Step S206, establish a Bluetooth channel for the Internet of Things device belonging to the list of paired devices, and the list of paired devices includes the Internet of Things devices that have completed Bluetooth pairing with the user.
[0044] In this embodiment, for the Internet of Things devices that have completed Bluetooth pairing with the user, although some simple communications can be carried out, some relatively complex commands and advanced functions may not be achievable. Therefore, in this embodiment, a Bluetooth channel is established between the application and the Internet of Things device by using a Software Development Kit (SDK). This can not only achieve Bluetooth communication between the control end (such as a mobile application) and the controlled end (Internet of Things device) without a network connection, but also provide more advanced functions and support, such as the control and status monitoring of the Internet of Things device. Among them, the software development kit refers to a collection of relevant documents, examples, and tools for assisting in the development of a certain type of software, and it can provide some files of an Application Programming Interface (API) for a certain programming language. It should be noted that the software development kit can be selected according to the specific application environment, and this embodiment does not make specific restrictions on this.
[0045] In one implementation, taking the control of an Internet of Things device through a mobile WeChat mini-program as an example, the mini-program connects to the Internet of Things devices in the paired device list through the JSDK (JavaScript SDK), and through the JSDK, the functions or services predefined on the cloud platform can be called, such as processing control commands through the interfaces encapsulated by the JSDK, managing the paired device list, monitoring the status of the Internet of Things device, etc.
[0046] Step S208, send a control command to the Internet of Things device through the Bluetooth channel.
[0047] In this embodiment, a control command is sent to the Internet of Things device by means of the Bluetooth channel established in step S206.
[0048] Based on the above steps S202 to S208, for the Internet of Things devices that have completed Bluetooth pairing, a Bluetooth channel is established with them through the software development kit, and a control command is sent to them through the Bluetooth channel, achieving the purpose of sending a control command to the device without the device being in a network configuration state, and solving the problem that it is difficult to effectively control the device in a non-network or weak-network scenario by the existing methods.
[0049] In one implementation of the embodiment of the present application, before the above step S202, step S200 may be further included, which specifically includes the following steps S2002 to S2008:
[0050] Step S2002, search for Internet of Things devices in a controllable state through Bluetooth.
[0051] In this embodiment, the Internet of Things device in a controllable state refers to an Internet of Things device in a manipulable state. Specifically, for example, it is an Internet of Things device that is in the power-on state and supports direct Bluetooth control.
[0052] Step S2004: Screen the Internet of Things devices in a controllable state.
[0053] In this embodiment, screen the Internet of Things devices in a controllable state that are searched via Bluetooth in step S2002. For example, select the Internet of Things devices within a target range or a certain type of Internet of Things device.
[0054] In one implementation, it is possible to screen the Internet of Things devices in a controllable state whose Bluetooth distance does not exceed a preset threshold and does not belong to the paired device list.
[0055] In one implementation, the preset threshold can be selected as 1.5 meters, and the Bluetooth distance can be defined by RSSI (Received Signal Strength Indicator, Bluetooth signal strength).
[0056] In one implementation, when the location of the mobile phone changes, it is possible to re-obtain the RSSI value of the device and screen the device distance again.
[0057] Step S2006: Pair the screened Internet of Things devices with the user via Bluetooth.
[0058] In this embodiment, pair the Internet of Things devices screened in step S2004 with the user. Herein, the user refers to the specific operator who controls the Internet of Things device through the mobile phone application. Bluetooth pairing means establishing a secure connection between two Bluetooth devices (the mobile phone and the Internet of Things device).
[0059] In one implementation, Bluetooth pairing includes steps such as creating a shared key, data encryption, and integrity verification to ensure the security and privacy of Bluetooth communication.
[0060] In one implementation, the application can connect to the Internet of Things device through the software development kit and the session key. After the connection is successful, the device is authenticated. Among them, the method of using the session key to encrypt the communication and authenticate the device can refer to the methods in the prior art and will not be elaborated here.
[0061] Step S2008: Save the pairing relationship between the Internet of Things device and the user to the paired device list.
[0062] In this embodiment, save the relationship between the newly paired Internet of Things device and the user to the paired device list.
[0063] In an example of an application scenario of this application, such as Figure 3As shown, the mini-program searches for nearby devices through a Bluetooth remote control and starts scanning through JSDK self-discovery to go online. Among them, JSDK self-discovery can automatically identify and configure relevant components in the development environment. For example, when scanning, it calls corresponding interfaces to trigger the device to send broadcast messages to the APP. When JSDK discovers a device in a controllable state, it uploads the device to the IOT cloud (cloud platform) and queries through the enterprise network whether the device supports direct control (via Bluetooth). The enterprise network returns the query result to the IOT cloud, and the IOT cloud returns whether the device supports direct control to JSDK. JSDK adds a field indicating whether direct control is supported to the self-discovered device object. It should be noted that in addition to querying whether the device supports Bluetooth direct control, other required device information can also be obtained, such as the brand, model, alias, etc. of the device. After the field addition is completed, JSDK reports the self-discovered devices and the self-discovery of direct control devices through the self-discovery callback method, that is, reports the devices in the controllable state scanned and the devices that support Bluetooth direct control among them to the mini-program. Optionally, the mini-program can generate corresponding device lists according to the devices in the controllable state and the devices that support Bluetooth direct control respectively for the user to view. In addition, the mini-program can also filter the self-discovered devices. For details, please refer to step S2004 of the above-mentioned embodiment and will not be elaborated here.
[0064] Optionally, Figure 4 is a timing diagram of Bluetooth pairing of Internet of Things devices according to an embodiment of the present application. As Figure 4 shown, the mini-program sends a device connection request to JSDK and calls relevant interfaces. JSDK connects to the device through the session key, and the device returns a successful connection to JSDK after successful connection. JSDK authenticates the device. After successful authentication, it saves the authentication key and preferentially uses the authentication key for the next authentication. After successful authentication, JSDK feeds back to the mini-program through the successful authentication callback method that the device is controllable and the authentication has passed. The mini-program can further send a request to JSDK to save the paired device. Specifically, JSDK sends the request to save the paired device to the IOT cloud, and the IOT cloud saves the relationship between the user ID and the device and returns the result to the mini-program through JSDK.
[0065] In one implementation, after successful pairing, the mini-program can obtain all attributes and alarm information of the device through the interface of JSDK, and can also send control commands to the device. If JSDK monitors that the Bluetooth is disconnected, it can report the Bluetooth disconnection to the mini-program, and the mini-program prompts the user that the Bluetooth connection is disconnected and can be reconnected. It should be noted that after the Bluetooth is reconnected, the device needs to be authenticated again.
[0066] In implementing the technical solution of this application, the discovery and filtering of Internet of Things devices are achieved through Bluetooth search and device screening. By pairing the filtered Internet of Things devices with the user via Bluetooth and saving the pairing relationship to the paired device list, the purpose of pairing with reliable devices and timely updating the pairing relationship is realized.
[0067] In an implementation manner of the embodiment of this application, after the above step S202, step S203 may be further included, which specifically includes the following steps S2032 and S2034:
[0068] Step S2032: Obtain the user ID, where the user ID is the unique identity identifier of the user.
[0069] Step S2034: Query or delete the Internet of Things devices paired with the user according to the user ID and the paired device list.
[0070] In this embodiment, as Figure 5 shown, the mini-program obtains the paired device list of the user from the JSDK. The input parameter is the digital identity of the user, such as the user ID. The JSDK obtains the paired device list of the user from the IOT cloud according to the user ID. The IOT cloud returns the device fields (such as device ID) saved in the paired device list to the JSDK, and the JSDK returns it to the mini-program. It should be noted that the JSDK can also obtain other fields associated with the device (such as device brand) from the IOT cloud according to the user ID. Further, the mini-program can delete the paired devices on the IOT cloud according to the user ID / device ID with the help of the JSDK. After the IOT cloud deletes the pairing data of the user and the device, the result (such as deletion success) is returned to the mini-program through the JSDK.
[0071] In an implementation manner of the embodiment of this application, the above step S208 may be further included the following steps S2082 to S2086:
[0072] Step S2082: Obtain the control command.
[0073] In this embodiment, the control command is the command for controlling the Internet of Things device. As an example, assuming the Internet of Things device is an air conditioner, the control command can be "cooling, 25 degrees".
[0074] Step S2084: Call the cloud platform interface through the software development kit to calculate and convert the control command to obtain the corresponding command code.
[0075] In this embodiment, the cloud platform includes a cloud domain model, which can calculate and transform control commands for Internet of Things (IoT) devices. Specifically, the domain model of the cloud platform interface can be called through a software development kit to calculate control commands, intercept illegal requests, determine whether there are conflicts between control requests and the current status of IoT devices, etc., and transform the control commands calculated by the domain model into command codes recognizable by IoT devices.
[0076] Step S2086: Send the command code to the IoT device through the Bluetooth channel.
[0077] In this embodiment, the command code obtained in step S2084 is sent to the IoT device through the Bluetooth channel to achieve control of the IoT device.
[0078] In an implementation manner of the embodiment of the present application, after the above step S208, the following step S209 may be further included:
[0079] Step S209: Receive the attribute and alarm information returned by the IoT device through the Bluetooth channel.
[0080] In this embodiment, the Bluetooth channel can also receive the attribute and alarm information returned by the IoT device. Among them, the attribute includes the status information of the IoT device, such as the switch status and set value, and the alarm information includes the fault information of the IoT device, such as device failure, connection problem, and battery failure. The above attribute and alarm information vary according to different device types, and this embodiment does not make specific limitations on this.
[0081] In an implementation manner of the embodiment of the present application, after the above step S209, step S210 may be further included, which specifically includes the following step S2102 and step S2104:
[0082] Step S2102: Call the digital model of the cloud platform interface through the software development kit. The digital model is used to simulate the operating status of the IoT device.
[0083] In this embodiment, based on the acquired device data, the digital model creates a virtual digital model using various modeling, simulation, and analysis tools, so as to simulate, analyze, and predict the operating status of the device in real time.
[0084] Step S2104: Generate the detailed page interface of the IoT device according to the digital model, attributes, and alarm information.
[0085] In this embodiment, using the above cloud platform digital model and the attributes and alarm information obtained from the Bluetooth channel, a detailed page interface about the IoT device can be generated for the application program to visually display the current operating conditions and status of the device.
[0086] In an example of an application scenario of the present application, Figure 6 is a timing diagram processed by a Bluetooth direct control device according to an embodiment of the present application. As Figure 6 shown, the applet calls the direct control device initialization interface, which is used to implement functions such as the above-mentioned Bluetooth search, pairing, and connection. The applet obtains all attributes and alarm information of the device through the JSDK interface, and the device reports the attributes / alarm to the JSDK. The JSDK calls the cloud interface to perform digital device calculations based on the attributes and alarm information. The IOT cloud returns the digital device to the JSDK. The JSDK caches the digital device locally and returns the direct control device initialization result (failure / success) to the applet. The applet obtains the digital model of the direct control device from the JSDK. The JSDK obtains the digital model from the locally cached digital device and returns the digital model of the device to the applet. The applet renders the details page interface (of the Internet of Things device) according to the digital model. Among them, the digital model includes standard model data of attributes / alarms. The standard model can be to split the device into multiple units to represent some basic parameters of the device. Combining the standard model with the attributes and alarm information, calculations such as exclusive logic and verification can be performed. In addition, the applet can also subscribe to changes in the device model through the JSDK, and the JSDK returns the changes in the device model to the applet in a callback manner.
[0087] In one implementation, the JSDK can also call the IOT cloud to perform protocol conversion, such as converting the control command of the standard model into an e++ encoding (base64 string) that the Internet of Things device can recognize. After the applet sends a control command to the device, it receives the result (control success / failure) returned by the device. If the control command fails to be sent, the subsequent control command sending is stopped and an error message is returned. As an example, different error codes can be used to represent different error messages.
[0088] In an example of an application scenario of the present application, as Figure 7 shown, the APP applet establishes Bluetooth communication with the Internet of Things device through the SDK (iot-jssdk and WeChat sdk) and obtains the device protocol and configuration file through the enterprise cloud. Among them, the enterprise cloud saves the device protocol and configuration file when creating the device, so as to provide a channel for users to query the device support function. In addition, the applet can scan the device through Bluetooth and obtain the attributes and alarm information of the device through Bluetooth communication. Further, a Bluetooth direct control list page and a device Bluetooth direct control details page can be generated in the applet according to the Bluetooth scan result and the attributes and alarm information of the device, respectively displaying the controllable devices and the functions that the device can achieve or the current state of the device.
[0089] It should be noted that although the above embodiments describe the various steps in a specific order, those skilled in the art can understand that in order to achieve the effects of this application, it is not necessary to execute the different steps in such an order. They can be executed simultaneously (in parallel) or in other orders, and these adjusted solutions are equivalent technical solutions to the technical solutions described in this application, and thus will also fall within the protection scope of this application.
[0090] Those skilled in the art can understand that all or part of the processes in the method of the above-mentioned embodiment of this application can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable storage medium can include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium, etc., that can carry the computer program code.
[0091] On the other hand, this application also provides a computer-readable storage medium.
[0092] In an embodiment of a computer-readable storage medium according to this application, the computer-readable storage medium can be configured to store a program for executing the control method of the Internet of Things device in the above-mentioned method embodiment. This program can be loaded and run by a processor to implement the control method of the Internet of Things device in the above-mentioned first aspect or any corresponding technical solution thereof. For the sake of convenience of description, only the parts related to the embodiments of this application are shown. For the specific technical details not disclosed, please refer to the method part of the embodiments of this application. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiments of this application is a non-transitory computer-readable storage medium.
[0093] On the other hand, this application also provides an electronic device.
[0094] In an embodiment of an electronic device according to this application, the electronic device can include at least one processor; and a memory communicatively connected to at least one processor; wherein, a computer program is stored in the memory, and when the computer program is executed by at least one processor, the control method of the Internet of Things device in the above-mentioned first aspect or any corresponding technical solution thereof is implemented. Refer to the attached Figure 8 , Figure 8 in which the memory 11 and the processor 12 are communicatively connected through a bus are exemplarily shown.
[0095] In some embodiments of the present application, the electronic device may further include at least one sensor for sensing information. The sensor is communicatively connected to any type of processor mentioned in the present application. The electronic device described in the present application may be, but is not limited to, a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes hanger, a smart curtain, a smart audio and video device, a smart socket, a smart speaker, a smart sound box, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart floor sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steam box, a smart microwave oven, a smart kitchen water heater, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0096] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A control method for an Internet of Things device, characterized in that: The method comprises: Get the list of paired devices; Determine whether the IoT device belongs to the device in the paired device list; Establishing a Bluetooth channel for the IoT devices belonging to the paired device list, wherein the paired device list includes the IoT devices that have completed Bluetooth pairing with the user; Send a control command to the IoT device via the Bluetooth channel.
2. The control method of the Internet of Things device according to claim 1, characterized in that: The method further comprises: Search for IoT devices in controllable state via Bluetooth; Screening the IoT devices in the controllable state; Pair the selected IoT devices with the user via Bluetooth; The pairing relationship between the IoT device and the user is saved in the paired device list.
3. The control method of the Internet of Things device according to claim 2, characterized in that: The screening of the IoT devices in the controllable state includes: Filter the IoT devices in a controllable state whose Bluetooth distance does not exceed a preset threshold and does not belong to the paired device list.
4. The control method of the Internet of Things device according to claim 2 or 3, characterized in that: The method of pairing the selected IoT device with the user through Bluetooth includes: Use the software development kit and session keys to connect to the selected IoT devices and confirm the device rights of the connected IoT devices.
5. The control method of the Internet of Things device according to claim 1, characterized in that: The method further comprises: Obtain a user ID, where the user ID is a unique identifier of the user; Query or delete the IoT devices paired with the user according to the user ID and the paired device list.
6. The control method of the Internet of Things device according to claim 1, characterized in that: The sending a control command to the IoT device through the Bluetooth channel includes: Get control commands; The software development kit calls the cloud platform interface to calculate and convert the control command to obtain the corresponding command code; The command code is sent to the Internet of Things device through the Bluetooth channel.
7. The control method of the Internet of Things device according to claim 1, characterized in that: The method further comprises: The attribute and alarm information returned by the IoT device is received through the Bluetooth channel.
8. The control method of the Internet of Things device according to claim 7, characterized in that: The method further comprises: Calling a digital model of a cloud platform interface through a software development kit, wherein the digital model is used to simulate the operating status of an IoT device; Generate a details page interface of the Internet of Things device according to the digital model, the attributes and the alarm information.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the control method of the Internet of Things device according to any one of claims 1 to 8 when running.
10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the control method of the Internet of Things device according to any one of claims 1 to 8 through the computer program.
Citation Information
Cited By
Network distribution method and device, storage medium and electronic device
CN121098721A