Equipment control method and electronic equipment
By grading the smart device and setting the waiting time according to its performance capability level, the problem of lag in response process in knob control is solved, and the device's follow-up performance and user experience are improved.
Patent Information
- Application Number
- CN202311393533.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, there is serious lag in the knob control response process, resulting in obvious abruptness in the volume control and affecting the user experience.
By grading the smart device, adjusting the waiting time corresponding to the performance capability level, and sending control commands to the smart device, thereby reducing the response time and improving the performance of the device and hand.
It effectively reduces the response time, avoids lag abnormalities, improves the user experience, and realizes hierarchical control of smart devices with different adjustment performance.
Smart Images

Figure CN119882504A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a device control method and an electronic device. Background Art
[0002] With the development of terminal technology, there are more and more control methods for smart devices, such as traditional switch panel control, mobile phone application control, voice control, knob control, etc. Among them, knob control requires a higher smooth experience during the adjustment process compared with other control methods.
[0003] For example, when users adjust the volume of a speaker by turning a knob, they expect the volume to increase or decrease synchronously with the rotation of the knob. However, due to the serious stuttering phenomenon in the knob control response process, the volume control has a noticeable sense of frustration, which affects the user experience. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a device control method and an electronic device. The technical solution provided by the present application is that the first electronic device sends a control command according to different waiting times according to the adjustment performance capability level of the smart device, thereby improving the hand-following performance of the first electronic device.
[0005] In order to achieve the above technical objectives, this application provides the following technical solutions:
[0006] In a first aspect, a device control method is provided, the method comprising: a first electronic device receives a first instruction sent by a second electronic device. The first electronic device determines that the adjustment performance capability level of the first target smart device indicated by the first instruction to be controlled is a first capability level. After a first waiting time corresponding to the first capability level, the first electronic device sends a first control command corresponding to the first instruction to the first target smart device. The first electronic device receives a second instruction sent by the second electronic device. The first electronic device determines that the adjustment performance capability level of the second target smart device indicated by the second instruction to be controlled is a second capability level. After a second waiting time corresponding to the second capability level, the first electronic device sends a second control command corresponding to the second instruction to the second target smart device. Wherein, the first capability level is higher than the second capability level, and the first waiting time is less than the second waiting time.
[0007] Thus, compared with the prior art, after the first electronic device generates a control command, it directly sends the control command to the smart device. Due to the limitation of the adjustment performance of the smart device, the control commands are piled up, resulting in a long response time, which affects the device's hand-following performance. The device control method provided in the embodiment of the present application, by grading smart devices, sends control commands to different smart devices according to the waiting time corresponding to different adjustment performance capability levels, thereby reducing the response time, improving the device's hand-following performance, avoiding abnormal freezes, and improving the user's experience.
[0008] In addition, the first electronic device can control smart devices with different adjustment performances, provide graded experience adjustment effects, and enhance the user experience.
[0009] According to the first aspect, after receiving the first instruction sent by the second electronic device, the method further includes: the first electronic device determines that the first instruction meets a preset condition, and sets a calibration point according to information carried in the first instruction.
[0010] According to the first aspect, or any implementation method of the first aspect above, the preset conditions include any one of the following items: the first instruction is an instruction for starting control of the first target smart device for the first time, the first instruction is an instruction for stopping control of the first target smart device, and the difference between the cumulative value corresponding to the first instruction and the cumulative value corresponding to the most recent calibration point is greater than or equal to the preset value.
[0011] In some examples, the first electronic device marks the calibration points and the non-calibrated points with different values. For example, the first electronic device marks the cumulative value of the calibration points as 1 and the cumulative value of the non-calibrated points as 0; or, the first electronic device marks the cumulative value of the calibration points as 0 and the cumulative value of the non-calibrated points as 1. For another example, the first electronic device marks the cumulative value of the calibration points as 1 or 0, but does not mark the non-calibrated points. In this way, the first electronic device (or gateway) can determine whether it is necessary to retransmit the corresponding control command, which carries the cumulative value, based on the mark value.
[0012] According to the first aspect, or any implementation of the first aspect above, after a first waiting time corresponding to a first capability level, sending a first control command corresponding to a first instruction to a first target smart device includes: if the first instruction meets a preset condition, after the first waiting time, the first electronic device sends the first control command to the first target smart device based on a first retransmission number. If the first instruction does not meet the preset condition, after the first waiting time, the first electronic device sends the first control command to the first target smart device based on a second retransmission number; wherein the first retransmission number is greater than the second retransmission number, and the second retransmission number is an integer greater than or equal to 0.
[0013] In this way, by setting calibration points and non-calibration points, the sending speed of control commands can be guaranteed by reducing the number of retransmissions at non-calibration points to improve the overall communication performance; at calibration points, the success rate of control command sending can be increased by increasing the number of retransmissions.
[0014] According to the first aspect, or any implementation of the first aspect above, after a first waiting time, a first control command is sent to a first target smart device based on a first number of retransmissions, including: after the first waiting time, the first electronic device sends the first control command with a first number of retransmissions to the first target smart device.
[0015] In some examples, after receiving the first control command and performing the corresponding operation, the first target smart device does not need to send the execution result to the first electronic device. Then, the first electronic device will not wait for the feedback from the first target smart device. For example, the first electronic device or the third electronic device sends the first control command to the first target smart device via Bluetooth broadcast. Then, the first target smart device does not need to feedback the execution result of the first control command.
[0016] Exemplarily, the first electronic device does not need to pay attention to the execution result of the first target smart device on the first control command, and only needs to complete the retransmission of the first control command according to the preset number of retransmissions.
[0017] According to the first aspect, or any implementation method of the first aspect above, after a first waiting time, a first control command is sent to a first target smart device based on a first number of retransmissions, including: after the first waiting time, based on the first number of retransmissions, the first electronic device determines the maximum number of times the first control command is sent to the first target smart device, and the maximum number is the first number of retransmissions.
[0018] In some examples, after receiving the first control command and performing the corresponding operation, the first target smart device sends the execution result to the first electronic device. Then, the first electronic device will wait for the execution result fed back by the first target smart device, and determine whether it is necessary to continue to retransmit the first control command based on the execution result. For example, the first electronic device or the third electronic device sends the first control command to the first target smart device through PLC. Then the first target smart device needs to feedback the execution result of the first control command. For example, the first electronic device determines that the first control command has been successfully executed based on the execution result fed back by the first target smart device, then the first electronic device can stop retransmitting the first control command. For another example, the first electronic device determines that the execution of the first control command has failed based on the execution result fed back by the first target smart device, then the first electronic device can continue to retransmit the first control command until feedback of successful execution is received or the first number of retransmissions is completed.
[0019] The first electronic device will retransmit the first control command to the first target smart device at most for a first retransmission number of times, thereby reducing retransmission power consumption. That is, the first retransmission number of times is the maximum retransmission number of times.
[0020] In this way, the retransmission process is standardized through the first retransmission number, which improves the control command transmission success rate and avoids invalid multiple retransmissions.
[0021] According to the first aspect, or any implementation of the first aspect above, the method further includes: the first electronic device receives a third instruction sent by the second electronic device. The first electronic device determines that the third instruction is used to control the first target smart device. The first electronic device determines the second cumulative value corresponding to the third instruction based on the adjustment value indicated by the third instruction and the first cumulative value corresponding to the fourth instruction for controlling the first target smart device received last time. After the first waiting time, the first electronic device sends a third control command to the first target smart device, and the third control command carries the second cumulative value.
[0022] In some examples, the smart device receives a first control command sent by the first electronic device, the first control command being used to instruct the start of control. In response to the first control command, the smart device saves the current value of the device as a reference value. The smart device receives a fifth control instruction sent by the first electronic device, determines a target value based on the accumulated value and the reference value indicated by the fifth control instruction, and adjusts the current value of the device to the target value.
[0023] In this way, during the subsequent adjustment process of the target smart home device, even if a packet loss exception occurs, the target smart home device can at least receive the accumulated incremental value sent by the subsystem (or gateway) through the retransmission method through the above retransmission method. In this way, the target smart home device can also adjust the device to the correct incremental value based on the benchmark value and the subsequently received accumulated incremental value, correct the abnormality in time, and the problem of the device being always at the abnormal target value will not occur, thereby improving the user experience.
[0024] According to the first aspect, or any implementation of the first aspect above, after receiving the first instruction sent by the second electronic device, the method further includes: the first electronic device monitors the data processing environment. After the first waiting time corresponding to the first capability level, the first control command corresponding to the first instruction is sent to the first target smart device, including: when the adjustment performance capability level of the first target smart device is the first capability level, when the data processing environment belongs to the first data processing environment level, after the first waiting time, the first electronic device sends the first control command to the first target smart device. When the adjustment performance capability level of the first target smart device is the first capability level, when the data processing environment belongs to the second data processing environment level, after the third waiting time, the first electronic device sends the first control command to the first target smart device. Wherein, the busyness indicated by the second data processing environment level is greater than the busyness indicated by the first data processing environment level, and the third waiting time is a waiting time greater than the first waiting time determined according to the first waiting time.
[0025] In this way, the first electronic device adaptively adjusts the waiting time according to the busyness of the data processing environment, thereby improving the success rate of packet sending and avoiding blocking and crashing anomalies in the communication environment.
[0026] According to the first aspect, or any implementation of the first aspect above, the method further includes: the first electronic device receives a fifth instruction sent by the second electronic device, and the fifth instruction is used to instruct to control the first target smart device. The first electronic device determines that the data processing environment is in a severely busy state. When the fifth instruction is an instruction to stop controlling the first target smart device, the first electronic device sends a fourth control command corresponding to the fifth instruction to the first target smart device.
[0027] In this way, when the data processing environment is in a severely busy state, the first electronic device sends a control command when the rotation stops, thereby ensuring that the final device effect after the smart device executes the control command meets the demand, while also avoiding multiple transmissions of control commands during the adjustment process, increasing the communication burden, and causing communication blockage and collapse abnormalities.
[0028] According to the first aspect, or any implementation of the first aspect above, the method further includes: the first electronic device receives a sixth instruction sent by the second electronic device, the sixth instruction is used to instruct to control the first target smart device. The first electronic device determines that the data processing environment is in a blocked state. The first electronic device discards the sixth instruction.
[0029] In this way, when the data processing environment is in a blocked state, the first electronic device discards the received instruction, thereby avoiding sending the control command corresponding to the instruction, causing communication crash exception.
[0030] According to the first aspect, or any implementation of the first aspect above, before receiving the first instruction sent by the second electronic device, the method further includes: the first electronic device receives device information sent by the first target smart device. The first electronic device determines the adjustment performance capability level of the first target smart device based on the device information.
[0031] In some examples, the device information includes whether the first target smart device supports calculating the target value and / or the length of time the first target smart device processes the first control command.
[0032] In this way, before receiving the instruction sent by the second device, the first electronic device can determine the adjustment performance capability level of the smart device based on the device information of the smart device, so that when the control command corresponding to the instruction needs to be sent subsequently, it can automatically match the required waiting time.
[0033] According to the first aspect, or any implementation of the first aspect above, the first control command is a relative command or an absolute command. The relative command is used to instruct the first target smart device to generate a target value according to the adjustment value indicated by the relative command, and adjust the current value of the device to the target value; the absolute command is used to indicate the target value, and instruct the first target smart device to adjust the current value of the device to the target value.
[0034] In this way, the first electronic device can determine whether to send an absolute command or a relative command to the smart device according to the data processing capability of the smart device.
[0035] In a second aspect, a device control method is provided, the method comprising: a third electronic device receives a first control command sent by a first electronic device, the first control command carrying first calibration information for determining the number of retransmissions. Based on the first number of retransmissions, the third electronic device sends the first control command to the first target smart device indicated by the first control command for control. The third electronic device receives a fifth control command sent by the first electronic device, the fifth control command does not carry the first calibration information or carries the second calibration information for determining the number of retransmissions. Based on the second number of retransmissions, the third electronic device sends a fifth control command to the first target smart device indicated by the fifth control command for control. The first number of retransmissions is greater than the second number of retransmissions.
[0036] In some examples, the control command received by the third electronic device includes calibration information determined by the first electronic device, and the third electronic device may determine whether to retransmit the control command based on the calibration information. In some examples, the control command forwarded by the third electronic device to the smart device may include or not include calibration information. Accordingly, if the control command received by the smart device includes calibration information, the smart device may not process the calibration information, such as directly discarding it.
[0037] According to the second aspect, the method further includes: the third electronic device receives the device information sent by the first target smart device, and the third electronic device forwards the device information to the first electronic device.
[0038] In this way, the first electronic device obtains the device information of the smart device through the third electronic device, thereby determining the adjustment performance capability of the smart device.
[0039] In a third aspect, a device control method is provided, the method comprising: a smart device receives a first control command sent by a first electronic device, the first control command being used to instruct to start control. The smart device responds to the first control command and saves a current value of the device as a reference value. The smart device receives a fifth control instruction sent by the first electronic device, determines a target value according to the accumulated value indicated by the fifth control instruction and the reference value, and adjusts the current value of the device to the target value.
[0040] According to a third aspect, a smart device receives a first control command sent by a first electronic device, including the smart device receiving the first control command sent by the first electronic device based on a first retransmission number. The smart device receives a fifth control command sent by the first electronic device, wherein the first retransmission number is greater than the second retransmission number.
[0041] According to the third aspect, or any implementation of the first aspect above, after the smart device receives the first control command sent by the first electronic device, the method also includes: the smart device sends a first response to the first electronic device, and the first response is used to indicate the execution status of the first control command.
[0042] In this way, based on different control command transmission methods, the smart device can choose whether to feedback the execution status of the control command. If the smart device receives the control command via Bluetooth broadcast, it is not necessary to feedback the execution status of the control command to the first electronic device. If the smart device receives the control command via PLC, it can feedback the execution status of the control command to the first electronic device.
[0043] According to the third aspect, or any implementation of the first aspect above, before the smart device receives a first control command sent by a first electronic device, the method also includes: the smart device sends device information to the first electronic device, and the device information is used to obtain the adjustment performance capability level of the smart device.
[0044] In a fourth aspect, a first electronic device is provided. The first electronic device includes: a processor and a memory, the memory is coupled to the processor, the memory is used to store a computer program code, the computer program code includes a computer instruction, when the processor reads the computer instruction from the memory, the first electronic device executes: the first electronic device receives a first instruction sent by the second electronic device. The first electronic device determines that the adjustment performance capability level of the first target smart device indicated by the first instruction is the first capability level. After a first waiting time corresponding to the first capability level, the first electronic device sends a first control command corresponding to the first instruction to the first target smart device. The first electronic device receives a second instruction sent by the second electronic device. The first electronic device determines that the adjustment performance capability level of the second target smart device indicated by the second instruction is the second capability level. After a second waiting time corresponding to the second capability level, the first electronic device sends a second control command corresponding to the second instruction to the second target smart device. Wherein, the first capability level is higher than the second capability level, and the first waiting time is less than the second waiting time.
[0045] According to the fourth aspect, when the processor reads the computer instruction from the memory, it also enables the first electronic device to execute: the first electronic device determines that the first instruction meets the preset condition, and sets the calibration point according to the information carried by the first instruction.
[0046] According to the fourth aspect, or any implementation of the fourth aspect above, after the first waiting time corresponding to the first capability level, sending the first control command corresponding to the first instruction to the first target smart device includes: if the first instruction meets the preset condition, after the first waiting time, the first electronic device sends the first control command to the first target smart device based on the first retransmission number. If the first instruction does not meet the preset condition, after the first waiting time, the first electronic device sends the first control command to the first target smart device based on the second retransmission number; wherein the first retransmission number is greater than the second retransmission number, and the second retransmission number is an integer greater than or equal to 0.
[0047] According to the fourth aspect, or any implementation method of the fourth aspect above, after a first waiting time, a first control command is sent to a first target smart device based on a first number of retransmissions, including: after the first waiting time, the first electronic device sends a first control command with a first number of retransmissions to the first target smart device.
[0048] According to the fourth aspect, or any implementation method of the fourth aspect above, after a first waiting time, a first control command is sent to a first target smart device based on a first number of retransmissions, including: after the first waiting time, based on the first number of retransmissions, the first electronic device determines the maximum number of times the first control command is sent to the first target smart device, and the maximum number is the first number of retransmissions.
[0049] According to the fourth aspect, or any implementation method of the fourth aspect above, the preset conditions include any one of the following items: the first instruction is an instruction for starting control of the first target smart device for the first time, the first instruction is an instruction for stopping control of the first target smart device, and the difference between the cumulative value corresponding to the first instruction and the cumulative value corresponding to the most recent calibration point is greater than or equal to the preset value.
[0050] According to the fourth aspect, or any implementation of the fourth aspect above, when the processor reads the computer instruction from the memory, it also causes the first electronic device to execute: the first electronic device receives the third instruction sent by the second electronic device. The first electronic device determines that the third instruction is used to control the first target smart device. The first electronic device determines the second cumulative value corresponding to the third instruction based on the adjustment value indicated by the third instruction and the first cumulative value corresponding to the fourth instruction for controlling the first target smart device received last time. After the first waiting time, the first electronic device sends a third control command to the first target smart device, and the third control command carries the second cumulative value.
[0051] According to the fourth aspect, or any implementation of the fourth aspect above, when the processor reads the computer instruction from the memory, the first electronic device is also caused to execute: the first electronic device monitors the data processing environment. After the first waiting time corresponding to the first capability level, the first control command corresponding to the first instruction is sent to the first target smart device, including: when the adjustment performance capability level of the first target smart device is the first capability level, when the data processing environment belongs to the first data processing environment level, after the first waiting time, the first electronic device sends the first control command to the first target smart device. When the adjustment performance capability level of the first target smart device is the first capability level, when the data processing environment belongs to the second data processing environment level, after the third waiting time, the first electronic device sends the first control command to the first target smart device. Wherein, the busyness indicated by the second data processing environment level is greater than the busyness indicated by the first data processing environment level, and the third waiting time is a waiting time greater than the first waiting time determined according to the first waiting time.
[0052] According to the fourth aspect, or any implementation of the fourth aspect above, when the processor reads the computer instruction from the memory, the first electronic device is also caused to execute: the first electronic device receives a fifth instruction sent by the second electronic device, and the fifth instruction is used to instruct to control the first target smart device. The first electronic device determines that the data processing environment is in a severely busy state. When the fifth instruction is an instruction to stop controlling the first target smart device, the first electronic device sends a fourth control command corresponding to the fifth instruction to the first target smart device.
[0053] According to the fourth aspect, or any implementation of the fourth aspect above, when the processor reads the computer instruction from the memory, the first electronic device is also caused to execute: the first electronic device receives a sixth instruction sent by the second electronic device, the sixth instruction is used to instruct to control the first target smart device. The first electronic device determines that the data processing environment belongs to a blocking state. The first electronic device discards the sixth instruction.
[0054] According to the fourth aspect, or any implementation of the fourth aspect above, when the processor reads the computer instruction from the memory, the first electronic device is also caused to execute: the first electronic device receives device information sent by the first target smart device. The first electronic device determines the adjustment performance capability level of the first target smart device based on the device information.
[0055] According to the fourth aspect, or any implementation of the fourth aspect, the first control command is a relative command or an absolute command. The relative command is used to instruct the first target smart device to generate a target value according to the adjustment value indicated by the relative command, and adjust the current value of the device to the target value; the absolute command is used to indicate the target value, and instruct the first target smart device to adjust the current value of the device to the target value.
[0056] In a fifth aspect, a third electronic device is provided. The third electronic device includes: a processor and a memory, the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor reads the computer instructions from the memory, the third electronic device executes: the third electronic device receives a first control command sent by the first electronic device, and the first control command carries the first calibration information. Based on the first number of retransmissions, the third electronic device sends the first control command to the first target smart device indicated by the first control command. The third electronic device receives a fifth control command sent by the first electronic device, and the fifth control command does not carry the first calibration information or carries the second calibration information. Based on the second number of retransmissions, the third electronic device sends a fifth control command to the first target smart device indicated by the fifth control command. Wherein, the first number of retransmissions is greater than the second number of retransmissions.
[0057] According to the fifth aspect, when the processor reads the computer instruction from the memory, the third electronic device is also caused to execute: the third electronic device receives the device information sent by the first target smart device, and the third electronic device forwards the device information to the first electronic device.
[0058] In a sixth aspect, a smart device is provided. The smart device includes: a processor and a memory, the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor reads the computer instructions from the memory, the smart device executes: the smart device receives a first control command sent by a first electronic device, the first control command is used to instruct to start control. In response to the first control command, the smart device saves the current value of the device as a reference value. The smart device receives a fifth control instruction sent by the first electronic device, determines a target value according to the accumulated value indicated by the fifth control instruction and the reference value, and adjusts the current value of the device to the target value.
[0059] According to a sixth aspect, a smart device receives a first control command sent by a first electronic device, including the smart device receiving the first control command sent by the first electronic device based on a first retransmission number. The smart device receives a fifth control command sent by the first electronic device, and the smart device receives the fifth control command sent by the first electronic device based on a second retransmission number. The first retransmission number is greater than the second retransmission number.
[0060] According to the sixth aspect, or any implementation of the first aspect above, when the processor reads the computer instruction from the memory, it also enables the smart device to execute: the smart device sends a first response to the first electronic device, and the first response is used to indicate the execution status of the first control command.
[0061] According to the sixth aspect, or any implementation of the first aspect above, when the processor reads computer instructions from the memory, it also enables the smart device to execute the smart device to send device information to the first electronic device, and the device information is used to obtain the adjustment performance capability level of the smart device.
[0062] In a seventh aspect, an electronic device is provided, which has the function of implementing the device control method as described in the first aspect and any possible implementation thereof; or, the electronic device has the function of implementing the device control method as described in the second aspect and any possible implementation thereof; or, the electronic device has the function of implementing the device control method as described in the third aspect and any possible implementation thereof. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0063] In an eighth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as an instruction or code), and when the computer program is executed by an electronic device, the electronic device executes the method of the first aspect or any one of the implementations of the first aspect; or, the electronic device executes the method of the second aspect or any one of the implementations of the second aspect; or, the electronic device executes the method of the third aspect or any one of the implementations of the third aspect.
[0064] In the ninth aspect, a computer program product is provided. When the computer program product runs on an electronic device, the electronic device executes the method of the first aspect or any one of the embodiments of the first aspect; or, the electronic device executes the method of the second aspect or any one of the embodiments of the second aspect; or, the electronic device executes the method of the third aspect or any one of the embodiments of the third aspect.
[0065] In a tenth aspect, a circuit system is provided, the circuit system comprising a processing circuit, the processing circuit being configured to execute the method of the first aspect or any one of the embodiments of the first aspect; or, the processing circuit being configured to execute the method of the second aspect or any one of the embodiments of the second aspect; or, the processing circuit being configured to execute the method of the third aspect or any one of the embodiments of the third aspect.
[0066] In the eleventh aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor, and when the at least one processor executes the instructions, the at least one processor executes the method of the first aspect or any one of the embodiments of the first aspect; or, the at least one processor executes the method of the second aspect or any one of the embodiments of the second aspect; or, the at least one processor executes the method of the third aspect or any one of the embodiments of the third aspect.
[0067] The technical effects of the aforementioned aspects can be referenced to each other and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 A schematic diagram of a knob control scenario provided in an embodiment of the present application;
[0069] Figure 2 A schematic diagram of the knob control process provided in an embodiment of the present application;
[0070] Figure 3 Schematic diagram of a communication system for applying the device control method provided in the embodiment of the present application Figure 1 ;
[0071] Figure 4Schematic diagram of a communication system for applying the device control method provided in the embodiment of the present application Figure 2 ;
[0072] Figure 5 A schematic diagram of the hardware structure of the second device provided in an embodiment of the present application;
[0073] Figure 6 Schematic diagram of the device control method provided in the embodiment of the present application Figure 1 ;
[0074] Figure 7 A schematic diagram of a device hierarchical control scenario provided in an embodiment of the present application;
[0075] Figure 8 Schematic diagram of the device control method provided in the embodiment of the present application Figure 2 ;
[0076] Fig. 9 A schematic diagram of a control command retransmission scenario provided in an embodiment of the present application;
[0077] Fig.10 Schematic diagram of the device control method provided in the embodiment of the present application Figure 3 ;
[0078] Fig.11 A schematic diagram of a scenario of adaptively adjusting the control command cache time provided in an embodiment of the present application;
[0079] Fig.12 Schematic diagram of the device control method provided in the embodiment of the present application Figure 4 ;
[0080] Fig.13 A schematic diagram of the structure of a first electronic device provided in an embodiment of the present application;
[0081] Fig.14 A schematic diagram of the structure of a third electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] The technical solutions in the embodiments of the present application are described below in conjunction with the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to include expressions such as "one or more", unless there is a clear indication to the contrary in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two).
[0083] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0084] In the embodiments of the present application, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0085] In some embodiments, users can control smart devices through a variety of methods such as traditional switch panels, mobile phone applications, voice, knobs, etc. Among them, smart devices include, for example, smart home devices (such as speakers, curtains, lights, etc.), smart office equipment, etc. Among them, compared with other control methods, knob control requires a higher level of smooth follow-up experience during the adjustment process. For example, in the process of adjusting the volume of the speaker through the knob, the user expects the volume of the speaker to increase or decrease synchronously with the rotation of the knob operation. For example, the user expects that as the knob is rotated to the right, the volume of the speaker can be increased synchronously; as the knob is rotated to the left, the volume of the speaker can be decreased synchronously. However, due to the serious jamming phenomenon in the knob control response process, there is an obvious sense of frustration in the volume control, which affects the user experience.
[0086] For example, Figure 1 As shown in FIG. 1 , the smart device is a smart home device as an example. In the smart home scenario, the knob controls the corresponding smart home device through the smart home cloud. Figure 2As shown, after the knob detects the user's rotation operation, it sends the corresponding rotation instruction to the smart home cloud. After receiving the knob instruction, the smart home cloud determines the smart home device to be controlled by the rotation instruction, and obtains the current value of the smart home device. Afterwards, the smart home cloud determines the target value based on the knob indication value indicated by the knob instruction and the current value of the device. Afterwards, the smart home cloud sends a control command to the smart home device indicated by the knob instruction, and carries the target value in the control command. Accordingly, after receiving the control command, the smart home device can adjust the current value of the device to the target value. In this way, through the above process, the control of the smart home device by the knob is realized.
[0087] Among them, the control response process of the above-mentioned smart home devices has a delay of about 600 milliseconds (ms), while the delay perceived by human factors analysis is 160ms-200ms. Then, when the user controls the smart home device through the knob, it will take 600ms after operating the knob to feel the response of the smart home device, and the user will obviously feel the lag and frustration. In addition, the above-mentioned control process only supports some pre-configured smart home devices, and its universality is poor.
[0088] Moreover, during the device control process, the control command is lost and cannot be retrieved, resulting in the target value determined by the smart home cloud based on the current value of the device and the knob indication value not meeting the user's needs.
[0089] In addition, when the smart home cloud receives instructions from multiple control devices (such as knobs, etc.) with the same control strategy, since the instruction processing takes time, there is an obvious control response wait, which further affects the device's tracking performance.
[0090] Therefore, an embodiment of the present application provides a device control method, in which a first electronic device sends a control command according to different waiting times based on the adjustment performance capability level of a smart device, thereby improving the hand-following performance of the first electronic device.
[0091] Figure 3 A schematic diagram of a communication system for use with the device control method provided in an embodiment of the present application. Figure 3 As shown, the communication system includes a first device 100 , a second device 200 and a third device 300 .
[0092] Optionally, the first device 100 is a device operated by a user, and the user controls the third device 300 through the first device 100. For example, the first device 100 is a knob, etc. Optionally, the knob can be a physical knob or a virtual knob. For example, a virtual knob is displayed on the control panel, and knob control is implemented in response to a touch operation of the user on the control panel.
[0093] Optionally, the second device 200 is a control device, which is used to control the corresponding third device 300 according to the instruction sent by the first device 100. For example, the second device 200 is a smart home cloud. Optionally, the second device 200 can be a device or server with computing functions such as a cloud server or a network server. The second device 200 can be a single device, or a device cluster composed of multiple devices, or a cloud computing service center. For example, Figure 4 As shown, the second device 200 is a device cluster composed of multiple devices, including a gateway, a hub and a subsystem. In some examples, the first device 100 responds to user operations and sends corresponding instructions to the hub through a dedicated channel provided by the gateway. After the hub receives the instruction, it forwards the instruction to the subsystem through a dedicated channel. After receiving the instruction, the subsystem can generate a corresponding control command and send it to the third device 300. In some examples, the subsystem sends a control command to the third device 300 through the gateway. In this way, through a dedicated channel, it is possible to avoid other tasks from affecting the transmission of instructions, thereby improving the efficiency of instruction transmission. For example, after the hub receives the instruction sent by the first device 100 through the gateway, it directly interrupts other tasks and prioritizes and quickly processes the instruction, thereby improving the efficiency of instruction transmission. For another example, the second device 200 is a device, such as the second device 200 is a subsystem. After receiving the instruction sent by the first device 100, the subsystem generates a corresponding control command and sends it to the third device 300.
[0094] Optionally, the third device 300 may be, for example, a smart home device, a mobile phone, a tablet computer, a laptop computer, a netbook, a personal digital assistant (PDA), a wearable device, an artificial intelligence (AI) device, or other terminal device. Among them, smart home devices include, for example, smart home control panels, audio and video devices (such as smart screens, speakers, etc.), lighting system devices (such as desk lamps, electric lights, etc.), environmental control devices (such as air purifiers, sweeping robots, etc.), etc. The operating system installed on the third device 300 includes but is not limited to Or other operating systems. The third device 300 may not be installed with an operating system. This application does not limit the specific type of the third device 300, whether an operating system is installed, and the type of operating system if an operating system is installed.
[0095] In some embodiments, a wireless communication connection can be established between the first device 100, the second device 200 and the third device 300 through wireless communication technology. The wireless communication technology includes but is not limited to at least one of the following: wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), power line communication (PLC), Bluetooth (BT) (for example, traditional Bluetooth or Bluetooth low energy (BLE)), near field communication (NFC), Zigbee, frequency modulation (FM), infrared (IR), UWB connection, etc.
[0096] In some embodiments, the operating system is, for example, a smart home system, and the third device 300 is a smart home device. Alternatively, the operating system is a smart office system, and the third device 300 is a smart office device. Alternatively, the communication system may also be other communication systems such as a smart campus communication system, which is not limited in the embodiments of the present application. The following takes the case where the communication system is, for example, a smart home system and the third device 300 is a smart home device as an example to describe in detail the device control method provided in the embodiments of the present application.
[0097] Optionally, the first device 100, the second device 200 and the third device 300 in the embodiment of the present application may be implemented by different devices, and the different devices may have the same, similar or somewhat different hardware structures, such as Figure 5 The hardware structure shown.
[0098] For example, the second device 200 has Figure 5 Take the hardware structure shown in the figure as an example. Figure 5 The hardware structure shown is described.
[0099] Figure 5 A schematic structural diagram of the second device 200 is shown.
[0100] The second device 200 includes at least one processor 501 , a communication line 502 , a memory 503 and at least one communication interface 504 . The memory 503 may also be included in the processor 501 .
[0101] The processor 501 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0102] Communication link 502 may include a pathway for transmitting information between the above-mentioned components.
[0103] Communication interface 504, used to communicate with other devices. In the embodiment of the present application, the communication interface can be a module, a circuit, a bus, an interface, a transceiver or other device capable of implementing a communication function, used to communicate with other devices. Optionally, when the communication interface is a transceiver, the transceiver can be an independently arranged transmitter, which can be used to send information to other devices, and the transceiver can also be an independently arranged receiver, which is used to receive information from other devices. The transceiver can also be a component that integrates the functions of sending and receiving information, and the embodiment of the present application does not limit the specific implementation of the transceiver.
[0104] The memory 503 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage, magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 502. The memory may also be integrated with the processor.
[0105] The memory 503 is used to store computer-executable instructions for implementing the solution of the present application, and the execution is controlled by the processor 501. The processor 501 is used to execute the computer-executable instructions stored in the memory 503, thereby implementing the device control method provided in the following embodiments of the present application.
[0106] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, instructions, computer program or other names, which are not specifically limited in the embodiments of the present application.
[0107] In a specific implementation, as an embodiment, the processor 501 may include one or more CPUs, such as Figure 5 CPU0 and CPU1 in.
[0108] In a specific implementation, as an embodiment, the second device 200 may include multiple processors, such as Figure 5 501 and processor 507 in the embodiment of the present invention. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0109] It is understandable that the embodiments of the present application are as follows Figure 5 The structure does not constitute the only limitation on the implementation of the structure of the second device 200. In other embodiments of the present application, the second device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0110] The following text takes the first device 100 as a knob, the second device 200 as a control device, the third device 300 as a smart home device, and the above-mentioned communication system as a smart home system as an example to introduce in detail the device control method provided in the embodiment of the present application.
[0111] Figure 6 This is a flow chart of a device control method provided in an embodiment of the present application. It should be noted that this method does not Figure 6 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0112] S601. A control device obtains device information of a smart home device.
[0113] Among them, the device information is information used to indicate the adjustment performance of the smart home device. Optionally, the smart home device with strong adjustment performance supports determining the target value according to the knob indication value, and the smart home device with weak adjustment performance does not support determining the target value according to the knob indication value. Alternatively, the smart home device with strong adjustment performance can quickly process the received control command, and the smart home device with weak adjustment performance needs more time to process the received control command. Optionally, the computing power of the smart home device affects the adjustment performance of the smart home device.
[0114] In some embodiments, when the smart home device accesses the control device, it sends its own device information to the control device. For example, when the smart home device accesses the home network where the control device is located, it sends its own device information to the control device.
[0115] In some examples, the smart home device sends information for accessing the control device to the control device, wherein the information includes the device information. In other examples, after accessing the control device, the smart home device sends the device information to the control device separately.
[0116] In some embodiments, the smart home device is divided into adjustment performance capability levels of the smart home device according to the device information. For example, the capability level with the strongest adjustment performance is level 1, and the capability level with the weakest adjustment performance is level 4. The control device divides different smart home devices into devices with four different adjustment performance capability levels according to the device information.
[0117] For example, the control device receives the device information sent by smart home device A, determines that smart home device A supports determining the target value according to the knob indication value, and the control command processing time is 120ms, and the adjustment performance capability level of smart home device A can be determined to be level 1. For another example, the control device receives the device information sent by smart home device B, determines that smart home device B does not support determining the target value according to the knob indication value, and the control command processing time is 200ms, and the adjustment performance capability level of smart home device B can be determined to be level 2. For another example, the control device receives the device information sent by smart home device C, determines that smart home device C does not support determining the target value according to the knob indication value, and the control command processing time is 500ms, and the adjustment performance capability level of smart home device C can be determined to be level 3. For another example, the control device receives the device information sent by smart home device D, determines that smart home device D does not support determining the target value according to the knob indication value, and the control command processing time is 1000ms, and the adjustment performance capability level of smart home device D can be determined to be level 4.
[0118] In some other embodiments, the device information includes the adjustment performance capability level. After receiving the device information sent by the smart home device, the control device can directly determine the adjustment performance capability level of the smart home device.
[0119] It should be understood that, depending on the actual regulation performance of the smart home device, the regulation performance capability level of the smart home device may include a greater or lesser number of capability levels, and the embodiments of the present application do not limit this.
[0120] S602: The control device receives a knob instruction and determines a target smart home device.
[0121] In some embodiments, the knob generates a corresponding knob instruction in response to the user's rotation operation, and the knob instruction includes a knob indication value and a rotation state. For example, the knob indication value included in the rotation instruction is to increase by 1 gear, and the rotation state is to start rotation (or described as starting rotation), rotating, and stop rotation (or described as stopping rotation). After the knob generates the knob instruction, it sends the knob instruction to the control device. Accordingly, the control device receives the knob instruction sent by the knob. Afterwards, the control device determines the target smart home device controlled by the knob instruction based on the knob instruction.
[0122] In some examples, the control device stores mappings between different knobs and the smart home devices controlled by the knobs. Therefore, after receiving a knob instruction sent by the knob, the control device can determine the target smart home device to be controlled by the knob instruction according to the mapping relationship.
[0123] In some other examples, the knob instruction also includes an identifier of a target smart home device. Then, after receiving the knob instruction sent by the knob, the control device can determine the target smart home device to be controlled by the knob instruction according to the identifier carried therein.
[0124] For example, Figure 4 In the communication system architecture shown, the knob responds to the user's operation and sends the corresponding knob command to the hub through the dedicated channel provided by the gateway. After receiving the knob command, the hub interrupts other tasks and preferentially forwards the knob command to the subsystem through the dedicated channel. After receiving the knob command, the subsystem determines the target smart home device that the knob command indicates to control.
[0125] S603: The control device determines whether the target smart home device is a high priority device. If yes, execute step S604; if no, execute step S605.
[0126] S604: The control device sends a control command to the target smart home device by fast packet sending.
[0127] S605: The control device sends a control command to the target smart home device by slow packet sending.
[0128] In some embodiments, different smart home devices with different adjustment performance capability levels may take different amounts of time to process a control command. Therefore, after determining a target smart home device, the control device may select a packet sending method for sending the control command according to the adjustment performance capability level of the target smart home device.
[0129] Optionally, the packet sending mode includes fast packet sending and slow packet sending. Among them, the fast packet sending means that after the control device generates a control command in response to the knob instruction, the control command is sent to the target smart home device immediately or after a short buffering time. The slow packet sending means that after the control device generates a control command in response to the knob instruction, the control command is sent to the target smart home device according to the buffering time, so as to avoid the accumulation of control commands on the target smart home side and cause jamming. It should be understood that the buffering time of the slow packet sending is greater than the buffering time of the fast packet sending.
[0130] Optionally, the higher the regulation performance capability level of the smart home device, the higher the device priority and the shorter the cache time. For high-priority smart home devices, the control device can send control commands in a fast packet sending manner, and for low-priority smart home devices, the control device can send control commands in a slow packet sending manner.
[0131] For example, the control device sends a control command to a target smart home device with an adjustment performance capability level of level 1 through a fast packet sending method. The control device sends a control command to a target smart home device with an adjustment performance capability level of level 2 to level 4 through a slow packet sending method.
[0132] Optionally, the control device may also send control commands to the target smart home device in a slow packet sending manner according to different adjustment performance capability levels of the device and corresponding cache times.
[0133] For example, after generating a control command, the control device determines that the adjustment performance capability level of the target smart home device is level 2, and the control command can be cached. After the cache time reaches 200ms, the control command is sent to the target smart home device. For another example, after generating a control command, the control device determines that the adjustment performance capability level of the target smart home device is level 3, and the control command can be cached. After the cache time reaches 500ms, the control command is sent to the target smart home device. For another example, after generating a control command, the control device determines that the adjustment performance capability level of the target smart home device is level 4, and the control command can be cached. After the cache time reaches 1000ms, the control command is sent to the target smart home device.
[0134] Thus, compared with the prior art, after the control device generates the control command, it directly sends the control command to the smart home device. Due to the limitation of the adjustment performance of the smart home device, the control command is piled up, resulting in a long response waiting time, which affects the device tracking performance. The device control method provided in the embodiment of the present application reduces the response waiting time, improves the device tracking performance, avoids the occurrence of abnormal jamming, and improves the user experience by grading the smart home devices and sending control commands to the smart home devices according to different cache times.
[0135] In addition, the control device can control smart home devices with different adjustment performances, provide graded experience adjustment effects, and enhance the user experience.
[0136] For example, for smart home devices with an adjustment performance capability level of level 1, the optimal effect can be achieved. For smart home devices with an adjustment performance capability level of level 2 or 3, an experience with a certain delay but acceptable delay effect can be achieved. For smart home devices with an adjustment performance capability level of level 4, an adjustable effect can be achieved.
[0137] In some embodiments, the control command includes a relative command and an absolute command. The relative command is used to indicate the knob indication value. After receiving the relative command, the smart home device determines the target value according to the knob indication value carried in the relative command and the current value of the device, and then adjusts the current value of the device to the target value. The absolute command is used to indicate the target value. After receiving the absolute command, the smart home device adjusts the current value of the device to the target value according to the target value carried in the absolute command.
[0138] In some examples, the control device determines whether the smart home device supports determining the target value according to the knob indication value based on the device information. Then, after determining the target smart home device according to the knob instruction, the control device can generate a relative command or an absolute command based on whether the target smart home device supports determining the target value according to the knob indication value.
[0139] In some examples, smart home devices with adjustment performance capability level 1 support determining target values based on knob indication values and can process relative commands. Smart home devices with adjustment performance capability levels 2 to 4 do not support determining target values based on knob indication values and can process absolute commands. In other examples, some or all capability levels of smart home devices with adjustment performance capability levels 2 to 4 support determining target values based on knob indication values and can process relative commands.
[0140] For example, Figure 7As shown, after receiving the knob instruction, the control device determines the target smart home device controlled by the knob instruction according to the knob instruction. If the adjustment performance capability level of the target smart home device is level one, a relative command can be generated, and the priority of the relative command is higher, and it needs to be sent through a fast packet. Afterwards, the control device caches the relative command to update the previous relative command. Afterwards, the control device sends a relative control command to the target smart home device according to the corresponding cache time (or immediately sends a relative command). If the adjustment performance capability level of the target smart home device is level two (or level three, or level four), the control device can generate an absolute command, and the priority of the absolute command is lower, and it needs to be sent through a slow packet. Afterwards, the control device caches the absolute command and starts the slow packet timer. The cache time is counted by the slow packet timer, and after the cache time reaches the cache time requirement corresponding to the adjustment performance capability level, the control device sends an absolute command to the target smart home device.
[0141] Optionally, the control device may receive a knob instruction sent by one or more knobs. Optionally, the knob instruction received by the control device may be used to control one or more smart home devices, and the adjustment performance capability levels of the multiple smart home devices may be the same or different.
[0142] Alternatively, if Figure 7 As shown, during the high-priority fast packet transmission process, the control device caches and accumulates the absolute commands generated by other smart home devices with lower adjustment performance capability levels. The control device determines whether there is a situation where the slow packet transmission timer exceeds the preset cache time and is not scheduled according to the preset period. If so, these absolute commands that have timed out and are not scheduled are sent down.
[0143] Alternatively, if Figure 7 As shown, the control device is configured with a cache clearing timer, which is used to control the device to clear the cached control commands according to a preset period. Optionally, the timing duration of the cache clearing timer is greater than the timing duration of the slow packet sending timer. For example, the adjustment performance capability level of the target smart home device is level four, and the cache time is 1000ms. Then, after generating the absolute command, the control device sets the timing duration of the slow packet sending timer to 1s and the timing duration of the cache clearing timer to 5s.
[0144] In this way, the control device can also realize hierarchical control of different smart home devices in the process of multi-device control according to the adjustment performance capability level of the device. In addition, the timer is used to avoid the leakage of control commands.
[0145] In some embodiments, after the above step S601, steps S602 to S605 may be performed multiple times. That is, after determining the adjustment performance capability level of the smart home device, the control device may send corresponding control commands in stages according to the knob instructions subsequently received.
[0146] In other embodiments, after the smart home device's own adjustment performance is improved (or reduced), it can send device information to the control device again to update the adjustment performance capability level of the smart home device stored in the control device. Subsequently, after receiving the knob instruction, the control device can send a control command to the target smart home device according to the updated adjustment performance capability level of the target smart home device.
[0147] In this way, as the regulation performance of the target smart home device is upgraded, the control device can adaptively adjust the waiting time for sending the control command, achieve adaptive adjustment of the regulation experience effect, and improve the user experience.
[0148] In some scenarios, packet loss may occur during the control command transmission process. In this case, the control device can avoid device adjustment abnormalities caused by packet loss by retransmitting.
[0149] Figure 8 This is a flow chart of another device control method provided in an embodiment of the present application. It should be noted that this method does not Figure 8 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0150] S801. A control device obtains device information of a smart home device.
[0151] S802: The control device receives a knob instruction and determines a target smart home device.
[0152] Optionally, for the detailed contents of step S801 and step S802, reference may be made to the relevant contents of the above-mentioned step S601 and step S602, which will not be described in detail in the embodiment of the present application.
[0153] S803: The control device determines whether the current control command sending point is a calibration point. If yes, execute step S804; if no, execute step S805.
[0154] S804: The control device retransmits the control command multiple times according to a preset number of times to correct the result.
[0155] S805. Control the device to reduce the number of retransmissions to ensure transmission speed.
[0156] In some embodiments, the knob instruction includes a rotation state, which is starting rotation (or described as starting rotation), rotating, and stopping rotation (or described as stopping rotation). The control device sets the starting point and the stopping point as calibration points. For example, after the control device receives the knob instruction sent by the knob, it determines that the rotation state carried therein is starting rotation, and then the control device sets the current control command sending point as the calibration point. For another example, after the control device receives the knob instruction sent by the knob, it determines that the rotation state carried therein is stopping rotation, and then the control device sets the current control command sending point as the calibration point.
[0157] In other embodiments, during the rotation of the knob, in order to avoid packet loss anomalies, the control device may also set a corresponding calibration point according to the cumulative value corresponding to the received knob command. For example, the preset cumulative value calibration point is 10. After the control device receives the knob command sent by the knob to indicate the start of rotation and sets the calibration point corresponding to the start of rotation, in the subsequent process of receiving the knob command, if it is determined that the cumulative value difference between the cumulative value corresponding to the current knob command and the cumulative value corresponding to the nearest calibration point is greater than or equal to the preset cumulative value, the control device sets the current control command sending point as the calibration point; if it is determined that the cumulative value difference between the cumulative value corresponding to the current knob command and the cumulative value corresponding to the nearest calibration point is less than the preset cumulative value, the control device sets the current control command sending point as a non-calibration point.
[0158] Exemplarily, the knob sends a knob instruction to the control device at a certain time interval. Then, depending on the speed at which the user rotates the knob, the knob indication value carried by the knob instruction reported by the knob each time is the same or different. During the rotation process, the control device receives the knob instruction A reported by the knob to indicate the start of rotation, and the knob indication value is +10, and the calibration point can be set. Afterwards, the control device receives the knob indication value carried by the knob instruction B reported by the knob, which is +1, and determines that the cumulative value corresponding to the current knob instruction B is +11, and the cumulative value difference between the cumulative value +10 corresponding to the most recent calibration point is 1, which is less than the preset cumulative value 10, and the non-calibration point can be set. Afterwards, the control device receives the knob indication value carried by the knob instruction C reported by the knob, which is +5, and determines that the cumulative value corresponding to the current knob instruction C is +16, and the cumulative value difference between the cumulative value +10 corresponding to the most recent calibration point is 6, which is less than the preset cumulative value 10, and the non-calibration point can be set. Afterwards, the control device receives the knob indication value of +4 carried by the knob instruction D reported by the knob, determines that the cumulative value corresponding to the current knob instruction D is +20, and the cumulative value difference between the cumulative value +10 corresponding to the most recent calibration point is 10, which is equal to the preset cumulative value 10, and the calibration point can be set. Afterwards, the control device receives the knob indication value of +12 carried by the knob instruction E reported by the knob, determines that the cumulative value corresponding to the current knob instruction E is +32, and the cumulative value difference between the cumulative value +20 corresponding to the most recent calibration point is 12, which is equal to the preset cumulative value 10, and the calibration point can be set (or, the control device can directly set the current point as the calibration point based on the knob indication value carried by the current knob instruction E being greater than or equal to the preset cumulative value).
[0159] In some embodiments, the control device sends the generated control command to the target smart home device through multiple retransmissions at the calibration point.
[0160] In some examples, the control device also sends a control command to the target smart home device by multiple retransmissions at a non-calibrated point. In this case, the number of retransmissions of the control command sent by the control device at the calibrated point is greater than or equal to the number of retransmissions of the control command sent at the non-calibrated point.
[0161] In some examples, the target smart home device supports determining the target value based on the knob indication value. The control device generates a cumulative change value based on the received knob instruction, and carries the cumulative change value in the corresponding control command. After receiving the control command, the target smart home device determines that the control command is a control command corresponding to the start, and can set the current value of the device to the reference value. Subsequently, the target smart home device determines the target value based on the reference value and the received cumulative change value, and adjusts the current value of the device to the target value.
[0162] For example, Fig. 9As shown in the figure, after receiving the control command sent by the subsystem, the gateway forwards the control command to the target smart home device. In the process of forwarding the control command, packet loss is prone to occur. Therefore, the gateway ensures that the subsequent target smart home device can be correctly adjusted to the target value by retransmitting multiple times at the calibration point. In addition, at the non-calibrated point, the gateway sends the control command by a single transmission or a small number of retransmissions to improve the transmission efficiency of the control command.
[0163] For example, the subsystem receives a knob instruction sent by the knob, determines that the incremental value a1 reported by the knob is +1, and the rotation state is start. Then, the control device generates a control command and sets the current point as the calibration point, and can send the control command to the target smart home device through multiple retransmissions. After receiving the control command, the target smart home device determines that the target value is 21 based on the incremental value a1 indicated by the control command and the current value of the device (such as 20), and can adjust the current value of the device to the target value. In addition, the target smart home device sets the current value of the device as the reference value based on the calibration information corresponding to the current start (or based on the first occurrence of multiple receipts of the same control command).
[0164] Afterwards, the subsystem receives the knob command sent by the knob again, and determines that the incremental value reported by the knob is a2=+3, and the rotation state is rotating. Then, the control device records the cumulative incremental value as a1+a2=+4. The control device generates a control command, and sets the current control command sending point as a non-calibrated point based on the difference between the cumulative value corresponding to the current knob command and the cumulative value corresponding to the most recent calibration point being less than the preset cumulative value 10. Afterwards, the subsystem sends a control command to the gateway, and carries the non-calibrated point information and the cumulative incremental value in the control command. After receiving the control command, the gateway determines that the current point is a non-calibrated point, and can directly send the control command to the target smart home device in a non-retransmission manner. If a packet loss exception occurs and the target smart home device fails to receive the control command, the target smart home device will still maintain the previous target value (such as 21) to run.
[0165] Afterwards, the subsystem receives the knob command sent by the knob again, determines that the incremental value reported by the knob is a3=+7, and the rotation state is rotating. If the control device records the cumulative incremental value as a1+a2+a3=+11, a control command is generated, and the cumulative value difference between the cumulative value corresponding to the current knob command and the cumulative value corresponding to the most recent calibration point is equal to the preset cumulative value 10, and the current control command sending point is set as the calibration point. Afterwards, the subsystem sends a control command to the gateway, and carries the calibration point information in the control command. After receiving the control command, the gateway determines that the current point is the calibration point, and can send the control command to the target smart home device by multiple retransmissions. After receiving the control command, the target smart home device determines that the target value is 20+11=31 according to the cumulative incremental value and the reference value indicated by the control command, and can adjust the current value of the device to the target value. In this way, even if a packet loss exception occurs during the process of the knob controlling the target smart home device, the purpose of calibrating the final control result can be achieved by multiple retransmissions, thereby ensuring that the control result meets user needs.
[0166] Afterwards, the subsystem receives the knob instruction sent by the knob again, and determines that the rotation state reported by the knob is stopped. Then, the control device can generate a control command and set the current control command sending point as the calibration point. In addition, the control device resets the incremental value so that the new incremental value can be recorded after a new control process is triggered later. Afterwards, the subsystem sends a control command to the gateway and carries the calibration point information in the control command. After receiving the control command, the gateway determines that the current point is the calibration point, and can send the control command to the target smart home device through multiple retransmissions. After receiving the control command, the target smart home device determines that the indication is hovering, and can reset the reference value, such as setting the current value of the device as the reference value again, so that the reference value can be adjusted after a new control process is triggered later.
[0167] In some examples, depending on the communication method, the gateway may be a variety of types of gateways, such as a Bluetooth gateway, a PLC gateway, etc.
[0168] In some examples, the data processing environment is busy, which may cause packet loss anomalies. Alternatively, the number of unprocessed control commands of the target smart home device exceeds a preset threshold, which may also cause packet loss anomalies. Other abnormal factors may also cause packet loss anomalies, which are not exemplified one by one in the embodiments of the present application.
[0169] It should be understood that in the above process, depending on the different cache times, the gateway may receive a new control command while caching the control command. In addition, the subsystem can also be used to generate a target value. In the scenario where the subsystem generates a target value, the accuracy of the control result can also be improved by multiple retransmissions.
[0170] In this way, by setting calibration points and non-calibration points, the sending speed of control commands can be guaranteed by reducing the number of retransmissions at non-calibration points to improve the overall communication performance; at calibration points, the success rate of control command sending can be increased by increasing the number of retransmissions (such as reaching a success rate of 99.9%).
[0171] Furthermore, at the calibration point, the effect of correcting the control result can be achieved, thereby reducing the impact of packet loss anomalies.
[0172] In addition, combined Figure 6 and Fig.10 The method shown in the figure makes the control device maximize the device adjustment performance of the smart home device, provides a smooth control experience, and improves the accuracy of control command transmission to enhance the control effect.
[0173] In some scenarios, in communication scenarios, the sending of messages will occupy transmission resources, causing the data processing environment to be busy. A busy data processing environment affects the success rate of message transmission. For example, the control device can receive instructions sent by multiple knobs or other operating devices to control smart home devices, or receive responses from smart home devices, which will affect the busyness of the operating data processing environment. Then, the control device can adaptively adjust the packet sending speed of the control command according to the busyness of the data processing environment.
[0174] Fig.10 This is a flow chart of another device control method provided in an embodiment of the present application. It should be noted that this method does not Fig.10 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0175] S1001. Control a device to obtain device information of a smart home device.
[0176] S1002: The control device receives a knob instruction and determines a target smart home device.
[0177] Optionally, for the detailed contents of step S1001 and step S1002, reference may be made to the relevant contents of the above-mentioned step S601 and step S602, which will not be described in detail in the embodiment of the present application.
[0178] S1003, the control device determines whether the current data processing environment is normal. If normal, execute step S1004; if abnormal, execute step S1005.
[0179] S1004. The control device issues a package according to the adjustment performance capability level of the target smart home device.
[0180] S1005. Control the device to adaptively downgrade packet sending.
[0181] In some embodiments, the control device adaptively adjusts the cache time of the control command according to the busyness of the data processing environment.
[0182] In some examples, a data processing environment detection module is configured in the control device. After receiving the knob instruction, the control device determines the busyness of the current data processing environment through the data processing environment detection module. Optionally, the data processing environment detection module determines the busyness of the current data processing environment based on the message time interval and message processing duration received by the control device.
[0183] In some examples, the control device Figure 6 In the method shown, the cache time corresponding to the indicated adjustment performance capability level is set as the basic cache time corresponding to the smart home device. When the data processing environment is normal, the control device sends a control command to the target smart home device with the basic cache time corresponding to the target smart home device. When the data processing environment is busy, the control device adaptively generates an adjusted cache time based on the basic cache time corresponding to the target smart home device, and sends a control command to the target smart home device with the adjusted cache time.
[0184] In some examples, the control device divides the busyness of the data processing environment into five busy levels from low to high. Then, at different busy levels, the corresponding packet buffer time adjustment value is automatically matched, so that the control device determines the buffer time corresponding to the current target smart home device according to the packet buffer time adjustment value and the basic buffer time corresponding to the target smart home device.
[0185] It should be understood that, depending on the actual busyness of the data processing environment, the busy level of the data processing environment may include a greater or lesser number of levels, and the embodiments of the present application are not limited to this.
[0186] For example, Fig.11 As shown, when the data processing environment is normal, the control device matches the packet sending buffer time adjustment value to 0, and the control device can achieve high priority fast packet sending. For example, for a target smart home device with a first-level adjustment performance level, when the data processing environment is normal, the control device generates a control command and immediately sends the control command to the target smart home device.
[0187] For example, Fig.11As shown in the figure, the data processing environment is in a busy state, and the control device matches the packet sending cache time adjustment value of 500ms. The control device can reduce the speed of packet sending and ensure the success rate of packet sending by sacrificing the smooth experience. For example, for a target smart home device with a first-level adjustment performance level, when the data processing environment is in a busy state, the control device generates a control command, and after the cache time is 500ms, it sends the control command to the target smart home device.
[0188] For example, Fig.11 As shown in the figure, the data processing environment is in the middle level of message busyness, and the control device matches the packet sending cache time adjustment value of 1000ms. The control device can achieve the bottom speed packet sending, while ensuring the packet sending success rate and providing the user with an acceptable adjustment effect. For example, for the target smart home device with the first adjustment performance level, when the data processing environment is in the middle level of message busyness, after the control device generates the control command, the cache time is 1000ms, and then the control command is sent to the target smart home device.
[0189] For example, Fig.11 As shown, when the data processing environment is in a serious message busy state, the control device does not generate a control command after receiving a knob instruction, and only generates a control command indicating the final accumulated rotation value after receiving a knob instruction indicating hovering. Afterwards, the control device sends the control command to the target smart home device to instruct the target smart home device to adjust the current value of the device according to the final accumulated rotation value, thereby achieving a controllable device effect.
[0190] For example, Fig.11 As shown, when the data processing environment is in a blocked state, the control device discards the knob instruction after receiving the knob instruction, thereby avoiding blocking and crashing anomalies in the communication environment.
[0191] In this way, the control device adaptively adjusts the cache time for sending control commands according to the data processing environment, and achieves a dynamic balanced control effect through fast packet sending and downgraded packet sending strategies.
[0192] Fig.12 This is a flow chart of another device control method provided in an embodiment of the present application. It should be noted that this method does not Fig.12 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0193] S1201: A first electronic device receives a first instruction sent by a second electronic device.
[0194] In some examples, the second electronic device is a user-operated device such as a knob, and the first electronic device is a device for managing smart devices such as a smart home cloud or subsystem.
[0195] In some embodiments, after the second electronic device generates a first instruction in response to a user operation, the second electronic device sends the first instruction to the first electronic device. Accordingly, the first electronic device may receive the first instruction.
[0196] In some examples, the first instruction includes a knob indication value and a rotation state. The knob indication value is an adjustment value determined by the second electronic device in response to a user operation. The rotation state is used to describe the operation state of the second electronic device, such as starting rotation (or describing it as starting rotation), rotating, and stopping rotation (or describing it as stopping rotation).
[0197] In some examples, after detecting the user's rotation operation, the second electronic device sends the first instruction to the first electronic device according to a preset period. In some examples, in response to the speed of the user's operation on the first electronic device, the knob indication values included in different first instructions are the same or different.
[0198] S1202: The first electronic device determines that the adjustment performance capability level of the first target smart device controlled by the first instruction is the first capability level.
[0199] In some embodiments, the first instruction also includes the identifier of the first target smart device that the second electronic device controls. For example, if the second electronic device is a knob for controlling a smart air conditioner, the first instruction may carry the identifier of the smart air conditioner. Based on this, after receiving the first instruction, the first electronic device can determine the first target smart device that the first instruction instructs to control based on the identifier carried in the first instruction.
[0200] In other examples, the first electronic device is used to manage different smart devices, and the first electronic device stores the correspondence between different second electronic devices and corresponding target smart devices. For example, the first electronic device stores information such as knob 1 for controlling smart air conditioners and knob 2 for controlling smart lights. Based on this, after receiving the first instruction, the first electronic device can determine the first target smart device corresponding to the current second electronic device based on the second electronic device that sent the first instruction, and the first target smart device is the smart device that the first instruction indicates to control.
[0201] In some embodiments, when the smart device accesses the first electronic device, it sends the device information of the smart device to the first electronic device. In some examples, the smart device sends information for accessing the first electronic device to the first electronic device, and the information includes the device information. In other examples, after the smart device accesses the first electronic device, it sends the device information to the first electronic device separately.
[0202] Among them, the device information is information used to indicate the adjustment performance of the smart device. Optionally, the smart device with strong adjustment performance supports determining the target value according to the knob indication value, and the smart device with weak adjustment performance does not support determining the target value according to the knob indication value. Alternatively, the smart device with strong adjustment performance can quickly process the received control command, and the smart device with weak adjustment performance needs more time to process the received control command. Optionally, the computing power of the smart device affects the adjustment performance of the smart device.
[0203] In some examples, the first electronic device receives device information sent by the first target smart device. The first electronic device determines the adjustment performance capability level of the first target smart device based on the device information. Optionally, the device information includes whether the first target smart device supports calculating the target value and / or the length of time the first target smart device processes the first control command.
[0204] In some examples, the first electronic device is a device with a gateway function, and the first electronic device can directly receive the device information sent by the first target smart device. In other examples, the first electronic device can also receive the device information sent by the first target smart device through a third electronic device, and the third electronic device is a gateway device (or router, etc.) or a device with a gateway function.
[0205] In some embodiments, the smart device may be divided into adjustment performance capability levels according to the adjustment performance capability of the smart device. For example, the adjustment performance capability level includes four capability levels. Among them, level 1 is the highest level, with the strongest adjustment performance capability; level 4 is the lowest level, with the weakest adjustment performance capability.
[0206] In some examples, after receiving the device information of the first target smart device, the first electronic device can determine the adjustment performance capability level of the first target smart device according to the device information, and save the correspondence between the first target smart device and its adjustment performance capability level. Then, after receiving the first instruction, the first electronic device can determine the first target smart device that the first instruction instructs to control, and then determine the adjustment performance capability level of the first target smart device, such as the first capability level.
[0207] S1203: After a first waiting time corresponding to the first capability level, the first electronic device sends a first control command corresponding to the first instruction to the first target smart device.
[0208] In some embodiments, smart devices with different adjustment performance capability levels have different capabilities for processing control commands. Therefore, the waiting time corresponding to different adjustment performance capability levels can be pre-matched, and the waiting time is used to indicate how long the first electronic device needs to wait after receiving the instruction sent by the second electronic device before sending the control command corresponding to the instruction to the corresponding target smart device. In this way, by using the waiting time, it is avoided that smart devices with lower adjustment performance capability levels frequently receive control commands, and due to insufficient processing power, control commands are piled up, and then the operation response is delayed, affecting the user experience.
[0209] It should be understood that due to factors such as device processing capabilities and data processing environment, after the first electrical device obtains the waiting time corresponding to the preset adjustment performance capability level, there is a certain error between the actual waiting time for sending the control command and the waiting time corresponding to the obtained adjustment performance capability level.
[0210] In some embodiments, the first electronic device stores different waiting times corresponding to different adjustment performance capability levels. Then, after determining the first capability level of the first target smart device, the first electronic device may determine the first waiting time corresponding to the first capability level. Afterwards, after generating the first control command corresponding to the first instruction, the first electronic device may send the first control command to the first target smart device after the first waiting time.
[0211] In some examples, the knob indication value indicated by the first instruction is a relative adjustment value. The first control command is a relative command or an absolute command. The relative command is used to instruct the first target smart device to generate a target value according to the adjustment value indicated by the relative command, and adjust the current value of the device to the target value. The absolute command is used to indicate the target value and instruct the first target smart device to adjust the current value of the device to the target value.
[0212] In some examples, the first electronic device may determine whether the sent first control command is a relative command or an absolute command according to the device capability of the first target smart device.
[0213] For example, Figure 7 As shown, the first electronic device (such as a control device) determines whether to send the first control command (such as a message or packet) in a high-priority fast packet sending manner, or to send the first control command in a low-priority slow packet sending manner, according to the first capability level of the first target smart device. Optionally, after generating the first control command, the first electronic device may start a timer so as to send the first control command to the first target smart device after a first waiting time.
[0214] In some scenarios, during the control command transmission process, there may be packet loss anomalies, resulting in the smart device executing the control command and failing to meet user needs. Then, the first electronic device can avoid device adjustment anomalies caused by packet loss by retransmitting.
[0215] For example, the first electronic device sends control command 1 to the smart device, instructing the smart device to increase the current value of the device by 1; after receiving control command 1, the smart device adjusts the current value of the device from 0 to +1. Afterwards, the first electronic device sends control command 2 to the smart device, instructing the smart device to increase the current value of the device by 10. However, due to abnormal packet loss, the smart device fails to receive control command 2, and thus cannot adjust the current value of the device, and keeps running at a device value of +1, which obviously cannot meet the user's usage needs.
[0216] In some embodiments, the first electronic device sets a calibration point and instructs multiple retransmissions of the control command at the calibration point position to reduce the packet loss rate and ensure that the smart device can be adjusted according to the control command.
[0217] In some embodiments, after receiving the first instruction sent by the second electronic device, the first electronic device determines that the first instruction meets a preset condition and sets a calibration point according to the information carried in the first instruction.
[0218] In some examples, the preset conditions include any of the following: the first instruction is an instruction to start controlling the first target smart device for the first time, the first instruction is an instruction to stop controlling the first target smart device, and the difference between the cumulative value corresponding to the first instruction and the cumulative value corresponding to the most recent calibration point is greater than or equal to a preset value.
[0219] In this way, the first electronic device sets a calibration point when it starts to rotate, so as to ensure that the smart device can receive the control command corresponding to the start of the rotation, so as to record the reference value and ensure the accuracy of the subsequent adjustment process. The first electronic device sets a calibration point when it stops rotating, so as to ensure that the smart device can receive the control command corresponding to the stop rotation, so as to ensure that the final device adjustment effect meets the user's needs. During the rotation process, the first electronic device can set a calibration point when the cumulative value is large, so as to ensure that the smart device can receive the corresponding cumulative value when the adjustment value changes greatly, so as to avoid abnormal adjustments that are significantly different from the user's requirements or abnormal times that are long, affecting the user's experience.
[0220] In some examples, after setting the calibration point, the first electronic device marks the accumulated value of the calibration point.
[0221] In some examples, the first electronic device marks the calibration points and the non-calibrated points with different values. For example, the first electronic device marks the cumulative value of the calibration points as 1 and the cumulative value of the non-calibrated points as 0; or, the first electronic device marks the cumulative value of the calibration points as 0 and the cumulative value of the non-calibrated points as 1. For another example, the first electronic device marks the cumulative value of the calibration points as 1 or 0, but does not mark the non-calibrated points. In this way, the first electronic device (or gateway) can determine whether it is necessary to retransmit the corresponding control command, which carries the cumulative value, based on the mark value.
[0222] In some examples, when the first instruction meets the preset condition, after the first waiting time, the first electronic device sends the first control command to the first target smart device based on the first retransmission number. When the first instruction does not meet the preset condition, after the first waiting time, the first electronic device sends the first control command to the first target smart device based on the second retransmission number. The first retransmission number is greater than the second retransmission number, and the second retransmission number is an integer greater than or equal to 0.
[0223] In some other examples, the third electronic device is a device with a gateway function or a gateway device, and the first electronic device implements retransmission through the third electronic device. For example, the first electronic device sends a first control command to the third electronic device, and the first control command carries the first calibration information. Then, based on the first number of retransmissions, the third electronic device sends the first control command to the first target smart device that the first control command indicates to control. The first electronic device sends a fifth control command to the third electronic device, and the fifth control command does not carry the first calibration information or carries the second calibration information. Then, based on the second number of retransmissions, the third electronic device sends the fifth control command to the first target smart device that the fifth control command indicates to control. Wherein, the first number of retransmissions is greater than the second number of retransmissions.
[0224] Optionally, if the control command sent by the first electronic device to the third electronic device carries calibration information, the third electronic device sends the control command to the target smart device indicated by the control command by retransmission, and the control command may or may not carry the calibration information. Alternatively, if the control command sent by the first electronic device does not carry calibration information, the third electronic device does not send the control command to the target smart device indicated by the control command by retransmission. Alternatively, if the control command sent by the first electronic device carries calibration information for indicating whether it is a calibration point, the third electronic device determines whether the control command needs to be retransmitted based on the calibration information carried therein after receiving the control command.
[0225] Optionally, the first control command sent by the first electronic device or the third electronic device to the first target smart device does not carry the calibration information. Alternatively, the first control command sent by the first electronic device or the third electronic device to the first target smart device carries the calibration information, and after receiving the first control command, the first target smart device does not process the calibration information carried therein.
[0226] For example, Fig. 9 As shown, the subsystem (such as the first electronic device) determines whether to set the calibration point according to the incremental value reported by the received knob (such as the second electronic device). After setting the calibration point, the calibration information is sent to the gateway (such as the third electronic device). In this way, the gateway can determine to retransmit the control command to the target smart home device (such as the first target smart device) multiple times according to the calibration information.
[0227] In some embodiments, after receiving the first control command and executing the corresponding operation, the first target smart device does not need to send the execution result to the first electronic device. Then, the first electronic device will not wait for the feedback of the first target smart device. For example, the first electronic device or the third electronic device sends the first control command to the first target smart device via Bluetooth broadcast. Then, the first target smart device does not need to feedback the execution result of the first control command.
[0228] Exemplarily, after the first waiting time, the first electronic device sends the first control command to the first target smart device based on the first retransmission number, including: after the first waiting time, the first electronic device sends the first control command with the first retransmission number to the first target smart device. That is, the first electronic device does not need to pay attention to the execution result of the first control command by the first target smart device, but only needs to complete the retransmission of the first control command according to the preset retransmission number.
[0229] It should be understood that the first electronic device may also send the first control command to the third electronic device, and the third electronic device sends the first control command with the first retransmission number.
[0230] In some embodiments, after receiving the first control command and performing the corresponding operation, the first target smart device sends the execution result to the first electronic device. Then, the first electronic device will wait for the execution result fed back by the first target smart device, and determine whether it is necessary to continue to retransmit the first control command based on the execution result. For example, the first electronic device or the third electronic device sends the first control command to the first target smart device through PLC. Then the first target smart device needs to feedback the execution result of the first control command. For example, the first electronic device determines that the first control command has been successfully executed based on the execution result fed back by the first target smart device, then the first electronic device can stop retransmitting the first control command. For another example, the first electronic device determines that the execution of the first control command has failed based on the execution result fed back by the first target smart device, then the first electronic device can continue to retransmit the first control command until feedback of successful execution is received or the first number of retransmissions is completed.
[0231] Exemplarily, after a first waiting time, the first electronic device sends a first control command to a first target smart device based on a first number of retransmissions, including: after the first waiting time, the first electronic device determines, based on the first number of retransmissions, a maximum number of times the first control command is sent to the first target smart device, and the maximum number is the first number of retransmissions.
[0232] It should be understood that the first electronic device may also send the first control command to the third electronic device, and the third electronic device sends the first control command with a maximum of the first retransmission times.
[0233] In some embodiments, the first electronic device receives a third instruction sent by the second electronic device. The first electronic device determines that the third instruction is used to control the first target smart device. Then, the first electronic device determines the second cumulative value corresponding to the third instruction based on the adjustment value indicated by the third instruction and the first cumulative value corresponding to the fourth instruction for controlling the first target smart device received last time. After the first waiting time, the first electronic device sends a third control command to the first target smart device, and the third control command carries the second cumulative value.
[0234] For example, Fig. 9 As shown, the subsystem (such as the first electronic device) receives the third instruction reported by the knob (such as the second electronic device), and the third instruction carries the incremental value a3. The subsystem can obtain the cumulative incremental value a1+a2+a3 (i.e., the second cumulative value) corresponding to the third instruction reported this time based on the incremental value a3 and the cumulative incremental value a1+a2 (i.e., the first cumulative value) corresponding to the incremental value a2 carried by the fourth instruction reported last time. Then, the subsystem can send a third control command to the target smart home device (such as the first target smart device), and the third control command carries the incremental value a1+a2+a3.
[0235] In some embodiments, the smart device receives a first control command sent by the first electronic device, the first control command being used to instruct the start of control. The smart device responds to the first control command and saves the current value of the device as a reference value. The smart device receives a fifth control instruction sent by the first electronic device, determines a target value based on the accumulated value and the reference value indicated by the fifth control instruction, and adjusts the current value of the device to the target value.
[0236] For example, Fig. 9 As shown, the subsystem (such as the first electronic device) receives an instruction reported by a knob (such as the second electronic device), the knob state of the instruction is to start, and the start value carried is a1. Then, the first electronic device sends a control command corresponding to the instruction to the target smart home device. After receiving the control command, the target smart home can determine that the control command indicates to start the control. The target smart home can obtain the current value of the device and set the current value of the device to the reference value. After that, the subsystem determines the cumulative incremental value based on the incremental value reported by the knob, and sends the cumulative incremental value to the target smart home device. The target smart home device can determine the target value based on the reference value and the cumulative incremental value, and adjust the current value of the device to the target value. In this way, in the subsequent adjustment process of the target smart home device, even if a packet loss exception occurs, through the above-mentioned retransmission method, the target smart home device can at least receive the cumulative incremental value sent by the subsystem (or gateway) through the retransmission method. In this way, the target smart home device can also adjust the device to the correct incremental value based on the baseline value and the subsequently received accumulated incremental value, and correct the abnormality in time, without the problem of the device being at the abnormal target value all the time, thereby improving the user experience.
[0237] In some scenarios, in communication scenarios, the sending of messages will occupy transmission resources, causing the data processing environment to be busy. The busy data processing environment affects the success rate of message transmission. Therefore, the first electronic device can also monitor the data processing environment and adjust the waiting time for sending the first control command according to the data processing environment.
[0238] In some examples, after receiving the first instruction sent by the second electronic device, the first electronic device monitors the data processing environment. When the adjustment performance capability level of the first target smart device is the first capability level, when the data processing environment belongs to the first data processing environment level, after the first waiting time, the first electronic device sends a first control command to the first target smart device. When the adjustment performance capability level of the first target smart device is the first capability level, when the data processing environment belongs to the second data processing environment level, after the third waiting time, the first electronic device sends the first control command to the first target smart device. The busyness indicated by the second data processing environment level is greater than the busyness indicated by the first data processing environment level, and the third waiting time is a waiting time determined according to the first waiting time and greater than the first waiting time.
[0239] In this way, the first electronic device adaptively adjusts the waiting time according to the busyness of the data processing environment, thereby improving the success rate of packet sending and avoiding blocking and crashing anomalies in the communication environment.
[0240] In some examples, the first electronic device may also use different control command packet sending methods according to the data processing environment level. Fig.11 As shown, the first electronic device divides the data processing environment into five levels, and processes control commands in different ways at different data processing environment levels.
[0241] For example, Fig.11 As shown, the first electronic device receives the instruction sent by the second electronic device and determines that the current data processing environment is normal traffic. Then, the first electronic device can directly control the target smart device according to the instruction to adjust the performance capability level corresponding to the waiting time, and after the waiting time, send the control command corresponding to the instruction to the target smart device.
[0242] For example, Fig.11 As shown, the first electronic device receives the instruction sent by the second electronic device, and determines that the current data processing environment is busy with messages. Then, the first electronic device determines that it is necessary to reduce the speed of packet sending. Then, the first electronic device can obtain the waiting time corresponding to the adjustment performance capability level of the target smart device controlled by the instruction, and increase the waiting time to obtain a new waiting time. For example, if the waiting time corresponding to the adjustment performance capability level of the target smart device is 500ms, the new waiting time after the increase is 1000ms. Afterwards, after the new waiting time, the first electronic device sends a control command corresponding to the instruction to the target smart device.
[0243] For another example, the first electronic device receives a fifth instruction sent by the second electronic device, and the fifth instruction is used to instruct the control of the first target smart device. The first electronic device determines that the data processing environment is in a severely busy state. Then, when the fifth instruction is an instruction to stop controlling the first target smart device, the first electronic device sends a fourth control command corresponding to the fifth instruction to the first target smart device. For example, Fig.11 As shown, when the data processing environment is extremely busy, the first electronic device sends a control command corresponding to the instruction to the target smart device only when receiving an instruction that the knob state is stopped.
[0244] For another example, the first electronic device receives a sixth instruction sent by the second electronic device, the sixth instruction being used to instruct the control of the first target smart device. The first electronic device determines that the data processing environment is in a blocked state. The first electronic device discards the sixth instruction. Fig.11 As shown, when the data processing environment is blocked, the first electronic device directly discards the received instruction, thereby avoiding communication collapse caused by sending a control command corresponding to the instruction.
[0245] S1204: The first electronic device receives a second instruction sent by the second electronic device.
[0246] In some examples, the first instruction and the second instruction received by the first electronic device may be instructions sent by the same second electronic device, or may be instructions sent by different second electronic devices.
[0247] For example, the second electronic device is a knob, and one knob can be used to control one or more smart devices.
[0248] S1205: The first electronic device determines that the adjustment performance capability level of the second target smart device controlled by the second instruction is the second capability level.
[0249] S1206: After a second waiting time corresponding to the second capability level, the first electronic device sends a second control command corresponding to the second instruction to the second target smart device.
[0250] Optionally, for the detailed contents of step S1204 to step S1206, reference may be made to the relevant contents of the above-mentioned step S1201 to step S1203, which will not be described in detail in the embodiment of the present application.
[0251] The adjustment performance capability level of the second target smart device is different from that of the first target smart device. The first electronic device can match different waiting times for the first target smart device and the second target smart device according to different adjustment performance capability levels.
[0252] In this way, the first electronic device can control smart devices with different adjustment performances, provide graded experience adjustment effects, and enhance the user experience.
[0253] Optionally, the first electronic device can also execute the steps and functions performed by the control device in the above embodiments, the second electronic device can also execute the steps and functions performed by the knob in the above embodiments, the third electronic device can also execute the steps and functions performed by the gateway in the above embodiments, and the smart device can also execute the steps and functions performed by the smart home device in the above embodiments, thereby realizing the device control method provided in the above embodiments.
[0254] In this way, the first electronic device adaptively adjusts the waiting time and number of times of sending control commands according to the adjustment performance capability of the smart device, the accumulated value corresponding to the instructions, and the data processing environment, so as to achieve a dynamically balanced control effect and improve the user's usage effect.
[0255] Combination of the above Figure 6-Figure 12 The device control method provided in the embodiment of the present application is described in detail. Fig.12 The electronic device provided by the embodiments of the present application is described in detail.
[0256] In one possible design, Fig.13 This is a schematic diagram of the structure of a first electronic device provided in an embodiment of the present application. Fig.13 As shown, the first electronic device 1300 may include: a transceiver unit 1301 and a processing unit 1302. The first electronic device 1300 may be used to implement the functions of the first electronic device (eg, a control device) involved in the above method embodiment.
[0257] Optionally, the transceiver unit 1301 is used to support the first electronic device 1300 to execute Figure 6 S601, S602, S604 and S605 in; and / or, for supporting the first electronic device 1300 to execute Figure 8 S801, S802, S804 and S805 in; and / or, for supporting the first electronic device 1300 to execute Fig.10 S1001, S1002, S1004 and S1005 in; and / or, for supporting the first electronic device 1300 to execute Fig.12 S1201, S1203, S1204 and S1206.
[0258] Optionally, the processing unit 1302 is used to support the first electronic device 1300 to execute Figure 6 S603 in; and / or, for supporting the first electronic device 1300 to execute Figure 8 S803 in; and / or, for supporting the first electronic device 1300 to execute Fig.10S1003 in; and / or, for supporting the first electronic device 1300 to execute Fig.12 S1202 and S1205 in.
[0259] Among them, the transceiver unit may include a receiving unit and a sending unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operations and / or functions of each unit in the first electronic device 1300 are respectively to implement the corresponding process of the device control method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, they will not be repeated here.
[0260] Optionally, Fig.13 The first electronic device 1300 shown may also include a storage unit ( Fig.13 (not shown), the storage unit stores a program or instruction. When the transceiver unit 1301 and the processing unit 1302 execute the program or instruction, Fig.13 The first electronic device 1300 shown can execute the device control method described in the above method embodiment.
[0261] Fig.13 The technical effects of the first electronic device 1300 shown can refer to the technical effects of the device control method described in the above method embodiment, which will not be repeated here.
[0262] In addition to being in the form of the first electronic device 1300, the technical solution provided in the present application may also be a functional unit or chip in the first electronic device, or a device used in conjunction with the first electronic device.
[0263] In one possible design, Fig.14 This is a schematic diagram of the structure of a third electronic device provided in an embodiment of the present application. Fig.14 As shown, the third electronic device 1400 may include: a transceiver unit 1401 and a processing unit 1402. The third electronic device 1400 may be used to implement the functions of the third electronic device (such as a gateway) involved in the above method embodiments.
[0264] Optionally, the transceiver unit 1401 is used to support the third electronic device 1400 to execute Figure 6 S601, S602, S604 and S605 in; and / or, for supporting the third electronic device 1400 to execute Figure 8 S801, S802, S804 and S805 in; and / or, for supporting the third electronic device 1400 to execute Fig.10 S1001, S1002, S1004 and S1005 in; and / or, for supporting the third electronic device 1400 to execute Fig.12S1201, S1203, S1204 and S1206.
[0265] Optionally, the processing unit 1402 is used to support the third electronic device 1400 to determine whether it is necessary to retransmit the control command to the smart device indicated by the control command according to the received control command. For example, when the control command carries the first calibration information, the control command is sent to the control device based on the first retransmission number. When the control command does not carry the first calibration information or carries the second calibration information, the control command is sent to the control device based on the second retransmission number. The first retransmission number is greater than the second retransmission number.
[0266] Among them, the transceiver unit may include a receiving unit and a sending unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operations and / or functions of each unit in the third electronic device 1400 are respectively to implement the corresponding process of the device control method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, they will not be repeated here.
[0267] Optionally, Fig.14 The third electronic device 1400 shown may also include a storage unit ( Fig.14 (not shown), the storage unit stores a program or instruction. When the transceiver unit 1401 and the processing unit 1402 execute the program or instruction, Fig.14 The third electronic device 1400 shown can execute the device control method described in the above method embodiment.
[0268] Fig.14 The technical effects of the third electronic device 1400 shown can refer to the technical effects of the device control method described in the above method embodiment, which will not be repeated here.
[0269] In addition to being in the form of the third electronic device 1400, the technical solution provided by the present application may also be a functional unit or chip in the third electronic device, or a device used in conjunction with the third electronic device.
[0270] An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.
[0271] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0272] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
[0273] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0274] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0275] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run on a computer, the computer executes the above-mentioned related steps to implement the device control method in the above-mentioned embodiment.
[0276] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the device control method in the above-mentioned embodiment.
[0277] In addition, an embodiment of the present application further provides a device. The device may be a component or a module, and the device may include one or more processors and a memory connected to each other. The memory is used to store a computer program. When the computer program is executed by one or more processors, the device performs the device control method in each of the above method embodiments.
[0278] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0279] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in hardware or by executing software instructions by a processor. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).
[0280] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0281] In the several embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of modules or units, which can be electrical, mechanical or other forms.
[0282] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0283] Computer-readable storage media include, but are not limited to, any of the following: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media that can store program codes.
[0284] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A device control method, characterized in that: Applied to a first electronic device, the method includes: receiving a first instruction sent by a second electronic device; Determine that the adjustment performance capability level of the first target smart device controlled by the first instruction is a first capability level; After a first waiting time corresponding to the first capability level, sending a first control command corresponding to the first instruction to the first target smart device; receiving a second instruction sent by the second electronic device; Determine that the adjustment performance capability level of the second target smart device controlled by the second instruction is a second capability level; After a second waiting time corresponding to the second capability level, a second control command corresponding to the second instruction is sent to the second target smart device; wherein the first capability level is higher than the second capability level, and the first waiting time is less than the second waiting time.
2. The method according to claim 1, characterized in that After receiving the first instruction sent by the second electronic device, the method further includes: It is determined that the first instruction meets a preset condition, and a calibration point is set according to information carried in the first instruction.
3. The method according to claim 2, characterized in that The sending a first control command corresponding to the first instruction to the first target smart device after a first waiting time corresponding to the first capability level includes: When the first instruction satisfies the preset condition, after the first waiting time, sending the first control command to the first target smart device based on a first number of retransmissions; If the first instruction does not meet the preset condition, after the first waiting time, sending the first control command to the first target smart device based on a second number of retransmissions; The first retransmission number is greater than the second retransmission number, and the second retransmission number is an integer greater than or equal to 0.
4. The method according to claim 3, characterized in that The sending the first control command to the first target smart device based on a first retransmission number after the first waiting time includes: After the first waiting time, the first control command with the first number of retransmissions is sent to the first target smart device.
5. The method according to claim 3, characterized in that: The sending the first control command to the first target smart device based on a first retransmission number after the first waiting time includes: After the first waiting time, based on the first retransmission number, a maximum number of times the first control command is sent to the first target smart device is determined, and the maximum number is the first retransmission number.
6. The method according to any one of claims 2 to 4, characterized in that: The preset conditions include any one of the following: the first instruction is an instruction for starting control of the first target smart device for the first time, the first instruction is an instruction for stopping control of the first target smart device, and the difference between the cumulative value corresponding to the first instruction and the cumulative value corresponding to the most recent calibration point is greater than or equal to a preset value.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: receiving a third instruction sent by the second electronic device; Determining that the third instruction is used to control the first target smart device; determining a second accumulated value corresponding to the third instruction according to the adjustment value indicated by the third instruction and a first accumulated value corresponding to the fourth instruction received last time for controlling the first target smart device; After the first waiting time, a third control command is sent to the first target smart device, wherein the third control command carries the second accumulated value.
8. The method according to any one of claims 1 to 7, characterized in that: After receiving the first instruction sent by the second electronic device, the method further includes: Monitor the data processing environment; After a first waiting time corresponding to the first capability level, sending a first control command corresponding to the first instruction to the first target smart device includes: When the adjustment performance capability level of the first target smart device is the first capability level, and when the data processing environment belongs to the first data processing environment level, after the first waiting time, sending the first control command to the first target smart device; When the adjustment performance capability level of the first target smart device is the first capability level, and when the data processing environment belongs to the second data processing environment level, after a third waiting time, sending the first control command to the first target smart device; The busyness indicated by the second data processing environment level is greater than the busyness indicated by the first data processing environment level, and the third waiting time is a waiting time determined according to the first waiting time and is greater than the first waiting time.
9. The method according to claim 8, characterized in that The method further comprises: receiving a fifth instruction sent by the second electronic device, wherein the fifth instruction is used to instruct to control the first target smart device; Determining that the data processing environment is in a severely busy state; When the fifth instruction is an instruction to stop controlling the first target smart device, a fourth control command corresponding to the fifth instruction is sent to the first target smart device.
10. The method according to claim 8 or 9, characterized in that: The method further comprises: receiving a sixth instruction sent by the second electronic device, wherein the sixth instruction is used to instruct to control the first target smart device; Determining that the data processing environment is in a blocked state; The sixth instruction is discarded.
11. The method according to any one of claims 1 to 10, characterized in that: Before receiving the first instruction sent by the second electronic device, the method further includes: Receiving device information sent by the first target smart device; Determine the adjustment performance capability level of the first target smart device according to the device information.
12. The method according to any one of claims 1 to 11, characterized in that: The first control command is a relative command or an absolute command; wherein the relative command is used to instruct the first target smart device to generate a target value according to the adjustment value indicated by the relative command, and adjust the current value of the device to the target value; the absolute command is used to indicate the target value, and instruct the first target smart device to adjust the current value of the device to the target value.
13. A device control method, characterized in that: Applied to a third electronic device, the method includes: Receiving a first control command sent by a first electronic device, wherein the first control command carries first calibration information for determining a number of retransmissions; Based on a first retransmission number, sending the first control command to a first target smart device indicated to be controlled by the first control command; receiving a fifth control command sent by the first electronic device, where the fifth control command does not carry the first calibration information or carries second calibration information used to determine the number of retransmissions; Based on the second retransmission number, sending the fifth control command to the first target smart device that is controlled by the fifth control command; The first retransmission number is greater than the second retransmission number.
14. The method according to claim 13, characterized in that The method further comprises: Receiving device information sent by the first target smart device; The device information is forwarded to the first electronic device.
15. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor reads the computer instructions from the memory, the electronic device executes the method as described in any one of claims 1 to 12; or when the processor reads the computer instructions from the memory, the electronic device executes the method as described in claim 13 or 14.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 12; or, the electronic device executes the method according to claim 13 or 14.
17. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 12; or the computer is enabled to execute the method according to claim 13 or 14.
Citation Information
Cited By
Device control method and electronic device
EP4697107A1
Device control method and electronic device
WO2025086663A1