CN114257474A - Power utilization control method and device for intelligent gateway, computer equipment and storage medium - Google Patents
Power utilization control method and device for intelligent gateway, computer equipment and storage medium Download PDFInfo
- Publication number
- CN114257474A CN114257474A CN202111305380.6A CN202111305380A CN114257474A CN 114257474 A CN114257474 A CN 114257474A CN 202111305380 A CN202111305380 A CN 202111305380A CN 114257474 A CN114257474 A CN 114257474A
- Authority
- CN
- China
- Prior art keywords
- mode
- intelligent gateway
- idle mode
- preset
- sleep mode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J13/00—Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network
- H02J13/00004—Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by the power network being locally controlled
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J13/00—Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network
- H02J13/00032—Systems characterised by the controlled or operated power network elements or equipment, the power network elements or equipment not otherwise provided for
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/12—Arrangements for remote connection or disconnection of substations or of equipment thereof
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B70/00—Technologies for an efficient end-user side electric power management and consumption
- Y02B70/30—Systems integrating technologies related to power network operation and communication or information technologies for improving the carbon footprint of the management of residential or tertiary loads, i.e. smart grids as climate change mitigation technology in the buildings sector, including also the last stages of power distribution and the control, monitoring or operating management systems at local level
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S20/00—Management or operation of end-user stationary applications or the last stages of power distribution; Controlling, monitoring or operating thereof
- Y04S20/20—End-user application control systems
- Y04S20/242—Home appliances
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Sources (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The application relates to a power utilization control method, a power utilization control device, computer equipment and a storage medium of an intelligent gateway, which are applied to the intelligent gateway adopting solar power supply and/or induction power supply, wherein the method comprises the following steps: acquiring the number of tasks corresponding to the tasks to be processed in the task execution queue; if the task number is smaller than a preset number threshold, entering an idle mode; when the duration of the idle mode reaches a preset duration, switching the idle mode into a sleep mode; the power consumption corresponding to the sleep mode is smaller than that of the idle mode, when the tasks to be processed are few, the overall power consumption of the intelligent gateway can be effectively reduced by switching different modes, more power is distributed to the intelligent terminal, and the use range of the intelligent terminal is expanded.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a power consumption control method and apparatus for an intelligent gateway, a computer device, and a storage medium.
Background
The intelligent gateway can be used for carrying out power supply management on the intelligent terminal and collecting information returned by each sensor, so that the on-line monitoring of the power transmission equipment and the power transmission line is realized, for example, information such as image video, tension, temperature and the like is collected from the sensors. However, the available electric quantity of the intelligent gateway is limited in an outdoor scene, and the intelligent gateway usually has higher energy consumption, so that certain requirements are imposed on line load current, and the use of other intelligent terminals in the outdoor scene is limited due to the higher energy consumption.
Disclosure of Invention
In view of the above, it is necessary to provide a power utilization control method and apparatus for an intelligent gateway, a computer device, and a storage medium.
A power utilization control method of an intelligent gateway is applied to the intelligent gateway adopting solar power supply and/or induction power supply, and comprises the following steps:
acquiring the number of tasks corresponding to the tasks to be processed in the task execution queue;
if the task number is smaller than a preset number threshold, entering an idle mode;
when the duration of the idle mode reaches a preset duration, switching the idle mode into a sleep mode; the power consumption corresponding to the sleep mode is less than the power consumption corresponding to the idle mode.
In one embodiment, the method further comprises the following steps:
when the current awakening information is detected, determining whether the current awakening information is matched with the preset awakening information;
if yes, switching the sleep mode into a working mode, and processing the to-be-processed tasks in the task execution queue;
and if not, executing power-on reset operation.
In one embodiment, the wake-up message includes a wake-up time, and the determining whether the current wake-up message matches a preset wake-up message includes:
and if the current awakening time is the same as the preset awakening time, determining that the current awakening information is matched with the preset awakening information.
In one embodiment, the switching the sleep mode to the operating mode includes:
jumping to a pre-stored awakening entry address;
and starting a wakeup operation process corresponding to the wakeup entry address so as to recover the context data pre-stored in the synchronous dynamic random access memory.
In one embodiment, the switching the idle mode to the sleep mode when the duration of the idle mode reaches a preset duration includes:
when the duration of the idle mode reaches a preset duration, determining awakening information for triggering the intelligent gateway to switch from a sleep mode to a working mode;
determining a wakeup entry address corresponding to a wakeup operation process and context data corresponding to a current task to be processed;
and after the awakening information, the awakening entry address and the context data are saved, controlling a processor of the intelligent gateway to enter a sleep mode.
In one embodiment, the entering the sleep mode when the duration of the idle mode reaches a preset duration further includes:
and determining an external device electrically connected with the intelligent gateway, and controlling the external device to enter a sleep mode.
In one embodiment, the method further comprises the following steps:
in an idle mode, updating the task quantity according to a preset time interval;
and if the current task number is greater than or equal to the number threshold, switching the idle mode into a working mode, and processing the tasks to be processed in the task execution queue.
An electricity utilization control device of an intelligent gateway is applied to the intelligent gateway adopting solar energy power supply and/or induction power supply, and the device comprises:
the task quantity acquisition module is used for acquiring the quantity of the tasks corresponding to the tasks to be processed in the task execution queue;
an idle mode configuration module, configured to enter an idle mode if the number of tasks is less than a preset number threshold;
a sleep mode configuration module, configured to switch the idle mode to a sleep mode when a duration of the idle mode reaches a preset duration; the power consumption corresponding to the sleep mode is less than the power consumption corresponding to the idle mode.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method as claimed in any one of the above when the computer program is executed.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of the preceding claims.
The power utilization control method, the power utilization control device, the computer equipment and the storage medium of the intelligent gateway are applied to the intelligent gateway adopting solar power supply and/or inductive power supply, and the number of tasks corresponding to the tasks to be processed in the task execution queue is obtained; if the number of the tasks is smaller than a preset number threshold, entering an idle mode; when the duration time of the idle mode reaches the preset duration time, the idle mode is switched to the sleep mode, wherein the power consumption corresponding to the sleep mode is smaller than that corresponding to the idle mode, when the tasks to be processed are few, the overall power consumption of the intelligent gateway can be effectively reduced by switching different modes, more power is distributed to the intelligent terminal, and the use range of the intelligent terminal is expanded.
Drawings
Fig. 1 is an application environment diagram of a power utilization control method of an intelligent gateway in an embodiment;
FIG. 2 is a flowchart illustrating a method for controlling power consumption of an intelligent gateway according to an embodiment;
FIG. 3 is a flow diagram illustrating the steps of configuring an idle mode in one embodiment;
FIG. 4 is a flowchart illustrating the step of configuring sleep mode in one embodiment;
FIG. 5 is a flowchart illustrating the steps of configuring an operating mode according to one embodiment;
fig. 6 is a block diagram illustrating an exemplary power consumption control apparatus of an intelligent gateway;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The power utilization control method of the intelligent gateway can be applied to the application environment shown in fig. 1. In the application environment, the intelligent gateway 102 may communicate with the intelligent terminal 104 through a network, the intelligent gateway 102 may be deployed in an outdoor environment, and obtain electric energy in a solar power supply and/or inductive power supply manner, and the electric energy obtained by the intelligent gateway 102 may be used for the operation of the intelligent gateway 102; alternatively, the intelligent gateway 102 may also be electrically connected to the intelligent terminal 104, and the intelligent gateway 102 may distribute the acquired electric energy to the intelligent terminal 104.
The intelligent terminal 104 may be a monitoring device, which may monitor and collect data of the power transmission line and/or the power grid device. In one example, the smart terminal 104 may be one or more sensors with different business functions, such as sensors for collecting image data, video data, tension data, temperature data, wire waving data, etc., and the sensors may include at least one of: the device comprises a camera device, a microclimate sensor, a tower inclination sensor, a tension sensor, an inclination angle sensor, a wire clamp temperature measuring sensor, a wire galloping sensor and an intelligent spacer. The smart terminal 104 may also include at least one of a wired sensor and a wireless sensor.
The intelligent gateway 102 may send an instruction to the intelligent terminals 104, collect data of each intelligent terminal 104, and upload the data to the internet of things platform in a centralized manner.
In an embodiment, as shown in fig. 2, a power utilization control method for an intelligent gateway is provided, which is described by taking the method as an example for being applied to the intelligent gateway 104 in fig. 1, and may include the following steps:
Specifically, after acquiring the to-be-processed task, the intelligent gateway may add the to-be-processed task to the task execution queue. The task to be processed can be a task generated by the intelligent gateway after responding to the request of the intelligent terminal, such as a sensing data acquisition task, an electric energy distribution task and the like; the task generated in the data processing process inside the intelligent gateway may also be a task, for example, a task of performing data analysis on the collected sensing data, uploading the analysis result to the internet of things platform, and the like.
In practical application, the intelligent gateway can obtain the number of tasks corresponding to the tasks to be processed in the task execution queue. Specifically, for example, the intelligent gateway may obtain the number of tasks according to a preset time interval; or, the time for acquiring the task number may be determined according to the current electric quantity of the intelligent gateway, for example, when the electric quantity is higher than a first threshold, the task number may be acquired according to a first preset frequency, and when the electric quantity is lower than a second threshold, the task number may be acquired according to a second preset frequency, where the first threshold is greater than the second threshold, and the first preset frequency is greater than the second preset frequency.
As an example, the idle mode may be a mode in which the overall power consumption of the intelligent gateway is lower than a preset power consumption, and in the idle mode, the intelligent gateway may not process the task to be processed in the task execution queue, or may process the task with low power consumption.
After determining the number of tasks, the intelligent gateway may compare the number of tasks to a preset number threshold. If the number of the tasks is larger than or equal to the number threshold, the intelligent gateway can continue to process the tasks to be processed in the task execution queue according to the current mode; if the number of tasks is less than the number threshold, then an idle mode may be entered.
In a specific implementation, the number threshold may be preset by a user, for example, the number threshold may be 1, and the idle mode may be entered when the number of tasks is 0. Or, the number threshold may also be determined based on the current electric quantity of the intelligent gateway, for example, a corresponding relationship between the number threshold and the current electric quantity of the intelligent gateway may be preset, and then the corresponding number threshold may be queried based on the current electric quantity, so that the intelligent gateway may determine whether to enter the idle mode based on different electric quantities.
Wherein the power consumption corresponding to the sleep mode is less than the power consumption corresponding to the idle mode. In the sleep mode, the intelligent gateway can not process any task or respond to information or instructions from the intelligent terminal or the platform of the Internet of things, the intelligent gateway is in the working state with the lowest power consumption at the moment, in the sleep mode, the processor core and the programmable logic of the intelligent gateway hardly consume energy, and only part of the internal controller and the wake-up logic of the gateway normally work.
Specifically, after entering the idle mode, the intelligent gateway may record the duration of the idle mode, and when the duration of the idle mode reaches a preset duration, may switch the current idle mode of the intelligent gateway to the sleep mode with lower power consumption. Specifically, the intelligent gateway is switched to the sleep mode, and the system can be suspended at the application layer, so that the context data of the system can be conveniently stored when the system enters the sleep mode.
In this embodiment, the intelligent gateway using solar power supply or inductive power supply can acquire the number of tasks corresponding to the to-be-processed tasks in the task execution queue, and if the number of tasks is smaller than a preset number threshold, the idle mode is entered, and when the duration of the idle mode reaches a preset duration, the idle mode is switched to the sleep mode, so that when the to-be-processed tasks are fewer, by switching different modes, the overall power consumption of the intelligent gateway is effectively reduced, more electric quantity is allocated to the intelligent terminal, and the use range of the intelligent terminal is expanded.
In one embodiment, the method may further comprise the steps of:
when the current awakening information is detected, determining whether the current awakening information is matched with the preset awakening information; if yes, switching the sleep mode into a working mode, and processing the to-be-processed tasks in the task execution queue; and if not, executing power-on reset operation.
As an example, the wake-up message may also be referred to as an interrupt source, which may be a message for triggering the intelligent gateway to switch from the sleep mode to another mode.
In a specific implementation, when the intelligent gateway is in the sleep mode and the current wake-up information is detected, it may be determined whether the current wake-up information matches with the preset wake-up information. If yes, the sleep mode can be switched to the working mode, and the tasks to be processed in the task execution queue are processed; if not, executing power-on reset operation, and entering a normal power-on reset starting process.
In this embodiment, whether the sleep mode is switched to the working mode can be determined by determining whether the current wake-up information matches the preset wake-up information, so that the accuracy of mode switching is improved, and the consumption of redundant electric quantity is avoided.
In one embodiment, the wake-up message may include a wake-up time, and the determining whether the current wake-up message matches a preset wake-up message may include the following steps:
and if the current awakening time is the same as the preset awakening time, determining that the current awakening information is matched with the preset awakening information.
In practical applications, the wake-up message may be a wake-up time, for example, when a set fixed interval time arrives. When the current wake-up information is detected, the intelligent gateway can judge whether the wake-up time in the current wake-up information is the same as the preset wake-up time, and if the current wake-up time is the same as the preset wake-up time, the intelligent gateway can determine that the current wake-up information is matched with the preset wake-up information, so that the sleep mode can be switched to the working mode.
In this embodiment, through comparing the wake-up time, can confirm fast accurately whether the wake-up information matches, need not too much calculation, effectively reduce intelligent gateway's power consumption.
In one embodiment, the switching the idle mode to the sleep mode when the duration of the idle mode reaches a preset duration may include:
when the duration of the idle mode reaches a preset duration, determining awakening information for triggering the intelligent gateway to switch from a sleep mode to a working mode; determining a wakeup entry address corresponding to a wakeup operation process and context data corresponding to a current task to be processed; and after the awakening information, the awakening entry address and the context data are saved, controlling a processor of the intelligent gateway to enter a sleep mode.
When the intelligent gateway detects that the duration of the idle mode reaches a preset duration, the intelligent gateway may determine wakeup information for triggering the intelligent gateway to switch from the sleep mode to the working mode, so as to implement setting of the interrupt source. After the wake-up information is preset, the intelligent gateway can determine a wake-up entry corresponding to the wake-up operation process and context data corresponding to the current task to be processed. After the awakening information, the awakening entry address and the context data are stored in the preset module, the processor of the intelligent gateway can be controlled to enter a sleep mode. Specifically, for example, the context data may be stored in the sdram, and the system clock is turned off to control the processor of the smart gateway to enter the sleep mode.
In this embodiment, when the duration of the idle mode reaches a preset duration, determining wakeup information for triggering the intelligent gateway to switch from the sleep mode to the working mode, determining a wakeup entry address corresponding to a wakeup operation process and context data corresponding to a current task to be processed, and after saving the wakeup information, the wakeup entry address and the context data, controlling a processor of the intelligent gateway to enter the sleep mode, so that a basis can be provided for subsequent rapid data recovery and entering of the working mode, and electric quantity consumption caused by mode switching is effectively reduced.
In one embodiment, the switching the sleep mode to the operating mode may include:
jumping to a pre-stored awakening entry address; and starting a wakeup operation process corresponding to the wakeup entry address so as to recover the context data pre-stored in the synchronous dynamic random access memory.
As an example, the wake-up entry address may be a preset link address, and the wake-up entry address may be an address in the local device or a link address on the server. And a page corresponding to the link address can be deployed with a wakeup operation process. The context data may be data of the intelligent gateway before entering the sleep mode, such as data processed and data to be processed by the intelligent gateway when the intelligent gateway is about to enter the sleep mode.
In a specific implementation, if it is determined that the current wake-up information matches the preset wake-up information, the user may jump to a stored wake-up entry address, start a wake-up operation process corresponding to the wake-up entry address, and recover, through the wake-up operation process, context data pre-stored in a Synchronous Dynamic Random Access Memory (SDRAM).
In this embodiment, by jumping to a pre-stored wakeup entry address, a wakeup operation process corresponding to the wakeup entry address is started, and context data pre-stored in the sdram is recovered, so that data recovery can be performed quickly, and the sleep mode is switched to the working mode.
In an embodiment, the entering the sleep mode when the duration of the idle mode reaches a preset duration may further include the following steps:
and determining an external device electrically connected with the intelligent gateway, and controlling the external device to enter a sleep mode.
In a specific implementation, when it is detected that the duration of the idle mode reaches a preset duration, the smart gateway may further determine an external device electrically connected to the smart gateway, where the external device electrically connected to the smart gateway may be powered by the smart gateway, and the external device may include a smart terminal. After determining the electrically connected external device, the intelligent gateway may send a sleep command to the external device, and may control the external device to enter a sleep mode.
In this embodiment, by determining the external device electrically connected to the intelligent gateway and controlling the external device to enter the sleep mode, the external device and the intelligent gateway can enter the sleep mode together, and when the intelligent gateway does not perform data processing, the power consumption of the external device is reduced, and the overall power consumption is effectively reduced.
In one embodiment, the method may further comprise:
in an idle mode, updating the task quantity according to a preset time interval; and if the current task number is greater than or equal to the number threshold, switching the idle mode into a working mode, and processing the tasks to be processed in the task execution queue.
As an example, the operation mode may be a mode in which the intelligent gateway processes tasks in a normal data processing manner, for example, a mode in which the intelligent gateway operates according to rated parameters of the intelligent gateway.
In the idle mode, the intelligent gateway may update the number of tasks corresponding to the to-be-processed tasks in the task execution queue according to a preset time interval, and if the current number of tasks is greater than or equal to the number threshold, the idle mode may be switched to the working mode to process the to-be-processed tasks in the task execution queue.
In this embodiment, when the current number of tasks is greater than or equal to the number threshold, the idle mode may be switched to the working mode, and the tasks to be processed in the queue are executed by the processing tasks, so that the power consumption of the intelligent gateway is reduced, and meanwhile, the tasks can be processed in time, and the processing efficiency of the intelligent gateway is improved.
In order to enable those skilled in the art to better understand the above steps, the following is an example to illustrate the embodiments of the present application, but it should be understood that the embodiments of the present application are not limited thereto.
As shown in fig. 3, after the system on the intelligent gateway starts initialization, the system may execute a preset process, call a rest _ init () function in the kernel initialization function init/main.c through the preset process, and after the init process in the rest _ init () function is activated, the init process may call a corresponding system initialization program to complete initialization of the user space. During initialization, the preset process can execute a cpu _ do _ idle () function and enter an idle process state. Specifically, the preset process may also be referred to as a process No. 0 or an idle process, where the process priority of the idle process is low, and when there are no tasks to be processed in a task execution queue of the system or the number of the tasks is less than a number threshold, the idle process may be executed. The idle mode switching can be realized in a cpu _ do _ idle () function through the preset process, when no task is executable temporarily, the idle mode is entered, when a task execution queue is not empty, the idle state can be exited, and a task scheduling mode combining a Dynamic Voltage Scaling (DVS) technology is adopted to respond to a task request.
When the duration of the idle mode of the intelligent gateway reaches the preset duration and the latter is greater than the preset threshold, as shown in fig. 4, the system may send a sleep instruction requesting to switch to the sleep mode to the kernel of the intelligent gateway, after receiving the sleep instruction, the kernel may call a message function to send a sleep notification to the external device, control the external device to enter the sleep mode, and determine whether the power consumption management message function returns information indicating "success" to the kernel, if not, it may determine that the external device has made an error in the process of entering the sleep mode, and return to the step of calling the message function to send the sleep notification to the external device. If yes, the setting parameters of the external device register can be saved, the interrupt source of the currently allowed wake-up sleeping state of the system is set (namely wake-up information is preset), the contents of the CPU general register and the coprocessor are saved, the SDRAM is set to be in a self-refresh mode, and then the sleeping mode can be entered. In one example, when setting the interrupt source, a GPIO (General-purpose input/output) interrupt or an RTC (Real Time Clock) interrupt may be used.
As shown in fig. 5, when the intelligent gateway receives an interrupt source in the sleep mode, the intelligent gateway may start sleep reset, and first, the intelligent gateway may determine whether the currently received interrupt source is a preset interrupt source in the wakeable sleep mode, and determine whether the currently received interrupt source is a sleep wake-up start process.
If not, the current interrupt source can be determined to be used for triggering the intelligent gateway to perform the process of power-off reset and power-on again. If so, jumping to a preset awakening entry address, starting a corresponding awakening operation process, and restoring the field data, the context data of the processor and the peripheral register which are stored during dormancy. Moreover, a message function can be called to wake up the external equipment, whether the message function returns a success indication is judged, and if not, a wake-up error is determined; if so, determining that the intelligent gateway is restored to the environment before entering the sleep mode. In practical application, the process of switching the intelligent gateway from the sleep mode to the working mode may be similar to the process of first power-on starting, but in the process of switching the sleep mode to the working mode, the intelligent gateway also needs to make a judgment on the starting process, and judges whether the currently started process is a process of waking up from the sleep mode or a process of resetting and powering on again after system power failure.
It should be understood that although the various steps in the flowcharts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 6, there is provided a power consumption control apparatus for an intelligent gateway, which may be applied to an intelligent gateway using solar power and/or inductive power, the apparatus including:
a task number obtaining module 601, configured to obtain a task number corresponding to a task to be processed in a task execution queue;
an idle mode configuration module 602, configured to enter an idle mode if the number of tasks is less than a preset number threshold;
a sleep mode configuration module 603, configured to switch the idle mode to a sleep mode when the duration of the idle mode reaches a preset duration; the power consumption corresponding to the sleep mode is less than the power consumption corresponding to the idle mode.
In one embodiment, further comprising:
the wake-up information comparison module is used for determining whether the current wake-up information is matched with preset wake-up information or not when the current wake-up information is detected; if yes, calling a working mode configuration module; if not, calling the power-on module;
the working mode configuration module is used for switching the sleep mode into a working mode and processing the tasks to be processed in the task execution queue;
and the power-on module is used for executing power-on reset operation.
In one embodiment, the wake-up information comparing module is specifically configured to:
and if the current awakening time is the same as the preset awakening time, determining that the current awakening information is matched with the preset awakening information.
In one embodiment, the operating mode configuration module is specifically configured to:
jumping to a pre-stored awakening entry address;
and starting a wakeup operation process corresponding to the wakeup entry address so as to recover the context data pre-stored in the synchronous dynamic random access memory.
In one embodiment, the sleep mode configuration module 603 includes:
the wake-up information determining submodule is used for determining wake-up information for triggering the intelligent gateway to switch from a sleep mode to a working mode when the duration of the idle mode reaches a preset duration;
the context data determining submodule is used for determining a wakeup entry address corresponding to the wakeup operation process and context data corresponding to the current task to be processed;
and the dormancy submodule is used for controlling the processor of the intelligent gateway to enter a dormancy mode after the awakening information, the awakening entry address and the context data are saved.
In one embodiment, the sleep mode configuration module 603 further includes:
and the peripheral sleep submodule is used for determining external equipment electrically connected with the intelligent gateway and controlling the external equipment to enter a sleep mode.
In one embodiment, further comprising:
the task quantity updating module is used for updating the task quantity according to a preset time interval in an idle mode;
and the working mode switching module is used for switching the idle mode into a working mode and processing the tasks to be processed in the task execution queue if the current task number is greater than or equal to the number threshold.
For specific limitations of the power consumption control device of an intelligent gateway, reference may be made to the above limitations of the power consumption control method of an intelligent gateway, and details are not repeated here. All or part of each module in the power utilization control device of the intelligent gateway can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing task data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a power usage control method of an intelligent gateway.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring the number of tasks corresponding to the tasks to be processed in the task execution queue;
if the task number is smaller than a preset number threshold, entering an idle mode;
when the duration of the idle mode reaches a preset duration, switching the idle mode into a sleep mode; the power consumption corresponding to the sleep mode is less than the power consumption corresponding to the idle mode.
In one embodiment, the steps in the other embodiments described above are also implemented when the computer program is executed by a processor.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring the number of tasks corresponding to the tasks to be processed in the task execution queue;
if the task number is smaller than a preset number threshold, entering an idle mode;
when the duration of the idle mode reaches a preset duration, switching the idle mode into a sleep mode; the power consumption corresponding to the sleep mode is less than the power consumption corresponding to the idle mode.
In one embodiment, the computer program when executed by the processor also performs the steps in the other embodiments described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. The power utilization control method of the intelligent gateway is applied to the intelligent gateway adopting solar power supply and/or induction power supply, and comprises the following steps:
acquiring the number of tasks corresponding to the tasks to be processed in the task execution queue;
if the task number is smaller than a preset number threshold, entering an idle mode;
when the duration of the idle mode reaches a preset duration, switching the idle mode into a sleep mode; the power consumption corresponding to the sleep mode is less than the power consumption corresponding to the idle mode.
2. The method of claim 1, further comprising:
when the current awakening information is detected, determining whether the current awakening information is matched with the preset awakening information;
if yes, switching the sleep mode into a working mode, and processing the to-be-processed tasks in the task execution queue;
and if not, executing power-on reset operation.
3. The method of claim 2, wherein the wake-up message comprises a wake-up time, and wherein the determining whether the current wake-up message matches a preset wake-up message comprises:
and if the current awakening time is the same as the preset awakening time, determining that the current awakening information is matched with the preset awakening information.
4. The method of claim 2, wherein switching the sleep mode to the active mode comprises:
jumping to a pre-stored awakening entry address;
and starting a wakeup operation process corresponding to the wakeup entry address so as to recover the context data pre-stored in the synchronous dynamic random access memory.
5. The method of claim 1, wherein the switching the idle mode to the sleep mode when the duration of the idle mode reaches a preset duration comprises:
when the duration of the idle mode reaches a preset duration, determining awakening information for triggering the intelligent gateway to switch from a sleep mode to a working mode;
determining a wakeup entry address corresponding to a wakeup operation process and context data corresponding to a current task to be processed;
and after the awakening information, the awakening entry address and the context data are saved, controlling a processor of the intelligent gateway to enter a sleep mode.
6. The method of claim 5, wherein entering a sleep mode when the duration of the idle mode reaches a preset duration, further comprises:
and determining an external device electrically connected with the intelligent gateway, and controlling the external device to enter a sleep mode.
7. The method of claim 1, further comprising:
in an idle mode, updating the task quantity according to a preset time interval;
and if the current task number is greater than or equal to the number threshold, switching the idle mode into a working mode, and processing the tasks to be processed in the task execution queue.
8. The utility model provides a power consumption controlling means of intelligent gateway which characterized in that, is applied to the intelligent gateway who adopts solar energy power supply and/or induction power supply, the device includes:
the task quantity acquisition module is used for acquiring the quantity of the tasks corresponding to the tasks to be processed in the task execution queue;
an idle mode configuration module, configured to enter an idle mode if the number of tasks is less than a preset number threshold;
a sleep mode configuration module, configured to switch the idle mode to a sleep mode when a duration of the idle mode reaches a preset duration; the power consumption corresponding to the sleep mode is less than the power consumption corresponding to the idle mode.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111305380.6A CN114257474B (en) | 2021-11-05 | 2021-11-05 | Power utilization control method and device for intelligent gateway, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111305380.6A CN114257474B (en) | 2021-11-05 | 2021-11-05 | Power utilization control method and device for intelligent gateway, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114257474A true CN114257474A (en) | 2022-03-29 |
CN114257474B CN114257474B (en) | 2023-09-26 |
Family
ID=80790501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111305380.6A Active CN114257474B (en) | 2021-11-05 | 2021-11-05 | Power utilization control method and device for intelligent gateway, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114257474B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116736964A (en) * | 2023-08-09 | 2023-09-12 | 南京启见半导体科技有限公司 | Self-adaptive control method for power consumption of memory system, electronic equipment and medium |
CN117194172A (en) * | 2023-10-11 | 2023-12-08 | 珠海世宁达科技有限公司 | Network card power supply control method and related device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110231684A1 (en) * | 2006-04-05 | 2011-09-22 | Maxwell Technologies, Inc. | Methods and apparatus for managing and controlling power consumption and heat generation in computer systems |
CN103379166A (en) * | 2012-04-28 | 2013-10-30 | 孙羽 | Wireless sensing control network system based on Internet of Things |
CN104469915A (en) * | 2014-12-24 | 2015-03-25 | 北京极科极客科技有限公司 | Intelligent sleep method and device for wireless router |
CN106879007A (en) * | 2017-01-22 | 2017-06-20 | 新华三技术有限公司 | Method and device for controlling working state of wireless equipment |
CN108430087A (en) * | 2018-03-26 | 2018-08-21 | 新华三技术有限公司 | Power consumption control method, device and router |
-
2021
- 2021-11-05 CN CN202111305380.6A patent/CN114257474B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110231684A1 (en) * | 2006-04-05 | 2011-09-22 | Maxwell Technologies, Inc. | Methods and apparatus for managing and controlling power consumption and heat generation in computer systems |
CN103379166A (en) * | 2012-04-28 | 2013-10-30 | 孙羽 | Wireless sensing control network system based on Internet of Things |
CN104469915A (en) * | 2014-12-24 | 2015-03-25 | 北京极科极客科技有限公司 | Intelligent sleep method and device for wireless router |
CN106879007A (en) * | 2017-01-22 | 2017-06-20 | 新华三技术有限公司 | Method and device for controlling working state of wireless equipment |
CN108430087A (en) * | 2018-03-26 | 2018-08-21 | 新华三技术有限公司 | Power consumption control method, device and router |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116736964A (en) * | 2023-08-09 | 2023-09-12 | 南京启见半导体科技有限公司 | Self-adaptive control method for power consumption of memory system, electronic equipment and medium |
CN116736964B (en) * | 2023-08-09 | 2023-10-20 | 南京启见半导体科技有限公司 | Self-adaptive control method for power consumption of memory system, electronic equipment and medium |
CN117194172A (en) * | 2023-10-11 | 2023-12-08 | 珠海世宁达科技有限公司 | Network card power supply control method and related device |
CN117194172B (en) * | 2023-10-11 | 2024-03-22 | 珠海世宁达科技有限公司 | Network card power supply control method and related device |
Also Published As
Publication number | Publication date |
---|---|
CN114257474B (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9189053B2 (en) | Performance based power management of a memory and a data storage system using the memory | |
US9710050B2 (en) | Information processing device, semiconductor chip, information processing method, and computer program product | |
TWI475373B (en) | Control device, control method, computer program product, and electronic device | |
CN101802750B (en) | Apparatus and method for reducing power consumption of system on chip | |
EP3274787B1 (en) | Technologies for managing power of an embedded controller during a low-power state | |
CN114257474B (en) | Power utilization control method and device for intelligent gateway, computer equipment and storage medium | |
US20130254773A1 (en) | Control apparatus, control method, computer program product, and semiconductor device | |
US10379592B2 (en) | Power management of an NZE IoT device | |
TW200921358A (en) | Electronic system and power control method thereof | |
CN110286739B (en) | Power consumption control method and device of remote telemetry terminal | |
CN115718626A (en) | SOC (system on chip) system capable of being awakened quickly and quick awakening method | |
TWI517033B (en) | Conversion method for reducing power consumption and computing apparatus using the same | |
US20140002008A1 (en) | Method for charging battery and electronic device thereof | |
CN101414212A (en) | Method for performing booking work | |
CN106603526B (en) | WiFi/hotspot starting method and device | |
CN112732062B (en) | Energy management method and system for lightweight operating system of terminal of Internet of things | |
CN113783707A (en) | Sensor power supply method and device based on intelligent gateway and computer equipment | |
CN107422194B (en) | Screen static detection control method, storage device and mobile terminal | |
CN109215697B (en) | Control method, device and equipment for BBU battery electric energy metering | |
CN113778214B (en) | Power saving optimization method and device, mobile terminal and storage medium | |
CN118655955A (en) | Multi-core chip control circuit, method, integrated circuit and terminal equipment | |
CN117841765A (en) | Automatic power supply method and device and computer equipment | |
CN117998196A (en) | Video acquisition method, apparatus and computer readable storage medium | |
CN116185160A (en) | Power consumption control device and method, electronic device, and computer-readable storage medium | |
CN117492845A (en) | Vehicle controller awakening method and related device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20230411 Address after: Full Floor 14, Unit 3, Building 2, No. 11, Middle Spectra Road, Huangpu District, Guangzhou, Guangdong 510700 Applicant after: China Southern Power Grid Digital Grid Technology (Guangdong) Co.,Ltd. Address before: Room 86, room 406, No.1, Yichuang street, Zhongxin Guangzhou Knowledge City, Huangpu District, Guangzhou City, Guangdong Province Applicant before: Southern Power Grid Digital Grid Research Institute Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |