Device state control method and device, storage medium, and electronic device
By obtaining the WIFI signal strength and energy consumption parameters of IoT devices and identifying and controlling the status of the device, the problem of low energy efficiency ratio of IoT devices is solved, and energy efficiency improvement and battery life extension are achieved.
Patent Information
- Application Number
- CN202411127535.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-16
AI Technical Summary
In the prior art, IoT devices maintain equipment communication and functionality while maintaining equipment communication and functionality, resulting in low energy efficiency ratios and increasing operating costs and energy waste.
By obtaining the WIFI signal strength and energy consumption parameters of the target device, identifying the energy consumption status of the device, and controlling the device status based on the WIFI signal strength and energy consumption status, disabling the high-power module, and switching to using low-power communication modules, optimizing Energy consumption.
It improves the energy efficiency ratio of IoT devices, reduces operating costs, extends the battery life of the device, realizes adaptive control of device status, and balances performance and energy management.
Smart Images

Figure CN118660330B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a method and device for controlling device status, a storage medium, and an electronic device. Background Art
[0002] In related technologies, the low-power operation strategy based on Combo technology is based on the collaborative work of wireless communication technologies such as Wi-Fi and Bluetooth, where Wi-Fi provides high-speed data transmission capabilities, while Bluetooth, especially Bluetooth low-power technology, uses its low energy consumption characteristics to achieve efficient energy management and data exchange between devices. This strategy uses intelligent algorithms to automatically switch or adjust wireless communication modes to adapt to different usage scenarios and energy-saving requirements, thereby reducing the power consumption and operating costs of the overall system while maintaining device performance and user experience.
[0003] In the related technologies, the technical problems solved by the low-power operation strategy based on Combo technology mainly focus on how to optimize energy consumption while maintaining device communication and functionality. In existing homes, the number of smart devices is increasing day by day, and energy consumption is also rising. Improving energy efficiency, reducing unnecessary energy waste, and balancing device performance, user experience, and energy efficiency are all issues that need to be resolved.
[0004] With respect to the above-mentioned problems existing in the related technologies, no efficient and accurate solutions have been found yet. Summary of the invention
[0005] The present invention provides a method and device for controlling device status, a storage medium, and an electronic device to solve technical problems in related technologies.
[0006] According to one embodiment of the present invention, a method for controlling a device state is provided, comprising: obtaining a WIFI signal strength of a target device, and detecting energy consumption parameters of the target device, wherein the target device comprises a Bluetooth communication module and a WIFI communication module; using the energy consumption parameters to identify an energy consumption state of the target device, the energy consumption state being used to characterize an energy consumption rate of the target device; and controlling the device state of the target device according to the WIFI signal strength and the energy consumption state.
[0007] Optionally, using the energy consumption parameters to identify the energy consumption status of the target device includes: using instantaneous power consumption parameters to calculate the power consumption of the target device, using processor usage to calculate the processor power of the target device, and determining the remaining power of the target device, wherein the energy consumption parameters include the instantaneous power consumption parameters and the processor usage; using the power consumption and processor power to calculate the real-time energy consumption of the target device; and identifying the energy consumption status of the target device based on the real-time energy consumption and the remaining power.
[0008] Optionally, identifying the energy consumption status of the target device based on the real-time energy consumption and the remaining power includes: determining whether the remaining power is lower than a preset power; if the remaining power is lower than the preset power, determining that the energy consumption status of the target device is a low-energy mode; if the remaining power is higher than or equal to the preset power, determining whether the real-time energy consumption is greater than a preset threshold; if the real-time energy consumption is greater than the preset threshold, determining that the energy consumption status of the target device is a high-performance mode; if the real-time energy consumption is less than or equal to the preset threshold, determining that the energy consumption status of the target device is an energy-saving mode.
[0009] Optionally, controlling the device state of the target device according to the WIFI signal strength and the energy consumption state includes: determining whether the WIFI signal strength is lower than a preset strength; if the WIFI signal strength is lower than a preset strength and the energy consumption state is a low energy mode, disabling the WIFI communication module of the target device.
[0010] Optionally, after determining whether the WIFI signal strength is lower than a preset strength, the method further includes: if the WIFI signal strength is higher than or equal to the preset strength and the energy consumption state is a high-performance mode, maintaining the current device state of the target device; if the WIFI signal strength is higher than or equal to the preset strength and the energy consumption state is an energy-saving mode, controlling the target device to enter an energy-saving state so that the target device reduces the energy consumption rate.
[0011] Optionally, after disabling the WIFI communication module of the target device, the method further includes: determining whether there is a mobile terminal connected to the target device via Bluetooth; if there is a mobile terminal connected to the target device via Bluetooth, sending a synchronization instruction to the mobile terminal, wherein the synchronization instruction is used to instruct the mobile terminal to collect the first device data of the target device through the Bluetooth communication module; and receiving the first device data uploaded by the mobile terminal.
[0012] Optionally, after determining whether there is a mobile terminal connected to the target device via Bluetooth, the method further includes: if there is no mobile terminal connected to the target device via Bluetooth, determining a set of intra-domain devices adjacent to the target device in the local area network where the target device is located; selecting a collaborative device of the target device from the intra-domain device set; sending a collaborative instruction to the collaborative device, wherein the collaborative instruction is used to instruct the collaborative device to collect second device data of the target device through a Bluetooth communication module; and receiving second device data uploaded by the collaborative device.
[0013] According to another embodiment of the present invention, a device for controlling a device status is provided, comprising: an acquisition module, used to acquire a WIFI signal strength of a target device, and to detect energy consumption parameters of the target device, wherein the target device comprises a Bluetooth communication module and a WIFI communication module; an identification module, used to identify an energy consumption status of the target device using the energy consumption parameters, wherein the energy consumption status is used to characterize the energy consumption speed of the target device; and a control module, used to control the device status of the target device according to the WIFI signal strength and the energy consumption status.
[0014] Optionally, the identification module includes: a first calculation unit, used to calculate the power consumption of the target device using instantaneous power consumption parameters, calculate the processor power of the target device using processor usage, and determine the remaining power of the target device, wherein the energy consumption parameters include the instantaneous power consumption parameters and the processor usage; a second calculation unit, used to calculate the real-time energy consumption of the target device using the power consumption and processor power; and an identification unit, used to identify the energy consumption status of the target device based on the real-time energy consumption and the remaining power.
[0015] Optionally, the identification unit includes: a judgment subunit, used to judge whether the remaining power is lower than a preset power; a processing subunit, used to determine that the energy consumption state of the target device is a low-energy mode if the remaining power is lower than the preset power; if the remaining power is higher than or equal to the preset power, determine whether the real-time energy consumption is greater than a preset threshold; a determination subunit, used to determine that the energy consumption state of the target device is a high-performance mode if the real-time energy consumption is greater than the preset threshold; if the real-time energy consumption is less than or equal to the preset threshold, determine that the energy consumption state of the target device is an energy-saving mode.
[0016] Optionally, the control module includes: a judgment unit, used to judge whether the WIFI signal strength is lower than a preset strength; a first control unit, used to disable the WIFI communication module of the target device if the WIFI signal strength is lower than a preset strength and the energy consumption state is a low energy mode.
[0017] Optionally, the control module also includes: a second control unit, used to maintain the current device state of the target device if the WIFI signal strength is higher than or equal to the preset strength and the energy consumption state is a high-performance mode after the judgment unit determines whether the WIFI signal strength is lower than a preset strength; a third control unit, used to control the target device to enter an energy-saving state if the WIFI signal strength is higher than or equal to the preset strength and the energy consumption state is an energy-saving mode, so as to reduce the energy consumption rate of the target device.
[0018] Optionally, the device also includes: a judgment module, used to judge whether there is a mobile terminal connected to the target device by Bluetooth after the control module disables the WIFI communication module of the target device; a first sending module, used to send a synchronization instruction to the mobile terminal if there is a mobile terminal connected to the target device by Bluetooth, wherein the synchronization instruction is used to instruct the mobile terminal to collect the first device data of the target device through the Bluetooth communication module; and a first receiving module, used to receive the first device data uploaded by the mobile terminal.
[0019] Optionally, the device also includes: a determination module, used to determine a set of intra-domain devices adjacent to the target device in the local area network where the target device is located, after the judgment module determines whether there is a mobile terminal connected to the target device by Bluetooth, if there is no mobile terminal connected to the target device by Bluetooth; a selection module, used to select a collaborative device of the target device from the intra-domain device set; a second sending module, used to send a collaborative instruction to the collaborative device, wherein the collaborative instruction is used to instruct the collaborative device to collect second device data of the target device through the Bluetooth communication module; and a second receiving module, used to receive the second device data uploaded by the collaborative device.
[0020] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0021] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.
[0022] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.
[0023] Through the embodiments of the present invention, the WIFI signal strength of the target device is obtained, and the energy consumption parameters of the target device are detected, wherein the target device includes a Bluetooth communication module and a WIFI communication module, and the energy consumption parameters are used to identify the energy consumption state of the target device, and the energy consumption state is used to characterize the energy consumption speed of the target device. The device state of the target device is controlled according to the WIFI signal strength and the energy consumption state. The device state of the target device is controlled by the WIFI signal strength and the energy consumption state of the target device. The device state can be adaptively controlled based on the network environment and activity of the device, and inactive devices and devices with poor network environment can be controlled in a low-energy consumption state, which solves the technical problem of low energy efficiency ratio of IoT devices in related technologies, improves the energy efficiency ratio of the target device, reduces the operating cost, and extends the battery life of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 is a hardware structure block diagram of a server according to an embodiment of the present invention;
[0026] Figure 2 is a flow chart of a method for controlling a device state according to an embodiment of the present invention;
[0027] Figure 3 is a flow chart of performing device energy consumption control in an embodiment of the present invention;
[0028] Figure 4 4 is a structural block diagram of a vending machine according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order 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 in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Example 1
[0032] The method embodiment provided in the first embodiment of the present application can be executed in a server, an IoT controller, a cloud platform or a similar device management device. Taking running on a server as an example, Figure 1 FIG. 1 is a hardware structure diagram of a server according to an embodiment of the present invention. Figure 1 As shown, the server may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the server may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0033] The memory 104 can be used to store server programs, for example, software programs and modules of application software, such as a server program corresponding to a control method of a server in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the server program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] In this embodiment, a method for controlling a device state is provided. Figure 2 is a flow chart of a method for controlling a device state according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0036] Step S202, obtaining the WIFI signal strength of the target device, and detecting the energy consumption parameters of the target device, wherein the target device includes a Bluetooth communication module and a WIFI communication module;
[0037] The target device of this embodiment is an IoT device with communication capabilities, and has both Bluetooth communication and WIFI communication capabilities. The target device can be a door lock, thermostat, humidifier, gas meter, refrigerator, air conditioner, TV, washing machine, sweeping robot, etc.
[0038] Optionally, the energy consumption parameters include instantaneous energy consumption parameters and computing power occupancy parameters. The instantaneous energy consumption parameters include current, voltage, etc., and the computing power occupancy parameters include CPU usage, GPU usage, etc.
[0039] Step S204, using the energy consumption parameter to identify the energy consumption state of the target device, where the energy consumption state is used to characterize the energy consumption speed of the target device;
[0040] The energy consumption state of this embodiment includes multiple modes, which are used to characterize different degrees of activity of the target device. The faster the energy consumption rate, the higher the activity, such as low energy mode, energy saving mode, and high performance mode, and the energy consumption rate increases successively.
[0041] Step S206, controlling the device state of the target device according to the WIFI signal strength and the energy consumption state;
[0042] The device status of this embodiment includes multiple strategies, such as hardware-based energy-saving strategies (such as disabling some working components or modules of the target device), software-based energy-saving strategies (such as controlling the target device to enter an energy-saving state, reducing the working capacity and working parameters of the target device, such as reducing the frequency, reducing the cooling capacity of the air conditioner, and other energy-saving operations), maintaining the current state, etc.
[0043] Through the above steps, the WIFI signal strength of the target device is obtained, and the energy consumption parameters of the target device are detected, wherein the target device includes a Bluetooth communication module and a WIFI communication module, and the energy consumption parameters are used to identify the energy consumption state of the target device, and the energy consumption state is used to characterize the energy consumption speed of the target device. The device state of the target device is controlled according to the WIFI signal strength and the energy consumption state. The device state of the target device is controlled by the WIFI signal strength and the energy consumption state of the target device. The device state can be adaptively controlled based on the network environment and activity of the device, and inactive devices and devices with poor network environment can be controlled in a low-energy consumption state, which solves the technical problem of low energy efficiency ratio of IoT devices in related technologies, improves the energy efficiency ratio of the target device, reduces the operating cost, and extends the battery life of the device.
[0044] In one implementation of the present embodiment, using the energy consumption parameters to identify the energy consumption status of the target device includes: using instantaneous power consumption parameters to calculate the power consumption of the target device, using processor usage to calculate the processor power of the target device, and determining the remaining power of the target device, wherein the energy consumption parameters include the instantaneous power consumption parameters and the processor usage; using the power consumption and processor power to calculate the real-time energy consumption of the target device; and identifying the energy consumption status of the target device based on the real-time energy consumption and the remaining power.
[0045] In one example, on the one hand, the target device remotely uploads the data collected by the current sensor and the voltage sensor to the server through the communication module for analysis and storage. Instantaneous power refers to the product of voltage and current at a certain moment. The instantaneous voltage is u(t), the instantaneous current is i(t), and the instantaneous power is p(t), then: p(t)=u(t)i(t); on the other hand, the CPU usage rate is obtained through the operating system interface, and the CPU power consumption can be estimated using an empirical model or a machine learning model. Combining the two data sources can obtain more comprehensive energy consumption information. Combining the instantaneous power data with the CPU power consumption estimation can obtain the real-time energy consumption: [ P_{\text{total}}(t) = P(t) + P_{CPU}(t) ].
[0046] The real-time energy consumption of the target device is comprehensively calculated by using the instantaneous power consumption parameters and processor usage rate of the target device, thereby improving the accuracy of calculating the real-time energy consumption of the device.
[0047] In one example, identifying the energy consumption state of the target device based on the real-time energy consumption and the remaining power includes: determining whether the remaining power is lower than a preset power; if the remaining power is lower than the preset power, determining that the energy consumption state of the target device is a low-energy mode; if the remaining power is higher than or equal to the preset power, determining whether the real-time energy consumption is greater than a preset threshold; if the real-time energy consumption is greater than the preset threshold, determining that the energy consumption state of the target device is a high-performance mode; if the real-time energy consumption is less than or equal to the preset threshold, determining that the energy consumption state of the target device is a power-saving mode.
[0048] Optionally, the preset power level can be set to 20%. When the remaining power of the target device is less than 20%, the target device actively enters a low-energy mode such as sleep. If it is higher than the preset power level, the target device will not actively enter a specific working mode, and its energy consumption status cannot be directly determined. It is necessary to identify the energy consumption status based on the real-time energy consumption. If it is greater than the preset threshold, it is a high-performance mode, and the target device is working normally. If the real-time energy consumption is less than or equal to the preset threshold, the target device consumes less energy in real time and is in energy-saving modes such as sleep.
[0049] By adopting the solution of this embodiment, the energy consumption state of the target device is identified through the real-time energy consumption and the remaining power, taking into account the remaining power and the real-time energy consumption of the device, thereby improving the recognition accuracy of the energy consumption state of the device.
[0050] In an implementation scenario of the present embodiment, controlling the device state of the target device according to the WIFI signal strength and the energy consumption state includes: determining whether the WIFI signal strength is lower than a preset strength; if the WIFI signal strength is lower than the preset strength and the energy consumption state is a low energy mode, disabling the WIFI communication module of the target device.
[0051] When the remaining power of the target device is lower than the preset power, the energy consumption state of the target device is a low energy mode.
[0052] By disabling the WIFI communication module, turning off the high-power WIFI connection and using low-power Bluetooth communication instead, the battery life of the target device is improved.
[0053] In some other implementation scenarios of this embodiment, after determining whether the WIFI signal strength is lower than the preset strength, it also includes: if the WIFI signal strength is higher than or equal to the preset strength, and the energy consumption state is a high-performance mode, maintaining the current device state of the target device; if the WIFI signal strength is higher than or equal to the preset strength, and the energy consumption state is an energy-saving mode, controlling the target device to enter an energy-saving state so that the target device reduces the energy consumption rate.
[0054] When the remaining power of the target device is higher than or equal to the preset power, the real-time energy consumption is greater than the preset threshold, the energy consumption state is the high-performance mode, and the real-time energy consumption is less than or equal to the preset threshold, the energy consumption state is the energy-saving mode.
[0055] The target device enters an energy-saving state, and the device automatically adjusts its operation to optimize energy consumption, such as a smart thermostat automatically adjusting the temperature based on room occupancy, and devices such as fans and humidifiers automatically adjusting to energy-saving mode or sleep mode.
[0056] In high-performance mode, the current device state of the target device is maintained to ensure the normal operation of the target device and avoid the impact of energy optimization operations on the normal operation of the device. In energy-saving mode, the target device is controlled to enter an energy-saving state. In the energy-saving state, the target device does not disable the WIFI communication module, which can ensure the WIFI communication capability of the target device. At the same time, energy-saving control is performed based on a preset energy-saving strategy to reduce the energy consumption rate. On the basis of ensuring the normal communication and operating capabilities of the device, energy consumption is reduced without affecting the user experience.
[0057] By adopting the solution of this embodiment, the device state of the target device is controlled based on the WIFI signal strength and energy consumption state of the target device. Under the premise of not affecting the normal operation of the device and user experience, the energy consumption rate of the device is reduced as much as possible, thereby achieving a balance between device performance and energy management, taking into account multiple scenarios, and improving the battery life of the device.
[0058] In this embodiment, after disabling the WIFI communication module of the target device, it also includes: determining whether there is a mobile terminal connected to the target device by Bluetooth; if there is a mobile terminal connected to the target device by Bluetooth, sending a synchronization instruction to the mobile terminal, wherein the synchronization instruction is used to instruct the mobile terminal to collect the first device data of the target device through the Bluetooth communication module; and receiving the first device data uploaded by the mobile terminal.
[0059] The WIFI communication module is disabled on the target device, and the Bluetooth communication module with lower power consumption is started for communication. The mobile terminal is a user terminal that can control IoT devices and has Bluetooth communication capabilities. It is the same as the cloud platform logged in by the target device. By sending synchronization instructions to the mobile terminal, the mobile terminal actively collects the first device data of the target device, which reduces the energy consumption of the target device while ensuring data interaction between the target device and the cloud platform.
[0060] In one example, after determining whether there is a mobile terminal connected to the target device by Bluetooth, it also includes: if there is no mobile terminal connected to the target device by Bluetooth, determining a set of intra-domain devices adjacent to the target device in the local area network where the target device is located; selecting a collaborative device of the target device from the intra-domain device set; sending a collaborative instruction to the collaborative device, wherein the collaborative instruction is used to instruct the collaborative device to collect second device data of the target device through a Bluetooth communication module; and receiving second device data uploaded by the collaborative device.
[0061] In this example, if there is no mobile terminal around the target device or there is no mobile terminal with a stable Bluetooth signal, other IoT devices in the same local area network as the target device will assist in communication to ensure normal data interaction between the target device and the cloud server.
[0062] Optionally, the second device data is the abbreviated data of the target device, which only includes the device status data to ensure normal interaction between the devices and does not protect the log data of the device, thereby reducing the workload of the collaborative device and the amount of data assisted in transmission, and reducing the energy consumption of the collaborative device.
[0063] The local area network of this embodiment can be associated through gateway identification, user account, etc. Since it is in the same local area network, the devices in the domain device set are all devices in the same local area network, such as devices in the same room and the same user, so the security of data transmission can be guaranteed.
[0064] Optionally, when selecting a collaborative device for the target device, the selection can be made based on conditions such as device distance, remaining power of neighboring devices, energy consumption status, etc. Selecting a collaborative device for the target device from the intra-domain device set includes: selecting a preselected device set from the intra-domain device set whose remaining power is greater than a preset threshold, respectively calculating the distance between each preselected device in the preselected device set and the target device, and selecting the intra-domain device with the smallest distance from the preselected device set as a collaborative device.
[0065] In one example, selecting a collaborative device for the target device from the set of devices in the domain includes: randomly or sequentially selecting a collaborative device from the set of devices in the domain in each assistance period. By collecting the second device data of the target device at different time periods by multiple collaborative devices, the energy consumption impact caused by the long-term assistance of a fixed collaborative device is reduced, and the situation where the target device is abnormal for a long time due to the failure of a certain assisting device can be avoided.
[0066] In some other scenarios, if there is no qualified collaborative device in the intra-domain device set, a broadcast instruction is sent to all devices in the intra-domain device set, wherein the broadcast instruction is used to instruct the corresponding device to collect the third-device data of the target device through the Bluetooth communication module; receive the third-device data uploaded by any first device in the intra-domain device set; and configure the first device as a collaborative device.
[0067] The inventive point of the low-power operation strategy based on Combo technology in the solution of this embodiment is that it integrates two wireless communication technologies, Wi-Fi and Bluetooth, to achieve seamless switching of smart devices between different operation modes, thereby optimizing energy utilization efficiency. This strategy automatically decides when to turn off the higher-power Wi-Fi connection and switch to low-power Bluetooth communication, or put the device into sleep mode without affecting the user experience, by intelligently detecting and analyzing the actual usage and environmental conditions of the device, such as Wi-Fi signal strength and the user's operation mode. In addition, the strategy also includes an automatic wake-up mechanism to ensure that the device quickly returns to a high-performance state when needed. Overall, the inventive point of this strategy is that it improves the energy efficiency of the device, reduces operating costs, and helps extend the battery life of the device through intelligent energy management.
[0068] Figure 3 is a flow chart of performing device energy consumption control in an embodiment of the present invention, including:
[0069] S31: In the method, an intelligent control unit is preset, which can realize multiple smart devices in the home and manage their communication and energy consumption. The control unit can be a dedicated hardware device, such as a central controller, or a software application running on a smart furniture center or a user's smartphone.
[0070] S32: The WiFi signal strength detection function has been integrated into the intelligent control unit. The corresponding module of the intelligent device uses the API provided by the manufacturer to read the RSSI value to obtain the WiFi signal strength. The software sets a timer to periodically start the signal strength reading to realize the WiFi strength detection. And through the integrated current, voltage and power sensors to measure and record the real-time energy consumption of the device.
[0071] S33: The low power mode is triggered mainly through a decision logic algorithm, which selects the best operation strategy based on the WiFi signal strength and the current energy consumption mode. The algorithm must first confirm the acceptable range and threshold of the WiFi signal, and can define -60dBm to -80dBm as a good network environment. In addition, the current device energy consumption status is monitored through the device CPU usage, and the energy consumption mode is defined as three different levels, such as: high performance mode, energy saving mode and low energy mode. The comprehensive judgment conditions are divided into the following three situations:
[0072] When Wi-Fi signal strength is high and the device is in high performance mode, the current state is maintained.
[0073] When the Wi-Fi signal strength is low and the device is in energy-saving mode, switch to energy-saving state to save energy autonomously.
[0074] When the Wi-Fi signal strength is low and the battery is low, the Wi-Fi module is actively disabled in low-energy mode and only Bluetooth connection control is used.
[0075] S34: Send the corresponding mode to the smart home device through the decision logic algorithm. When sending the high-performance mode, the device uses WiFi for high-speed multi-data transmission. In the balanced mode, the device automatically adjusts its operation to optimize energy consumption, such as the smart thermostat automatically adjusts the temperature according to the room occupancy, and the fan humidifier and other devices automatically adjust to the energy-saving mode. At this time, WiFi is still used for data interaction. In the energy-saving mode, it directly switches to Bluetooth for data interaction. Bluetooth communication can consume lower energy than WiFi, and the intelligent control unit can use Bluetooth to control the device and synchronize the status.
[0076] The solution of this embodiment can automatically reduce energy consumption when the device does not need high-speed data transmission, solving the energy management problem in a multi-device environment. By accurately controlling the activity state of the device, such as putting inactive devices in low-power mode, unnecessary energy waste is reduced. This is an optimization of the energy management of smart devices and improves the energy efficiency of the entire system.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0078] Example 2
[0079] In this embodiment, a device for controlling the state of an equipment is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are omitted. As used below, the term "module" can implement a combination of software and hardware of the reservation function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, can also be conceived.
[0080] Figure 4 is a structural block diagram of a device state control apparatus according to an embodiment of the present invention, such as Figure 4 As shown, including:
[0081] An acquisition module 40, used to acquire the WIFI signal strength of a target device and detect energy consumption parameters of the target device, wherein the target device includes a Bluetooth communication module and a WIFI communication module;
[0082] An identification module 42, configured to identify an energy consumption state of the target device using the energy consumption parameter, wherein the energy consumption state is used to characterize an energy consumption speed of the target device;
[0083] The control module 44 is used to control the device state of the target device according to the WIFI signal strength and the energy consumption state.
[0084] Optionally, the identification module includes: a first calculation unit, used to calculate the power consumption of the target device using instantaneous power consumption parameters, calculate the processor power of the target device using processor usage, and determine the remaining power of the target device, wherein the energy consumption parameters include the instantaneous power consumption parameters and the processor usage; a second calculation unit, used to calculate the real-time energy consumption of the target device using the power consumption and processor power; and an identification unit, used to identify the energy consumption status of the target device based on the real-time energy consumption and the remaining power.
[0085] Optionally, the identification unit includes: a judgment subunit, used to judge whether the remaining power is lower than a preset power; a processing subunit, used to determine that the energy consumption state of the target device is a low-energy mode if the remaining power is lower than the preset power; if the remaining power is higher than or equal to the preset power, determine whether the real-time energy consumption is greater than a preset threshold; a determination subunit, used to determine that the energy consumption state of the target device is a high-performance mode if the real-time energy consumption is greater than the preset threshold; if the real-time energy consumption is less than or equal to the preset threshold, determine that the energy consumption state of the target device is an energy-saving mode.
[0086] Optionally, the control module includes: a judgment unit, used to judge whether the WIFI signal strength is lower than a preset strength; a first control unit, used to disable the WIFI communication module of the target device if the WIFI signal strength is lower than a preset strength and the energy consumption state is a low energy mode.
[0087] Optionally, the control module also includes: a second control unit, used to maintain the current device state of the target device if the WIFI signal strength is higher than or equal to the preset strength and the energy consumption state is a high-performance mode after the judgment unit determines whether the WIFI signal strength is lower than a preset strength; a third control unit, used to control the target device to enter an energy-saving state if the WIFI signal strength is higher than or equal to the preset strength and the energy consumption state is an energy-saving mode, so as to reduce the energy consumption rate of the target device.
[0088] Optionally, the device also includes: a judgment module, used to judge whether there is a mobile terminal connected to the target device by Bluetooth after the control module disables the WIFI communication module of the target device; a first sending module, used to send a synchronization instruction to the mobile terminal if there is a mobile terminal connected to the target device by Bluetooth, wherein the synchronization instruction is used to instruct the mobile terminal to collect the first device data of the target device through the Bluetooth communication module; and a first receiving module, used to receive the first device data uploaded by the mobile terminal.
[0089] Optionally, the device also includes: a determination module, used to determine a set of intra-domain devices adjacent to the target device in the local area network where the target device is located, after the judgment module determines whether there is a mobile terminal connected to the target device by Bluetooth, if there is no mobile terminal connected to the target device by Bluetooth; a selection module, used to select a collaborative device of the target device from the intra-domain device set; a second sending module, used to send a collaborative instruction to the collaborative device, wherein the collaborative instruction is used to instruct the collaborative device to collect second device data of the target device through the Bluetooth communication module; and a second receiving module, used to receive the second device data uploaded by the collaborative device.
[0090] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0091] Example 3
[0092] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0093] Optionally, in this embodiment, the above storage medium may be configured to store a computer program for executing:
[0094] S1, obtaining the WIFI signal strength of the target device, and detecting the energy consumption parameters of the target device, wherein the target device includes a Bluetooth communication module and a WIFI communication module;
[0095] S2, using the energy consumption parameter to identify the energy consumption state of the target device, where the energy consumption state is used to characterize the energy consumption speed of the target device;
[0096] S3: Control the device state of the target device according to the WIFI signal strength and the energy consumption state.
[0097] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0098] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0099] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0100] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0101] S1, obtaining the WIFI signal strength of the target device, and detecting the energy consumption parameters of the target device, wherein the target device includes a Bluetooth communication module and a WIFI communication module;
[0102] S2, using the energy consumption parameter to identify the energy consumption state of the target device, where the energy consumption state is used to characterize the energy consumption speed of the target device;
[0103] S3: Control the device state of the target device according to the WIFI signal strength and the energy consumption state.
[0104] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0105] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0106] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0107] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of 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. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] 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.
[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, controller or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., various media that can store program codes.
[0111] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for controlling a device state, It is characterized in that include: Obtaining the WIFI signal strength of the target device, and detecting the energy consumption parameters of the target device, wherein the target device includes a Bluetooth communication module and a WIFI communication module; Using the energy consumption parameter to identify the energy consumption state of the target device, wherein the energy consumption state is used to characterize the energy consumption speed of the target device; Control the device state of the target device according to the WIFI signal strength and the energy consumption state; Among them, after disabling the WIFI communication module of the target device by controlling the device state of the target device according to the WIFI signal strength and the energy consumption state, if there is no mobile terminal connected to the target device by Bluetooth, a set of intra-domain devices adjacent to the target device is determined in the local area network where the target device is located; a collaborative device of the target device is selected from the intra-domain device set; a collaborative instruction is sent to the collaborative device, wherein the collaborative instruction is used to instruct the collaborative device to collect the second device data of the target device through the Bluetooth communication module; and the second device data uploaded by the collaborative device is received.
2. The method according to claim 1, It is characterized in that Using the energy consumption parameter to identify the energy consumption state of the target device includes: Calculating the power consumption of the target device using instantaneous power consumption parameters, calculating the processor power of the target device using processor usage, and determining the remaining power of the target device, wherein the energy consumption parameters include the instantaneous power consumption parameters and the processor usage; Calculating the real-time energy consumption of the target device using the electrical power and processor power; The energy consumption state of the target device is identified according to the real-time energy consumption and the remaining power.
3. The method according to claim 2, It is characterized in that Identifying the energy consumption state of the target device according to the real-time energy consumption and the remaining power includes: Determining whether the remaining power is lower than a preset power; If the remaining power is lower than the preset power, determine that the energy consumption state of the target device is in low energy mode; if the remaining power is higher than or equal to the preset power, determine whether the real-time energy consumption is greater than a preset threshold; If the real-time energy consumption is greater than a preset threshold, the energy consumption state of the target device is determined to be a high-performance mode; if the real-time energy consumption is less than or equal to the preset threshold, the energy consumption state of the target device is determined to be an energy-saving mode.
4. The method according to claim 1, It is characterized in that Controlling the device state of the target device according to the WIFI signal strength and the energy consumption state includes: Determine whether the WIFI signal strength is lower than a preset strength; If the WIFI signal strength is lower than a preset strength and the energy consumption state is a low energy mode, the WIFI communication module of the target device is disabled.
5. The method according to claim 4, It is characterized in that After determining whether the WIFI signal strength is lower than a preset strength, the method further includes: If the WIFI signal strength is higher than or equal to the preset strength, and the energy consumption state is the high performance mode, maintaining the current device state of the target device; If the WIFI signal strength is higher than or equal to the preset strength, and the energy consumption state is the energy-saving mode, the target device is controlled to enter the energy-saving state so that the target device reduces the energy consumption speed.
6. The method according to claim 4, It is characterized in that After disabling the WIFI communication module of the target device, the method further includes: Determine whether there is a mobile terminal connected to the target device via Bluetooth; If there is a mobile terminal connected to the target device via Bluetooth, sending a synchronization instruction to the mobile terminal, wherein the synchronization instruction is used to instruct the mobile terminal to collect the first device data of the target device through the Bluetooth communication module; The first device data uploaded by the mobile terminal is received.
7. A device for controlling the state of an equipment, It is characterized in that include: An acquisition module, used to acquire the WIFI signal strength of a target device and detect energy consumption parameters of the target device, wherein the target device includes a Bluetooth communication module and a WIFI communication module; an identification module, used to identify the energy consumption state of the target device using the energy consumption parameter, wherein the energy consumption state is used to characterize the energy consumption speed of the target device; A control module, used to control the device state of the target device according to the WIFI signal strength and the energy consumption state; The device is also used for: after disabling the WIFI communication module of the target device by controlling the device state of the target device according to the WIFI signal strength and the energy consumption state, if there is no mobile terminal connected to the target device by Bluetooth, determining a set of intra-domain devices adjacent to the target device in the local area network where the target device is located; selecting a collaborative device of the target device from the intra-domain device set; sending a collaborative instruction to the collaborative device, wherein the collaborative instruction is used to instruct the collaborative device to collect second device data of the target device through the Bluetooth communication module; and receiving second device data uploaded by the collaborative device.
8. A storage medium, It is characterized in that A computer program is stored in the storage medium, wherein the computer program is configured to execute the steps of the device status control method in any one of claims 1 to 6 when running.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, in, The processor, the communication interface, and the memory communicate with each other via a communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the steps of the device status control method according to any one of claims 1 to 6 by running a program stored in a memory.
