CN104778090B - A kind of control method and electronic equipment - Google Patents
A kind of control method and electronic equipment Download PDFInfo
- Publication number
- CN104778090B CN104778090B CN201410010923.5A CN201410010923A CN104778090B CN 104778090 B CN104778090 B CN 104778090B CN 201410010923 A CN201410010923 A CN 201410010923A CN 104778090 B CN104778090 B CN 104778090B
- Authority
- CN
- China
- Prior art keywords
- parameter
- instruction
- electronic equipment
- electronic device
- power consumption
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000004044 response Effects 0.000 claims abstract description 30
- 238000004458 analytical method Methods 0.000 claims description 66
- 230000010365 information processing Effects 0.000 claims description 42
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 208000033999 Device damage Diseases 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Landscapes
- Power Sources (AREA)
Abstract
The invention discloses a kind of control methods, which comprises after electronic equipment receives open command, generates the first instruction and the second instruction according to the open command;It parses first instruction and obtains the first parsing result, according to first parsing result, obtain the first parameter of the power supply adaptor;It parses second instruction and obtains the second parsing result, according to second parsing result, obtain corresponding second parameter of mainboard of the electronic equipment;When determining that first parameter and second parameter mismatch, the first response results are generated, close the electronic equipment according to first response results.The invention also discloses a kind of electronic equipment, can guarantee that electronic equipment avoids equipment damage problem caused by as being connected to unmatched power supply adaptor using the present invention.
Description
Technical Field
The present invention relates to electronic device control technologies, and in particular, to a control method and an electronic device.
Background
At present, Personal Computers (PCs) are deeply involved in daily life and can be collocated on a variety of platforms. Since the power consumption of the PC is different for different platforms, different adapters need to be collocated. However, currently, the matching of the adapter can only be determined by an operator according to experience, so that the PC and the adapter are not matched, and the PC or the adapter is damaged.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a control method and an electronic device, which can ensure that the electronic device can avoid the problem of device damage caused by being connected to a mismatched power adapter.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the embodiment of the invention provides a control method, which is applied to electronic equipment, wherein the electronic equipment is connected with a power adapter; the method comprises the following steps:
after receiving a starting instruction, the electronic equipment generates a first instruction and a second instruction according to the starting instruction;
analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result;
analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result;
and when the first parameter is judged not to be matched with the second parameter, generating a first response result, and turning off the electronic equipment according to the first response result.
An embodiment of the present invention further provides an electronic device, where the electronic device includes: a power management unit and an information processing unit; wherein,
the power supply management unit is used for sending a starting instruction to the information processing unit after receiving the starting instruction;
the information processing unit is used for generating a first instruction and a second instruction according to the starting instruction; analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result; analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result; and when the first parameter is not matched with the second parameter, generating a first response result, and turning off the electronic equipment according to the first response result.
The control method and the electronic equipment provided by the invention can close the electronic equipment when the electronic equipment is not matched with the power adapter; thereby ensuring that the electronic equipment does not have the problem of damage caused by being connected to a mismatched power adapter.
Drawings
FIG. 1 is a first flowchart illustrating an information processing method according to an embodiment of the present invention;
FIG. 2 is an example of a first correspondence of an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second information processing method according to an embodiment of the present invention;
FIG. 4 is a first schematic view of an electronic device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a second electronic device according to an embodiment of the invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The first embodiment,
The embodiment of the invention provides a control method, which is applied to electronic equipment, wherein the electronic equipment is connected with a power adapter; as shown in fig. 1, the method includes:
step 101: and after receiving the opening instruction, the electronic equipment generates a first instruction and a second instruction according to the opening instruction.
Step 102: and analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result.
Step 103: and analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result.
Step 104: and when the first parameter is not matched with the second parameter, generating a first response result, and closing the electronic equipment according to the first response result.
Step 102 and step 103 may be executed simultaneously, or step 103 may be executed prior to step 102.
Here, the turn-on command may be a power-on command, such as a command received by the electronic device when the user presses a "power-on" key.
The first parameter may be a power consumption value of the power adapter.
The second parameter may be a power consumption value of a main board of the electronic device.
When the embodiment is used, when a user presses a start button of electronic equipment such as a computer, the computer generates a first instruction and generates a second instruction;
acquiring a first parameter of the connected power adapter according to the first instruction; acquiring a second parameter of the computer according to the second instruction;
and comparing the first parameter with the second parameter, starting the computer according to a normal flow when the first parameter and the second parameter are matched, and not starting the computer and automatically powering off or alarming when the first parameter and the second parameter are not matched.
Therefore, by using the method provided by the embodiment, when the electronic device is not matched with the power adapter, the electronic device can be turned off, so that the problem that the electronic device is damaged due to connection to the unmatched power adapter can be avoided.
Example II,
The embodiment of the invention provides a control method, which is applied to electronic equipment, wherein the electronic equipment is connected with a power adapter; as shown in fig. 1, the method includes:
step 101: and after receiving the opening instruction, the electronic equipment generates a first instruction and a second instruction according to the opening instruction.
Step 102: and analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result.
Step 103: and analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result.
Step 104: and when the first parameter is not matched with the second parameter, generating a first response result, and closing the electronic equipment according to the first response result.
Step 102 and step 103 may be executed simultaneously, or step 103 may be executed prior to step 102.
Here, the turn-on command may be a power-on command, such as a command received by the electronic device when the user presses a "power-on" key.
The first parameter may be a power consumption value of the power adapter.
The second parameter may be a power consumption value of a main board of the electronic device.
Preferably, the acquiring the first parameter of the power adapter includes: measuring to obtain a voltage value or a current value of the power adapter; calculating to obtain a power consumption value of the power adapter by using the voltage value or the current value; and taking the power consumption value as a first parameter of the power adapter.
The method for calculating the power consumption value of the power adapter may be the prior art, and is not described herein again.
Through the embodiment, when a user presses a start button of electronic equipment such as a computer, the computer generates a first instruction and generates a second instruction;
measuring a voltage value or a current value of the power adapter according to a first instruction; calculating to obtain a power consumption value of the power adapter by using the voltage value or the current value; taking the power consumption value as a first parameter of the power adapter;
acquiring a second parameter of the computer according to the second instruction;
and comparing the first parameter with the second parameter, starting the computer according to a normal flow when the first parameter and the second parameter are matched, and not starting the computer and automatically powering off or alarming when the first parameter and the second parameter are not matched.
Therefore, by using the method provided by the embodiment, the power consumption value of the power adapter is calculated by measuring the voltage or the current of the power adapter, so that the electronic device is determined to be turned off when the electronic device is not matched with the power adapter, and thus, the problem that the electronic device is damaged due to connection to the unmatched power adapter can be avoided.
Example III,
The embodiment of the invention provides a control method, which is applied to electronic equipment, wherein the electronic equipment is connected with a power adapter; as shown in fig. 1, the method includes:
step 101: and after receiving the opening instruction, the electronic equipment generates a first instruction and a second instruction according to the opening instruction.
Step 102: and analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result.
Step 103: and analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result.
Step 104: and when the first parameter is not matched with the second parameter, generating a first response result, and closing the electronic equipment according to the first response result.
Step 102 and step 103 may be executed simultaneously, or step 103 may be executed prior to step 102.
Here, the turn-on command may be a power-on command, such as a command received by the electronic device when the user presses a "power-on" key.
The first parameter may be a power consumption value of the power adapter.
The second parameter may be a power consumption value of a main board of the electronic device.
Preferably, the obtaining of the second parameter corresponding to the motherboard of the electronic device includes: acquiring mainboard identification information of the electronic equipment; and acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment.
The first corresponding relationship is preset in the electronic device and is used for representing the mainboard identification information and the corresponding power consumption range value. For example, as shown in fig. 2, when the motherboard identification signal is 010, it can be determined that the power consumption range value corresponding to the motherboard identification signal is greater than 45w and less than or equal to 65w according to the first corresponding relationship.
Through the embodiment, when a user presses a start button of electronic equipment such as a computer, the computer generates a first instruction and generates a second instruction;
analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result;
analyzing the second instruction to obtain a second analysis result, and acquiring the mainboard identification information of the electronic equipment according to the second analysis result; acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment;
and comparing the first parameter with the second parameter, starting the computer according to a normal flow when the first parameter and the second parameter are matched, and not starting the computer and automatically powering off or alarming when the first parameter and the second parameter are not matched.
And the matching is that the first parameter is within the power consumption range value of the mainboard of the electronic equipment.
Therefore, by using the method provided by the embodiment, the power consumption range value of the mainboard of the electronic device is determined through the preset first corresponding relation, so that the electronic device is determined to be turned off when the electronic device is not matched with the power adapter, and the problem that the electronic device is damaged due to connection to the unmatched power adapter can be avoided.
Example four,
The embodiment of the invention provides a control method, which is applied to electronic equipment, wherein the electronic equipment is connected with a power adapter; as shown in fig. 3, the method includes:
step 301: and after receiving the opening instruction, the electronic equipment generates a first instruction and a second instruction according to the opening instruction.
Step 302: and analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result.
Step 303: and analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result.
Step 304: judging whether the first parameter is in the range of the second parameter, if so, judging that the first parameter is matched with the second parameter, and ending the processing flow; otherwise, the first parameter does not match the second parameter, and step 305 is performed.
Step 305: and when the first parameter is not matched with the second parameter, generating a first response result, and closing the electronic equipment according to the first response result.
Step 302 and step 303 may be executed simultaneously, or step 303 may be executed before step 302.
Here, the turn-on command may be a power-on command, such as a command received by the electronic device when the user presses a "power-on" key.
The first parameter may be a power consumption value of the power adapter. The second parameter may be a power consumption value of a main board of the electronic device.
The acquiring the first parameter of the power adapter comprises: measuring to obtain a voltage value or a current value of the power adapter; calculating to obtain a power consumption value of the power adapter by using the voltage value or the current value; and taking the power consumption value as a first parameter of the power adapter.
The method for calculating the power consumption value of the power adapter may be the prior art, and is not described herein again.
The obtaining of the second parameter corresponding to the motherboard of the electronic device includes: finding out the mainboard identification information of the electronic equipment; and acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment.
The first corresponding relationship is preset in the electronic device and is used for representing the mainboard identification information and the corresponding power consumption range value. For example, as shown in fig. 2, when the motherboard identification signal is 010, it can be determined that the power consumption range value corresponding to the motherboard identification signal is greater than 45w and less than or equal to 65w according to the first corresponding relationship.
Wherein the determining that the first parameter matches the second parameter may include: the electronic equipment completes the subsequent starting-up process according to the prior art.
When the electronic device is turned off, the method may further include: powering off the electronic device, or issuing a warning.
Through the embodiment, when a user presses a start button of electronic equipment such as a computer, the computer generates a first instruction and generates a second instruction;
analyzing the first instruction to obtain a first analysis result, and measuring to obtain a voltage value or a current value of the power adapter according to the first analysis result; calculating to obtain a power consumption value of the power adapter by using the voltage value or the current value; taking the power consumption value as a first parameter of the power adapter;
analyzing the second instruction to obtain a second analysis result, and finding out the mainboard identification information of the electronic equipment according to the second analysis result; acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment;
judging whether the first parameter is in the range of the second parameter, if so, judging that the first parameter is matched with the second parameter, and starting the computer according to a normal flow; otherwise, the first parameter is not matched with the second parameter, the computer is not started, and the power is automatically cut off or an alarm is given.
And the matching is that the first parameter is within the power consumption range value of the mainboard of the electronic equipment.
Therefore, by using the method provided by the embodiment, the power consumption range value of the mainboard of the electronic device is determined through the preset first corresponding relation, so that the electronic device is determined to be turned off when the electronic device is not matched with the power adapter, and the problem that the electronic device is damaged due to connection to the unmatched power adapter can be avoided.
Example V,
The electronic device provided in this embodiment, as shown in fig. 4, includes: a power management unit and an information processing unit; wherein,
the power supply management unit is used for sending a starting instruction to the information processing unit after receiving the starting instruction;
the information processing unit is used for generating a first instruction and a second instruction according to the starting instruction; analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result; analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result; and when the first parameter is not matched with the second parameter, generating a first response result, and turning off the electronic equipment according to the first response result.
The turn-on command may be a power-on command, such as a command received by the electronic device when a user presses a "power-on" button.
The first parameter may be a power consumption value of the power adapter.
The second parameter may be a power consumption value of a main board of the electronic device.
When the power management unit is turned on, the power management unit sends a power-on instruction to the information processing unit;
the information processing unit generates a first instruction and a second instruction according to the received starting instruction;
acquiring a first parameter of the connected power adapter according to the first instruction; acquiring a second parameter corresponding to the computer mainboard according to the second instruction; and comparing the first parameter with the second parameter, starting the computer according to a normal flow when the first parameter and the second parameter are matched, generating a first response result when the first parameter and the second parameter are not matched, and automatically powering off the computer or giving an alarm according to the first response result.
Therefore, by using the method provided by the embodiment, when the electronic device is not matched with the power adapter, the electronic device can be turned off, so that the problem that the electronic device is damaged due to connection to the unmatched power adapter can be avoided.
Example six,
An electronic device provided in this embodiment, as shown in fig. 5, includes: a power management unit and an information processing unit; wherein,
the power supply management unit is used for sending a starting instruction to the information processing unit after receiving the starting instruction;
the information processing unit is used for generating a first instruction and a second instruction according to the starting instruction; analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result; analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result; and when the first parameter is not matched with the second parameter, generating a first response result, and turning off the electronic equipment according to the first response result.
The turn-on command may be a power-on command, such as a command received by the electronic device when a user presses a "power-on" button.
The first parameter may be a power consumption value of the power adapter.
As shown in fig. 5, the electronic device further includes: the measuring unit is used for measuring the voltage value or the current value of the power adapter; correspondingly, the information processing unit is specifically configured to notify the measuring unit to measure the voltage or the current of the power adapter according to the first analysis result, calculate a power consumption value of the power adapter by using the voltage value or the current value, and use the power consumption value as the first parameter of the power adapter.
The second parameter may be a power consumption value of a main board of the electronic device.
When the power management unit is turned on, the power management unit sends a power-on instruction to the information processing unit;
the information processing unit generates a first instruction and a second instruction according to the received starting instruction;
the information processing unit sends a measurement instruction to a measurement unit according to the first instruction; the measuring unit measures the voltage value or the current value of the power adapter according to the received measuring instruction and sends the voltage value or the current value to the information processing unit; the information processing unit calculates the power consumption value of the power adapter by using the voltage value or the current value; taking the power consumption value as a first parameter of the power adapter;
meanwhile, the information processing unit acquires a second parameter corresponding to the computer mainboard according to a second instruction;
and then the information processing unit compares the first parameter with the second parameter, when the first parameter and the second parameter are matched, the computer is started according to a normal flow, when the first parameter and the second parameter are not matched, a first response result is generated, and the computer is automatically powered off or gives an alarm according to the first response result.
Therefore, by using the method provided by the embodiment, the power consumption value of the power adapter is calculated by measuring the voltage or the current of the power adapter, so that the electronic device is determined to be turned off when the electronic device is not matched with the power adapter, and thus, the problem that the electronic device is damaged due to connection to the unmatched power adapter can be avoided.
Example seven,
The embodiment provides an electronic device, including: a power management unit and an information processing unit; wherein,
the power supply management unit is used for sending a starting instruction to the information processing unit after receiving the starting instruction;
the information processing unit is used for generating a first instruction and a second instruction according to the starting instruction; analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result; analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result; and when the first parameter is not matched with the second parameter, generating a first response result, and turning off the electronic equipment according to the first response result.
The turn-on command may be a power-on command, such as a command received by the electronic device when a user presses a "power-on" button.
The first parameter may be a power consumption value of the power adapter.
The second parameter may be a power consumption value of a main board of the electronic device.
The information processing unit is specifically used for acquiring the own mainboard identification information of the electronic equipment; and acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment.
The first corresponding relationship is preset in the electronic device and is used for representing the mainboard identification information and the corresponding power consumption range value. For example, as shown in fig. 2, when the motherboard identification signal is 010, it can be determined that the power consumption range value corresponding to the motherboard identification signal is greater than 45w and less than or equal to 65w according to the first corresponding relationship.
Through the embodiment, when a user presses a start button of electronic equipment such as a computer, the power management unit is equivalently switched on, and the power management unit sends a start instruction to the information processing unit;
the information processing unit generates a first instruction and a second instruction according to the received starting instruction; acquiring a first parameter of the connected power adapter according to the first instruction;
the information processing unit analyzes the second instruction to obtain a second analysis result, and acquires the own mainboard identification information of the electronic equipment according to the second analysis result; acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment;
and finally, the information processing unit compares the first parameter with the second parameter, when the first parameter and the second parameter are matched, the computer is started according to a normal flow, and when the first parameter and the second parameter are not matched, the computer is not started, and the power is automatically cut off or an alarm is given.
And the matching is that the first parameter is within the power consumption range value of the mainboard of the electronic equipment.
Therefore, by using the method provided by the embodiment, the power consumption range value of the mainboard of the electronic device is determined through the preset first corresponding relation, so that the electronic device is determined to be turned off when the electronic device is not matched with the power adapter, and the problem that the electronic device is damaged due to connection to the unmatched power adapter can be avoided.
Example eight,
An embodiment of the present invention provides an electronic device, including: a power management unit and an information processing unit; wherein,
the power supply management unit is used for sending a starting instruction to the information processing unit after receiving the starting instruction;
the information processing unit is used for generating a first instruction and a second instruction according to the starting instruction; analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result; analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result; judging whether the first parameter is in the range of the second parameter, if so, judging that the first parameter is matched with the second parameter, and ending the processing flow; otherwise, the first parameter is not matched with the second parameter, a first response result is generated, and the electronic equipment is closed according to the first response result.
The start instruction may be a power-on instruction, for example, an instruction received by the electronic device when the user presses a "power-on" key. The first parameter may be a power consumption value of the power adapter. The second parameter may be a power consumption value of a main board of the electronic device.
The electronic device further includes: the measuring unit is used for measuring the voltage value or the current value of the power adapter; correspondingly, the information processing unit is specifically configured to notify the measuring unit to measure the voltage or the current of the power adapter according to the first analysis result, calculate a power consumption value of the power adapter by using the voltage value or the current value, and use the power consumption value as the first parameter of the power adapter.
The method for calculating the power consumption value of the power adapter may be the prior art, and is not described herein again.
The information processing unit is specifically configured to acquire motherboard identification information of the electronic device itself; and acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment.
The first corresponding relationship is preset in the electronic device and is used for representing the mainboard identification information and the corresponding power consumption range value. For example, as shown in fig. 2, when the motherboard identification signal is 010, it can be determined that the power consumption range value corresponding to the motherboard identification signal is greater than 45w and less than or equal to 65w according to the first corresponding relationship.
Wherein the determining that the first parameter matches the second parameter may include: the electronic equipment completes the subsequent starting-up process according to the prior art.
The information processing unit is also used for informing the power management unit of power failure or sending out a warning; correspondingly, the power management unit is also used for powering off according to the management of the information processing unit.
Through the embodiment, when a user presses a start button of electronic equipment such as a computer, the computer generates a first instruction and generates a second instruction;
analyzing the first instruction to obtain a first analysis result, and measuring to obtain a voltage value or a current value of the power adapter according to the first analysis result; calculating to obtain a power consumption value of the power adapter by using the voltage value or the current value; taking the power consumption value as a first parameter of the power adapter;
analyzing the second instruction to obtain a second analysis result, and finding out the mainboard identification information of the electronic equipment according to the second analysis result; acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment;
judging whether the first parameter is in the range of the second parameter, if so, judging that the first parameter is matched with the second parameter, and starting the computer according to a normal flow; otherwise, the first parameter is not matched with the second parameter, the computer is not started, and the power is automatically cut off or an alarm is given.
And the matching is that the first parameter is within the power consumption range value of the mainboard of the electronic equipment.
Therefore, by using the method provided by the embodiment, the power consumption range value of the mainboard of the electronic device is determined through the preset first corresponding relation, so that the electronic device is determined to be turned off when the electronic device is not matched with the power adapter, and the problem that the electronic device is damaged due to connection to the unmatched power adapter can be avoided.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
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 (8)
1. A control method is applied to electronic equipment, and the electronic equipment is connected with a power adapter; the method comprises the following steps:
after receiving a starting instruction, the electronic equipment generates a first instruction and a second instruction according to the starting instruction;
analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result;
analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result;
and when the first parameter is judged not to be matched with the second parameter, generating a first response result, and turning off the electronic equipment according to the first response result.
2. The method according to claim 1, wherein the obtaining the first parameter of the power adapter according to the first parsing result comprises:
measuring a voltage value or a current value of the power adapter according to the first analysis result;
calculating to obtain a power consumption value of the power adapter by using the voltage value or the current value;
and taking the power consumption value as a first parameter of the power adapter.
3. The method according to claim 1, wherein the obtaining of the second parameter corresponding to the motherboard of the electronic device comprises:
acquiring mainboard identification information of the electronic equipment;
acquiring a power consumption range value of the mainboard of the electronic equipment according to the mainboard identification information and the first corresponding relation, and taking the power consumption range value as a second parameter of the electronic equipment;
the first corresponding relationship is preset in the electronic device and is used for representing the mainboard identification information and the corresponding power consumption range value.
4. The method of claim 1, wherein the determining that the first parameter does not match the second parameter comprises:
judging whether the first parameter is in the range of the second parameter, if so, judging that the first parameter is matched with the second parameter;
otherwise, the first parameter does not match the second parameter.
5. An electronic device, the electronic device comprising: a power management unit and an information processing unit; wherein,
the power supply management unit is used for sending a starting instruction to the information processing unit after receiving the starting instruction;
the information processing unit is used for generating a first instruction and a second instruction according to the starting instruction; analyzing the first instruction to obtain a first analysis result, and acquiring a first parameter of the power adapter according to the first analysis result; analyzing the second instruction to obtain a second analysis result, and acquiring a second parameter corresponding to the mainboard of the electronic equipment according to the second analysis result; and when the first parameter is not matched with the second parameter, generating a first response result, and turning off the electronic equipment according to the first response result.
6. The electronic device of claim 5, further comprising: the measuring unit is used for measuring the voltage value or the current value of the power adapter;
correspondingly, the information processing unit is specifically configured to notify the measuring unit to measure the voltage or the current of the power adapter according to the first analysis result, calculate a power consumption value of the power adapter by using the voltage value or the current value, and use the power consumption value as the first parameter of the power adapter.
7. The electronic device of claim 5,
the information processing unit is specifically configured to acquire motherboard identification information of the electronic device, acquire a power consumption range value of a motherboard of the electronic device according to the motherboard identification information and the first corresponding relationship, and use the power consumption range value as a second parameter of the electronic device;
the first corresponding relationship is preset in the electronic device and is used for representing the mainboard identification information and the corresponding power consumption range value.
8. The electronic device of claim 5,
the information processing unit is specifically configured to determine whether the first parameter is within the range of the second parameter, and if so, determine that the first parameter is matched with the second parameter; otherwise, the first parameter does not match the second parameter.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410010923.5A CN104778090B (en) | 2014-01-09 | 2014-01-09 | A kind of control method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410010923.5A CN104778090B (en) | 2014-01-09 | 2014-01-09 | A kind of control method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104778090A CN104778090A (en) | 2015-07-15 |
CN104778090B true CN104778090B (en) | 2019-01-15 |
Family
ID=53619571
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410010923.5A Active CN104778090B (en) | 2014-01-09 | 2014-01-09 | A kind of control method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104778090B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050097377A1 (en) * | 2003-10-31 | 2005-05-05 | Kobe Chou | Power-saving control circuitry of electronic device and operating method thereof |
CN101162872A (en) * | 2006-10-13 | 2008-04-16 | 鸿富锦精密工业(深圳)有限公司 | Control circuit and method recognizing power adapter |
CN103036196A (en) * | 2012-12-03 | 2013-04-10 | 华为技术有限公司 | Device for overvoltage protection and method thereof |
CN103178726A (en) * | 2011-12-21 | 2013-06-26 | 宏碁股份有限公司 | Power adapter and power adapting method |
CN103376868A (en) * | 2012-04-19 | 2013-10-30 | 鸿富锦精密工业(武汉)有限公司 | Power adapter identification system and method |
-
2014
- 2014-01-09 CN CN201410010923.5A patent/CN104778090B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050097377A1 (en) * | 2003-10-31 | 2005-05-05 | Kobe Chou | Power-saving control circuitry of electronic device and operating method thereof |
CN101162872A (en) * | 2006-10-13 | 2008-04-16 | 鸿富锦精密工业(深圳)有限公司 | Control circuit and method recognizing power adapter |
CN103178726A (en) * | 2011-12-21 | 2013-06-26 | 宏碁股份有限公司 | Power adapter and power adapting method |
CN103376868A (en) * | 2012-04-19 | 2013-10-30 | 鸿富锦精密工业(武汉)有限公司 | Power adapter identification system and method |
CN103036196A (en) * | 2012-12-03 | 2013-04-10 | 华为技术有限公司 | Device for overvoltage protection and method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN104778090A (en) | 2015-07-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9846472B2 (en) | Firmware update method and power system thereof | |
EP3270297A1 (en) | Electronic device supporting usb interface and control method for usb interface | |
US8773271B1 (en) | Apparatuses, systems, and methods for detecting and reacting to exposure of an electronic device to moisture | |
US7586312B2 (en) | Power cycle test method for testing an electronic equipment | |
CN107145410B (en) | Method, system and equipment for automatically powering on and starting up system after abnormal power failure | |
US20140002055A1 (en) | System and method for real time detection and correlation of devices and power outlets | |
US8527788B2 (en) | Network wake up system with protection function | |
US20130283028A1 (en) | Adapter identification system and method for computer | |
US8941330B2 (en) | Light source operation | |
CN106055440B (en) | A kind of test method and system for realizing server exception power-off by BMC | |
US20140059361A1 (en) | Information processing system, external apparatus, and method for supplying power from host apparatus to external apparatus | |
TW201346536A (en) | Testing system and method for power on and off | |
CN106292989A (en) | A kind of information processing method and electronic equipment | |
CN111191219A (en) | Control circuit with trusted computing function | |
US20140042996A1 (en) | Voltage Regulating Device | |
US8074064B2 (en) | Testing and alert device and method for power leakages | |
CN108279936B (en) | Shutdown method and device for all-in-one machine in operating system connection state | |
CN104778090B (en) | A kind of control method and electronic equipment | |
TW201435356A (en) | CPU voltage test apparatus | |
CN106527643B (en) | A kind of communication equipment and its method for managing power supply | |
CN105100344A (en) | Hot plug processing method for user recognition module card, and mobile terminal | |
CN115527045A (en) | Image identification method and device for snow field danger identification | |
CN104868509B (en) | A kind of control method and external battery | |
CN108879589B (en) | Overcurrent protection method and device, terminal equipment and storage medium | |
JP6036229B2 (en) | Battery control device, battery control method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |