Device binding method and device, storage medium and electronic device

By monitoring and calling the Bluetooth function interface in the WeChat applet to obtain the list of devices to be bound, the problem that network device cannot adapt to development with the WeChat hardware platform AirSync technology solution is solved, and the closed-loop experience of device binding is realized, reducing development cost.

CN114885315BActive Publication Date: 2024-12-20QINGDAO HAIER TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210545813.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-19
Publication Date
2024-12-20
Estimated Expiration
2042-05-19

AI Technical Summary

Technical Problem

The network device is designed and developed according to the technical system of the third-party internal IOT platform, and cannot adapt to the AirSync technical solution of the WeChat hardware platform, resulting in the inability to complete the device binding in the WeChat applet, and the user experience is poor.

Method used

By monitoring whether the mobile terminal microservice has received the opening operation, calling the microservice's Bluetooth functional interface to obtain the list of devices to be bound, determining whether there are devices to be bound in the device list, and binding without redesigning the developed devices Development.

Benefits of technology

It realizes seamless binding of network device devices in WeChat applets, reduces development costs, and solves the closed-loop problem of the device binding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114885315B_ABST
    Figure CN114885315B_ABST
Patent Text Reader

Abstract

The present application discloses a device binding method and device, a storage medium and an electronic device, and relates to the field of smart home technology. The device binding method comprises: monitoring whether a microservice of a mobile terminal receives an opening operation of a target object, wherein the opening operation is used to open a device binding page in the microservice; in the case of monitoring the opening operation of the target object, calling a first interface located in the microservice and used to scan a device with a Bluetooth function, and obtaining a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound; determining whether any of the devices to be bound exists in the list of devices pre-stored in the microservice; in the case of any of the devices to be bound exists in the list of devices pre-stored in the microservice, binding the target object with any of the devices to be bound through the microservice.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a device binding method and apparatus, a storage medium, and an electronic device. Background Art

[0002] After the user logs in to the mini program, the WeChat mini program user system and the third-party user center system have been connected. In the WeChat mini program, the network devices bound by the user in the third-party internal user system have been displayed in the WeChat mini program.

[0003] Through the WeChat Mini Program, users can view the network devices that have been successfully bound before. If the user has a new unbound network device, it is currently impossible to bind the device through the WeChat Mini Program. The user experience cannot complete the closed loop on the WeChat Mini Program side, and the user can only be guided to a third-party client to perform the binding operation of the network device.

[0004] In the WeChat technical system, there is a corresponding WeChat hardware platform to support network devices. Among them, the AirSync (a technical protocol for communication between WeChat clients and Bluetooth devices) technical solution is proposed for BLE Bluetooth devices, forming a set of access standards within WeChat. Through the technical solution of the WeChat hardware platform, the binding of BLE devices can be achieved through the complete binding capabilities provided by WeChat, and WeChat will synchronize the data to the internal user system of the third party.

[0005] However, based on the AirSync technical solution provided by the WeChat hardware platform, the network device needs to redevelop the corresponding Bluetooth module for the hardware of the network device according to the requirements of the AirSync technical solution. The hardware design and development of the network device is currently based on the technical system of the third-party internal IOT platform, and it cannot be adapted and developed with the AirSync technical solution of the WeChat hardware platform.

[0006] Regarding the relevant technologies, the hardware design and development of network devices are basically based on the technical system of the third-party internal IOT platform, and they cannot be adapted and developed with the AirSync technical solution of the WeChat hardware platform. No effective solution has been proposed yet. Summary of the invention

[0007] The embodiments of the present application provide a device binding method and apparatus, a storage medium and an electronic device, so as to at least solve the problem in the related technology that the network device is basically designed and developed in hardware according to the technical system of a third-party internal IOT platform, and cannot be adapted and developed with the AirSync technical solution of the WeChat hardware platform.

[0008] According to an embodiment of the present application, a device binding method is provided, including: monitoring whether a microservice of a mobile terminal receives an opening operation of a target object, wherein the opening operation is used to open a device binding page in the microservice; in the case of monitoring the opening operation of the target object, calling a first interface located in the microservice and used to scan devices with a Bluetooth function, and obtaining a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound; determining whether any of the devices to be bound exists in the list of devices pre-stored in the microservice; in the case of any of the devices to be bound exists in the list of devices pre-stored in the microservice, binding the target object with any of the devices to be bound through the microservice.

[0009] In an exemplary embodiment, binding the target object with any of the devices to be bound through the microservice includes: calling a second interface for connecting devices located in the microservice, and establishing a connection relationship between a terminal device corresponding to the microservice and any of the devices to be bound through the second interface; obtaining user information of the target object when the connection relationship between the terminal device and any of the devices to be bound is successfully established; and binding the target object with any of the devices to be bound through the microservice when any of the devices to be bound exists in a device list pre-stored in the microservice.

[0010] In an exemplary embodiment, binding the target object to any of the devices to be bound through the microservice includes: detecting whether a binding operation sent by the target object through the microservice is received, wherein the binding operation is used to indicate a selection operation of a target binding device determined by the target object in a device to be bound; and establishing a binding relationship between the target object and the target binding device according to the binding operation when a binding operation sent by the target object through the microservice is received.

[0011] In an exemplary embodiment, determining whether any of the to-be-bound devices exists in a device list pre-stored in the microservice includes: obtaining the device list in an Internet of Things platform corresponding to the microservice, and pre-storing the device list in the microservice; obtaining device identifiers of all devices in the pre-stored device list and a to-be-bound device identifier of any of the to-be-bound devices; determining whether the to-be-bound device identifier exists in the device identifier; and, if the to-be-bound device identifier exists in the device identifier, determining whether any of the to-be-bound devices exists in the device list pre-stored in the microservice.

[0012] In an exemplary embodiment, after determining whether any of the devices to be bound exists in the device list pre-stored in the microservice, the method further includes: if any of the devices to be bound exists in the device list pre-stored in the microservice, obtaining label data of any of the devices to be bound, wherein the label data is used to indicate the signal strength of the broadcast signal of any of the devices to be bound received by the first interface; sorting the devices to be bound according to the signal strength, and displaying the sorted devices to be bound on the microservice.

[0013] In an exemplary embodiment, after the target object is bound to any of the devices to be bound through the microservice, the method further includes: sending user information of the target object and device information to be bound of any of the devices to be bound to the Internet of Things platform corresponding to the microservice; when the Internet of Things platform updates the bound device information of the target object according to the user information and the device information to be bound, receiving the bound device information of the target object sent by the Internet of Things platform; and rendering the bound device information of the target object on the display page of the microservice.

[0014] In an exemplary embodiment, before rendering the bound device information of the target object on the display page of the microservice, the method further includes: monitoring whether an update operation sent by the target object through the microservice is received, wherein the update operation is used to instruct the target object to update the bound device information displayed on the microservice; and in case of receiving the update operation sent by the target object through the microservice, rendering the bound device information of the target object on the display page of the microservice.

[0015] According to another embodiment of the embodiment of the present application, a device binding device is also provided, including a monitoring module for monitoring whether a microservice of a mobile terminal receives an opening operation of a target object, wherein the opening operation is used to open a device binding page in the microservice; a calling module for, when the opening operation of the target object is detected, calling a first interface located in the microservice and used to scan devices with a Bluetooth function, and obtaining a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound; a determining module for determining whether any of the devices to be bound exists in the list of devices pre-stored in the microservice; and a binding module for binding the target object with any of the devices to be bound through the microservice when any of the devices to be bound exists in the list of devices pre-stored in the microservice.

[0016] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned device binding method when running.

[0017] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the device binding method through the computer program.

[0018] In an embodiment of the present application, a microservice of a mobile terminal is monitored to see whether it has received an opening operation of a target object, wherein the opening operation is used to open a device binding page in the microservice; in the case of detecting the opening operation of the target object, a first interface located in the microservice and used to scan devices with a Bluetooth function is called, and a list of devices to be bound is obtained through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound; it is determined whether any of the devices to be bound exists in the list of devices pre-stored in the microservice; in the case of any of the devices to be bound exists in the list of devices pre-stored in the microservice, the target object is bound to any of the devices to be bound through the microservice; the above-mentioned technical solution is adopted to solve the problem that the hardware design and development of network devices is basically carried out in accordance with the technical system of a third-party internal IOT platform, and the AirSync technical solution of the WeChat hardware platform cannot be adapted and developed, and then the list of devices to be bound is found through the first interface provided by WeChat to scan devices with a Bluetooth function, without the need to redesign and develop the developed devices, thereby reducing the development cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 It is a hardware environment diagram of a device binding method according to an embodiment of the present application;

[0022] Figure 2 is a flowchart of a method for binding a device according to an embodiment of the present application;

[0023] Figure 3 is a system framework diagram of a device binding method according to an optional embodiment of the present application;

[0024] Figure 4 is a flow chart of a method for binding a device according to an optional embodiment of the present application;

[0025] Figure 5 It is a structural block diagram of a binding device of a device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] 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 are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, 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 "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] According to one aspect of an embodiment of the present application, a device binding method is provided. The device binding method is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned device binding method 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.

[0029] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 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 drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0030] In this embodiment, a device binding method is provided, which is applied to the above-mentioned computer terminal. Figure 2 : is a flowchart of a method for binding a device according to an embodiment of the present application, and the process includes the following steps:

[0031] Step S202, monitoring whether the microservice of the mobile terminal receives an opening operation of the target object, wherein the opening operation is used to open a device binding page in the microservice;

[0032] Step S204, when an opening operation of the target object is detected, calling a first interface located in the microservice and used to scan devices with a Bluetooth function, and obtaining a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound;

[0033] It should be noted that the above-mentioned microservices can be understood as WeChat mini-programs, or as mini-programs corresponding to third-party clients logged in through WeChat.

[0034] Step S206, determining whether any of the to-be-bound devices exists in the device list pre-stored in the microservice;

[0035] Step S208: When any of the devices to be bound exists in the device list pre-stored in the microservice, the target object is bound to the any of the devices to be bound through the microservice.

[0036] Through the above steps, it is monitored whether the microservice of the mobile terminal receives the opening operation of the target object, wherein the opening operation is used to open the device binding page in the microservice; when the opening operation of the target object is detected, the first interface located in the microservice and used to scan devices with Bluetooth function is called, and a list of devices to be bound is obtained through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound; it is determined whether any of the devices to be bound exists in the list of devices pre-stored in the microservice; when any of the devices to be bound exists in the list of devices pre-stored in the microservice, the target object is bound to any of the devices to be bound through the microservice, which solves the problem that the network device is basically designed and developed in accordance with the technical system of the third-party internal IOT platform in the related technology, and cannot be adapted and developed with the AirSync technical solution of the WeChat hardware platform. The present application finds the list of devices to be bound through the first interface provided by WeChat to scan devices with Bluetooth function, without the need to redesign and develop the developed devices, thereby reducing the development cost.

[0037] Optionally, binding the target object to any of the to-be-bound devices through the microservice includes:

[0038] S1, calling a second interface located in the microservice for connecting a device, and establishing a connection relationship between a terminal device corresponding to the microservice and any device to be bound through the second interface;

[0039] S2, when a connection relationship between the terminal device and any device to be bound is successfully established, obtaining user information of the target object;

[0040] S3, when any of the devices to be bound exists in the device list pre-stored in the microservice, the target object is bound to any of the devices to be bound through the microservice.

[0041] That is to say, the second interface for connecting the device located in the microservice is called, and any device to be bound is connected through the terminal device corresponding to the microservice by passing the device identification information (such as UUID) of any device to be bound; after the connection is successful, the user information and the device information to be bound of any device to be bound are called to the interface of the third-party Internet of Things platform (which can be understood as third-party Internet of Things platforms such as Haier, Midea, and Gree), uploaded to the third-party Internet of Things platform, and the user information and any bound device to be bound are associated on the third-party Internet of Things platform.

[0042] Optionally, binding the target object to any of the devices to be bound through the microservice includes: detecting whether a binding operation sent by the target object through the microservice is received, wherein the binding operation is used to indicate a selection operation of a target binding device determined by the target object in a device to be bound; and upon receiving a binding operation sent by the target object through the microservice, establishing a binding relationship between the target object and the target binding device according to the binding operation.

[0043] That is to say, all the filtered devices to be bound are displayed in the display page of the terminal device, and the target object receives the selection operation of the target object for any device to be bound in the display page, which can also be understood as that the user clicks on a device to be bound in the display page; calls the second interface for connecting the device located in the microservice, and connects the selected device to be bound through the terminal device corresponding to the microservice by passing the device identification information (such as UUID) of the selected device to be bound; after the connection is successful, calls the interface of the third-party Internet of Things platform (which can be understood as third-party Internet of Things platforms such as Haier, Midea, and Gree) with the user information and the device information to be bound of the selected device to be bound, and uploads it to the third-party Internet of Things platform, and associates the user information with the bound selected device to be bound on the third-party Internet of Things platform.

[0044] In an exemplary embodiment, determining whether any of the to-be-bound devices exists in a device list pre-stored in the microservice includes: obtaining the device list in an Internet of Things platform corresponding to the microservice, and pre-storing the device list in the microservice; obtaining device identifiers of all devices in the pre-stored device list and a to-be-bound device identifier of any of the to-be-bound devices; determining whether the to-be-bound device identifier exists in the device identifier; and, if the to-be-bound device identifier exists in the device identifier, determining whether any of the to-be-bound devices exists in the device list pre-stored in the microservice.

[0045] Specifically, the user uses the microservice of the third-party client to enter the device binding page. After the page is initialized successfully, the interface of the third-party Internet of Things platform is called to query the device identification (UUID) set of the third-party Bluetooth network device, and the device identification set is stored locally to facilitate subsequent comparison and screening; among the device identifications of the devices to be bound that are continuously returned through the first interface, any device identification in the device identifications to be bound is compared with the device identification set. When any device identification in the device identifications to be bound exists in the device identification set, any device identification to be bound is retained; when any device identification in the device identifications to be bound does not exist in the device identification set, any device identification to be bound is removed.

[0046] In an exemplary embodiment, after determining whether any of the to-be-bound devices exists in the device list pre-stored in the microservice, the method further includes:

[0047] S1, when any of the devices to be bound exists in the device list pre-stored in the microservice, obtaining tag data of any of the devices to be bound, wherein the tag data is used to indicate the signal strength of the broadcast signal of any of the devices to be bound received by the first interface;

[0048] S2, sorting the devices to be bound according to the signal strengths, and displaying the sorted devices to be bound on the microservice.

[0049] That is, according to the signal strength with broadcast information, the distance between the device to be bound and the terminal device is determined, and according to the signal strength, the devices to be bound are sorted so that the device closest to the terminal device is displayed first in the display page of the microservice, thereby reducing the probability of incorrect binding.

[0050] In an exemplary embodiment, after the target object is bound to any of the devices to be bound through the microservice, it also includes: sending user information of the target object and device information to be bound of any of the devices to be bound to the Internet of Things platform corresponding to the microservice; when the Internet of Things platform updates the bound device information of the target object according to the user information and the device information to be bound, receiving the bound device information of the target object sent by the Internet of Things platform; and rendering the bound device information of the target object on the display page of the microservice.

[0051] It should be noted that the IoT platform corresponding to the microservice can be understood as a third-party IoT platform. For example, when a user enters Haier microservice through microservice, the IoT platform corresponding to the microservice is the Haier IoT platform; when a user enters Midea microservice through microservice, the IoT platform corresponding to the microservice is the Midea IoT platform.

[0052] In an exemplary embodiment, before rendering the bound device information of the target object on the display page of the microservice, it also includes: monitoring whether an update operation sent by the target object through the microservice is received, wherein the update operation is used to instruct the target object to update the bound device information displayed on the microservice; and when the update operation sent by the target object through the microservice is received, rendering the bound device information of the target object on the display page of the microservice.

[0053] That is, when an update operation of the target object is received, the bound device list in the display page is updated.

[0054] In order to better understand the process of the binding method of the above-mentioned device, the implementation method flow of the binding of the above-mentioned device is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.

[0055] In this embodiment, a device binding system is provided, which specifically includes: a WeChat applet (equivalent to the microservice in the above embodiment) and a third-party IOT platform (equivalent to the Internet of Things platform in the above embodiment).

[0056] WeChat Mini Program: The end that users come into contact with is divided into the Mini Program's universal Bluetooth capability module and the Mini Program's binding page corresponding to the third-party client. The Mini Program's binding page corresponding to the third-party client is used to display nearby Bluetooth devices discovered and guide users to bind the discovered devices. The WeChat Mini Program's universal Bluetooth capability is used to provide capability support to the Mini Program's binding page corresponding to the third-party client. It can discover the user's mobile terminal and search for the attached Bluetooth device, as well as perform connection and binding operations for the device selected by the user.

[0057] Third-party IOT platform end: the data storage end is used to provide the current third-party Bluetooth device identification set to identify which Bluetooth devices are third-party internal network devices; and store the corresponding relationship between users and their bound devices.

[0058] Take Haier as an example. Figure 3 is a system framework diagram of a device binding method according to an optional embodiment of the present application, such as Figure 3 As shown, it specifically includes: WeChat applet (equivalent to the microservice in the above embodiment) and Haier IOT platform (equivalent to the Internet of Things platform in the above embodiment).

[0059] WeChat Mini Program: The end that users come into contact with is divided into the Mini Program's universal Bluetooth capability module and the Haier Smart Home Mini Program's binding page. The Haier Smart Home Mini Program's binding page is used to display nearby Bluetooth devices discovered and guide users to bind the discovered devices. The WeChat Mini Program's universal Bluetooth capability is used to provide capability support for the Haier Smart Home Mini Program's binding page, which can discover the user's mobile terminal's search for attached Bluetooth devices, and perform connection and binding operations for the device selected by the user.

[0060] Haier IOT platform end: the data storage end is used to provide the current Haier Bluetooth device identification set to identify which Bluetooth devices are Haier's internal network devices; second, it is used to store the correspondence between users and their bound devices.

[0061] In this embodiment, a device binding system is provided. Figure 4 is a flow chart of a method for binding a device according to an optional embodiment of the present application, such as Figure 4 As shown, the specific steps are as follows:

[0062] Step S401: The user uses the applet corresponding to the third-party client to enter the device binding page. After the page is initialized successfully, the interface of the third-party IOT platform is called to query the characteristic identification (UUID) set of the third-party BLE Bluetooth network device, and the set is stored locally for subsequent comparison and screening.

[0063] Step S402: On the device binding page, the capability interface for scanning nearby devices of WeChat's universal Bluetooth capability is called (equivalent to the first interface in the above embodiment). This interface will continuously return the set of Bluetooth devices currently scanned to the attachment, and the returned device list includes the characteristic identifier (UUID) of the scanned device. The returned set of nearby Bluetooth devices is stored locally for subsequent comparison and screening.

[0064] Step S403: Compare the feature identifiers in the locally stored set of Haier BLE Bluetooth network devices with any feature identifier in the nearby Bluetooth device set. If there is an adjustment identifier consistent with any feature identifier in the feature identifiers in the locally stored set of Haier BLE Bluetooth network devices, retain the any feature identifier in the nearby Bluetooth device set; if not, remove the any feature identifier from the nearby Bluetooth device set.

[0065] Step S404: The final set of nearby Bluetooth devices after comparison and screening is displayed on the front end, prompting the user to connect and bind.

[0066] Step S405: The user clicks on a nearby Bluetooth device, calls the connection capability interface of WeChat's universal Bluetooth capability (equivalent to the second interface in the above embodiment), and connects to the nearby specified Bluetooth device by transmitting the characteristic identifier (UUID) of the Bluetooth device.

[0067] Step S406: After the connection is successful, the current user (mobile phone number, user ID) information and the characteristic identifier (UUID) of the Bluetooth device are called the interface of the Haier IOT platform and uploaded to the IOT platform, and the user and the bound Bluetooth device are associated.

[0068] Step S407: Prompt the user that the device is successfully bound.

[0069] In the embodiment of the present invention, if the AirSync technical solution is used for a Bluetooth device that has been designed and developed by a third party, it is equivalent to redesigning and developing the entire device hardware, and the development cost is unaffordable. In addition, the AirSync technical solution can only be connected to the WeChat system, which is incompatible with the current third-party IOT technical system and cannot be integrated into the third-party IOT platform. Through the Bluetooth universal capability provided by WeChat, the binding of Bluetooth devices is realized, and there is no need to redesign and develop the developed devices. It only needs to maintain the characteristic identifier (UUID) set of the Bluetooth device.

[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment 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 application, 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), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0071] Figure 5 is a structural block diagram of a device binding apparatus according to an embodiment of the present application; Figure 5 As shown,

[0072] A monitoring module 52, used to monitor whether the microservice of the mobile terminal receives an opening operation of the target object, wherein the opening operation is used to open a device binding page in the microservice;

[0073] A calling module 54 is used to call a first interface located in the microservice and used to scan devices with a Bluetooth function when an opening operation of the target object is detected, and obtain a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound;

[0074] A determination module 56, used to determine whether any of the to-be-bound devices exists in the device list pre-stored in the microservice;

[0075] The binding module 58 is used to bind the target object to any of the to-be-bound devices through the microservice when any of the to-be-bound devices exists in the device list pre-stored in the microservice.

[0076] Through the above-mentioned device, it is monitored whether the microservice of the mobile terminal receives the opening operation of the target object, wherein the opening operation is used to open the device binding page in the microservice; when the opening operation of the target object is monitored, the first interface located in the microservice and used to scan devices with Bluetooth function is called, and a list of devices to be bound is obtained through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound; it is determined whether any of the devices to be bound exists in the list of devices pre-stored in the microservice; when any of the devices to be bound exists in the list of devices pre-stored in the microservice, the target object is bound to any of the devices to be bound through the microservice, which solves the problem that the network device is basically designed and developed in accordance with the technical system of the third-party internal IOT platform in the related technology, and cannot be adapted and developed with the AirSync technical solution of the WeChat hardware platform. Then, the list of devices to be bound is found through the first interface provided by WeChat to scan devices with Bluetooth function, without the need to redesign and develop the developed devices, thereby reducing the development cost.

[0077] In an exemplary embodiment, the binding module 58 is used to call a second interface for connecting devices located in the microservice, and establish a connection relationship between the terminal device corresponding to the microservice and any of the devices to be bound through the second interface; when the connection relationship between the terminal device and any of the devices to be bound is successfully established, obtain user information of the target object; when any of the devices to be bound exists in the device list pre-stored in the microservice, bind the target object to any of the devices to be bound through the microservice.

[0078] In an exemplary embodiment, the binding module 58 is used to detect whether a binding operation sent by the target object through the microservice is received, wherein the binding operation is used to indicate a selection operation of a target binding device determined by the target object in a device to be bound; when a binding operation sent by the target object through the microservice is received, a binding relationship between the target object and the target binding device is established according to the binding operation.

[0079] In an exemplary embodiment, a determination module 56 is used to obtain the device list in the Internet of Things platform corresponding to the microservice, and pre-store the device list in the microservice; obtain the device identifiers of all devices in the pre-stored device list and the to-be-bound device identifier of any to-be-bound device; determine whether the to-be-bound device identifier exists in the device identifier; if the to-be-bound device identifier exists in the device identifier, determine whether any to-be-bound device in the to-be-bound devices exists in the device list pre-stored in the microservice.

[0080] In an exemplary embodiment, the determination module 56 is used to obtain the tag data of any device to be bound when any device to be bound exists in the device list pre-stored in the microservice, wherein the tag data is used to indicate the signal strength of the broadcast signal of any device to be bound received by the first interface; sort the devices to be bound according to the signal strength, and display the sorted devices to be bound on the microservice.

[0081] In an exemplary embodiment, the above-mentioned device also includes a rendering module, which is used to send the user information of the target object and the to-be-bound device information of any to-be-bound device to the Internet of Things platform corresponding to the microservice; when the Internet of Things platform updates the bound device information of the target object according to the user information and the to-be-bound device information, receive the bound device information of the target object sent by the Internet of Things platform; and render the bound device information of the target object on the display page of the microservice.

[0082] In an exemplary embodiment, a rendering module is used to monitor whether an update operation sent by the target object through the microservice is received, wherein the update operation is used to instruct the target object to update the bound device information displayed on the microservice; when an update operation sent by the target object through the microservice is received, the bound device information of the target object is rendered on the display page of the microservice.

[0083] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0084] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0085] S1, monitoring whether the microservice of the mobile terminal receives an opening operation of the target object, wherein the opening operation is used to open a device binding page in the microservice;

[0086] S2, when an opening operation of the target object is detected, calling a first interface located in the microservice and used to scan devices with a Bluetooth function, and obtaining a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound;

[0087] S3, determining whether any of the to-be-bound devices exists in the device list pre-stored in the microservice;

[0088] S4, when any of the devices to be bound exists in the device list pre-stored in the microservice, the target object is bound to any of the devices to be bound through the microservice.

[0089] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0090] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0091] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0092] S1, monitoring whether the microservice of the mobile terminal receives an opening operation of the target object, wherein the opening operation is used to open a device binding page in the microservice;

[0093] S2, when an opening operation of the target object is detected, calling a first interface located in the microservice and used to scan devices with a Bluetooth function, and obtaining a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound;

[0094] S3, determining whether any of the to-be-bound devices exists in the device list pre-stored in the microservice;

[0095] S4, when any of the devices to be bound exists in the device list pre-stored in the microservice, the target object is bound to any of the devices to be bound through the microservice.

[0096] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0097] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0098] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0099] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A device binding method, characterized in that: include: Monitoring whether the microservice of the mobile terminal receives an open operation of the target object, wherein the open operation is used to open a device binding page in the microservice; In the case of detecting an opening operation of the target object, calling a first interface located in the microservice and used to scan devices with a Bluetooth function, and obtaining a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound; Determine whether there is any device to be bound in the list of devices to be bound in the list of devices pre-stored in the microservice; In the case where any device to be bound in the list of devices to be bound exists in the list of devices pre-stored in the microservice, binding the target object with any device to be bound through the microservice; Among them, binding the target object with any of the devices to be bound through the microservice includes: calling a second interface for connecting devices located in the microservice, and establishing a connection relationship between a terminal device corresponding to the microservice and any of the devices to be bound through the second interface; when the connection relationship between the terminal device and any of the devices to be bound is successfully established, obtaining user information of the target object; when any of the devices to be bound exists in a device list pre-stored in the microservice, binding the target object with any of the devices to be bound through the microservice.

2. The device binding method according to claim 1, characterized in that: Binding the target object to any of the to-be-bound devices through the microservice includes: Detecting whether a binding operation sent by the target object through the microservice is received, wherein the binding operation is used to indicate a selection operation of a target binding device determined by the target object in a device to be bound; When a binding operation sent by the target object through the microservice is received, a binding relationship between the target object and a target binding device is established according to the binding operation.

3. The device binding method according to claim 1, characterized in that: Determining whether there is any device to be bound in the list of devices to be bound in the list of devices pre-stored in the microservice includes: Obtain the device list in the Internet of Things platform corresponding to the microservice, and pre-store the device list in the microservice; Obtaining device identifiers of all devices in the pre-stored device list and a to-be-bound device identifier of any to-be-bound device; Determine whether the device identifier to be bound exists in the device identifier; In the case that the to-be-bound device identifier exists in the device identifier, it is determined whether there is any to-be-bound device in the to-be-bound device list in the device list pre-stored in the microservice.

4. The device binding method according to claim 1, characterized in that: After determining whether there is any device to be bound in the list of devices to be bound in the list of devices pre-stored in the microservice, the method further includes: In the case that any of the to-be-bound devices exists in the device list pre-stored in the microservice, obtaining tag data of any of the to-be-bound devices, wherein the tag data is used to indicate the signal strength of the broadcast signal of any of the to-be-bound devices received by the first interface; The devices to be bound are sorted according to the signal strengths, and the sorted devices to be bound are displayed on the microservice.

5. The device binding method according to claim 1, characterized in that: After binding the target object to any of the to-be-bound devices through the microservice, the method further includes: Sending the user information of the target object and the device information to be bound of any device to be bound to the Internet of Things platform corresponding to the microservice; When the Internet of Things platform updates the bound device information of the target object according to the user information and the to-be-bound device information, receiving the bound device information of the target object sent by the Internet of Things platform; Render the bound device information of the target object on the display page of the microservice.

6. The device binding method according to claim 5, characterized in that: Before rendering the bound device information of the target object on the display page of the microservice, the method further includes: Monitoring whether an update operation sent by the target object through the microservice is received, wherein the update operation is used to instruct the target object to update the bound device information displayed on the microservice; When an update operation is received from the target object through the microservice, the bound device information of the target object is rendered on a display page of the microservice.

7. A device binding apparatus, characterized in that: include: A monitoring module, used to monitor whether the microservice of the mobile terminal receives an opening operation of the target object, wherein the opening operation is used to open a device binding page in the microservice; A calling module, configured to call a first interface located in the microservice and used to scan devices with a Bluetooth function when an opening operation of the target object is detected, and obtain a list of devices to be bound through the first interface, wherein the list of devices to be bound is used to indicate one or more devices to be bound; A determination module, used to determine whether any of the to-be-bound devices exists in the device list pre-stored in the microservice; A binding module, configured to bind the target object to any of the devices to be bound through the microservice if any of the devices to be bound exists in the device list pre-stored in the microservice; Among them, the binding module is also used to call a second interface located in the microservice for connecting devices, and establish a connection relationship between the terminal device corresponding to the microservice and any of the devices to be bound through the second interface; when the connection relationship between the terminal device and any of the devices to be bound is successfully established, obtain user information of the target object; when any of the devices to be bound exists in the device list pre-stored in the microservice, bind the target object to any of the devices to be bound through the microservice.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6 when executed.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Device binding method and apparatus

    CN106413124A

  • Equipment binding method and device, storage medium and electronic device

    CN112738265A