Disclosure of Invention
In view of the above, it is necessary to provide a low-cost power supply control method, apparatus, device and readable storage medium.
In a first aspect, a power supply control method includes:
acquiring a current electric quantity value of the equipment; the equipment adopts an energy collection power supply mode to supply power;
determining a target electric quantity value required by a target working stage of the equipment according to a preset power consumption table of the equipment and the current working stage of the equipment; the power consumption table stores corresponding relations between different working stages of the equipment and electric quantity values required by the different working stages; the target working phase comprises at least one working phase after the current working phase in the power consumption table;
and when the current electric quantity value is matched with the target electric quantity value, controlling the equipment to enter the target working stage.
In one embodiment, when the current operating phase of the device is an inactive phase, the target operating phase includes a plurality of active phases following the inactive phase in the power consumption table;
the determining a target electric quantity value required by a target working phase of the equipment according to a preset power consumption table of the equipment and the current working phase of the equipment comprises the following steps:
acquiring electric quantity values required by the plurality of starting stages according to a preset power consumption table of the equipment;
calculating the sum of the electric quantity values required by the plurality of starting phases as a target electric quantity value required by the target working phase;
when the current electric quantity value matches the target electric quantity value, controlling the equipment to enter the target working stage, including:
and when the current electric quantity value is matched with the target electric quantity value, starting the equipment according to a preset starting process.
In one embodiment, the method further comprises:
and when the current electric quantity value does not match the target electric quantity value, starting the equipment in stages according to the electric quantity values required by the plurality of starting stages.
In one embodiment, when the current operating phase of the device is a started phase, the target operating phase includes at least one service processing phase after the started phase in the power consumption table;
when the current electric quantity value matches the target electric quantity value, controlling the equipment to enter the target working stage, including:
and when the current electric quantity value is matched with the target electric quantity value required by the service processing stage, controlling the equipment to process the service corresponding to the service processing stage.
In one embodiment, the controlling the device to process the service corresponding to the service processing stage includes:
determining a safety electric quantity value required by the service processing stage according to the target electric quantity value required by the service processing stage and a preset safety coefficient;
and when the current electric quantity value is smaller than the safe electric quantity value, controlling the equipment to process the service by reducing the duty ratio of the equipment in the process of processing the service.
In one embodiment, the method further comprises:
and when the current electric quantity value does not match the target electric quantity value, controlling the equipment to enter a sleep period.
In one embodiment, after controlling the device to enter the sleep period, the method further comprises:
acquiring an electric quantity difference value between the target electric quantity value and the current electric quantity value, and determining expected sleep time according to the electric quantity difference value and a preset energy collection rate of an energy collection power supply mode;
when the expected sleep time is reached, the step of obtaining the current electric quantity value of the device is executed.
In a second aspect, a power supply control apparatus, the apparatus comprising:
the electric quantity acquisition module is used for acquiring the current electric quantity value of the equipment; the equipment adopts an energy collection power supply mode to supply power;
the target electric quantity value determining module is used for determining a target electric quantity value required by a target working stage of the equipment according to a preset power consumption table of the equipment and the current working stage of the equipment; the power consumption table stores corresponding relations between different working stages of the equipment and electric quantity values required by the different working stages; the target working phase comprises at least one working phase after the current working phase in the power consumption table;
and the power supply control module is used for controlling the equipment to enter the target working stage when the current electric quantity value is matched with the target electric quantity value.
In a third aspect, an apparatus includes an energy collection and power supply unit, a service execution unit, a memory, and a processor, where the memory stores a computer program, the energy collection and power supply unit is configured to supply power by using an energy collection and power supply method, the service execution unit is configured to execute a service, and the processor implements the following steps when executing the computer program:
acquiring a current electric quantity value of the equipment; the equipment adopts an energy collection power supply mode to supply power;
determining a target electric quantity value required by a target working stage of the equipment according to a preset power consumption table of the equipment and the current working stage of the equipment; the power consumption table stores corresponding relations between different working stages of the equipment and electric quantity values required by the different working stages; the target working phase comprises at least one working phase after the current working phase in the power consumption table;
and when the current electric quantity value is matched with the target electric quantity value, controlling the equipment to enter the target working stage.
In a fourth aspect, a readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a current electric quantity value of the equipment; the equipment adopts an energy collection power supply mode to supply power;
determining a target electric quantity value required by a target working stage of the equipment according to a preset power consumption table of the equipment and the current working stage of the equipment; the power consumption table stores corresponding relations between different working stages of the equipment and electric quantity values required by the different working stages; the target working phase comprises at least one working phase after the current working phase in the power consumption table;
and when the current electric quantity value is matched with the target electric quantity value, controlling the equipment to enter the target working stage.
For the above power supply control method, apparatus, device and readable storage medium, for a device powered by an energy collection power supply manner, because the power supply capability and stability of the energy collection power supply manner are insufficient, if a conventional manner of charging while supplying power is adopted, situations may occur that the device is suddenly powered off, the current power value cannot support complete start of the device or cannot support complete execution of the current service of the device, and the like, and therefore the present embodiment adopts a strategy of starting operation in stages and a robust power supply strategy of judging whether the target working stage can be supported according to the current power value, which may specifically be: the method comprises the steps that a control unit of the equipment obtains a current electric quantity value of the equipment in real time, and obtains a target electric quantity value required by a target working stage of the equipment from a preset power consumption table according to the current working stage of the equipment, when the current electric quantity value is matched with the target electric quantity value, the equipment is controlled to enter the target working stage, the situation that the equipment is in a waiting state for a long time due to the fact that the target electric quantity value required by one-time starting and running of the equipment is too high is avoided, and meanwhile the situations that the equipment is suddenly powered off, the current electric quantity value cannot support the complete starting of the equipment or cannot support the complete execution of; in addition, the embodiment is mainly an improvement in software, so that compared with the traditional scheme, the cost is reduced, and the method is suitable for low-cost scenes.
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 supply control method provided by the application can be applied to the application environment shown in fig. 1. Wherein, the device in fig. 1 may include: an energy collection power supply unit 11, a control unit 12, an energy evaluation unit 13 and a service execution unit 14; the energy collection power supply unit is used for charging in energy collection modes such as solar energy, light energy and radio frequency energy power supply and supplying power to other units at the same time, and the energy evaluation unit is used for detecting and evaluating the electric quantity value of a power supply in the energy collection power supply unit and feeding back the electric quantity value to the control unit; the control unit is used for controlling the on-off of the equipment and the service execution process in real time according to the electric quantity value of the power supply; the service execution unit is used for executing the service of the equipment, if the equipment is antenna equipment, the service mainly comprises the steps of detecting antenna operation data and reporting the antenna operation data to superior management equipment, and if the equipment is a server, the service mainly comprises user access service.
In one embodiment, as shown in fig. 2, a power supply control method is provided, which is described by taking the method as an example applied to the control unit in fig. 1, and includes the following steps:
s201, acquiring a current electric quantity value of equipment; the device is powered by an energy collection power supply mode.
It will be appreciated that the current charge of the device may be the amount of electrical energy that the device is currently capable of using. When the energy harvesting and power supplying unit of the device includes a plurality of power sources, the control unit may obtain current power values of the plurality of power sources, and sum up to obtain the current power value of the device.
The electric quantity value of the device may be the energy evaluation unit described aboveThe power supply of the equipment is detected, evaluated and fed back to the control unit, or directly evaluated by the control unit; the evaluation process may include: and acquiring the current voltage value of the power supply, and calculating the electric quantity value of the equipment according to the current voltage value and preset power supply parameters. Illustratively, the power source of the device is a capacitive energy storage element, and the electric quantity value E is 1/2C (U)1 2-U2 2) Where C is the capacitance of the power supply, U1Is the current voltage value, U, of the power supply2Is the safe voltage value of the power supply; the safe voltage value is larger than or equal to the minimum working voltage value of the power supply, and the minimum working voltage value of the power supply is determined by the safety characteristic of the power supply; similarly, the safe voltage value is larger than or equal to the minimum working voltage value required by the equipment, so that the problems of equipment power failure, service incapability and the like are avoided. The control unit can obtain a current voltage analog signal of the power supply, and perform analog-to-digital conversion on the current voltage analog signal to obtain a current voltage value of the power supply. Alternatively, the control unit may acquire the current electric quantity value of the device according to a preset period.
The device may employ energy harvesting methods such as solar, light, radio frequency energy power, etc. to charge the power source, so that the electrical quantity value of the device may be increased in real time when the device is in a sleep period.
S202, determining a target electric quantity value required by a target working stage of the equipment according to a preset power consumption table of the equipment and the current working stage of the equipment; the power consumption table stores corresponding relations between different working stages of the equipment and electric quantity values required by the different working stages; the target operating phase includes at least one operating phase following the current operating phase in the power consumption table.
Referring to the following table, a schematic diagram of a power consumption table is shown, in which the correspondence between different operating phases of the device and the required electric quantity values for the different operating phases is stored:
the working phases in the above exemplary power consumption table are arranged in a preset execution sequence from top to bottom, and may generally include an inactive phase, one or more active phases, one or more service processing phases, and an inactive phase.
The target working phase may include N working phases after the current working phase in the power consumption table, where N is greater than or equal to 1 and may be set according to actual requirements; different values can be set according to different current working stages so as to adapt to different scene requirements. Wherein, when the target working phase comprises a plurality of working phases, determining a target electric quantity value required by the target working phase of the equipment comprises: and acquiring and summing a plurality of electric quantity values required by a plurality of working stages corresponding to the target working stage, and taking the summation result as the target electric quantity value required by the target working stage. For example, if the current working phase is the first service processing phase, the target working phase may be at least one working phase after the first service processing phase, such as the second service processing phase, or the second and third service processing phases; accordingly, the target electric quantity values required for the target working phase are respectively: 2mWh or 7 mWh.
It will be appreciated that the electrical values required for the different operating phases of the apparatus may be obtained in advance by measurement; specifically, for example, for a certain service processing stage, the operating current I during service execution may be obtainediOperating voltage UiAnd execution time tiThe electric quantity value W required by the service processing stagei=UiIiti。
It should be noted that, in an implementation manner, the current working stage of the device may be determined according to an electrical parameter, such as a current working voltage or a current value of the device.
S203, when the current electric quantity value is matched with the target electric quantity value, controlling the equipment to enter the target working stage.
Illustratively, the matching of the current electric quantity value to the target electric quantity value may include: the current electric quantity value is greater than or equal to the target electric quantity value; the method can comprise the following steps: the difference value between the current electric quantity value and the target electric quantity value is greater than or equal to a preset safety electric quantity value; the method can comprise the following steps: and the ratio of the current electric quantity value to the target electric quantity value is greater than or equal to a preset safety factor, wherein the safety electric quantity value or the safety factor is set by considering the factors of the service life of the power supply, the safety of the power supply or the safety of power supply and the like. For example, the safety factor may be 1.5, i.e., when E > -1.5W, the control unit determines that the current charge value matches the target charge value. In one embodiment, the power consumption table further stores different safety factors or different safety electric quantity values corresponding to different working stages of the device; for example, the security requirement of the service processing phase is higher than that of the start-up phase, and the security coefficient or the security electric quantity value of the service processing phase is higher than that of the start-up phase.
It is understood that when the current electric quantity value matches the target electric quantity value, which means that the current power supply of the device can support the electric quantity required by the device in the target working phase, the device is controlled to enter the target working phase. It will be appreciated that when the target operation phase ends, the device may wait and cyclically execute the step 201 and 203 according to a preset period, i.e. start the operation in stages. Because the energy-harvesting power-supply unit of the device can continuously charge the power supply, when the power supply is sufficient (the current power value matches the target power value), the device can be controlled to enter the target working phase; when the power supply is low (the current power value does not match the target power value), the device may be controlled to wait and poll the power supply of the device until the power supply is sufficient.
In summary, the power supply control method of this embodiment, for a device that supplies power by using an energy collection power supply method, because both the power supply capacity and the stability of the energy collection power supply method are insufficient, if a conventional method of charging while supplying power is used, situations may occur that the device suddenly powers down, the current power value cannot support the complete start of the device, or cannot support the complete execution of the current service by the device, and the like, so the strategy of starting and operating in stages and the robust power supply strategy of determining whether to support the target working stage according to the current power value are used in this embodiment, and specifically, the strategy may be: the method comprises the steps that a control unit of the equipment obtains a current electric quantity value of the equipment in real time, and obtains a target electric quantity value required by a target working stage of the equipment from a preset power consumption table according to the current working stage of the equipment, when the current electric quantity value is matched with the target electric quantity value, the equipment is controlled to enter the target working stage, the situation that the equipment is in a waiting state for a long time due to the fact that the target electric quantity value required by one-time starting and running of the equipment is too high is avoided, and meanwhile the situations that the equipment is suddenly powered off, the current electric quantity value cannot support the complete starting of the equipment or cannot support the complete execution of; in addition, the embodiment is mainly an improvement in software, so that compared with the traditional scheme, the cost is reduced, and the method is suitable for low-cost scenes.
Optionally, referring to fig. 3, this embodiment relates to a power supply control process in a start-up phase of the device; specifically, when the current operating phase of the device is an inactive phase, and the target operating phase includes a plurality of active phases following the inactive phase in the power consumption table, the power supply control procedure of the active phase may include:
s301, acquiring the electric quantity values required by the multiple starting stages according to a preset power consumption table of the equipment.
Illustratively, referring to the power consumption table of the above example, when the current operating phase is an inactive phase and the target operating phase includes a first active phase and a second active phase, the electric quantity values required by the plurality of active phases include: an electrical quantity value required for the first start-up phase and an electrical quantity value required for the second start-up phase. The number of phases of the start-up of the device is generally fixed, and no more than 5 phases are recommended depending on the complexity of the system and the power consumption.
It can be understood that, when the current working phase of the device is the non-startup phase, the control unit may establish a basic operating context, establish an operating environment of the power supply control program, and then execute the power supply control program to implement the power supply control method of this embodiment.
In one embodiment, before S301, the control unit may obtain a preset starting electric quantity value required for the whole starting phase; when the current electric quantity value is matched with the starting electric quantity value, starting the equipment according to a preset standard starting process; and when the current electric quantity value does not match the starting electric quantity value, the step S301 is entered, and the staged starting is carried out.
And S302, calculating the sum of the electric quantity values required by the plurality of starting phases as a target electric quantity value required by the target working phase.
It is understood that, for example, the target electric quantity value required for the target operation phase is the sum of the electric quantity value required for the first start-up phase and the electric quantity value required for the second start-up phase, i.e. 0.5+0.3 ═ 0.8 mWh.
And S303, when the current electric quantity value is matched with the target electric quantity value, starting the equipment according to a preset starting process.
Illustratively, when the current electric quantity value matches the target electric quantity value, the device is started according to a preset starting process corresponding to the first starting stage, and after the first starting stage is finished, the device is started according to a preset starting process corresponding to the second starting stage.
Generally, a device needs to perform a plurality of stages of startup operations during a startup process, and for example, a room division antenna needs to perform a startup process such as initialization, loading of a main program, configuration of operating parameters, and the like. Therefore, for example, the preset starting procedure corresponding to the first starting stage may include an initialization process, the preset starting procedure corresponding to the second starting stage may include a process of loading a main program, and the preset starting procedure corresponding to the third starting stage may include a process of configuring a working parameter.
It will be appreciated that when the current charge value does not match the target charge value, the device is activated in stages according to the charge values required for the plurality of activation stages. For example, for the example of the target working phase, when the current electric quantity value matches the electric quantity value required by the first starting phase, the device is started according to a preset starting process corresponding to the first starting phase, that is, the device is initialized; and when the current electric quantity value is matched with the electric quantity value required by the second starting stage, starting the equipment according to a preset starting process corresponding to the second starting stage.
The power supply control method of the embodiment can be started in stages in the starting process of the equipment, so that the condition that the equipment is in a waiting state for a long time due to the fact that the target electric quantity value required by one-time starting and running of the equipment is too high is avoided, and meanwhile, the condition that the electric quantity is wasted due to the fact that the current electric quantity value cannot support the complete starting of the equipment is avoided.
Optionally, this embodiment relates to a power supply control process in a service processing stage of the device; specifically, when the current operating phase of the device is a started phase, and the target operating phase includes at least one service processing phase after the started phase in the power consumption table, the power supply control process of the service processing phase may include: and when the current electric quantity value is matched with the target electric quantity value required by the service processing stage, controlling the equipment to process the service corresponding to the service processing stage. Specifically, the control unit may send an identifier of the target working phase to a service execution unit, so as to instruct the service execution unit to execute a service processing phase corresponding to the identifier according to the identifier. The power supply control method of the embodiment can avoid that the equipment is in a waiting state for a long time due to the fact that the target electric quantity value required by executing all services at one time is too high, and meanwhile, the situations that the current electric quantity value cannot support the equipment to completely execute all services, so that electric quantity is wasted, the services are suddenly stopped and the like are avoided. In addition, when the current electric quantity value does not match the target electric quantity value required by the service processing stage, the service of the service processing stage can be suspended or cancelled.
In one embodiment, the control unit may obtain a preset traffic processing electric quantity value required by the whole traffic processing stage; when the current electric quantity value is matched with the service processing electric quantity value, controlling the equipment to process the service according to a preset standard service processing flow; and when the current electric quantity value does not match the service processing electric quantity value, executing the process of processing the service in stages.
Specifically, referring to fig. 4, the controlling the device to process the service corresponding to the service processing stage may specifically include:
s401, determining a safety electric quantity value required by the service processing stage according to the target electric quantity value required by the service processing stage and a preset safety factor.
The safety factors may be different for different service processing stages. Illustratively, when the service processing stage is the second service processing stage, the preset safety factor may be 1.5, and the safety electric quantity value is 5 × 1.5 ═ 7.5 mWh.
S402, when the current electric quantity value is smaller than the safe electric quantity value, controlling the equipment to process the service by reducing the duty ratio of the equipment in the process of processing the service.
At this time, the current electric quantity value is greater than the target electric quantity value, for example, 6mWh, but at this time, the current electric quantity value is smaller than the safety electric quantity value, which means that there is still a high possibility that the device cannot completely execute the service in executing the second service processing stage, and the duty ratio of the device in the process of processing the service can be reduced to control the device to process the service, where the duty ratio can be understood as a ratio of the working time of the device in the service processing stage for performing operations such as high power consumption to the total time required by the service processing stage. For example, for a room-division antenna device, the active part of the room-division antenna device is mainly monitoring and controlling services, and it needs to periodically detect the operating parameters of the antenna and communicate with the upper management device, report the parameters or receive instructions, so that the frequency of reporting the parameters can be reduced, for example, from 1 minute to 5 minutes.
In one embodiment, the control unit may decrease the duty ratio in processing the traffic according to a preset step size.
It can be understood that reducing the duty ratio is equivalent to reducing the power consumption rate of the device in the process of processing the service, so that the risk of sudden increase of power consumption in the process of executing the service can be prevented, and the condition that the service is suddenly stopped due to insufficient power consumption caused by sudden increase of the power consumption can be avoided.
Optionally, the present embodiment relates to a process in which the control unit controls the device to enter the sleep period when the current electric quantity value does not match the target electric quantity value; the method specifically comprises the following steps: and when the current electric quantity value does not match the target electric quantity value, controlling the equipment to enter a sleep period. When the current electric quantity value does not match the target electric quantity value, the electric quantity required by the equipment in the target working stage cannot be supported by the power supply of the current equipment, if the equipment is controlled to enter the target working stage, the problems that the equipment is powered off, services cannot be completed and the like are easily caused, so that the control unit controls the equipment to enter a dormant period, the increase of the electric consumption of the equipment is avoided, meanwhile, the energy collection and power supply unit of the equipment can continuously charge the power supply, and the waiting time of the equipment can be reduced.
In one embodiment, referring to fig. 5, after controlling the device to enter the sleep period, the method may further include:
s501, acquiring an electric quantity difference value between the target electric quantity value and the current electric quantity value, and determining expected sleep time according to the electric quantity difference value and a preset energy collection rate of an energy collection power supply mode.
The preset energy collection rate may be an energy collection rate obtained by the control unit calculating an electric quantity value change rate according to electric quantity values of the device at different times during the sleep period, or an energy collection rate obtained by testing in advance. In one embodiment, the control unit may obtain the expected sleep time according to a ratio of the power difference to a preset energy collection rate of the energy collection power supply mode. In addition, the control unit can also take the factors such as the safety factor or the safety electric quantity value into consideration to prolong the expected sleep time.
S502, when the expected sleep time is reached, the step of acquiring the current electric quantity value of the equipment is executed.
When the expected sleep time is reached, which means that the power is sufficient, and the target working period that the equipment cannot perform because the current power value does not match the target power value is already available, the step of processing 201 and 203 is performed; compared with the scheme of performing the steps 201-203 according to the preset period, the power supply control method of the embodiment reduces the sleep time on the basis of ensuring that the target working phase can be executed when the expected sleep time is reached, and simultaneously reduces the problem of electric quantity waste caused by performing the steps 201-202 too frequently.
It should be understood that although the various steps in the flow charts 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 sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 6, there is provided a power supply control device including: electric quantity acquisition module 61, target electric quantity value determination module 62 and power supply control module 63, wherein:
the electric quantity obtaining module 61 is used for obtaining the current electric quantity value of the equipment; the equipment adopts an energy collection power supply mode to supply power;
a target electric quantity value determining module 62, configured to determine a target electric quantity value required by a target operating phase of the device according to a preset power consumption table of the device and a current operating phase of the device; the power consumption table stores corresponding relations between different working stages of the equipment and electric quantity values required by the different working stages; the target working phase comprises at least one working phase after the current working phase in the power consumption table;
and the power supply control module 63 is used for controlling the equipment to enter the target working stage when the current electric quantity value is matched with the target electric quantity value.
Optionally, referring to fig. 7, on the basis of fig. 6, when the current operating phase of the device is an inactive phase, and the target operating phase includes a plurality of active phases following the inactive phase in the power consumption table; the target electric quantity value determination module 62 may include:
a starting electric quantity value obtaining unit 621, configured to obtain electric quantity values required by the multiple starting stages according to a preset power consumption table of the device;
a first target electric quantity value determination unit 622 for calculating the sum of the electric quantity values required for the plurality of startup phases as the target electric quantity value required for the target operation phase;
the power supply control module 63 may include:
and the starting control unit 631 is used for starting the equipment according to a preset starting process when the current electric quantity value matches the target electric quantity value.
Optionally, as shown in fig. 7, the apparatus may further include:
a staged startup module 64, configured to start up the apparatus in stages according to the electric quantity values required by the plurality of startup stages when the current electric quantity value does not match the target electric quantity value.
Optionally, referring to fig. 7, when the current working phase of the device is a started phase, and the target working phase includes at least one service processing phase after the started phase in the power consumption table; the power supply control module 63 may include:
a service processing control unit 632, configured to control the device to process a service corresponding to the service processing stage when the current power value matches the target power value required by the service processing stage.
Optionally, the service processing control unit is specifically configured to determine a safety electric quantity value required by the service processing stage according to a target electric quantity value required by the service processing stage and a preset safety factor; and when the current electric quantity value is smaller than the safe electric quantity value, controlling the equipment to process the service by reducing the duty ratio of the equipment in the process of processing the service.
Optionally, the apparatus may further include:
and a sleep control module 65 for controlling the device to enter a sleep period when the current electric quantity value does not match the target electric quantity value.
Optionally, after controlling the device to enter the sleep period, the apparatus may further include:
a sleep time determination module 66, configured to obtain an electric quantity difference between the target electric quantity value and the current electric quantity value, and determine an expected sleep time according to the electric quantity difference and a preset energy collection rate of the energy collection power supply manner;
a sleep stop module 67, configured to execute the step of obtaining the current electric quantity value of the device when the expected sleep time is reached.
In a word, the power supply control device of the embodiment can avoid that the equipment is in a waiting state for a long time due to an excessively high target electric quantity value required for starting the running equipment at one time, and simultaneously avoid the situations that the equipment is suddenly powered off, the current electric quantity value cannot support the complete starting of the equipment or cannot support the complete execution of the current service of the equipment and the like; in addition, the embodiment is mainly an improvement in software, so that compared with the traditional scheme, the cost is reduced, and the method is suitable for low-cost scenes.
For specific limitations of the power supply control device, reference may be made to the above limitations of the power supply control method, which are not described herein again. The modules in the power supply control device can be wholly or partially 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, an apparatus is provided, which includes an energy harvesting power supply unit, a memory and a processor, the memory storing a computer program, the energy harvesting power supply unit being configured to supply power in an energy harvesting power supply manner, the service execution unit being configured to execute a service, and the processor implementing the following steps when executing the computer program:
acquiring a current electric quantity value of the equipment; the equipment adopts an energy collection power supply mode to supply power;
determining a target electric quantity value required by a target working stage of the equipment according to a preset power consumption table of the equipment and the current working stage of the equipment; the power consumption table stores corresponding relations between different working stages of the equipment and electric quantity values required by the different working stages; the target working phase comprises at least one working phase after the current working phase in the power consumption table;
and when the current electric quantity value is matched with the target electric quantity value, controlling the equipment to enter the target working stage.
In one embodiment, when the current operating phase of the device is an inactive phase, the target operating phase includes a plurality of active phases following the inactive phase in the power consumption table; the processor, when executing the computer program, further performs the steps of: acquiring electric quantity values required by the plurality of starting stages according to a preset power consumption table of the equipment; calculating the sum of the electric quantity values required by the plurality of starting phases as a target electric quantity value required by the target working phase; and when the current electric quantity value is matched with the target electric quantity value, starting the equipment according to a preset starting process.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when the current electric quantity value does not match the target electric quantity value, starting the equipment in stages according to the electric quantity values required by the plurality of starting stages.
In one embodiment, when the current operating phase of the device is a started phase, the target operating phase includes at least one service processing phase following the started phase in the power consumption table; the processor, when executing the computer program, further performs the steps of: and when the current electric quantity value is matched with the target electric quantity value required by the service processing stage, controlling the equipment to process the service corresponding to the service processing stage.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a safety electric quantity value required by the service processing stage according to the target electric quantity value required by the service processing stage and a preset safety coefficient; and when the current electric quantity value is smaller than the safe electric quantity value, controlling the equipment to process the service by reducing the duty ratio of the equipment in the process of processing the service.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when the current electric quantity value does not match the target electric quantity value, controlling the equipment to enter a sleep period.
In one embodiment, the processor, when executing the computer program, further performs the steps of: after the device is controlled to enter a sleep period, acquiring an electric quantity difference value between the target electric quantity value and the current electric quantity value, and determining expected sleep time according to the electric quantity difference value and a preset energy collection rate of an energy collection power supply mode; when the expected sleep time is reached, the step of obtaining the current electric quantity value of the device is executed.
Referring to fig. 8, a schematic diagram of the above device is shown, wherein a processor 81 may be connected to the memory 83, the energy collection and power supply unit 84, and the service execution unit 85 through a bus 82; the energy harvesting power supply unit also supplies power via the bus 82. The energy collection power supply unit can comprise an energy conversion circuit, a power conversion circuit, a capacitance energy storage component and the like. Optionally, the device is an internet of things device. It will be appreciated that the processor and memory described above correspond to the control unit in fig. 1; the apparatus may further comprise the energy assessment unit of fig. 1.
Those skilled in the art will appreciate that the configuration shown in fig. 8 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the devices to which the present application applies, and that a particular device 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 readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a current electric quantity value of the equipment; the equipment adopts an energy collection power supply mode to supply power;
determining a target electric quantity value required by a target working stage of the equipment according to a preset power consumption table of the equipment and the current working stage of the equipment; the power consumption table stores corresponding relations between different working stages of the equipment and electric quantity values required by the different working stages; the target working phase comprises at least one working phase after the current working phase in the power consumption table;
and when the current electric quantity value is matched with the target electric quantity value, controlling the equipment to enter the target working stage.
In one embodiment, when the current operating phase of the device is an inactive phase, the target operating phase includes a plurality of active phases following the inactive phase in the power consumption table; the computer program when executed by the processor further realizes the steps of: acquiring electric quantity values required by the plurality of starting stages according to a preset power consumption table of the equipment; calculating the sum of the electric quantity values required by the plurality of starting phases as a target electric quantity value required by the target working phase; and when the current electric quantity value is matched with the target electric quantity value, starting the equipment according to a preset starting process.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when the current electric quantity value does not match the target electric quantity value, starting the equipment in stages according to the electric quantity values required by the plurality of starting stages.
In one embodiment, when the current operating phase of the device is a started phase, the target operating phase includes at least one service processing phase following the started phase in the power consumption table; the computer program when executed by the processor further realizes the steps of: and when the current electric quantity value is matched with the target electric quantity value required by the service processing stage, controlling the equipment to process the service corresponding to the service processing stage.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining a safety electric quantity value required by the service processing stage according to the target electric quantity value required by the service processing stage and a preset safety coefficient; and when the current electric quantity value is smaller than the safe electric quantity value, controlling the equipment to process the service by reducing the duty ratio of the equipment in the process of processing the service.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when the current electric quantity value does not match the target electric quantity value, controlling the equipment to enter a sleep period.
In one embodiment, the computer program when executed by the processor further performs the steps of: after the device is controlled to enter a sleep period, acquiring an electric quantity difference value between the target electric quantity value and the current electric quantity value, and determining expected sleep time according to the electric quantity difference value and a preset energy collection rate of an energy collection power supply mode; when the expected sleep time is reached, the step of obtaining the current electric quantity value of the device is executed.
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 may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
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.