CN110658901B - Distribution method and device - Google Patents

Distribution method and device Download PDF

Info

Publication number
CN110658901B
CN110658901B CN201910810202.5A CN201910810202A CN110658901B CN 110658901 B CN110658901 B CN 110658901B CN 201910810202 A CN201910810202 A CN 201910810202A CN 110658901 B CN110658901 B CN 110658901B
Authority
CN
China
Prior art keywords
parameter
capability
application
determining
maximum preset
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.)
Active
Application number
CN201910810202.5A
Other languages
Chinese (zh)
Other versions
CN110658901A (en
Inventor
李洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201910810202.5A priority Critical patent/CN110658901B/en
Publication of CN110658901A publication Critical patent/CN110658901A/en
Application granted granted Critical
Publication of CN110658901B publication Critical patent/CN110658901B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a distribution method, which is applied to first equipment with a specified application, and comprises the following steps: under the condition of receiving the capability provided by second equipment, acquiring a first parameter of the second equipment, wherein the first parameter represents the capability which can be provided by the second equipment; under the condition of providing capacity for third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment; determining a third parameter and a fourth parameter based on the first parameter and the second parameter, the third parameter characterizing a capability to be allocated to the third device, the fourth parameter characterizing a capability to be allocated to the specified application. The invention also discloses a distribution device.

Description

Distribution method and device
Technical Field
The invention relates to a capacity allocation technology, in particular to an allocation method and an allocation device.
Background
When a user uses a second device such as a notebook computer, a desktop computer, a tablet computer, or a mobile phone, if the user wants to use a specific function on a third device having a specific function, the third device and the second device are usually connected first, and then the third device is powered by a first device having a power supply function.
Disclosure of Invention
In view of the above, the embodiments of the present invention are intended to provide a distribution method and apparatus.
The technical scheme of the embodiment of the invention is realized as follows:
according to an aspect of the embodiments of the present invention, there is provided an allocation method applied to a first device having a specific application, the method including:
under the condition of receiving the capability provided by second equipment, acquiring a first parameter of the second equipment, wherein the first parameter represents the capability which can be provided by the second equipment;
under the condition of providing capacity for third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment;
determining a third parameter and a fourth parameter based on the first parameter and the second parameter, the third parameter characterizing a capability to be allocated to the third device, the fourth parameter characterizing a capability to be allocated to the specified application.
In the foregoing scheme, the obtaining a second parameter of the third device includes:
and receiving an ability requirement instruction sent by the third device, where the ability requirement instruction carries the second parameter, and the second parameter includes a system power consumption parameter and a battery power parameter of the third device.
In the foregoing solution, before the determining the third parameter and the fourth parameter based on the first parameter and the second parameter, the method further includes:
acquiring a maximum preset parameter of the specified application, wherein the maximum preset parameter represents the maximum preset capacity requirement of the specified application;
the determining a third parameter and a fourth parameter based on the first parameter and the second parameter comprises:
calculating the sum of the second parameter and the maximum preset parameter to obtain a fifth parameter;
comparing the first parameter with the fifth parameter to obtain a comparison result;
determining the maximum preset parameter of the designated application as the fourth parameter when the comparison result indicates that the first parameter is greater than the fifth parameter; and determining the difference value between the first parameter and the maximum preset parameter as the third parameter.
In the above scheme, the method further comprises:
acquiring capacity allocation priority information when the comparison result represents that the first parameter is smaller than the fifth parameter;
determining the maximum preset parameter of the designated application as the fourth parameter under the condition that the representation of the capability distribution priority information gives priority to the capability provided by the designated application; determining a difference value between the first parameter and the maximum preset parameter as the third parameter;
or, when the capability allocation priority information represents that the capability is preferentially provided for the second device, acquiring a minimum preset parameter of the designated application, where the minimum preset parameter of the designated application represents a minimum preset capability requirement of the designated application;
determining the minimum preset parameter of the specified application as the fourth parameter; and determining the difference value of the first parameter and the minimum preset parameter as the third parameter.
In the above scheme, the method further comprises:
detecting the use state of the specified application under the condition that the comparison result represents that the first parameter is smaller than the fifth parameter;
when the use state represents that the designated application is in a working state, acquiring a minimum preset parameter of the designated application, wherein the minimum preset parameter of the designated application represents a minimum preset capacity requirement of the designated application;
determining the minimum preset parameter of the specified application as the fourth parameter; determining a difference value between the first parameter and the minimum preset parameter as the third parameter;
or, when the usage status indicates that the designated application is in a non-working state, determining the fourth parameter to be zero, determining the first parameter to be the third parameter,
in the foregoing scheme, the obtaining a first parameter of the second device includes:
sending a capability acquisition instruction to the second device;
and receiving the first parameter sent by the second equipment in response to the capability acquisition instruction.
According to another aspect of the embodiments of the present invention, there is provided an allocation method applied to a third device, the method including:
sending a capacity demand instruction to a first device under the condition of receiving capacity provided by the first device, wherein the capacity demand instruction carries a second parameter, and the second parameter represents the capacity demand of a third device;
receiving a third parameter sent by the first device based on the second parameter and a first parameter of a second device for providing the first device with the capability, wherein the first parameter characterizes the capability which can be provided by the second device, and the third parameter characterizes the capability which is allocated to the third device by the first device.
According to a third aspect of embodiments of the present invention, there is provided a dispensing device, the device comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first parameter of a second device under the condition of receiving a capability provided by the second device, and the first parameter represents the capability which can be provided by the second device; under the condition of providing the capacity for the third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment;
a determining unit configured to determine, based on the first parameter and the second parameter, a third parameter and a fourth parameter, the third parameter characterizing a capability to be allocated to the third device, and the fourth parameter characterizing a capability to be allocated to the specified application.
According to a fourth aspect of embodiments of the present invention, there is provided a dispensing device, the device comprising:
a sending unit, configured to send a capability requirement instruction to a first device when receiving a capability provided by the first device, where the capability requirement instruction carries a second parameter, and the second parameter represents a capability requirement of a third device;
a receiving unit, configured to receive a third parameter sent by the first device based on the second parameter and a first parameter of a second device for providing a capability to the first device, where the first parameter characterizes a capability that the second device can provide, and the third parameter characterizes a capability allocated to the third device by the first device.
According to a fifth aspect of embodiments of the present invention, there is provided a dispensing apparatus, the apparatus comprising: the method comprises the following steps: a processor and a memory for storing a computer program operable on the processor, wherein the processor is operable to perform the steps of any of the above-described allocation methods when executing the computer program.
According to the distribution method and the distribution device provided by the embodiment of the invention, the first parameter of the second equipment is obtained under the condition of receiving the capability provided by the second equipment, and the first parameter represents the capability which can be provided by the second equipment; under the condition of providing capacity for third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment; determining a third parameter and a fourth parameter based on the first parameter and the second parameter, the third parameter characterizing a capability to be allocated to the third device, the fourth parameter characterizing a capability to be allocated to the specified application. In this way, according to the capability that the second device can provide and the capability requirement of the third device, the capability that the first device needs to allocate the specified application and the third device in the first device is dynamically adjusted, so that the normal operation of the third device and the specified application can be ensured, and the capability allocated to the third device and the specified application can be maximized.
Drawings
FIG. 1 is a first schematic flow chart of an implementation of the distribution method in the present application;
FIG. 2 is a schematic diagram of a power type library of a charger according to the present application;
FIG. 3 is a schematic diagram of a usage scenario library of a third device in the present application;
FIG. 4 is a second flowchart illustrating an implementation of the allocation method according to the present application;
FIG. 5 is a first schematic view of a dispensing device according to the present application;
FIG. 6 is a schematic structural diagram of a second dispensing device according to the present application;
FIG. 7 is a third schematic view of the structure of the dispensing device of the present application;
fig. 8 is a schematic structural component diagram of the distribution system of the present application.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a schematic flow chart of an implementation of the allocation method in the present application, as shown in fig. 1, the method includes:
step 101, acquiring a first parameter of a second device when receiving a capability provided by the second device, wherein the first parameter represents the capability which can be provided by the second device;
in this application, the method is mainly applied to a first device having a specific application, and the first device may implement a specific function through the specific application, for example: the specific function may be an audio function, a storage function, a charging function, a projection function, a display function, a heat dissipation function, an information input function, and the like. Here, the first device may be a Docking Station (Docking Station) for expanding functions of a third device such as a notebook, a mobile phone, a desktop, a tablet, etc., and the first device may be connected to a plurality of devices (such as a printer, a scanner, a driver, etc.) through interfaces and slots, wherein the plurality of devices further include the third device.
When a user uses a first device to implement a specific function on the first device, it is also often necessary to connect with a second device through an interface or slot on the first device to provide the first device with the capability to implement the specific function through the second device.
For example, the second device is a charging device having a charging function, and the second device can supply power to the first device in a state where the first device and the second device are connected, so that the first device can operate normally.
In this application, when the first device receives the capability provided by the second device, if it wants to know the power type of the second device, the first device may further send a capability obtaining instruction to the second device to obtain the first parameter of the second device. Here, the first parameter characterizes a capability that the second device is capable of providing. After receiving the capability obtaining instruction, the second device may send the first parameter of the second device to the first device based on the capability obtaining instruction. After the first device receives the first parameter sent by the second device, the power type of the second device can be determined based on a preset power type library of the charger. Thereby facilitating subsequent dynamic allocation of power by the first device to the second device. As shown in particular in fig. 2.
Fig. 2 is a schematic diagram of a power type library of the charger in the present application. As shown in fig. 2, the power type library 200 of the charger includes five power types, which are: type 201, power less than 10 watts, which may be denoted by "< 10W"; type 202, which represents a power less than 15 watts, may be represented by "< 15W"; type 203, which represents a power less than 20 watts, may be represented by "< 20W"; type 204, which represents a power less than 27 watts, may be represented by "< 27W"; type 205, representing a power greater than 30 watts, may be represented by "> 30W".
102, acquiring a second parameter of a third device under the condition of providing capacity for the third device, wherein the second parameter represents the capacity requirement of the third device;
in this application, the third device may specifically be an intelligent device such as a notebook computer, a tablet computer, a desktop computer, a mobile phone, a television, a watch, and the like.
When the first device is connected with the third device through the interface or the slot, the first device and the third device are in a connected state, and the first device can provide the capability for the third device. Here, the capability provided by the first device to the third device may specifically refer to power, that is, the first device may provide power for the third device by connecting the first device with the third device.
For example, when the first device itself has an electric energy storage function, the first device itself may supply electric energy to the third device. When the first device does not have the power storage function itself, the first device may supply power to the third device through the second device capable of supplying power to the first device. In other words, the first device may obtain power through the second device and then distribute the obtained power to the third device.
In this application, when the third device is in a connection state with the first device, the third device may further obtain current system power consumption information and battery power consumption information of the third device, and generate a capability requirement instruction based on the system power consumption information and the battery power consumption information. And the first device receives the capacity demand instruction sent by the third device to obtain a second parameter of the third device.
Here, the second parameter characterizes a capability requirement of the third device, for example, the second parameter includes a system power parameter and a battery power parameter of the third device.
As such, the first device may determine the capabilities to be allocated to the third device based on the second parameters of the third device.
In the application, when the third device obtains the system power consumption information, the current use state of each application program is obtained according to the detection result by specifically detecting the current use scene of each application program in the third device, so that the current system power consumption information of the third device is obtained according to the use state of each application program.
For example, the third device determines that the video application and the chat application in the third device are both in a working state and the other applications are in a non-working state by detecting states of the application programs in the third device, at this time, the third device may obtain the power consumption parameters corresponding to the video application and the chat application from a power consumption library of the battery, and use a sum of the power consumption parameters corresponding to the video application and the power consumption parameters corresponding to the chat application as the current system power consumption parameter.
Fig. 3 is a schematic view of a usage scenario library of a third device in the present application, and as shown in fig. 3, the usage scenario library 300 of the third device includes five scenario types, which are respectively: video 301, game 302, chat 303, music 304, standby or sleep 305. When the third device detects that the video application in the third device is in the working state, the current usage scenario in the third device is characterized as follows: a video 301; when the third device detects that the video application and the chat application in the third device are both in the working state, the representation of the current usage scenario in the third device is as follows: video 301 and chat 303.
Step 103, determining a third parameter and a fourth parameter based on the first parameter and the second parameter, the third parameter characterizing a capability to be allocated to the third device, and the fourth parameter characterizing a capability to be allocated to the specified application.
In the application, after the first device obtains the first parameter of the second device and the second parameter of the third device, the first device may further obtain a maximum preset parameter of a specified application in the first device, where the maximum preset parameter represents a maximum preset capability requirement of the specified application.
Here, the maximum preset parameter of the specific application may be a parameter set by the first device before factory shipment, or may be a parameter set by a user according to a requirement, and is not limited specifically.
In this application, when the first device determines the third parameter and the fourth parameter based on the first parameter and the second parameter, the first device may specifically calculate a sum of the second parameter and the maximum preset parameter to obtain a fifth parameter; then comparing the first parameter with the fifth parameter to obtain a comparison result; determining the maximum preset parameter of the specified application as the fourth parameter when the comparison result indicates that the first parameter is greater than the fifth parameter; and determining the difference value between the first parameter and the maximum preset parameter as the third parameter. Therefore, the third equipment and the designated application can be allocated to the maximum capacity, and the third equipment and the designated application can be ensured to normally work at the maximum power.
Here, the fifth parameter characterizes a sum of power consumption requirements of the third device and the specified application. By comparing the first parameter of the second device with the fifth parameter, it can be determined whether the capability provided by the second device can meet the capability requirements of both the third device and the specified application.
In this application, if the comparison result indicates that the first parameter of the second device is smaller than the fifth parameter, the capability that the second device can provide cannot enable the third device and the designated application to be allocated to the maximum capability, and at this time, the first device may obtain capability allocation priority information from the third device; and determining to which the capacity is preferentially allocated according to the capacity allocation priority information, thereby realizing the purpose of allocating the capacity to the third equipment and the designated application.
Specifically, when the first device determines to preferentially provide the capability for the designated application according to the capability allocation priority information, the first device may determine the maximum preset parameter of the designated application as the fourth parameter; and determining the difference value between the first parameter and the maximum preset parameter as the third parameter.
For example, the first device is an audio device, the second device is a charger for supplying power to the audio device, and the third device is a notebook computer connected to the audio device.
When the sound equipment determines that the sound equipment is prior according to the capability distribution priority information, the first equipment can distribute the power of the charger to the sound equipment in priority according to the power type of the charger, and then distribute the residual power of the charger to the notebook computer. Therefore, the sound equipment can be ensured to normally work at the maximum power.
In the application, the first parameter of the second device can also be directly compared with the maximum preset parameter of the specified application, and a comparison result is obtained. When the comparison result indicates that the first parameter of the second device is smaller than the maximum preset parameter of the designated application, it indicates that the power of the second device is smaller than the maximum preset power of the designated application, and at this time, the first device may completely provide the power of the second device to the designated application, so as to ensure that the designated application can normally operate at the maximum power. If the comparison result indicates that the first parameter of the second device is greater than the maximum preset parameter of the designated application, it indicates that the power of the second device is greater than the maximum preset power of the designated application, at this time, the first device may allocate the maximum preset power to the designated application from the power of the second device, and then allocate the remaining power of the second device to the third device. Therefore, the electric energy can be supplied to the third equipment while the specified application can normally work at the maximum power.
In the application, when the first device determines to preferentially provide the capability for the third device according to the capability allocation priority information, the minimum preset parameter of the designated application can be obtained, wherein the minimum preset parameter of the designated application represents the minimum preset capability requirement of the designated application; then, determining the minimum preset parameter of the specified application as the fourth parameter; determining the difference between the first parameter and the minimum preset parameter as the third parameter.
For example, the first device is an audio device, the second device is a charger for supplying power to the audio device, and the third device is a notebook computer connected to the audio device, wherein the power of the charger is 15W, the minimum power requirement of a designated application in the audio device is 2W, and when the audio device determines that the notebook computer is prioritized according to the capability allocation priority information, the audio device may preferentially allocate 2W from the power 15W of the charger to the designated application in the audio device according to the power type of the charger, and then allocate the remaining power (15W-2W — 13W) of the charger to the notebook computer. Therefore, the third equipment can obtain the maximum power to normally work under the condition that the normal work is realized by the minimum power in the specified application.
In this application, the sound equipment carries out normal work with the biggest power of predetermineeing and carries out the difference of normal work with the minimum power of predetermineeing that the sound equipment's audio quality is different. The sound effect quality output by the maximum preset power is higher than that output by the minimum preset power.
In the present application, the maximum system power consumption, the maximum battery power consumption, the minimum system power consumption, and the minimum battery power consumption are preset in the third device. The sum of the maximum system power consumption and the maximum battery power consumption can be used as the maximum power requirement of the third device; the sum of power consumption, which is the minimum system power consumption and the minimum battery power consumption, may be the minimum power requirement of the third device.
In this application, the first device may further obtain a maximum power parameter and a minimum power parameter of the third device, where the maximum power parameter represents a maximum power requirement of the third device, and the minimum power parameter represents a minimum power requirement of the third device. And then, directly comparing the first parameter of the second device with the maximum power parameter of the third device to obtain a comparison result. When the comparison result indicates that the first parameter of the second device is smaller than the maximum power parameter of the third device, it indicates that the power of the second device is smaller than the maximum power requirement of the third device, then the minimum preset power corresponding to the specified application is allocated from the power of the second device to the specified application in the first device, and then the remaining power of the second device is allocated to the third device, so as to ensure that the specified application can normally work with the minimum power and simultaneously allocate the maximum power to the third device.
In this application, when the comparison result indicates that the first parameter of the second device is greater than the maximum power parameter of the third device, it indicates that the power of the second device is greater than the maximum power requirement of the third device, and the first device may further compare the first parameter of the second device with the sum of the maximum power parameter of the third device and a minimum preset parameter of a specified application, and obtain the comparison result. When the comparison result indicates that the first parameter of the second device is greater than the sum of the maximum power parameter of the third device and the minimum preset parameter of the designated application, the power of the second device can meet the maximum power requirement of the third device and the minimum power requirement of the designated application, the power of the second device is preferentially distributed to the third device to meet the maximum power requirement of the third device, and then the residual power of the second device is distributed to the designated application.
In this application, when the comparison result indicates that the first parameter of the second device is smaller than the sum of the maximum power parameter of the third device and the minimum preset parameter of the designated application, the minimum preset power corresponding to the designated application needs to be allocated to the designated application in the first device from the power of the second device, and then the remaining power of the second device needs to be allocated to the third device, so as to ensure that the designated application can normally operate at the minimum power and allocate the maximum power to the third device.
In this application, the first device may further compare the first parameter of the second device with the minimum power parameter of the third device, and obtain a comparison result. When the comparison result indicates that the first parameter of the second device is smaller than the minimum power parameter of the third device, it indicates that the power of the second device cannot meet the minimum power requirement of the third device, the minimum preset power corresponding to the designated application is firstly distributed from the power of the second device to the designated application in the first device, and then the remaining power of the second device is distributed to the third device, so as to ensure that the designated application can normally work at the minimum power.
When the comparison result indicates that the first parameter of the second device is greater than the minimum power parameter of the third device, it indicates that the power of the second device can meet the minimum power requirement of the third device, the minimum power corresponding to the third device is firstly distributed to the third device from the power of the second device, and then the remaining power of the second device is distributed to the designated application in the first device, so as to ensure that the third device can normally work at the minimum power.
In this application, if the power of the second device is greater than the sum of the maximum power requirement of the third device and the maximum preset power requirement of the specified application, the maximum power required by the third device may be provided for the third device, and the maximum power required by the first device may also be provided for the first device, so that it may be ensured that both the third device and the first device can normally operate at the maximum power.
In this application, when the first parameter of the second device is smaller than the fifth parameter, the first device may further detect a use state of the specified application; when the use state represents that the designated application is in a working state, acquiring a minimum preset parameter of the designated application, wherein the minimum preset parameter of the designated application represents a minimum preset capacity requirement of the designated application; then, determining the minimum preset parameter of the specified application as a fourth parameter; determining the difference value between the first parameter and the minimum preset parameter as a third parameter; or, when the use state indicates that the specified application is in the non-working state, determining that the fourth parameter is zero, and determining that the first parameter is the third parameter.
For example, when a first device is in a sleep state, an off state, or a standby state, indicating that the first device is currently in an inactive state, the first power of the second device may be fully allocated to the third device. When the first device is in an open state or a running state, the first device is represented to be in a working state at present, at this time, the minimum preset parameter of the first device can be obtained, the minimum preset power meeting the representation of the minimum preset parameter of the specified application is distributed to the specified application from the first power of the second device, and then the residual power in the second device is all supplied to the third device.
In this application, the power of the second device is equal to the power requirement of the first device + the power requirement of the third device; wherein the power requirements of the third device include system power requirements and battery power requirements of the third device.
By the allocation method, the second equipment of multiple types can be charged for the first equipment, and the power allocated to the third equipment and the designated application of the first equipment by the first equipment can be dynamically adjusted according to the power type of the second equipment and the power requirement of the third equipment, so that the third equipment and the designated application can normally work.
Fig. 4 is a schematic flow chart of an implementation process of the allocation method in the present application, as shown in fig. 4, the method includes:
step 401, sending a capability requirement instruction to a first device when receiving a capability provided by the first device, where the capability requirement instruction carries a second parameter, and the second parameter represents a capability requirement of a third device;
in this application, the method is mainly applied to an intelligent terminal, for example, the intelligent terminal may be a notebook computer, a tablet computer, a projector, a printer, a desktop computer, or the like, and the intelligent terminal may be connected to a first device having an extended function through an interface or a slot to implement a function that the intelligent terminal does not have, and hereinafter, the intelligent terminal is referred to as a third device.
In this application, when the third device is in a connected state with the first device, the third device may obtain the current usage state of each application program according to the detection result by detecting the current usage scene of each application program in the third device, so as to obtain the current system power consumption information of the third device according to the usage state of each application program.
For example, the third device determines that the video application and the chat application in the third device are both in a working state and the other applications are in a non-working state by detecting states of the application programs in the third device, at this time, the third device may obtain the power consumption parameters corresponding to the video application and the chat application from a power consumption library of the battery, and use a sum of the power consumption parameters corresponding to the video application and the power consumption parameters corresponding to the chat application as the current system power consumption parameter.
After the third device obtains the current system power consumption information of the third device, the battery power consumption information of the third device can also be obtained, and then, a capacity demand instruction is generated based on the system power consumption information and the battery power consumption information. And sending the capability requirement instruction to the first device so that the first device can obtain the second parameter of the third device based on the capability requirement instruction.
Here, the second parameter characterizes a capability requirement of the third device, for example, the second parameter includes a system power consumption parameter and a battery power parameter of the third device.
As such, the first device may determine the capabilities to be allocated to the third device based on the second parameters of the third device.
Fig. 3 is a schematic diagram illustrating type classification of usage scenarios in a third device in the present application, as shown in fig. 3, the usage scenarios of the third device include five types, which are respectively: video, game, chat, music, standby, or sleep. When the third device detects that the video application in the third device is in a working state, the current use scene in the third device is represented as 'video'; when the third device detects that the video application and the chat application in the third device are both in working states, the current usage scene in the third device is characterized as video and chat.
Step 402, receiving a third parameter sent by the first device based on the second parameter and a first parameter of a second device for providing a capability to the first device, wherein the first parameter characterizes the capability that the second device can provide, and the third parameter characterizes a capability allocated to the third device by the first device.
In this application, the third device may supply power to a battery of the third device based on the third parameter, or supply power to an application program running in the third device, so as to ensure normal operation of the third device.
It should be noted that: the implementation flow of the distribution method provided in the foregoing embodiment and the implementation flow of the distribution method corresponding to fig. 1 belong to the same concept, and a specific implementation process thereof may refer to the implementation flow of the method corresponding to fig. 1, which is not described herein again.
Fig. 5 is a schematic structural component diagram of a dispensing device according to the present application, as shown in fig. 5, the device includes:
an obtaining unit 501, configured to obtain a first parameter of a second device when receiving a capability provided by the second device, where the first parameter represents a capability that the second device can provide; under the condition of providing the capacity for the third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment;
a determining unit 502, configured to determine, based on the first parameter and the second parameter, a third parameter and a fourth parameter, where the third parameter characterizes a capability to be allocated to the third device, and the fourth parameter characterizes a capability to be allocated to the specified application.
As a preferable scheme in this embodiment, the apparatus further includes: a receiving unit 503;
the receiving unit 503 is configured to receive an ability requirement instruction sent by the third device, where the ability requirement instruction carries the second parameter, and the second parameter includes a system power consumption parameter and a battery power parameter of the third device.
The obtaining unit 501 may specifically obtain the second parameter from the capability requirement instruction.
As a preferable scheme in this embodiment, the apparatus further includes: a calculation unit 504 and a comparison unit 505;
the obtaining unit 501 is further configured to obtain a maximum preset parameter of the specified application, where the maximum preset parameter represents a maximum preset capability requirement of the specified application;
the calculating unit 504 is configured to calculate a sum of the second parameter and the maximum preset parameter to obtain a fifth parameter;
the comparing unit 505 is configured to compare the first parameter with the fifth parameter, so as to obtain a comparison result;
the determining unit 502 is specifically configured to determine the maximum preset parameter of the specified application as the fourth parameter when the comparison result indicates that the first parameter is greater than the fifth parameter; and determining the difference value between the first parameter and the maximum preset parameter as the third parameter.
As a preferable solution in this embodiment, the obtaining unit 501 is further configured to obtain capability allocation priority information when the comparison result indicates that the first parameter is smaller than the fifth parameter; when the capability distribution priority information represents that the capability is preferentially provided for the second device, acquiring the minimum preset parameter of the specified application, wherein the minimum preset parameter of the specified application represents the minimum preset capability requirement of the specified application;
the determining unit 502 is further specifically configured to determine, when the capability allocation priority information represents that the capability is preferentially provided for the designated application, a maximum preset parameter of the designated application as the fourth parameter; determining a difference value between the first parameter and the maximum preset parameter as the third parameter; or, determining the minimum preset parameter of the specified application as the fourth parameter; and determining the difference value of the first parameter and the minimum preset parameter as the third parameter.
As a preferable scheme in this embodiment, the apparatus further includes: a detection unit 506;
the detecting unit 506 is configured to detect a use state of the designated application when the comparison result indicates that the first parameter is smaller than the fifth parameter;
the obtaining unit 501 is configured to obtain a minimum preset parameter of the designated application when the use state represents that the designated application is in a working state, where the minimum preset parameter of the designated application represents a minimum preset capability requirement of the designated application;
a determining unit 502, specifically configured to determine the minimum preset parameter of the specified application as the fourth parameter; determining a difference value between the first parameter and the minimum preset parameter as the third parameter; or, when the use state indicates that the designated application is in a non-working state, determining that the fourth parameter is zero, and determining that the first parameter is the third parameter.
As a preferable scheme in this embodiment, the apparatus further includes: a transmitting unit 507;
the sending unit 507 is configured to send a capability obtaining instruction to the second device;
the receiving unit 503 is further configured to receive the first parameter sent by the second device in response to the capability obtaining instruction.
It should be noted that: in the distribution device provided in the above embodiment, when capacity is distributed, only the division of each program module is taken as an example, and in practical applications, the distribution of the processing may be completed by different program modules as needed, that is, the internal structure of the distribution device is divided into different program modules to complete all or part of the processing described above. In addition, the distribution device provided in the above embodiment belongs to the same concept as the distribution method embodiment corresponding to fig. 1, and the specific implementation process thereof is described in detail in the method embodiment and is not described herein again.
Fig. 6 is a schematic structural composition diagram of a dispensing device in the present application, and as shown in fig. 6, the device includes:
a sending unit 601, configured to send a capability requirement instruction to a first device when receiving a capability provided by the first device, where the capability requirement instruction carries a second parameter, and the second parameter represents a capability requirement of a third device;
a receiving unit 602 receives a third parameter sent by the first device based on the second parameter and a first parameter of a second device for providing a capability to the first device, where the first parameter characterizes a capability that the second device can provide, and the third parameter characterizes a capability allocated to the third device by the first device.
It should be noted that: in the distribution device provided in the above embodiment, when capacity is distributed, only the division of each program module is taken as an example, and in practical applications, the distribution of the processing may be completed by different program modules as needed, that is, the internal structure of the distribution device is divided into different program modules to complete all or part of the processing described above. In addition, the distribution device provided in the above embodiment and the distribution method embodiment corresponding to fig. 4 belong to the same concept, and the specific implementation process thereof is described in detail in the method embodiment and is not described again here.
Fig. 7 is a schematic diagram three illustrating the structural composition of the dispensing device in this application, and as shown in fig. 7, the dispensing device 700 may be a charger, an intelligent sound, an intelligent projector, a mobile phone, an intelligent pen, an intelligent watch, an intelligent ring, an intelligent bracelet, an intelligent glove, or the like. The dispensing device 700 shown in fig. 7 comprises: at least one processor 701, a memory 702, at least one network interface 704, and a user interface 703. The various components in the distribution device 700 are coupled together by a bus system 705. It is understood that the bus system 705 is used to enable communications among the components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as the bus system 705.
The user interface 703 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 702 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 702 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 702 in embodiments of the present invention is used to store various types of data to support the operation of the dispensing apparatus 700. Examples of such data include: any computer programs for operating on the dispensing device 700, such as an operating system 7021 and application programs 7022; music data; animation data; book information; video, drawing information, etc. The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 may include various applications such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included within application program 7022.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The Processor 7301 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 701 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 702, and the processor 701 may read the information in the memory 702 and perform the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the dispensing Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the foregoing methods.
In one aspect, when the processor 701 executes the computer program, it performs: under the condition of receiving the capability provided by second equipment, acquiring a first parameter of the second equipment, wherein the first parameter represents the capability which can be provided by the second equipment; under the condition of providing capacity for third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment; determining a third parameter and a fourth parameter based on the first parameter and the second parameter, the third parameter characterizing a capability to be allocated to the third device, the fourth parameter characterizing a capability to be allocated to the specified application.
When the processor 701 runs the computer program, the following steps are further executed: and receiving an ability requirement instruction sent by the third device, where the ability requirement instruction carries the second parameter, and the second parameter includes a system power consumption parameter and a battery power parameter of the third device.
When the processor 701 runs the computer program, the following steps are further executed: before determining a third parameter and a fourth parameter based on the first parameter and the second parameter, acquiring a maximum preset parameter of the designated application, wherein the maximum preset parameter represents a maximum preset capacity requirement of the designated application; calculating the sum of the second parameter and the maximum preset parameter to obtain a fifth parameter; comparing the first parameter with the fifth parameter to obtain a comparison result; determining the maximum preset parameter of the designated application as the fourth parameter when the comparison result indicates that the first parameter is greater than the fifth parameter; and determining the difference value between the first parameter and the maximum preset parameter as the third parameter.
When the processor 701 runs the computer program, the following steps are further executed: acquiring capacity allocation priority information when the comparison result represents that the first parameter is smaller than the fifth parameter; determining the maximum preset parameter of the designated application as the fourth parameter under the condition that the representation of the capability distribution priority information gives priority to the capability provided by the designated application; determining a difference value between the first parameter and the maximum preset parameter as the third parameter; or, when the capability allocation priority information represents that the capability is preferentially provided for the second device, acquiring a minimum preset parameter of the designated application, where the minimum preset parameter of the designated application represents a minimum preset capability requirement of the designated application; determining the minimum preset parameter of the specified application as the fourth parameter; and determining the difference value of the first parameter and the minimum preset parameter as the third parameter.
When the processor 701 runs the computer program, the following steps are further executed: detecting the use state of the specified application under the condition that the comparison result represents that the first parameter is smaller than the fifth parameter; when the use state represents that the designated application is in a working state, acquiring a minimum preset parameter of the designated application, wherein the minimum preset parameter of the designated application represents a minimum preset capacity requirement of the designated application; determining the minimum preset parameter of the specified application as the fourth parameter; determining a difference value between the first parameter and the minimum preset parameter as the third parameter; or, when the use state indicates that the designated application is in a non-working state, determining that the fourth parameter is zero, and determining that the first parameter is the third parameter.
When the processor 701 runs the computer program, the following steps are further executed: sending a capability acquisition instruction to the second device; and receiving the first parameter sent by the second equipment in response to the capability acquisition instruction.
In another embodiment, when the processor 701 executes the computer program, the following steps are performed: sending a capacity demand instruction to a first device under the condition of receiving capacity provided by the first device, wherein the capacity demand instruction carries a second parameter, and the second parameter represents the capacity demand of a third device; receiving a third parameter sent by the first device based on the second parameter and a first parameter of a second device for providing the first device with the capability, wherein the first parameter characterizes the capability which can be provided by the second device, and the third parameter characterizes the capability which is allocated to the third device by the first device.
In an exemplary embodiment, the present invention further provides a computer readable storage medium, such as the memory 702 comprising a computer program, which is executable by the processor 01 of the distribution apparatus 700 to perform the steps of the aforementioned method. The computer readable storage medium can be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM; or may be a variety of devices including one or any combination of the above memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, performs: under the condition of receiving the capability provided by second equipment, acquiring a first parameter of the second equipment, wherein the first parameter represents the capability which can be provided by the second equipment; under the condition of providing capacity for third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment; determining a third parameter and a fourth parameter based on the first parameter and the second parameter, the third parameter characterizing a capability to be allocated to the third device, the fourth parameter characterizing a capability to be allocated to the specified application.
The computer program, when executed by the processor, further performs: and receiving an ability requirement instruction sent by the third device, where the ability requirement instruction carries the second parameter, and the second parameter includes a system power consumption parameter and a battery power parameter of the third device.
The computer program, when executed by the processor, further performs: before determining a third parameter and a fourth parameter based on the first parameter and the second parameter, acquiring a maximum preset parameter of the designated application, wherein the maximum preset parameter represents a maximum preset capacity requirement of the designated application; calculating the sum of the second parameter and the maximum preset parameter to obtain a fifth parameter; comparing the first parameter with the fifth parameter to obtain a comparison result; determining the maximum preset parameter of the designated application as the fourth parameter when the comparison result indicates that the first parameter is greater than the fifth parameter; and determining the difference value between the first parameter and the maximum preset parameter as the third parameter.
The computer program, when executed by the processor, further performs: acquiring capacity allocation priority information when the comparison result represents that the first parameter is smaller than the fifth parameter; determining the maximum preset parameter of the designated application as the fourth parameter under the condition that the representation of the capability distribution priority information gives priority to the capability provided by the designated application; determining a difference value between the first parameter and the maximum preset parameter as the third parameter; or, when the capability allocation priority information represents that the capability is preferentially provided for the second device, acquiring a minimum preset parameter of the designated application, where the minimum preset parameter of the designated application represents a minimum preset capability requirement of the designated application; determining the minimum preset parameter of the specified application as the fourth parameter; and determining the difference value of the first parameter and the minimum preset parameter as the third parameter.
The computer program, when executed by the processor, further performs: detecting the use state of the specified application under the condition that the comparison result represents that the first parameter is smaller than the fifth parameter; when the use state represents that the designated application is in a working state, acquiring a minimum preset parameter of the designated application, wherein the minimum preset parameter of the designated application represents a minimum preset capacity requirement of the designated application; determining the minimum preset parameter of the specified application as the fourth parameter; determining a difference value between the first parameter and the minimum preset parameter as the third parameter; or, when the use state indicates that the designated application is in a non-working state, determining that the fourth parameter is zero, and determining that the first parameter is the third parameter.
The computer program, when executed by the processor, further performs: sending a capability acquisition instruction to the second device; and receiving the first parameter sent by the second equipment in response to the capability acquisition instruction.
In another embodiment, the computer program, when executed by the processor, performs: sending a capacity demand instruction to a first device under the condition of receiving capacity provided by the first device, wherein the capacity demand instruction carries a second parameter, and the second parameter represents the capacity demand of a third device; receiving a third parameter sent by the first device based on the second parameter and a first parameter of a second device for providing the first device with the capability, wherein the first parameter characterizes the capability which can be provided by the second device, and the third parameter characterizes the capability which is allocated to the third device by the first device.
Fig. 8 is a schematic structural component diagram of a dispensing system of the present application, as shown in fig. 8, the system comprising: a first device 1000, a second device 2000, and a third device 3000, where the first device 1000 may specifically be an extension device having a specific application through which the first device 1000 can implement a specific function. For example, the specific function may be an audio function, a storage function, a charging function, a projection function, a display function, a heat dissipation function, an information input function, and the like. The second device 2000 may specifically be a charging device, such as a charger, capable of providing electrical energy. The third device 3000 may specifically be an intelligent device such as a tablet computer, a desktop computer, a notebook computer, a mobile phone, and an intelligent bracelet. The first device 1000 is connected to the second device 2000 and the third device 3000 through interfaces or slots, respectively.
In a state where the first device 1000 and the second device 2000 are connected, the second device 2000 can provide power to the first device 1000, and the first device 1000 knows the power type of the second device 2000 according to the power provided by the second device.
Specifically, the first device 1000 may send a power harvesting instruction to the second device 2000, and the second device 2000 may send a first parameter to the first device 1000 based on the power harvesting instruction, the first parameter characterizing the power that the second device 2000 is capable of providing. After receiving the first parameter sent by the second device 2000, the first device 1000 matches the first parameter in a preset power type library of the charger, and determines the power type of the second device 2000 according to a matching result. Reference is made in particular to the description of fig. 2.
In this application, the first device 1000 includes a charging unit 1001, and when the first device 1000 and the third device 3000 are in a connected state, the first device 1000 can provide power to the third device 3000 through the charging unit 1001, and the third device 3000 can charge a battery of the third device 3000 according to the power provided by the charging unit 1001 and supply power to a system in the third device 3000.
When the third device 3000 and the first device 1000 are in a connected state, the third device 3000 may further obtain current system power consumption information and battery power consumption information, generate an ability requirement instruction based on the system power consumption information and the battery power consumption information, and send the ability requirement instruction to the first device 1000, and the first device 1000 may obtain a second parameter of the third device 3000 by receiving the ability requirement instruction sent by the third device 3000. Wherein the second parameter characterizes a power requirement of the third device 3000, e.g., the second parameter comprises a system power parameter and a battery power parameter of the third device 3000.
Specifically, when the third device 3000 acquires the system power consumption information, it may specifically obtain the current system power consumption information of the third device 3000 according to the use state of each application program by detecting the current use scene of each application program in the third device 3000 and obtaining the current use state of each application program according to the detection result.
For example, the third device 3000 determines that the video application and the chat application in the third device 3000 are both in the working state and the other applications are in the non-working state by detecting the states of the application programs in the third device 3000, at this time, the third device may obtain the power consumption parameters corresponding to the video application and the chat application from the power consumption library of the battery, and use the sum of the power consumption parameters corresponding to the video application and the power consumption parameters corresponding to the chat application as the current system power consumption parameter. Reference is made in particular to the description of fig. 3.
In this application, the first device 1000 further includes a specific function unit 1002, and after acquiring the first parameter of the second device 2000 and the second parameter of the third device 3000, the first device 1000 may further acquire a maximum preset parameter of the specific function unit 1002, where the maximum preset parameter represents a maximum preset capability requirement of the specific function unit 1002. Then, the sum of the second parameter and the maximum preset parameter is calculated to obtain a fifth parameter, the first parameter is compared with the fifth parameter to obtain a comparison result, and the power of the second device 2000 is distributed to the third device 3000 and the specific function unit 1002 according to the comparison result. For a specific allocation process, please refer to the method embodiment in fig. 1, which is not described herein again.
According to the power type of the second equipment and the power requirement of the third equipment, the power distributed to the specific function unit is dynamically adjusted, the power distributed to the specific function unit and the third equipment can be maximized, and the power of the second equipment can reach the optimal utilization rate.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A method of allocation for use with a first device having a specified application, the method comprising:
under the condition of receiving the capability provided by second equipment, acquiring a first parameter of the second equipment, wherein the first parameter represents the capability which can be provided by the second equipment;
under the condition of providing capacity for third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment;
acquiring a maximum preset parameter of a specified application, wherein the maximum preset parameter represents the maximum preset capacity requirement of the specified application;
calculating the sum of the second parameter and the maximum preset parameter to obtain a fifth parameter;
comparing the first parameter with the fifth parameter to obtain a comparison result;
when the comparison result indicates that the first parameter is larger than the fifth parameter, determining the maximum preset parameter of the specified application as a fourth parameter; determining a difference between the first parameter and the maximum preset parameter as a third parameter, where the third parameter represents a capability to be allocated to the third device, and the fourth parameter represents a capability to be allocated to the specified application.
2. The method of claim 1, the obtaining second parameters of a third device, comprising:
and receiving an ability requirement instruction sent by the third device, where the ability requirement instruction carries the second parameter, and the second parameter includes a system power consumption parameter and a battery power parameter of the third device.
3. The method of claim 1, further comprising:
acquiring capacity allocation priority information when the comparison result represents that the first parameter is smaller than the fifth parameter;
determining the maximum preset parameter of the designated application as the fourth parameter under the condition that the representation of the capability distribution priority information gives priority to the capability provided by the designated application; determining a difference value between the first parameter and the maximum preset parameter as the third parameter;
or, when the capability allocation priority information represents that the capability is preferentially provided for the second device, acquiring a minimum preset parameter of the designated application, where the minimum preset parameter of the designated application represents a minimum preset capability requirement of the designated application;
determining the minimum preset parameter of the specified application as the fourth parameter; and determining the difference value of the first parameter and the minimum preset parameter as the third parameter.
4. The method of claim 1, further comprising:
detecting the use state of the specified application under the condition that the comparison result represents that the first parameter is smaller than the fifth parameter;
when the use state represents that the designated application is in a working state, acquiring a minimum preset parameter of the designated application, wherein the minimum preset parameter of the designated application represents a minimum preset capacity requirement of the designated application;
determining the minimum preset parameter of the specified application as the fourth parameter; determining a difference value between the first parameter and the minimum preset parameter as the third parameter;
or, when the use state indicates that the designated application is in a non-working state, determining that the fourth parameter is zero, and determining that the first parameter is the third parameter.
5. The method of claim 1, the obtaining first parameters of a second device, comprising:
sending a capability acquisition instruction to the second device;
and receiving the first parameter sent by the second equipment in response to the capability acquisition instruction.
6. An allocation method applied to a third device, the method comprising:
sending a capacity demand instruction to a first device under the condition of receiving capacity provided by the first device, wherein the capacity demand instruction carries a second parameter, and the second parameter represents the capacity demand of a third device;
receiving a third parameter sent by the first device based on the second parameter and a first parameter of a second device for providing the first device with capability, wherein the first parameter characterizes capability which can be provided by the second device, and the third parameter characterizes capability which is allocated to the third device by the first device; the third parameter is obtained by calculating the sum of the second parameter and the maximum preset parameter after the first device obtains the maximum preset parameter of the specified application to obtain a fifth parameter, comparing the first parameter with the fifth parameter to obtain a comparison result, and determining the third parameter as the difference value between the first parameter and the maximum preset parameter under the condition that the comparison result indicates that the first parameter is greater than the fifth parameter; the maximum preset parameter represents the maximum preset capacity requirement of the specified application.
7. A dispensing device, the device comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first parameter of a second device under the condition of receiving a capability provided by the second device, and the first parameter represents the capability which can be provided by the second device; under the condition of providing the capacity for the third equipment, acquiring a second parameter of the third equipment, wherein the second parameter represents the capacity requirement of the third equipment; acquiring a maximum preset parameter of a specified application in first equipment, wherein the maximum preset parameter represents the maximum preset capacity requirement of the specified application;
the calculating unit is used for calculating the sum of the second parameter and the maximum preset parameter to obtain a fifth parameter;
the comparison unit is used for comparing the first parameter with the fifth parameter to obtain a comparison result;
the determining unit is used for determining the maximum preset parameter of the specified application as a fourth parameter under the condition that the comparison result represents that the first parameter is larger than the fifth parameter; determining a difference between the first parameter and the maximum preset parameter as a third parameter, where the third parameter represents a capability to be allocated to the third device, and the fourth parameter represents a capability to be allocated to the specified application.
8. A dispensing device, the device comprising:
a sending unit, configured to send a capability requirement instruction to a first device when receiving a capability provided by the first device, where the capability requirement instruction carries a second parameter, and the second parameter represents a capability requirement of a third device;
a receiving unit, configured to receive a third parameter sent by the first device based on the second parameter and a first parameter of a second device for providing a capability to the first device, where the first parameter characterizes a capability that the second device can provide, and the third parameter characterizes a capability allocated to the third device by the first device; the third parameter is obtained by calculating the sum of the second parameter and the maximum preset parameter after the first device obtains the maximum preset parameter of the specified application to obtain a fifth parameter, comparing the first parameter with the fifth parameter to obtain a comparison result, and determining the third parameter as the difference value between the first parameter and the maximum preset parameter under the condition that the comparison result indicates that the first parameter is greater than the fifth parameter; and the maximum preset parameter represents the maximum preset capacity requirement of the specified application.
9. A dispensing device, the device comprising: the method comprises the following steps: a processor and a memory for storing a computer program operable on the processor, wherein the processor is operable to perform the steps of the method of any of claims 1 to 5 or to perform the steps of the method of claim 6 when executing the computer program.
CN201910810202.5A 2019-08-29 2019-08-29 Distribution method and device Active CN110658901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910810202.5A CN110658901B (en) 2019-08-29 2019-08-29 Distribution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910810202.5A CN110658901B (en) 2019-08-29 2019-08-29 Distribution method and device

Publications (2)

Publication Number Publication Date
CN110658901A CN110658901A (en) 2020-01-07
CN110658901B true CN110658901B (en) 2022-03-25

Family

ID=69036528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910810202.5A Active CN110658901B (en) 2019-08-29 2019-08-29 Distribution method and device

Country Status (1)

Country Link
CN (1) CN110658901B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102782606A (en) * 2009-06-19 2012-11-14 惠普开发有限公司 Enclosure power controller
CN104238712A (en) * 2013-06-20 2014-12-24 希捷科技有限公司 Distributed power conveying
CN107624210A (en) * 2015-05-14 2018-01-23 苹果公司 Dynamic power between multiple physical ports is shared

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7818592B2 (en) * 2007-04-18 2010-10-19 Globalfoundries Inc. Token based power control mechanism
US20090240863A1 (en) * 2007-10-23 2009-09-24 Psion Teklogix Inc. Distributed power regulation
US8661283B2 (en) * 2009-03-25 2014-02-25 Hewlett-Packard Development Company, L.P. Power distribution unit-device correlation
US8478451B2 (en) * 2009-12-14 2013-07-02 Intel Corporation Method and apparatus for dynamically allocating power in a data center
TWI540423B (en) * 2014-03-25 2016-07-01 緯創資通股份有限公司 Power distribution system
US10942527B2 (en) * 2017-05-30 2021-03-09 Textron Innovations Inc. System and method for controlling rotorcraft load priority

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102782606A (en) * 2009-06-19 2012-11-14 惠普开发有限公司 Enclosure power controller
CN104238712A (en) * 2013-06-20 2014-12-24 希捷科技有限公司 Distributed power conveying
CN107624210A (en) * 2015-05-14 2018-01-23 苹果公司 Dynamic power between multiple physical ports is shared

Also Published As

Publication number Publication date
CN110658901A (en) 2020-01-07

Similar Documents

Publication Publication Date Title
CN114443256B (en) Resource scheduling method and electronic equipment
CN101622588B (en) Dynamic power reduction
US10631361B2 (en) Method and apparatus for providing user with information received by electronic device
US9292064B2 (en) Changing output power to be within a range based on a power use efficiency peak
US10064141B2 (en) Core frequency/count decision-based thermal mitigation optimization for a multi-core integrated circuit
WO2018129991A1 (en) Charging method, charging device and terminal
US20170212581A1 (en) Systems and methods for providing power efficiency via memory latency control
US11431182B2 (en) Resource statistics collection method and apparatus and terminal
CN116028205B (en) Resource scheduling method and electronic equipment
CN106126377B (en) The method and device of system starting
WO2023221752A1 (en) Information processing method and electronic device
JP2019185771A (en) Method, device for processing data of bluetooth speaker, and bluetooth speaker
CN110658901B (en) Distribution method and device
CN117130454A (en) Power consumption adjustment method and electronic equipment
US10564709B2 (en) Voltage regulation techniques for electronic devices
CN110676521B (en) Battery management method, device, storage medium and electronic equipment
CN108958829B (en) Pre-loaded resource control method, device, storage medium and terminal
CN112120721A (en) Electric quantity sharing method and device, electronic equipment and storage medium
US20150161070A1 (en) Method and system for managing bandwidth demand for a variable bandwidth processing element in a portable computing device
JP2018505489A (en) Dynamic memory utilization in system on chip
CN111552655A (en) Method and equipment compatible with PogoPin, Y-cable and USB
US10117178B2 (en) Simultaneous power control among multiple devices per context
CN116027880B (en) Resource scheduling method and electronic equipment
CN116055443B (en) Method for identifying social scene, electronic equipment and computer readable storage medium
CN116028005B (en) Audio session acquisition method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant