Method and device for controlling intelligent equipment, electronic device and air conditioner
By adopting Bluetooth function and main authentication and authorization authentication mechanisms on smart devices, the problem of APP cannot be used normally due to the cancellation of infrared functions of smartphones, and efficient, safe and reliable Bluetooth control of smart devices is achieved.
Patent Information
- Application Number
- CN202311213472.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2025-03-21
AI Technical Summary
With the development of smartphones, more and more mobile phones have cancelled infrared functions, resulting in the APP that controls smart home appliances through infrared functions that cannot be used normally.
Controlling smart devices through Bluetooth functions, using the main authentication and authorization authentication methods, ensure that legal terminals can control smart devices, and improve the security and reliability of smart device control.
It realizes efficient control of smart devices through mobile phone Bluetooth functions, solves the problem of APP not being able to be used normally due to cancellation of infrared functions, and improves the security and reliability of smart device control.
Smart Images

Figure CN119676702A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, for example, to a method, device, electronic device and air conditioner for controlling smart devices. Background Art
[0002] At present, with the popularization of smart home appliances and the rapid development and application of smart phones, mobile remote control APPs (Applications) have appeared on the market, such as Xiaomi Universal Remote Control, Remote Control Master, Universal Universal Remote Control, etc. Users can control related home appliances through the above APPs.
[0003] In the process of implementing the embodiments of the present application, it is found that there are at least the following problems in the related technology:
[0004] The above apps all control devices through infrared. With the development of smart phones, more and more mobile phones have cancelled the infrared function due to cost considerations. Therefore, the corresponding apps that control smart home appliances through infrared function cannot be used normally.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0007] Embodiments of the present application provide a method, an apparatus, an electronic device, and an air conditioner for controlling a smart device to improve the safety and reliability of the smart device control.
[0008] In some embodiments, the method includes: performing main authentication based on the authentication information sent by the received terminal; wherein the terminal is a main terminal that establishes a connection with the smart device directly or an authorized terminal that establishes a connection with the smart device through an authorization authentication code shared by the main terminal; if the main authentication fails, performing authorization authentication; if both the main authentication and the authorization authentication fail, disconnecting the Bluetooth connection with the terminal.
[0009] Optionally, the method further includes: when the primary authentication or the authorization authentication is passed, sending the status information of the smart device to the terminal.
[0010] Optionally, it also includes: generating and saving an authorization authentication code when the primary authentication is passed;
[0011] Send the authorization code to the terminal.
[0012] Optionally, generating an authorization authentication code includes: encrypting mac and fixed salt 3 through a sha256 algorithm to obtain an authorization authentication code.
[0013] Optionally, it also includes: when the main authentication fails but the authorization authentication passes, the number of saved authorization authentication codes is reduced by 1; when the number is zero after being reduced by 1, the saved authorization authentication code is deleted.
[0014] Optionally, authorization authentication is performed, including: decrypting the authentication information; comparing the decrypted authentication information with a pre-stored authorization authentication code; if the comparison result is consistent, determining that the authorization authentication has passed; if the comparison result is inconsistent, determining that the authorization authentication has failed.
[0015] In some embodiments, the method includes: obtaining identification information of the smart device; encrypting the identification information of the device to obtain authentication information; sending the authentication information to the smart device so that the smart device performs main authentication and / or authorization authentication based on the received authentication information, and if both the main authentication and the authorization authentication fail, disconnecting the Bluetooth connection with the terminal.
[0016] In some embodiments, the device includes: a main authentication module, configured to perform main authentication based on the authentication information sent by the terminal; wherein the terminal is a main terminal that establishes a connection with the smart device directly or an authorized terminal that establishes a connection with the smart device through an authorization authentication code shared by the main terminal; an authorization authentication module, which performs authorization authentication if the main authentication fails; and a disconnection module, which is configured to disconnect the Bluetooth connection with the terminal if both the main authentication and the authorization authentication fail.
[0017] In some embodiments, the device includes: an acquisition module configured to acquire identification information of a smart device; an encryption module configured to encrypt the identification information of the device to obtain authentication information; a sending module configured to send the authentication information to the smart device, so that the smart device performs main authentication and / or authorization authentication based on the received authentication information, and disconnects the Bluetooth connection with the terminal if both the main authentication and the authorization authentication fail.
[0018] In some embodiments, the air conditioner includes: an air conditioner body; the above-mentioned device for controlling smart devices is installed on the air conditioner body.
[0019] The method, device, electronic device and air conditioner for controlling a smart device provided in the embodiments of the present application can achieve the following technical effects:
[0020] The authentication information sent by the terminal is first authenticated by the main authentication to identify the main terminal that directly establishes a connection with the smart device. If the main authentication fails, the authorization authentication is performed to identify the authorized terminal that establishes a connection through the authorization authentication code. If the sender of the authentication information is neither the main terminal nor the authorized terminal, it means that it is an illegal terminal, and the Bluetooth connection with the terminal is disconnected. In this way, it is ensured that the legal terminal can control the smart device, and the security and reliability of the smart device control are improved.
[0021] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0023] Figure 1 A flowchart of a method for controlling a smart device according to an embodiment of the present application;
[0024] Figure 2 is a flow chart of another method for controlling a smart device according to an embodiment of the present application;
[0025] Figure 3 is a flowchart of another method for controlling a smart device according to an embodiment of the present application;
[0026] Figure 4 is a schematic diagram of an apparatus for controlling a smart device according to an embodiment of the present application;
[0027] Figure 5 is a schematic diagram of another apparatus for controlling a smart device according to an embodiment of the present application;
[0028] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application;
[0029] Figure 7 It is a schematic diagram of an air conditioner according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to be able to understand the features and technical contents of the embodiments of the present application in more detail, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0031] The terms "first", "second", etc. in the specification and claims of the embodiments 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 numbers used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present application described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0032] Unless otherwise stated, the term "plurality" means two or more.
[0033] In the embodiment of the present application, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.
[0034] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0035] In real family life, more and more home appliances need to be controlled by remote controls. The remote controls of these home appliances are independent of each other. Therefore, it is often impossible to find the corresponding remote control quickly, for example, it is impossible to find the air conditioner remote control, TV remote control, set-top box remote control, etc.
[0036] At present, with the popularization of smart home appliances and the rapid development and application of smart phones, mobile remote control APPs (Applications) have appeared on the market, such as Xiaomi Universal Remote Control, Remote Control Master, Universal Universal Remote Control, etc. Users can use the above APPs to control related home appliances. However, the above APPs all control the devices through infrared. With the development of smart phones, more and more mobile phones have cancelled the infrared function for cost considerations. Therefore, the corresponding APPs that control smart home appliances through infrared functions cannot be used normally.
[0037] Based on this, an embodiment of the present application provides a method for controlling a smart device via Bluetooth, which can operate the smart device via the Bluetooth function of a mobile phone, making the control process of the smart device more efficient.
[0038] Combination Figure 1 As shown, a method for controlling a smart device provided in an embodiment of the present application is applied to a smart device, and the method specifically includes:
[0039] S101: Perform primary authentication according to the received authentication information sent by the terminal.
[0040] The terminal is a main terminal that directly establishes a connection with the smart device or an authorized terminal that establishes a connection with the smart device through an authorization authentication code shared by the main terminal.
[0041] For example, the terminal can be a smartphone, tablet computer, computer, etc. Smart devices can be household appliances with wireless communication functions such as smart air conditioners, smart refrigerators, and smart fans. The terminal that is directly connected to the smart device is the main terminal. For example, a smartphone that is directly connected to the smart air conditioner by scanning text information is the main terminal. Other terminals can establish a connection with the smart device through the authorization authentication code shared by the main terminal. Such terminals are authorized terminals.
[0042] S102: If the primary authentication fails, authorization authentication is performed;
[0043] S103: If both the primary authentication and the authorization authentication fail, disconnect the Bluetooth connection with the terminal.
[0044] The above method provided by the embodiment of the present application first performs a main authentication on the authentication information sent by the terminal to identify the main terminal that directly establishes a connection with the smart device. If the main authentication fails, an authorization authentication is performed to identify the authorized terminal that establishes a connection through the authorization authentication code. If the sender of the authentication information is neither the main terminal nor the authorized terminal, it means that it is an illegal terminal, and the Bluetooth connection with the terminal is disconnected. In this way, it is ensured that the legal terminal can control the smart device, and the security and reliability of the smart device control are improved.
[0045] Optionally, the method further includes: when the primary authentication or the authorization authentication is passed, sending the status information of the smart device to the terminal.
[0046] In this way, if the master authentication is passed, it means that the terminal connected to the smart device is the master terminal, that is, the terminal directly connected to the smart device. If the authorization authentication is passed, it means that the terminal connected to the smart device is the authorized terminal, that is, the terminal that establishes the connection through the authorization authentication code of the master terminal branch line. In both cases, the status information of the smart device can be sent to the terminal so that the terminal can control the smart device, thereby realizing the function of the terminal replacing the remote control and improving the convenience of using the smart terminal.
[0047] Optionally, after the code is scanned successfully, the device information is saved. Specifically, after the code is scanned successfully, the device information such as mac, deviceid, model information, openid, device identification code, etc. can be stored in the database through the background service interface. In this way, the next time the user uses it, he can directly connect and issue control instructions without scanning the code or other related operations.
[0048] Optionally, the method further includes: generating and saving an authorization authentication code when the primary authentication is passed; and sending the authorization authentication code to the terminal.
[0049] In this way, if the main authentication is passed, it means that the current terminal is directly connected to the smart device. In order to facilitate other terminals to establish connections with smart devices more conveniently, an authorization authentication code can be generated and shared with other terminals through the authenticated main terminal. Other terminals do not need to scan the code, but can directly achieve authentication and connection through the authorization authentication code, further improving the convenience of using smart terminals.
[0050] Optionally, generating an authorization authentication code includes: encrypting mac and fixed salt 3 through a sha256 algorithm to obtain an authorization authentication code.
[0051] Optionally, the above method further includes: when the primary authentication fails but the authorization authentication passes, reducing the number of saved authorization authentication codes by 1; when the number is zero after being reduced by 1, deleting the saved authorization authentication code.
[0052] If the main authentication fails but the authorization authentication passes, it means that the terminal sending the authentication information is an authorized terminal. The number of authorization authentications can be limited, for example, only five times can be authorized. After five authorized connections, the authorization authentication code is deleted and becomes invalid. This avoids the abuse of the authorization authentication code and ensures the security and reliability of smart devices.
[0053] Optionally, if the smart device does not receive any authentication within a predetermined time, the Bluetooth connection of the smart device is closed to ensure that it is not operated by other illegal users. The predetermined time can be set according to user needs, for example, 10 seconds, 20 seconds, 60 seconds, etc.
[0054] Combination Figure 2 As shown, another method for controlling a smart device provided in an embodiment of the present application further refines the authorization and authentication process, such as Figure 2 As shown, the method includes:
[0055] S201: Perform primary authentication according to the authentication information received from the terminal.
[0056] The terminal is a main terminal that directly establishes a connection with the smart device or an authorized terminal that establishes a connection with the smart device through an authorization authentication code shared by the main terminal;
[0057] S202: If the primary authentication fails, decrypt the authentication information;
[0058] S203: Compare the decrypted authentication information with the pre-stored authorization authentication code;
[0059] S204: If the comparison results are consistent, it is determined that the authorization authentication is passed;
[0060] S205: When the comparison result is inconsistent, it is determined that the authorization authentication has not passed.
[0061] S206: If both the primary authentication and the authorization authentication fail, disconnect the Bluetooth connection with the terminal.
[0062] Specifically, after the device is connected, the device starts authentication. First, the main authentication is detected. If the main authentication fails, the authorization authentication is detected. After the authentication is successful, the corresponding authorization count is reduced by one. If the authorization count is 0, the shared authorization code is deleted. If the authorization count is -1, no operation is performed and the connection is authorized. If no authentication is passed, any other operation will return failure, and if no authentication is received within 10 seconds (the time can be flexibly configured), the connection is closed. This is to ensure that it is not operated by other users.
[0063] Combination Figure 3 As shown, a method for controlling a smart device provided by an embodiment of the present application is applied to a terminal device, such as Figure 3 As shown, the method includes:
[0064] S301: Obtain identification information of the smart device;
[0065] S302: Encrypt the identification information of the device to obtain authentication information;
[0066] The identification information of the device includes at least: device mac, timestamp, product identification code, signature. The encryption method can adopt any signature generation method, for example, the authentication information is generated using the sha256 (mac + timestamp + product identification code + "fixed salt 1") method. Among them, the product identification code can be generated according to the following method: sha256 (mac + "fixed salt 2"). The above-mentioned fixed salt 1 and fixed salt 2 can be set according to needs, and the embodiments of the present application are not limited to this.
[0067] S303: Send the authentication information to the smart device, so that the smart device performs main authentication and / or authorization authentication according to the received authentication information, and disconnects the Bluetooth connection with the terminal if both the main authentication and the authorization authentication fail.
[0068] The above method provided by the embodiment of the present application, after obtaining the identification information of the smart device, encrypts the identification information to obtain the authentication information, and sends the authentication information to the smart device. The smart device first performs a main authentication on the authentication information sent by the terminal to identify the main terminal that directly establishes a connection with the smart device. If the main authentication fails, an authorization authentication is performed to identify the authorized terminal that establishes a connection through the authorization authentication code. If the sender of the authentication information is neither the main terminal nor the authorized terminal, it means that it is an illegal terminal, and the Bluetooth connection with the terminal is disconnected. In this way, it is ensured that the legal terminal can control the smart device, and the security and reliability of the smart device control are improved.
[0069] Optionally, the above method also includes: the user can share the device information (mac, identification code) with other people for use, without the need to scan the QR code. The authorization process also includes: generating an authorization identification code, and the authorization identification code generation algorithm sha256 (mac + "fixed salt 3"). Due to the limitations of the air-conditioning equipment itself, the number of connections of the authorized device is not authorized for a long time. The air conditioner may be shut down or fail, and time as a parameter is unstable. The air conditioner itself does not perform time calculations. Write the generated authorization identification code and the number of authorizations to the device. When there is no limit on the number of times, the number can be set to -1. Share the authorization code, and share the authorization code with users in need. After the user receives the authorization code, he can use the authorization code to connect.
[0070] Optionally, the identification information of the smart device includes at least: a MAC address and a device identification.
[0071] After obtaining the device's own mac, call the background service interface to obtain the device model information. It should be noted that all the corresponding device models are obtained through the preset mapping relationship between mac and model.
[0072] After the terminal obtains the identification information of the smart device, a list of all available smart devices may be displayed on the terminal, for example, the device list may be displayed in the form of model names.
[0073] Furthermore, the Bluetooth scan can be started at preset intervals to obtain the Bluetooth signal strength of each device in the device list, and the Bluetooth signal strength can be displayed in real time.
[0074] Optionally, encrypting the identification information of the device to obtain authentication information includes: encrypting the identification information, timestamp, and fixed salt 1 of the device by using a sha256 algorithm to obtain authentication information.
[0075] Optionally, after receiving the status information sent by the smart device, the method further includes: obtaining a constraint file of the smart device; generating a control panel according to the constraint file and the status information; receiving operation parameters input by the user based on the control panel; and sending the operation parameters to the smart device so that the smart device operates according to the operation parameters.
[0076] Specifically, after the connection is successful, the corresponding Characteristic is set. For example, the current status information of the smart device can be obtained through setCharacteristicNotification. Taking the smart device as an air conditioner as an example, the status information includes but is not limited to: current temperature, set temperature, operating mode, humidity, etc. When the air conditioner status changes, the latest device information can be obtained through this interface.
[0077] After obtaining the current state of the smart device, a virtual remote control panel can be formed on the display interface of the terminal. It should be noted that there may be constraints between the various state information of the smart device, so the state information of the smart device obtained can also include the constraints, so that the virtual remote control panel can also be formed according to the constraints. For example, continuing to take the smart device as an air conditioner, in the dehumidification mode, the button for setting the temperature is unavailable.
[0078] In this way, the constraint file can reflect the availability of various attributes consistent with the smart device model, so that the generated control panel can be functionally equivalent to the physical remote control of the smart device. Compared with all devices corresponding to the same control panel, the method of the embodiment of the present application can make the control process of the smart device clearer and simpler, enhance the user experience, and improve the control efficiency of the smart device.
[0079] Combination Figure 4 As shown, a device for controlling a smart device provided in an embodiment of the present application includes:
[0080] The main authentication module 401 is configured to perform the main authentication according to the authentication information sent by the received terminal; wherein the terminal is a main terminal that directly establishes a connection with the smart device or an authorized terminal that establishes a connection with the smart device through an authorization authentication code shared by the main terminal;
[0081] Authorization authentication module 402, when the primary authentication fails, performs authorization authentication;
[0082] The disconnection module 403 is configured to disconnect the Bluetooth connection with the terminal when both the primary authentication and the authorization authentication fail.
[0083] The above-mentioned device provided by the embodiment of the present application first performs a main authentication on the authentication information sent by the terminal to identify the main terminal that directly establishes a connection with the smart device. If the main authentication fails, an authorization authentication is performed to identify the authorized terminal that establishes a connection through the authorization authentication code. If the sender of the authentication information is neither the main terminal nor the authorized terminal, it means that it is an illegal terminal, and the Bluetooth connection with the terminal is disconnected. In this way, it is ensured that the legal terminal can control the smart device, and the security and reliability of the smart device control are improved.
[0084] Optionally, it also includes: a sending module, configured to send the status information of the smart device to the terminal when the primary authentication or the authorization authentication is passed.
[0085] Optionally, it also includes: an authorization authentication code generation module, configured to generate and save the authorization authentication code when the primary authentication passes; and a second sending module, configured to send the authorization authentication code to the terminal.
[0086] Optionally, generating an authorization authentication code includes: encrypting mac and fixed salt 3 through a sha256 algorithm to obtain an authorization authentication code.
[0087] Optionally, it also includes: an authorization authentication code processing module, which is configured to reduce the number of saved authorization authentication codes by 1 when the main authentication fails but the authorization authentication passes; and a deletion module, which is configured to delete the saved authorization authentication code when the number is zero after being reduced by 1.
[0088] Optionally, authorization authentication is performed, including: decrypting the authentication information; comparing the decrypted authentication information with a pre-stored authorization authentication code; if the comparison result is consistent, determining that the authorization authentication has passed; if the comparison result is inconsistent, determining that the authorization authentication has failed.
[0089] Combination Figure 5 As shown, a device for controlling a smart device provided in an embodiment of the present application includes:
[0090] The acquisition module 501 is configured to acquire identification information of the smart device;
[0091] The encryption module 502 is configured to encrypt the identification information of the device to obtain authentication information;
[0092] The sending module 503 is configured to send the authentication information to the smart device, so that the smart device performs the main authentication and / or authorization authentication according to the received authentication information, and disconnects the Bluetooth connection with the terminal if both the main authentication and the authorization authentication fail.
[0093] The above-mentioned device provided in the embodiment of the present application, after obtaining the identification information of the smart device, encrypts the identification information to obtain the authentication information, and sends the authentication information to the smart device. The smart device first performs a main authentication on the authentication information sent by the terminal to identify the main terminal that directly establishes a connection with the smart device. If the main authentication fails, an authorization authentication is performed to identify the authorized terminal that establishes a connection through the authorization authentication code. If the sender of the authentication information is neither the main terminal nor the authorized terminal, it means that it is an illegal terminal, and the Bluetooth connection with the terminal is disconnected. In this way, it is ensured that the legal terminal can control the smart device, and the security and reliability of the smart device control are improved.
[0094] Optionally, the identification information of the smart device includes at least: a MAC address and a device identification.
[0095] Optionally, encrypting the identification information of the device to obtain authentication information includes: encrypting the identification information, timestamp, and fixed salt 1 of the device by using a sha256 algorithm to obtain authentication information.
[0096] Optionally, it also includes: a second acquisition module, configured to acquire a constraint file of the smart device; a control panel generation module, configured to generate a control panel based on the constraint file and status information; a receiving module, configured to receive operating parameters input by the user based on the control panel; and a second sending module, configured to send the operating parameters to the smart device so that the smart device operates according to the operating parameters.
[0097] Combination Figure 6 As shown, an embodiment of the present application provides an electronic device 600, including a processor 100 and a memory 101. Optionally, the device may also include a communication interface 102 and a bus 103. Among them, the processor 100, the communication interface 102, and the memory 101 can communicate with each other through the bus 103. The communication interface 102 can be used for information transmission. The processor 100 can call the logic instructions in the memory 101 to execute the method for controlling the smart device of the above embodiment.
[0098] In addition, the logic instructions in the memory 101 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0099] The memory 101 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present application. The processor 100 executes functional applications and data processing by running the program instructions / modules stored in the memory 101, that is, implementing the method for controlling a smart device in the above embodiment.
[0100] The memory 101 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 101 may include a high-speed random access memory and may also include a non-volatile memory.
[0101] Combination Figure 7 As shown, an embodiment of the present application provides an air conditioner 700, including: an air conditioner body, and the above-mentioned device 400 (500, 600) for controlling smart devices. The device 400 (500, 600) for controlling smart devices is installed on the air conditioner body. The installation relationship described here is not limited to placement inside the air conditioner, but also includes installation connections with other components of the air conditioner, including but not limited to physical connections, electrical connections or signal transmission connections. It can be understood by those skilled in the art that the device 400 (500, 600) for controlling smart devices can be adapted to a feasible air conditioner body, thereby realizing other feasible embodiments.
[0102] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the method for controlling a smart device in the above embodiment.
[0103] An embodiment of the present application provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method for controlling a smart device in the above embodiment.
[0104] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0105] The technical solution of the embodiment of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present application. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0106] The above description and accompanying drawings fully illustrate the embodiments of the present application so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0107] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered to exceed the scope of the embodiments of the present application. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0108] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present application may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0109] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two continuous operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A method for controlling an intelligent device, characterized in that: include: Performing a master authentication according to the authentication information received from the terminal; wherein the terminal is a master terminal that is directly connected to the smart device or an authorized terminal that is connected to the smart device through an authorization authentication code shared by the master terminal; If the main authentication fails, authorization authentication is performed; If both the primary authentication and the authorization authentication fail, the Bluetooth connection with the terminal is disconnected.
2. The method according to claim 1, characterized in that Also includes: When the primary authentication or authorization authentication is passed, the status information of the smart device is sent to the terminal.
3. The method according to claim 1, characterized in that Also includes: When the primary authentication is passed, an authorization authentication code is generated and saved; Send the authorization code to the terminal.
4. The method according to claim 1, characterized in that: Also includes: If the primary authentication fails but the authorization authentication passes, the number of saved authorization authentication codes will be reduced by 1; When the number of times is reduced by 1 and becomes zero, the saved authorization verification code is deleted.
5. The method according to claim 1, characterized in that Perform authorization authentication, including: Decrypt the authentication information; Compare the decrypted authentication information with the pre-stored authorization authentication code; If the comparison results are consistent, it is determined that the authorization authentication is passed; When the comparison result is inconsistent, it is determined that the authorization authentication has not passed.
6. A method for controlling an intelligent device, characterized in that: include: Obtain identification information of smart devices; Encrypt the identification information of the device to obtain authentication information; The authentication information is sent to the smart device, so that the smart device performs main authentication and / or authorization authentication according to the received authentication information, and disconnects the Bluetooth connection with the terminal when both the main authentication and the authorization authentication fail.
7. The method according to claim 6, characterized in that The identification information of the smart device includes at least: MAC address and device identification; Encrypt the device's identification information to obtain authentication information, including: The device identification information, timestamp, and fixed salt 1 are encrypted using the sha256 algorithm to obtain authentication information.
8. The method according to claim 6, characterized in that After receiving the status information sent by the smart device, it also includes: Get the constraint file of the smart device; Generate a control panel based on the constraint file and status information; Receiving operating parameters input by a user based on a control panel; The operating parameters are sent to the smart device so that the smart device operates according to the operating parameters.
9. A device for controlling a smart device, characterized in that: include: A main authentication module, configured to perform main authentication according to the authentication information received from the terminal; wherein the terminal is a main terminal that directly establishes a connection with the smart device or an authorized terminal that establishes a connection with the smart device through an authorization authentication code shared by the main terminal; The authorization authentication module performs authorization authentication if the primary authentication fails; The disconnection module is configured to disconnect the Bluetooth connection with the terminal when both the primary authentication and the authorization authentication fail.
10. A device for controlling a smart device, characterized in that: include: An acquisition module is configured to acquire identification information of a smart device; An encryption module, configured to encrypt identification information of a device to obtain authentication information; The sending module is configured to send the authentication information to the smart device so that the smart device performs the main authentication and / or authorization authentication according to the received authentication information, and disconnects the Bluetooth connection with the terminal if both the main authentication and the authorization authentication fail.
11. An electronic device comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to perform the method for controlling a smart device according to any one of claims 1 to 8 when executing the program instructions.
12. An air conditioner, characterized in that: include: Air conditioner body; The device for controlling a smart device as described in claim 9 or 10 is installed on the air conditioner body.