Identity determination method, control method and system, storage medium, terminal device
The terminal device generates random numbers to control the waiting time for sending data messages to determine the master-slave relationship, which solves the problems of low setting efficiency and high cost in the existing technology, and achieves efficient and accurate identity configuration.
Patent Information
- Application Number
- CN202011487320.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-16
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-12-16
AI Technical Summary
In the existing technology, the master-slave setting of terminal equipment in a home appliance system is inefficient, and the accuracy of the setting cannot be guaranteed, which increases the setting cost.
The terminal device generates a random number to control the waiting time for the data message of the competing host to be sent. If the message is not received, it will be sent to confirm the identity, thereby determining the master-slave relationship, improving the efficiency of identity determination and reducing costs.
It improves the efficiency and accuracy of terminal device identity determination, reduces identity configuration costs, and ensures the normal operation of home appliances.
Smart Images

Figure CN112597474B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control terminal technology, and in particular to a method for determining the identity of a terminal device, a method for controlling a household appliance, a computer-readable storage medium, a first terminal device, and a control system for a household appliance. Background Art
[0002] The system of household appliances usually includes multiple terminal devices, all of which belong to the same communication network. In order to ensure smooth communication, it is required that multiple terminal devices must be distinguished between master and slave devices. The master terminal device acts as the host and periodically accesses multiple slave terminal devices. In the related art, after the hardware of the household appliance system is installed, the staff sets the master and slave devices of the terminal devices through the dial code on the electric control panel of the wire controller itself or the human-computer interaction interface setting. However, this method has low installation efficiency and cannot guarantee the correctness of the setting, and also increases the setting cost. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the first object of the present invention is to provide an identity determination method for a terminal device, which can improve the efficiency of identity determination of the terminal device, ensure the accuracy of identity configuration of the terminal device, and reduce the cost of identity configuration.
[0004] A second objective of the present invention is to provide another method for determining the identity of a terminal device.
[0005] The third objective of the present invention is to provide a control method for household electrical appliances.
[0006] A fourth object of the present invention is to provide a computer-readable storage medium.
[0007] A fifth objective of the present invention is to provide a terminal device.
[0008] A sixth object of the present invention is to provide another computer-readable storage medium.
[0009] A seventh objective of the present invention is to provide another terminal device.
[0010] An eighth objective of the present invention is to provide a control system for household electrical appliances.
[0011] To achieve the above-mentioned purpose, an embodiment of the first aspect of the present invention proposes a method for determining the identity of a terminal device, which is applied to a system in which multiple terminal devices control the same household appliance, and the method includes: controlling the terminal device to generate a random number, and controlling the terminal device to generate a waiting time for sending a competing host data message according to the random number; when the waiting time for sending the competing host data message arrives and the terminal device has not received the competing host data message, controlling the terminal device to send the competing host data message, so that other terminal devices confirm their own identity as a slave control terminal when receiving the competing host data message, and feedback an identity confirmation data message; when receiving the identity confirmation data message, confirming that the terminal device is a master control terminal.
[0012] The terminal device identity determination method of the embodiment of the present invention is applied to a system in which multiple terminal devices control the same household appliance. The identity determination method first controls the terminal device to generate a random number, and controls the terminal device to generate a waiting time for the competing host data message according to the random number. When the waiting time for the competing host data message arrives and the terminal device does not receive the competing host data message, the terminal device is controlled to send the competing host data message, so that other terminal devices confirm their own identity as a slave control terminal when receiving the competing host data message, and feedback the identity confirmation data message. When the identity confirmation data message is received, the terminal device is confirmed to be the master control terminal. Therefore, the terminal device identity determination method can improve the terminal device identity determination efficiency, ensure the accuracy of the terminal device identity configuration, and reduce the identity configuration cost.
[0013] In some examples of the present invention, the waiting time T for the competing host data message to be sent is 随机数 = random number * T 时基 .
[0014] In some examples of the present invention, before the waiting time for the competing host data message to be sent is reached, it is also determined whether the terminal device has received the competing host data message, and when the terminal device receives the competing host data message, it is confirmed that the terminal device is a slave control terminal, and the identity confirmation data message is generated, and the identity confirmation data message is fed back to the terminal device that sent the competing host data message, so that the terminal device that sent the competing host data message confirms its own identity as the master control terminal.
[0015] In some examples of the present invention, after the terminal device sends the competing host data message, it also determines whether the time since the last random number was generated exceeds the preset agreed time, wherein, if yes, it returns to regenerate the random number; if not, it determines whether the identity confirmation data message is received.
[0016] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present invention proposes another method for determining the identity of a terminal device, which is applied to a system in which multiple terminal devices control the same household appliance. The method includes: controlling the terminal device to generate a random number, and controlling the terminal device to generate a waiting time for sending a competing host data message according to the random number; before the waiting time for sending the competing host data message arrives, determining whether the terminal device has received a competing host data message; if the terminal device receives the competing host data message, confirming that the terminal device is a slave control terminal, generating an identity confirmation data message, and feeding back the identity confirmation data message to the terminal device that sent the competing host data message, so that the terminal device that sent the competing host data message confirms its own identity as the master control terminal.
[0017] The terminal device identity determination method of the embodiment of the present invention is applied to a system in which multiple terminal devices control the same household appliance. The identity determination method first controls the terminal device to generate a random number, and controls the terminal device to generate a waiting time for the competing host data message to be sent according to the random number. Before the waiting time for the competing host data message to be sent arrives, it is determined whether the terminal device has received the competing host data message. If the terminal device receives the competing host data message, it is confirmed that the terminal device is a slave control terminal, and an identity confirmation data message is generated, and the identity confirmation data message is fed back to the terminal device that sends the competing host data message, so that the terminal device that sends the competing host data message confirms that its identity is the master control terminal. Therefore, the terminal device identity determination method can improve the terminal device identity determination efficiency, ensure the accuracy of the terminal device identity configuration, and reduce the identity configuration cost.
[0018] In some examples of the present invention, the waiting time T for the competing host data message to be sent is 随机数 = random number * T 时基 .
[0019] To achieve the above-mentioned purpose, an embodiment of the third aspect of the present invention proposes a control method for household appliances. After determining the master-slave relationship of multiple terminal devices by executing the identity determination method of the first terminal device or the identity determination method of the second terminal device in the above-mentioned embodiment, the master control terminal polls each slave control terminal to obtain the control parameters of the corresponding slave control terminal; the master control terminal sends the control parameters of the corresponding slave control terminal to the household appliance, so that the household appliance executes and provides feedback; the master control terminal receives the execution feedback result of the household appliance, and sends the execution feedback result to the corresponding slave control terminal.
[0020] The control method of the household appliance in the embodiment of the present invention first determines the master-slave relationship of the multi-terminal device by executing the first terminal device identity determination method or the second terminal device identity determination method in the above embodiment, and then the master control terminal polls each slave control terminal to obtain the control parameters of the corresponding slave control terminal, and then the master control terminal sends the control parameters of the corresponding slave control terminal to the household appliance so that the household appliance executes and gives feedback, and the master control terminal also receives the execution feedback result of the household appliance and sends the execution feedback result to the corresponding slave control terminal. Therefore, the control method of the household appliance can improve the efficiency of the terminal device identity determination, ensure the accuracy of the terminal device identity configuration, and reduce the identity configuration cost.
[0021] In some examples of the present invention, the master control terminal polls each slave control terminal to determine whether the data of each slave control terminal has changed, and obtains the control parameters of any slave control terminal when the data of any slave control terminal has changed.
[0022] To achieve the above-mentioned objectives, the fourth aspect of the present invention proposes a computer-readable storage medium on which an identity determination program for a terminal device is stored. When the identity determination program for the terminal device is executed by a processor, it implements the identity determination method for the first terminal device or the identity determination method for the second terminal device in the above-mentioned embodiments.
[0023] According to the computer-readable storage medium of the embodiment of the present invention, the processor executes the identity determination program of the terminal device stored on the storage medium, which can improve the identity determination efficiency of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the identity configuration cost.
[0024] To achieve the above-mentioned purpose, the fifth aspect of the present invention proposes a terminal device, which includes a memory, a processor, and an identity determination program of the terminal device stored in the memory and executable on the processor. When the processor executes the identity determination program of the terminal device, it implements the identity determination method of the first terminal device or the identity determination method of the second terminal device in the above-mentioned embodiment.
[0025] The terminal device of the embodiment of the present invention includes a processor and a memory. The processor executes the identity determination program of the terminal device stored in the memory, which can improve the identity determination efficiency of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the identity configuration cost.
[0026] To achieve the above objectives, the sixth aspect of the present invention proposes another computer-readable storage medium on which a control program for a household appliance is stored. When the control program for the household appliance is executed by a processor, the control method for the household appliance as described in the above embodiment is implemented.
[0027] According to the computer-readable storage medium of an embodiment of the present invention, the processor executes the control program of the home appliance stored on the storage medium, which can improve the identity determination efficiency of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the identity configuration cost.
[0028] To achieve the above-mentioned purpose, the seventh aspect of the present invention proposes another terminal device, which includes a memory, a processor, and a control program for the home appliance stored in the memory and executable on the processor. When the processor executes the control program for the home appliance, the control method for the home appliance as described in the above-mentioned embodiment is implemented.
[0029] The terminal device of the embodiment of the present invention includes a processor and a memory. The processor executes the control program of the home appliance stored in the memory, which can improve the identity determination efficiency of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the identity configuration cost.
[0030] To achieve the above-mentioned purpose, an eighth aspect embodiment of the present invention proposes a control system for household appliances, which includes multiple control terminals, and the multiple control terminals include a master control terminal and a slave control terminal, wherein each control terminal generates a random number respectively, and generates a corresponding waiting time for sending a competing host data message according to the random number; when the waiting time for sending a competing host data message corresponding to any control terminal arrives and the control terminal has not received the competing host data message, the control terminal sends the competing host data message, so that other control terminals confirm their own identity as a slave control terminal when receiving the competing host data message, and feed back an identity confirmation data message; when the control terminal receives the identity confirmation data message, it confirms its own identity as the master control terminal.
[0031] The control system of the household appliance according to the embodiment of the present invention includes a plurality of control terminals, and the plurality of control terminals include a master control terminal and a slave control terminal, wherein each control terminal generates a random number respectively, and generates a corresponding waiting time for the competition host data message to be sent according to the random number, and when the waiting time for the competition host data message corresponding to any control terminal arrives and the control terminal has not received the competition host data message, the control terminal sends the competition host data message so that other control terminals can confirm their own identity as a slave control terminal when receiving the competition host data message, and feed back a confirmation data message, and when the control terminal receives the identity confirmation data message, it confirms its own identity as a master control terminal. Therefore, the control system of the household appliance can improve the efficiency of the terminal device's identity determination, ensure the accuracy of the terminal device's identity configuration, and reduce the identity configuration cost.
[0032] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a flow chart of a method for determining an identity of a terminal device according to an embodiment of the present invention;
[0034] Figure 2 is a schematic diagram of the waiting time for sending according to a specific embodiment of the present invention;
[0035] Figure 3 is a flow chart of a method for determining the identity of a terminal device according to a specific embodiment of the present invention;
[0036] Figure 4 is a flow chart of a method for determining an identity of a terminal device according to another embodiment of the present invention;
[0037] Figure 5 is a flow chart of a control method for household electrical appliances according to an embodiment of the present invention;
[0038] Figure 6 It is a structural block diagram of a control system of a household appliance according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0040] The following describes the identity determination method of a terminal device, the control method and system of a home appliance, the storage medium, and the terminal device of the embodiments of the present invention with reference to the accompanying drawings.
[0041] Figure 1 It is a flow chart of a method for determining the identity of a terminal device according to an embodiment of the present invention.
[0042] The first terminal device identity determination method of the present invention is applied to a system in which multiple terminal devices control the same household appliance. Specifically, in this embodiment, the household appliance may be an air conditioner, and the multiple control terminals may be multiple wire controllers.
[0043] like Figure 1 As shown, the method for determining the identity of the terminal device includes the following steps:
[0044] S10, controlling the terminal device to generate a random number, and controlling the terminal device to generate a waiting time for sending a data message of a competing host according to the random number.
[0045] Specifically, Figure 2 As shown, the user can first set a preset appointment time T 总 , and then set the preset agreed time T 总 Per T 时基 The time can be divided so that the preset agreed time T 总 Divided into several equal parts, it can be understood that the preset agreed time T 总 Inside T 时基 The number of copies is the maximum value of the random number. For example, the preset agreed time T 总 is 30 seconds, T 时基 is 1 second, then the preset agreed time T 总 Can be divided into 30 parts T 时基 The maximum value of the random number generated by the terminal device is 30, that is, the random number generated by the terminal device is between 0 and 30.
[0046] After the terminal device is controlled to generate a random number, the terminal device can be controlled to generate a waiting time for the competing host data message to be sent according to the random number. In some embodiments, the waiting time T for the competing host data message to be sent is 随机数 = random number * T 时基 Specifically, Figure 2 As shown, after determining the random number generated by the terminal device, the random number can be multiplied by T 时基 The obtained time T 随机数 As the waiting time for the terminal device to send the competing host data message. For example, the random number generated by the terminal device is 5, T 时基 is 1 second, then the waiting time for the terminal device's competing host data message to be sent is T 随机数 =5*1 second=5 seconds. It is understandable that the random numbers generated by different terminal devices may be different, that is, the waiting time for the competing host data message generated by different terminal devices may be different. For example, the random number generated by terminal device A is 5, and the waiting time for its competing host data message to be sent is 5 seconds, while the random number generated by terminal device B is 10, and the waiting time for its competing host data message to be sent is 10 seconds.
[0047] S20, when the waiting time for the competing host data message to be sent arrives and the terminal device has not received the competing host data message, the control terminal device sends the competing host data message so that other terminal devices confirm their own identity as the slave control terminal when receiving the competing host data message, and feedback the identity confirmation data message.
[0048] S30, upon receiving the identity confirmation data message, confirm that the terminal device is a main control terminal.
[0049] Specifically, when the terminal device generates a waiting time for the competition host data message to be sent, the timing can be started from the current moment. If the waiting time for the competition host data message to be sent arrives and the terminal device has not received the competition host data message, the terminal device is controlled to send the competition host data message. For example, if the waiting time for the competition host data message to be sent of the terminal device is 5 seconds, the timing starts when the terminal device generates the waiting time for the competition host data message to be sent. If the terminal device has not received the competition host data message after the timing has been counted for 5 seconds, the terminal device can be controlled to send the competition host data message. It should be noted that when the terminal device is in the state of waiting to send the competition host data message, its state is in the receiving state, so when the waiting time for the competition host data message arrives and the competition host data message is not received, the terminal device sends the competition host data message, and other terminal devices can receive the competition host data message. When other terminal devices receive the competition host data message, they can confirm that their identity is a slave control terminal and feedback an identity confirmation data message. After the terminal device receives the identity confirmation data message feedback from other terminal devices, it confirms that its identity is a master control terminal.
[0050] More specifically, for example, the waiting time for sending the competing host data message of terminal device A is 5 seconds, and the waiting time for sending the competing host data message of terminal device B is 10 seconds. Then when the waiting time of terminal device A reaches 5 seconds, terminal device B is still in the waiting time, so terminal device A has not received the competing host data message. Then terminal device A can send a competing host data message to terminal device B. After receiving the competing host data message, terminal device B can confirm its own identity as a slave control terminal and feedback an identity confirmation data message to terminal device A. After terminal device A receives the identity confirmation data message feedback from terminal device B, it can confirm that terminal device A is the master control terminal.
[0051] In some examples of the present invention, before the waiting time for the competing host data message to be sent arrives, it is also determined whether the terminal device has received the competing host data message, and when the terminal device receives the competing host data message, it is confirmed that the terminal device is a slave control terminal, and an identity confirmation data message is generated, and the identity confirmation data message is fed back to the terminal device that sent the competing host data message, so that the terminal device that sent the competing host data message confirms its own identity as the master control terminal.
[0052] Specifically, before the terminal device waits for the competing host data message to be sent and the waiting time arrives, it is in a receiving state, and a judgment is made as to whether the terminal device has received the competing host data message. If it is judged that the terminal device has received the competing host data message, the terminal device that has received the competing host data message is confirmed to be a slave control terminal, and an identity confirmation data message is generated and fed back to the terminal device that sent the competing host data message. After receiving the identity confirmation data message, the terminal device that sent the competing host data message confirms its own identity as the master control terminal.
[0053] In some examples of the present invention, after the terminal device sends a competing host data message, it also determines whether the time since the last random number was generated exceeds the preset agreed time. If so, it returns to regenerate the random number; if not, it determines whether an identity confirmation data message is received.
[0054] Specifically, when the terminal device waits for the time to send the competing host data message to arrive and does not receive the competing host data message, it sends the competing host data message to other terminal devices. In this embodiment, after sending the competing host data message, it is also determined whether the current time from the last time a random number was generated exceeds the preset agreed time. Optionally, the preset agreed time in this embodiment can be Figure 2 The time T shown in 总 . If it is determined that the time from the current time to the last time a random number was generated exceeds the preset agreed time, a random number is regenerated, and the competition host data message waiting time is entered again to wait; if it is determined that the time from the current time to the last time a random number was generated does not exceed the preset agreed time, it is determined whether the terminal device has received the identity confirmation data message. If it has been received, its own identity can be confirmed as the main control terminal. Optionally, if it has not been received, a random number can be regenerated, and the competition host data message waiting time is entered.
[0055] It can be understood that in this embodiment, the random number generation can be repeated for a preset number of times, which can be 2 to 5 times. If the terminal device still does not receive the competing host data message or the identity confirmation data message after the preset number of random number generation, it can forcibly confirm its own identity as the main control terminal and end the master-slave automatic configuration program of the control terminal.
[0056] The following generally describes the identity determination method of the terminal device in the embodiment of the present invention with a specific embodiment. Specifically, Figure 3 As shown, after the home appliance system is powered on, the control terminal device generates a random number, and a time T can be generated according to the random number. 随机数 , with time T 随机数As a measure of the waiting time for the data message of the competition main sentence to be sent, start the timing to determine whether the waiting time reaches time T 随机数 If it is reached, the competing host data message is sent, and then it is determined whether the time from the last random number generation exceeds the preset agreed time T 总 If yes, regenerate the random number. If no, further determine whether the identity confirmation data message from the slave control terminal is received. If yes, confirm that the identity is the master control terminal and end the configuration program. If no, re-determine whether the time from the last random number generation exceeds the preset agreed time T. 总 If the waiting time does not reach time T 随机数 , it further determines whether it has received the competing host data message. If it has received it, it confirms that it is a slave control terminal and replies with an identity confirmation data message. If it has not received it, it returns to the waiting time judgment. This cycle of judgment is repeated 2 to 5 times. If the master and slave control terminals cannot be confirmed, the current control terminal can be forced to be confirmed as the master control terminal.
[0057] In summary, the first terminal device identity determination method of this embodiment can improve the efficiency of terminal device identity determination, ensure the accuracy of terminal device identity configuration, and reduce identity configuration costs.
[0058] Furthermore, if Figure 4 As shown, the present invention proposes a second terminal device identity determination method, which is applied to a system in which multiple terminal devices control the same household appliance. Specifically, in this embodiment, the household appliance can be an air conditioner, and the multiple control terminals can be multiple wire controllers.
[0059] like Figure 4 As shown, the identity determination method includes the following steps:
[0060] S100, controlling the terminal device to generate a random number, and controlling the terminal device to generate a waiting time for sending a data message of a competing host according to the random number.
[0061] Specifically, Figure 2 As shown, the user can first set a preset appointment time T 总 , and then set the preset agreed time T 总 Per T 时基 The time can be divided so that the preset agreed time T 总 Divided into several equal parts, it can be understood that the preset agreed time T 总 Inside T 时基 The number of copies is the maximum value of the random number. For example, the preset agreed time T 总 is 30 seconds, T 时基is 1 second, then the preset agreed time T 总 Can be divided into 30 parts T 时基 The maximum value of the random number generated by the terminal device is 30, that is, the random number generated by the terminal device is between 0 and 30.
[0062] After the terminal device is controlled to generate a random number, the terminal device can be controlled to generate a waiting time for the competing host data message to be sent according to the random number. In some embodiments, the waiting time T for the competing host data message to be sent is 随机数 = random number * T 时基 Specifically, Figure 2 As shown, after determining the random number generated by the terminal device, the random number can be multiplied by T 时基 The obtained time T 随机数 As the waiting time for the terminal device to send the competing host data message. For example, the random number generated by the terminal device is 5, T 时基 is 1 second, then the waiting time for the terminal device's competing host data message to be sent is T 随机数 =5*1 second=5 seconds. It is understandable that the random numbers generated by different terminal devices may be different, that is, the waiting time for the competing host data message generated by different terminal devices may be different. For example, the random number generated by terminal device A is 5, and the waiting time for its competing host data message to be sent is 5 seconds, while the random number generated by terminal device B is 10, and the waiting time for its competing host data message to be sent is 10 seconds.
[0063] S200, before the waiting time for sending the competing host data message arrives, determine whether the terminal device has received the competing host data message.
[0064] S300, if the terminal device receives a competing host data message, it confirms that the terminal device is a slave control terminal, generates an identity confirmation data message, and feeds back the identity confirmation data message to the terminal device that sends the competing host data message, so that the terminal device that sends the competing host data message confirms its own identity as the master control terminal.
[0065] Specifically, before the terminal device waits for the competing host data message to be sent and the waiting time arrives, it is in a receiving state, and a judgment is made as to whether the terminal device has received the competing host data message. If it is judged that the terminal device has received the competing host data message, the terminal device that has received the competing host data message is confirmed to be a slave control terminal, and an identity confirmation data message is generated and fed back to the terminal device that sent the competing host data message. After receiving the identity confirmation data message, the terminal device that sent the competing host data message confirms its own identity as the master control terminal.
[0066] In some examples of the present invention, when the waiting time for a competing host data message to be sent arrives and the terminal device has not received the competing host data message, the control terminal device sends the competing host data message so that other terminal devices confirm their own identity as a slave control terminal when receiving the competing host data message, and feed back an identity confirmation data message, and when receiving the identity confirmation data message, confirm that the terminal device is the master control terminal.
[0067] In some examples of the present invention, after the terminal device sends a competing host data message, it also determines whether the time since the last random number was generated exceeds the preset agreed time. If so, it returns to regenerate the random number; if not, it determines whether an identity confirmation data message is received.
[0068] It can be understood that in this embodiment, the random number generation can be repeated for a preset number of times, which can be 2 to 5 times. If the terminal device still does not receive the competing host data message or the identity confirmation data message after the preset number of random number generation, it can forcibly confirm its own identity as the main control terminal and end the master-slave automatic configuration program of the control terminal.
[0069] It should be noted that other specific implementation modes of the second terminal device identity determination method of this embodiment may refer to the specific implementation modes of the first terminal device identity determination method of the above embodiment.
[0070] In summary, the second terminal device identity determination method of this embodiment can improve the efficiency of terminal device identity determination, ensure the accuracy of terminal device identity configuration, and reduce identity configuration costs.
[0071] Furthermore, the present invention proposes a control method for household electrical appliances, such as Figure 5 As shown, the control method includes the following steps:
[0072] S1, after determining the master-slave relationship of multiple terminal devices by executing the first terminal device identity determination method or the second terminal device identity determination method in the above embodiment, the master control terminal polls each slave control terminal to obtain the control parameters of the corresponding slave control terminal. S2, the master control terminal sends the control parameters of the corresponding slave control terminal to the home appliance so that the home appliance executes and gives feedback. S3, the master control terminal receives the execution feedback result of the home appliance and sends the execution feedback result to the corresponding slave control terminal.
[0073] Specifically, after determining the master-slave relationship of multiple terminal devices through the first terminal device identity determination method or the second terminal device identity determination method in the above embodiments, the master control terminal polls each slave control terminal to obtain the control parameters of the corresponding slave control terminal, and sends the acquired control parameters to the home appliance so that the home appliance executes and provides feedback. Then, the master control terminal receives the execution feedback results of the home appliance and sends them to the corresponding slave control terminal according to the execution feedback results.
[0074] In some examples of the present invention, the master control terminal polls each slave control terminal to determine whether the data of each slave control terminal has changed, and obtains the control parameters of any slave control terminal when the data of any slave control terminal has changed.
[0075] Specifically, when the master control terminal polls each slave control terminal and obtains data, it also judges the data of each slave control terminal to determine whether it has changed. If the data of any of the multiple slave control terminals changes, the control parameters of the slave control terminal are obtained. It can be understood that, taking the air conditioner as an example, after obtaining the control parameters of the changed control terminal, the master control terminal sends the control parameters to the indoor unit of the air conditioner, and each slave control terminal then synchronizes the status data of the indoor unit of the air conditioner to ensure that the data of all control terminals are consistent.
[0076] In summary, the control method of the household appliance in this embodiment can improve the efficiency of identity determination of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the identity configuration cost, while ensuring the normal operation of the household appliance.
[0077] Furthermore, the present invention proposes a first computer-readable storage medium, on which an identity determination program for a terminal device is stored. When the identity determination program for the terminal device is executed by a processor, the identity determination method for the first terminal device in the above embodiment or the identity determination method for the second terminal device in the above embodiment is implemented.
[0078] The computer-readable storage medium of the embodiment of the present invention can improve the efficiency of terminal device identity determination, ensure the accuracy of terminal device identity configuration, and reduce identity configuration costs by executing the terminal device identity determination program stored on the storage medium through a processor.
[0079] Furthermore, the present invention proposes a first terminal device, which includes a memory, a processor, and an identity determination program of the terminal device stored in the memory and executable on the processor. When the processor executes the identity determination program of the terminal device, it implements the identity determination method of the first terminal device in the above-mentioned embodiment or the identity determination method of the second terminal device in the above-mentioned embodiment.
[0080] The terminal device of the embodiment of the present invention includes a memory and a processor. The processor executes the identity determination program of the terminal device stored in the memory, which can improve the identity determination efficiency of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the identity configuration cost.
[0081] Furthermore, the present invention proposes a second computer-readable storage medium on which a control program for a household appliance is stored. When the control program for the household appliance is executed by a processor, the control method for the household appliance in the above-mentioned embodiment is implemented.
[0082] The computer-readable storage medium of the embodiment of the present invention can improve the efficiency of identity determination of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the cost of identity configuration by executing the control program of the home appliance stored on the storage medium through a processor.
[0083] Furthermore, the present invention proposes a second terminal device, which includes a memory, a processor, and a control program for the home appliance stored in the memory and executable on the processor. When the processor executes the control program for the home appliance, a control method for the home appliance as in the above-mentioned embodiment is implemented.
[0084] The terminal device of the embodiment of the present invention includes a memory and a processor. The processor executes the control program of the home appliance stored in the memory, which can improve the identity determination efficiency of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the identity configuration cost.
[0085] Furthermore, if Figure 6 As shown, the present invention proposes a control system 100 for household electrical appliances. The control system 100 includes a plurality of control terminals, wherein the plurality of control terminals include a master control terminal and a slave control terminal.
[0086] Among them, each control terminal generates a random number respectively, and generates a corresponding waiting time for sending a competing host data message according to the random number; when the waiting time for sending a competing host data message corresponding to any control terminal arrives and the control terminal has not received the competing host data message, the control terminal sends a competing host data message, so that other control terminals confirm their own identity as a slave control terminal when receiving the competing host data message, and feedback an identity confirmation data message; when the control terminal receives the identity confirmation data message, it confirms its own identity as the master control terminal.
[0087] Specifically, Figure 6 As shown, the plurality of control terminals include a first control terminal 101, a second control terminal 102, a third control terminal 103, ..., an nth control terminal 10n.
[0088] More specifically, if Figure 2 As shown, the user can first set a preset agreed time T total, and then divide the preset agreed time T total into several equal parts per T time base time, so that the preset agreed time T total can be divided into several equal parts. It can be understood that the number of T time bases in the preset agreed time T total is the maximum value of the random number. For example, the preset agreed time T total is 30 seconds, and the T time base is 1 second, then the preset agreed time T total can be divided into 30 T time bases, and the maximum value of the random number generated by the terminal device is 30, that is, the random number generated by the terminal device is between 0 and 30.
[0089] After the terminal device is controlled to generate a random number, the terminal device can be controlled to generate a waiting time for the competing host data message to be sent according to the random number. In some embodiments, the waiting time T for the competing host data message to be sent is 随机数 = random number * T 时基 Specifically, Figure 2 As shown, after determining the random number generated by the terminal device, the random number can be multiplied by T 时基 The obtained time T 随机数 As the waiting time for the terminal device to send the competing host data message. For example, the random number generated by the terminal device is 5, T 时基 is 1 second, then the waiting time for the terminal device's competing host data message to be sent is T 随机数 =5*1 second=5 seconds. It is understandable that the random numbers generated by different terminal devices may be different, that is, the waiting time for the competing host data message generated by different terminal devices may be different. For example, the random number generated by terminal device A is 5, and the waiting time for its competing host data message to be sent is 5 seconds, while the random number generated by terminal device B is 10, and the waiting time for its competing host data message to be sent is 10 seconds.
[0090] When the terminal device generates the waiting time for the competition host data message to be sent, the timing can be started from the current moment. When the waiting time for the competition host data message corresponding to any terminal device is reached and the terminal device has not received the competition host data message, the terminal device is controlled to send the competition host data message. For example, the waiting time for the competition host data message of the terminal device is 5 seconds, then the timing starts when the terminal device generates the waiting time for the competition host data message to be sent. If the terminal device has not received the competition host data message after the timing is 5 seconds, the terminal device can be controlled to send the competition host data message. It should be noted that when the terminal device is in the state of waiting to send the competition host data message, its state is in the receiving state, so when the waiting time for the competition host data message is reached and the competition host data message is not received, the terminal device sends the competition host data message, and other terminal devices can receive the competition host data message. When other terminal devices receive the competition host data message, they can confirm that their identity is a slave control terminal and feedback the identity confirmation data message. After the terminal device receives the identity confirmation data message feedback from other terminal devices, it confirms that its identity is a master control terminal.
[0091] More specifically, for example, the waiting time for sending the competing host data message of the first terminal device 101 is 5 seconds, and the waiting time for sending the competing host data message of the second terminal device 102 is 10 seconds. Then when the waiting time of the first terminal device 101 reaches 5 seconds, the second terminal device 102 is still in the waiting time, so the first terminal device 101 has not received the competing host data message. The first terminal device 101 can send the competing host data message to the second terminal device 102. After receiving the competing host data message, the second terminal device 102 can confirm its own identity as a slave control terminal and feedback the identity confirmation data message to the first terminal device 101. After the first terminal device 101 receives the identity confirmation data message fed back by the second terminal device 102, it can be confirmed that the first terminal device 101 is the master control terminal.
[0092] In some examples of the present invention, before the waiting time for the competing host data message to be sent arrives, it is also determined whether the terminal device has received the competing host data message, and when the terminal device receives the competing host data message, it is confirmed that the terminal device is a slave control terminal, and an identity confirmation data message is generated, and the identity confirmation data message is fed back to the terminal device that sent the competing host data message, so that the terminal device that sent the competing host data message confirms its own identity as the master control terminal.
[0093] In some examples of the present invention, after the terminal device sends a competing host data message, it also determines whether the time since the last random number was generated exceeds the preset agreed time. If so, it returns to regenerate the random number; if not, it determines whether an identity confirmation data message is received.
[0094] It should be noted that other specific implementation modes of the control system of the household appliance of this embodiment may refer to the specific implementation mode of the first terminal device identity determination method of the above embodiment.
[0095] In summary, the control system of the household appliance in this embodiment can improve the efficiency of identity determination of the terminal device, ensure the accuracy of the identity configuration of the terminal device, and reduce the identity configuration cost, while ensuring the normal operation of the household appliance.
[0096] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0097] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0098] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0099] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0100] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0101] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0102] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0103] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for determining the identity of a terminal device, characterized in that: Applicable to a system in which multiple terminal devices control the same household appliance, the terminal device is a control terminal for controlling the household appliance; the method comprises: Set the preset agreed time T 总 Per T 时基 Divide the time into several equal parts of T 时基 ; After the home appliance system hardware is installed, the preset agreed time T 总 Inner T 时基 The number of copies is the maximum value to control the terminal device to generate a random number, and according to the random number and the T 时基 Control the terminal device to generate a waiting time for a competing host data message to be sent; When the waiting time for sending the competing host data message arrives and the terminal device has not received the competing host data message, control the terminal device to send the competing host data message, so that other terminal devices confirm their own identity as a slave control terminal when receiving the competing host data message, and feed back an identity confirmation data message; When the identity confirmation data message is received, the terminal device is confirmed to be the master control terminal to end the master-slave automatic configuration program of the terminal device; wherein, after the master control terminal and the slave control terminal are determined in the multi-terminal device, the master control terminal polls each of the slave control terminals to obtain the control parameters of the corresponding slave control terminal, the master control terminal sends the control parameters of the corresponding slave control terminal to the home appliance so that the home appliance executes and provides feedback, the master control terminal receives the execution feedback result of the home appliance, and sends the execution feedback result to the corresponding slave control terminal.
2. The method according to claim 1, characterized in that The competing host data message waits for sending time T 随机数 = random number * T 时基 .
3. The method according to claim 1 or 2, characterized in that Before the waiting time for sending the competing host data message arrives, it is also determined whether the terminal device has received the competing host data message, and when the terminal device receives the competing host data message, it is confirmed that the terminal device is a slave control terminal, and the identity confirmation data message is generated, and the identity confirmation data message is fed back to the terminal device that sends the competing host data message, so that the terminal device that sends the competing host data message confirms its own identity as the master control terminal.
4. The method according to claim 1 or 2, characterized in that: After the terminal device sends the competing host data message, it is also determined whether the time since the last random number generation exceeds the preset agreed time, wherein: If yes, return to regenerate random number; If not, determine whether the identity confirmation data message is received.
5. The method according to claim 1, characterized in that The master control terminal polls each slave control terminal to determine whether the data of each slave control terminal has changed, and obtains the control parameters of any slave control terminal when the data of any slave control terminal has changed.
6. A method for determining the identity of a terminal device, characterized in that: Applicable to a system in which multiple terminal devices control the same household appliance, the terminal device is a control terminal for controlling the household appliance; the method comprises: At the preset agreed time T 总 Inside T 时基 The number of copies is the maximum value to control the terminal device to generate a random number, and according to the random number and T 时基 Control the terminal device to generate a waiting time for the competing host data message to be sent; wherein the preset agreed time T 总 Per T 时基 Divide the time into several equal parts of T 时基 ; Before the waiting time for sending the competing host data message arrives, determining whether the terminal device has received the competing host data message; If the terminal device receives the competing host data message, it confirms that the terminal device is a slave control terminal, generates an identity confirmation data message, and feeds back the identity confirmation data message to the terminal device that sends the competing host data message, so that the terminal device that sends the competing host data message confirms its own identity as the master control terminal, so as to end the master-slave automatic configuration program of the terminal device; wherein, after determining the master control terminal and the slave control terminal in the multi-terminal device, the master control terminal polls each of the slave control terminals to obtain the control parameters of the corresponding slave control terminal, and the master control terminal sends the control parameters of the corresponding slave control terminal to the home appliance so that the home appliance executes and provides feedback, and the master control terminal receives the execution feedback result of the home appliance and sends the execution feedback result to the corresponding slave control terminal.
7. The method according to claim 6, characterized in that The competing host data message waits for sending time T 随机数 = random number * T 时基 .
8. The method according to claim 6, characterized in that The master control terminal polls each slave control terminal to determine whether the data of each slave control terminal has changed, and obtains the control parameters of any slave control terminal when the data of any slave control terminal has changed.
9. A computer-readable storage medium, characterized in that: An identity determination program of a terminal device is stored thereon, and when the identity determination program of the terminal device is executed by a processor, the identity determination method of a terminal device as described in any one of claims 1-5 or the identity determination method of a terminal device as described in claims 6-8 is implemented.
10. A terminal device, characterized in that: The invention comprises a memory, a processor and an identity determination program of a terminal device which is stored in the memory and can be run on the processor. When the processor executes the identity determination program of the terminal device, the identity determination method of the terminal device as described in any one of claims 1 to 5 or the identity determination method of the terminal device as described in claims 6 to 8 is implemented.
11. A control system for household electrical appliances, characterized in that: The plurality of control terminals include a master control terminal and a slave control terminal, wherein the preset agreed time T 总 Per T 时基 Divide the time into several equal parts of T 时基 ; After the home appliance system hardware is installed, each control terminal is respectively set to the preset agreed time T 总 Inside T 时基 The number of copies is the maximum value, and a random number is generated according to the random number and the T 时基 Generate the corresponding waiting time for the competing host data message to be sent; When the waiting time for sending the competing host data message corresponding to any control terminal arrives and the control terminal has not received the competing host data message, the control terminal sends the competing host data message, so that other control terminals confirm their own identities as slave control terminals when receiving the competing host data message, and feed back identity confirmation data messages; When the control terminal receives the identity confirmation data message, it confirms its own identity as the master control terminal to end the master-slave automatic configuration program of the terminal device; wherein, after determining the master control terminal and the slave control terminal in the multi-terminal device, the master control terminal polls each of the slave control terminals to obtain the control parameters of the corresponding slave control terminal, and the master control terminal sends the control parameters of the corresponding slave control terminal to the home appliance so that the home appliance executes and provides feedback, and the master control terminal receives the execution feedback result of the home appliance and sends the execution feedback result to the corresponding slave control terminal.
Citation Information
Patent Citations
Electric water heater as well as control system and control method of electric water heater
CN103697594A
Identification method for connection mode of base station air-conditioning system and base station air-conditioning system
CN105333574A
Control method based on anti-harmonic, low-voltage and intelligent reactive compensation system
CN107706925A
Computer interlocking platform control method based on finite-state machine
CN108279597A
Multipoint access-type intelligent interconnection device and interconnection communication method
CN109286546A
