Electric appliance control method, storage medium, mobile terminal and computer program product
Through the combination of near-field communication and wireless communication, mobile terminals quickly obtain electrical equipment information and bind them, solving the complex problem of household appliance control operations and realizing simplified operation and ready-to-use electrical control.
Patent Information
- Application Number
- CN202510606386.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, the mobile terminal control operation steps of household appliances are complex, requiring multiple inputs of information, and relying on the APP to increase the storage and use burden.
The near-field communication device stores the equipment information of the appliance, the mobile terminal detects and reads the equipment information, uses wireless communication to bind, simplify the operation process, and uses small programs to control the appliance without downloading special programs.
It realizes rapid acquisition and binding of electrical equipment information, reduces user operations, improves user experience, reduces learning costs, and supports ready-to-use.
Smart Images

Figure CN120474855A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control, and in particular to a control method for an electrical appliance, a storage medium, a mobile terminal, and a computer program product. Background Art
[0002] In the prior art, the control of household appliances (such as air conditioners) primarily relies on remote controls or mobile terminals (such as mobile phone apps). Remote controls use infrared to send control signals to control the appliance, and users need to manually press buttons on the remote control. Mobile terminal control uses WiFi or Bluetooth connections to achieve remote or close-range control of the appliance. In the prior art, controlling appliances through mobile terminals involves complex steps and requires multiple inputs. Summary of the Invention
[0003] The main purpose of the present invention is to overcome the defects of the above-mentioned related technologies and provide a control method for an electrical appliance, a storage medium, a mobile terminal and a computer program product to solve the problem of complex operating steps for controlling an electrical appliance through a mobile terminal in the related technologies.
[0004] On one hand, the present invention provides a method for controlling an electrical appliance, comprising: when a control program installed on a mobile terminal is started, the mobile terminal detects a near-field communication device within a sensing range; when a near-field communication device within the sensing range is detected, the device information and / or device name of the electrical appliance stored in the detected near-field communication device is read; if the device information and / or device names of more than two electrical appliances are read, the device information and / or device names of the more than two electrical appliances are displayed on the user interface of the control program; the electrical appliance to be controlled selected from the more than two electrical appliances is received on the user interface of the control program; a binding request is sent to the electrical appliance to be controlled via wireless communication, and binding confirmation information returned by the electrical appliance to be controlled is received; if the binding confirmation information returned by the electrical appliance to be controlled is received, it is determined that the binding with the electrical appliance to be controlled is successful, and a binding success information is displayed on the user interface of the control program; wherein the binding request carries the device information of the electrical appliance to be controlled; the electrical appliance to be controlled verifies that the device information of the electrical appliance to be controlled carried in the binding request is consistent with its own device information, and then returns the binding confirmation information to the mobile terminal.
[0005] Optionally, it also includes: if only the device information and / or device name of one appliance is read, then the appliance is used as the appliance to be controlled, a binding request is directly sent to the appliance to be controlled via wireless communication, and binding confirmation information returned by the appliance to be controlled is received.
[0006] Optionally, the near-field communication device includes: a remote control with a near-field communication module; and / or the control program includes: an application for controlling an electrical appliance or a mini-program for controlling an electrical appliance; and / or the wireless communication method includes: Bluetooth and / or WiFi.
[0007] Optionally, the device information includes: a device identifier and a binding identifier; and / or the binding confirmation information includes: device information and a binding code of the mobile terminal.
[0008] Optionally, reading the device information and / or device name of the electrical appliance stored in the detected near-field communication device includes: when a near-field communication device is detected within the sensing range, sending a read request to the detected near-field communication device, and receiving the device information and / or device name of the electrical appliance stored therein returned by the near-field communication device after receiving the read request.
[0009] Optionally, when the near-field communication device stores device information and / or device names of more than two electrical appliances, the near-field communication device determines the order in which the stored device information and / or device names of the two or more electrical appliances are returned according to a preset priority rule, and returns the stored device information and / or device names of the two or more electrical appliances in the determined order.
[0010] Optionally, the preset priority rule includes: preferentially returning device information and / or device names of electrical appliances that have been most recently bound to the mobile terminal in order of binding time.
[0011] Optionally, if the device information and / or device names of more than two electrical appliances are read, the device information and / or device names of the two or more electrical appliances are displayed on the user interface of the control program, including: on the user interface of the control program, the device information and / or device names of the two or more electrical appliances are displayed according to the order in which the stored device information and / or device names of the two or more electrical appliances returned by the near-field communication device are received.
[0012] Optionally, the method further includes: receiving a session key returned by the electrical appliance to be controlled, wherein the session key is used to encrypt communication when interacting with the electrical appliance to be controlled after successful binding with the electrical appliance to be controlled.
[0013] Optionally, the method further includes: after successfully binding with the electrical appliance to be controlled, displaying a control interface of the electrical appliance to be controlled, so as to receive control instructions for the electrical appliance to be controlled on the control interface, and sending the control instructions to the electrical appliance to be controlled.
[0014] Another aspect of the present invention provides a storage medium having a computer program stored thereon, wherein the program implements the steps of any of the aforementioned methods when executed by a processor.
[0015] In another aspect, the present invention provides a mobile terminal comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the aforementioned methods when executing the program.
[0016] In another aspect, the present invention provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the aforementioned methods are implemented.
[0017] According to the technical solution of the present invention, a near-field communication device stores the device information of an appliance to be controlled. A mobile terminal and the near-field communication device communicate to transmit the device information of the appliance to be controlled. The mobile terminal and the appliance to be controlled are then bound wirelessly. This allows for rapid acquisition of the appliance's device information and binding, reducing additional user operations. Once the binding is successful, the user can control the appliance through a control program or mini-program on the mobile terminal, achieving instant connection and immediate use.
[0018] According to the technical solution of the present invention, when using a mini-program to control electrical appliances, users do not need to download dedicated control programs (software). The binding method that combines near-field communication and wireless communication (such as NFC and Bluetooth) can improve the efficiency of device binding. The binding process is convenient and fast, reducing the learning cost. After the binding is successful, the electrical appliances can be directly controlled through the mini-program without the need to enter a verification code for binding and other intermediate steps. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 1 is a method diagram of an embodiment of a method for controlling an electrical appliance provided by the present invention;
[0021] Figure 2 It is a method diagram of a specific embodiment of the air conditioner control method provided by the present invention. DETAILED DESCRIPTION
[0022] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention and corresponding drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention 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 present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes 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.
[0024] The air conditioning control methods in related technologies have the following problems: (1) Complex operation: users need to input information and complete the binding process multiple times. (2) Strong APP dependency: the need to download the APP increases the storage and usage burden. Control delay: Some APPs control the air conditioner through cloud servers, which may cause network delays.
[0025] The present invention provides a control method for an electrical appliance, which can be implemented on a mobile terminal.
[0026] Figure 1 1 is a schematic diagram of an embodiment of a method for controlling an electrical appliance provided by the present invention.
[0027] like Figure 1 As shown, according to one embodiment of the present invention, the control method of the electrical appliance at least includes step S110, step S120, step S130, step S140, step S150 and step S160.
[0028] Step S110: After the control program installed on the mobile terminal is started, the mobile terminal detects a near field communication device within a sensing range.
[0029] The mobile terminal may be, for example, a mobile phone and / or a tablet computer. The mobile terminal has a near-field communication (NFC) function and is capable of performing short-range wireless communication with a NFC device. For example, the mobile terminal has an NFC function and is capable of communicating with an NFC module of an NFC-enabled device. The sensing range may specifically be a near-field communication range, for example, a communication range for NFC communication.
[0030] Step S120: When a near field communication device is detected within the sensing range, device information and / or device name of the electrical appliance stored in the near field communication device is read.
[0031] Specifically, when the control program installed on the mobile terminal is activated, the mobile terminal detects near-field communication devices within its sensing range. Upon detecting a near-field communication device within the sensing range, the mobile terminal reads the device information and / or device name of the appliance stored in the near-field communication device. The near-field communication device can specifically be a control device for an appliance. Once the near-field communication device is successfully paired with an appliance, it can control the appliance and obtain and store the appliance's device information and / or device name.
[0032] In one specific embodiment, the near-field communication device can be a remote control for an electrical appliance. The remote control includes a near-field communication module, such as an NFC module, which can be located on a chip within the remote control. The near-field communication module is used to store and transmit device information for the electrical appliance. When the remote control successfully pairs with an electrical appliance, the device information and / or device name of the appliance is retrieved and stored. Optionally, the remote control also includes a power management module for providing a stable power supply to the remote control to ensure the normal operation of the near-field communication module.
[0033] The near-field communication device stores the device information and / or device name of at least one electrical appliance. That is, the near-field communication device may store the device information and / or device name of only one electrical appliance, or the near-field communication device may store the device information and device names of two or more electrical appliances. For example, the device information and device name of one air conditioner may be stored, or the device information and device names of two or more air conditioners may be stored. The two or more air conditioners may include, for example, a living room air conditioner, a bedroom air conditioner, and a study air conditioner. In a specific embodiment, after the near-field communication device is paired with any electrical appliance, the device information and / or device name of the electrical appliance is stored. For example, after a remote control is paired with an air conditioner, the remote control is stored with the device information of the air conditioner.
[0034] In a specific embodiment, the device information may specifically include: a device identifier and a binding identifier. The device identifier of the appliance may specifically include: the Bluetooth MAC address of the appliance and / or the device number of the appliance. The device number of the appliance may specifically be a unique number of the appliance, for example, a device ID and / or a serial number (SN code). The device ID is used to identify the device, that is, an identifier used to uniquely identify a device. Multiple device information is stored in the remote control and managed according to the device ID. The serial number is used to identify the unique number of the product, which is used to distinguish different products of the same model. The binding identifier includes: encryption information. The encryption information is used for binding verification, and may specifically be encryption information agreed upon in the protocol. The binding identifier may specifically be used to indicate whether the appliance can be bound, that is, whether the appliance can be controlled by the control program. For example, a protocol bit of 1 indicates that the appliance can be bound, and a protocol bit of 0 indicates that the appliance cannot be bound.
[0035] The memory chip of the near-field communication device stores the device information and / or device name of at least one electrical appliance. The storage medium may be an EEPROM memory chip or flash memory to preserve data for a long period of time. Optionally, the stored device information and / or device name of the at least one electrical appliance may be organized in a linked list format, with each record containing a device identifier and a binding identifier, for example, the device name, device ID, Bluetooth MAC address, and binding identifier of the electrical appliance, supporting storage and rapid retrieval of information for multiple devices.
[0036] The control program may specifically include an application for controlling an electrical appliance, or a mini-program for controlling an electrical appliance. The application for controlling an electrical appliance may specifically be an APP installed on a mobile terminal, such as a mobile phone APP. The mini-program may specifically be a mini-program for controlling an electrical appliance in any application with mini-program functionality. The application with mini-program functionality may specifically be an APP installed on a mobile terminal, such as WeChat or Alipay, and the mini-program may be, for example, a WeChat mini-program or an Alipay mini-program.
[0037] While app-based control of appliances is convenient, it requires users to download and install the app, register an account and log in, and then bind the appliance to the app through pre-set operations (for example, by scanning a QR code or manually entering a serial number). This complicated operation increases the user's learning and usage costs. Using mini-programs to control appliances eliminates the need for downloads, saving storage space on mobile devices. It also eliminates the need for account registration, simplifying operations and improving the user experience.
[0038] In a specific embodiment, reading the device information and / or device name of the electrical appliance stored in the detected near-field communication device includes: when a near-field communication device is detected within a sensing range, sending a read request to the detected near-field communication device, and receiving the device information and / or device name of the electrical appliance stored in the near-field communication device after receiving the read request.
[0039] For example, after opening an application for controlling electrical appliances installed on a mobile terminal or a mini-program for controlling electrical appliances in an application with a mini-program function installed on the mobile terminal, the mobile terminal (such as a mobile phone) is brought close to the sensing area of the near-field communication device (such as a remote control with a near-field communication module). The mobile terminal turns on the near-field communication function (such as the NFC function) and enters a passive reading mode, waiting to establish a connection with the near-field communication device. The mobile terminal starts the near-field communication module and detects near-field communication devices within the sensing range. The near-field communication module inside the near-field communication device (such as a remote control with a near-field communication module) is in a standby state and responds to nearby near-field communication requests at any time. When the near-field communication device enters the near-field communication sensing range of the mobile terminal, the two parties establish a near-field communication connection. The mobile terminal senses the near-field communication device and sends a communication wake-up signal. The two parties complete a handshake according to the near-field communication protocol (such as the NFC standard protocol, such as ISO 14443) and confirm the communication mode (where the mobile phone is the active end, in active mode, and the near-field communication device is the passive corresponding end, in passive mode).
[0040] The mobile terminal sends a read request to the near-field communication device, and the near-field communication device responds to the read request of the mobile terminal and returns the stored device information to the mobile terminal. In a specific embodiment, the read request is sent to the near-field communication device via an APDU command. Specifically, the mobile terminal exchanges data with the near-field communication device via the APDU (Application Protocol Data Unit) command, and sends an APDU command to read device information to the near-field communication device. The near-field communication device organizes the stored device information into blocks according to the received APDU command and returns them to the mobile terminal one by one. The mobile terminal verifies the received device information, such as performing an integrity check to verify whether the data format complies with the protocol, and using a check bit to detect whether the received data is complete. If the received data is incomplete, a failure is returned and it needs to be retrieved again.
[0041] The present invention utilizes near field communication (such as NFC) to transmit device information, which only requires the mobile terminal to be close to the near field communication device, without the user having to perform excessive operations, and is convenient and fast.
[0042] If the NFC device stores device information and / or device names of two or more electrical appliances, the NFC device returns the stored device names or device information of the two or more electrical appliances to the mobile terminal, or the NFC device returns the stored device information and device names of the two or more electrical appliances to the mobile terminal. If the NFC device stores device information for only one electrical appliance, the NFC device directly returns the stored device information and device name of the electrical appliance to the mobile terminal.
[0043] Step S130: If device information and / or device names of two or more electrical appliances are read, the device information and / or device names of the two or more electrical appliances are displayed on the user interface of the control program.
[0044] In a specific embodiment, if the near-field communication device stores device information and / or device names of more than two electrical appliances, and the near-field communication device returns the stored device names or device information of the two or more electrical appliances, then after receiving the stored device names or device information of the two or more electrical appliances returned by the near-field communication device, the received device names or device information of the two or more electrical appliances are correspondingly displayed on the user interface of the control program.
[0045] In another specific embodiment, if the near-field communication device stores device information and / or device names of two or more electrical appliances, and the near-field communication device returns the stored device information and device names of the two or more electrical appliances, then upon receiving the stored device information and device names of the two or more electrical appliances returned by the near-field communication device, the device information and / or device names of the two or more electrical appliances are displayed on the user interface of the control program. That is, only the device information or device names of the two or more electrical appliances may be displayed, or both the device information and device names of the two or more electrical appliances may be displayed simultaneously.
[0046] The device name can specifically be a name given by the user to the electrical appliance, for example, it can be named "living room air conditioner", "bedroom air conditioner" and "study air conditioner"; or, by default, it can be named "air conditioner 1", "air conditioner 2" and "air conditioner 3". For example, the device names of the two or more electrical appliances are displayed on the user interface of the control program, such as "living room air conditioner", "bedroom air conditioner" and "study air conditioner"; or "air conditioner 1", "air conditioner 2" and "air conditioner 3". For another example, the device information and device names of the two or more electrical appliances are displayed on the user interface of the control program. For example, air conditioner 1-device ID-Bluetooth MAC address-serial number-binding identifier; air conditioner 2-device ID-Bluetooth MAC address-serial number-binding identifier; air conditioner 3-device ID-Bluetooth MAC address-serial number-binding identifier. The device names of the two or more electrical appliances are displayed on the user interface of the control program, which makes it easy for the user to determine the appliance they want to control and facilitates the user to make a selection.
[0047] In a specific embodiment, when the near-field communication device stores device information and / or device names of more than two electrical appliances, the near-field communication device returns the device information and / or device names of the more than two electrical appliances (to the mobile terminal) according to a preset priority rule.
[0048] Specifically, the near-field communication device determines the order in which the stored device information and / or device names of the two or more electrical appliances are returned based on a preset priority rule, and returns the stored device information and / or device names of the two or more electrical appliances in the determined order. If the device information and / or device names of two or more electrical appliances are read, the user interface of the control program displays the device information and / or device names of the two or more electrical appliances based on the order in which the stored device information and / or device names of the two or more electrical appliances returned by the near-field communication device are received.
[0049] In a specific embodiment, the near-field communication device preferentially returns the device information and / or device name of the electrical appliance that has been most recently bound to the mobile terminal in the order of binding time. Specifically, the near-field communication device preferentially returns the device information and / or device name of the electrical appliance that has been bound to the mobile terminal. If more than two electrical appliances have been bound to the mobile terminal, the device information and / or device name of the most recently bound electrical appliance will be preferentially returned in the order of binding time. For example, the near-field communication device has a built-in FILO (first in, last out) mechanism, which arranges the stored device information and / or device names of the two or more electrical appliances in chronological order to ensure that the most recently bound electrical appliance is displayed first.
[0050] In a specific embodiment, if the device information and / or device names of two or more electrical appliances are read, a device list of the two or more electrical appliances is displayed on the user interface of the control program according to the order in which the device information and / or device names of the two or more electrical appliances returned by the near-field communication device are received, and the device list includes the device names and / or device information of the two or more electrical appliances. That is, the device name and / or device information of the first (first) received electrical appliance is displayed at the top (first position) of the device list, the device name and / or device information of the second received electrical appliance is displayed at the second position of the device list, and so on.
[0051] For example, suppose the user has just selected and operated the living room air conditioner. The next time the user approaches the remote control, the remote control will first return the device name "living room air conditioner". The user does not need to search again. The system automatically identifies and recommends the most recently used device. If the user's target is not the appliance most recently controlled, he or she can select and switch through the displayed device list.
[0052] Preferably, after the user interface of the control program receives the electrical appliance to be controlled selected from the two or more electrical appliances, the binding identifier in the device information of the selected electrical appliance to be controlled is verified to determine whether the electrical appliance to be controlled can be bound; if it is determined that the electrical appliance to be controlled can be bound, a binding request is sent to the electrical appliance to be controlled via wireless communication, and binding confirmation information returned by the electrical appliance to be controlled is received; if it is determined that the electrical appliance to be controlled cannot be bound, a notification message indicating that binding cannot be performed is displayed on the user interface of the control program.
[0053] The binding identifier can specifically be used to indicate whether the appliance can be bound, that is, whether the appliance can be controlled by the control program. For example, a protocol bit of 1 indicates that the appliance can be bound, while a protocol bit of 0 indicates that the appliance cannot be bound. That is, if the binding identifier in the received device information is 1, it is determined that the appliance to be controlled can be bound, and a binding request is sent to the appliance to be controlled via wireless communication. If the binding identifier in the received device information is 0, it is determined that the appliance to be controlled cannot be bound, and a notification message indicating that binding is impossible is displayed.
[0054] Step S140: receiving, on the user interface of the control program, an electrical appliance to be controlled selected from the two or more electrical appliances.
[0055] Specifically, the user selects the electrical appliance to be controlled from the two or more electrical appliances in the user interface of the control program, that is, if the device information and / or device names of the two or more electrical appliances are read, the device information and / or device names of the two or more electrical appliances are displayed in the user interface of the control program, for example, a device list is displayed (the device list may include device names and / or device information), the user selects the electrical appliance to be controlled from the device list displayed in the user interface, and the user interface of the control program receives the electrical appliance to be controlled selected by the user from the two or more electrical appliances.
[0056] Step S150: sending a binding request to the electrical appliance to be controlled via wireless communication, and receiving binding confirmation information returned by the electrical appliance to be controlled.
[0057] Specifically, after the user interface of the control program receives the appliance to be controlled selected from the two or more appliances, it sends a binding request to the appliance to be controlled via wireless communication. The appliance to be controlled verifies that the device information of the appliance to be controlled carried in the binding request is consistent with its own device information (for example, verifies whether the device identifier in the device information carried in the binding request is consistent with its own device identifier), and then returns a binding confirmation message to the mobile terminal via wireless communication. The wireless communication method may specifically include: Bluetooth and / or WiFi. The binding request carries the device information of the appliance to be controlled and the device information of the mobile terminal. In a preferred embodiment, the binding request carries the device information of the appliance to be controlled, the device information of the mobile terminal (for establishing the binding relationship), and a timestamp. The timestamp is used for timeliness verification. To ensure the validity of the data packet, the data packet carries a timestamp. If the parsed time is outside a certain time range, the data packet is discarded. For example, if the parsed timestamp of a data packet is more than 2 seconds ago, the data packet is discarded and invalid. In other words, only the most recently received data packet is valid.
[0058] Wherein, if the NFC device stores device information and / or device names of two or more electrical appliances, and the NFC device returns only the stored device names of the two or more electrical appliances to the mobile terminal, then upon receiving the stored device names of the two or more electrical appliances returned by the NFC device, the device names of the two or more electrical appliances are displayed on the user interface of the control program (step S130). After the user interface of the control program receives the electrical appliance to be controlled selected from the two or more electrical appliances (step S140), the control program further includes: obtaining the device information of the selected electrical appliance to be controlled from the NFC device.
[0059] The device information of the mobile terminal may specifically include: a device identifier of the mobile terminal. The device identifier of the mobile terminal may specifically include: a Bluetooth MAC address of the mobile terminal and / or a device identification code (e.g., an IMEI code) of the mobile terminal. For example, when the wireless communication method is Bluetooth, the device identifier of the mobile terminal may include, for example, a Bluetooth MAC address of the mobile terminal.
[0060] In one specific embodiment, a binding request is sent to the appliance to be controlled via Bluetooth broadcast. All appliances within Bluetooth communication range can receive the binding request. After receiving the binding request, any appliance verifies whether the device information of the appliance to be controlled carried in the binding request is consistent with its own device information (for example, verifies whether the device identifier in the device information of the appliance to be controlled carried in the binding request is consistent with its own device identifier), thereby determining whether it is the appliance to be controlled. If the device information of the appliance to be controlled carried in the binding request is verified to be consistent with its own device information, the verification is successful, and the appliance is determined to be the appliance to be controlled. A binding confirmation message is then returned to the mobile terminal. If the device information of the appliance to be controlled carried in the binding request is inconsistent with its own device information, the verification fails and no action is taken. If any appliance verifies that the device information of the appliance to be controlled carried in the binding request is consistent with its own device information, it may send the binding confirmation message to the mobile terminal via Bluetooth broadcast based on the Bluetooth MAC address of the mobile terminal. The binding confirmation message carries the device information of the mobile terminal and a binding code. The device information of the mobile terminal may specifically include: the Bluetooth MAC address of the mobile terminal and / or the device identification code of the mobile terminal. The binding code is confirmation information for establishing a binding relationship. After receiving the binding confirmation information, the mobile terminal determines whether the binding confirmation information is sent to itself based on the device information carried in the binding confirmation information.
[0061] According to the above embodiment of the present invention, the mobile terminal and the electrical appliance to be controlled are quickly bound and paired via wireless communication (such as Bluetooth) without requiring additional user operations.
[0062] When the NFC device stores only the device information of one appliance, the NFC device directly returns the stored device information of the appliance to the mobile terminal. If the mobile terminal only reads the device information of one appliance, it uses the appliance as the appliance to be controlled, directly sends a binding request to the appliance to be controlled via wireless communication, and receives binding confirmation information returned by the appliance to be controlled. The binding request carries the device information of the appliance to be controlled. After receiving the binding request, the appliance to be controlled verifies whether the device information of the appliance to be controlled carried in the binding request is consistent with its own device information. If they are consistent, the appliance to be controlled returns the binding confirmation information to the mobile terminal.
[0063] Step S160: If the binding confirmation information returned by the to-be-controlled electrical appliance is received, it is determined that the binding with the to-be-controlled electrical appliance is successful, and the binding success information is displayed on the user interface of the control program.
[0064] Specifically, if the controlled electrical appliance verifies that the device information of the controlled electrical appliance carried in the binding request is consistent with its own device information, it can send the binding confirmation information to the mobile terminal via Bluetooth broadcast based on the Bluetooth MAC address of the mobile terminal. The binding confirmation information carries the device information and binding code of the mobile terminal. If the mobile terminal receives the binding confirmation information returned by the controlled electrical appliance, it determines whether it is the binding confirmation information sent to itself based on the device information of the mobile terminal carried in the binding confirmation information. If it is determined that it is the binding confirmation information sent to itself, it is determined that the binding with the controlled electrical appliance is successful, and the binding success information is displayed on the user interface of the control program.
[0065] For example, a mobile phone reads the device information of the appliance to be controlled and sends a binding request to the corresponding appliance via Bluetooth broadcast. The request carries the mobile phone's Bluetooth MAC address, the device information of the appliance to be controlled, and a timestamp. The appliance to be controlled receives the binding request and verifies the legitimacy of the mobile phone's Bluetooth MAC address and the binding identifier (verifying whether the device information carried in the request data is consistent with its own device information). After successful verification, the appliance to be controlled returns a binding confirmation message to the mobile phone. The appliance to be controlled broadcasts a data packet carrying the mobile phone's MAC address via Bluetooth. The mobile phone verifies whether the MAC address in the broadcast data packet is consistent with its own MAC address. If they are consistent, it means that it was sent to the mobile phone itself, and a prompt message indicating that the binding is successful is displayed.
[0066] Optionally, the method further includes: receiving a session key returned by the electrical appliance to be controlled. The session key is used to encrypt communications when interacting with the electrical appliance to be controlled after successful binding with the electrical appliance to be controlled, for example, encrypting communications when controlling the electrical appliance to be controlled. Specifically, after receiving the binding request, the electrical appliance to be controlled verifies whether the device information in the request data is consistent with its internal storage. If the verification is successful, the electrical appliance to be controlled generates binding confirmation information, generates a session key (Session Key), and returns the binding confirmation information and the session key to the mobile terminal. The session key is used for subsequent communication encryption when interacting with the electrical appliance to be controlled. For example, the appliance returns a binding confirmation response to the mobile terminal via Bluetooth broadcast; after receiving the binding confirmation response, the mobile terminal verifies the validity of the session key and locally stores the device information and session key of the appliance for subsequent communications.
[0067] For example, after receiving the session key returned by the appliance, the mobile terminal calculates a checksum for the key. This checksum is calculated based on a preset shared key, which can be pre-set in the control program (the application or applet used to control the appliance) and the appliance firmware (the control program for the appliance's controller). The checksum calculated by the mobile terminal is compared with the checksum included with the session key. If the checksum matches, it indicates that the session key has not been tampered with during transmission, and the integrity verification has passed.
[0068] Furthermore, after successfully binding with the electrical appliance to be controlled, a control interface of the electrical appliance to be controlled is displayed, so as to receive control instructions for the electrical appliance to be controlled on the control interface and send the control instructions to the electrical appliance to be controlled.
[0069] Specifically, after successfully binding with the appliance to be controlled, the control interface of the appliance to be controlled is displayed in the control program, and control instructions for the appliance to be controlled are received on the control interface. The user can enter control instructions for the appliance to be controlled in the control interface. For example, the control interface displays control options corresponding to different control instructions for controlling the appliance to be controlled. The user selects on the control interface according to their own needs to issue the corresponding control instructions. After the mobile terminal receives the control instructions for the appliance to be controlled through the control interface, it sends the control instructions to the appliance to be controlled, and the appliance to be controlled performs the corresponding operation according to the control instructions. For example, the mobile terminal communicates with the appliance to be controlled via Bluetooth broadcast and issues control instructions to the appliance to be controlled. For example, if the appliance to be controlled is an air conditioner, the user can directly adjust the setting parameters of the air conditioner and / or switch the operating mode of the air conditioner through the air conditioner control interface.
[0070] According to the above embodiment of the present invention, after the mobile terminal is successfully bound to the appliance to be controlled, the user can directly control the appliance through the application or applet, realizing instant connection and use. Using the applet to control the appliance is more convenient and quick.
[0071] To clearly illustrate the technical solution of the present invention, the execution flow of the control method of an electrical appliance provided by the present invention is described below with reference to a specific embodiment.
[0072] Figure 2 FIG. 1 is a schematic diagram of a specific embodiment of the air conditioning control method provided by the present invention. Figure 2 As shown, when the user brings the mobile phone close to the NFC sensing area of the remote control, the mobile phone NFC reads the device information of the appliance stored in the remote control and displays the read device information. If it is a single device, the mobile phone sends a binding request to the corresponding appliance via Bluetooth broadcast based on the read device information. The request carries the Bluetooth MAC address of the mobile phone, the device information of the appliance and a timestamp. The appliance receives the binding request and verifies the legitimacy of the MAC address and the binding identifier (whether the device information carried in the verification request data is consistent with its own device information). After successful verification, the appliance returns a binding confirmation message to the mobile phone, and the mobile phone displays a prompt message indicating that the binding is successful. The WeChat applet displays a control interface, and the user sends control instructions to the appliance through the WeChat applet control interface on the mobile phone, such as sending control instructions to the air conditioner to adjust the temperature or switch modes. The control instructions are sent to the appliance via Bluetooth and executed.
[0073] If the device information of more than two appliances is read, a list of the read device information will be displayed. The user selects the appliance to be controlled in the mini program of the client application. The mobile phone reads the device information of the appliance to be controlled and sends a binding request to the corresponding appliance via Bluetooth broadcast. The request carries the Bluetooth MAC address of the mobile phone, the device information of the appliance, and a timestamp. The appliance receives the binding request and verifies the legitimacy of the MAC address and the binding identifier (whether the device information carried in the verification request data is consistent with its own device information). After successful verification, the appliance returns a binding confirmation message to the mobile phone, and the mobile phone displays a prompt message indicating that the binding is successful. The user sends control instructions to the appliance through the WeChat mini program on the mobile phone, such as sending control instructions to the air conditioner to adjust the temperature or switch modes. The control instructions are sent to the appliance via Bluetooth and executed.
[0074] In a specific application scenario, the user has an air conditioner at home. The user opens the WeChat applet and places the mobile phone close to the air conditioner remote control. The mobile phone interacts with the remote control through NFC sensing. The mobile phone obtains the binding information required by the device in the remote control, and then the mobile phone and the air conditioner start Bluetooth broadcast communication to verify the binding data. At this time, the user's mobile phone displays that the device binding and pairing is in progress. After the data verification between the mobile phone and the air conditioner is successful, the mobile phone displays "Pairing successful". After clicking "Complete pairing", you can enter the control interaction interface of the mobile phone and the air conditioner, and the user can directly control and adjust the air conditioner on the mobile phone.
[0075] In another specific application scenario, a user has three air conditioners at home, located in the living room, bedroom, and study. The phone uses NFC to read the device information stored on the remote control. The user then sees a list of automatically retrieved devices on the WeChat mini-program interface. This list displays the name and other information of each air conditioner. For example, the user might see "Living Room Air Conditioner," "Bedroom Air Conditioner," and "Study Air Conditioner." The user selects the device they want to control, such as "Living Room Air Conditioner." The WeChat mini-program then automatically exchanges data with the remote control via NFC, transmitting the device binding information for "Living Room Air Conditioner" to the phone. The phone then uses Bluetooth broadcast communication with the living room air conditioner to verify the binding data. After successful data verification between the phone and the living room air conditioner, the phone displays "Pairing Successful." After the binding is complete, the user can control the selected air conditioner through the mini-program (e.g., adjust the temperature, turn on / off the air conditioner, set the mode, etc.). Assuming the user has just selected and operated the living room air conditioner, the next time the phone is brought close to the remote control, the remote control will first return the information for "Living Room Air Conditioner." The user does not need to search again; the system automatically identifies and recommends the most recently used device. If the user's target air conditioner is not the one they recently controlled, they can switch to it from the displayed device list.
[0076] The present invention also provides a storage medium corresponding to the control method of the electrical appliance, on which a computer program is stored, and when the program is executed by a processor, the steps of any of the above methods are implemented.
[0077] The present invention also provides an air conditioner corresponding to the control method of the electrical appliance, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the aforementioned methods when executing the program.
[0078] The present invention also provides a computer program product corresponding to the control method of the electrical appliance, comprising a computer program, which implements the steps of any of the aforementioned methods when executed by a processor.
[0079] The solution provided by the present invention uses a near-field communication device to store the device information of an appliance. A mobile terminal and the near-field communication device communicate to transmit the device information of the appliance to be controlled. The mobile terminal and the appliance to be controlled are then bound together wirelessly, enabling rapid access to the appliance's device information and reducing additional user operations. Once the binding is successful, the user can control the appliance through a control program or mini-program on the mobile terminal, achieving instant connection and immediate use.
[0080] The solution provided by the present invention supports the storage of information for multiple electrical devices using near-field communication devices, solving the problem of a large number of appliances and their scattered locations in a home. For multi-device environments, an interactive interface allows users to actively select target appliances, quickly acquiring device information. Combined with WeChat mini-programs for control, this not only enables broadcast pairing and binding, but also provides a user-friendly operating interface and control logic. For multi-device environments, all device information stored by near-field communication devices can be obtained, and then the interactive interface allows users to actively select target appliances, quickly controlling the appliances and improving system response and user experience.
[0081] The solution provided by the present invention uses a mini-program to control electrical appliances without the need for users to download dedicated control programs (software). The mini-program establishes a pairing and binding with the device to be controlled through the acquired device information. The binding method combines near-field communication and wireless communication (such as NFC and Bluetooth) to improve the efficiency of device binding. The binding process is convenient and fast, reducing the learning cost. After the binding is successful, the appliance can be directly controlled through the mini-program without the need for intermediate steps, achieving immediate connection and use.
[0082] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of the present invention and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwiring, or a combination of any of these. Furthermore, each functional unit may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0083] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0084] The units described as separate components may or may not be physically separate, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the relevant technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0086] The foregoing description is merely an embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of the claims.
Claims
1. A method for controlling an electrical appliance, characterized in that: include: When the control program installed on the mobile terminal is started, the mobile terminal detects the near field communication device within the sensing range; When a near field communication device is detected within the sensing range, reading the device information and / or device name of the electrical appliance stored in the detected near field communication device; If device information and / or device names of two or more electrical appliances are read, the device information and / or device names of the two or more electrical appliances are displayed on the user interface of the control program; receiving, on a user interface of the control program, an electrical appliance to be controlled selected from the two or more electrical appliances; Sending a binding request to the electrical appliance to be controlled via wireless communication, and receiving binding confirmation information returned by the electrical appliance to be controlled; If the binding confirmation information returned by the to-be-controlled electrical appliance is received, it is determined that the binding with the to-be-controlled electrical appliance is successful, and the binding success information is displayed on the user interface of the control program; The binding request carries the device information of the electrical appliance to be controlled; the electrical appliance to be controlled verifies that the device information of the electrical appliance to be controlled carried in the binding request is consistent with its own device information, and then returns the binding confirmation information to the mobile terminal.
2. The method according to claim 1, characterized in that Also includes: If only the device information and / or device name of one appliance is read, the appliance is taken as the appliance to be controlled, a binding request is directly sent to the appliance to be controlled via wireless communication, and binding confirmation information returned by the appliance to be controlled is received.
3. The method according to claim 1, characterized in that The near field communication device includes: a remote controller having a near field communication module; and / or, The control program includes: an application program for controlling an electrical appliance or a small program for controlling an electrical appliance; and / or, The wireless communication method includes: Bluetooth and / or WiFi.
4. The method according to claim 1, wherein The device information includes: device identification and binding identification; and / or, The binding confirmation information includes: device information of the mobile terminal and a binding code.
5. The method according to any one of claims 1 to 4, characterized in that Reading the device information and / or device name of the detected electrical appliance stored in the near field communication device includes: When a near field communication device is detected within the sensing range, a read request is sent to the detected near field communication device, and the near field communication device returns the stored device information and / or device name of the electrical appliance after receiving the read request.
6. The method according to claim 5, characterized in that Also includes: When the near-field communication device stores device information and / or device names of more than two electrical appliances, the near-field communication device determines the order in which the stored device information and / or device names of the two or more electrical appliances are returned according to a preset priority rule, and returns the stored device information and / or device names of the two or more electrical appliances in the determined order.
7. The method according to claim 6, characterized in that The preset priority rules include: The device information and / or device name of the electrical appliance that has been most recently bound to the mobile terminal is returned first in the order of binding time.
8. The method according to claim 6 or 7, characterized in that If the device information and / or device names of two or more electrical appliances are read, the device information and / or device names of the two or more electrical appliances are displayed on the user interface of the control program, including: On the user interface of the control program, the device information and / or device names of the two or more electrical appliances are displayed according to the order in which the stored device information and / or device names of the two or more electrical appliances are received and returned by the near field communication device.
9. The method according to any one of claims 1 to 4, characterized in that Also includes: Receive a session key returned by the electrical appliance to be controlled, where the session key is used to encrypt communication when interacting with the electrical appliance to be controlled after successful binding with the electrical appliance to be controlled.
10. The method according to any one of claims 1 to 4, characterized in that Also includes: After successfully binding with the electrical appliance to be controlled, a control interface of the electrical appliance to be controlled is displayed, so as to receive control instructions for the electrical appliance to be controlled on the control interface and send the control instructions to the electrical appliance to be controlled.
11. A storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
12. A mobile terminal, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the steps of the method according to any one of claims 1 to 10 are implemented when the processor executes the program.
13. A computer program product, characterized in that The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 10 when executed by a processor.