A device control method, an apparatus, a non-transitory storage medium, and an electronic device
By acquiring and comparing the operating status data of the devices, the device status is adjusted to control multiple devices to complete tasks synchronously in a short period of time, which solves the problem that cooking devices cannot be accurately synchronized in the existing technology and enables the simultaneous completion of tasks by multiple devices.
Patent Information
- Application Number
- CN202111284182.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-01
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2041-11-01
AI Technical Summary
Existing technologies struggle to control multiple devices to complete tasks simultaneously within a short time difference based on their operating status, especially when cooking equipment experiences time variations, making precise synchronization difficult.
By acquiring the operating status data of the second device that is connected to the first device, reading its remaining time, and adjusting the status of the first device according to the maximum remaining time, the difference between its end time and that of the target device is less than a preset duration, including adjusting the time or pausing the task to achieve synchronization.
It enables multiple devices to complete tasks simultaneously in a short period of time, solving the problem of controlling the operating status of the devices and ensuring that cooking tasks are completed at the same time.
Smart Images

Figure CN116068922B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of equipment control, and more specifically, to an equipment control method, apparatus, non-volatile storage medium, and electronic device. Background Technology
[0002] In many scenarios, multiple devices need to complete their respective tasks simultaneously, so that users can obtain the task results at the same time and carry out subsequent work based on the results. In other words, it is necessary to avoid the phenomenon that some tasks have been completed and are waiting for the rest of the tasks.
[0003] For example, when using multiple smart cooking devices in a household, it's necessary to control them to complete cooking tasks as simultaneously as possible. However, the cooking times of multiple smart cooking devices are difficult to control precisely, making simultaneous completion challenging. To address this issue, related technologies use preset delay times for the cooking devices to enable simultaneous cooking. However, these preset delay times are typically in the hour, resulting in insufficient precision and making it impossible to accurately control multiple devices to cook simultaneously. Furthermore, when multiple cooking devices are running simultaneously, if the cooking time of one device changes for some reason, such as a change in the type or quantity of ingredients, the other devices cannot adjust their times accordingly, again preventing simultaneous completion of the cooking task.
[0004] There is currently no effective solution to the problem that it is difficult to control multiple devices to end their tasks within a short time difference based on their operating status in related technologies. Summary of the Invention
[0005] This application provides a device control method, apparatus, non-volatile storage medium, and electronic device to solve the problem in related technologies that it is difficult to control multiple devices to end their tasks within a short time difference based on their operating status.
[0006] According to one aspect of this application, a device control method is provided. The method includes: acquiring operating status data of at least one second device communicatively connected to a first device, obtaining at least one operating status data, and reading the remaining time of a task performed by the corresponding second device from each operating status data, obtaining at least one remaining time; acquiring the maximum remaining time among the at least one remaining time, and determining whether the remaining time of the first device performing the current task is greater than the maximum remaining time; if the remaining time of the first device performing the current task is greater than or equal to the maximum remaining time, controlling the first device to continue performing the current task; if the remaining time of the first device performing the current task is less than the maximum remaining time, controlling the first device to adjust its device state such that the difference between the end time of the first device performing the current task and the end time of a task performed by a target second device is less than a preset duration, wherein the target second device is the second device with the largest remaining time for its performed task. By acquiring the maximum remaining time of the second device while in communication mode, and controlling the operation of the first device based on the comparison result between the remaining time of the first device performing the current task and the maximum remaining time, multiple devices can end their tasks within a short time difference.
[0007] Optionally, if the remaining time for the first device to execute its current task is less than the maximum remaining time, controlling the first device to adjust its state so that the difference between the end time of the first device's current task and the end time of the task executed by the target second device is less than a preset duration includes: adjusting the time for the first device to execute its current task so that the end time of the first device's current task is consistent with the end time of the task executed by the target second device. When the remaining time for the first device to execute its current task is less than the maximum remaining time, while adjusting its own operating state, controlling itself and the second device corresponding to the maximum remaining time to simultaneously terminate their tasks.
[0008] Optionally, if the remaining time for the first device to execute the current task is less than the maximum remaining time, controlling the first device to adjust its state so that the difference between the end time of the first device's current task and the end time of the target second device's task is less than a preset duration includes: controlling the first device to stop executing the current task and execute the current task after a target interval, wherein the target interval is determined by the maximum remaining time, the remaining time for the first device to execute the current task, and the preset duration; or, controlling the first device to extend the execution time of the current task so that the difference between the remaining time for executing the current task and the maximum remaining time is less than the preset duration. The first device can adjust its remaining time to the maximum remaining time in two ways, so that the first device can end its task with the target second device within a shorter time difference after the maximum remaining time has elapsed.
[0009] Optionally, before acquiring the operating status data of at least one second device communicatively connected to the first device, obtaining at least one operating status data, and reading the remaining time of the corresponding task executed by the second device from each operating status data to obtain at least one remaining time, the method further includes: receiving broadcast data sent by at least one device to be confirmed, and determining whether the device to be confirmed is a second device corresponding to the first device based on the broadcast data; if the device to be confirmed is a second device corresponding to the first device, performing the steps of acquiring the operating status data of at least one second device communicatively connected to the first device, and reading the remaining time of the corresponding task executed by the second device from each operating status data to obtain at least one remaining time. Determining whether the device sending the broadcast data is a second device corresponding to the first device through the broadcast data, and acquiring the operating status data of the second device if it is confirmed to be a second device corresponding to the first device, avoids acquiring operating status data sent by unrelated devices, which could affect the execution of the current task of the first device.
[0010] Optionally, receiving broadcast data sent by at least one device to be confirmed, and determining whether the device to be confirmed is the second device corresponding to the first device based on the broadcast data, includes: obtaining ID information from the broadcast data, determining whether the ID information is in a preset ID information list, wherein the broadcast data includes broadcast content and ID information, the broadcast content includes the operating status data of the device to be confirmed, and the preset ID information list is stored in the first device; obtaining the signal strength of the broadcast data, calculating the distance between the first device and the device to be confirmed based on the signal strength of the broadcast data, and determining whether the distance is less than a preset distance; if the ID information is in the preset ID information list and the distance is less than the preset distance, then the device to be confirmed is determined to be the second device corresponding to the first device. By determining that the device to be confirmed is the second device corresponding to the first device when both the ID information of the device to be confirmed and the distance between the device to be confirmed and the first device meet the requirements, the accuracy of determining whether a device is the second device is improved.
[0011] Optionally, if the device to be confirmed is a second device corresponding to the first device, before executing the steps of obtaining the operating status data of at least one second device that is communicatively connected to the first device, obtaining at least one operating status data, and reading the remaining time of the task executed by the corresponding second device from each operating status data to obtain at least one remaining time, the method further includes: establishing a communication connection between the first device and the second device, and parsing the broadcast data sent by the second device. By establishing a communication connection between the first device and the second device, the first device and the second device can transmit device operating status data.
[0012] Optionally, the broadcast data is encrypted data. Parsing the broadcast data sent by the second device includes: decrypting the broadcast content in the broadcast data and obtaining the running status data in the decrypted broadcast content.
[0013] Optionally, both the first device and at least one second device are cooking devices. This further specifies that both the first device and the second device are cooking devices.
[0014] According to another aspect of this application, a device control apparatus is provided. The apparatus includes: a first acquisition unit, configured to acquire operating status data of at least one second device communicatively connected to a first device, obtaining at least one operating status data, and reading the remaining time of a task performed by the corresponding second device from each operating status data, obtaining at least one remaining time; a first judgment unit, configured to acquire the maximum remaining time among the at least one remaining time, and determine whether the remaining time of the first device performing the current task is greater than the maximum remaining time; a first control unit, configured to control the first device to continue performing the current task if the remaining time of the first device performing the current task is greater than or equal to the maximum remaining time; and a second control unit, configured to control the first device to adjust its device state if the remaining time of the first device performing the current task is less than the maximum remaining time, such that the difference between the end time of the first device performing the current task and the end time of a task performed by a target second device is less than a preset duration, wherein the target second device is the second device with the largest remaining time for its performed task.
[0015] According to another aspect of the present invention, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored program, wherein the program, when running, controls the device where the non-volatile storage medium is located to execute a device control method.
[0016] According to another aspect of the present invention, an electronic device is also provided, comprising a processor and a memory; the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions execute a device control method when executed.
[0017] This application employs the following steps: acquiring operational status data of at least one second device communicatively connected to a first device, obtaining at least one operational status data, and reading the remaining time of the corresponding task executed by the second device from each operational status data, obtaining at least one remaining time; obtaining the maximum remaining time from the at least one remaining time, and determining whether the remaining time of the first device executing the current task is greater than the maximum remaining time; if the remaining time of the first device executing the current task is greater than or equal to the maximum remaining time, controlling the first device to continue executing the current task; if the remaining time of the first device executing the current task is less than the maximum remaining time, controlling the first device to adjust its device state so that the difference between the end time of the first device executing the current task and the end time of the task executed by the target second device is less than a preset duration, wherein the target second device is the second device with the largest remaining time for the executed task. This solves the problem in related technologies where it is difficult to control multiple devices to end their tasks within a short time difference based on their operational status. By acquiring the maximum remaining time of the second device while the first device is in communication status, and controlling the operation of the first device based on the comparison result between the remaining time of the first device executing the current task and the maximum remaining time, the effect of controlling multiple devices to end their tasks within a short time difference is achieved. Attached Figure Description
[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0019] Figure 1 This is a flowchart of a device control method provided according to an embodiment of this application;
[0020] Figure 2 This is a schematic diagram of communication between an optional first device and a device to be confirmed, according to an embodiment of this application.
[0021] Figure 3 This is a schematic diagram of a device control apparatus provided according to an embodiment of this application. Detailed Implementation
[0022] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] According to an embodiment of this application, a device control method is provided.
[0026] Figure 1 This is a flowchart of a device control method provided according to an embodiment of this application. For example... Figure 1 As shown, the method includes the following steps:
[0027] Step S102: Obtain the operating status data of at least one second device that is communicatively connected to the first device, obtain at least one operating status data, and read the remaining time of the corresponding task performed by the second device from each operating status data, to obtain at least one remaining time.
[0028] Specifically, both the first device and the second device, which is communicatively connected to the first device, can be devices that are related to the results of the tasks they perform. For example, the results of the tasks performed by the first and second devices are prerequisites for the next task. The remaining time for the task performed by the second device can be obtained, thereby controlling the first and second devices to complete the tasks within a preset time. For example, the first device is the master device, and the task it performs is the first task. The second device is the slave device of the first device, and the task it performs is the second task. The master device's first task is controlled to be completed within 5 minutes before the slave device's second task ends, laying the foundation for the execution of the next task.
[0029] Optionally, in the device control method provided in the embodiments of this application, the first device and at least one second device are both cooking devices.
[0030] For example, the cooking equipment can be a rice cooker, oven, or frying machine. Any one of the cooking equipment can serve as a first device while also serving as a second device for at least one other cooking equipment. Each device can use a BLE (Bluetooth Low Energy) chip as the MCU (Microcontroller Unit) of the wireless microcontroller. Through this MCU, not only can cooking control be performed, but also online communication and cooking electrical control can be performed. In addition, the devices can communicate with each other through Bluetooth, Wi-Fi, or other means. This embodiment does not limit the method of online communication.
[0031] Once the first device successfully connects and communicates with at least one second device, it can obtain the operating status data of each second device. The operating status data can be the status data of the second device before it executes the task. For example, if the second device is an oven, the oven's status data can be the set temperature for executing the current grilling task, the degree of rawness or cookedness of the food, the end time of the current grilling task, and other operating status data.
[0032] It should be noted that the remaining time of the currently executing cooking task is read from the operating status data of the second device. The remaining time is the time required from the current moment until the current cooking task is completed. For example, if the rice cooker needs 50 minutes to complete the rice cooking task, and the oven connects with the rice cooker after 20 minutes of the rice cooking task, the oven can obtain the remaining time of the rice cooker's rice cooking task as 30 minutes.
[0033] Step S104: Obtain the maximum remaining time in at least one remaining time, and determine whether the remaining time for the first device to execute the current task is greater than the maximum remaining time.
[0034] Specifically, after the first device obtains the remaining time of at least one second device, it sorts the remaining times of all second devices to obtain the maximum remaining time. This maximum remaining time is then compared with the remaining time of the first device for executing the current task. It is determined whether the first device can complete the cooking task within a preset time difference with the second device corresponding to the maximum remaining time. For example, if the preset duration is 5 minutes, and the first device has 50 minutes remaining to complete the current task, while the maximum remaining time is 20 minutes, then it is determined that the first device cannot finish the task within the 5-minute time difference with the second device corresponding to the maximum remaining time.
[0035] Step S106: If the remaining time for the first device to execute the current task is greater than or equal to the maximum remaining time, control the first device to continue executing the current task.
[0036] Specifically, if the remaining time for executing the current task is greater than or equal to the maximum remaining time, it means that the first device cannot complete the cooking task before any of the second devices by extending or delaying the time. The first device does not change its operating state and continues to execute the current cooking task until the task is completed.
[0037] For example: The first device is a rice cooker. The rice cooker needs 60 minutes to complete the current rice cooking task. All the second devices that are connected to the first device need a maximum of 50 minutes to complete the current task. At this time, the rice cooker does not change its operating status and continues to perform the rice cooking task according to the preset operating parameters.
[0038] Step S108: If the remaining time for the first device to execute the current task is less than the maximum remaining time, control the first device to adjust its state so that the difference between the end time of the first device to execute the current task and the end time of the task executed by the target second device is less than a preset duration, wherein the target second device is the second device with the largest remaining time for the task being executed.
[0039] Specifically, when at least one second device has a longer remaining time than the first device, the first device can adjust the running state of the currently executing task so that it and the second device corresponding to the maximum remaining time complete the task within a time difference of less than a preset duration.
[0040] The device control method provided in this application embodiment obtains at least one operating status data from at least one second device that is communicatively connected to a first device, and reads the remaining time of the corresponding task executed by the second device from each operating status data to obtain at least one remaining time. It then obtains the maximum remaining time from the at least one remaining time and determines whether the remaining time of the first device executing the current task is greater than the maximum remaining time. If the remaining time of the first device executing the current task is greater than or equal to the maximum remaining time, it controls the first device to continue executing the current task. If the remaining time of the first device executing the current task is less than the maximum remaining time, it controls the first device to adjust its device state so that the difference between the end time of the first device executing the current task and the end time of the task executed by the target second device is less than a preset duration, where the target second device is the second device with the largest remaining time for its executed task. This solves the problem in related technologies where it is difficult to control multiple devices to end their tasks within a short time difference based on their operating status. By obtaining the maximum remaining time of the second device while the first device is in a communication state, and controlling the operation of the first device based on the comparison result between the remaining time of the first device executing the current task and the maximum remaining time, the method achieves the effect of controlling multiple devices to end their tasks within a short time difference.
[0041] To meet the specific requirements of certain application scenarios, optionally, in the device control method provided in this application embodiment, when the remaining time for the first device to execute the current task is less than the maximum remaining time, controlling the first device to adjust its device state so that the difference between the end time of the first device executing the current task and the end time of the task executed by the target second device is less than a preset duration includes: adjusting the time for the first device to execute the current task so that the end time of the first device executing the current task is consistent with the end time of the task executed by the target second device.
[0042] Specifically, in some cooking scenarios, there are high requirements for the completion time of multiple cooking devices, requiring multiple devices to complete the cooking task simultaneously. In this case, the preset duration can be set to 0 minutes to ensure that multiple cooking devices can complete the cooking task at the same time.
[0043] It should be noted that for some cooking tasks, the execution time of the first device may become unadjustable due to reaching a certain completion level. For example, when the completion level of the first device's current task is greater than or equal to a preset completion level indicator (e.g., for steamed fish, the preset completion level indicator is the bottom temperature of the cooking device, such as 50℃), if the bottom temperature of the first device does not reach 50℃, the completion level of the steamed fish task is less than the preset completion level, indicating that the current task completion level is low, and the first device can adjust the progress of the current task. However, if the bottom temperature of the first device reaches or exceeds 50℃, the completion level of the steamed fish task is greater than or equal to the preset completion level, indicating that the current task completion level is high. Interruption would affect the task's performance, so the current cooking task cannot be adjusted in this case. In this situation, the connection with all devices is disconnected, and the current task continues to be completed.
[0044] To ensure that the time difference between the first device and the target second device completing the current cooking task is less than a preset duration, optionally, in the device control method provided in this application embodiment, when the remaining time for the first device to execute the current task is less than the maximum remaining time, controlling the first device to adjust its device state so that the difference between the end time of the first device executing the current task and the end time of the task executed by the target second device is less than the preset duration includes: controlling the first device to stop executing the current task and execute the current task after a target interval time, wherein the target interval time is determined by the maximum remaining time, the remaining time for the first device to execute the current task, and the preset duration; or, controlling the first device to extend the time for executing the current task so that the difference between the remaining time for executing the current task and the maximum remaining time is less than the preset duration.
[0045] Specifically, the interval can be the difference between the time required for the first device to complete the current task and the time required for the target second device to complete the current task. For example, if the first device needs 40 minutes to complete the current soup-making task and the target second device needs 50 minutes to complete the current rice-steaming task, and the preset duration is 5 minutes, then the interval can be 5 minutes.
[0046] It should be noted that there are several ways to enable the first device and the target second device to complete the task together. One method is to first pause the current task being executed by the first device and then resume it after an interval. For example, if the first device needs 40 minutes to complete the current soup-making task and the target second device needs 50 minutes to complete the current rice-steaming task, with a preset duration of 5 minutes, the first device can be paused for 5 minutes and then resumed to make soup, so that the rice-steaming and soup-making tasks are completed within a 5-minute time interval.
[0047] Another approach is to slow down the task currently being performed by the first device, making the time required for the task longer. For example, reducing the preset standard heat for the soup-making task would extend the remaining time for soup-making to 45 minutes, so that the rice-steaming and soup-making tasks would be completed within a 5-minute time interval.
[0048] The first device needs to identify the second device first, and then obtain the corresponding operating status data. Optionally, in the device control method provided in the embodiments of this application, before obtaining the operating status data of at least one second device that is communicatively connected to the first device, obtaining at least one operating status data, and reading the remaining time of the task executed by the corresponding second device from each operating status data to obtain at least one remaining time, the method further includes: receiving broadcast data sent by at least one device to be confirmed, and determining whether the device to be confirmed is a second device corresponding to the first device based on the broadcast data; if the device to be confirmed is a second device corresponding to the first device, performing the steps of obtaining the operating status data of at least one second device that is communicatively connected to the first device, and reading the remaining time of the task executed by the corresponding second device from each operating status data to obtain at least one remaining time.
[0049] Specifically, broadcast data can be communication signals emitted by the device to be confirmed, such as Bluetooth signals, Wi-Fi signals, and other signals that can be used to transmit information. Since interference signals from unrelated devices may occur in practical applications, it is necessary to determine whether the device emitting the signal is the second device that the first device needs to connect to. Only if the device to be confirmed is the second device will the first device obtain the operating status data of the second device through broadcast information, read the remaining time of the corresponding task being executed by the second device from each operating status data point, and determine whether to adjust the execution time of the current task based on the obtained remaining time.
[0050] In one optional embodiment, both the first device and at least one second device include a connection button. Only after activating the connection button will the device send a connection signal, i.e., broadcast data, to communicate and connect with other devices that have also activated their connection buttons. The second device can continuously send broadcast data after triggering the connection button. The first device, after triggering the connection button, can constantly monitor broadcast data sent by nearby devices and determine whether it originated from a second device.
[0051] To enable the first device to accurately determine whether the device to be confirmed is the second device corresponding to itself, optionally, in the device control method provided in this application embodiment, receiving broadcast data sent by at least one device to be confirmed and determining whether the device to be confirmed is the second device corresponding to the first device based on the broadcast data includes: obtaining ID information in the broadcast data, determining whether the ID information is in a preset ID information list, wherein the broadcast data includes broadcast content and ID information, the broadcast content includes operating status data of the device to be confirmed, and the preset ID information list is stored in the first device; obtaining the signal strength of the broadcast data, calculating the distance between the first device and the device to be confirmed based on the signal strength of the broadcast data, and determining whether the distance is less than a preset distance; if the ID information is in the preset ID information list and the distance is less than the preset distance, then determining that the device to be confirmed is the second device corresponding to the first device.
[0052] It should be noted that the first device and all second devices are pre-set with ID information that can identify their identities. The ID information of all devices that have a task association relationship with the first device is stored in a preset ID information list, which is stored in the first device.
[0053] The second device can send broadcast data based on the iBeacon protocol. By equipping the second device with a low-power Bluetooth communication module, it can transmit broadcast data to its surroundings via Bluetooth. The broadcast information sent by the second device includes ID information and broadcast content, with the broadcast content containing the second device's operating status data. After receiving the broadcast data, the first device matches the ID information with ID information stored in a preset ID information list. The matching result is used to determine whether the broadcast data received by the first device was sent by the second device corresponding to the first device.
[0054] It should be noted that, in order to determine whether the broadcast data received by the first device was sent by the corresponding second device of the first device, it is also necessary to determine the distance between the two devices. Specifically, the signal strength of the broadcast data is obtained, the distance between the device to be confirmed that sent the broadcast data and the first device is calculated based on the signal strength, and then the device to be confirmed is determined by comparing the distance with the preset distance. The preset distance can be the maximum distance between the master and the second device that is set in advance.
[0055] If the ID information of the device to be confirmed is successfully matched, and the distance between the device to be confirmed and the first device is less than a preset distance, the device to be confirmed can be identified as the second device corresponding to the first device, and the first device begins to acquire the broadcast content of the second device.
[0056] In one alternative embodiment, such as Figure 2 The diagram shown is a schematic representation of communication between an optional first device and a device to be confirmed, according to an embodiment of this application. Figure 2 As shown, it includes a primary device and three devices to be confirmed.
[0057] On one hand, the first device obtains broadcast data sent by three devices to be confirmed via Bluetooth and attempts to obtain the ID information in the broadcast data. After obtaining the ID information, it matches it with a preset ID information list.
[0058] On the other hand, the first device calculates the distance between itself and the devices to be confirmed by using the RSSI signal strength values of the broadcast data emitted by the three devices to be confirmed. The calculation formula can be:
[0059] d = 10^((abs(RSSI)-A) / (10*n))
[0060] Where d is the distance to be calculated, RSSI is the signal strength of the broadcast data (negative value), A is the signal strength of the broadcast data received from the second device when the first and second devices are 1 meter apart, and n is the environmental attenuation factor.
[0061] Furthermore, the preset distance can be 3 meters. If the ID information is successfully matched and the distance between the device to be confirmed and the first device is less than 3 meters, the device to be confirmed can be identified as the second device corresponding to the first device. In the figure, devices 1 and 2 to be confirmed can be identified as the second devices corresponding to the first device. However, the distance of device 3 to be confirmed is greater than 3 meters, so device 3 to be confirmed is not the second device corresponding to the first device.
[0062] Optionally, in the device control method provided in the embodiments of this application, before the steps of obtaining the operating status data of at least one second device that is communicatively connected to the first device, obtaining at least one operating status data, and reading the remaining time of the task performed by the corresponding second device from each operating status data to obtain at least one remaining time, the method further includes: establishing a communication connection between the first device and the second device, and parsing the broadcast data sent by the second device.
[0063] Specifically, after the first device and the second device connect and communicate, the first device constantly listens for the broadcast data sent by the second device and parses the broadcast data to obtain the operating status data.
[0064] To enhance the security of broadcast content, optionally, in the device control method provided in this application embodiment, the broadcast data is encrypted data, and parsing the broadcast data sent by the second device includes: decrypting the broadcast content in the broadcast data and obtaining the running status data in the decrypted broadcast content.
[0065] Specifically, to prevent broadcast data from being captured and analyzed by tools, the second device can encrypt the broadcast content before transmission, for example, using the AES (Advanced Encryption Standard) encryption algorithm. After the first device receives the broadcast data, it first identifies the second device using its ID information. Once the device is identified as the second device, it performs the corresponding decryption operation on the broadcast content to obtain the decrypted broadcast content and extract the second device's operating status data from the broadcast content.
[0066] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0067] This application also provides a device control apparatus. It should be noted that the device control apparatus of this application can be used to execute the device control method provided in this application. The device control apparatus provided in this application will be described below.
[0068] Figure 3 This is a schematic diagram of a device control apparatus provided according to an embodiment of this application. For example... Figure 3 As shown, the device includes: a first acquisition unit 302, a first judgment unit 304, a first control unit 306, and a second control unit 308.
[0069] The first acquisition unit 302 is used to acquire the operating status data of at least one second device that is communicatively connected to the first device, obtain at least one operating status data, and read the remaining time of the corresponding task performed by the second device from each operating status data to obtain at least one remaining time.
[0070] The first judgment unit 304 is used to obtain the maximum remaining time in at least one remaining time and to determine whether the remaining time for the first device to execute the current task is greater than the maximum remaining time.
[0071] The first control unit 306 is configured to control the first device to continue executing the current task if the remaining time for the first device to execute the current task is greater than or equal to the maximum remaining time.
[0072] The second control unit 308 is used to control the first device to adjust its device state when the remaining time for the first device to execute the current task is less than the maximum remaining time, so that the difference between the end time of the first device to execute the current task and the end time of the task executed by the target second device is less than a preset duration, wherein the target second device is the second device with the largest remaining time for the task to be executed.
[0073] The device control apparatus provided in this application embodiment acquires operating status data of at least one second device communicatively connected to a first device through a first acquisition unit 302, obtaining at least one operating status data, and reads the remaining time of the corresponding task executed by the second device from each operating status data, obtaining at least one remaining time. A first judgment unit 304 obtains the maximum remaining time from the at least one remaining time and determines whether the remaining time of the first device executing the current task is greater than the maximum remaining time. A first control unit 306 controls the first device to continue executing the current task if the remaining time of the first device executing the current task is greater than or equal to the maximum remaining time. A second control unit 308 is used to control the first device to adjust its device state if the remaining time of the first device executing the current task is less than the maximum remaining time, such that the difference between the end time of the first device executing the current task and the end time of the task executed by the target second device is less than a preset duration, wherein the target second device is the second device with the largest remaining time for the task being executed.
[0074] Optionally, in the device control apparatus provided in the embodiments of this application, the second control unit 308 includes: an adjustment module, used to adjust the time when the first device performs the current task, so that the end time of the first device performing the current task is consistent with the end time of the task performed by the target second device.
[0075] Optionally, in the device control apparatus provided in the embodiments of this application, the second control unit 308 includes: a first control submodule, used to control the first device to stop executing the current task and execute the current task after a target interval time, wherein the target interval time is determined by the maximum remaining time, the remaining time for the first device to execute the current task, and a preset duration; and a second control submodule, used to control the first device to extend the time for executing the current task, such that the difference between the remaining time for executing the current task and the maximum remaining time is less than the preset duration.
[0076] Optionally, in the device control apparatus provided in the embodiments of this application, the first acquisition unit 302 includes: a receiving module, configured to receive broadcast data sent by at least one device to be confirmed, and determine whether the device to be confirmed is a second device corresponding to the first device based on the broadcast data; and an execution module, configured to, when the device to be confirmed is a second device corresponding to the first device, execute the steps of acquiring the operating status data of at least one second device that is communicatively connected to the first device, and reading the remaining time of the task performed by the corresponding second device from each operating status data to obtain at least one remaining time.
[0077] Optionally, in the device control apparatus provided in this application embodiment, the receiving module includes: a first acquisition submodule, used to acquire ID information in broadcast data, and determine whether the ID information is in a preset ID information list, wherein the broadcast data includes broadcast content and ID information, the broadcast content includes operating status data of the device to be confirmed, and the preset ID information list is stored in the first device; a second acquisition submodule, used to acquire the signal strength of the broadcast data, calculate the distance between the first device and the device to be confirmed based on the signal strength of the broadcast data, and determine whether the distance is less than a preset distance; and a determination submodule, used to determine that the device to be confirmed is the second device corresponding to the first device if the ID information is in the preset ID information list and the distance is less than the preset distance.
[0078] Optionally, in the device control apparatus provided in the embodiments of this application, the first execution module includes: a module for establishing a communication connection between the first device and the second device, and parsing broadcast data sent by the second device.
[0079] Optionally, in the device control apparatus provided in this application embodiment, the broadcast data is encrypted data, and the establishment submodule includes: a decryption submodule, used to decrypt the broadcast content in the broadcast data and obtain the running status data in the decrypted broadcast content.
[0080] Optionally, in the device control apparatus provided in the embodiments of this application, both the first device and at least one second device are cooking devices.
[0081] The device control unit includes a processor and a memory. The first acquisition unit 302, the first judgment unit 304, the first control unit 306, the second control unit 308, etc. are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.
[0082] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters solves the problem in related technologies of controlling multiple devices to terminate tasks within a short time difference based on their operating status.
[0083] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0084] This application also provides a non-volatile storage medium, which includes a stored program, wherein the program, when running, controls the device where the non-volatile storage medium is located to execute a device control method.
[0085] This application also provides an electronic device comprising a processor and a memory; the memory stores computer-readable instructions, and the processor executes the computer-readable instructions, wherein the computer-readable instructions, when executed, perform a device control method. The electronic device described herein may be a server, PC, PAD, mobile phone, etc.
[0086] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0087] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0089] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0090] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0091] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0092] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0093] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0094] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A device control method, characterized in that, include: Obtain the operating status data of at least one second device that is communicatively connected to the first device, obtain at least one operating status data, and read the remaining time of the corresponding task performed by the second device from each of the operating status data, to obtain at least one remaining time; Obtain the maximum remaining time from the at least one remaining time, and determine whether the remaining time for the first device to execute the current task is greater than the maximum remaining time; If the remaining time for the first device to execute the current task is greater than or equal to the maximum remaining time, the first device is controlled to continue executing the current task; If the remaining time for the first device to execute the current task is less than the maximum remaining time, the first device is controlled to adjust its state so that the difference between the end time of the first device to execute the current task and the end time of the task executed by the target second device is less than a preset duration, wherein the target second device is the second device with the largest remaining time for the task being executed.
2. The method according to claim 1, characterized in that, If the remaining time for the first device to execute the current task is less than the maximum remaining time, the first device is controlled to adjust its state so that the difference between the end time of the first device executing the current task and the end time of the task executed by the target second device is less than a preset duration, including: Adjust the time when the first device executes the current task so that the end time of the first device executing the current task is consistent with the end time of the task executed by the target second device.
3. The method according to claim 1, characterized in that, If the remaining time for the first device to execute the current task is less than the maximum remaining time, the first device is controlled to adjust its state so that the difference between the end time of the first device executing the current task and the end time of the task executed by the target second device is less than a preset duration, including: Control the first device to stop executing the current task, and execute the current task again after a target interval time, wherein the target interval time is determined by the maximum remaining time, the remaining time for the first device to execute the current task, and the preset duration; or, The first device is controlled to extend the execution time of the current task, such that the difference between the remaining time for executing the current task and the maximum remaining time is less than the preset duration.
4. The method according to claim 1, characterized in that, Before obtaining the operating status data of at least one second device communicatively connected to the first device, obtaining at least one operating status data, and reading the remaining time of the corresponding task performed by the second device from each of the operating status data to obtain at least one remaining time, the method further includes: Receive broadcast data sent by at least one device to be confirmed, and determine whether the device to be confirmed is the second device corresponding to the first device based on the broadcast data; If the device to be confirmed is a second device corresponding to the first device, the steps of obtaining the operating status data of at least one second device that is communicatively connected to the first device, and reading the remaining time of the task performed by the corresponding second device from each of the operating status data to obtain at least one remaining time are performed.
5. The method according to claim 4, characterized in that, The step of receiving broadcast data sent by at least one device to be confirmed, and determining whether the device to be confirmed is the second device corresponding to the first device based on the broadcast data, includes: Obtain the ID information from the broadcast data and determine whether the ID information is in a preset ID information list. The broadcast data includes broadcast content and ID information. The broadcast content includes the operating status data of the device to be confirmed. The preset ID information list is stored in the first device. The signal strength of the broadcast data is obtained, the distance between the first device and the device to be confirmed is calculated based on the signal strength of the broadcast data, and it is determined whether the distance is less than a preset distance. If the ID information is in the preset ID information list and the distance is less than the preset distance, then the device to be confirmed is determined to be the second device corresponding to the first device.
6. The method according to claim 5, characterized in that, If the device to be confirmed is a second device corresponding to the first device, before performing the steps of obtaining the operating status data of at least one second device that is communicatively connected to the first device, obtaining at least one operating status data, and reading the remaining time of the task performed by the corresponding second device from each of the operating status data to obtain at least one remaining time, the method further includes: Establish a communication connection between the first device and the second device, and parse the broadcast data sent by the second device.
7. The method according to claim 6, characterized in that, The broadcast data is encrypted data, and parsing the broadcast data sent by the second device includes: The broadcast content in the broadcast data is decrypted, and the running status data in the decrypted broadcast content is obtained.
8. The method according to claim 1, characterized in that, The first device and the at least one second device are both cooking devices.
9. A device control apparatus, characterized in that, include: The first acquisition unit is configured to acquire the operating status data of at least one second device that is communicatively connected to the first device, obtain at least one operating status data, and read the remaining time of the corresponding task performed by the second device from each of the operating status data, thereby obtaining at least one remaining time. The first judgment unit is used to obtain the maximum remaining time in the at least one remaining time, and to determine whether the remaining time for the first device to execute the current task is greater than the maximum remaining time. A first control unit is configured to control the first device to continue executing the current task if the remaining time for the first device to execute the current task is greater than or equal to the maximum remaining time. The second control unit is configured to control the first device to adjust its device state when the remaining time for the first device to execute the current task is less than the maximum remaining time, such that the difference between the end time of the first device to execute the current task and the end time of the task executed by the target second device is less than a preset duration, wherein the target second device is the second device with the largest remaining time for the task being executed.
10. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein the program, when running, controls the device on which the non-volatile storage medium resides to perform the device control method according to any one of claims 1 to 8.
11. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-readable instructions, and the processor being configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform the device control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method for controlling home appliance to restore work, device, server and storage medium
CN109507916A
Interaction control method, device and system for intelligent kitchen, storage medium and equipment
CN111338222A