Data processing equipment and method
By introducing two operating modes and power consumption management mechanisms into the data processing equipment, the problem of excessive power consumption at high frequencies is solved, and more stable and efficient data processing is achieved.
Patent Information
- Application Number
- CN202510217497.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-23
AI Technical Summary
When the operating frequency of data processing equipment is too high, the power consumption may exceed the ability of power supply electronic equipment, resulting in the equipment being unable to operate stably.
A data processing device is designed with two operating modes: the first mode is powered by electronic devices and the processor runs at a low frequency; the second mode is powered by an independent power supply module, the processor runs at a high frequency, and the operating frequency is dynamically adjusted by detecting power consumption parameters.
Through mode switching and power consumption management, ensure that the device provides stronger data processing capabilities at high frequencies while avoiding stability issues caused by excessive power consumption.
Smart Images

Figure CN120029429A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing device and method. Background Art
[0002] In the related art, there is a type of dedicated data processing device that can be connected to the interface of other electronic devices (such as computers, tablets, etc.), so as to use its own configured processor to process the data provided by other electronic devices and feed back the processing results to other electronic devices.
[0003] The problem with this type of data processing device is that other electronic devices are required to power the data processing device when processing data. When the operating frequency of the data processing device is too high, the power consumption of the data processing device may exceed the power supply capacity of other electronic devices, causing the data processing device to be unable to operate stably. Summary of the invention
[0004] To this end, this application discloses the following technical solutions:
[0005] A first aspect of the present application provides a data processing device, comprising a processor, for processing data provided by an electronic device, the electronic device being connected to the data processing device;
[0006] The data processing device has a first mode and a second mode;
[0007] The operating frequency of the processor in the first mode is lower than the operating frequency of the processor in the second mode;
[0008] In the first mode, the data processing device is powered by the electronic device;
[0009] In the second mode, the data processing device is powered by a power supply module different from the electronic device, and the power output by the power supply module to the data processing device is greater than the power output by the electronic device to the data processing device.
[0010] Optionally, the device further includes a first controller, configured to:
[0011] In the first mode, sending a first notification message to the electronic device so that the electronic device can supply power to the data processing device;
[0012] In the second mode, a second notification message is sent to the electronic device, so that the electronic device can receive power from the power supply module.
[0013] Optionally, a second controller is further included, configured to:
[0014] When the data processing device is not powered by the power supply module, controlling the processor to be in the first mode;
[0015] When the data processing device is powered by the power supply module, the processor is controlled to be in the second mode.
[0016] Optionally, it further includes a detection module, used to detect the power consumption parameters of the processor in the first mode;
[0017] The second controller is further configured to control the operating frequency of the processor according to the power consumption parameter in the first mode.
[0018] Optionally, the second controller controls the operating frequency of the processor according to the power consumption parameter, to:
[0019] If the power consumption parameter is greater than or equal to a first power consumption parameter threshold, lowering the operating frequency of the processor by a first amplitude;
[0020] If the power consumption parameter is less than the first power consumption parameter threshold and greater than or equal to the second power consumption parameter threshold, maintaining the operating frequency of the processor within the current frequency range;
[0021] If the power consumption parameter is less than the second power consumption parameter threshold, the operating frequency of the processor is increased by a second amplitude.
[0022] Optionally, an energy storage module is further included, for supplying power to the processor when the data processing device switches between the first mode and the second mode.
[0023] Optionally, the processor is further configured to:
[0024] Sending a third notification message to the electronic device, wherein the third notification message represents a frequency parameter of the data processing device;
[0025] receiving a feedback message sent by the electronic device in response to the third notification message;
[0026] The data provided by the electronic device is processed using the first model or the second model based on the feedback message, and the power consumption of processing the data using the first model is greater than the power consumption of processing the data using the second model.
[0027] Optionally, it further includes a memory for storing the model parameters of the first model and the model parameters of the second model provided by the electronic device;
[0028] When the processor processes the data provided by the electronic device using the first model or the second model based on the feedback message, it is configured to:
[0029] In a case where the feedback message indicates that the data is to be processed by the first model, loading model parameters of the first model from the memory to process the data according to the model parameters of the first model;
[0030] In a case where the feedback message indicates that the data is to be processed by the second model, model parameters of the second model are loaded from the memory to process the data according to the model parameters of the second model.
[0031] A second aspect of the present application provides a data processing method, comprising:
[0032] processing data provided by the electronic device on a processor of the data processing device in a first mode when the data processing device is powered by the electronic device, the electronic device being connected to the data processing device;
[0033] When the data processing device is powered by a power supply module different from that of the electronic device, processing data provided by the electronic device on a processor of the data processing device in a second mode;
[0034] The operating frequency of the processor in the first mode is lower than the operating frequency of the processor in the second mode, and the power output by the power supply module to the data processing device is higher than the power output by the electronic device to the data processing device.
[0035] Optionally, also include:
[0036] Sending a third notification message to the electronic device, wherein the third notification message represents a frequency parameter of the data processing device;
[0037] receiving a feedback message sent by the electronic device in response to the third notification message;
[0038] The data provided by the electronic device is processed using the first model or the second model based on the feedback message, and the power consumption of processing the data using the first model is greater than the power consumption of processing the data using the second model. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0040] Figure 1 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0041] Figure 2 is a structural schematic diagram of another data processing device provided in an embodiment of the present application;
[0042] Figure 3 This is a schematic diagram of the connection relationship between a data processing device and an electronic device provided in an embodiment of the present application;
[0043] Figure 4 is a schematic diagram of the connection relationship between another data processing device and an electronic device provided in an embodiment of the present application;
[0044] Figure 5 It is a flow chart of a data processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] This embodiment provides a data processing device. Figure 1 The data processing device may include a processor 101, and the processor 101 may be used to process data provided by an electronic device, and the electronic device is connected to the data processing device.
[0047] like Figure 1 As shown, the data processing device 100 may include a first interface 102 and a second interface 103 , the first interface 102 may be connected to the electronic device, and the second interface 103 may be connected to the power supply module.
[0048] The data processing device has a first mode and a second mode, and the operating frequency of the processor 101 in the first mode is lower than the operating frequency of the processor 101 in the second mode.
[0049] In the first mode, the data processing device 100 is powered by the electronic device;
[0050] In the second mode, the data processing device 100 can be connected to the power supply module through the second interface 103, so that it is powered by a power supply module different from the electronic device, and the power output by the power supply module to the data processing device 100 is greater than the power output by the electronic device to the data processing device 100.
[0051] The processor 101 may include one or more processors, and the type of the one or more processors is not limited. Exemplarily, the processor 101 may include one or more graphics processing units (GPUs), may include one or more neural network processing units (NPUs), and may include several GPUs and several NPUs.
[0052] In this embodiment, the mode in which the data processing device 100 works can be directly controlled by the processor 101. That is, when the data processing device 100 is powered by the electronic device, the processor 101 actively switches to the first mode to work, and when the data processing device 100 is powered by the power supply module, the processor 101 actively switches to the second mode to work.
[0053] In some embodiments, the operating frequency of the processor 101 in the first mode is lower than the operating frequency of the processor 101 in the second mode. It can be understood that the upper limit of the operating frequency of the processor 101 in the first mode (also understood as the rated operating frequency) is lower than the upper limit of the operating frequency of the processor 101 in the second mode.
[0054] Exemplarily, the upper limit of the operating frequency of the processor 101 in the first mode may be 700 megahertz (MHz), and the upper limit of the operating frequency of the processor 101 in the second mode may be 1000 MHz.
[0055] In some embodiments, the real-time operating frequency of the processor 101 in the first mode is lower than the real-time operating frequency of the processor 101 in the second mode.
[0056] The first interface 101 may be any interface having data transmission and power transmission functions, such as a Thunderbolt interface, a Universal Serial Bus (USB) interface, etc. The second interface 102 may have data transmission and power transmission functions, or may only have a power transmission function.
[0057] The electronic device that provides data to the data processing device 100 may be any multifunctional user terminal device, such as a laptop computer, a desktop computer, a tablet computer, a smart phone, or the like.
[0058] In the related art, electronic devices generally have a number of interfaces, and data processing devices can be connected to the electronic devices through these interfaces. The electronic devices supply power to the data processing devices through the interfaces and exchange data with the data processing devices through the interfaces.
[0059] Exemplarily, the interface of the electronic device includes but is not limited to a Thunderbolt interface, a Universal Serial Bus (USB) interface, and the like.
[0060] Generally, the power supply capabilities of these interfaces are limited. For example, when the current value of the Lightning interface is greater than a certain threshold (such as 3.3 amperes), the overcurrent protection (OCP) module of the electronic device will stop supplying power to the data processing device through the interface, causing the data processing device to stop working and the currently processed data to be lost.
[0061] In contrast, in the data processing device provided in this embodiment, when the data processing device is powered by an electronic device with low output power, it operates in a first mode with a low operating frequency, which can not only provide a certain data processing capability, but also operate continuously and stably to avoid abnormal situations such as device loss. On the other hand, it is powered by a power supply module with higher output power and operates in a second mode with a high operating frequency, thereby providing stronger data processing capabilities.
[0062] In some embodiments, see Figure 2 , the data processing device may further include a first controller 201, configured to:
[0063] In the first mode, sending a first notification message to the electronic device so that the electronic device can supply power to the data processing device;
[0064] In the second mode, a second notification message is sent to the electronic device, so that the electronic device can receive power from the power supply module.
[0065] The first controller 201 may be a chip or a control module that matches the interface protocol of the first interface 101. As an example, when the first interface 101 is a Thunderbolt interface, the first controller 201 may be a corresponding Thunderbolt controller (TBT controller).
[0066] See also Figure 3 and Figure 4 , is a schematic diagram of the connection relationship between the data processing device 100, the electronic device 300 and the power supply module 400, for ease of understanding, Figure 3 and Figure 4 Other components of the data processing device 100 are omitted.
[0067] In the first mode, if Figure 3 As shown, the electronic device 300 is connected to the first interface 101 of the data processing device 100 via a connecting cable (e.g., a Thunderbolt cable), the data processing device 100 receives data of the electronic device 300 from the first interface 101, feeds back processing results to the electronic device 300 from the first interface 101, and receives power from the electronic device 300 from the first interface 101.
[0068] In the second mode, if Figure 4 As shown, the electronic device 300 is connected to the first interface 101 of the data processing device 100 via a connecting line, the power supply module 400 is connected to the second interface 102 of the data processing device 100 via a connecting line, and the power supply module 400 is electrically connected to the plugboard or the socket strip.
[0069] exist Figure 4 In the connection relationship shown, the power supply module 400 can draw power from the power grid through a socket board or a socket strip, thereby supplying power to the data processing device 100 through the second interface 102. The data processing device 100 still receives data from the electronic device 300 from the first interface 101 and feeds back the processing results to the electronic device 300.
[0070] exist Figure 4 In the connection relationship shown, the data processing device 100 can also connect the first interface 101 and the second interface 102, so that when the electronic device 300 can receive power from the power supply module 400, the power supply module 400 can also supply power to the electronic device 300 through the second interface 102 and the first interface 101. When the electronic device 300 is a portable terminal device powered by a battery, the power supply module 400 supplies power to the electronic device 300 to reduce the power consumption of the battery, so that the electronic device 300 can continue to work for a longer time.
[0071] The first controller 201 may send the above notification message to the electronic device 300 every time the data processing device 100 switches modes. That is, when the data processing device 100 switches from the second mode to the first mode, the first controller 201 sends the first notification message to the electronic device 300, and when the data processing device 100 switches from the first mode to the second mode, the first controller 201 sends the second notification message to the electronic device 300.
[0072] The first controller 201 may send the above notification message to the electronic device 300 when the power supply mode of the data processing device is changed. That is, when the power supply module 400 continues to supply power to the data processing device 100, the first controller 201 detects that the power supply module 400 stops supplying power to the data processing device 100, and the first controller 201 sends a first notification message to the electronic device 300; when the electronic device 300 continues to supply power to the data processing device 100, the first controller 201 detects that the power supply module 400 is connected to the data processing device 100, and the first controller 201 sends a second notification message to the electronic device 300.
[0073] The first controller 201 can detect the voltage of the second interface 103. If it is detected that the voltage of the second interface 103 is greater than a certain value, it is determined that the power supply module 400 is connected to the data processing device 100. If it is detected that the voltage of the second interface 103 is less than the value, it is determined that the power supply module 400 stops supplying power.
[0074] The first notification message and the second notification message may be in various forms without limitation.
[0075] As an example, the first controller 201 may configure a register representing different modes in the controller, and different modes may be represented by different values of the register. For example, a value of 0 in the register indicates that the data processing device 100 is in the first mode, and a value of 1 indicates that the data processing device 100 is in the first mode.
[0076] When detecting a switch from the second mode to the first mode, or detecting that the power supply module 400 stops supplying power, the first controller 201 changes the value of the register from 1 to 0, and sends the changed value as a first notification message to the electronic device 300; when detecting a switch from the first mode to the second mode, or detecting that the power supply module 400 starts supplying power, the first controller 201 changes the value of the register from 0 to 1, and sends the changed value as a second notification message to the electronic device 300.
[0077] The power supply module 400 can be any power adapter composed of electrical components such as a transformer, a rectifier, and a filter. The power supply module 400 can convert the AC power provided by the power grid (such as 220V three-phase AC power) into low-voltage pulsed DC power suitable for the data processing device 100.
[0078] In some optional embodiments, the data processing device 100 may further include: Figure 2 The second controller 202 shown can be used to:
[0079] When the data processing device is not powered by the power supply module, the control processor is in the first mode;
[0080] When the data processing device is powered by the power supply module, the control processor is in the second mode.
[0081] The second controller 202 can control the processor 101 to switch between different modes by controlling the upper limit of the operating frequency of the processor 101 .
[0082] For example, when the power supply module 400 stops supplying power, the second controller 202 can set an upper limit of the operating frequency of the processor 101 to 700 MHz, so that the processor 101 operates in the first mode. When the power supply module 400 starts supplying power, the second controller 202 can set an upper limit of the operating frequency of the processor to 1000 MHz, so that the processor 101 operates in the first mode.
[0083] Alternatively, the second controller 202 can cancel the operating frequency limit of the processor 101 when the power supply module 400 starts to supply power, so that the processor 101 is in the second mode, and the processor 101 can operate at the highest operating frequency allowed by its hardware. When the power supply module 400 stops supplying power, the processor 101 is set with an upper limit of operating frequency that is lower than the highest operating frequency allowed by the hardware, so that the processor 101 operates in the first mode, and the processor 101 can operate at an operating frequency not higher than the set upper limit of operating frequency.
[0084] The second controller 202 may be any chip or control module capable of controlling the processor 101 to switch between different operation modes. As an example, the second controller 202 may be a proportional plus derivative controller (PD controller).
[0085] In some optional embodiments, the data processing device may further include Figure 2 The detection module 203 shown is used to detect the power consumption parameters of the processor in the first mode.
[0086] When the data processing device 100 includes the detection module 203 , the second controller 202 may also be used to control the operating frequency of the processor 101 according to the power consumption parameter in the first mode to prevent the power consumption of the processor 101 from exceeding the power supply capacity of the electronic device 300 .
[0087] The power consumption parameter can characterize the amount of power consumed by the processor 101 in real time. For example, the power consumption parameter can be a current parameter, characterizing the amount of current currently input to the processor 101 by the first interface 102, or it can be a power parameter, characterizing the amount of power currently provided to the processor 101 by the first interface 102.
[0088] The detection module 203 may be a sensor capable of detecting a specific power consumption parameter, for example, a current sensor capable of detecting current, a power sensor capable of detecting power, and the like.
[0089] The detection module 203 may be integrated in the processor 101 , or may be an independent module in the data processing device 100 .
[0090] In some embodiments, the data processing device 100 may further include one or more light-emitting devices (eg, LED lights), and different states of the data processing device 100 may be indicated by the light-emitting devices.
[0091] For example, the light emitting device may emit yellow light when the data processing device 100 is in the first mode, and emit green light when the data processing device 100 is in the second mode; or, it may emit red light when the power consumption parameter detected by the detection module 203 is greater than a certain threshold, and emit green light when the power consumption parameter detected by the detection module 203 is less than or equal to the threshold.
[0092] In some embodiments, the second controller 202 may control the operating frequency of the processor 101 in the following manner:
[0093] If the power consumption parameter is greater than or equal to a first power consumption parameter threshold, lowering the operating frequency of the processor 101 by a first amplitude;
[0094] If the power consumption parameter is less than the first power consumption parameter threshold and greater than or equal to the second power consumption parameter threshold, keep the operating frequency of the processor 101 within the current frequency range;
[0095] If the power consumption parameter is less than the second power consumption parameter threshold, the operating frequency of the processor 101 is increased by a second amplitude.
[0096] The first power consumption parameter threshold may be greater than the second power consumption parameter threshold, or may be equal to the second power consumption parameter threshold.
[0097] The first amplitude may be equal to the second amplitude, or may be greater than the second amplitude. Setting the first amplitude greater than the second amplitude can avoid significantly increasing the operating frequency and causing the power consumption of the processor 101 to exceed the power supply capacity of the electronic device, and can also reduce the operating frequency of the processor 101 more quickly when there is a risk of power consumption exceeding the power supply capacity. Therefore, setting in this manner is more conducive to preventing problems that may be caused when the power consumption of the processor 101 exceeds the power supply capacity.
[0098] The second controller 202 may control the operating frequency of the processor 101 by sending corresponding instructions to the processor 101 .
[0099] For example, when it is necessary to lower the operating frequency of processor 101 by a first amplitude, an instruction to lower the operating frequency by a first amplitude is sent to processor 101; when it is necessary to keep the operating frequency within the current frequency range, an instruction to continue running in the current state is sent to processor 101, or no instruction is sent, so that processor 101 runs in the current state by default; when it is necessary to increase the operating frequency of processor 101 by a second amplitude, an instruction to increase the operating frequency by a second amplitude is sent to processor 101.
[0100] The first power consumption parameter threshold and the second power consumption parameter threshold may be configured according to the power supply capability of the electronic device 300 .
[0101] As an example, the power consumption parameter may be a current parameter. When the electronic device 300 supplies power to the data processing device 100, it may provide a maximum current of 5 V and 3.3 A. Correspondingly, the first power consumption parameter threshold may be set to 3.2 A, the second power consumption parameter threshold may be set to 3 A, the first amplitude may be 100 MHz, and the second amplitude may be 50 MHz.
[0102] Based on the above settings, when the data processing device 100 is in the first mode, if the detection module 203 detects that the current parameter exceeds 3.2A, the second controller 202 sends an instruction to reduce the frequency by 100MHz to the processor 101, so that the processor 101 reduces the operating frequency by 100MHz on the current basis; if the detection module 203 detects that the current is maintained between 3A and 3.2A, the second controller 202 does not send instructions to the processor 101, and the processor 101 operates within the current frequency range; if the detection module 203 detects that the current parameter is less than 3A, the second controller 203 sends an instruction to increase the frequency by 50MHz to the processor 101, so that the processor 101 increases the operating frequency by 50MHz on the current basis.
[0103] In some optional embodiments, the data processing device 100 may further include: Figure 2 The energy storage module 204 shown may be used to supply power to the processor 101 when the data processing device switches between the first mode and the second mode.
[0104] The energy storage module 204 may be a supercapacitor, or a small rechargeable battery (such as a rechargeable button battery), or other devices capable of storing electrical energy.
[0105] The energy storage module 204 may provide power to the processor 101 in the following manner.
[0106] During the period when the electronic device 300 supplies power to the processor 101, the energy storage module 204 stops supplying power to the processor 101. At this time, if the amount of electricity stored in the energy storage module 204 is less than a certain threshold or less than the maximum capacity of the energy storage module 204, the second controller 202 can use the power provided by the electronic device 300 to charge the energy storage module 204 until it is fully charged.
[0107] While the electronic device 300 is supplying power to the processor 101 , the second controller 202 detects that the power supply module 400 is connected to the data processing device 100 , and the second controller 202 sends a power supply start instruction to the energy storage module 204 , and the energy storage module 204 responds to the instruction and starts supplying power to the processor 101 .
[0108] After the processor 101 completes the circuit switching and starts to be powered by the power supply module 400, the second controller 202 sends a power supply stop instruction to the energy storage module 204, and the energy storage module 204 stops supplying power. During the power supply module 400 supplying power, the second controller 202 can also charge the energy storage module 204 with the power provided by the power supply module 400.
[0109] During the power supply of the power supply module 400 , the second controller 202 detects that the power supply module 400 stops supplying power, and then the second controller 202 sends an instruction to start supplying power to the energy storage module 204 . In response to the instruction, the energy storage module 204 starts supplying power to the processor 101 .
[0110] After the processor 101 completes the circuit switching and starts to be powered by the electronic device 300 , the second controller 202 sends a power-off instruction to the energy storage module 204 , and the energy storage module 204 stops supplying power.
[0111] The manner in which the second controller 202 detects whether the power supply module 400 is connected or stops supplying power can refer to the aforementioned detection manner of the first controller 201 and will not be described in detail.
[0112] The advantages of setting the above energy storage module 204 are:
[0113] During the process of switching between power supply from the power supply module 400 and power supply from the electronic device 300, the processor 101 needs to first stop receiving power from one end and then receive power from the other end. From stopping to receiving again, neither the power supply module 400 nor the electronic device 300 can supply power to the processor 101. The energy storage module 204 can temporarily supply power to the processor 101 during this period of time, so that the processor 101 remains powered on, avoiding power failure of the processor 101 during the switching process and causing loss of data in processing.
[0114] Optionally, the processor 101 is further configured to:
[0115] Sending a third notification message to the electronic device 300, where the third notification message represents a frequency parameter of the data processing device 100;
[0116] Receiving a feedback message sent by the electronic device 300 in response to the third notification message;
[0117] The data provided by the electronic device 300 is processed using the first model or the second model based on the feedback message, and the power consumption of processing the data using the first model is greater than the power consumption of processing the data using the second model.
[0118] The number of model parameters contained in the first model may be greater than the number of model parameters contained in the second model. The first model and the second model may be models of the same type or models of different types. For example, the first model and the second model may both be large language models for processing text, or the first model may be a raw image model for generating images based on input information, and the second model may be a large language model.
[0119] The third notification message may include at least one of an upper limit of an operating frequency of the processor 101 , a real-time operating frequency, and a mode of the processor 101 .
[0120] When the third notification message only includes the operating frequency upper limit, the electronic device 300 can compare the operating frequency upper limit and the frequency threshold. If the operating frequency upper limit is greater than the frequency threshold, the feedback message sent can instruct the processor 101 to process data using the first model; if the operating frequency upper limit is less than or equal to the frequency threshold, the feedback message sent can instruct the processor 101 to process data using the second model.
[0121] When the third notification message only includes the real-time operating frequency, the electronic device 300 can compare the real-time operating frequency with the frequency threshold. If the real-time operating frequency is greater than the frequency threshold, the feedback message sent can instruct the processor 101 to process the data using the first model; if the real-time operating frequency is less than or equal to the frequency threshold, the feedback message sent can instruct the processor 101 to process the data using the second model.
[0122] When the third notification message only includes the mode of the processor 101, the electronic device 300 can determine whether the processor 101 is in the first mode or the second mode. If it is in the first mode, the feedback message sent can instruct the processor 101 to process data using the second model; if it is in the second mode, the feedback message sent can instruct the processor 101 to process data using the first model.
[0123] When the third notification message sent includes at least the real-time operating frequency, the corresponding feedback message is sent based on the comparison result of the real-time operating frequency; when the third notification message sent only includes the operating frequency upper limit and the mode, the corresponding feedback message is sent based on the comparison result of the operating frequency upper limit.
[0124] Optionally, when the processor 101 processes data using either the first model or the second model, the processor of the electronic device 300 may process other data using the other of the first model and the second model. For example, when the processor 101 processes data using the first model, the processor of the electronic device 300 may process data using the second model, and the data processed by both parties may be the same or different.
[0125] In order to enable the electronic device 300 to receive the third notification message, a driver adapted to the data processing device 100 can be pre-installed in the operating system of the electronic device 300. After receiving the third notification message, the driver can report the third notification message to the application of the electronic device 300, so that the application sends a corresponding feedback message to the data processing device 100 in the above manner.
[0126] The frequency threshold used for comparison may be a preset fixed value, or may be determined according to the rated frequency of the processor of the electronic device 300. For example, the frequency threshold may be equal to the rated frequency of the processor of the electronic device 300. As an example, if the rated frequency of the processor of the electronic device 300 is 700 MHz, the frequency threshold may be set to 700 MHz.
[0127] In some optional embodiments, the data processing device 100 may further include: Figure 2 The memory 205 shown is used to store the model parameters of the first model and the model parameters of the second model provided by the electronic device.
[0128] The memory 205 may be any type of memory, for example, a double data rate synchronous dynamic random access memory (DDR for short).
[0129] In addition to the model parameters, the memory 205 can also be used to store intermediate data generated during the processing of the processor 101 .
[0130] The model parameters of the first model and the model parameters of the second model may be pre-written by the relevant manufacturer, or may be written into the memory 205 by the electronic device 300 when the data processing device 100 and the electronic device 300 establish a connection.
[0131] When the processor 101 processes the data provided by the electronic device using the first model or the second model based on the feedback message, it can be used to:
[0132] In the case where the feedback message indicates that the data is processed using the first model, loading the model parameters of the first model from the memory 205 to process the data according to the model parameters of the first model;
[0133] In the case where the feedback message indicates that the data is processed using the second model, the model parameters of the second model are loaded from the memory 205 to process the data according to the model parameters of the second model.
[0134] Each time the processor 101 loads model parameters of a model from the memory 205 , it may discard the previously loaded model parameters of another model and delete the data processed by the other model stored in the memory 205 .
[0135] For example, when the data processing device 100 is connected to the electronic device 300, the processor 101 first loads the model parameters of the first model, and uses the data provided by the second model data electronic device 300. After a period of time, the upper limit of the operating frequency of the processor 101 changes, and the upper limit of the operating frequency is less than the frequency threshold. Then, the processor 101 responds to the feedback message of running the second model, discards the model parameters of the first model previously loaded into the processor 101, deletes the intermediate data generated when running the first model and the data that needs to be input into the first model stored in the memory 205, and loads the model parameters of the second model from the memory 205. If the upper limit of the operating frequency becomes greater than the frequency threshold after a period of time, the processor 101 can respond to the feedback message of running the first model, discard the model parameters of the second model previously loaded into the processor 101, delete the intermediate data generated when running the second model and the data that needs to be input into the second model stored in the memory 205, and load the model parameters of the first model from the memory 205, and so on.
[0136] If the data processing device 100 includes the energy storage module 204 , the energy storage module 204 may also supply power to the memory 205 during the switching of the data processing device 100 between the first mode and the second mode.
[0137] In some optional embodiments, the data processing device 100 may further include: Figure 2 As shown in the heat dissipation module 206 , in a first mode, the heat dissipation module 206 can be powered by the electronic device 300 , and in a second mode, the heat dissipation module 206 can be powered by the power supply module 400 .
[0138] The heat dissipation module 206 can be controlled by the processor 101 and work based on the real-time operating frequency of the processor 101 to discharge the heat generated by the processor 101 to the external environment in a timely manner to prevent the processor 101 from overheating.
[0139] The heat dissipation module 206 may be an air-cooled heat sink (eg, a fan) or other forms of heat sinks. The speed of the fan may be controlled by the processor 101 based on the real-time operating frequency. Generally, the real-time speed may be positively correlated with the real-time operating frequency of the processor 101.
[0140] If the data processing device 100 includes the energy storage module 204 , the energy storage module 204 may also supply power to the heat dissipation module 206 during the switching of the data processing device 100 between the first mode and the second mode.
[0141] This embodiment provides a data processing method, see Figure 5 , is a flow chart of the method, and the method may include the following steps.
[0142] S501, when a data processing device is powered by an electronic device, processing data provided by the electronic device on a processor of the data processing device in a first mode, and the electronic device is connected to the data processing device.
[0143] S502, when the data processing device is powered by a power supply module different from that of the electronic device, processing data provided by the electronic device on a processor of the data processing device in a second mode, wherein the operating frequency of the processor in the first mode is less than the operating frequency of the processor in the second mode, and the power output by the power supply module to the data processing device is greater than the power output by the electronic device to the data processing device.
[0144] Optionally, also include:
[0145] Sending a third notification message to the electronic device, where the third notification message represents a frequency parameter of the data processing device;
[0146] receiving a feedback message sent by the electronic device in response to the third notification message;
[0147] The data provided by the electronic device is processed using the first model or the second model based on the feedback message, and the power consumption of processing the data using the first model is greater than the power consumption of processing the data using the second model.
[0148] Optionally, processing the data provided by the electronic device using the first model or the second model based on the feedback message includes:
[0149] In the case where the feedback message indicates that the data is to be processed using the first model, loading model parameters of the first model from a memory of the data processing device to process the data according to the model parameters of the first model;
[0150] In a case where the feedback message indicates that the data is to be processed using the second model, model parameters of the second model are loaded from the memory to process the data according to the model parameters of the second model.
[0151] Optionally, the data processing method of this embodiment further includes:
[0152] In the first mode, sending a first notification message to the electronic device so that the electronic device can supply power to the data processing device;
[0153] In the second mode, a second notification message is sent to the electronic device, so that the electronic device can receive power from the power supply module.
[0154] Optionally, the data processing method of this embodiment further includes:
[0155] Detect the power consumption parameters of the processor;
[0156] Control the processor's operating frequency based on power consumption parameters.
[0157] Optionally, the operating frequency of the processor is controlled according to the power consumption parameter, including:
[0158] If the power consumption parameter is greater than or equal to a first power consumption parameter threshold, lowering the operating frequency of the processor by a first amplitude;
[0159] If the power consumption parameter is less than the first power consumption parameter threshold and greater than or equal to the second power consumption parameter threshold, maintaining the operating frequency of the processor within the current frequency range;
[0160] If the power consumption parameter is less than a second power consumption parameter threshold, the operating frequency of the processor is increased by a second amplitude.
[0161] Optionally, the data processing method of this embodiment further includes:
[0162] During the switching of the data processing device between the first mode and the second mode, the energy storage module of the data processing device is controlled to supply power to the processor.
[0163] For the implementation of each step in the above method, reference may be made to the description of the corresponding modules in the data processing device of the aforementioned embodiment, which will not be described in detail.
[0164] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0165] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0166] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0167] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0168] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data processing device, comprising a processor, for processing data provided by an electronic device, the electronic device being connected to the data processing device; The data processing device has a first mode and a second mode; The operating frequency of the processor in the first mode is lower than the operating frequency of the processor in the second mode; In the first mode, the data processing device is powered by the electronic device; In the second mode, the data processing device is powered by a power supply module different from the electronic device, and the power output by the power supply module to the data processing device is greater than the power output by the electronic device to the data processing device.
2. The device according to claim 1, further comprising a first controller for: In the first mode, sending a first notification message to the electronic device so that the electronic device can supply power to the data processing device; In the second mode, a second notification message is sent to the electronic device, so that the electronic device can receive power from the power supply module.
3. The device according to claim 1, further comprising a second controller for: When the data processing device is not powered by the power supply module, controlling the processor to be in the first mode; When the data processing device is powered by the power supply module, the processor is controlled to be in the second mode.
4. The device according to claim 3, further comprising a detection module, configured to detect power consumption parameters of the processor in the first mode; The second controller is further configured to control the operating frequency of the processor according to the power consumption parameter in the first mode.
5. The device according to claim 4, wherein the second controller controls the operating frequency of the processor according to the power consumption parameter, for: If the power consumption parameter is greater than or equal to a first power consumption parameter threshold, lowering the operating frequency of the processor by a first amplitude; If the power consumption parameter is less than the first power consumption parameter threshold and greater than or equal to the second power consumption parameter threshold, maintaining the operating frequency of the processor within the current frequency range; If the power consumption parameter is less than the second power consumption parameter threshold, the operating frequency of the processor is increased by a second amplitude. 6 . The device according to claim 1 , further comprising an energy storage module for supplying power to the processor during the process of the data processing device switching between the first mode and the second mode.
7. The device according to claim 1, wherein the processor is further configured to: Sending a third notification message to the electronic device, wherein the third notification message represents a frequency parameter of the data processing device; receiving a feedback message sent by the electronic device in response to the third notification message; The data provided by the electronic device is processed using the first model or the second model based on the feedback message, and the power consumption of processing the data using the first model is greater than the power consumption of processing the data using the second model.
8. The device according to claim 7, further comprising a memory for storing the model parameters of the first model and the model parameters of the second model provided by the electronic device; When the processor processes the data provided by the electronic device using the first model or the second model based on the feedback message, it is configured to: In a case where the feedback message indicates that the data is to be processed by the first model, loading model parameters of the first model from the memory to process the data according to the model parameters of the first model; In a case where the feedback message indicates that the data is to be processed by the second model, model parameters of the second model are loaded from the memory to process the data according to the model parameters of the second model.
9. A data processing method, comprising: processing data provided by the electronic device on a processor of the data processing device in a first mode when the data processing device is powered by the electronic device, the electronic device being connected to the data processing device; When the data processing device is powered by a power supply module different from that of the electronic device, processing data provided by the electronic device on a processor of the data processing device in a second mode; The operating frequency of the processor in the first mode is lower than the operating frequency of the processor in the second mode, and the power output by the power supply module to the data processing device is higher than the power output by the electronic device to the data processing device.
10. The method according to claim 9, further comprising: Sending a third notification message to the electronic device, wherein the third notification message represents a frequency parameter of the data processing device; receiving a feedback message sent by the electronic device in response to the third notification message; The data provided by the electronic device is processed using the first model or the second model based on the feedback message, and the power consumption of processing the data using the first model is greater than the power consumption of processing the data using the second model.