Power Supply Control Method, Device, Electronic Device, and Storage Medium
By establishing encrypted communication between the control module and the power supply module of the electronic device, generating and sending ciphertext instructions to control power supply, the stability and service life problems of electronic devices when used in overclocking mode are solved, and the effect of safe power supply and extended service life is achieved.
Patent Information
- Application Number
- CN202210226753.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-03-09
AI Technical Summary
When electronic devices are used in overclocking mode, the system stability decreases, resulting in a shortened service life, and the prior art is difficult to effectively solve this problem.
By establishing encrypted communication between the control module and the power supply module of the electronic device, ciphertext instructions are generated and sent to control the power supply, ensuring that only the authorized power supply module can decrypt and perform power supply operations.
It realizes safe power supply between electronic equipment and power supply module, reduces the frequency or time of overclocking operation, extends the service life of electronic equipment, and improves the stability of the system.
Smart Images

Figure CN115065460B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic technologies, and in particular, to a power supply control method and apparatus, an electronic device, and a storage medium. Background Art
[0002] When designing the parameters of the control module in an electronic device, in order to ensure the overall efficiency and operation stability, sufficient margins are often ensured.
[0003] When a user uses an electronic device, in order to improve the performance of the electronic device, the user often overclocks the electronic device to improve its performance.
[0004] There are many ways to overclock:
[0005] Some modify the data in the memory of the computing board;
[0006] Some replace the firmware in the control module of the electronic device;
[0007] By directly replacing the control module in the electronic device, a modification without leaving a trace can be achieved.
[0008] Overclocking the use of an electronic device will inevitably lead to a decrease in system stability and shorten the service life of the electronic device. Summary of the Invention
[0009] Embodiments of the present disclosure provide a power supply control method and apparatus, an electronic device, and a storage medium.
[0010] In a first aspect of the embodiments of the present disclosure, a power supply control method is provided, which is executed by a control module of an electronic device. The method includes:
[0011] Generating a control instruction;
[0012] Encrypting the control instruction according to a key commonly known to the power supply module of the electronic device to obtain a ciphertext instruction;
[0013] Sending the ciphertext instruction to the power supply module of the electronic device, where the ciphertext instruction is used to control the power supply of the power supply after being decrypted by the power supply module.
[0014] Based on the above solution, the method further includes:
[0015] Generating the key after the electronic device is started;
[0016] Sending the key to the power supply module.
[0017] Based on the above solution, the generating the key after the electronic device is started includes:
[0018] After the electronic device is started, obtain a random number;
[0019] Use the random number as an input parameter of the key generation algorithm to generate the key.
[0020] Based on the above solution, the obtaining a random number after the electronic device is started includes:
[0021] After the electronic device is started, send a request message to the power supply module;
[0022] Receive the random number returned by the power supply module based on the request message.
[0023] Based on the above solution, the encrypting the control instruction to obtain a ciphertext instruction includes:
[0024] Encrypt the control instruction and preset information determined dynamically to obtain the ciphertext instruction.
[0025] Based on the above solution, the preset information includes at least one of the following:
[0026] Random number;
[0027] Instruction generation time information of the control instruction;
[0028] Instruction generation sequence number of the control instruction.
[0029] A second aspect of the embodiments of the present disclosure provides a power supply control method, which is executed by a power supply module of an electronic device. The method includes:
[0030] Receive a control instruction to be executed sent by a control module;
[0031] When the instruction to be executed is a ciphertext instruction, decrypt the ciphertext instruction according to a key known to both the control module of the electronic device;
[0032] If the ciphertext instruction is successfully decrypted, perform a power supply operation according to the decrypted control instruction.
[0033] Based on the above solution, the method further includes:
[0034] When the instruction to be executed is a plaintext instruction, reject the execution of the plaintext instruction;
[0035] Based on the above solution, the method further includes:
[0036] Receive a request message sent after the electronic device is started;
[0037] Generate a random number according to the request message;
[0038] Send the random number to the control module;
[0039] Receive the key generated by the control module according to the random number.
[0040] Based on the above solution, if the ciphertext instruction is successfully decrypted, perform a power supply operation according to the decrypted control instruction, including:
[0041] If the ciphertext instruction is successfully decrypted, obtain the preset information in the decryption information;
[0042] Determine whether the decrypted control instruction is an invalid instruction according to the preset information;
[0043] When the decrypted control instruction is not an invalid instruction, perform the power supply operation according to the decrypted control instruction.
[0044] Based on the above solution, the invalid instruction includes at least one of the following:
[0045] An executed instruction;
[0046] The control instruction indicates a voided instruction.
[0047] A third aspect of the embodiments of the present disclosure provides a power supply control device, which is executed by a control module of an electronic device. The device includes:
[0048] A generation module, configured to generate a control instruction;
[0049] An encryption module, configured to encrypt the control instruction according to a key commonly known to the power supply module of the electronic device to obtain a ciphertext instruction;
[0050] A first sending module, configured to send the ciphertext instruction to the power supply module of the electronic device, where the ciphertext instruction is used to control the power supply of the power supply after being decrypted by the power supply module.
[0051] Based on the above solution, the device further includes:
[0052] A key module, configured to generate the key after the electronic device is started;
[0053] The first sending module is further configured to send the key to the power supply module.
[0054] Based on the above solution, the key module is specifically configured to obtain a random number after the electronic device is started; use the random number as an input parameter of the key generation algorithm to generate the key.
[0055] Based on the above solution, the key module is specifically configured to send a request message to the power supply module after the electronic device is started;
[0056] The device further includes:
[0057] A first receiving module, configured to receive the random number returned by the power supply module based on the request message.
[0058] Based on the above solution, the encryption module is further configured to encrypt the control instruction and preset information determined dynamically to obtain the ciphertext instruction.
[0059] Based on the above solution, the preset information includes at least one of the following:
[0060] Random number;
[0061] Instruction generation time information of the control instruction;
[0062] Instruction generation sequence number of the control instruction.
[0063] The fourth aspect of the embodiments of the present disclosure provides a power supply control device, which is executed by the power supply module of an electronic device. The device includes:
[0064] A second receiving module, configured to receive a control instruction to be executed sent by a control module;
[0065] A decryption module, configured to decrypt the ciphertext instruction according to a key commonly known to the power supply module of the electronic device when the instruction to be executed is a ciphertext instruction;
[0066] A power supply module: configured to perform a power supply operation according to the decrypted control instruction if the ciphertext instruction is successfully decrypted.
[0067] Based on the above solution, the device further includes:
[0068] A rejection module, configured to reject the execution of the plaintext instruction when the instruction to be executed is a plaintext instruction.
[0069] Based on the above solution, the device further includes:
[0070] A random number module, configured to receive a request message sent after the electronic device is started; generate a random number according to the request message;
[0071] A second sending module, configured to send the random number to the control module;
[0072] The second receiving module, configured to receive the key generated by the control module according to the random number.
[0073] Based on the above solution, the decryption module is specifically configured to: if the ciphertext instruction is successfully decrypted, obtain the preset information in the decryption information; determine whether the decrypted control instruction is an invalid instruction according to the preset information; when the decrypted control instruction is not an invalid instruction, perform the power supply operation according to the decrypted control instruction.
[0074] Based on the above solution, the invalid instruction includes at least one of the following:
[0075] An executed instruction;
[0076] The control instruction indicates a voided instruction.
[0077] The fifth aspect of the embodiments of the present disclosure provides an electronic device, including:
[0078] A memory for storing processor-executable instructions;
[0079] A processor connected to the memory;
[0080] Wherein, the processor is configured to execute the power supply control method provided in any one of the foregoing first aspect or second aspect.
[0081] The sixth aspect of the embodiments of the present disclosure provides a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a computer, enabling the computer to execute the power supply control method provided in any one of the foregoing first aspect or second aspect.
[0082] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0083] In the technical solution provided by the embodiments of the present disclosure, the control module of the electronic device generates a control instruction, encrypts the control instruction according to a key commonly known to the power supply module of the electronic device, obtains a ciphertext instruction, and sends the ciphertext instruction to the power supply module of the electronic device, where the ciphertext instruction is used to control the power supply of the power supply module after being decrypted by the power supply. In this way, on the one hand, secure power supply between the electronic device and the power supply module can be achieved; on the other hand, the frequency or duration of overclocking of the electronic device can be reduced, and the phenomena of multiple failures and short service life caused by the electronic device working in the overclocking mode for a long time can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0085] Figure 1 It is a flowchart showing a power supply control method of an electronic device according to an exemplary embodiment;
[0086] Figure 2 is a schematic flowchart of a power supply control method for an electronic device shown according to an exemplary embodiment;
[0087] Figure 3 is a schematic flowchart of a power supply control method for an electronic device shown according to an exemplary embodiment;
[0088] Figure 4 is a schematic flowchart of a power supply control method for an electronic device shown according to an exemplary embodiment;
[0089] Figure 5 is a schematic flowchart of a power supply control method for an electronic device shown according to an exemplary embodiment;
[0090] Figure 6 is a schematic flowchart of a power supply control method for an electronic device shown according to an exemplary embodiment;
[0091] Figure 7 is a schematic flowchart of a power supply control method for an electronic device shown according to an exemplary embodiment;
[0092] Figure 8 is a schematic structural diagram of a power supply control device shown according to an exemplary embodiment;
[0093] Figure 9 is a schematic structural diagram of a power supply control device shown according to an exemplary embodiment;
[0094] Figure 10 is a schematic structural diagram of a power supply control device shown according to an exemplary embodiment;
[0095] Figure 11 is a schematic structural diagram of a power supply control device shown according to an exemplary embodiment;
[0096] Figure 12 is a schematic structural diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners
[0097] Here, exemplary embodiments will be described in detail, and examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0098] Such as Figure 1As shown, an embodiment of the present disclosure provides a power supply control method, which is executed by a control module of an electronic device. The method includes:
[0099] S201: Generate a control instruction;
[0100] S202: Encrypt the control instruction according to a key commonly known to the power supply module of the electronic device to obtain a ciphertext instruction;
[0101] S203: Send the ciphertext instruction to the power supply module of the electronic device, where the ciphertext instruction is used to control the power supply of the power supply after being decrypted by the power supply module.
[0102] The electronic device in this embodiment can be an electronic device including a control module and a power supply module. The control module is originally used for information processing of the electronic device.
[0103] Here, the electronic device provided by the embodiment of the present disclosure can be various types of electronic devices, and the electronic device can be a terminal device or a server. Exemplarily, the terminal device can include: a mobile terminal and a fixed terminal, where the mobile terminal includes: a tablet computer, a notebook computer, etc.; the fixed terminal includes: a personal computer (Personal Computer, PC), etc. The PC can include a desktop PC, a notebook computer, or a large-screen display device, etc. The server can be: a rack-mounted server and / or a blade server.
[0104] In some embodiments, the electronic device can be an Information Technology (IT) device. The IT device includes various devices participating in IT computing. For example, the IT device can be a device serving as a blockchain node.
[0105] In some embodiments, the electronic device at least includes a control module and a power supply module. The control module can include a processor. In some embodiments, the control module further includes a memory, and the memory is connected to the processor. An executable application program is stored in the memory for the processor to execute control instructions.
[0106] The power supply module can at least include a power supply, and the power supply can include: various rechargeable batteries. The battery can include: a lithium battery and / or a sodium battery. The power supply module can also include a battery management system (Battery Management System, BMS) for managing the battery. The power supply module can also include, but is not limited to: a power supply chip, an inverter power supply, a DC power supply, a battery, etc.
[0107] Exemplarily, the processor in the processing module of the electronic device includes, but is not limited to: a central processing unit, a microcontroller, an embedded controller, and / or an image processor.
[0108] Exemplarily, the control instruction of the electronic device is an instruction recognizable by the control module and the power supply module of the electronic device, which is an agreed instruction between the two. The power supply module controls the output voltage, power supply power, and power supply current of the power supply according to the control instruction. Exemplarily, the control instruction includes, but is not limited to: a voltage reduction instruction, a voltage increase instruction, and / or a voltage holding instruction. Additionally exemplarily, the control instruction includes, but is not limited to: a power supply power increase instruction, a power supply power reduction instruction, an instruction to increase the power supply current, and / or an instruction to reduce the power supply current.
[0109] In the embodiment of the present disclosure, multiple communications can occur between the control module and the power supply module of the electronic device.
[0110] Exemplarily, when the electronic device is in the working state, the control module of the electronic device can send multiple control instructions to the power supply module of the electronic device. It can be understood that communication is maintained between the control module and the power supply module at all times, and the power supply module supplies power to the electronic device according to the control instruction, so that the electronic device can work properly.
[0111] In the embodiment of the present disclosure, the control module generates a control instruction, and encrypts the control instruction according to a key known to both the control module and the power supply module to obtain a ciphertext instruction. The power supply module determines whether to supply power to the load according to the decrypted control instruction.
[0112] The key can be a key pre-configured in the power supply module and the control module, or a key pre-negotiated between the power supply module and the control module. In short, before the control instruction is interacted between the control module and the power supply module, it is necessary to ensure that both parties know the key.
[0113] The control module generates a plaintext control instruction in S201, and encrypts the plaintext control instruction with the key in S202 to obtain an encrypted instruction, and this encrypted instruction is the ciphertext instruction. Without decryption, the ciphertext instruction is a jumble of characters or a string whose meaning cannot be understood by a third party, etc.
[0114] By encrypting the control instruction, only when the power supply module of the electronic device can normally decrypt the control instruction can the power supply operation be performed, reducing the high-power power supply provided by the power supply module in response to overclocking when the electronic device is overclocked. If the power supply module does not provide high-power power supply, the electronic device will be forced to exit the overclocking working mode due to insufficient power supply, reducing the phenomena of many failures and short service life caused by the electronic device working in the overclocking mode for a long time.
[0115] In some embodiments, the control module sends a control instruction to the power supply module, and the power supply module returns a response instruction to the control module according to the control instruction, so that the electronic device works stably. Specifically, when the control module sends a correct instruction to the power supply module, the power supply module controls the power supply according to the control instruction, and the electronic device can work normally; when the control module sends an incorrect instruction to the power supply module, the power supply module cannot recognize the instruction and cannot supply power, so the electronic device cannot work normally. Through the interaction of instruction information between the control module and the power supply module, it is ensured that only the control module of this electronic device can normally use the power supply module for power supply.
[0116] In some embodiments, the control module sends an encrypted control instruction 1 to the power supply module, and the power supply module returns an encrypted response instruction to the control module according to the control instruction 1; the control module sends an encrypted control instruction 2 to the power supply module, and the power supply module returns an encrypted response instruction to the control module according to the control instruction 2; and so on.
[0117] In the embodiments of the present disclosure, the control module and the power supply module of the electronic device communicate according to a communication protocol. The communication protocol is a communication rule agreed in advance between the control module and the power supply module, and is a rule and agreement that must be followed to complete communication or services. Exemplarily, the communication protocol includes, but is not limited to, Transmission Control Protocol / Internet Protocol (TCP / IP), NetBios Enhanced User Interface (NETBEUI), Internetwork Packet Exchange / Sequences Packet Exchange (IPX / SPX).
[0118] In some embodiments, the control module and the power supply module can periodically update the key. In this way, every once in a while, the key known to both the control module and the power supply module is changed once, so as to reduce the risk of a third party stealing the key and controlling the power supply of the power supply module, thus enhancing the power supply security of the power supply module.
[0119] In some other embodiments, as Figure 2 shown, the method further includes:
[0120] S101: After the electronic device is started, generate the key;
[0121] S102: Send the key to the power supply module.
[0122] After each startup of the electronic device, the control module generates a key. That is, every time the electronic device starts up, a new key is generated. Thus, the lifespan of a key is the current startup of the electronic device.
[0123] After each startup of the electronic device, a new key is generated. On the one hand, it realizes the dynamic update of the key, which can improve the power supply security of the power supply module compared with static passwords. On the other hand, generating the key after startup can also reduce unnecessary key generation and update.
[0124] In one embodiment, the method further includes:
[0125] Receiving overclocking power supply feedback information;
[0126] When receiving the overclocking power supply feedback information, updating the key.
[0127] For example, if the power supply module determines that it has entered the overclocking power supply mode according to its own power supply parameters, it sends overclocking power supply feedback information to the control module. However, when the control module finds that it has not sent a control instruction to the power supply module to make it enter the overclocking power supply mode, it can be considered that the current key has been leaked. At this time, the control module will update the key and send the updated key to the power supply module to improve the power supply security of the power supply module.
[0128] The overclocking power supply mode can be: the power supply mode of the power supply module when the electronic device is working in the overclocking mode. The power supply power of the power supply module in the overclocking power supply mode is greater than that in the non-overclocking power supply mode; or, the power supply voltage of the power supply module in the overclocking power supply mode is greater than that in the non-overclocking power supply mode. The non-overclocking power supply mode is: the power supply mode when the electronic device is in the normal frequency or low frequency mode.
[0129] In the embodiments of the present disclosure, the key sent to the power supply module can be an encrypted key and / or an unencrypted key, that is, the key can also be sent in plaintext or ciphertext.
[0130] If the key is sent in ciphertext, a pre-set static password can be used to encrypt the key generated after the startup of the electronic device. For example, use the serial number (Serial Number, SN) of the battery included in the power supply module, or the serial number of the CPU of the processing module to encrypt the key generated after the startup of the electronic device. If the SN of the battery is used to encrypt the key, the SN of the battery can be stored in the memory of the control module in advance, for example, stored in the read-only memory (Read Only Memory, ROM) of the control module. If the serial number of the CPU is used to encrypt the key, the SN of the CPU is pre-stored in the memory of the power supply module.
[0131] In some embodiments, an encryption flag is added to the communication protocol, and the control module of the electronic device sends a flag indicating whether the key is sent in plaintext or ciphertext to the power supply module, facilitating the power supply module to quickly identify the encryption status of the key.
[0132] If the encryption flag indicates encryption, the key sent by the control module of the electronic device is in ciphertext;
[0133] If the encryption flag indicates non-encryption, the key sent by the control module of the electronic device is in plaintext.
[0134] By adding an encryption flag to the communication protocol, the key exchange communication between the control module and the power supply module of the electronic device becomes more flexible. Exemplarily, the encryption algorithm can be various pre-agreed algorithms, including but not limited to the Message-Digest Algorithm (MD5) and the Data Encryption Standard (DES).
[0135] In some embodiments, as Figure 3 shown, S101 may include:
[0136] S1011: After the electronic device is started, obtain a random number;
[0137] S1012: Use the random number as the input parameter of the key generation algorithm to generate the key.
[0138] In the embodiments of the present disclosure, after the electronic device is started, a random number is obtained.
[0139] This random number is generated by various random algorithms. Exemplarily, the random number includes but is not limited to true random numbers, which have characteristics such as randomness, unpredictability, and non-repeatability. True random numbers have advantages such as high efficiency, low resource consumption, and reliable random number generation. There is no limit on the number of digits of the random number. Exemplarily, the number of digits of the random number can be 32 bits or other numbers of digits.
[0140] In some embodiments, after the electronic device is started, a true random number can be generated according to the sensors in the AC environment. There is no limit on the number of digits of the true random number. Exemplarily, the number of digits of the true random number can be 32 bits or other numbers of digits.
[0141] In some embodiments, using the random number as the input parameter of the key generation algorithm, through relevant algorithms, the key is generated. There are various algorithms for generating the key. Exemplarily, they include but are not limited to the Message-Digest Algorithm (MD5) and the Data Encryption Standard (DES).
[0142] Using a random number as the input of the key generation algorithm, the generated key has randomness. In this way, the probability that any two generated keys are the same is random, thereby reducing the regularity of the key generated according to the input parameters with a certain pattern and reducing the reason for insufficient security caused by this regularity.
[0143] In some embodiments, the input parameters of the key generation algorithm may include one or more. If there are multiple input parameters, in addition to the random number, the input parameters may further include the number of times the key is generated. In this way, the randomness of the generated key is ensured by using the random number, and at the same time, the different probability between two adjacent generated keys is further increased by using the number of times of generation.
[0144] In some embodiments, S1011 may include: the control module generates a random number by itself.
[0145] In some embodiments, as Figure 4 shown, S1011 may include:
[0146] S10111: After the electronic device is started, send a request message to the power supply module;
[0147] S10112: Receive the random number returned by the power supply module based on the request message.
[0148] After the electronic device is started, the control module of the electronic device sends a request message to the power supply module, and the control module receives the random number returned by the power supply module based on the request message.
[0149] In the embodiments of the present disclosure, in order for the electronic device to work properly, it needs to obtain a random number after being started. If the acquisition of the random number fails, the electronic device cannot work properly; after the acquisition of the random number is successful, the electronic device can work properly.
[0150] After the electronic device is started, it sends a request message to the power supply module to obtain the random number returned by the power supply module. After the electronic device is started, it communicates with the power supply module of the electronic device, so that the electronic device has no chance to overclock during subsequent operation.
[0151] It can be understood that since the electronic device needs to be powered by the power supply module when it works, the control module of the electronic device needs to send a request message to the power supply module. After receiving the request message sent by the control module, the power supply module parses the request message according to the agreed communication protocol. If the content of the request message is normally parsed, the power supply module generates a random number and returns it to the control module; if the power supply module cannot normally parse the request message or cannot recognize the content of the request message, the power supply module cannot generate a random number.
[0152] The control module sends a request message to cause the power supply module to generate a random number. Understandably, only when receiving a request from the control module can the power supply module return the random number to the control module. The random number generated through the communication between the control module and the power supply module reduces the possibility of the random number being leaked, further enhancing the power supply security of the power supply module.
[0153] In the embodiments of the present disclosure, the random number returned by the power supply module can be in plaintext or ciphertext.
[0154] If the random number is in ciphertext, a pre-set static password can be used to encrypt the random number returned by the power supply module. For example, the serial number (SN) of the battery included in the power supply module, or the serial number of the CPU of the processing module is used to encrypt the random number returned by the power supply module. If the SN of the battery is used to encrypt the random number, the SN of the battery can be stored in the memory of the power supply module in advance. If the serial number of the CPU is used to encrypt the random number, the SN of the CPU is pre-stored in the memory of the power supply module.
[0155] In some embodiments, a mark indicating whether to encrypt is added to the communication protocol, and the power supply module of the electronic device sends a mark indicating whether the random number is in plaintext or ciphertext to the control module, facilitating the control module to quickly identify the encryption status of the random number.
[0156] If the encryption mark indicates encryption, the random number received by the control module of the electronic device is in ciphertext;
[0157] If the encryption mark indicates non-encryption, the random number received by the control module of the electronic device is in plaintext.
[0158] By adding a mark indicating whether to encrypt to the communication protocol, the communication between the control module and the power supply module of the electronic device becomes more flexible and convenient. Exemplarily, the encryption algorithm can be various agreed-upon algorithms, including but not limited to the Message-Digest Algorithm (MD5), Data Encryption Standard (DES).
[0159] In some embodiments, the S202 may include:
[0160] Encrypt the control instruction and the dynamically determined preset information to obtain the ciphertext instruction.
[0161] In the embodiments of the present disclosure, for different times, the ciphertext instructions obtained by encrypting the same control instruction by the control module with a key may result in the same encrypted ciphertext instructions. In this way, if a third party steals the ciphertext instruction and sends it to the power supply module, it may cause the possibility of overclocking power supply.
[0162] Therefore, in the embodiments of the present disclosure, dynamic preset information is introduced. While generating control instructions, the preset information is also dynamically determined. Each time a control instruction is generated, the preset information is determined once. Thus, the life cycle of a preset information is one communication of a control instruction. Since a third party cannot simulate the preset information dynamically determined by the control module, it is ensured that each encrypted ciphertext instruction is different, improving the reliability of the interaction of control instructions between the control module and the power supply module.
[0163] While generating control instructions, the preset information is dynamically determined, realizing the dynamic update of the preset information. Compared with static preset information or without introducing preset information, the security and reliability of control instruction encryption can be improved.
[0164] In some embodiments, the preset information includes at least one of the following:
[0165] Random number;
[0166] The instruction generation time information of the control instruction;
[0167] The instruction generation sequence number of the control instruction.
[0168] In the embodiments of the present disclosure, the preset information is an element used for encrypting together with the control instruction.
[0169] In some embodiments, while generating control instructions, the generated preset information is a random number, and the random number is a unique identifier. The random number includes but is not limited to true random numbers. True random numbers have characteristics such as randomness, unpredictability, and non-repeatability. True random numbers have advantages such as high efficiency, low resource consumption, and reliable random number generation. There is no limit to the number of digits of the random number. Exemplarily, the number of digits of the random number can be 32 bits or other numbers of digits.
[0170] Exemplarily, the power supply module and the control module can agree on the number of digits of the random number. The number of digits of the random number can be used by the power supply module to determine whether the control instruction is a control instruction generated by the control module. If the number of digits of the random number is inconsistent with the agreed number of digits, it indicates that the ciphertext instruction may be an insecure instruction.
[0171] In other embodiments, while generating control instructions, the generated preset information is the instruction generation time information of the control instruction, and the time information is a unique identifier. Exemplarily, the time information includes year, month, day, hour, minute, second, and millisecond.
[0172] Exemplarily, this generation time information can be used by the power supply module to determine whether the control instruction is a newly generated control instruction by the control module. If the time difference between the generation time indicated by this generation time information and the current time is greater than a preset value, it indicates that the ciphertext instruction may be an insecure instruction.
[0173] In some other embodiments, while generating control instructions, the generated preset information is a sequential number, which is a unique identifier. Exemplarily, when the electronic device is started, the sequence number starts counting from 0, and each time a control instruction is generated, the sequence number is incremented by 1. The life cycle of the sequence number is one start-up of the electronic device, ensuring that the sequence number is not repeated during one start-up and operation of the electronic device.
[0174] Exemplarily, this sequential number can facilitate the power supply module to determine whether the received ciphertext instruction was an old or counterfeited ciphertext instruction based on the ciphertext instructions it has already received. For example, if the current sequential number is not consecutive with the number in the previously executed ciphertext instruction, the power supply module may consider this ciphertext instruction as an abnormal instruction, and then the control module will receive an abnormal feedback.
[0175] As Figure 5 shown, an embodiment of the present disclosure provides a power supply control method, which is executed by the power supply module of the electronic device. The method includes:
[0176] S401: Receive the control instruction to be executed sent by the control module;
[0177] S402: When the instruction to be executed is a ciphertext instruction, decrypt the ciphertext instruction according to the key jointly known to the control module of the electronic device;
[0178] S403: If the ciphertext instruction is successfully decrypted, perform a power supply operation according to the decrypted control instruction.
[0179] Exemplarily, the power supply module controls the output voltage, power supply power, and supply current of the power supply according to the control instruction. Exemplarily, the control instruction includes but is not limited to: a voltage reduction instruction, a voltage increase instruction, and / or a voltage holding instruction. Additionally, exemplarily, the control instruction includes but is not limited to: a power supply power increase instruction, a power supply power reduction instruction, an instruction to increase the supply current, and / or an instruction to reduce the supply current.
[0180] In the embodiment of the present disclosure, encrypted communication is performed between the control module and the power supply module of the electronic device.
[0181] Exemplarily, when the electronic device is in the working state, the power supply module of the electronic device can receive the control instructions to be executed sent by the control module multiple times. It can be understood that the control module and the power supply module maintain communication at any time, and the power supply module supplies power to the electronic device according to the control instruction, so that the electronic device can work properly.
[0182] The key can be a key pre-configured in the power supply module and the control module, or a key pre-negotiated between the power supply module and the control module. In short, before the control instructions are exchanged between the control module and the power supply module, it is necessary to ensure that both parties know the key.
[0183] The instructions to be executed received by the power supply module only support encrypted instructions. Without decryption, the encrypted instructions are a jumble of characters or strings whose meaning cannot be understood by a third party, etc.
[0184] By encrypting the instructions to be executed, power supply operations can only be performed when the power supply module of the electronic device can normally decrypt the control instructions, reducing the high-power supply provided by the power supply module in response to overclocking when the electronic device is overclocked. If the power supply module does not provide high-power supply, the electronic device will be forced to exit the overclocking working mode due to insufficient power supply, reducing the phenomena of multiple failures and short service life caused by the electronic device working in the overclocking mode for a long time.
[0185] In the embodiments of the present disclosure, the control module and the power supply module of the electronic device communicate according to a communication protocol. The communication protocol is a communication rule agreed upon in advance by the control module and the power supply module, and is a rule and agreement that must be followed to complete communication or services. Exemplarily, the communication protocol includes, but is not limited to, Transmission Control Protocol / Internet Protocol (TCP / IP), NetBios Enhanced User Interface (NETBEUI), Internetwork Packet Exchange / Sequences Packet Exchange (IPX / SPX).
[0186] In some embodiments, the control module and the power supply module can periodically update the key. In this way, every once in a while, the key commonly known between the control module and the power supply module is changed once, thereby reducing the risk of a third party stealing the key and controlling the power supply of the power supply module, thus enhancing the power supply security of the power supply module.
[0187] In other embodiments, as Figure 6 shown, the method further includes:
[0188] S404: When the instruction to be executed is a plaintext instruction, reject the execution of the plaintext instruction;
[0189] In the embodiments of the present disclosure, the power supply module of the electronic device receives the control instruction sent by the control module. The control instruction only supports encrypted instructions. If the control instruction is a plaintext instruction, it is rejected; if the control instruction is an encrypted instruction, the encrypted instruction is decrypted in accordance with the control module of the electronic device. If the encrypted instruction is successfully decrypted, the power supply operation is performed according to the decrypted control instruction.
[0190] In some other embodiments, such as Figure 7 shown, the method further includes:
[0191] S301: Receive a request message sent after the electronic device is started;
[0192] S302: Generate a random number according to the request message;
[0193] S303: Send the random number to the control module;
[0194] S304: Receive the key generated by the control module according to the random number.
[0195] In some embodiments, the power supply module receives a request message sent after the electronic device is started and generates a random number according to the request message. It can be understood that only when the request message sent after the electronic device is started is received, the power supply module can return the random number to the control module. The random number generated by the communication between the control module and the power supply module reduces the possibility of the random number being leaked and further improves the power supply security of the power supply module.
[0196] The random number is generated by using various random algorithms. Exemplarily, the random number includes but is not limited to a true random number, and the true random number has characteristics such as randomness, non-inferability, and non-repeatability. The true random number has advantages such as high efficiency, low resource occupancy, and reliable random number generation. There is no limitation on the number of digits of the random number. Exemplarily, the number of digits of the random number can be 32 bits or other numbers of digits.
[0197] In some embodiments, the power supply module can generate a true random number according to a sensor in the AC environment. There is no limitation on the number of digits of the true random number. Exemplarily, the number of digits of the true random number can be 32 bits or other numbers of digits.
[0198] In the embodiments of the present disclosure, the random number sent by the power supply module to the control module can be in plaintext or ciphertext.
[0199] If the random number is in ciphertext, a pre-set static password can be used to encrypt the random number sent by the power supply module to the control module. For example, the serial number (Serial Number, SN) of the battery included in the power supply module or the serial number of the CPU of the processing module is used to encrypt the random number sent by the power supply module to the control module. If the SN of the battery is used to encrypt the random number, the SN of the battery can be stored in the memory of the power supply module in advance. If the serial number of the CPU is used to encrypt the random number, the SN of the CPU is pre-stored in the memory of the power supply module.
[0200] In some embodiments, an encryption flag is added to the communication protocol, and the power supply module of the electronic device sends a flag indicating whether the random number is in plaintext or ciphertext to the control module, facilitating the control module to quickly identify the encryption status of the random number.
[0201] If the encryption flag indicates encryption, the random number sent by the power supply module to the control module is in ciphertext;
[0202] If the encryption flag indicates non-encryption, the random number sent by the power supply module to the control module is in plaintext.
[0203] By adding an encryption flag to the communication protocol, the communication between the control module and the power supply module of the electronic device becomes more flexible and convenient. Exemplarily, the encryption algorithm can be various pre-agreed algorithms, including but not limited to the Message-Digest Algorithm (MD5) and the Data Encryption Standard (DES).
[0204] In some embodiments, S403 may include:
[0205] If the ciphertext instruction is successfully decrypted, obtain the preset information in the decryption information;
[0206] Determine whether the decrypted control instruction is an expired instruction according to the preset information;
[0207] When the decrypted control instruction is not an expired instruction, perform the power supply operation according to the decrypted control instruction.
[0208] In some embodiments, preset information is introduced into the ciphertext instruction, and the preset information can be used to judge the status of the control instruction.
[0209] The preset information includes at least one of the following:
[0210] Random number;
[0211] The instruction generation time information of the control instruction;
[0212] The instruction generation sequence number of the control instruction.
[0213] In some embodiments, the preset information is a random number, and the power supply module and the control module can agree on the number of digits of the random number. If the number of digits of the obtained preset information is inconsistent with the agreed number of digits of the random number, it indicates that the ciphertext instruction is an expired instruction.
[0214] In some other embodiments, the preset information is the instruction generation time information of the control instruction. Exemplarily, the time information includes year, month, day, hour, minute, second, and millisecond. If the time difference between the generation time indicated by the generation time information and the current time is greater than a preset value, it indicates that the ciphertext instruction is an expired instruction.
[0215] In still some other embodiments, the preset information is a sequence number, and the sequence number is a unique identifier. Exemplarily, when the electronic device starts up, the sequence number starts counting from 0, and the life cycle of the sequence number is one startup of the electronic device. If the current sequence number is not continuous with the number in the previously executed ciphertext instruction, it indicates that the ciphertext instruction is an expired instruction.
[0216] By introducing preset information into the ciphertext instruction and determining whether the ciphertext instruction is an expired instruction according to the preset information, when the decrypted control instruction is not an expired instruction, the power supply operation is performed according to the decrypted control instruction, thereby further ensuring the safety of the power supply module of the electronic device.
[0217] In some embodiments, the expired instructions include at least one of the following:
[0218] Executed instruction;
[0219] The control instruction indicates a voided instruction.
[0220] In some embodiments, in order to accurately execute the control instruction, the power supply module of the electronic device needs to judge whether the control instruction has expired. The expired instructions include at least one of the following: executed instruction, the control instruction indicates a voided instruction.
[0221] Exemplarily, the executed instruction refers to all historical instructions executed by the power supply module after the current startup of the electronic device.
[0222] As Figure 8 shown, an embodiment of the present disclosure provides a power supply control device, which is executed by a control module of an electronic device. The device includes:
[0223] A generation module 110, configured to generate a control instruction;
[0224] An encryption module 120, configured to encrypt the control instruction according to a key known to both the power supply module of the electronic device and the encryption module 120, to obtain a ciphertext instruction;
[0225] A first sending module 130, configured to send the ciphertext instruction to the power supply module of the electronic device, where the ciphertext instruction is used to control the power supply of the power supply after being decrypted by the power supply module.
[0226] In some embodiments, the power supply control device can be used in various electronic devices.
[0227] In some embodiments, the generation module 110, the encryption module 120, and the first sending module 130 may be program modules; after being executed by a processor, the program modules can implement the functions of any of the above modules.
[0228] In other embodiments, the generation module 110, the encryption module 120, and the first sending module 130 may be software-hardware combined modules; the software-hardware combined modules include, but are not limited to: various programmable arrays; the programmable arrays include, but are not limited to: field programmable arrays and / or complex programmable arrays.
[0229] In still other embodiments, the generation module 110, the encryption module 120, and the first sending module 130 may further include: a pure hardware module; the pure hardware module includes, but is not limited to: application specific integrated circuits.
[0230] In other embodiments, as Figure 9 shown, the device further includes:
[0231] A key module 100, configured to generate the key after the electronic device is started;
[0232] The first sending module 130 is further configured to send the key to the power supply module.
[0233] In some embodiments, the key module 100 is specifically configured to obtain a random number after the electronic device is started; use the random number as an input parameter of the key generation algorithm to generate the key.
[0234] In some embodiments, the key module 100 is specifically configured to send a request message to the power supply module after the electronic device is started;
[0235] The device further includes:
[0236] A first receiving module, configured to receive the random number returned by the power supply module based on the request message.
[0237] In some embodiments, the encryption module 120 is further configured to encrypt the control instruction and dynamically determined preset information to obtain the encrypted instruction.
[0238] In some embodiments, the preset information includes at least one of the following:
[0239] Random number;
[0240] The instruction generation time information of the control instruction;
[0241] The instruction generation sequence number of the control instruction.
[0242] AsFigure 10 As shown, an embodiment of the present disclosure provides a power supply control device, which is executed by a power supply module of an electronic device. The device includes:
[0243] A second receiving module 210, configured to receive a control instruction to be executed sent by a control module;
[0244] A decryption module 220, configured to decrypt the ciphertext instruction according to a key known to both the power supply module of the electronic device when the instruction to be executed is a ciphertext instruction;
[0245] A power supply module 230, configured to perform a power supply operation according to the decrypted control instruction if the ciphertext instruction is successfully decrypted.
[0246] In some embodiments, the power supply control device can be used in various electronic devices.
[0247] In some embodiments, the second receiving module 210, the decryption module 220, and the power supply module 230 may be program modules; after being executed by a processor, the program modules can implement the functions of any of the above modules.
[0248] In other embodiments, the second receiving module 210, the decryption module 220, and the power supply module 230 may be a software-hardware combination module; the software-hardware combination module includes, but is not limited to: various programmable arrays; the programmable array includes, but is not limited to: a field programmable array and / or a complex programmable array.
[0249] In still other embodiments, the second receiving module 210, the decryption module 220, and the power supply module 230 may further include: a pure hardware module; the pure hardware module includes, but is not limited to: an application specific integrated circuit.
[0250] In other embodiments, the device further includes:
[0251] A rejection module, configured to reject the execution of the plaintext instruction when the instruction to be executed is a plaintext instruction.
[0252] In other embodiments, such as Figure 11 , the device further includes:
[0253] A random number module 201, configured to receive a request message sent after the electronic device is started; generate a random number according to the request message;
[0254] A second sending module 202, configured to send the random number to the control module;
[0255] The second receiving module 210, configured to receive the key generated by the control module according to the random number.
[0256] In some embodiments, the decryption module 220 is specifically configured to, if the ciphertext instruction is successfully decrypted, obtain the preset information in the decryption information; determine whether the decrypted control instruction is an invalid instruction according to the preset information; and when the decrypted control instruction is not an invalid instruction, perform the power supply operation according to the decrypted control instruction.
[0257] In some embodiments, the invalid instruction includes at least one of the following:
[0258] An executed instruction;
[0259] The control instruction indicates a voided instruction.
[0260] Embodiments of the present disclosure provide an electronic device, including:
[0261] A memory for storing processor-executable instructions;
[0262] A processor connected to the memory;
[0263] Wherein, the processor is configured to execute the power supply control method provided by any of the foregoing technical solutions.
[0264] The processor may include various types of storage media, and the storage media is a non-temporary computer storage media, which can continue to remember and store the information thereon after the communication device loses power.
[0265] Here, the electronic device includes: the foregoing terminal device or server. The electronic device includes a processor and a memory.
[0266] The processor can be connected to the memory through a bus or the like, and is used to read the executable program stored on the memory. For example, it can execute at least one of the methods shown as Figures 1 to 7 any one of the methods.
[0267] An embodiment of the present disclosure shows the structure of an electronic device. The electronic device 900 device refers to Figure 12 , the electronic device 900 includes a processing component 922, which further includes one or more processors, and memory resources represented by a memory 932 for storing instructions executable by the processing component 922, such as application programs. The application programs stored in the memory 932 may include one or more modules corresponding to each group of instructions. In addition, the processing component 922 is configured to execute instructions to execute any of the foregoing methods applied to the device, for example, at least one of the methods shown as Figures 1 to 7 any one of the methods.
[0268] The electronic device 900 may further include a power supply component 926 configured to perform power management of the electronic device 900, a wired or wireless network interface 950 configured to connect the electronic device 900 to a network, and an input / output (I / O) interface 958. The electronic device 900 may operate based on an operating system stored in the memory 932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
[0269] In an exemplary embodiment, the apparatus 900 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for performing the above method.
[0270] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as the memory 932 including instructions, and the above instructions may be executed by the processing component 922 of the apparatus 900 to complete the above method. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0271] Embodiments of the present disclosure provide a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a computer, enabling the computer to execute the power supply control method provided in any of the foregoing embodiments, and capable of executing at least one of the power supply control methods of the electronic devices as shown in Figures 1 to 7 any of the electronic devices.
[0272] The power supply control method, executed by a control module of an electronic device, may include: generating a control instruction; encrypting the control instruction according to a key commonly known to the power supply module of the electronic device to obtain a ciphertext instruction; and sending the ciphertext instruction to the power supply module of the electronic device, where the ciphertext instruction is used to control the power supply of the power supply after being decrypted by the power supply module.
[0273] It can be understood that the power supply control method further includes: generating the key after the electronic device is started; and sending the key to the power supply module.
[0274] It can be understood that generating the key after the electronic device is started includes: obtaining a random number after the electronic device is started; and using the random number as an input parameter of a key generation algorithm to generate the key.
[0275] Understandably, after the electronic device is started, obtaining a random number includes: after the electronic device is started, sending a request message to the power supply module; receiving the random number returned by the power supply module based on the request message.
[0276] Understandably, encrypting the control instruction to obtain a ciphertext instruction includes: encrypting the control instruction and dynamically determined preset information to obtain the ciphertext instruction.
[0277] Understandably, the preset information includes at least one of the following: a random number; instruction generation time information of the control instruction; an instruction generation sequence number of the control instruction.
[0278] The power supply control method is executed by the power supply module of the electronic device. The method includes: receiving a control instruction to be executed sent by the control module; when the instruction to be executed is a ciphertext instruction, decrypting the ciphertext instruction according to a key commonly known to the control module of the electronic device; if the ciphertext instruction is successfully decrypted, performing a power supply operation according to the decrypted control instruction.
[0279] Understandably, the method further includes: when the instruction to be executed is a plaintext instruction, refusing to execute the plaintext instruction.
[0280] Understandably, the method further includes: receiving a request message sent after the electronic device is started; generating a random number according to the request message; sending the random number to the control module; receiving the key generated by the control module according to the random number.
[0281] Understandably, the step of if the ciphertext instruction is successfully decrypted, performing a power supply operation according to the decrypted control instruction includes: if the ciphertext instruction is successfully decrypted, obtaining the preset information in the decryption information; determining whether the decrypted control instruction is an invalid instruction according to the preset information; when the decrypted control instruction is not an invalid instruction, performing the power supply operation according to the decrypted control instruction.
[0282] Understandably, the invalid instruction includes at least one of the following: an executed instruction; an instruction indicated by the control instruction to be invalidated.
[0283] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0284] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A power supply control method, characterized in that, it is executed by a control module of an electronic device, and the method includes: generating a control instruction; encrypting the control instruction according to a key commonly known to the power supply module of the electronic device to obtain a ciphertext instruction; sending the ciphertext instruction to the power supply module of the electronic device, wherein the ciphertext instruction is used to control the power supply of the power supply after being decrypted by the power supply module; the method further includes: receiving overclocking power supply feedback information sent by the power supply module, where the overclocking power supply feedback information characterizes that the electronic device is operating in an overclocking mode; when receiving the overclocking power supply feedback information, updating the key and sending the updated key to the power supply module.
2. The method according to claim 1, characterized in that, the method further includes: generating the key after the electronic device is started; sending the key to the power supply module.
3. The method according to claim 2, characterized in that, the generating the key after the electronic device is started includes: obtaining a random number after the electronic device is started; using the random number as an input parameter of a key generation algorithm to generate the key.
4. The method according to claim 3, characterized in that, the obtaining a random number after the electronic device is started includes: sending a request message to the power supply module after the electronic device is started; receiving the random number returned by the power supply module based on the request message.
5. The method according to claim 1, characterized in that, the encrypting the control instruction to obtain a ciphertext instruction includes: encrypting the control instruction and preset information determined dynamically to obtain the ciphertext instruction.
6. The method according to claim 5, characterized in that, the preset information includes at least one of the following: a random number; instruction generation time information of the control instruction; instruction generation sequence number of the control instruction.
7. A power supply control method, characterized in that, it is executed by a power supply module of an electronic device, and the method includes: receiving a control instruction to be executed sent by a control module; when the control instruction to be executed is a ciphertext instruction, decrypting the ciphertext instruction according to a key commonly known to the control module of the electronic device; if the ciphertext instruction is successfully decrypted, performing a power supply operation according to the decrypted control instruction; the method further includes: when it is determined that the electronic device is operating in an overclocking mode, sending overclocking power supply feedback information to the control module; receiving the updated key sent by the control module.
8. The method according to claim 7, characterized in that, the method further includes: when the control instruction to be executed is a plaintext instruction, refusing to execute the plaintext instruction.
9. The method according to claim 7, characterized in that, the method further includes: receiving a request message sent after the electronic device is started; generating a random number according to the request message; sending the random number to the control module; receiving the key generated by the control module according to the random number.
10. The method according to claim 7, characterized in that, If the ciphertext instruction is successfully decrypted, perform a power supply operation according to the decrypted control instruction, including: If the ciphertext instruction is successfully decrypted, obtain the preset information in the decryption information; Determine whether the decrypted control instruction is an invalid instruction according to the preset information; When the decrypted control instruction is not an invalid instruction, perform the power supply operation according to the decrypted control instruction.
11. According to the method described in claim 10, wherein, The invalid instruction includes at least one of the following: An executed instruction; The control instruction indicates a voided instruction.
12. A power supply control device, wherein, Executed by the control module of the electronic device, the device includes: A generation module for generating a control instruction; An encryption module for encrypting the control instruction according to a key known to both the power supply module of the electronic device and the encryption module to obtain a ciphertext instruction; A first sending module for sending the ciphertext instruction to the power supply module of the electronic device, wherein the ciphertext instruction is used to control the power supply of the power supply after being decrypted by the power supply module; The device further includes a module for performing the following operations: Receiving overclocking power supply feedback information sent by the power supply module, where the overclocking power supply feedback information characterizes that the electronic device is working in an overclocking mode; When receiving the overclocking power supply feedback information, updating the key and sending the updated key to the power supply module.
13. According to the device described in claim 12, wherein, The device further includes: A key module for generating the key after the electronic device is started; The first sending module is further used to send the key to the power supply module.
14. According to the device described in claim 13, wherein, The key module is specifically used to obtain a random number after the electronic device is started; using the random number as an input parameter of the key generation algorithm to generate the key.
15. According to the device described in claim 14, wherein, The key module is specifically used to send a request message to the power supply module after the electronic device is started; The device further includes: A first receiving module for receiving the random number returned by the power supply module based on the request message.
16. According to the device described in claim 12, wherein, The encryption module is further used to encrypt the control instruction and dynamically determined preset information to obtain the ciphertext instruction.
17. According to the device described in claim 16, wherein, The preset information includes at least one of the following: A random number; The instruction generation time information of the control instruction; The instruction generation sequence number of the control instruction.
18. A power supply control device, wherein, Executed by the power supply module of the electronic device, the device includes: A second receiving module for receiving a control instruction to be executed sent by the control module; A decryption module for decrypting the ciphertext instruction according to a key known to both the power supply module of the electronic device and the control module when the control instruction to be executed is a ciphertext instruction; A power supply module, configured to perform a power supply operation according to the decrypted control instruction if the ciphertext instruction is successfully decrypted; The device further includes a module for performing the following operations: When it is determined that the electronic device is operating in an overclocking mode, send overclocking power supply feedback information to the control module; Receive the updated key sent by the control module.
19. The device according to claim 18, wherein, The device further includes: A rejection module, configured to reject the execution of the plaintext instruction when the control instruction to be executed is a plaintext instruction.
20. The device according to claim 18, wherein, The device further includes: A random number module, configured to receive a request message sent after the startup of the electronic device; generate a random number according to the request message; A second sending module, configured to send the random number to the control module; The second receiving module, configured to receive the key generated by the control module according to the random number.
21. The device according to claim 18, wherein, The decryption module is specifically configured to, if the ciphertext instruction is successfully decrypted, obtain preset information in the decryption information; determine whether the decrypted control instruction is an expired instruction according to the preset information; when the decrypted control instruction is not an expired instruction, perform the power supply operation according to the decrypted control instruction.
22. The device according to claim 21, wherein, The expired instruction includes at least one of the following: An executed instruction; An instruction indicated by the control instruction as being invalidated.
23. An electronic device, wherein, includes: A memory for storing processor-executable instructions; A processor, connected to the memory; wherein, the processor is configured to execute the power supply control method provided in any one of claims 1 to 6 or 7 to 11.
24. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a computer, enable the computer to execute the power supply control method provided in any one of claims 1 to 6 or 7 to 11.
Citation Information
Patent Citations
Battery protection system based on variable plaintext and variable key AES encryption
CN107437638A
Internet of Things equipment control method, equipment, storage medium and electronic equipment
CN110708164A